diff options
author | 2022-02-26 00:25:58 +1100 | |
---|---|---|
committer | 2022-02-26 00:25:58 +1100 | |
commit | a79ea2e9baf351d80452e3fc9f53be06c0bb8a58 (patch) | |
tree | 0d752f300238f3999508e137b07185e1c076325f | |
parent | 1281aa019f5175cc76ee3d51d2f56ea28f62aec7 (diff) | |
parent | 45b02a490f066feb186df56b83c5c19c5499bff5 (diff) |
Merge remote-tracking branch 'upstream/master'
65 files changed, 2943 insertions, 1394 deletions
diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index 599337c3b43..cf45f3a8987 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.mamedev.mame" - android:versionCode="240" - android:versionName="0.240" + android:versionCode="241" + android:versionName="0.241" android:installLocation="auto"> <!-- OpenGL ES 2.0 --> diff --git a/docs/source/conf.py b/docs/source/conf.py index c15876b1165..bbe71ce6c72 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,9 +63,9 @@ copyright = u'1997-2022, MAMEdev and contributors' # built documents. # # The short X.Y version. -version = '0.240' +version = '0.241' # The full version, including alpha/beta/rc tags. -release = '0.240' +release = '0.241' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/hash/c64_cass.xml b/hash/c64_cass.xml index a3198057d3e..88d43bb9b3e 100644 --- a/hash/c64_cass.xml +++ b/hash/c64_cass.xml @@ -12055,6 +12055,26 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="renegade3"> + <description>Renegade III: The Final Chapter</description> + <year>1989</year> + <publisher>Imagine</publisher> + + <part name="cass1" interface="cbm_cass"> + <feature name="part_id" value="Side 1"/> + <dataarea name="cass" size="1139698"> + <rom name="Renegade_III-_The_Final_Chapter_Side_1.tap" size="1139698" crc="9a57dcbb" sha1="2032787ce5ea16bdcc08c85fc8b716d9d2297806"/> + </dataarea> + </part> + + <part name="cass2" interface="cbm_cass"> + <feature name="part_id" value="Side 2"/> + <dataarea name="cass" size="598114"> + <rom name="Renegade_III-_The_Final_Chapter_Side_2.tap" size="598114" crc="ffbb3dd1" sha1="4f2681f1842afa52f7e613f5701a6ec3e49f2ed9"/> + </dataarea> + </part> + </software> + <software name="fractal"> <description>Rescue on Fractalus!</description> <year>1989</year> @@ -12067,6 +12087,82 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="fractala" cloneof="fractal"> + <description>Rescue on Fractalus! (Activision)</description> + <year>1985</year> + <publisher>Activision</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="609703"> + <rom name="Rescue_on_Fractalus.tap" size="609703" crc="89735b64" sha1="6c52a7f625280a7fbde79c9b4a136cc37a528b09"/> + </dataarea> + </part> + </software> + + <software name="retrogra"> + <description>Retrograde</description> + <year>1989</year> + <publisher>Thalamus</publisher> + + <part name="cass1" interface="cbm_cass"> + <feature name="part_id" value="Side A"/> + <dataarea name="cass" size="560849"> + <rom name="Retrograde_Side_1.tap" size="560849" crc="8d413e70" sha1="054fc95fe34eb227fabd7cb4e99fdc8dafa67706"/> + </dataarea> + </part> + + <part name="cass2" interface="cbm_cass"> + <feature name="part_id" value="Side B"/> + <dataarea name="cass" size="2076073"> + <rom name="Retrograde_Side_2.tap" size="2076073" crc="c531f30a" sha1="21e0a50a01642ad936136cfcfbc0e818f31b2dff"/> + </dataarea> + </part> + </software> + + <software name="returnoz"> + <description>Return to Oz</description> + <year>1986</year> + <publisher>U.S. Gold</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="519276"> + <rom name="Return_to_Oz.tap" size="519276" crc="02553fc2" sha1="4cbb5d94941ca68f374f29c9e34a56ffb72477dd"/> + </dataarea> + </part> + </software> + + <software name="revcamel"> + <description>Revenge of the Mutant Camels</description> + <year>1983</year> + <publisher>Llamasoft</publisher> + + <part name="cass1" interface="cbm_cass"> + <feature name="part_id" value="Side 1: Fastload"/> + <dataarea name="cass" size="338088"> + <rom name="Revenge_of_the_Mutant_Camels_Side_1_-_Fastload.tap" size="338088" crc="403e34dc" sha1="8074b1a08b8b1e3dc3df620a745638cc187ed2c8"/> + </dataarea> + </part> + + <part name="cass2" interface="cbm_cass"> + <feature name="part_id" value="Side 2: Slowload"/> + <dataarea name="cass" size="2076073"> + <rom name="Revenge_of_the_Mutant_Camels_Side_2_-_Slowload.tap" size="1597742" crc="1bfed32c" sha1="e8ea1999f03f143a3a757f76372e8db19256ba92"/> + </dataarea> + </part> + </software> + + <software name="talladeg"> + <description>Richard Petty's Talladega</description> + <year>1985</year> + <publisher>U.S. Gold</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="653268"> + <rom name="Richard_Petty's_Talladega.tap" size="653268" crc="01f9ee21" sha1="fc317b1979bb0a48061a2e67dc397a57537acf2e"/> + </dataarea> + </part> + </software> + <software name="rigelsrev"> <description>Rigel's Revenge</description> <year>1987</year> @@ -12193,6 +12289,18 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="roadwars"> + <description>Roadwars</description> + <year>1988</year> + <publisher>Melbourne House</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="480182"> + <rom name="Roadwars.tap" size="480182" crc="b39eca44" sha1="85e742e1f99334f6b49cb442252416b53b687ac2"/> + </dataarea> + </part> + </software> + <software name="robbers"> <description>Robbers of the Lost Tomb</description> <year>1983</year> @@ -12231,8 +12339,8 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> - <software name="robocoph"> - <description>Robocop</description> + <software name="robocop"> + <description>RoboCop</description> <year>1991</year> <publisher>The Hit Squad</publisher> <!-- Dumped by @c64tapes --> @@ -12252,6 +12360,18 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="robocopo" cloneof="robocop"> + <description>RoboCop (Ocean)</description> + <year>1988</year> + <publisher>Ocean</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="1510854"> + <rom name="RoboCop.tap" size="1510854" crc="72c55b24" sha1="1cb1d87a7cccab082e304e37c8f80ae76a1aa494"/> + </dataarea> + </part> + </software> + <software name="rockstar"> <description>Rock Star Ate My Hamster</description> <year>1988</year> @@ -12317,6 +12437,26 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="rodland"> + <description>Rodland</description> + <year>1991</year> + <publisher>Storm</publisher> + + <part name="cass1" interface="cbm_cass"> + <feature name="part_id" value="Side A"/> + <dataarea name="cass" size="448374"> + <rom name="Rodland_Side_1.tap" size="448374" crc="081741a7" sha1="14eb1c38341433ff409eacfae50a110fca8c515c"/> + </dataarea> + </part> + + <part name="cass2" interface="cbm_cass"> + <feature name="part_id" value="Side B"/> + <dataarea name="cass" size="411556"> + <rom name="Rodland_Side_2.tap" size="411556" crc="f209521b" sha1="91a2491639af1dd0f258d30072058b6bbe1ba0b2"/> + </dataarea> + </part> + </software> + <software name="rollarnd"> <description>Rollaround</description> <year>1988</year> @@ -12365,6 +12505,36 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="rthunderu" cloneof="rthunder"> + <description>Rolling Thunder (U.S. Gold)</description> + <year>1986</year> + <publisher>U.S. Gold</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="569954"> + <rom name="Rolling_Thunder.tap" size="569954" crc="88cbc0b1" sha1="babc75b96d5b9aafc0ce5c6cb9f2429a0da16b75"/> + </dataarea> + </part> + </software> + + <software name="roomten"> + <description>Room Ten</description> + <year>1986</year> + <publisher>CRL</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="322194"> + <rom name="Room_Ten.tap" size="322194" crc="f5a7e427" sha1="b281493b84833097b69e0481c49f519ff3dad251"/> + </dataarea> + </part> + + <part name="cass2" interface="cbm_cass"> + <dataarea name="cass" size="322194"> + <rom name="Room_Ten_a1.tap" size="322194" crc="fcfbb7e6" sha1="08b13a786b4d0494e50169ff5310d393962435e8"/> + </dataarea> + </part> + </software> + <software name="roomlord"> <description>RoomLord</description> <year>1984</year> @@ -12393,11 +12563,13 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ <description>Run the Gauntlet</description> <year>1990</year> <publisher>The Hit Squad</publisher> + <part name="cass1" interface="cbm_cass"> <dataarea name="cass" size="2223542"> <rom name="run the gauntlet side a.tap" size="2223542" crc="d0e77cb1" sha1="8592b26a06bde96cdb6a0877ceda75e4ed8db256"/> </dataarea> </part> + <part name="cass2" interface="cbm_cass"> <dataarea name="cass" size="2217669"> <rom name="run the gauntlet side b.tap" size="2217669" crc="493bae24" sha1="17ff144092680f6635414e05586cb7af405772de"/> @@ -12405,6 +12577,18 @@ Some are based on the C64 Tape Archive at https://archive.org/download/c64tapes/ </part> </software> + <software name="runthego" cloneof="runtheg"> + <description>Run the Gauntlet (Ocean)</description> + <year>1989</year> + <publisher>Ocean</publisher> + + <part name="cass1" interface="cbm_cass"> + <dataarea name="cass" size="2223162"> + <rom name="Run_the_Gauntlet.tap" size="2223162" crc="81323723" sha1="5794e7c1c5a01809def7a432bd05e9377ac301ff"/> + </dataarea> + </part> + </software> + <software name="rygar"> <description>Rygar</description> <year>1989</year> diff --git a/hash/cpc_cass.xml b/hash/cpc_cass.xml index 3c37d1c75c9..dd387d28e49 100644 --- a/hash/cpc_cass.xml +++ b/hash/cpc_cass.xml @@ -3730,8 +3730,8 @@ Please stick to using the floppy versions for the time being... </dataarea> </part> <part name="cass2" interface="cpc_cass"> - <dataarea name="cass" size="72360"> - <rom name="back to the future ii (uk) (face a) (1990) [original] [tape].cdt" size="72360" crc="c2b3d27f" sha1="e7340d4890d3c950bdc5dcc557e8a839a6c80bb1"/> + <dataarea name="cass" size="208301"> + <rom name="back to the future ii (uk) (face b) (1990) [original] [tape].cdt" size="208301" crc="6cb818fa" sha1="888101480873b6d4ff9bf0d720268b0fe9b5fde1"/> </dataarea> </part> </software> diff --git a/hash/digilog320.xml b/hash/digilog320.xml index a1e37d7e223..4b6973cbc01 100644 --- a/hash/digilog320.xml +++ b/hash/digilog320.xml @@ -35,7 +35,7 @@ STEP 4: Return to FUNC. MENU, set power up to AUTOEXEC. --> <software name="320ezr"> - <description>320 E-Z Menu (Restored)</description> + <description>320 E-Z Menu (restored)</description> <year>198?</year> <publisher>Digilog</publisher> <info name="pn" value="24-0199-01 REV A" /> diff --git a/hash/playmaker.xml b/hash/playmaker.xml new file mode 100644 index 00000000000..9873bbf4de1 --- /dev/null +++ b/hash/playmaker.xml @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> +<!-- +license:CC0 +--> +<softwarelist name="playmaker" description="Tiger Playmaker playcards"> +<!-- + +3 playcards came with the handheld: Basketball, Hockey, Soccer. + +Each playcard also functions as a screen overlay, but MAME doesn't support this yet +through the softwarelist. + +--> + + <software name="baskball"> + <description>Basketball</description> + <year>1980</year> + <publisher>Tiger Electronics</publisher> + <part name="cart" interface="playmaker_cart"> + <feature name="notch" value="0x1" /> + <dataarea name="nodata" size="0x10"></dataarea> + </part> + </software> + + <software name="hockey"> + <description>Hockey</description> + <year>1980</year> + <publisher>Tiger Electronics</publisher> + <part name="cart" interface="playmaker_cart"> + <feature name="notch" value="0x3" /> + <dataarea name="nodata" size="0x10"></dataarea> + </part> + </software> + + <software name="soccer"> + <description>Soccer</description> + <year>1980</year> + <publisher>Tiger Electronics</publisher> + <part name="cart" interface="playmaker_cart"> + <feature name="notch" value="0x2" /> + <dataarea name="nodata" size="0x10"></dataarea> + </part> + </software> + +</softwarelist> diff --git a/hash/tc4.xml b/hash/tc4.xml index 77749d93d8d..e2753c5562d 100644 --- a/hash/tc4.xml +++ b/hash/tc4.xml @@ -22,7 +22,7 @@ through the softwarelist. <year>1981</year> <publisher>Coleco</publisher> <part name="cart" interface="tc4_cart"> - <feature name="pinout" value="0x01" /> + <feature name="pinout" value="0x1" /> <dataarea name="nodata" size="0x10"></dataarea> </part> </software> @@ -32,7 +32,7 @@ through the softwarelist. <year>1981</year> <publisher>Coleco</publisher> <part name="cart" interface="tc4_cart"> - <feature name="pinout" value="0x08" /> + <feature name="pinout" value="0x8" /> <dataarea name="nodata" size="0x10"></dataarea> </part> </software> @@ -42,7 +42,7 @@ through the softwarelist. <year>1981</year> <publisher>Coleco</publisher> <part name="cart" interface="tc4_cart"> - <feature name="pinout" value="0x04" /> + <feature name="pinout" value="0x4" /> <dataarea name="nodata" size="0x10"></dataarea> </part> </software> @@ -52,7 +52,7 @@ through the softwarelist. <year>1981</year> <publisher>Coleco</publisher> <part name="cart" interface="tc4_cart"> - <feature name="pinout" value="0x02" /> + <feature name="pinout" value="0x2" /> <dataarea name="nodata" size="0x10"></dataarea> </part> </software> diff --git a/scripts/build/complay.py b/scripts/build/complay.py index 996908ecde0..b5ffe960c9a 100755 --- a/scripts/build/complay.py +++ b/scripts/build/complay.py @@ -12,9 +12,9 @@ import xml.sax.saxutils import zlib -class ErrorHandler(object): +class ErrorHandler: def __init__(self, **kwargs): - super(ErrorHandler, self).__init__(**kwargs) + super().__init__(**kwargs) self.errors = 0 self.warnings = 0 @@ -30,9 +30,9 @@ class ErrorHandler(object): sys.stderr.write('warning: %s' % (exception)) -class Minifyer(object): +class Minifyer: def __init__(self, output, **kwargs): - super(Minifyer, self).__init__(**kwargs) + super().__init__(**kwargs) self.output = output self.incomplete_tag = False @@ -97,7 +97,7 @@ class LayoutChecker(Minifyer): BLENDMODES = frozenset(('none', 'alpha', 'multiply', 'add')) def __init__(self, output, **kwargs): - super(LayoutChecker, self).__init__(output=output, **kwargs) + super().__init__(output=output, **kwargs) self.locator = None self.errors = 0 self.elements = { } @@ -108,14 +108,14 @@ class LayoutChecker(Minifyer): self.group_collections = { } self.current_collections = None - def formatLocation(self): + def format_location(self): return '%s:%d:%d' % (self.locator.getSystemId(), self.locator.getLineNumber(), self.locator.getColumnNumber()) - def handleError(self, msg): + def handle_error(self, msg): self.errors += 1 - sys.stderr.write('error: %s: %s\n' % (self.formatLocation(), msg)) + sys.stderr.write('error: %s: %s\n' % (self.format_location(), msg)) - def checkIntAttribute(self, name, attrs, key, default): + def check_int_attribute(self, name, attrs, key, default): if key not in attrs: return default val = attrs[key] @@ -134,10 +134,10 @@ class LayoutChecker(Minifyer): try: return int(val[offs:], base) except: - self.handleError('Element %s attribute %s "%s" is not an integer' % (name, key, val)) + self.handle_error('Element %s attribute %s "%s" is not an integer' % (name, key, val)) return None - def checkFloatAttribute(self, name, attrs, key, default): + def check_float_attribute(self, name, attrs, key, default): if key not in attrs: return default val = attrs[key] @@ -146,10 +146,10 @@ class LayoutChecker(Minifyer): try: return float(val) except: - self.handleError('Element %s attribute %s "%s" is not a floating point number' % (name, key, val)) + self.handle_error('Element %s attribute %s "%s" is not a floating point number' % (name, key, val)) return None - def checkNumericAttribute(self, name, attrs, key, default): + def check_numeric_attribute(self, name, attrs, key, default): if key not in attrs: return default val = attrs[key] @@ -171,121 +171,121 @@ class LayoutChecker(Minifyer): return float(val) return int(val[offs:], base) except: - self.handleError('Element %s attribute %s "%s" is not a number' % (name, key, val)) + self.handle_error('Element %s attribute %s "%s" is not a number' % (name, key, val)) return None - def checkParameter(self, attrs): + def check_parameter(self, attrs): if 'name' not in attrs: - self.handleError('Element param missing attribute name') + self.handle_error('Element param missing attribute name') else: name = attrs['name'] - self.checkNumericAttribute('param', attrs, 'increment', None) - lshift = self.checkIntAttribute('param', attrs, 'lshift', None) + self.check_numeric_attribute('param', attrs, 'increment', None) + lshift = self.check_int_attribute('param', attrs, 'lshift', None) if (lshift is not None) and (0 > lshift): - self.handleError('Element param attribute lshift "%s" is negative' % (attrs['lshift'], )) - rshift = self.checkIntAttribute('param', attrs, 'rshift', None) + self.handle_error('Element param attribute lshift "%s" is negative' % (attrs['lshift'], )) + rshift = self.check_int_attribute('param', attrs, 'rshift', None) if (rshift is not None) and (0 > rshift): - self.handleError('Element param attribute rshift "%s" is negative' % (attrs['rshift'], )) + self.handle_error('Element param attribute rshift "%s" is negative' % (attrs['rshift'], )) if self.repeat_depth and self.repeat_depth[-1]: if 'start' in attrs: if 'value' in attrs: - self.handleError('Element param has both start and value attributes') + self.handle_error('Element param has both start and value attributes') if 'name' in attrs: if name not in self.variable_scopes[-1]: self.variable_scopes[-1][name] = True elif not self.VARPATTERN.match(name): - self.handleError('Generator parameter "%s" redefined' % (name, )) + self.handle_error('Generator parameter "%s" redefined' % (name, )) else: if 'value' not in attrs: - self.handleError('Element param missing attribute value') + self.handle_error('Element param missing attribute value') if ('increment' in attrs) or ('lshift' in attrs) or ('rshift' in attrs): - self.handleError('Element param has increment/lshift/rshift attribute(s) without start attribute') + self.handle_error('Element param has increment/lshift/rshift attribute(s) without start attribute') if 'name' in attrs: if not self.variable_scopes[-1].get(name, False): self.variable_scopes[-1][name] = False elif not self.VARPATTERN.match(name): - self.handleError('Generator parameter "%s" redefined' % (name, )) + self.handle_error('Generator parameter "%s" redefined' % (name, )) else: if ('start' in attrs) or ('increment' in attrs) or ('lshift' in attrs) or ('rshift' in attrs): - self.handleError('Element param with start/increment/lshift/rshift attribute(s) not in repeat scope') + self.handle_error('Element param with start/increment/lshift/rshift attribute(s) not in repeat scope') if 'value' not in attrs: - self.handleError('Element param missing attribute value') + self.handle_error('Element param missing attribute value') if 'name' in attrs: self.variable_scopes[-1][attrs['name']] = False - def checkBounds(self, attrs): - left = self.checkFloatAttribute('bounds', attrs, 'left', 0.0) - top = self.checkFloatAttribute('bounds', attrs, 'top', 0.0) - right = self.checkFloatAttribute('bounds', attrs, 'right', 1.0) - bottom = self.checkFloatAttribute('bounds', attrs, 'bottom', 1.0) - x = self.checkFloatAttribute('bounds', attrs, 'x', 0.0) - y = self.checkFloatAttribute('bounds', attrs, 'y', 0.0) - xc = self.checkFloatAttribute('bounds', attrs, 'xc', 0.0) - yc = self.checkFloatAttribute('bounds', attrs, 'yc', 0.0) - width = self.checkFloatAttribute('bounds', attrs, 'width', 1.0) - height = self.checkFloatAttribute('bounds', attrs, 'height', 1.0) + def check_bounds(self, attrs): + left = self.check_float_attribute('bounds', attrs, 'left', 0.0) + top = self.check_float_attribute('bounds', attrs, 'top', 0.0) + right = self.check_float_attribute('bounds', attrs, 'right', 1.0) + bottom = self.check_float_attribute('bounds', attrs, 'bottom', 1.0) + self.check_float_attribute('bounds', attrs, 'x', 0.0) + self.check_float_attribute('bounds', attrs, 'y', 0.0) + self.check_float_attribute('bounds', attrs, 'xc', 0.0) + self.check_float_attribute('bounds', attrs, 'yc', 0.0) + width = self.check_float_attribute('bounds', attrs, 'width', 1.0) + height = self.check_float_attribute('bounds', attrs, 'height', 1.0) if (left is not None) and (right is not None) and (left > right): - self.handleError('Element bounds attribute left "%s" is greater than attribute right "%s"' % ( + self.handle_error('Element bounds attribute left "%s" is greater than attribute right "%s"' % ( attrs.get('left', 0.0), attrs.get('right', 1.0))) if (top is not None) and (bottom is not None) and (top > bottom): - self.handleError('Element bounds attribute top "%s" is greater than attribute bottom "%s"' % ( + self.handle_error('Element bounds attribute top "%s" is greater than attribute bottom "%s"' % ( attrs.get('top', 0.0), attrs.get('bottom', 1.0))) if (width is not None) and (0.0 > width): - self.handleError('Element bounds attribute width "%s" is negative' % (attrs['width'], )) + self.handle_error('Element bounds attribute width "%s" is negative' % (attrs['width'], )) if (height is not None) and (0.0 > height): - self.handleError('Element bounds attribute height "%s" is negative' % (attrs['height'], )) + self.handle_error('Element bounds attribute height "%s" is negative' % (attrs['height'], )) if (('left' in attrs) and (('x' in attrs) or ('xc' in attrs))) or (('x' in attrs) and ('xc' in attrs)): - self.handleError('Element bounds has multiple horizontal origin attributes (left/x/xc)') + self.handle_error('Element bounds has multiple horizontal origin attributes (left/x/xc)') if (('left' in attrs) and ('width' in attrs)) or ((('x' in attrs) or ('xc' in attrs)) and ('right' in attrs)): - self.handleError('Element bounds has both left/right and x/xc/width attributes') + self.handle_error('Element bounds has both left/right and x/xc/width attributes') if (('top' in attrs) and (('y' in attrs) or ('yc' in attrs))) or (('y' in attrs) and ('yc' in attrs)): - self.handleError('Element bounds has multiple vertical origin attributes (top/y/yc)') + self.handle_error('Element bounds has multiple vertical origin attributes (top/y/yc)') if (('top' in attrs) and ('height' in attrs)) or ((('y' in attrs) or ('yc' in attrs)) and ('bottom' in attrs)): - self.handleError('Element bounds has both top/bottom and y/yc/height attributes') + self.handle_error('Element bounds has both top/bottom and y/yc/height attributes') - def checkOrientation(self, attrs): + def check_orientation(self, attrs): if self.have_orientation[-1]: - self.handleError('Duplicate element orientation') + self.handle_error('Duplicate element orientation') else: self.have_orientation[-1] = True - if self.checkIntAttribute('orientation', attrs, 'rotate', 0) not in self.ORIENTATIONS: - self.handleError('Element orientation attribute rotate "%s" is unsupported' % (attrs['rotate'], )) + if self.check_int_attribute('orientation', attrs, 'rotate', 0) not in self.ORIENTATIONS: + self.handle_error('Element orientation attribute rotate "%s" is unsupported' % (attrs['rotate'], )) for name in ('swapxy', 'flipx', 'flipy'): if (attrs.get(name, 'no') not in self.YESNO) and (not self.VARPATTERN.match(attrs[name])): - self.handleError('Element orientation attribute %s "%s" is not "yes" or "no"' % (name, attrs[name])) + self.handle_error('Element orientation attribute %s "%s" is not "yes" or "no"' % (name, attrs[name])) - def checkColor(self, attrs): - self.checkColorChannel(attrs, 'red') - self.checkColorChannel(attrs, 'green') - self.checkColorChannel(attrs, 'blue') - self.checkColorChannel(attrs, 'alpha') + def check_color(self, attrs): + self.check_color_channel(attrs, 'red') + self.check_color_channel(attrs, 'green') + self.check_color_channel(attrs, 'blue') + self.check_color_channel(attrs, 'alpha') - def checkColorChannel(self, attrs, name): - channel = self.checkFloatAttribute('color', attrs, name, None) + def check_color_channel(self, attrs, name): + channel = self.check_float_attribute('color', attrs, name, None) if (channel is not None) and ((0.0 > channel) or (1.0 < channel)): - self.handleError('Element color attribute %s "%s" outside valid range 0.0-1.0' % (name, attrs[name])) + self.handle_error('Element color attribute %s "%s" outside valid range 0.0-1.0' % (name, attrs[name])) - def checkTag(self, tag, element, attr): + def check_tag(self, tag, element, attr): if '' == tag: - self.handleError('Element %s attribute %s is empty' % (element, attr)) + self.handle_error('Element %s attribute %s is empty' % (element, attr)) else: if tag.find('^') >= 0: - self.handleError('Element %s attribute %s "%s" contains parent device reference' % (element, attr, tag)) + self.handle_error('Element %s attribute %s "%s" contains parent device reference' % (element, attr, tag)) if ':' == tag[-1]: - self.handleError('Element %s attribute %s "%s" ends with separator' % (element, attr, tag)) + self.handle_error('Element %s attribute %s "%s" ends with separator' % (element, attr, tag)) if tag.find('::') >= 0: - self.handleError('Element %s attribute %s "%s" contains double separator' % (element, attr, tag)) + self.handle_error('Element %s attribute %s "%s" contains double separator' % (element, attr, tag)) - def checkComponent(self, name, attrs): - statemask = self.checkIntAttribute(name, attrs, 'statemask', None) - stateval = self.checkIntAttribute(name, attrs, 'state', None) + def check_component(self, name, attrs): + statemask = self.check_int_attribute(name, attrs, 'statemask', None) + stateval = self.check_int_attribute(name, attrs, 'state', None) if stateval is not None: if 0 > stateval: - self.handleError('Element %s attribute state "%s" is negative' % (name, attrs['state'])) + self.handle_error('Element %s attribute state "%s" is negative' % (name, attrs['state'])) if (statemask is not None) and (stateval & ~statemask): - self.handleError('Element %s attribute state "%s" has bits set that are clear in attribute statemask "%s"' % (name, attrs['state'], attrs['statemask'])) + self.handle_error('Element %s attribute state "%s" has bits set that are clear in attribute statemask "%s"' % (name, attrs['state'], attrs['statemask'])) if 'image' == name: self.handlers.append((self.imageComponentStartHandler, self.imageComponentEndHandler)) else: @@ -293,39 +293,39 @@ class LayoutChecker(Minifyer): self.have_bounds.append({ }) self.have_color.append({ }) - def checkViewItem(self, name, attrs): + def check_view_item(self, name, attrs): if 'id' in attrs: if not attrs['id']: - self.handleError('Element %s attribute id is empty' % (name, )) + self.handle_error('Element %s attribute id is empty' % (name, )) elif not self.VARPATTERN.match(attrs['id']): if attrs['id'] in self.item_ids: - self.handleError('Element %s has duplicate id "%s" (previous %s)' % (name, attrs['id'], self.item_ids[attrs['id']])) + self.handle_error('Element %s has duplicate id "%s" (previous %s)' % (name, attrs['id'], self.item_ids[attrs['id']])) else: - self.item_ids[attrs['id']] = self.formatLocation() + self.item_ids[attrs['id']] = self.format_location() if self.repeat_depth[-1]: - self.handleError('Element %s attribute id "%s" in repeat contains no parameter references' % (name, attrs['id'])) + self.handle_error('Element %s attribute id "%s" in repeat contains no parameter references' % (name, attrs['id'])) if ('blend' in attrs) and (attrs['blend'] not in self.BLENDMODES) and not self.VARPATTERN.match(attrs['blend']): - self.handleError('Element %s attribute blend "%s" is unsupported' % (name, attrs['blend'])) + self.handle_error('Element %s attribute blend "%s" is unsupported' % (name, attrs['blend'])) if 'inputtag' in attrs: if 'inputmask' not in attrs: - self.handleError('Element %s has inputtag attribute without inputmask attribute' % (name, )) - self.checkTag(attrs['inputtag'], name, 'inputtag') + self.handle_error('Element %s has inputtag attribute without inputmask attribute' % (name, )) + self.check_tag(attrs['inputtag'], name, 'inputtag') elif 'inputmask' in attrs: - self.handleError('Element %s has inputmask attribute without inputtag attribute' % (name, )) + self.handle_error('Element %s has inputmask attribute without inputtag attribute' % (name, )) inputraw = None if 'inputraw' in attrs: if (attrs['inputraw'] not in self.YESNO) and (not self.VARPATTERN.match(attrs['inputraw'])): - self.handleError('Element %s attribute inputraw "%s" is not "yes" or "no"' % (name, attrs['inputraw'])) + self.handle_error('Element %s attribute inputraw "%s" is not "yes" or "no"' % (name, attrs['inputraw'])) else: inputraw = 'yes' == attrs['inputraw'] if 'inputmask' not in attrs: - self.handleError('Element %s has inputraw attribute without inputmask attribute' % (name, )) + self.handle_error('Element %s has inputraw attribute without inputmask attribute' % (name, )) if 'inputtag' not in attrs: - self.handleError('Element %s has inputraw attribute without inputtag attribute' % (name, )) - inputmask = self.checkIntAttribute(name, attrs, 'inputmask', None) + self.handle_error('Element %s has inputraw attribute without inputtag attribute' % (name, )) + inputmask = self.check_int_attribute(name, attrs, 'inputmask', None) if (inputmask is not None) and (not inputmask): if (inputraw is None) or (not inputraw): - self.handleError('Element %s attribute inputmask "%s" is zero' % (name, attrs['inputmask'])) + self.handle_error('Element %s attribute inputmask "%s" is zero' % (name, attrs['inputmask'])) def startViewItem(self, name): self.handlers.append((self.viewItemStartHandler, self.viewItemEndHandler)) @@ -338,15 +338,15 @@ class LayoutChecker(Minifyer): def rootStartHandler(self, name, attrs): if 'mamelayout' != name: self.ignored_depth = 1 - self.handleError('Expected root element mamelayout but found %s' % (name, )) + self.handle_error('Expected root element mamelayout but found %s' % (name, )) else: if 'version' not in attrs: - self.handleError('Element mamelayout missing attribute version') + self.handle_error('Element mamelayout missing attribute version') else: try: int(attrs['version']) except: - self.handleError('Element mamelayout attribute version "%s" is not an integer' % (attrs['version'], )) + self.handle_error('Element mamelayout attribute version "%s" is not an integer' % (attrs['version'], )) self.have_script = None self.variable_scopes.append({ }) self.repeat_depth.append(0) @@ -358,33 +358,33 @@ class LayoutChecker(Minifyer): def layoutStartHandler(self, name, attrs): if 'element' == name: if 'name' not in attrs: - self.handleError('Element element missing attribute name') + self.handle_error('Element element missing attribute name') else: generated_name = self.VARPATTERN.match(attrs['name']) if generated_name: self.generated_element_names = True if attrs['name'] not in self.elements: - self.elements[attrs['name']] = self.formatLocation() + self.elements[attrs['name']] = self.format_location() elif not generated_name: - self.handleError('Element element has duplicate name (previous %s)' % (self.elements[attrs['name']], )) - defstate = self.checkIntAttribute(name, attrs, 'defstate', None) + self.handle_error('Element element has duplicate name (previous %s)' % (self.elements[attrs['name']], )) + defstate = self.check_int_attribute(name, attrs, 'defstate', None) if (defstate is not None) and (0 > defstate): - self.handleError('Element element attribute defstate "%s" is negative' % (attrs['defstate'], )) + self.handle_error('Element element attribute defstate "%s" is negative' % (attrs['defstate'], )) self.handlers.append((self.elementStartHandler, self.elementEndHandler)) elif 'group' == name: self.current_collections = { } if 'name' not in attrs: - self.handleError('Element group missing attribute name') + self.handle_error('Element group missing attribute name') else: generated_name = self.VARPATTERN.match(attrs['name']) if generated_name: self.generated_group_names = True if attrs['name'] not in self.groups: - self.groups[attrs['name']] = self.formatLocation() + self.groups[attrs['name']] = self.format_location() if not generated_name: self.group_collections[attrs['name']] = self.current_collections elif not generated_name: - self.handleError('Element group has duplicate name (previous %s)' % (self.groups[attrs['name']], )) + self.handle_error('Element group has duplicate name (previous %s)' % (self.groups[attrs['name']], )) self.handlers.append((self.groupViewStartHandler, self.groupViewEndHandler)) self.variable_scopes.append({ }) self.item_ids = { } @@ -393,12 +393,12 @@ class LayoutChecker(Minifyer): elif ('view' == name) and (not self.repeat_depth[-1]): self.current_collections = { } if 'name' not in attrs: - self.handleError('Element view missing attribute name') + self.handle_error('Element view missing attribute name') else: if attrs['name'] not in self.views: - self.views[attrs['name']] = self.formatLocation() + self.views[attrs['name']] = self.format_location() elif not self.VARPATTERN.match(attrs['name']): - self.handleError('Element view has duplicate name "%s" (previous %s)' % (attrs['name'], self.views[attrs['name']])) + self.handle_error('Element view has duplicate name "%s" (previous %s)' % (attrs['name'], self.views[attrs['name']])) self.handlers.append((self.groupViewStartHandler, self.groupViewEndHandler)) self.variable_scopes.append({ }) self.item_ids = { } @@ -406,24 +406,24 @@ class LayoutChecker(Minifyer): self.have_bounds.append(None) elif 'repeat' == name: if 'count' not in attrs: - self.handleError('Element repeat missing attribute count') + self.handle_error('Element repeat missing attribute count') else: - count = self.checkIntAttribute(name, attrs, 'count', None) + count = self.check_int_attribute(name, attrs, 'count', None) if (count is not None) and (0 >= count): - self.handleError('Element repeat attribute count "%s" is not positive' % (attrs['count'], )) + self.handle_error('Element repeat attribute count "%s" is not positive' % (attrs['count'], )) self.variable_scopes.append({ }) self.repeat_depth[-1] += 1 elif 'param' == name: - self.checkParameter(attrs) + self.check_parameter(attrs) self.ignored_depth = 1 elif ('script' == name) and (not self.repeat_depth[-1]): if self.have_script is None: - self.have_script = self.formatLocation() + self.have_script = self.format_location() else: - self.handleError('Duplicate script element (previous %s)' % (self.have_script, )) + self.handle_error('Duplicate script element (previous %s)' % (self.have_script, )) self.ignored_depth = 1 else: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) self.ignored_depth = 1 def layoutEndHandler(self, name): @@ -434,56 +434,56 @@ class LayoutChecker(Minifyer): if not self.generated_element_names: for element in self.referenced_elements: if (element not in self.elements) and (not self.VARPATTERN.match(element)): - self.handleError('Element "%s" not found (first referenced at %s)' % (element, self.referenced_elements[element])) + self.handle_error('Element "%s" not found (first referenced at %s)' % (element, self.referenced_elements[element])) if not self.generated_group_names: for group in self.referenced_groups: if (group not in self.groups) and (not self.VARPATTERN.match(group)): - self.handleError('Group "%s" not found (first referenced at %s)' % (group, self.referenced_groups[group])) + self.handle_error('Group "%s" not found (first referenced at %s)' % (group, self.referenced_groups[group])) if not self.views: - self.handleError('No view elements found') + self.handle_error('No view elements found') del self.have_script self.handlers.pop() def elementStartHandler(self, name, attrs): if name in self.SHAPES: - self.checkComponent(name, attrs) + self.check_component(name, attrs) elif 'text' == name: if 'string' not in attrs: - self.handleError('Element text missing attribute string') - align = self.checkIntAttribute(name, attrs, 'align', None) + self.handle_error('Element text missing attribute string') + align = self.check_int_attribute(name, attrs, 'align', None) if (align is not None) and ((0 > align) or (2 < align)): - self.handleError('Element text attribute align "%s" not in valid range 0-2' % (attrs['align'], )) - self.checkComponent(name, attrs) + self.handle_error('Element text attribute align "%s" not in valid range 0-2' % (attrs['align'], )) + self.check_component(name, attrs) elif 'simplecounter' == name: - maxstate = self.checkIntAttribute(name, attrs, 'maxstate', None) + maxstate = self.check_int_attribute(name, attrs, 'maxstate', None) if (maxstate is not None) and (0 > maxstate): - self.handleError('Element simplecounter attribute maxstate "%s" is negative' % (attrs['maxstate'], )) - digits = self.checkIntAttribute(name, attrs, 'digits', None) + self.handle_error('Element simplecounter attribute maxstate "%s" is negative' % (attrs['maxstate'], )) + digits = self.check_int_attribute(name, attrs, 'digits', None) if (digits is not None) and (0 >= digits): - self.handleError('Element simplecounter attribute digits "%s" is not positive' % (attrs['digits'], )) - align = self.checkIntAttribute(name, attrs, 'align', None) + self.handle_error('Element simplecounter attribute digits "%s" is not positive' % (attrs['digits'], )) + align = self.check_int_attribute(name, attrs, 'align', None) if (align is not None) and ((0 > align) or (2 < align)): - self.handleError('Element simplecounter attribute align "%s" not in valid range 0-2' % (attrs['align'], )) - self.checkComponent(name, attrs) + self.handle_error('Element simplecounter attribute align "%s" not in valid range 0-2' % (attrs['align'], )) + self.check_component(name, attrs) elif 'image' == name: self.have_file = 'file' in attrs self.have_data = None - self.checkComponent(name, attrs) + self.check_component(name, attrs) elif 'reel' == name: # TODO: validate symbollist and improve validation of other attributes - self.checkIntAttribute(name, attrs, 'stateoffset', None) - numsymbolsvisible = self.checkIntAttribute(name, attrs, 'numsymbolsvisible', None) + self.check_int_attribute(name, attrs, 'stateoffset', None) + numsymbolsvisible = self.check_int_attribute(name, attrs, 'numsymbolsvisible', None) if (numsymbolsvisible is not None) and (0 >= numsymbolsvisible): - self.handleError('Element reel attribute numsymbolsvisible "%s" not positive' % (attrs['numsymbolsvisible'], )) - reelreversed = self.checkIntAttribute(name, attrs, 'reelreversed', None) + self.handle_error('Element reel attribute numsymbolsvisible "%s" not positive' % (attrs['numsymbolsvisible'], )) + reelreversed = self.check_int_attribute(name, attrs, 'reelreversed', None) if (reelreversed is not None) and ((0 > reelreversed) or (1 < reelreversed)): - self.handleError('Element reel attribute reelreversed "%s" not in valid range 0-1' % (attrs['reelreversed'], )) - beltreel = self.checkIntAttribute(name, attrs, 'beltreel', None) + self.handle_error('Element reel attribute reelreversed "%s" not in valid range 0-1' % (attrs['reelreversed'], )) + beltreel = self.check_int_attribute(name, attrs, 'beltreel', None) if (beltreel is not None) and ((0 > beltreel) or (1 < beltreel)): - self.handleError('Element reel attribute beltreel "%s" not in valid range 0-1' % (attrs['beltreel'], )) - self.checkComponent(name, attrs) + self.handle_error('Element reel attribute beltreel "%s" not in valid range 0-1' % (attrs['beltreel'], )) + self.check_component(name, attrs) else: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) self.ignored_depth = 1 def elementEndHandler(self, name): @@ -491,25 +491,25 @@ class LayoutChecker(Minifyer): def componentStartHandler(self, name, attrs): if 'bounds' == name: - state = self.checkIntAttribute(name, attrs, 'state', 0) + state = self.check_int_attribute(name, attrs, 'state', 0) if state is not None: if 0 > state: - self.handleError('Element bounds attribute state "%s" is negative' % (attrs['state'], )) + self.handle_error('Element bounds attribute state "%s" is negative' % (attrs['state'], )) if state in self.have_bounds[-1]: - self.handleError('Duplicate bounds for state %d (previous %s)' % (state, self.have_bounds[-1][state])) + self.handle_error('Duplicate bounds for state %d (previous %s)' % (state, self.have_bounds[-1][state])) else: - self.have_bounds[-1][state] = self.formatLocation() - self.checkBounds(attrs) + self.have_bounds[-1][state] = self.format_location() + self.check_bounds(attrs) elif 'color' == name: - state = self.checkIntAttribute(name, attrs, 'state', 0) + state = self.check_int_attribute(name, attrs, 'state', 0) if state is not None: if 0 > state: - self.handleError('Element color attribute state "%s" is negative' % (attrs['state'], )) + self.handle_error('Element color attribute state "%s" is negative' % (attrs['state'], )) if state in self.have_color[-1]: - self.handleError('Duplicate color for state %d (previous %s)' % (state, self.have_color[-1][state])) + self.handle_error('Duplicate color for state %d (previous %s)' % (state, self.have_color[-1][state])) else: - self.have_color[-1][state] = self.formatLocation() - self.checkColor(attrs) + self.have_color[-1][state] = self.format_location() + self.check_color(attrs) self.ignored_depth = 1 def componentEndHandler(self, name): @@ -520,18 +520,18 @@ class LayoutChecker(Minifyer): def imageComponentStartHandler(self, name, attrs): if 'data' == name: if self.have_data is not None: - self.handleError('Element image has multiple data child elements (previous %s)' % (self.have_data)) + self.handle_error('Element image has multiple data child elements (previous %s)' % (self.have_data)) else: - self.have_data = self.formatLocation() + self.have_data = self.format_location() if self.have_file: - self.handleError('Element image has attribute file and child element data') + self.handle_error('Element image has attribute file and child element data') self.ignored_depth = 1 else: self.componentStartHandler(name, attrs) def imageComponentEndHandler(self, name): if (not self.have_file) and (self.have_data is None): - self.handleError('Element image missing attribute file or child element data') + self.handle_error('Element image missing attribute file or child element data') del self.have_file del self.have_data self.componentEndHandler(name) @@ -539,75 +539,75 @@ class LayoutChecker(Minifyer): def groupViewStartHandler(self, name, attrs): if 'element' == name: if 'ref' not in attrs: - self.handleError('Element %s missing attribute ref' % (name, )) + self.handle_error('Element %s missing attribute ref' % (name, )) elif attrs['ref'] not in self.referenced_elements: - self.referenced_elements[attrs['ref']] = self.formatLocation() - self.checkViewItem(name, attrs) + self.referenced_elements[attrs['ref']] = self.format_location() + self.check_view_item(name, attrs) self.startViewItem(name) elif 'screen' == name: if 'index' in attrs: - index = self.checkIntAttribute(name, attrs, 'index', None) + index = self.check_int_attribute(name, attrs, 'index', None) if (index is not None) and (0 > index): - self.handleError('Element screen attribute index "%s" is negative' % (attrs['index'], )) + self.handle_error('Element screen attribute index "%s" is negative' % (attrs['index'], )) if 'tag' in attrs: - self.handleError('Element screen has both index and tag attributes') + self.handle_error('Element screen has both index and tag attributes') if 'tag' in attrs: tag = attrs['tag'] - self.checkTag(tag, name, 'tag') + self.check_tag(tag, name, 'tag') if self.BADTAGPATTERN.search(tag): - self.handleError('Element screen attribute tag "%s" contains invalid characters' % (tag, )) - self.checkViewItem(name, attrs) + self.handle_error('Element screen attribute tag "%s" contains invalid characters' % (tag, )) + self.check_view_item(name, attrs) self.startViewItem(name) elif 'group' == name: if 'ref' not in attrs: - self.handleError('Element group missing attribute ref') + self.handle_error('Element group missing attribute ref') else: if attrs['ref'] not in self.referenced_groups: - self.referenced_groups[attrs['ref']] = self.formatLocation() + self.referenced_groups[attrs['ref']] = self.format_location() if (not self.VARPATTERN.match(attrs['ref'])) and (attrs['ref'] in self.group_collections): for n, l in self.group_collections[attrs['ref']].items(): if n not in self.current_collections: self.current_collections[n] = l else: - self.handleError('Element group instantiates collection with duplicate name "%s" from %s (previous %s)' % (n, l, self.current_collections[n])) + self.handle_error('Element group instantiates collection with duplicate name "%s" from %s (previous %s)' % (n, l, self.current_collections[n])) self.startViewItem(name) elif 'repeat' == name: if 'count' not in attrs: - self.handleError('Element repeat missing attribute count') + self.handle_error('Element repeat missing attribute count') else: - count = self.checkIntAttribute(name, attrs, 'count', None) + count = self.check_int_attribute(name, attrs, 'count', None) if (count is not None) and (0 >= count): - self.handleError('Element repeat attribute count "%s" is negative' % (attrs['count'], )) + self.handle_error('Element repeat attribute count "%s" is negative' % (attrs['count'], )) self.variable_scopes.append({ }) self.repeat_depth[-1] += 1 elif 'collection' == name: if 'name' not in attrs: - self.handleError('Element collection missing attribute name') + self.handle_error('Element collection missing attribute name') elif not self.VARPATTERN.match(attrs['name']): if attrs['name'] not in self.current_collections: - self.current_collections[attrs['name']] = self.formatLocation() + self.current_collections[attrs['name']] = self.format_location() else: - self.handleError('Element collection has duplicate name (previous %s)' % (self.current_collections[attrs['name']], )) + self.handle_error('Element collection has duplicate name (previous %s)' % (self.current_collections[attrs['name']], )) if attrs.get('visible', 'yes') not in self.YESNO: - self.handleError('Element collection attribute visible "%s" is not "yes" or "no"' % (attrs['visible'], )) + self.handle_error('Element collection attribute visible "%s" is not "yes" or "no"' % (attrs['visible'], )) self.variable_scopes.append({ }) self.collection_depth += 1 elif 'param' == name: - self.checkParameter(attrs) + self.check_parameter(attrs) self.ignored_depth = 1 elif 'bounds' == name: if self.have_bounds[-1] is not None: - self.handleError('Duplicate element bounds (previous %s)' % (self.have_bounds[-1], )) + self.handle_error('Duplicate element bounds (previous %s)' % (self.have_bounds[-1], )) else: - self.have_bounds[-1] = self.formatLocation() - self.checkBounds(attrs) + self.have_bounds[-1] = self.format_location() + self.check_bounds(attrs) if self.repeat_depth[-1]: - self.handleError('Element bounds inside repeat') + self.handle_error('Element bounds inside repeat') elif self.collection_depth: - self.handleError('Element bounds inside collection') + self.handle_error('Element bounds inside collection') self.ignored_depth = 1 else: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) self.ignored_depth = 1 def groupViewEndHandler(self, name): @@ -628,65 +628,65 @@ class LayoutChecker(Minifyer): if isinstance(self.have_bounds[-1], dict): if 'inputtag' in attrs: if 'name' in attrs: - self.handleError('Element animate has both attribute inputtag and attribute name') - self.checkTag(attrs['inputtag'], name, 'inputtag') + self.handle_error('Element animate has both attribute inputtag and attribute name') + self.check_tag(attrs['inputtag'], name, 'inputtag') elif 'name' not in attrs: - self.handleError('Element animate has neither attribute inputtag nor attribute name') - self.checkIntAttribute(name, attrs, 'mask', None) + self.handle_error('Element animate has neither attribute inputtag nor attribute name') + self.check_int_attribute(name, attrs, 'mask', None) else: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) elif 'bounds' == name: if self.have_bounds[-1] is None: - self.have_bounds[-1] = self.formatLocation() + self.have_bounds[-1] = self.format_location() elif isinstance(self.have_bounds[-1], dict): - state = self.checkIntAttribute(name, attrs, 'state', 0) + state = self.check_int_attribute(name, attrs, 'state', 0) if state is not None: if 0 > state: - self.handleError('Element bounds attribute state "%s" is negative' % (attrs['state'], )) + self.handle_error('Element bounds attribute state "%s" is negative' % (attrs['state'], )) if state in self.have_bounds[-1]: - self.handleError('Duplicate bounds for state %d (previous %s)' % (state, self.have_bounds[-1][state])) + self.handle_error('Duplicate bounds for state %d (previous %s)' % (state, self.have_bounds[-1][state])) else: - self.have_bounds[-1][state] = self.formatLocation() + self.have_bounds[-1][state] = self.format_location() else: - self.handleError('Duplicate element bounds (previous %s)' % (self.have_bounds[-1], )) - self.checkBounds(attrs) + self.handle_error('Duplicate element bounds (previous %s)' % (self.have_bounds[-1], )) + self.check_bounds(attrs) elif 'orientation' == name: - self.checkOrientation(attrs) + self.check_orientation(attrs) elif 'color' == name: if self.have_color[-1] is None: - self.have_color[-1] = self.formatLocation() + self.have_color[-1] = self.format_location() elif isinstance(self.have_color[-1], dict): - state = self.checkIntAttribute(name, attrs, 'state', 0) + state = self.check_int_attribute(name, attrs, 'state', 0) if state is not None: if 0 > state: - self.handleError('Element color attribute state "%s" is negative' % (attrs['state'], )) + self.handle_error('Element color attribute state "%s" is negative' % (attrs['state'], )) if state in self.have_color[-1]: - self.handleError('Duplicate color for state %d (previous %s)' % (state, self.have_color[-1][state])) + self.handle_error('Duplicate color for state %d (previous %s)' % (state, self.have_color[-1][state])) else: - self.have_color[-1][state] = self.formatLocation() + self.have_color[-1][state] = self.format_location() else: - self.handleError('Duplicate element color (previous %s)' % (self.have_color[-1], )) - self.checkColor(attrs) + self.handle_error('Duplicate element color (previous %s)' % (self.have_color[-1], )) + self.check_color(attrs) elif ('xscroll' == name) or ('yscroll' == name): have_scroll = self.have_xscroll if 'xscroll' == name else self.have_yscroll if have_scroll[-1] is None: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) elif have_scroll[-1]: - self.handleError('Duplicate element %s' % (name, )) + self.handle_error('Duplicate element %s' % (name, )) else: - have_scroll[-1] = self.formatLocation() - self.checkFloatAttribute(name, attrs, 'size', 1.0) + have_scroll[-1] = self.format_location() + self.check_float_attribute(name, attrs, 'size', 1.0) if (attrs.get('wrap', 'no') not in self.YESNO) and (not self.VARPATTERN.match(attrs['wrap'])): - self.handleError('Element %s attribute wrap "%s" is not "yes" or "no"' % (name, attrs['wrap'])) + self.handle_error('Element %s attribute wrap "%s" is not "yes" or "no"' % (name, attrs['wrap'])) if 'inputtag' in attrs: if 'name' in attrs: - self.handleError('Element %s has both attribute inputtag and attribute name' % (name, )) - self.checkTag(attrs['inputtag'], name, 'inputtag') - self.checkIntAttribute(name, attrs, 'mask', None) - self.checkIntAttribute(name, attrs, 'min', None) - self.checkIntAttribute(name, attrs, 'max', None) + self.handle_error('Element %s has both attribute inputtag and attribute name' % (name, )) + self.check_tag(attrs['inputtag'], name, 'inputtag') + self.check_int_attribute(name, attrs, 'mask', None) + self.check_int_attribute(name, attrs, 'min', None) + self.check_int_attribute(name, attrs, 'max', None) else: - self.handleError('Encountered unexpected element %s' % (name, )) + self.handle_error('Encountered unexpected element %s' % (name, )) self.ignored_depth = 1 def viewItemEndHandler(self, name): @@ -699,7 +699,7 @@ class LayoutChecker(Minifyer): def setDocumentLocator(self, locator): self.locator = locator - super(LayoutChecker, self).setDocumentLocator(locator) + super().setDocumentLocator(locator) def startDocument(self): self.handlers = [(self.rootStartHandler, self.rootEndHandler)] @@ -714,7 +714,7 @@ class LayoutChecker(Minifyer): self.have_yscroll = [ ] self.generated_element_names = False self.generated_group_names = False - super(LayoutChecker, self).startDocument() + super().startDocument() def endDocument(self): self.locator = None @@ -737,27 +737,27 @@ class LayoutChecker(Minifyer): del self.have_yscroll del self.generated_element_names del self.generated_group_names - super(LayoutChecker, self).endDocument() + super().endDocument() def startElement(self, name, attrs): if 0 < self.ignored_depth: self.ignored_depth += 1 else: self.handlers[-1][0](name, attrs) - super(LayoutChecker, self).startElement(name, attrs) + super().startElement(name, attrs) def endElement(self, name): if 0 < self.ignored_depth: self.ignored_depth -= 1 else: self.handlers[-1][1](name) - super(LayoutChecker, self).endElement(name) + super().endElement(name) -def compressLayout(src, dst, comp): +def compress_layout(src, dst, comp): state = [0, 0] def write(block): - for ch in bytearray(block): + for octet in bytearray(block): if 0 == state[0]: dst('\t') elif 0 == (state[0] % 32): @@ -765,7 +765,7 @@ def compressLayout(src, dst, comp): else: dst(', ') state[0] += 1 - dst('%3u' % (ch)) + dst('%3u' % (octet, )) def output(text): block = text.encode('UTF-8') @@ -782,7 +782,7 @@ def compressLayout(src, dst, comp): write(comp.flush()) dst('\n') except xml.sax.SAXException as exception: - print('fatal error: %s' % (exception)) + print('fatal error: %s' % (exception, )) raise XmlError('Fatal error parsing XML') if (content_handler.errors > 0) or (error_handler.errors > 0) or (error_handler.warnings > 0): raise XmlError('Error(s) and/or warning(s) parsing XML') @@ -790,7 +790,7 @@ def compressLayout(src, dst, comp): return state[1], state[0] -class BlackHole(object): +class BlackHole: def write(self, *args): pass def close(self): @@ -818,7 +818,7 @@ if __name__ == '__main__': try: dst = open(dstfile,'w') if dstfile is not None else BlackHole() dst.write('static const unsigned char %s_data[] = {\n' % (varname)) - byte_count, comp_size = compressLayout(srcfile, lambda x: dst.write(x), zlib.compressobj()) + byte_count, comp_size = compress_layout(srcfile, dst.write, zlib.compressobj()) dst.write('};\n\n') dst.write('const internal_layout %s = {\n' % (varname)) dst.write('\t%d, sizeof(%s_data), %s, %s_data\n' % (byte_count, varname, comp_type, varname)) diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py index 6867a6cb34a..f957e1d2e79 100755 --- a/scripts/build/makedep.py +++ b/scripts/build/makedep.py @@ -9,11 +9,10 @@ import os.path import sys -class ParserBase(object): - def process_lines(self, f): +class ParserBase: + def process_lines(self, inputfile): self.input_line = 1 - for line in f: - pos = 0 + for line in inputfile: start = 0 if line.endswith('\n'): line = line[:-1] @@ -39,7 +38,7 @@ class CppParser(ParserBase): [chr(x) for x in range(ord('A'), ord('F') + 1)] + [chr(x) for x in range(ord('a'), ord('f') + 1)]) - class Handler(object): + class Handler: def line(self, text): pass @@ -49,7 +48,7 @@ class CppParser(ParserBase): def line_comment(self, text): pass - class ParseState(object): + class ParseState: DEFAULT = 0 COMMENT = 1 LINE_COMMENT = 2 @@ -59,7 +58,7 @@ class CppParser(ParserBase): NUMERIC_CONSTANT = 6 def __init__(self, handler, **kwargs): - super(CppParser, self).__init__(**kwargs) + super().__init__(**kwargs) self.handler = handler self.processors = { self.ParseState.DEFAULT: self.process_default, @@ -70,14 +69,14 @@ class CppParser(ParserBase): self.ParseState.CHARACTER_CONSTANT: self.process_text, self.ParseState.NUMERIC_CONSTANT: self.process_numeric } - def parse(self, f): + def parse(self, inputfile): self.parse_state = self.ParseState.DEFAULT self.comment_line = None self.lead_digit = None self.radix = None self.line_buffer = '' self.comment_buffer = '' - self.process_lines(f) + self.process_lines(inputfile) if self.parse_state == self.ParseState.COMMENT: raise Exception('unterminated multi-line comment beginning on line %d' % (self.comment_line, )) elif self.parse_state == self.ParseState.CHARACTER_CONSTANT: @@ -238,7 +237,7 @@ class CppParser(ParserBase): class LuaParser(ParserBase): - class Handler(object): + class Handler: def short_comment(self, text): pass @@ -251,7 +250,7 @@ class LuaParser(ParserBase): def long_comment_end(self): pass - class ParseState(object): + class ParseState: DEFAULT = 0 SHORT_COMMENT = 1 LONG_COMMENT = 2 @@ -259,7 +258,7 @@ class LuaParser(ParserBase): LONG_STRING_CONSTANT = 4 def __init__(self, handler, **kwargs): - super(LuaParser, self).__init__(**kwargs) + super().__init__(**kwargs) self.handler = handler self.processors = { self.ParseState.DEFAULT: self.process_default, @@ -268,20 +267,20 @@ class LuaParser(ParserBase): self.ParseState.STRING_CONSTANT: self.process_string_constant, self.ParseState.LONG_STRING_CONSTANT: self.process_long_string_constant } - def parse(self, f): + def parse(self, inputfile): self.parse_state = self.ParseState.DEFAULT self.long_bracket_level = None self.escape = False self.block_line = None self.block_level = None self.string_quote = None - self.process_lines(f) + self.process_lines(inputfile) if self.parse_state == self.ParseState.LONG_COMMENT: - raise Exception('unterminated long comment beginning on line %d' % (self.block_line, )); - elif self.parse_state == self.ParseState.STRING_CONSTANT: - raise Exception('unterminated string literal on line %d' % (self.input_line, )); - elif self.parse_state == self.ParseState.LONG_STRING_CONSTANT: - raise Exception('unterminated long string literal beginning on line %d' % (self.block_line, )); + raise Exception('unterminated long comment beginning on line %d' % (self.block_line, )) + if self.parse_state == self.ParseState.STRING_CONSTANT: + raise Exception('unterminated string literal on line %d' % (self.input_line, )) + if self.parse_state == self.ParseState.LONG_STRING_CONSTANT: + raise Exception('unterminated long string literal beginning on line %d' % (self.block_line, )) def process_default(self, line): pos = 0 @@ -293,7 +292,7 @@ class LuaParser(ParserBase): self.parse_state = self.ParseState.STRING_CONSTANT self.long_bracket_level = None self.escape = False - return pos + 1; + return pos + 1 elif (ch == '-') and self.escape: self.parse_state = self.ParseState.SHORT_COMMENT self.long_bracket_level = None @@ -381,20 +380,20 @@ class LuaParser(ParserBase): self.escape = (ch == '\\') and not self.escape pos += 1 if not self.escape: - raise Exception('unterminated string literal on line %d' % (self.input_line, )); + raise Exception('unterminated string literal on line %d' % (self.input_line, )) def process_long_string_constant(self, line): self.process_long_comment(line) # this works because they're both closed by a matching long bracket -class DriverFilter(object): +class DriverFilter: DRIVER_CHARS = frozenset( [chr(x) for x in range(ord('0'), ord('9') + 1)] + [chr(x) for x in range(ord('a'), ord('z') + 1)] + ['_']) def __init__(self, options, **kwargs): - super(DriverFilter, self).__init__(**kwargs) + super().__init__(**kwargs) self.parse_filter(options.filter) self.parse_list(options.list) @@ -426,7 +425,7 @@ class DriverFilter(object): elif text.startswith('+'): text = text[1:].lstrip() if not text: - sys.stderr.write('%s:%s: Empty driver name\n' % (p, parser.input_line, text)) + sys.stderr.write('%s:%s: Empty driver name\n' % (p, parser.input_line)) sys.exit(1) elif not all(x in self.DRIVER_CHARS for x in text): sys.stderr.write('%s:%s: Invalid character in driver name "%s"\n' % (p, parser.input_line, text)) @@ -436,7 +435,7 @@ class DriverFilter(object): elif text.startswith('-'): text = text[1:].lstrip() if not text: - sys.stderr.write('%s:%s: Empty driver name\n' % (p, parser.input_line, text)) + sys.stderr.write('%s:%s: Empty driver name\n' % (p, parser.input_line)) sys.exit(1) elif not all(x in self.DRIVER_CHARS for x in text): sys.stderr.write('%s:%s: Invalid character in driver name "%s"\n' % (p, parser.input_line, text)) @@ -450,16 +449,16 @@ class DriverFilter(object): if n not in filters: filters.add(n) try: - f = io.open(n, 'r', encoding='utf-8') + filterfile = io.open(n, 'r', encoding='utf-8') except IOError: sys.stderr.write('Unable to open filter file "%s"\n' % (p, )) sys.exit(1) - with f: + with filterfile: handler = CppParser.Handler() handler.line = line_hook parser = CppParser(handler) try: - parser.parse(f) + parser.parse(filterfile) except IOError: sys.stderr.write('Error reading filter file "%s"\n' % (p, )) sys.exit(1) @@ -508,16 +507,16 @@ class DriverFilter(object): if n not in lists: lists.add(n) try: - f = io.open(n, 'r', encoding='utf-8') + listfile = io.open(n, 'r', encoding='utf-8') except IOError: sys.stderr.write('Unable to open list file "%s"\n' % (p, )) sys.exit(1) - with f: + with listfile: handler = CppParser.Handler() handler.line = line_hook parser = CppParser(handler) try: - parser.parse(f) + parser.parse(listfile) except IOError: sys.stderr.write('Error reading list file "%s"\n' % (p, )) sys.exit(1) @@ -694,16 +693,16 @@ def scan_source_dependencies(options): return seen -def write_project(options, f, mappings, sources): +def write_project(options, projectfile, mappings, sources): targetsrc = '' for source in sorted(sources): action = mappings.get(source) if action: for line in action: - f.write(line + '\n') + projectfile.write(line + '\n') if source.startswith('src/mame/'): targetsrc += ' MAME_DIR .. "%s",\n' % (source, ) - f.write( + projectfile.write( '\n' \ 'function createProjects_mame_%s(_target, _subtarget)\n' \ ' project ("mame_%s")\n' \ @@ -740,7 +739,7 @@ def write_project(options, f, mappings, sources): 'end\n' % (options.target, options.target, options.target, targetsrc, options.target, options.target)) -def write_filter(options, f): +def write_filter(options, filterfile): drivers = set() for source in options.sources: components = tuple(x for x in split_path(source) if x) @@ -749,7 +748,7 @@ def write_filter(options, f): if ext.startswith('.c'): drivers.add('/'.join(components[3:])) for driver in sorted(drivers): - f.write(driver + '\n') + filterfile.write(driver + '\n') if __name__ == '__main__': diff --git a/scripts/build/verinfo.py b/scripts/build/verinfo.py index 719b4ae3493..55377c524ab 100644 --- a/scripts/build/verinfo.py +++ b/scripts/build/verinfo.py @@ -1,10 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/python3 ## ## license:BSD-3-Clause ## copyright-holders:Aaron Giles, Andrew Gardner -from __future__ import with_statement - import io import re import sys @@ -28,7 +26,7 @@ def parse_args(): format = 'plist' elif flags and (sys.argv[i] == '-b'): i += 1 - if (i >= len(sys.argv)): + if i >= len(sys.argv): usage() else: target = sys.argv[i] diff --git a/scripts/genie.lua b/scripts/genie.lua index d95877305fc..935738bfd9e 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1079,7 +1079,6 @@ end } if (version >= 80000) then buildoptions { - "-Wno-format-overflow", -- try machine/bfm_sc45_helper.cpp in GCC 8.0.1, among others "-Wno-stringop-truncation", -- ImGui again "-Wno-stringop-overflow", -- formats/victor9k_dsk.cpp bugs the compiler } @@ -1087,17 +1086,10 @@ end "-Wno-class-memaccess", -- many instances in ImGui and BGFX } end - if (version >= 100000) then - buildoptions { - "-Wno-return-local-addr", -- sqlite3.c in GCC 10 - } - end if (version >= 110000) then buildoptions { "-Wno-nonnull", -- luaengine.cpp lambdas do not need "this" captured but GCC 11.1 erroneously insists "-Wno-stringop-overread", -- machine/bbc.cpp in GCC 11.1 - "-Wno-misleading-indentation", -- sqlite3.c in GCC 11.1 - "-Wno-maybe-uninitialized" -- expat in GCC 11.1 } end end diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 6060edb068a..0c6c03663f6 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -80,6 +80,18 @@ if _OPTIONS["vs"]=="intel-15" then "/Qwd869", -- remark #869: parameter "xxx" was never referenced } end + + configuration { "gmake or ninja" } +if _OPTIONS["gcc"]~=nil then + if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then + + else + buildoptions_c { + "-Wno-maybe-uninitialized", -- expat in GCC 11.1 + } + end +end + configuration { } files { @@ -104,7 +116,7 @@ project "zlib" kind "StaticLib" local version = str_to_version(_OPTIONS["gcc_version"]) - if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android"))) then + if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android")) then configuration { "gmake or ninja" } if (version >= 30700) then buildoptions { @@ -961,17 +973,24 @@ project "sqlite3" uuid "5cb3d495-57ed-461c-81e5-80dc0857517d" kind "StaticLib" - configuration { "gmake" } + configuration { "gmake or ninja" } buildoptions_c { "-Wno-bad-function-cast", "-Wno-discarded-qualifiers", "-Wno-undef", "-Wno-unused-but-set-variable", } -if _OPTIONS["gcc"]~=nil and ((string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android"))) then +if _OPTIONS["gcc"]~=nil then + if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then buildoptions_c { "-Wno-incompatible-pointer-types-discards-qualifiers", } + else + buildoptions_c { + "-Wno-return-local-addr", -- sqlite3.c in GCC 10 + "-Wno-misleading-indentation", -- sqlite3.c in GCC 11.1 + } + end end configuration { "vs*" } if _OPTIONS["vs"]=="clangcl" then @@ -1186,7 +1205,7 @@ project "bimg" MAME_DIR .. "3rdparty/bx/include/compat/freebsd", } - configuration { "gmake" } + configuration { "gmake or ninja" } buildoptions { "-Wno-unused-but-set-variable", } diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp index 4323bbe1aba..0968d55c9a0 100644 --- a/src/devices/bus/a2bus/a2mockingboard.cpp +++ b/src/devices/bus/a2bus/a2mockingboard.cpp @@ -137,9 +137,6 @@ protected: virtual void write_cnxx(u8 offset, u8 data) override; required_device<tms5220_device> m_tms; - -private: - u8 m_last_cnxx_addr; }; //------------------------------------------------- @@ -294,7 +291,6 @@ u8 a2bus_ayboard_device::read_cnxx(u8 offset) u8 a2bus_echoplus_device::read_cnxx(u8 offset) { - m_last_cnxx_addr = offset; return m_via1->read(offset & 0xf); } @@ -348,7 +344,6 @@ void a2bus_ayboard_device::write_cnxx(u8 offset, u8 data) void a2bus_echoplus_device::write_cnxx(u8 offset, u8 data) { - m_last_cnxx_addr = offset; m_via1->write(offset & 0xf, data); } @@ -437,13 +432,14 @@ void a2bus_ayboard_device::via1_out_b(u8 data) void a2bus_echoplus_device::via1_out_b(u8 data) { - if (!(m_last_cnxx_addr & 0x80)) + if (!BIT(data, 2)) { - if (!BIT(data, 2)) - { - m_ay1->reset_w(); - } - else + m_ay1->reset_w(); + m_ay2->reset_w(); + } + else + { + if (BIT(data, 3)) // BC2_1=1 (PSG1 active) { switch (data & 3) { @@ -463,14 +459,7 @@ void a2bus_echoplus_device::via1_out_b(u8 data) break; } } - } - else - { - if (!BIT(data, 2)) - { - m_ay2->reset_w(); - } - else + if (BIT(data, 4)) // BC2_2_=1 (PSG2 active) { switch (data & 3) { diff --git a/src/devices/bus/ti99/internal/genboard.cpp b/src/devices/bus/ti99/internal/genboard.cpp index 10813d9d32e..e22bb72caa8 100644 --- a/src/devices/bus/ti99/internal/genboard.cpp +++ b/src/devices/bus/ti99/internal/genboard.cpp @@ -1372,7 +1372,11 @@ void geneve_pal_device::set_ready() (pin4_9 && m_pin17q && m_pin16q && m_pin15q) || !m_pin19; - if (m_prev_ready != ready_line) LOGMASKED(LOG_WAIT, "READY = %d (%d %d %d %d, %d %d %d, %d %d)\n", ready_line, m_pin14d, m_pin15d, m_pin16d, m_pin17d, m_pin3, m_pin4, m_pin9, m_pin5, m_pin19 ); m_prev_ready = ready_line; + if (m_prev_ready != ready_line) + { + LOGMASKED(LOG_WAIT, "READY = %d (%d %d %d %d, %d %d %d, %d %d)\n", ready_line, m_pin14d, m_pin15d, m_pin16d, m_pin17d, m_pin3, m_pin4, m_pin9, m_pin5, m_pin19); + m_prev_ready = ready_line; + } m_ready(ready_line); } diff --git a/src/devices/cpu/dsp56156/tables.cpp b/src/devices/cpu/dsp56156/tables.cpp index cccc22c8842..e4341511aa3 100644 --- a/src/devices/cpu/dsp56156/tables.cpp +++ b/src/devices/cpu/dsp56156/tables.cpp @@ -1,15 +1,16 @@ // license:BSD-3-Clause // copyright-holders:Andrew Gardner #include "emu.h" +#include "tables.h" + +#include "dsp56def.h" + #include <cstdio> -#include <cstring> #include <cstdlib> +#include <cstring> -#include "tables.h" -#include "dsp56def.h" +namespace DSP_56156 { -namespace DSP_56156 -{ /******************/ /* Table decoding */ /******************/ @@ -488,13 +489,11 @@ void decode_Z_table(const uint16_t Z, std::string& ea) void assemble_ea_from_m_table(const uint16_t m, const int n, std::string& ea) { - char temp[32]; switch(m) { - case 0x0: sprintf(temp, "(R%d)+",n) ; break; - case 0x1: sprintf(temp, "(R%d)+N%d", n, n); break; + case 0x0: ea = util::string_format("(R%d)+", n) ; break; + case 0x1: ea = util::string_format("(R%d)+N%d", n, n); break; } - ea = temp; } void assemble_eas_from_mm_table(uint16_t mm, int n1, int n2, std::string& ea1, std::string& ea2) @@ -518,26 +517,22 @@ void assemble_eas_from_mm_table(uint16_t mm, int n1, int n2, std::string& ea1, s void assemble_ea_from_MM_table(uint16_t MM, int n, std::string& ea) { - char temp[32]; switch(MM) { - case 0x0: sprintf(temp, "(R%d)", n) ; break; - case 0x1: sprintf(temp, "(R%d)+", n) ; break; - case 0x2: sprintf(temp, "(R%d)-", n) ; break; - case 0x3: sprintf(temp, "(R%d)+N%d", n, n); break; + case 0x0: ea = util::string_format("(R%d)", n) ; break; + case 0x1: ea = util::string_format("(R%d)+", n) ; break; + case 0x2: ea = util::string_format("(R%d)-", n) ; break; + case 0x3: ea = util::string_format("(R%d)+N%d", n, n); break; } - ea = temp; } void assemble_ea_from_q_table(uint16_t q, int n, std::string& ea) { - char temp[32]; switch(q) { - case 0x0: sprintf(temp, "(R%d+N%d)", n, n); break; - case 0x1: sprintf(temp, "-(R%d)", n) ; break; + case 0x0: ea = util::string_format("(R%d+N%d)", n, n); break; + case 0x1: ea = util::string_format("-(R%d)", n) ; break; } - ea = temp; } void assemble_ea_from_t_table(uint16_t t, uint16_t val, std::string& ea) @@ -555,13 +550,11 @@ void assemble_ea_from_t_table(uint16_t t, uint16_t val, std::string& ea) void assemble_ea_from_z_table(uint16_t z, int n, std::string& ea) { - char temp[32]; switch(z) { - case 0x0: sprintf(temp, "(R%d)-", n) ; break; - case 0x1: sprintf(temp, "(R%d)+N%d", n, n); break; + case 0x0: ea = util::string_format("(R%d)-", n) ; break; + case 0x1: ea = util::string_format("(R%d)+N%d", n, n); break; } - ea = temp; } void assemble_D_from_P_table(uint16_t P, uint16_t ppppp, std::string& D) @@ -587,58 +580,42 @@ void assemble_D_from_P_table(uint16_t P, uint16_t ppppp, std::string& D) void assemble_arguments_from_W_table(uint16_t W, char ma, const reg_id& SD, const std::string& ea, std::string& source, std::string& destination) { - char temp[32]; - sprintf(temp, "%c:%s", ma, ea.c_str()); + std::string temp = util::string_format("%c:%s", ma, ea); switch(W) { - case 0x0: source = regIdAsString(SD); destination = temp; break; - case 0x1: source = temp; destination = regIdAsString(SD); break; + case 0x0: source = regIdAsString(SD); destination = std::move(temp); break; + case 0x1: source = std::move(temp); destination = regIdAsString(SD); break; } } void assemble_arguments_from_W_table(uint16_t W, char ma, const std::string& SD, const std::string& ea, std::string& source, std::string& destination) { - char temp[32]; - sprintf(temp, "%c:%s", ma, ea.c_str()); + std::string temp = util::string_format("%c:%s", ma, ea); switch(W) { - case 0x0: source = SD; destination = temp; break; - case 0x1: source = temp; destination = SD; break; + case 0x0: source = SD; destination = std::move(temp); break; + case 0x1: source = std::move(temp); destination = SD; break; } } void assemble_reg_from_W_table(uint16_t W, char ma, const reg_id& SD, const int8_t xx, std::string& S, std::string& D) { - uint8_t abs_xx; - char temp[32]; - char operation[32]; - - if(xx < 0) - sprintf(operation,"-"); - else - sprintf(operation,"+"); - - abs_xx = abs(xx); - - sprintf(temp, "%c:(R2%s$%x)", ma, operation, abs_xx); - // NEW // sprintf(temp, "%c:(R2%s$%02x)", ma, operation, abs_xx); + std::string temp = util::string_format("%c:(R2%s$%x)", ma, (xx < 0) ? "-" : "+", std::abs(xx)); + // NEW // temp = util::string_format("%c:(R2%s$%02x)", ma, (xx < 0) ? "-" : "+", std::abs(xx)); switch(W) { - case 0x0: S = regIdAsString(SD); D = temp; break; - case 0x1: S = temp; D = regIdAsString(SD); break; + case 0x0: S = regIdAsString(SD); D = std::move(temp); break; + case 0x1: S = std::move(temp); D = regIdAsString(SD); break; } } void assemble_address_from_IO_short_address(uint16_t pp, std::string& ea) { - char temp[32]; - uint16_t fullAddy = 0xffe0; fullAddy |= pp; - sprintf(temp, "%.04x", fullAddy); - ea = temp; + ea = util::string_format("%.04x", fullAddy); } int8_t get_6_bit_signed_value(uint16_t bits) @@ -657,18 +634,15 @@ int8_t get_6_bit_signed_value(uint16_t bits) uint16_t dsp56156_op_maskn(uint16_t cur, uint16_t mask) { - int i; - - uint16_t retVal = (cur & mask); uint16_t temp = 0x0000; int offsetCount = 0; /* Shift everything right, eliminating 'whitespace'... */ - for (i = 0; i < 16; i++) + for (int i = 0; i < 16; i++) { - if (mask & (0x1<<i)) /* If mask bit is non-zero */ + if (BIT(mask, i)) /* If mask bit is non-zero */ { - temp |= (((retVal >> i) & 0x1) << offsetCount); + temp |= BIT(cur, i) << offsetCount; offsetCount++; } } @@ -897,4 +871,4 @@ uint8_t regIDAsNum(const reg_id& regId) return 255; } -} +} // namespace DSP_56156 diff --git a/src/devices/cpu/i386/i386dasm.cpp b/src/devices/cpu/i386/i386dasm.cpp index 42f17e65e63..d6df2dac321 100644 --- a/src/devices/cpu/i386/i386dasm.cpp +++ b/src/devices/cpu/i386/i386dasm.cpp @@ -1931,24 +1931,22 @@ char *i386_disassembler::hexstring64(uint32_t lo, uint32_t hi) return (buffer[1] >= '0' && buffer[1] <= '9') ? &buffer[1] : &buffer[0]; } -char *i386_disassembler::hexstringpc(uint64_t pc) +std::string i386_disassembler::hexstringpc(uint64_t pc) { if (m_config->get_mode() == 64) - return hexstring64((uint32_t)pc, (uint32_t)(pc >> 32)); + return hexstring64(uint32_t(pc), uint32_t(pc >> 32)); else - return hexstring((uint32_t)pc, 0); + return hexstring(uint32_t(pc), 0); } -char *i386_disassembler::shexstring(uint32_t value, int digits, bool always) +std::string i386_disassembler::shexstring(uint32_t value, int digits, bool always) { - static char buffer[20]; if (value >= 0x80000000) - sprintf(buffer, "-%s", hexstring(-value, digits)); + return util::string_format("-%s", hexstring(-value, digits)); else if (always) - sprintf(buffer, "+%s", hexstring(value, digits)); + return util::string_format("+%s", hexstring(value, digits)); else return hexstring(value, digits); - return buffer; } void i386_disassembler::handle_sib_byte(std::ostream &stream, uint8_t mod, offs_t base_pc, offs_t &pc, const data_buffer &opcodes) diff --git a/src/devices/cpu/i386/i386dasm.h b/src/devices/cpu/i386/i386dasm.h index 25f5ec0d4d6..551a077d9ca 100644 --- a/src/devices/cpu/i386/i386dasm.h +++ b/src/devices/cpu/i386/i386dasm.h @@ -201,10 +201,10 @@ private: inline uint16_t FETCHD16(offs_t base_pc, offs_t &pc, const data_buffer &opcodes); inline uint32_t FETCHD32(offs_t base_pc, offs_t &pc, const data_buffer &opcodes); - char *hexstring(uint32_t value, int digits); - char *hexstring64(uint32_t lo, uint32_t hi); - char *hexstringpc(uint64_t pc); - char *shexstring(uint32_t value, int digits, bool always); + static char *hexstring(uint32_t value, int digits); + static char *hexstring64(uint32_t lo, uint32_t hi); + std::string hexstringpc(uint64_t pc); + static std::string shexstring(uint32_t value, int digits, bool always); void handle_sib_byte(std::ostream &stream, uint8_t mod, offs_t base_pc, offs_t &pc, const data_buffer &opcodes); void handle_modrm(std::ostream &stream, offs_t base_pc, offs_t &pc, const data_buffer &opcodes); void handle_modrm(std::string &buffer, offs_t base_pc, offs_t &pc, const data_buffer &opcodes); diff --git a/src/devices/cpu/ns32000/ns32000.cpp b/src/devices/cpu/ns32000/ns32000.cpp index 891aa4642a1..9b42edf1756 100644 --- a/src/devices/cpu/ns32000/ns32000.cpp +++ b/src/devices/cpu/ns32000/ns32000.cpp @@ -10,6 +10,7 @@ DEFINE_DEVICE_TYPE(NS32008, ns32008_device, "ns32008", "National Semiconductor NS32008") DEFINE_DEVICE_TYPE(NS32016, ns32016_device, "ns32016", "National Semiconductor NS32016") DEFINE_DEVICE_TYPE(NS32032, ns32032_device, "ns32032", "National Semiconductor NS32032") +DEFINE_DEVICE_TYPE(NS32332, ns32332_device, "ns32332", "National Semiconductor NS32332") /* * TODO: @@ -45,13 +46,17 @@ enum psr_mask : u16 enum cfg_mask : u32 { - CFG_I = 0x01, // vectored interrupts - CFG_F = 0x02, // fpu present - CFG_M = 0x04, // mmu present - CFG_C = 0x08, // custom coprocessor present + CFG_I = 0x01, // vectored interrupts + CFG_F = 0x02, // fpu present + CFG_M = 0x04, // mmu present + CFG_C = 0x08, // custom coprocessor present + CFG_FF = 0x10, // (32332 only) fast fpu protocol + CFG_FM = 0x20, // (32332 only) fast mmu protocol + CFG_FC = 0x40, // (32332 only) fast custom coprocessor protocol + CFG_P = 0x80, // (32332 only) page size >= 4kb }; -enum trap_type : unsigned +enum exception_type : unsigned { NVI = 0, // non-vectored interrupt NMI = 1, // non-maskable interrupt @@ -93,6 +98,7 @@ static const u32 size_mask[] = { 0x000000ffU, 0x0000ffffU, 0x00000000U, 0xffffff template <int Width>ns32000_device<Width>::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int databits, int addrbits) : cpu_device(mconfig, type, tag, owner, clock) + , m_address_mask(0xffffffffU >> (32 - addrbits)) , m_program_config("program", ENDIANNESS_LITTLE, databits, addrbits, 0) , m_iam_config("iam", ENDIANNESS_LITTLE, databits, addrbits, 0) , m_iac_config("iac", ENDIANNESS_LITTLE, databits, addrbits, 0) @@ -139,6 +145,11 @@ ns32032_device::ns32032_device(const machine_config &mconfig, const char *tag, d { } +ns32332_device::ns32332_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : ns32000_device(mconfig, NS32332, tag, owner, clock, 32, 32) +{ +} + template <int Width> void ns32000_device<Width>::device_start() { set_icountptr(m_icount); @@ -177,7 +188,7 @@ template <int Width> void ns32000_device<Width>::device_start() state_add(index++, "INTBASE", m_intbase); state_add(index++, "PSR", m_psr); state_add(index++, "MOD", m_mod); - state_add(index++, "CFG", m_cfg).formatstr("%4s"); + state_add(index++, "CFG", m_cfg).formatstr("%5s"); // general registers for (unsigned i = 0; i < 8; i++) @@ -225,10 +236,11 @@ template <int Width> void ns32000_device<Width>::state_string_export(device_stat break; case 8: - str = string_format("%c%c%c%c", - (m_cfg & CFG_C) ? 'C' : '.', - (m_cfg & CFG_M) ? 'M' : '.', - (m_cfg & CFG_F) ? 'F' : '.', + str = string_format("%c%c%c%c%c", + (m_cfg & CFG_P) ? 'P' : '.', + (m_cfg & CFG_C) ? ((m_cfg & CFG_FC) ? 'C' : 'c') : '.', + (m_cfg & CFG_M) ? ((m_cfg & CFG_FM) ? 'M' : 'm') : '.', + (m_cfg & CFG_F) ? ((m_cfg & CFG_FF) ? 'F' : 'f') : '.', (m_cfg & CFG_I) ? 'I' : '.'); break; } @@ -742,31 +754,72 @@ template <int Width> void ns32000_device<Width>::flags(u32 const src1, u32 const m_psr |= PSR_F; } -template <int Width> void ns32000_device<Width>::interrupt(unsigned const vector, u32 const return_address, bool const trap) +template <int Width> void ns32000_device<Width>::interrupt(unsigned const type, u32 const return_address) { - // clear trace pending flag - if (vector == TRC) - m_psr &= ~PSR_P; - else if (trap) + unsigned offset = type * 4; + + switch (type) { - // restore state + case NVI: + // maskable interrupt + m_sps = m_psr; + m_psr &= ~(PSR_I | PSR_P | PSR_S | PSR_U | PSR_T); + + if (m_cfg & CFG_I) + { + // acknowledge interrupt and read vector + s8 vector = mem_read<u8>(ST_IAM, 0xfffffe00 & m_address_mask); + if (vector < 0 && vector >= -16) + { + // vectored mode, cascaded + u32 const cascade = mem_read<u32>(ST_ODT, m_intbase + vector * 4); + + vector = mem_read<u8>(ST_IAC, cascade); + } + + offset = vector * 4; + } + else + // acknowledge non-vectored interrupt + mem_read<u8>(ST_IAM, 0xfffffe00 & m_address_mask); + break; + + case NMI: + // non-maskable interrupt + m_sps = m_psr; + m_psr &= ~(PSR_I | PSR_P | PSR_S | PSR_U | PSR_T); + + // acknowledge interrupt and discard vector + mem_read<u8>(ST_IAM, 0xffffff00 & m_address_mask); + m_nmi_line = false; + break; + + case ABT: + // abort SP = m_ssp; - m_psr = m_sps; - } + m_psr &= ~PSR_P; + m_sps = m_psr; + m_psr &= ~(PSR_I | PSR_S | PSR_U | PSR_T); + break; - // push psr - m_sp0 -= 2; - mem_write<u16>(ST_ODT, m_sp0, m_psr); + case TRC: + // trace trap + m_psr &= ~PSR_P; + m_sps = m_psr; + m_psr &= ~(PSR_S | PSR_U | PSR_T); + break; - // update psr - if (trap && vector != ABT) + default: + // traps other than trace + SP = m_ssp; + m_psr = m_sps; m_psr &= ~(PSR_P | PSR_S | PSR_U | PSR_T); - else - m_psr &= ~(PSR_I | PSR_P | PSR_S | PSR_U | PSR_T); + break; + } - // fetch external procedure descriptor - u16 const dlo = mem_read<u16>(ST_ODT, m_intbase + vector * 4 + 0); - u16 const dhi = mem_read<u16>(ST_ODT, m_intbase + vector * 4 + 2); + // push saved program status + m_sp0 -= 2; + mem_write<u16>(ST_ODT, m_sp0, m_sps); // push mod m_sp0 -= 2; @@ -776,18 +829,21 @@ template <int Width> void ns32000_device<Width>::interrupt(unsigned const vector m_sp0 -= 4; mem_write<u32>(ST_ODT, m_sp0, return_address); + // fetch external procedure descriptor + u32 const desc = mem_read<u32>(ST_ODT, m_intbase + offset); + // update mod, sb, pc - m_mod = dlo; + m_mod = u16(desc); m_sb = mem_read<u32>(ST_ODT, m_mod + 0); - m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + dhi; + m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + (desc >> 16); // TODO: flush queue m_sequential = false; - m_icount -= top(SIZE_W, m_sp0) * 2 + top(SIZE_W, m_intbase + vector * 4) + top(SIZE_D, m_sp0) + top(SIZE_D, m_mod); + m_icount -= top(SIZE_W, m_sp0) * 2 + top(SIZE_W, m_intbase + offset) + top(SIZE_D, m_sp0) + top(SIZE_D, m_mod); - if (trap && machine().debug_enabled()) - debug()->exception_hook(vector); + if (machine().debug_enabled() && (type > ABT)) + debug()->exception_hook(type); } template <int Width> void ns32000_device<Width>::execute_run() @@ -804,12 +860,8 @@ template <int Width> void ns32000_device<Width>::execute_run() { if (m_nmi_line) { - // acknowledge interrupt and discard vector - mem_read<u8>(ST_IAM, 0xffff00); - m_nmi_line = false; - // service interrupt - interrupt(NMI, m_pc, false); + interrupt(NMI, m_pc); // notify the debugger if (machine().debug_enabled()) @@ -817,26 +869,8 @@ template <int Width> void ns32000_device<Width>::execute_run() } else if (m_int_line && (m_psr & PSR_I)) { - // acknowledge interrupt and read vector - s8 vector = mem_read<u8>(ST_IAM, 0xfffe00); - - // check for vectored mode - if (m_cfg & CFG_I) - { - if (vector < 0 && vector >= -16) - { - // vectored mode, cascaded - u32 const cascade = mem_read<u32>(ST_ODT, m_intbase + vector * 4); - - vector = mem_read<u8>(ST_IAC, cascade); - } - } - else - // non-vectored mode - vector = NVI; - // service interrupt - interrupt(vector, m_pc, false); + interrupt(NVI, m_pc); // notify the debugger if (machine().debug_enabled()) @@ -916,19 +950,18 @@ template <int Width> void ns32000_device<Width>::execute_run() s32 const index = displacement(bytes); u32 const link_base = mem_read<u32>(ST_ODT, m_mod + 4); - u16 const dlo = mem_read<u16>(ST_ODT, link_base + index * 4 + 0); - u16 const dhi = mem_read<u16>(ST_ODT, link_base + index * 4 + 2); + u32 const desc = mem_read<u32>(ST_ODT, link_base + index * 4); SP -= 4; mem_write<u16>(ST_ODT, SP, m_mod); SP -= 4; mem_write<u32>(ST_ODT, SP, m_pc + bytes); - tex = top(SIZE_D, m_mod + 4) + top(SIZE_W, link_base + index * 4) * 2 + top(SIZE_W, SP) + top(SIZE_D, SP) + top(SIZE_D, dlo) * 2 + 16; + tex = top(SIZE_D, m_mod + 4) + top(SIZE_W, link_base + index * 4) * 2 + top(SIZE_W, SP) + top(SIZE_D, SP) + top(SIZE_D, u16(desc)) * 2 + 16; - m_mod = dlo; + m_mod = u16(desc); m_sb = mem_read<u32>(ST_ODT, m_mod + 0); - m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + dhi; + m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + (desc >> 16); m_sequential = false; } break; @@ -978,7 +1011,7 @@ template <int Width> void ns32000_device<Width>::execute_run() if (!(m_psr & PSR_U)) { // end of interrupt, master - s8 vector = mem_read<u8>(ST_EIM, 0xfffe00); + s8 vector = mem_read<u8>(ST_EIM, 0xfffffe00 & m_address_mask); // check for vectored mode if (m_cfg & CFG_I) @@ -1352,9 +1385,11 @@ template <int Width> void ns32000_device<Width>::execute_run() SP -= 4; mem_write<u32>(ST_ODT, SP, m_pc + bytes); - m_mod = mem_read<u16>(ST_ODT, address + 0); + u32 const desc = mem_read<u32>(ST_ODT, address); + + m_mod = u16(desc); m_sb = mem_read<u32>(ST_ODT, m_mod + 0); - m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + mem_read<u16>(ST_ODT, address + 2); + m_pc = mem_read<u32>(ST_ODT, m_mod + 8) + (desc >> 16); tex = mode[0].tea + top(SIZE_W, address) * 3 + top(SIZE_D, m_mod) * 3 + 13; m_sequential = false; @@ -1918,7 +1953,7 @@ template <int Width> void ns32000_device<Width>::execute_run() // short if (!(m_psr & PSR_U)) { - m_cfg = BIT(opword, 7, 4); + m_cfg = BIT(opword, 7, (type() == NS32332) ? 8 : 4); tex = 15; } @@ -2918,18 +2953,12 @@ template <int Width> void ns32000_device<Width>::execute_run() // format 9: xxxx xyyy yyoo ofii 0011 1110 if (m_cfg & CFG_F) { - if (!m_fpu) - fatalerror("floating point unit not configured (%s)\n", machine().describe_context()); - u16 const opword = fetch<u16>(bytes); addr_mode mode[] = { addr_mode(BIT(opword, 11, 5)), addr_mode(BIT(opword, 6, 5)) }; size_code const size_f = BIT(opword, 0) ? SIZE_D : SIZE_Q; size_code const size = size_code(opword & 3); - m_fpu->write_id(opbyte); - m_fpu->write_op(swapendian_int16(opword)); - switch (BIT(opword, 3, 3)) { case 0: @@ -2940,7 +2969,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 1: @@ -2950,7 +2979,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[0].read_i(size); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 2: @@ -2961,7 +2990,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 3: @@ -2972,7 +3001,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 4: @@ -2983,7 +3012,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_i(size); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 5: @@ -2994,7 +3023,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_i(size); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 6: @@ -3004,7 +3033,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[0].write_i(size); decode(mode, bytes); - if (slave(m_fpu, mode[1], mode[0])) + if (slave(opbyte, opword, mode[1], mode[0])) interrupt(SLV, m_pc); break; case 7: @@ -3015,7 +3044,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_i(size); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; } @@ -3030,17 +3059,11 @@ template <int Width> void ns32000_device<Width>::execute_run() // format 11: xxxx xyyy yyoo oo0f 1011 1110 if (m_cfg & CFG_F) { - if (!m_fpu) - fatalerror("floating point unit not configured (%s)\n", machine().describe_context()); - u16 const opword = fetch<u16>(bytes); addr_mode mode[] = { addr_mode(BIT(opword, 11, 5)), addr_mode(BIT(opword, 6, 5)) }; size_code const size_f = BIT(opword, 0) ? SIZE_D : SIZE_Q; - m_fpu->write_id(opbyte); - m_fpu->write_op(swapendian_int16(opword)); - switch (BIT(opword, 2, 4)) { case 0x0: @@ -3051,7 +3074,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].rmw_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x1: @@ -3062,7 +3085,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x2: @@ -3074,7 +3097,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].read_f(size_f); decode(mode, bytes); - u16 const status = slave(m_fpu, mode[0], mode[1]); + u16 const status = slave(opbyte, opword, mode[0], mode[1]); if (!(status & ns32000_slave_interface::SLAVE_Q)) { m_psr &= ~(PSR_N | PSR_Z | PSR_L); @@ -3086,12 +3109,12 @@ template <int Width> void ns32000_device<Width>::execute_run() break; case 0x3: // Trap(SLAVE) - // operands from ns32532 datasheet + // not defined; treat like CMPf mode[0].read_f(size_f); mode[1].read_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x4: @@ -3102,7 +3125,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].rmw_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x5: @@ -3113,7 +3136,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x8: @@ -3124,17 +3147,17 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].rmw_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0x9: // Trap(SLAVE) - // operands from ns32532 datasheet + // not defined; treat like MOVf mode[0].read_f(size_f); mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0xc: @@ -3145,7 +3168,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].rmw_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; case 0xd: @@ -3156,7 +3179,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[1].write_f(size_f); decode(mode, bytes); - if (slave(m_fpu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); break; } @@ -3164,7 +3187,96 @@ template <int Width> void ns32000_device<Width>::execute_run() else interrupt(UND, m_pc); break; - case 0xfe: // format 12 + case 0xfe: + // format 12: xxxx xyyy yyoo oo0f 1111 1110 + if ((m_cfg & CFG_F) && type() == NS32332) + { + u16 const opword = fetch<u16>(bytes); + + addr_mode mode[] = { addr_mode(BIT(opword, 11, 5)), addr_mode(BIT(opword, 6, 5)) }; + size_code const size_f = BIT(opword, 0) ? SIZE_D : SIZE_Q; + + switch (BIT(opword, 2, 4)) + { + case 0x2: + // POLYf src,dst + // gen,gen + // read.f,read.f + mode[0].read_f(size_f); + mode[1].read_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x3: + // DOTf src,dst + // gen,gen + // read.f,read.f + mode[0].read_f(size_f); + mode[1].read_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x4: + // SCALBf src,dst + // gen,gen + // read.f,rmw.f + mode[0].read_f(size_f); + mode[1].rmw_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x5: + // LOGBf src,dst + // gen,gen + // read.f,write.f + mode[0].read_f(size_f); + mode[1].write_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x0: // REMf + case 0x8: // Trap(SLV) + case 0xc: // ATAN2f + // not defined; treat like ADDf + mode[0].read_f(size_f); + mode[1].rmw_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x1: // SQRTf + case 0x9: // Trap(SLV) + case 0xd: // SICOSf + // not defined; treat like MOVf + mode[0].read_f(size_f); + mode[1].write_f(size_f); + decode(mode, bytes); + + if (slave(opbyte, opword, mode[0], mode[1])) + interrupt(SLV, m_pc); + break; + case 0x6: // Trap(UND) + case 0x7: // Trap(UND) + case 0xa: // Trap(UND) + case 0xb: // Trap(UND) + case 0xe: // Trap(UND) + case 0xf: // Trap(UND) + interrupt(UND, m_pc); + break; + } + } + else + interrupt(UND, m_pc); + break; case 0x9e: // format 13 interrupt(UND, m_pc); break; @@ -3174,9 +3286,6 @@ template <int Width> void ns32000_device<Width>::execute_run() { if (m_cfg & CFG_M) { - if (!m_mmu) - fatalerror("memory management unit not configured (%s)\n", machine().describe_context()); - u16 const opword = fetch<u16>(bytes); addr_mode mode[] = { addr_mode(BIT(opword, 11, 5)), addr_mode(0x13) }; @@ -3184,9 +3293,6 @@ template <int Width> void ns32000_device<Width>::execute_run() //unsigned const quick = BIT(opword, 7, 4); size_code const size = size_code(opword & 3); - m_mmu->write_id(opbyte); - m_mmu->write_op(swapendian_int16(opword)); - switch (BIT(opword, 2, 4)) { case 0: @@ -3200,7 +3306,7 @@ template <int Width> void ns32000_device<Width>::execute_run() // dummy read mem_read<u8>(ST_ODT, ea(mode[0]), true); - u16 const status = slave(m_mmu, mode[0], mode[1]); + u16 const status = slave(opbyte, opword, mode[0], mode[1]); if (!(status & ns32000_slave_interface::SLAVE_Q)) { if (status & ns32000_slave_interface::SLAVE_F) @@ -3225,7 +3331,7 @@ template <int Width> void ns32000_device<Width>::execute_run() // dummy read mem_read<u8>(ST_ODT, ea(mode[0]), true); - u16 const status = slave(m_mmu, mode[0], mode[1]); + u16 const status = slave(opbyte, opword, mode[0], mode[1]); if (!(status & ns32000_slave_interface::SLAVE_Q)) { if (status & ns32000_slave_interface::SLAVE_F) @@ -3246,7 +3352,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[0].read_i(size); decode(mode, bytes); - if (slave(m_mmu, mode[0], mode[1])) + if (slave(opbyte, opword, mode[0], mode[1])) interrupt(SLV, m_pc); tex = mode[0].tea + top(size); @@ -3258,7 +3364,7 @@ template <int Width> void ns32000_device<Width>::execute_run() mode[0].write_i(size); decode(mode, bytes); - if (slave(m_mmu, mode[1], mode[0])) + if (slave(opbyte, opword, mode[1], mode[0])) interrupt(SLV, m_pc); tex = mode[0].tea + top(size); @@ -3357,8 +3463,43 @@ template <int Width> std::unique_ptr<util::disasm_interface> ns32000_device<Widt return std::make_unique<ns32000_disassembler>(); } -template <int Width> u16 ns32000_device<Width>::slave(ns32000_slave_interface *slave, addr_mode op1, addr_mode op2) +template <int Width> u16 ns32000_device<Width>::slave(u8 opbyte, u16 opword, addr_mode op1, addr_mode op2) +{ + switch (opbyte) + { + case 0x1e: + if (!m_mmu) + fatalerror("slave mmu coprocessor not configured (%s)\n", machine().describe_context()); + + if (m_cfg & CFG_FM) + return slave_fast(dynamic_cast<ns32000_fast_slave_interface &>(*m_mmu), opbyte, opword, op1, op2); + else + return slave_slow(dynamic_cast<ns32000_slow_slave_interface &>(*m_mmu), opbyte, opword, op1, op2); + break; + + case 0x3e: + case 0xbe: + case 0xfe: + if (!m_fpu) + fatalerror("slave fpu coprocessor not configured (%s)\n", machine().describe_context()); + + if (m_cfg & CFG_FF) + return slave_fast(dynamic_cast<ns32000_fast_slave_interface &>(*m_fpu), opbyte, opword, op1, op2); + else + return slave_slow(dynamic_cast<ns32000_slow_slave_interface &>(*m_fpu), opbyte, opword, op1, op2); + break; + + default: + fatalerror("slave coprocessor not supported (%s)\n", machine().describe_context()); + return ns32000_slave_interface::SLAVE_Q; + } +} + +template <int Width> u16 ns32000_device<Width>::slave_slow(ns32000_slow_slave_interface &slave, u8 opbyte, u16 opword, addr_mode op1, addr_mode op2) { + slave.write_id(opbyte); + slave.write_op(swapendian_int16(opword)); + if ((op1.access == READ || op1.access == RMW) && !(op1.type == REG && op1.slave)) { u64 const data = gen_read(op1); @@ -3366,20 +3507,20 @@ template <int Width> u16 ns32000_device<Width>::slave(ns32000_slave_interface *s switch (op1.size) { case SIZE_B: - slave->write_op(u8(data)); + slave.write_op(u8(data)); break; case SIZE_W: - slave->write_op(u16(data)); + slave.write_op(u16(data)); break; case SIZE_D: - slave->write_op(u16(data >> 0)); - slave->write_op(u16(data >> 16)); + slave.write_op(u16(data >> 0)); + slave.write_op(u16(data >> 16)); break; case SIZE_Q: - slave->write_op(u16(data >> 0)); - slave->write_op(u16(data >> 16)); - slave->write_op(u16(data >> 32)); - slave->write_op(u16(data >> 48)); + slave.write_op(u16(data >> 0)); + slave.write_op(u16(data >> 16)); + slave.write_op(u16(data >> 32)); + slave.write_op(u16(data >> 48)); break; } } @@ -3391,41 +3532,41 @@ template <int Width> u16 ns32000_device<Width>::slave(ns32000_slave_interface *s switch (op2.size) { case SIZE_B: - slave->write_op(u8(data)); + slave.write_op(u8(data)); break; case SIZE_W: - slave->write_op(u16(data)); + slave.write_op(u16(data)); break; case SIZE_D: - slave->write_op(u16(data >> 0)); - slave->write_op(u16(data >> 16)); + slave.write_op(u16(data >> 0)); + slave.write_op(u16(data >> 16)); break; case SIZE_Q: - slave->write_op(u16(data >> 0)); - slave->write_op(u16(data >> 16)); - slave->write_op(u16(data >> 32)); - slave->write_op(u16(data >> 48)); + slave.write_op(u16(data >> 0)); + slave.write_op(u16(data >> 16)); + slave.write_op(u16(data >> 32)); + slave.write_op(u16(data >> 48)); break; } } - u16 const status = slave->read_st(&m_icount); + u16 const status = slave.read_st(&m_icount); if (!(status & ns32000_slave_interface::SLAVE_Q)) { if ((op2.access == WRITE || op2.access == RMW) && !(op2.type == REG && op2.slave)) { - u64 data = slave->read_op(); + u64 data = slave.read_op(); switch (op2.size) { case SIZE_D: - data |= u64(slave->read_op()) << 16; + data |= u64(slave.read_op()) << 16; break; case SIZE_Q: - data |= u64(slave->read_op()) << 16; - data |= u64(slave->read_op()) << 32; - data |= u64(slave->read_op()) << 48; + data |= u64(slave.read_op()) << 16; + data |= u64(slave.read_op()) << 32; + data |= u64(slave.read_op()) << 48; break; default: break; @@ -3437,3 +3578,70 @@ template <int Width> u16 ns32000_device<Width>::slave(ns32000_slave_interface *s return status; } + +template <int Width> u16 ns32000_device<Width>::slave_fast(ns32000_fast_slave_interface &slave, u8 opbyte, u16 opword, addr_mode op1, addr_mode op2) +{ + slave.write(u32(opbyte) << 24 | u32(swapendian_int16(opword)) << 8); + + if ((op1.access == READ || op1.access == RMW) && !(op1.type == REG && op1.slave)) + { + u64 const data = gen_read(op1); + + switch (op1.size) + { + case SIZE_B: + slave.write(u8(data)); + break; + case SIZE_W: + slave.write(u16(data)); + break; + case SIZE_D: + slave.write(u32(data)); + break; + case SIZE_Q: + slave.write(u32(data >> 0)); + slave.write(u32(data >> 32)); + break; + } + } + + if ((op2.access == READ || op2.access == RMW) && !(op2.type == REG && op2.slave)) + { + u64 const data = gen_read(op2); + + switch (op2.size) + { + case SIZE_B: + slave.write(u8(data)); + break; + case SIZE_W: + slave.write(u16(data)); + break; + case SIZE_D: + slave.write(u32(data)); + break; + case SIZE_Q: + slave.write(u32(data >> 0)); + slave.write(u32(data >> 32)); + break; + } + } + + // TODO: status is optional in fast protocol + u32 const status = slave.read_st(&m_icount); + + if (!(status & ns32000_slave_interface::SLAVE_Q)) + { + if ((op2.access == WRITE || op2.access == RMW) && !(op2.type == REG && op2.slave)) + { + u64 data = slave.read(); + + if (op2.size == SIZE_Q) + data |= u64(slave.read()) << 32; + + gen_write(op2, data); + } + } + + return status; +} diff --git a/src/devices/cpu/ns32000/ns32000.h b/src/devices/cpu/ns32000/ns32000.h index e1254d702b5..a18b34040ba 100644 --- a/src/devices/cpu/ns32000/ns32000.h +++ b/src/devices/cpu/ns32000/ns32000.h @@ -136,10 +136,16 @@ protected: // other execution helpers bool condition(unsigned const cc); void flags(u32 const src1, u32 const src2, u32 const dest, unsigned const size, bool const subtraction); - void interrupt(unsigned const vector, u32 const return_address, bool const trap = true); - u16 slave(ns32000_slave_interface *slave, addr_mode op1, addr_mode op2); + void interrupt(unsigned const type, u32 const return_address); + + // slave protocol helpers + u16 slave(u8 opbyte, u16 opword, addr_mode op1, addr_mode op2); + u16 slave_slow(ns32000_slow_slave_interface &slave, u8 opbyte, u16 opword, addr_mode op1, addr_mode op2); + u16 slave_fast(ns32000_fast_slave_interface &slave, u8 opbyte, u16 opword, addr_mode op1, addr_mode op2); private: + u32 const m_address_mask; + // configuration address_space_config m_program_config; address_space_config m_iam_config; @@ -200,8 +206,15 @@ public: ns32032_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); }; +class ns32332_device : public ns32000_device<2> +{ +public: + ns32332_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); +}; + DECLARE_DEVICE_TYPE(NS32008, ns32008_device) DECLARE_DEVICE_TYPE(NS32016, ns32016_device) DECLARE_DEVICE_TYPE(NS32032, ns32032_device) +DECLARE_DEVICE_TYPE(NS32332, ns32332_device) #endif // MAME_CPU_NS32000_NS32000_H diff --git a/src/devices/cpu/ns32000/ns32000dasm.cpp b/src/devices/cpu/ns32000/ns32000dasm.cpp index e14db3c6c2d..6f1e0d24e0f 100644 --- a/src/devices/cpu/ns32000/ns32000dasm.cpp +++ b/src/devices/cpu/ns32000/ns32000dasm.cpp @@ -177,6 +177,25 @@ std::string ns32000_disassembler::reglist(u8 imm) return result; } +std::string ns32000_disassembler::config(u8 imm) +{ + static char const *const cfg[] = { "I", "F", "M", "C", "FF", "FM", "FC", "P" }; + std::string result; + + for (unsigned i = 0; i < 8; i++) + { + if (BIT(imm, i)) + { + if (!result.empty()) + result.append(","); + + result.append(cfg[i]); + } + } + + return result; +} + offs_t ns32000_disassembler::disassemble(std::ostream &stream, offs_t pc, data_buffer const &opcodes, data_buffer const ¶ms) { uint32_t flags = SUPPORTED; @@ -295,7 +314,6 @@ offs_t ns32000_disassembler::disassemble(std::ostream &stream, offs_t pc, data_b u16 const opword = opcodes.r16(pc + bytes); bytes += 2; char const *const options[] = { "", "B", "W", "W,B", "", "", "U", "U,B" }; - char const *const config[] = { "", "I", "F", "F,I", "M", "M,I", "M,F", "M,F,I", "C", "C,I", "C,F", "C,F,I", "C,M", "C,M,I", "C,M,F", "C,M,F,I" }; size_code const size = size_code(opword & 3); @@ -313,7 +331,7 @@ offs_t ns32000_disassembler::disassemble(std::ostream &stream, offs_t pc, data_b else util::stream_format(stream, "CMPS%c %s", size_char[size], options[BIT(opword, 8, 3)]); break; - case 2: util::stream_format(stream, "SETCFG [%s]", config[BIT(opword, 7, 4)]); break; + case 2: util::stream_format(stream, "SETCFG [%s]", config(BIT(opword, 7, 8))); break; case 3: if (BIT(opword, 7)) util::stream_format(stream, "SKPST%c %s", size_char[size], options[BIT(opword, 8, 3)]); @@ -548,13 +566,35 @@ offs_t ns32000_disassembler::disassemble(std::ostream &stream, offs_t pc, data_b } } break; - case 0xfe: // format 12 + case 0xfe: + // format 12: xxxx xyyy yyoo oo0f 1111 1110 + { + u16 const opword = opcodes.r16(pc + bytes); bytes += 2; + + addr_mode mode[] = { addr_mode(BIT(opword, 11, 5)), addr_mode(BIT(opword, 6, 5)) }; + size_code const size_f = BIT(opword, 0) ? SIZE_D : SIZE_Q; + + mode[0].size_f(size_f); + mode[1].size_f(size_f); + decode(mode, pc, opcodes, bytes); + + switch (BIT(opword, 2, 4)) + { + case 0x2: util::stream_format(stream, "POLY%c %s, %s", BIT(opword, 0) ? 'F' : 'L', mode[0].mode, mode[1].mode); break; + case 0x3: util::stream_format(stream, "DOT%c %s, %s", BIT(opword, 0) ? 'F' : 'L', mode[0].mode, mode[1].mode); break; + case 0x4: util::stream_format(stream, "SCALB%c %s, %s", BIT(opword, 0) ? 'F' : 'L', mode[0].mode, mode[1].mode); break; + case 0x5: util::stream_format(stream, "LOGB%c %s, %s", BIT(opword, 0) ? 'F' : 'L', mode[0].mode, mode[1].mode); break; + default: bytes = 1; break; + } + } + break; case 0x9e: // format 13 bytes = 1; break; case 0x1e: // format 14: xxxx xsss s0oo ooii 0001 1110 { + // TODO: different mmu registers for 32332 and 32532 char const *const mmureg[] = { "BPR0", "BPR1", "", "", "PF0", "PF1", "", "", "SC", "", "MSR", "BCNT", "PTB0", "PTB1", "", "EIA" }; u16 const opword = opcodes.r16(pc + bytes); bytes += 2; diff --git a/src/devices/cpu/ns32000/ns32000dasm.h b/src/devices/cpu/ns32000/ns32000dasm.h index 4992979114f..7b29504cb88 100644 --- a/src/devices/cpu/ns32000/ns32000dasm.h +++ b/src/devices/cpu/ns32000/ns32000dasm.h @@ -46,6 +46,7 @@ protected: std::string displacement_string(offs_t pc, data_buffer const &opcodes, unsigned &bytes, std::string const zero = ""); void decode(addr_mode *mode, offs_t pc, data_buffer const &opcodes, unsigned &bytes); std::string reglist(u8 imm); + std::string config(u8 imm); }; #endif // MAME_CPU_NS32000_NS32000DASM_H diff --git a/src/devices/cpu/ns32000/slave.h b/src/devices/cpu/ns32000/slave.h index c3e27ad7f90..b7511e6bcff 100644 --- a/src/devices/cpu/ns32000/slave.h +++ b/src/devices/cpu/ns32000/slave.h @@ -27,10 +27,6 @@ public: }; virtual void state_add(device_state_interface &parent, int &index) = 0; - virtual void write_id(u16 data) = 0; - virtual void write_op(u16 data) = 0; - virtual u16 read_st(int *icount = nullptr) = 0; - virtual u16 read_op() = 0; protected: ns32000_slave_interface(machine_config const &mconfig, device_t &device, char const *type) @@ -51,13 +47,43 @@ protected: class ns32000_mmu_interface : public ns32000_slave_interface { public: + enum translate_result : unsigned { COMPLETE, CANCEL, ABORT }; + virtual translate_result translate(address_space &space, unsigned st, u32 &address, bool user, bool write, bool pfs = false, bool debug = false) = 0; + +protected: ns32000_mmu_interface(machine_config const &mconfig, device_t &device) - : ns32000_slave_interface(mconfig, device, "ns32000_mmu") + : ns32000_slave_interface(mconfig, device) { } +}; - enum translate_result : unsigned { COMPLETE, CANCEL, ABORT }; - virtual translate_result translate(address_space &space, unsigned st, u32 &address, bool user, bool write, bool pfs = false, bool debug = false) = 0; +class ns32000_slow_slave_interface : public ns32000_slave_interface +{ +public: + virtual void write_id(u16 data) = 0; + virtual void write_op(u16 data) = 0; + virtual u16 read_st(int *icount = nullptr) = 0; + virtual u16 read_op() = 0; + +protected: + ns32000_slow_slave_interface(machine_config const &mconfig, device_t &device) + : ns32000_slave_interface(mconfig, device) + { + } +}; + +class ns32000_fast_slave_interface : public ns32000_slave_interface +{ +public: + virtual u32 read_st(int *icount = nullptr) = 0; + virtual u32 read() = 0; + virtual void write(u32 data) = 0; + +protected: + ns32000_fast_slave_interface(machine_config const &mconfig, device_t &device) + : ns32000_slave_interface(mconfig, device) + { + } }; #endif // MAME_CPU_NS32000_SLAVE_H diff --git a/src/devices/cpu/scmp/scmpdasm.cpp b/src/devices/cpu/scmp/scmpdasm.cpp index 1a906218a38..a22b3287416 100644 --- a/src/devices/cpu/scmp/scmpdasm.cpp +++ b/src/devices/cpu/scmp/scmpdasm.cpp @@ -23,69 +23,65 @@ offs_t scmp_disassembler::disassemble(std::ostream &stream, offs_t pc, const dat uint8_t ptr = op & 3; if (BIT(op,7)) { - // two bytes instructions + // two-byte instructions char as[10]; - char aspr[10]; - uint8_t arg = params.r8(pc); pc++; + uint8_t arg = params.r8(pc++); if (arg==0x80) { sprintf(as,"E"); + } else if (arg & 0x80) { + sprintf(as,"-$%02x",0x100-arg); } else { - if (arg & 0x80) { - sprintf(as,"-$%02x",0x100-arg); - } else { - sprintf(as,"+$%02x",arg); - } + sprintf(as,"+$%02x",arg); } - sprintf(aspr,"%s(%d)",as,ptr); switch (op) { // Memory Reference Instructions case 0xc0 : util::stream_format(stream, "ld %s",as); break; case 0xc1 : case 0xc2 : case 0xc3 : - util::stream_format(stream, "ld %s",aspr);break; + util::stream_format(stream, "ld %s(%d)",as,ptr);break; case 0xc5 : case 0xc6 : case 0xc7 : - util::stream_format(stream, "ld @%s",aspr); break; + util::stream_format(stream, "ld @%s(%d)",as,ptr); break; case 0xc8 : util::stream_format(stream, "st %s",as); break; case 0xc9 : case 0xca : case 0xcb : - util::stream_format(stream, "st %s",aspr);break; + util::stream_format(stream, "st %s(%d)",as,ptr);break; case 0xcd : case 0xce : case 0xcf : - util::stream_format(stream, "st @%s",aspr); break; + util::stream_format(stream, "st @%s(%d)",as,ptr); break; case 0xd0 : util::stream_format(stream, "and %s",as); break; case 0xd1 : case 0xd2 : case 0xd3 : - util::stream_format(stream, "and %s",aspr);break; + util::stream_format(stream, "and %s(%d)",as,ptr);break; case 0xd5 : case 0xd6 : case 0xd7 : - util::stream_format(stream, "and @%s",aspr); break; + util::stream_format(stream, "and @%s(%d)",as,ptr); break; case 0xd8 : util::stream_format(stream, "or %s",as); break; case 0xd9 : case 0xda : case 0xdb : - util::stream_format(stream, "or %s",aspr);break; + util::stream_format(stream, "or %s(%d)",as,ptr);break; case 0xdd : case 0xde : case 0xdf : - util::stream_format(stream, "or @%s",aspr); break; + util::stream_format(stream, "or @%s(%d)",as,ptr); break; case 0xe0 : util::stream_format(stream, "xor %s",as); break; case 0xe1 : case 0xe2 : case 0xe3 : - util::stream_format(stream, "xor %s",aspr);break; + util::stream_format(stream, "xor %s(%d)",as,ptr);break; case 0xe5 : case 0xe6 : case 0xe7 : - util::stream_format(stream, "xor @%s",aspr); break; + util::stream_format(stream, "xor @%s(%d)",as,ptr); break; case 0xe8 : util::stream_format(stream, "dad %s",as); break; case 0xe9 : case 0xea : case 0xeb : - util::stream_format(stream, "dad %s",aspr);break; + util::stream_format(stream, "dad %s(%d)",as,ptr);break; case 0xed : case 0xee : case 0xef : - util::stream_format(stream, "dad @%s",aspr); break; + util::stream_format(stream, "dad @%s(%d)",as,ptr); break; case 0xf0 : util::stream_format(stream, "add %s",as); break; case 0xf1 : case 0xf2 : case 0xf3 : - util::stream_format(stream, "add %s",aspr);break; + util::stream_format(stream, "add %s(%d)",as,ptr);break; case 0xf5 : case 0xf6 : case 0xf7 : - util::stream_format(stream, "add @%s",aspr); break; + util::stream_format(stream, "add @%s(%d)",as,ptr); break; case 0xf8 : util::stream_format(stream, "cad %s",as); break; case 0xf9 : case 0xfa : case 0xfb : - util::stream_format(stream, "cad %s",aspr);break; + util::stream_format(stream, "cad %s(%d)",as,ptr);break; case 0xfd : case 0xfe : case 0xff : - util::stream_format(stream, "cad @%s",aspr); break; + util::stream_format(stream, "cad @%s(%d)",as,ptr); break; // Memory Increment/Decrement Instructions case 0xa8 : case 0xa9 : case 0xaa : case 0xab : - util::stream_format(stream, "ild %s",aspr); break; + util::stream_format(stream, "ild %s(%d)",as,ptr); break; case 0xb8 : case 0xb9 : case 0xba : case 0xbb : - util::stream_format(stream, "dld %s",aspr); break; + util::stream_format(stream, "dld %s(%d)",as,ptr); break; // Immediate Instructions case 0xc4 : util::stream_format(stream, "ldi $%02x",arg); break; case 0xd4 : util::stream_format(stream, "ani $%02x",arg); break; @@ -97,16 +93,16 @@ offs_t scmp_disassembler::disassemble(std::ostream &stream, offs_t pc, const dat // Transfer Instructions case 0x90 : util::stream_format(stream, "jmp %s",as);break; case 0x91 : case 0x92 : case 0x93 : - util::stream_format(stream, "jmp %s",aspr);break; + util::stream_format(stream, "jmp %s(%d)",as,ptr);break; case 0x94 : util::stream_format(stream, "jp %s",as); break; case 0x95 : case 0x96 : case 0x97 : - util::stream_format(stream, "jp %s",aspr); break; + util::stream_format(stream, "jp %s(%d)",as,ptr); break; case 0x98 : util::stream_format(stream, "jz %s",as); break; case 0x99 : case 0x9a : case 0x9b : - util::stream_format(stream, "jz %s",aspr); break; + util::stream_format(stream, "jz %s(%d)",as,ptr); break; case 0x9c : util::stream_format(stream, "jnz %s",as); break; case 0x9d : case 0x9e : case 0x9f : - util::stream_format(stream, "jnz %s",aspr); break; + util::stream_format(stream, "jnz %s(%d)",as,ptr); break; // Double-Byte Miscellaneous Instructions case 0x8f: util::stream_format(stream, "dly $%02x",arg); break; // Others are illegal diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp index 1239a1075ed..f7de4e79846 100644 --- a/src/devices/cpu/unsp/unsp.cpp +++ b/src/devices/cpu/unsp/unsp.cpp @@ -59,6 +59,7 @@ unsp_device::unsp_device(const machine_config &mconfig, device_type type, const , m_mem_read(nullptr) , m_mem_write(nullptr) , m_enable_drc(false) + , m_vectorbase(0xfff0) { m_iso = 10; m_numregs = 8; @@ -317,7 +318,7 @@ void unsp_device::device_reset() m_core->m_r[i] = 0xdeadbeef; } - m_core->m_r[REG_PC] = read16(0xfff7); + m_core->m_r[REG_PC] = read16(m_vectorbase + 0x7); m_core->m_enable_irq = 0; m_core->m_enable_fiq = 0; m_core->m_fir_move = 1; @@ -454,7 +455,7 @@ inline void unsp_device::trigger_fiq() push(m_core->m_r[REG_PC], &m_core->m_r[REG_SP]); push(m_core->m_r[REG_SR], &m_core->m_r[REG_SP]); - m_core->m_r[REG_PC] = read16(0xfff6); + m_core->m_r[REG_PC] = read16(m_vectorbase + 0x06); m_core->m_r[REG_SR] = 0; standard_irq_callback(UNSP_FIQ_LINE); } @@ -476,7 +477,7 @@ inline void unsp_device::trigger_irq(int line) if (m_core->m_ine) m_core->m_pri = line; - m_core->m_r[REG_PC] = read16(0xfff8 + line); + m_core->m_r[REG_PC] = read16(m_vectorbase + 0x08 + line); m_core->m_r[REG_SR] = 0; standard_irq_callback(UNSP_IRQ0_LINE+line); } diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h index cd25d6c55e7..010720adeec 100644 --- a/src/devices/cpu/unsp/unsp.h +++ b/src/devices/cpu/unsp/unsp.h @@ -99,6 +99,8 @@ public: unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~unsp_device(); + void set_vectorbase(uint16_t vector) { m_vectorbase = vector; } + uint8_t get_csb(); void set_ds(uint16_t ds); @@ -317,6 +319,7 @@ private: uml::code_handle *m_mem_write; bool m_enable_drc; + uint16_t m_vectorbase; void execute_run_drc(); void flush_drc_cache(); diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp index 7c15d1edee8..00d111f54e9 100644 --- a/src/devices/machine/53c7xx.cpp +++ b/src/devices/machine/53c7xx.cpp @@ -23,10 +23,10 @@ // DEBUGGERY //************************************************************************** -#define LOG_UNHANDLED (1U << 0) -#define LOG_HOST (1U << 1) -#define LOG_STATE (1U << 2) -#define LOG_SCRIPTS (1U << 3) +#define LOG_UNHANDLED (1U << 1) +#define LOG_HOST (1U << 2) +#define LOG_STATE (1U << 3) +#define LOG_SCRIPTS (1U << 4) #define VERBOSE (0) #include "logmacro.h" @@ -1735,7 +1735,7 @@ void ncr53c7xx_device::tc_int() // disassemble_scripts - //------------------------------------------------- -const char* ncr53c7xx_device::disassemble_scripts() +std::string ncr53c7xx_device::disassemble_scripts() { static char const *const phases[] = { @@ -1749,14 +1749,13 @@ const char* ncr53c7xx_device::disassemble_scripts() "Message In" }; - static char buffer[64]; - char opstring[64]; + std::string opstring; switch ((m_dcmd >> 6) & 3) { case 0: { - sprintf(opstring, "BMOV: %s [%x] %d bytes\n", phases[m_dcmd & 7], m_dnad, m_dbc); + opstring = util::string_format("BMOV: %s [%x] %d bytes\n", phases[m_dcmd & 7], m_dnad, m_dbc); break; } case 1: @@ -1773,7 +1772,7 @@ const char* ncr53c7xx_device::disassemble_scripts() "ILLEGAL", }; - sprintf(opstring, "IO: %s (%x)\n", ops[(m_dcmd >> 3) & 7], m_dnad); + opstring = util::string_format("IO: %s (%x)\n", ops[(m_dcmd >> 3) & 7], m_dnad); break; } case 2: @@ -1790,17 +1789,15 @@ const char* ncr53c7xx_device::disassemble_scripts() "ILLEGAL", }; - sprintf(opstring, "TC: %s %c (%s) (%x)\n", ops[(m_dcmd >> 3) & 7], m_dbc & (1 << 19) ? 'T' : 'F', phases[m_dcmd & 7], m_dnad); + opstring = util::string_format("TC: %s %c (%s) (%x)\n", ops[(m_dcmd >> 3) & 7], m_dbc & (1 << 19) ? 'T' : 'F', phases[m_dcmd & 7], m_dnad); break; } case 3: { - sprintf(opstring, "ILLEGAL"); + opstring = "ILLEGAL"; break; } } - sprintf(buffer, "SCRIPTS [%08x]: %s", m_dsp - 8, opstring); - - return buffer; + return util::string_format("SCRIPTS [%08x]: %s", m_dsp - 8, opstring); } diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h index 91999bf7b75..4abefb15403 100644 --- a/src/devices/machine/53c7xx.h +++ b/src/devices/machine/53c7xx.h @@ -122,7 +122,7 @@ private: void tc_return(); void tc_int(); void illegal(); - const char* disassemble_scripts(); + std::string disassemble_scripts(); // SCSI registers diff --git a/src/devices/machine/ns32081.cpp b/src/devices/machine/ns32081.cpp index af873292056..39bd7a80aae 100644 --- a/src/devices/machine/ns32081.cpp +++ b/src/devices/machine/ns32081.cpp @@ -83,7 +83,7 @@ enum size_code : unsigned ns32081_device::ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : device_t(mconfig, NS32081, tag, owner, clock) - , ns32000_slave_interface(mconfig, *this) + , ns32000_slow_slave_interface(mconfig, *this) { } diff --git a/src/devices/machine/ns32081.h b/src/devices/machine/ns32081.h index 38da6767ac2..e73fa8013f6 100644 --- a/src/devices/machine/ns32081.h +++ b/src/devices/machine/ns32081.h @@ -10,7 +10,7 @@ class ns32081_device : public device_t - , public ns32000_slave_interface + , public ns32000_slow_slave_interface { public: ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); diff --git a/src/devices/machine/ns32082.cpp b/src/devices/machine/ns32082.cpp index e5835401745..f999df8196d 100644 --- a/src/devices/machine/ns32082.cpp +++ b/src/devices/machine/ns32082.cpp @@ -147,6 +147,7 @@ enum st_mask : unsigned ns32082_device::ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : device_t(mconfig, NS32082, tag, owner, clock) + , ns32000_slow_slave_interface(mconfig, *this) , ns32000_mmu_interface(mconfig, *this) , m_bpr{} , m_pf{} diff --git a/src/devices/machine/ns32082.h b/src/devices/machine/ns32082.h index 4818c41bcb5..83238529e6b 100644 --- a/src/devices/machine/ns32082.h +++ b/src/devices/machine/ns32082.h @@ -10,6 +10,7 @@ class ns32082_device : public device_t + , public ns32000_slow_slave_interface , public ns32000_mmu_interface { public: diff --git a/src/devices/machine/sensorboard.h b/src/devices/machine/sensorboard.h index 50b428c04b4..7a6daa17d28 100644 --- a/src/devices/machine/sensorboard.h +++ b/src/devices/machine/sensorboard.h @@ -59,6 +59,7 @@ public: // handle pieces void cancel_hand(); void remove_hand(); + int get_handpos() { return m_handpos; } bool drop_piece(u8 x, u8 y); bool pickup_piece(u8 x, u8 y); diff --git a/src/mame/drivers/alvg.cpp b/src/mame/drivers/alvg.cpp index 1c1eb8ba2d8..22641ed095c 100644 --- a/src/mame/drivers/alvg.cpp +++ b/src/mame/drivers/alvg.cpp @@ -4,34 +4,49 @@ PINBALL Alvin G pinball machines. -Undumped PAL16L8 (U29) on sound card. +Undumped PAL16L8 (U29) on PCA-002 sound card. +Undumped PAL16L8 (U104) on PCA-008 sound card. Pinball games: -- Al's Garage Band Goes on a World Tour -- Dual-Pool (unreleased) +- Al's Garage Band Goes on a World Tour (1992) +- Dual-Pool (1993, unreleased) - Monte Carlo -- Mystery Castle -- Pistol Poker -- Punchy the Clown -- Slam 'n Jam (unreleased) +- Mystery Castle (1993) +- Pistol Poker (1993) +- Punchy the Clown (1993) +- Slam 'n Jam (1993, unreleased) - Tropical Isle Other games: -- A-MAZE-ING Baseball (redemption) -- A G Football (head to head) -- A G Soccer-ball (head to head) -- Dinosaur Eggs (redemption) -- The Death Dealing Adventure of Maxx Badazz Champion Kickboxer (unreleased) -- USA Football (redemption) -- USA Football (head to head) +- A-MAZE-ING Baseball (1994, redemption) +- A G Football (1992, head to head) +- A G Soccer-ball (1991, head to head) +- Dinosaur Eggs (1993, redemption) +- The Death Dealing Adventure of Maxx Badazz Champion Kickboxer (1993, unreleased) +- USA Football (1992, redemption) +- USA Football (1992, head to head) + +Here are the key codes to enable play: + +Game NUM Start game End ball +------------------------------------------------------------------------------------------------- +A G Soccer-Ball AG01 Hold N, hit 8 (timed game) +Al's Garage Band Goes On A World Tour AG03 (mnw) +USA Football (head to head) AG05 Hold N and Quote, hit 8 (timed game) +Mystery Castle AG08 (mnw) +Pistol Poker AG10 (mnw) +Punchy the Clown EPC061 (mnw) +Dinosaur Eggs EPC071 (mnw) +USA Football (redemption) EPC111 (mnw) Status: -- Skeletons +- A G Soccer, USA Football: Playable. +- Others: Skeletons ToDo: - Add bsmt-based sound card -- Display -- Inputs not working -- Mechanical sounds +- DMD Display +- Mechanical sound +- Most of the non-working games run into the weeds after a short while. ****************************************************************************************************/ #include "emu.h" @@ -39,7 +54,10 @@ ToDo: #include "cpu/m6502/m65c02.h" #include "cpu/m6809/m6809.h" #include "machine/6522via.h" +#include "machine/clock.h" #include "machine/i8255.h" +#include "machine/input_merger.h" +#include "sound/bsmt2000.h" #include "sound/okim6295.h" #include "sound/ymopl.h" #include "speaker.h" @@ -54,25 +72,35 @@ public: alvg_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_audiocpu(*this, "audiocpu") - , m_oki(*this, "oki") , m_ppi0(*this, "ppi0") , m_ppi1(*this, "ppi1") , m_ppi2(*this, "ppi2") , m_ppi3(*this, "ppi3") - , m_via(*this, "via") , m_via0(*this, "via0") , m_via1(*this, "via1") , m_io_keyboard(*this, "X%d", 0U) , m_digits(*this, "digit%d", 0U) , m_io_outputs(*this, "out%d", 0U) + , m_audiocpu(*this, "audiocpu") + , m_oki(*this, "oki") + , m_bsmt(*this, "bsmt") + , m_vias(*this, "vias") { } void alvg(machine_config &config); + void group1(machine_config &config); + void group2(machine_config &config); + void group3(machine_config &config); + void pca002(machine_config &config); // Gen 1 sound board + void pca003(machine_config &config); // Alphanumeric display + void pca008(machine_config &config); // Gen 2 sound board + void pca021(machine_config &config); // DMD private: void main_map(address_map &map); - void audio_map(address_map &map); + void pca002_map(address_map &map); + void pca003_map(address_map &map); + void pca008_map(address_map &map); void machine_start() override; void machine_reset() override; void display_w(offs_t, u8); @@ -88,27 +116,39 @@ private: void ppi3_pa_w(u8 data); void ppi3_pb_w(u8 data); void ppi3_pc_w(u8 data); - void via_pb_w(u8 data); + void vias_pb_w(u8 data); u8 via0_pa_r(); u8 via0_pb_r() { return m_io_keyboard[12]->read(); } + void via1_pa_w(u8 data); void via1_pb_w(u8 data); + u8 rdstat_r() { return 0xc0; } + u8 rdcode_r() { m_audiocpu->set_input_line(0, CLEAR_LINE); return m_cpu_to_bsmt; } + void wrcode_w(u8 data) { m_bsmt_to_cpu = data; m_via1->write_ca1(BIT(data, 0)); } + void bsmtdl_w(u8 data) { m_bsmt_data = (m_bsmt_data & 0xff00) | data; } + void bsmtdh_w(offs_t offset, u8 data) { m_bsmt_reg = offset >> 1; m_bsmt_data = (m_bsmt_data & 0xff) | (data << 8); } + DECLARE_WRITE_LINE_MEMBER(test_w) { printf("%d ",state); } u16 m_row = 0U; u16 m_lamp_data = 0U; u8 m_strobe = 0U; + u16 m_bsmt_reg = 0U; + u16 m_bsmt_data = 0U; + u8 m_bsmt_to_cpu = 0U; + u8 m_cpu_to_bsmt = 0U; required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audiocpu; - required_device<okim6295_device> m_oki; required_device<i8255_device> m_ppi0; required_device<i8255_device> m_ppi1; required_device<i8255_device> m_ppi2; - required_device<i8255_device> m_ppi3; - required_device<via6522_device> m_via; + optional_device<i8255_device> m_ppi3; required_device<via6522_device> m_via0; required_device<via6522_device> m_via1; required_ioport_array<13> m_io_keyboard; output_finder<40> m_digits; output_finder<128> m_io_outputs; // 32 solenoids + 96 lamps + optional_device<cpu_device> m_audiocpu; + optional_device<okim6295_device> m_oki; + optional_device<bsmt2000_device> m_bsmt; + optional_device<via6522_device> m_vias; }; @@ -119,22 +159,37 @@ void alvg_state::main_map(address_map &map) map(0x2000, 0x2003).mirror(0x3f0).rw(m_ppi0, FUNC(i8255_device::read), FUNC(i8255_device::write)); // U12 map(0x2400, 0x2403).mirror(0x3f0).rw(m_ppi1, FUNC(i8255_device::read), FUNC(i8255_device::write)); // U13 map(0x2800, 0x2803).mirror(0x3f0).rw(m_ppi2, FUNC(i8255_device::read), FUNC(i8255_device::write)); // U14 - map(0x2c00, 0x2c00).mirror(0x37f).w(FUNC(alvg_state::display_w)); - map(0x2c80, 0x2c83).mirror(0x37c).rw(m_ppi3, FUNC(i8255_device::read), FUNC(i8255_device::write)); // IC1 on display board map(0x3800, 0x380f).mirror(0x3f0).m("via1", FUNC(via6522_device::map)); // U8 map(0x3c00, 0x3c0f).mirror(0x3f0).m("via0", FUNC(via6522_device::map)); // U7 } -void alvg_state::audio_map(address_map &map) +void alvg_state::pca003_map(address_map &map) +{ + main_map(map); + map(0x2c00, 0x2c00).mirror(0x37f).w(FUNC(alvg_state::display_w)); + map(0x2c80, 0x2c83).mirror(0x37c).lrw8(NAME([this] (offs_t offset) -> u8 { return m_ppi3->read(offset^3); }), NAME([this] (offs_t offset, u8 data) { m_ppi3->write(offset^3, data); })); // IC1 on display board +} + +void alvg_state::pca002_map(address_map &map) { map(0x0000, 0xffff).rom(); map(0x2000, 0x2001).mirror(0xffe).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); map(0x3000, 0x37ff).mirror(0x800).ram(); map(0x4000, 0x4fff).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x5000, 0x500f).mirror(0xff0).m("via", FUNC(via6522_device::map)); + map(0x5000, 0x500f).mirror(0xff0).m("vias", FUNC(via6522_device::map)); map(0x6000, 0x6fff).noprw(); // watchdog } +void alvg_state::pca008_map(address_map &map) // mapping done by U104 +{ + map(0x0000, 0xffff).rom(); + map(0x0100, 0x0100).r(FUNC(alvg_state::rdstat_r)).nopw(); + map(0x0800, 0x0800).rw(FUNC(alvg_state::rdcode_r),FUNC(alvg_state::wrcode_w)); + map(0x1000, 0x10fe).w(FUNC(alvg_state::bsmtdh_w)); + map(0x1001, 0x1001).w(FUNC(alvg_state::bsmtdl_w)); + map(0x2000, 0x3fff).ram(); +} + static INPUT_PORTS_START( alvg ) PORT_START("X0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -245,7 +300,7 @@ static INPUT_PORTS_START( alvg ) PORT_START("X12") // DIAGS PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Test") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Test") // Manual incorrectly says 0x20 INPUT_PORTS_END void alvg_state::ppi2_pc_w(u8 data) @@ -265,7 +320,7 @@ void alvg_state::ppi3_pa_w(u8 data) void alvg_state::ppi3_pb_w(u8 data) { u16 t = m_digits[m_strobe] & 0xff; - m_digits[m_strobe] = t | (data << 8); + m_digits[m_strobe] = t | (bitswap<8>(data, 7, 6, 3, 2, 5, 4, 1, 0) << 8); } void alvg_state::ppi3_pc_w(u8 data) @@ -277,23 +332,35 @@ void alvg_state::ppi3_pc_w(u8 data) void alvg_state::display_w(offs_t offset, u8 data) { u16 t = m_digits[m_strobe+20] & 0xff; - m_digits[m_strobe+20] = t | (data << 8); + m_digits[m_strobe+20] = t | (bitswap<8>(data, 7, 6, 3, 2, 5, 4, 1, 0) << 8); } -void alvg_state::via_pb_w(u8 data) +void alvg_state::vias_pb_w(u8 data) { m_via1->write_ca1(BIT(data, 1)); } +void alvg_state::via1_pa_w(u8 data) +{ + m_cpu_to_bsmt = data; +} + void alvg_state::via1_pb_w(u8 data) { - m_via->write_ca2(BIT(data, 1)); + if (m_vias) + m_vias->write_ca2(BIT(data, 1)); + + if (m_bsmt) + m_audiocpu->set_input_line(0, ASSERT_LINE); + if ((data & 0x38)==0) { m_strobe++; if (m_strobe > 19) m_strobe = 0; } + if (BIT(data, 5)) + m_strobe = 0; } u8 alvg_state::via0_pa_r() @@ -325,6 +392,60 @@ void alvg_state::machine_reset() m_strobe = 0U; } +void alvg_state::pca002(machine_config &config) +{ + MC6809(config, m_audiocpu, XTAL(8'000'000)); // 68B09, 8 MHz crystal, internal divide by 4 to produce E/Q outputs + m_audiocpu->set_addrmap(AS_PROGRAM, &alvg_state::pca002_map); + + MOS6522(config, m_vias, XTAL(8'000'000) / 4); // uses E clock from audiocpu; port A = read sound code; port B = ticket machine + m_vias->writepb_handler().set(FUNC(alvg_state::vias_pb_w)); + m_vias->irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE); + + SPEAKER(config, "mono").front_center(); + + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(8'000'000) / 2)); + ymsnd.irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE); + ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); + + OKIM6295(config, m_oki, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH); + m_oki->add_route(ALL_OUTPUTS, "mono", 0.50); + + m_via1->writepa_handler().set(m_vias, FUNC(via6522_device::write_pa)); +} + +void alvg_state::pca003(machine_config &config) +{ + m_maincpu->set_addrmap(AS_PROGRAM, &alvg_state::pca003_map); + + /* Video */ + config.set_default_layout(layout_alvg); + + I8255A(config, m_ppi3); // U14 + m_ppi3->out_pa_callback().set(FUNC(alvg_state::ppi3_pa_w)); + m_ppi3->out_pb_callback().set(FUNC(alvg_state::ppi3_pb_w)); + m_ppi3->out_pc_callback().set(FUNC(alvg_state::ppi3_pc_w)); +} + +void alvg_state::pca008(machine_config &config) +{ + MC6809(config, m_audiocpu, XTAL(8'000'000)); // 68B09, 8 MHz crystal, internal divide by 4 to produce E/Q outputs + m_audiocpu->set_addrmap(AS_PROGRAM, &alvg_state::pca008_map); + m_via1->writepa_handler().set(FUNC(alvg_state::via1_pa_w)); + + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + BSMT2000(config, m_bsmt, XTAL(24'000'000)); + m_bsmt->add_route(0, "lspeaker", 1.2); + m_bsmt->add_route(1, "rspeaker", 1.2); + + CLOCK(config, "fclock", 2'000'000 / 4096).signal_handler().set_inputline(m_audiocpu, 1); +} + +void alvg_state::pca021(machine_config &config) +{ +} + void alvg_state::alvg(machine_config &config) { /* basic machine hardware */ @@ -333,25 +454,15 @@ void alvg_state::alvg(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - /* Video */ - config.set_default_layout(layout_alvg); - MOS6522(config, m_via0, XTAL(4'000'000) / 2); // U7, uses clock2 from maincpu; switch inputs m_via0->readpa_handler().set(FUNC(alvg_state::via0_pa_r)); m_via0->readpb_handler().set(FUNC(alvg_state::via0_pb_r)); - //m_via0->writepa_handler().set(FUNC(alvg_state::via0_pa_w)); - //m_via0->writepb_handler().set(FUNC(alvg_state::via0_pb_w)); - //m_via0->ca2_handler().set_nop(); - m_via0->cb2_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); - m_via0->irq_handler().set_inputline(m_maincpu, M65C02_IRQ_LINE); + m_via0->cb2_handler().set_inputline(m_maincpu, INPUT_LINE_NMI).invert(); + m_via0->irq_handler().set("cpuirq", FUNC(input_merger_device::in_w<1>)); MOS6522(config, m_via1, XTAL(4'000'000) / 2); // U8, uses clock2 from maincpu; port A = to sound; port B = serial to display - //m_via1->readpb_handler().set(FUNC(alvg_state::via1_pb_r)); - m_via1->writepa_handler().set(m_via, FUNC(via6522_device::write_pa)); m_via1->writepb_handler().set(FUNC(alvg_state::via1_pb_w)); - //m_via1->ca2_handler().set_nop(); - //m_via1->cb2_handler().set_nop(); - m_via1->irq_handler().set_inputline(m_maincpu, M65C02_IRQ_LINE); + m_via1->irq_handler().set("cpuirq", FUNC(input_merger_device::in_w<2>)); I8255A(config, m_ppi0); // U12 m_ppi0->out_pa_callback().set(FUNC(alvg_state::ppi0_pa_w)); // Solenoids @@ -368,33 +479,31 @@ void alvg_state::alvg(machine_config &config) m_ppi2->out_pb_callback().set(FUNC(alvg_state::ppi2_pb_w)); // Lamps m_ppi2->out_pc_callback().set(FUNC(alvg_state::ppi2_pc_w)); // Lamps - I8255A(config, m_ppi3); // U14 - m_ppi3->out_pa_callback().set(FUNC(alvg_state::ppi3_pa_w)); // Alpha Display - m_ppi3->out_pb_callback().set(FUNC(alvg_state::ppi3_pb_w)); // Alpha Display - m_ppi3->out_pc_callback().set(FUNC(alvg_state::ppi3_pc_w)); // Alpha Display + genpin_audio(config); - // Sound - MC6809(config, m_audiocpu, XTAL(8'000'000)); // 68B09, 8 MHz crystal, internal divide by 4 to produce E/Q outputs - m_audiocpu->set_addrmap(AS_PROGRAM, &alvg_state::audio_map); - MOS6522(config, m_via, XTAL(8'000'000) / 4); // uses E clock from audiocpu; port A = read sound code; port B = ticket machine - //m_via->readpa_handler().set(FUNC(alvg_state::via_pa_r)); - //m_via->readpb_handler().set(FUNC(alvg_state::via_pb_r)); - //m_via->writepa_handler().set(FUNC(alvg_state::via_pa_w)); - m_via->writepb_handler().set(FUNC(alvg_state::via_pb_w)); - //m_via->ca2_handler().set_nop(); - //m_via->cb2_handler().set_nop(); - m_via->irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE); + INPUT_MERGER_ANY_HIGH(config, "cpuirq").output_handler().set_inputline(m_maincpu, M65C02_IRQ_LINE); +} - genpin_audio(config); - SPEAKER(config, "mono").front_center(); +void alvg_state::group1(machine_config &config) +{ + alvg(config); + pca003(config); // A-N display + pca002(config); // Gen 1 sound +} - ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(8'000'000) / 2)); - ymsnd.irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE); - ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); +void alvg_state::group2(machine_config &config) +{ + alvg(config); + pca003(config); // A-N display + pca008(config); // Gen 2 sound +} - OKIM6295(config, m_oki, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH); - m_oki->add_route(ALL_OUTPUTS, "mono", 0.50); +void alvg_state::group3(machine_config &config) +{ + alvg(config); + pca021(config); // DMD + pca008(config); // Gen 2 sound } /*---------------------------------------------------------------------------- @@ -407,9 +516,9 @@ ROM_START(agsoccer) ROM_LOAD("ags_snd.v24", 0x0000, 0x10000, CRC(4ba36e8d) SHA1(330dcb1eea8c311df0e57a3b74146601c26d63c0)) // label says 2.4, inside the ROM it says 2.5L though ROM_REGION(0x400000, "oki", 0) ROM_LOAD("ags_voic.v12", 0x000000, 0x40000, CRC(bac70b18) SHA1(0a699eb95d7d6b071b2cd9d0bf73df355e2ffce8)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END ROM_START(agsoccera) @@ -419,9 +528,9 @@ ROM_START(agsoccera) ROM_LOAD("ags_snd.v21", 0x0000, 0x10000, CRC(aa30bfe4) SHA1(518f7019639a0284461e83ad849bee0be5371580)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("ags_voic.v12", 0x000000, 0x40000, CRC(bac70b18) SHA1(0a699eb95d7d6b071b2cd9d0bf73df355e2ffce8)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END ROM_START(agsoccer07) @@ -431,9 +540,9 @@ ROM_START(agsoccer07) ROM_LOAD("ags_snd.v14", 0x0000, 0x10000, CRC(2544e468) SHA1(d49e2fc91cbb80fdf96f436c614c6f305efafb6f)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("ags_voic.v12", 0x000000, 0x40000, CRC(bac70b18) SHA1(0a699eb95d7d6b071b2cd9d0bf73df355e2ffce8)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END /*------------------------------------------------------------------- @@ -444,23 +553,23 @@ ROM_START(wrldtour) ROM_LOAD("cpu27c.512", 0x0000, 0x10000, CRC(c9572fb5) SHA1(47a3e8943ef4207011a33f4a03a6e722c937cc48)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("soundc.512", 0x0000, 0x10000, CRC(b44bee01) SHA1(795d8500e5bd73ce23756bf1f5c96db1a3621a70)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("samp_0.c21", 0x000000, 0x40000, CRC(37beb831) SHA1(2b90d2be0a1bd7c59469846631d2b44bdf9f5f9d)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("samp_1.c21", 0x100000, 0x40000, CRC(621533c6) SHA1(ca0ed9e89c340cb3b08f9a9002af9997372c1cbf)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("samp_2.c21", 0x200000, 0x40000, CRC(454a5cca) SHA1(66b1a5832134365fd762fcba4cf4d666f60ebd65)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("samp_3.c21", 0x300000, 0x40000, CRC(1f4928f4) SHA1(9949ab96644984fab8037224f52ec28d7d7cc967)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x110000, "gfx3", 0) ROM_LOAD("romdef1.c20", 0x00000, 0x40000, CRC(045b21c1) SHA1(134b7eb0f71506d12d9ded24999d530126c558fc)) ROM_RELOAD( 0x80000, 0x40000) @@ -476,23 +585,23 @@ ROM_START(wrldtour2) ROM_LOAD("cpu02b.512", 0x0000, 0x10000, CRC(1658bf40) SHA1(7af9eedab4e7d0cedaf8bfdbc1f27b989a7171cd)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("soundc.512", 0x0000, 0x10000, CRC(b44bee01) SHA1(795d8500e5bd73ce23756bf1f5c96db1a3621a70)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("samp_0.c21", 0x000000, 0x40000, CRC(37beb831) SHA1(2b90d2be0a1bd7c59469846631d2b44bdf9f5f9d)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("samp_1.c21", 0x100000, 0x40000, CRC(621533c6) SHA1(ca0ed9e89c340cb3b08f9a9002af9997372c1cbf)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("samp_2.c21", 0x200000, 0x40000, CRC(454a5cca) SHA1(66b1a5832134365fd762fcba4cf4d666f60ebd65)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("samp_3.c21", 0x300000, 0x40000, CRC(1f4928f4) SHA1(9949ab96644984fab8037224f52ec28d7d7cc967)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x110000, "gfx3", 0) ROM_LOAD("romdef1.c20", 0x00000, 0x40000, CRC(045b21c1) SHA1(134b7eb0f71506d12d9ded24999d530126c558fc)) ROM_RELOAD( 0x80000, 0x40000) @@ -508,23 +617,23 @@ ROM_START(wrldtour3) ROM_LOAD("cpu03.512", 0x0000, 0x10000, CRC(56dee967) SHA1(f7b1f69d96c72b0cf738bdf45701502f7306a4a0)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("soundc.512", 0x0000, 0x10000, CRC(b44bee01) SHA1(795d8500e5bd73ce23756bf1f5c96db1a3621a70)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("samp_0.c21", 0x000000, 0x40000, CRC(37beb831) SHA1(2b90d2be0a1bd7c59469846631d2b44bdf9f5f9d)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("samp_1.c21", 0x100000, 0x40000, CRC(621533c6) SHA1(ca0ed9e89c340cb3b08f9a9002af9997372c1cbf)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("samp_2.c21", 0x200000, 0x40000, CRC(454a5cca) SHA1(66b1a5832134365fd762fcba4cf4d666f60ebd65)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("samp_3.c21", 0x300000, 0x40000, CRC(1f4928f4) SHA1(9949ab96644984fab8037224f52ec28d7d7cc967)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x110000, "gfx3", 0) ROM_LOAD("romdef1.c20", 0x00000, 0x40000, CRC(045b21c1) SHA1(134b7eb0f71506d12d9ded24999d530126c558fc)) ROM_RELOAD( 0x80000, 0x40000) @@ -541,13 +650,15 @@ ROM_END ROM_START(dinoeggs) ROM_REGION(0x10000, "maincpu", 0) ROM_LOAD("dinoeggs.512", 0x0000, 0x10000, CRC(4712f97f) SHA1(593351dcfd475e685c1e5eb2c1006769d3325c8b)) + //ROM_FILL(0x8119,1,0x0d) // stop jump into the weeds + //ROM_FILL(0x40bd,1,0x80) // disable rom check ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("eps071.r02", 0x0000, 0x10000, CRC(288f116c) SHA1(5d03ce66bffe39ec02173525078ff07c5005ef18)) - ROM_REGION(0x400000, "oki", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("eps072.r02", 0x000000, 0x40000, CRC(780a4364) SHA1(d8a972debee669f0fe66c7407fbed5ef9cd2ce01)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END /*------------------------------------------------------------------- @@ -558,23 +669,23 @@ ROM_START(mystcast) ROM_LOAD("mcastle.cpu", 0x0000, 0x10000, CRC(936e6799) SHA1(aa29fb5f12f34c695d1556232744f65cd576a2b1)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("mcastle.102", 0x0000, 0x10000, CRC(752822d0) SHA1(36461ef03cac5aefa0c03dfdc63c3d294a3b9c09)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("mcastle.sr0", 0x000000, 0x40000, CRC(0855cc73) SHA1(c46e08432bcff24594c33171f20669ba63828931)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("mcastle.sr1", 0x100000, 0x40000, CRC(3b5d76e0) SHA1(b2e1bca3c596eba89feda868fa56c71a6b22414c)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("mcastle.sr2", 0x200000, 0x40000, CRC(c3ffd277) SHA1(d16d1b22089b89bbf0db7d2b66c9745a56034322)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("mcastle.sr3", 0x300000, 0x40000, CRC(740858bb) SHA1(d2e9a0a178977dcc873368b042cea7052578df66)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("mcastle.du4", 0x00000, 0x10000, CRC(686e253a) SHA1(28aff34c120c61e231e2111dc396df515bcbbb89)) ROM_REGION(0x100000, "gfx3", 0) @@ -589,23 +700,23 @@ ROM_START(mystcasta) ROM_LOAD("cpu_103.bin", 0x0000, 0x10000, CRC(70ab8ece) SHA1(2bf8cd042450968b7500552419a9af5df2589c13)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("mcastle.103", 0x0000, 0x10000, CRC(bd4849ac) SHA1(f477ea369539a65c0960be1f1c3b4c5503dd6b75)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("mcastle.sr0", 0x000000, 0x40000, CRC(0855cc73) SHA1(c46e08432bcff24594c33171f20669ba63828931)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("mcastle.sr1", 0x100000, 0x40000, CRC(3b5d76e0) SHA1(b2e1bca3c596eba89feda868fa56c71a6b22414c)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("mcastle.sr2", 0x200000, 0x40000, CRC(c3ffd277) SHA1(d16d1b22089b89bbf0db7d2b66c9745a56034322)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("mcastle.sr3", 0x300000, 0x40000, CRC(740858bb) SHA1(d2e9a0a178977dcc873368b042cea7052578df66)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("u4.bin", 0x00000, 0x10000, CRC(a6969efc) SHA1(82da976cb3d30d6fb1576e4c67febd7235f73f51)) ROM_REGION(0x100000, "gfx3", 0) @@ -623,23 +734,23 @@ ROM_START(pstlpkr) ROM_LOAD("p_peteu2.512", 0x0000, 0x10000, CRC(490a1e2d) SHA1(907dd858ed948681e7366a64a0e7537ebe301d6b)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("p_pu102.512", 0x0000, 0x10000, CRC(b8fb806e) SHA1(c2dc19820ea22bbcf5808db2fb4be76a4033d6ea)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("p_parom0.c20", 0x000000, 0x40000, CRC(99986af2) SHA1(52fa7d2979f7f2d6d65ab6d4f7bbfbed16303991)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("p_parom1.c20", 0x100000, 0x40000, CRC(ae2af238) SHA1(221d3a0e3fb1daad261d723e873ef0727b88889e)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("p_parom2.c20", 0x200000, 0x40000, CRC(f39560a4) SHA1(cdfdf7b44ff4c3f9f4d39fbd8ecbf141d8568088)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("p_parom3.c20", 0x300000, 0x40000, CRC(19d5e4de) SHA1(fb59166ebf992e81b92a42898e351d8443adb1c3)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("p_peteu4.512", 0x00000, 0x10000, CRC(caa0cabd) SHA1(caff6ca4a9cce4e3d846502696c8838805673261)) ROM_REGION(0x100000, "gfx3", 0) @@ -654,23 +765,23 @@ ROM_START(pstlpkr1) ROM_LOAD("u2-ddff.512", 0x0000, 0x10000, CRC(83fa0595) SHA1(d6ebb0e63fd964ccaee3979a7fc13b6adf7b837c)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("p_pu102.512", 0x0000, 0x10000, CRC(b8fb806e) SHA1(c2dc19820ea22bbcf5808db2fb4be76a4033d6ea)) - ROM_REGION(0x400000, "bsmt", 0) + ROM_REGION( 0x1000000, "bsmt", 0 ) ROM_LOAD("p_parom0.c20", 0x000000, 0x40000, CRC(99986af2) SHA1(52fa7d2979f7f2d6d65ab6d4f7bbfbed16303991)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_LOAD("p_parom1.c20", 0x100000, 0x40000, CRC(ae2af238) SHA1(221d3a0e3fb1daad261d723e873ef0727b88889e)) - ROM_RELOAD(0x100000 + 0x40000, 0x40000) - ROM_RELOAD(0x100000 + 0x80000, 0x40000) - ROM_RELOAD(0x100000 + 0xc0000, 0x40000) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_LOAD("p_parom2.c20", 0x200000, 0x40000, CRC(f39560a4) SHA1(cdfdf7b44ff4c3f9f4d39fbd8ecbf141d8568088)) - ROM_RELOAD(0x200000 + 0x40000, 0x40000) - ROM_RELOAD(0x200000 + 0x80000, 0x40000) - ROM_RELOAD(0x200000 + 0xc0000, 0x40000) + ROM_RELOAD(0x240000, 0x40000) + ROM_RELOAD(0x280000, 0x40000) + ROM_RELOAD(0x2c0000, 0x40000) ROM_LOAD("p_parom3.c20", 0x300000, 0x40000, CRC(19d5e4de) SHA1(fb59166ebf992e81b92a42898e351d8443adb1c3)) - ROM_RELOAD(0x300000 + 0x40000, 0x40000) - ROM_RELOAD(0x300000 + 0x80000, 0x40000) - ROM_RELOAD(0x300000 + 0xc0000, 0x40000) + ROM_RELOAD(0x340000, 0x40000) + ROM_RELOAD(0x380000, 0x40000) + ROM_RELOAD(0x3c0000, 0x40000) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("p_peteu4.512", 0x00000, 0x10000, CRC(caa0cabd) SHA1(caff6ca4a9cce4e3d846502696c8838805673261)) ROM_REGION(0x100000, "gfx3", 0) @@ -690,9 +801,9 @@ ROM_START(punchy) ROM_LOAD("eps061.r02", 0x0000, 0x10000, CRC(cfde1b9a) SHA1(cbf9e67df6a6762843272493c2caa1413f70fb27)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("eps062.r02", 0x000000, 0x40000, CRC(7462a5cd) SHA1(05141bcc91b1a786444bff7fa8ba2a785dc0d376)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END ROM_START(punchy3) @@ -702,9 +813,9 @@ ROM_START(punchy3) ROM_LOAD("eps061.r02", 0x0000, 0x10000, CRC(cfde1b9a) SHA1(cbf9e67df6a6762843272493c2caa1413f70fb27)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("eps062.r02", 0x000000, 0x40000, CRC(7462a5cd) SHA1(05141bcc91b1a786444bff7fa8ba2a785dc0d376)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END /*------------------------------------------------------------------- @@ -717,9 +828,9 @@ ROM_START(usafootb) ROM_LOAD("usa_snd.bin", 0x0000, 0x10000, CRC(9d509cbc) SHA1(0be629945b5102adf75e88661e0f956e32ca77da)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("usa_vox.bin", 0x000000, 0x40000, CRC(baae0aa3) SHA1(7933bffcf1509ceeea58a4449268c10c9fac554c)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) ROM_END ROM_START(usafootba) @@ -729,26 +840,43 @@ ROM_START(usafootba) ROM_LOAD("usa_snd.bin", 0x0000, 0x10000, CRC(9d509cbc) SHA1(0be629945b5102adf75e88661e0f956e32ca77da)) ROM_REGION(0x400000, "oki", 0) ROM_LOAD("usa_vox.bin", 0x000000, 0x40000, CRC(baae0aa3) SHA1(7933bffcf1509ceeea58a4449268c10c9fac554c)) - ROM_RELOAD(0x000000 + 0x40000, 0x40000) - ROM_RELOAD(0x000000 + 0x80000, 0x40000) - ROM_RELOAD(0x000000 + 0xc0000, 0x40000) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) +ROM_END + +ROM_START(usafootf) + ROM_REGION(0x10000, "maincpu", 0) + ROM_LOAD("usafootf_cpu1.u2", 0x0000, 0x10000, CRC(bdcee108) SHA1(5f241e3d56620cd7464889c9f0032416c190f0c8) ) + ROM_REGION(0x10000, "audiocpu", 0) + ROM_LOAD("usafootf_snd.u102", 0x0000, 0x10000, CRC(330a7974) SHA1(0fc041a826403167e9c05046304cb4be30e89aaa) ) + ROM_REGION( 0x1000000, "bsmt", 0 ) + ROM_LOAD("usafootf.arom0", 0x000000, 0x40000, CRC(577509bb) SHA1(2d7705aaa5cf42f4fcffa259a325cec2018d0085) ) + ROM_RELOAD(0x040000, 0x40000) + ROM_RELOAD(0x080000, 0x40000) + ROM_RELOAD(0x0c0000, 0x40000) + ROM_LOAD("usafootf.arom1", 0x100000, 0x40000, CRC(d71553bd) SHA1(4d1e1ca252a07e2c4f0e0fe68900b6c2438cc933) ) + ROM_RELOAD(0x140000, 0x40000) + ROM_RELOAD(0x180000, 0x40000) + ROM_RELOAD(0x1c0000, 0x40000) ROM_END } // Anonymous namespace -GAME( 1991, agsoccer, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R18u, 2.5L sound)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1991, agsoccera, agsoccer, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R18u, 2.1 sound)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1991, agsoccer07, agsoccer, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R07u)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1992, wrldtour, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1992, wrldtour2, wrldtour, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour (R02b)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1992, wrldtour3, wrldtour, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour (R06a)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, usafootb, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "U.S.A. Football", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, usafootba, usafootb, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "U.S.A. Football (R01u)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, mystcast, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Mystery Castle (R02)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, mystcasta, mystcast, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Mystery Castle (R03)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, pstlpkr, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Pistol Poker (R02)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, pstlpkr1, pstlpkr, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Pistol Poker (R01)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, punchy, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Punchy The Clown (R02)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, punchy3, punchy, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Punchy The Clown (R03)", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1993, dinoeggs, 0, alvg, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Dinosaur Eggs", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1991, agsoccer, 0, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R18u, 2.5L sound)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1991, agsoccera, agsoccer, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R18u, 2.1 sound)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1991, agsoccer07, agsoccer, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "A.G. Soccer Ball (R07u)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1992, wrldtour, 0, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1992, wrldtour2, wrldtour, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour (R02b)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1992, wrldtour3, wrldtour, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Al's Garage Band Goes On A World Tour (R06a)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, usafootb, 0, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "U.S.A. Football", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, usafootba, usafootb, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "U.S.A. Football (R01u)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, usafootf, 0, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "U.S.A. Football (redemption)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, mystcast, 0, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Mystery Castle (R02)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, mystcasta, mystcast, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Mystery Castle (R03)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, pstlpkr, 0, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Pistol Poker (R02)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, pstlpkr1, pstlpkr, group3, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Pistol Poker (R01)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, punchy, 0, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Punchy The Clown (R02)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, punchy3, punchy, group1, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Punchy The Clown (R03)", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1993, dinoeggs, 0, group2, alvg, alvg_state, empty_init, ROT0, "Alvin G", "Dinosaur Eggs", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/ceres.cpp b/src/mame/drivers/ceres.cpp index 02255ced38d..92c063e03e3 100644 --- a/src/mame/drivers/ceres.cpp +++ b/src/mame/drivers/ceres.cpp @@ -21,7 +21,7 @@ // various hardware #include "machine/ns32081.h" -//#include "machine/ns32082.h" +#include "machine/ns32082.h" #include "machine/mc68681.h" #include "machine/z80scc.h" #include "machine/m3002.h" @@ -49,6 +49,7 @@ public: : driver_device(mconfig, type, tag) , m_cpu(*this, "cpu") , m_fpu(*this, "fpu") + , m_mmu(*this, "mmu") , m_ram(*this, "ram") , m_uart(*this, "uart") , m_serial(*this, "v24") @@ -88,6 +89,7 @@ public: protected: required_device<ns32032_device> m_cpu; required_device<ns32081_device> m_fpu; + required_device<ns32082_device> m_mmu; required_device<ram_device> m_ram; required_device<scn2681_device> m_uart; @@ -341,6 +343,9 @@ void ceres1_state::ceres1(machine_config &config) NS32081(config, m_fpu, 10_MHz_XTAL); m_cpu->set_fpu(m_fpu); + NS32082(config, m_mmu, 10_MHz_XTAL); + m_cpu->set_mmu(m_mmu); + RAM(config, m_ram); m_ram->set_default_size("4MiB"); m_ram->set_default_value(0); diff --git a/src/mame/drivers/contra.cpp b/src/mame/drivers/contra.cpp index 0fe6131ff58..28c0a571725 100644 --- a/src/mame/drivers/contra.cpp +++ b/src/mame/drivers/contra.cpp @@ -209,11 +209,11 @@ void contra_state::machine_reset() void contra_state::contra(machine_config &config) { /* basic machine hardware */ - HD6309E(config, m_maincpu, XTAL(24'000'000) / 8); /* 3000000? (HD63C09EP) */ + HD6309E(config, m_maincpu, XTAL(24'000'000) / 8); /* (HD63C09EP) */ m_maincpu->set_addrmap(AS_PROGRAM, &contra_state::contra_map); m_maincpu->set_vblank_int("screen", FUNC(contra_state::contra_interrupt)); - MC6809E(config, m_audiocpu, XTAL(24'000'000)/8); /* 3000000? (HD68B09EP) */ + MC6809E(config, m_audiocpu, XTAL(3'579'545) / 2 ); /* (HD68B09EP) */ m_audiocpu->set_addrmap(AS_PROGRAM, &contra_state::sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); /* enough for the sound CPU to read all commands */ diff --git a/src/mame/drivers/de_2.cpp b/src/mame/drivers/de_2.cpp index 7494756e0d8..00ccedc9919 100644 --- a/src/mame/drivers/de_2.cpp +++ b/src/mame/drivers/de_2.cpp @@ -87,7 +87,7 @@ private: virtual void machine_reset() override; void de_bg_audio(machine_config &config); - void de_2_audio_map(address_map &map); + void audio_map(address_map &map); void sample_w(uint8_t data); void pia34_pa_w(uint8_t data) { } @@ -139,10 +139,11 @@ private: uint8_t m_diag = 0U; uint8_t m_sound_data = 0U; u16 m_sol = 0U; + u8 m_sr_size = 1U; }; -void de_2_state::de_2_audio_map(address_map &map) +void de_2_state::audio_map(address_map &map) { map(0x0000, 0x1fff).ram(); map(0x2000, 0x2001).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); @@ -255,9 +256,11 @@ void de_2_state::machine_start() save_item(NAME(m_strobe)); save_item(NAME(m_row)); save_item(NAME(m_sol)); + save_item(NAME(m_sr_size)); uint8_t *const ROM = memregion("sound1")->base(); - m_sample_bank->configure_entries(0, 16, &ROM[0x0000], 0x4000); + m_sr_size = memregion("sound1")->bytes() / 0x4000; + m_sample_bank->configure_entries(0, m_sr_size, &ROM[0x0000], 0x4000); m_sample_bank->set_entry(0); } @@ -452,7 +455,7 @@ void de_2_state::sample_bank_w(uint8_t data) { static constexpr uint8_t prescale[4] = { msm5205_device::S96_4B, msm5205_device::S48_4B, msm5205_device::S64_4B, 0 }; - m_sample_bank->set_entry(data & 7); + m_sample_bank->set_entry(data & (m_sr_size - 1)); m_nmi_enable = !BIT(data, 7); m_msm5205->playmode_w(prescale[BIT(data, 4, 2)]); m_msm5205->reset_w(BIT(data, 6)); @@ -556,18 +559,18 @@ void de_2_state::de_bg_audio(machine_config &config) { /* sound CPU */ MC6809E(config, m_audiocpu, XTAL(8'000'000) / 4); // MC68B09E - m_audiocpu->set_addrmap(AS_PROGRAM, &de_2_state::de_2_audio_map); + m_audiocpu->set_addrmap(AS_PROGRAM, &de_2_state::audio_map); SPEAKER(config, "bg").front_center(); YM2151(config, m_ym2151, XTAL(3'579'545)); m_ym2151->irq_handler().set(FUNC(de_2_state::ym2151_irq_w)); - m_ym2151->add_route(ALL_OUTPUTS, "bg", 0.50); + m_ym2151->add_route(ALL_OUTPUTS, "bg", 0.40); MSM5205(config, m_msm5205, XTAL(384'000)); m_msm5205->vck_legacy_callback().set(FUNC(de_2_state::msm5205_irq_w)); m_msm5205->set_prescaler_selector(msm5205_device::S96_4B); - m_msm5205->add_route(ALL_OUTPUTS, "bg", 0.50); + m_msm5205->add_route(ALL_OUTPUTS, "bg", 0.90); } void de_2_state::de_type1(machine_config &config) @@ -643,7 +646,7 @@ ROM_START(bttf_a28) ROM_LOAD("bttfc5.2-8", 0x8000, 0x8000, CRC(5dc9928f) SHA1(03de05ed7b04ba86d695f03b1a3d65788faf2d4f)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("bttfsf7.rom", 0x8000, 0x8000, CRC(7673146e) SHA1(d6bd7cf39c78c8aff0b1a0b6cfd46a2a8ce9e086)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("bttfsf6.rom", 0x00000, 0x10000, CRC(468a8d9c) SHA1(713cf84cc5f0531e2e9f7aaa58ebeb53c28ba395)) ROM_LOAD("bttfsf5.rom", 0x10000, 0x10000, CRC(37a6f6b8) SHA1(ebd603d36527a2af25dcda1fde5cdf9a34d1f9cd)) ROM_END @@ -654,7 +657,7 @@ ROM_START(bttf_a27) ROM_LOAD("bttfc5.2-7", 0x8000, 0x8000, CRC(c4d85d7e) SHA1(88bb91f9ed50335fc402b68983b49319c7dd4e99)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("bttfsf7.rom", 0x8000, 0x8000, CRC(7673146e) SHA1(d6bd7cf39c78c8aff0b1a0b6cfd46a2a8ce9e086)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("bttfsf6.rom", 0x00000, 0x10000, CRC(468a8d9c) SHA1(713cf84cc5f0531e2e9f7aaa58ebeb53c28ba395)) ROM_LOAD("bttfsf5.rom", 0x10000, 0x10000, CRC(37a6f6b8) SHA1(ebd603d36527a2af25dcda1fde5cdf9a34d1f9cd)) ROM_END @@ -665,7 +668,7 @@ ROM_START(bttf_a20) ROM_LOAD("bttfc5.2-0", 0x8000, 0x8000, CRC(a189a189) SHA1(9669653280c78c811931ea3944817c717f3b5b77)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("bttfsf7.rom", 0x8000, 0x8000, CRC(7673146e) SHA1(d6bd7cf39c78c8aff0b1a0b6cfd46a2a8ce9e086)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("bttfsf6.rom", 0x00000, 0x10000, CRC(468a8d9c) SHA1(713cf84cc5f0531e2e9f7aaa58ebeb53c28ba395)) ROM_LOAD("bttfsf5.rom", 0x10000, 0x10000, CRC(37a6f6b8) SHA1(ebd603d36527a2af25dcda1fde5cdf9a34d1f9cd)) ROM_END @@ -676,7 +679,7 @@ ROM_START(bttf_a21) ROM_LOAD("bktofutr.c5", 0x8000, 0x8000, CRC(118ae58e) SHA1(a17e4cc3c12ca770e6e0674cfbeb55482739f735)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("bttfsf7.rom", 0x8000, 0x8000, CRC(7673146e) SHA1(d6bd7cf39c78c8aff0b1a0b6cfd46a2a8ce9e086)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("bttfsf6.rom", 0x00000, 0x10000, CRC(468a8d9c) SHA1(713cf84cc5f0531e2e9f7aaa58ebeb53c28ba395)) ROM_LOAD("bttfsf5.rom", 0x10000, 0x10000, CRC(37a6f6b8) SHA1(ebd603d36527a2af25dcda1fde5cdf9a34d1f9cd)) ROM_END @@ -687,7 +690,7 @@ ROM_START(bttf_g27) ROM_LOAD("bttfc5g.2-7", 0x8000, 0x8000, CRC(31dec6d0) SHA1(b0f9323ace3f6d96790be7fe2df67b974c291a29)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("bttfsf7.rom", 0x8000, 0x8000, CRC(7673146e) SHA1(d6bd7cf39c78c8aff0b1a0b6cfd46a2a8ce9e086)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("bttfsf6.rom", 0x00000, 0x10000, CRC(468a8d9c) SHA1(713cf84cc5f0531e2e9f7aaa58ebeb53c28ba395)) ROM_LOAD("bttfsf5.rom", 0x10000, 0x10000, CRC(37a6f6b8) SHA1(ebd603d36527a2af25dcda1fde5cdf9a34d1f9cd)) ROM_END @@ -701,7 +704,7 @@ ROM_START(kiko_a10) ROM_LOAD("kkcpu_c5.bin", 0x8000, 0x8000, CRC(d42cab64) SHA1(ca4ceac34384804395b3e3035a430560f194846b)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("kksnd_f7.bin", 0x8000, 0x8000, CRC(fb1b3e11) SHA1(3c9a6958749d7e4dc5a1a57d6683e3cb3dc34890)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("kkvoi_f5.bin", 0x00000, 0x10000, CRC(415f814c) SHA1(27e5b6b7f7ce2e5548ee9bf30966fa4f276bdc4d)) ROM_LOAD("kkvoi_f4.bin", 0x10000, 0x10000, CRC(bbdc836c) SHA1(825a02b4f058d9dbc387035eb6533547d1766396)) ROM_END @@ -714,7 +717,7 @@ ROM_START(lwar_a83) ROM_LOAD("lwar8-3.c5", 0x8000, 0x8000, CRC(eee158ee) SHA1(54db2342bdd15b16fee906dc65f183a957fd0012)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("lwar_e9.snd", 0x8000, 0x8000, CRC(9a6c834d) SHA1(c6e2c4658db4bd8dfcbb0351793837cdff30ba28)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("lwar_e6.snd", 0x00000, 0x10000, CRC(7307d795) SHA1(5d88b8d883a2f17ca9fa30c7e7ac29c9f236ac4d)) ROM_LOAD("lwar_e7.snd", 0x10000, 0x10000, CRC(0285cff9) SHA1(2c5e3de649e419ec7944059f2a226aaf58fe2af5)) ROM_END @@ -724,7 +727,7 @@ ROM_START(lwar_a81) ROM_LOAD("c100_g8.256", 0x8000, 0x8000, CRC(fe63ef04) SHA1(edab4b7fab4a016e653a546110a4bc8c563e7cb7)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("lwar_e9.snd", 0x8000, 0x8000, CRC(9a6c834d) SHA1(c6e2c4658db4bd8dfcbb0351793837cdff30ba28)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("lwar_e6.snd", 0x00000, 0x10000, CRC(7307d795) SHA1(5d88b8d883a2f17ca9fa30c7e7ac29c9f236ac4d)) ROM_LOAD("lwar_e7.snd", 0x10000, 0x10000, CRC(0285cff9) SHA1(2c5e3de649e419ec7944059f2a226aaf58fe2af5)) ROM_END @@ -734,7 +737,7 @@ ROM_START(lwar_e90) ROM_LOAD("lwar9-0.e5", 0x8000, 0x8000, CRC(b596151f) SHA1(10dade79ded71625770ec7e21ea50b7aa64023d0)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("lwar_e9.snd", 0x8000, 0x8000, CRC(9a6c834d) SHA1(c6e2c4658db4bd8dfcbb0351793837cdff30ba28)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("lwar_e6.snd", 0x00000, 0x10000, CRC(7307d795) SHA1(5d88b8d883a2f17ca9fa30c7e7ac29c9f236ac4d)) ROM_LOAD("lwar_e7.snd", 0x10000, 0x10000, CRC(0285cff9) SHA1(2c5e3de649e419ec7944059f2a226aaf58fe2af5)) ROM_END @@ -749,7 +752,7 @@ ROM_START(mnfb_c29) ROM_LOAD("mnfb2-9.c5", 0x8000, 0x8000, CRC(98d50cf5) SHA1(59d3b16f8195ab95cece71a12dab3349dfeb2c2b)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("mnf-f7.256", 0x8000, 0x8000, CRC(fbc2d6f6) SHA1(33173c081de776d32e926481e94b265ec48d770b)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("mnf-f5-6.512", 0x00000, 0x10000, CRC(0c6ea963) SHA1(8c88fa588222ef8a6c872b8c5b49639b108384d4)) ROM_LOAD("mnf-f4-5.512", 0x10000, 0x10000, CRC(efca5d80) SHA1(9655c885dd64aa170205170b6a0c052bd9367379)) ROM_END @@ -760,7 +763,7 @@ ROM_START(mnfb_c27) ROM_LOAD("mnfb2-7.c5", 0x8000, 0x8000, CRC(579d81df) SHA1(9c96da34d37d3369513003e208222bd6e8698638)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("mnf-f7.256", 0x8000, 0x8000, CRC(fbc2d6f6) SHA1(33173c081de776d32e926481e94b265ec48d770b)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("mnf-f5-6.512", 0x00000, 0x10000, CRC(0c6ea963) SHA1(8c88fa588222ef8a6c872b8c5b49639b108384d4)) ROM_LOAD("mnf-f4-5.512", 0x10000, 0x10000, CRC(efca5d80) SHA1(9655c885dd64aa170205170b6a0c052bd9367379)) ROM_END @@ -775,7 +778,7 @@ ROM_START(poto_a32) ROM_LOAD("potoc5.3-2", 0x8000, 0x8000, CRC(e6026455) SHA1(c1441fda6181e9014a8a6f93b7405998a952f508)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("potof7.rom", 0x8000, 0x8000, CRC(2e60b2e3) SHA1(0be89fc9b2c6548392febb35c1ace0eb912fc73f)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("potof6.rom", 0x00000, 0x10000, CRC(62b8f74b) SHA1(f82c706b88f49341bab9014bd83371259eb53b47)) ROM_LOAD("potof5.rom", 0x10000, 0x10000, CRC(5a0537a8) SHA1(26724441d7e2edd7725337b262d95448499151ad)) ROM_END @@ -786,7 +789,7 @@ ROM_START(poto_a31) ROM_LOAD("potoc5.3-1", 0x8000, 0x8000, CRC(4ce1d254) SHA1(4d24a230ae3a37674cc25ab5ae40c57acbdf5f04)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("potof7.rom", 0x8000, 0x8000, CRC(2e60b2e3) SHA1(0be89fc9b2c6548392febb35c1ace0eb912fc73f)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("potof6.rom", 0x00000, 0x10000, CRC(62b8f74b) SHA1(f82c706b88f49341bab9014bd83371259eb53b47)) ROM_LOAD("potof5.rom", 0x10000, 0x10000, CRC(5a0537a8) SHA1(26724441d7e2edd7725337b262d95448499151ad)) ROM_END @@ -797,7 +800,7 @@ ROM_START(poto_a29) ROM_LOAD("potoc5.2-9", 0x8000, 0x8000, CRC(c34975b3) SHA1(c9c57126a5da6d78b4066b1d316ffc840660689d)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("potof7.rom", 0x8000, 0x8000, CRC(2e60b2e3) SHA1(0be89fc9b2c6548392febb35c1ace0eb912fc73f)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("potof6.rom", 0x00000, 0x10000, CRC(62b8f74b) SHA1(f82c706b88f49341bab9014bd83371259eb53b47)) ROM_LOAD("potof5.rom", 0x10000, 0x10000, CRC(5a0537a8) SHA1(26724441d7e2edd7725337b262d95448499151ad)) ROM_END @@ -811,7 +814,7 @@ ROM_START(play_a24) ROM_LOAD("play2-4.c5", 0x8000, 0x8000, CRC(47c30bc2) SHA1(c62e192ec01f4884226e9628baa2cad10cc57bd9)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("pbsnd7.dat", 0x8000, 0x8000, CRC(c2cf2cc5) SHA1(1277704b1b38558c341b52da5e06ffa9f07942ad)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("pbsnd6.dat", 0x00000, 0x10000, CRC(c2570631) SHA1(135db5b923689884c73aa5ce48f566db7f1cf831)) ROM_LOAD("pbsnd5.dat", 0x10000, 0x10000, CRC(0fd30569) SHA1(0bf53fe4b5dffb5e15212c3371f51e98ad14e258)) ROM_END @@ -825,7 +828,7 @@ ROM_START(robo_a34) ROM_LOAD("roboc5.a34", 0x8000, 0x8000, CRC(c8705f47) SHA1(a29ad9e4e0269ab19dae77b1e70ff84c8c8d9e85)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("robof7.rom", 0x8000, 0x8000, CRC(fa0891bd) SHA1(332d03c7802989abf717564230993b54819ebc0d)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("robof6.rom", 0x00000, 0x10000, CRC(9246e107) SHA1(e8e72c0d099b17ea9e59ea7794011bad4c072c5e)) ROM_LOAD("robof4.rom", 0x10000, 0x10000, CRC(27d31df3) SHA1(1611a508ce74eb62a07296d69782ea4fa14503fc)) ROM_END @@ -836,7 +839,7 @@ ROM_START(robo_a30) ROM_LOAD("c5.256", 0x8000, 0x8000, CRC(f2de58cf) SHA1(0b5dd14761b4c64c1b01faad923ab671573499c5)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("robof7.rom", 0x8000, 0x8000, CRC(fa0891bd) SHA1(332d03c7802989abf717564230993b54819ebc0d)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("robof6.rom", 0x00000, 0x10000, CRC(9246e107) SHA1(e8e72c0d099b17ea9e59ea7794011bad4c072c5e)) ROM_LOAD("robof4.rom", 0x10000, 0x10000, CRC(27d31df3) SHA1(1611a508ce74eb62a07296d69782ea4fa14503fc)) ROM_END @@ -847,7 +850,7 @@ ROM_START(robo_a29) ROM_LOAD("roboc5.a29", 0x8000, 0x8000, CRC(b251b0b6) SHA1(3d340070494b102703e282ae3a7970f6f8aaede9)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("robof7.rom", 0x8000, 0x8000, CRC(fa0891bd) SHA1(332d03c7802989abf717564230993b54819ebc0d)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("robof6.rom", 0x00000, 0x10000, CRC(9246e107) SHA1(e8e72c0d099b17ea9e59ea7794011bad4c072c5e)) ROM_LOAD("robof4.rom", 0x10000, 0x10000, CRC(27d31df3) SHA1(1611a508ce74eb62a07296d69782ea4fa14503fc)) ROM_END @@ -861,7 +864,7 @@ ROM_START(ssvc_a26) ROM_LOAD("ssvc2-6.c5", 0x8000, 0x8000, CRC(171b97ae) SHA1(9d678b7b91a5d50ea3cf4f2352094c2355f917b2)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("sssndf7.rom", 0x8000, 0x8000, CRC(980778d0) SHA1(7c1f14d327b6d0e6d0fef058f96bb1cb440c9330)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("ssv1f6.rom", 0x00000, 0x10000, CRC(ccbc72f8) SHA1(c5c13fb8d05d7fb4005636655073d88b4d12d65e)) ROM_LOAD("ssv2f4.rom", 0x10000, 0x10000, CRC(53832d16) SHA1(2227eb784e0221f1bf2bdf7ea48ecd122433f1ea)) ROM_END @@ -872,7 +875,7 @@ ROM_START(ssvc_b26) ROM_LOAD("ssvc2-6.c5", 0x8000, 0x8000, CRC(171b97ae) SHA1(9d678b7b91a5d50ea3cf4f2352094c2355f917b2)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("sssndf7b.rom", 0x8000, 0x8000, CRC(4bd6b16a) SHA1(b9438a16cd35820628fe6eb82287b2c39fe4b1c6)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("ssv1f6.rom", 0x00000, 0x10000, CRC(ccbc72f8) SHA1(c5c13fb8d05d7fb4005636655073d88b4d12d65e)) ROM_LOAD("ssv2f4.rom", 0x10000, 0x10000, CRC(53832d16) SHA1(2227eb784e0221f1bf2bdf7ea48ecd122433f1ea)) ROM_END @@ -883,7 +886,7 @@ ROM_START(ssvc_a42) ROM_LOAD("ss-c5.256", 0x8000, 0x8000, CRC(eceab834) SHA1(d946adac7ec8688709fd75108674a82f2f5c7b53)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("sssndf7b.rom", 0x8000, 0x8000, CRC(4bd6b16a) SHA1(b9438a16cd35820628fe6eb82287b2c39fe4b1c6)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("ssv1f6.rom", 0x00000, 0x10000, CRC(ccbc72f8) SHA1(c5c13fb8d05d7fb4005636655073d88b4d12d65e)) ROM_LOAD("ssv2f4.rom", 0x10000, 0x10000, CRC(53832d16) SHA1(2227eb784e0221f1bf2bdf7ea48ecd122433f1ea)) ROM_END @@ -897,7 +900,7 @@ ROM_START(simp_a27) ROM_LOAD("simpc5.2-7", 0x8000, 0x8000, CRC(400a98b2) SHA1(8d11063712dd718ff8badc29586c700208e7442c)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("simpf7.rom", 0x8000, 0x8000, CRC(a36febbc) SHA1(3b96e05f797dd0dc0d4d52544ed995d477991a9f)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("simpf6.rom", 0x00000, 0x20000, CRC(2eb32ed0) SHA1(e7bc3291cb88bf70010865f64496a3ca393257e7)) ROM_LOAD("simpf5.rom", 0x20000, 0x20000, CRC(bd0671ae) SHA1(b116a23db956a3dd9fc138ec25af250885ba4ef5)) ROM_END @@ -908,7 +911,7 @@ ROM_START(simp_a20) ROM_LOAD("simpa2-0.c5", 0x8000, 0x8000, CRC(43662bc3) SHA1(d8171a5c083eb8bffa61353b74db6b3ebab96923)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("simpf7.rom", 0x8000, 0x8000, CRC(a36febbc) SHA1(3b96e05f797dd0dc0d4d52544ed995d477991a9f)) - ROM_REGION(0x1000000, "sound1", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("simpf6.rom", 0x00000, 0x20000, CRC(2eb32ed0) SHA1(e7bc3291cb88bf70010865f64496a3ca393257e7)) ROM_LOAD("simpf5.rom", 0x20000, 0x20000, CRC(bd0671ae) SHA1(b116a23db956a3dd9fc138ec25af250885ba4ef5)) ROM_END @@ -922,7 +925,7 @@ ROM_START(tmac_a24) ROM_LOAD("tmach2-4.c5", 0x8000, 0x8000, CRC(b61035f5) SHA1(08436b68f37323f50c1fec86aba303a1690af653)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmachf7.rom", 0x8000, 0x8000, CRC(0f518bd4) SHA1(05e24ca0e76d576c65d9d2a01417f1ad2aa984bb)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("tmachf6.rom", 0x00000, 0x10000, CRC(47e61641) SHA1(93cd946ebc9f69d82512429a9ae5f2754499b00a)) ROM_LOAD("tmachf4.rom", 0x10000, 0x10000, CRC(51e3aade) SHA1(38fc0f3a9c727bfd07fbcb16c3ca6d0560dc65c3)) ROM_END @@ -933,7 +936,7 @@ ROM_START(tmac_a18) ROM_LOAD("tmach1-8.c5", 0x8000, 0x8000, CRC(5a348def) SHA1(bf2b9a69d516d38e6f87c5886e0ba768c2dc28ab)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmachf7.rom", 0x8000, 0x8000, CRC(0f518bd4) SHA1(05e24ca0e76d576c65d9d2a01417f1ad2aa984bb)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("tmachf6.rom", 0x00000, 0x10000, CRC(47e61641) SHA1(93cd946ebc9f69d82512429a9ae5f2754499b00a)) ROM_LOAD("tmachf4.rom", 0x10000, 0x10000, CRC(51e3aade) SHA1(38fc0f3a9c727bfd07fbcb16c3ca6d0560dc65c3)) ROM_END @@ -944,7 +947,7 @@ ROM_START(tmac_g18) ROM_LOAD("tmachg18.c5", 0x8000, 0x8000, CRC(5a348def) SHA1(bf2b9a69d516d38e6f87c5886e0ba768c2dc28ab)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmachf7.rom", 0x8000, 0x8000, CRC(0f518bd4) SHA1(05e24ca0e76d576c65d9d2a01417f1ad2aa984bb)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("tmachf6.rom", 0x00000, 0x10000, CRC(47e61641) SHA1(93cd946ebc9f69d82512429a9ae5f2754499b00a)) ROM_LOAD("tmachf4.rom", 0x10000, 0x10000, CRC(51e3aade) SHA1(38fc0f3a9c727bfd07fbcb16c3ca6d0560dc65c3)) ROM_END @@ -958,7 +961,7 @@ ROM_START(torp_e21) ROM_LOAD("torpe2-1.c5", 0x8000, 0x8000, CRC(9ad33882) SHA1(c4504d8e136f667652f79b54d4e8d775169c6ac3)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("torpef7.rom", 0x8000, 0x8000, CRC(26f4c33e) SHA1(114f85e93e7b699c4cd6ce1298f95228d439deba)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("torpef6.rom", 0x00000, 0x10000, CRC(b214a7ea) SHA1(d972148395581844e3eaed08f755f3e2217dbbc0)) ROM_LOAD("torpef4.rom", 0x10000, 0x10000, CRC(83a4e7f3) SHA1(96deac9251fe68cc0319ac009becd424c4e444c5)) ROM_END @@ -969,7 +972,7 @@ ROM_START(torp_a16) ROM_LOAD("c5.256", 0x8000, 0x8000, CRC(3b3d754f) SHA1(c5d4a09f4daf92af78d778148377fa0d2a550761)) ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("torpef7.rom", 0x8000, 0x8000, CRC(26f4c33e) SHA1(114f85e93e7b699c4cd6ce1298f95228d439deba)) - ROM_REGION(0x40000, "sound1", 0) + ROM_REGION(0x20000, "sound1", 0) ROM_LOAD("torpef6.rom", 0x00000, 0x10000, CRC(b214a7ea) SHA1(d972148395581844e3eaed08f755f3e2217dbbc0)) ROM_LOAD("torpef4.rom", 0x10000, 0x10000, CRC(83a4e7f3) SHA1(96deac9251fe68cc0319ac009becd424c4e444c5)) ROM_END diff --git a/src/mame/drivers/de_3.cpp b/src/mame/drivers/de_3.cpp index 315d3a014c6..30ebaea5356 100644 --- a/src/mame/drivers/de_3.cpp +++ b/src/mame/drivers/de_3.cpp @@ -49,15 +49,17 @@ Status: - All pinball machines are playable ToDo: -- Checkpoint: no sound -- TMNT: no sound -- Batman: music missing - Cut the Cheese: screen goes blank after a short while - Test fixture: nothing to see *********************************************************************************************************************/ #include "emu.h" +#include "cpu/m6809/m6809.h" +#include "sound/msm5205.h" +#include "sound/ymopm.h" +#include "speaker.h" + #include "audio/decobsmt.h" #include "machine/decopincpu.h" #include "machine/genpin.h" @@ -72,6 +74,10 @@ class de_3_state : public genpin_class public: de_3_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) + , m_ym2151(*this, "ym2151") + , m_audiocpu(*this, "audiocpu") + , m_msm5205(*this, "msm5205") + , m_sample_bank(*this, "sample_bank") , m_dmdtype1(*this, "decodmd1") , m_dmdtype2(*this, "decodmd2") , m_dmdtype3(*this, "decodmd3") @@ -79,6 +85,7 @@ public: , m_io_keyboard(*this, "X%d", 0U) { } + void de_3_dmdo(machine_config &config); void de_3_dmd1(machine_config &config); void de_3_dmd2(machine_config &config); void detest(machine_config &config); @@ -90,6 +97,18 @@ protected: virtual void machine_reset() override; private: + void de_bg_audio(machine_config &config); + void audio_map(address_map &map); + DECLARE_WRITE_LINE_MEMBER(ym2151_irq_w); + DECLARE_WRITE_LINE_MEMBER(msm5205_irq_w); + uint8_t sound_latch_r(); + void sample_bank_w(uint8_t data); + void sample_w(uint8_t data); + uint8_t m_sample_data = 0U; + uint8_t m_sound_data = 0U; + bool m_more_data = 0; + bool m_nmi_enable = 0; + uint8_t switch_r(); void switch_w(uint8_t data); void pia2c_pa_w(uint8_t data); @@ -109,6 +128,10 @@ private: void de_3(machine_config &config); // devices + optional_device<ym2151_device> m_ym2151; + optional_device<cpu_device> m_audiocpu; + optional_device<msm5205_device> m_msm5205; + optional_memory_bank m_sample_bank; optional_device<decodmd_type1_device> m_dmdtype1; optional_device<decodmd_type2_device> m_dmdtype2; optional_device<decodmd_type3_device> m_dmdtype3; @@ -119,6 +142,18 @@ private: u16 m_sol = 0U; }; +void de_3_state::audio_map(address_map &map) +{ + map(0x0000, 0x1fff).ram(); + map(0x2000, 0x2001).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); + map(0x2400, 0x2400).r(FUNC(de_3_state::sound_latch_r)); + map(0x2800, 0x2800).w(FUNC(de_3_state::sample_bank_w)); + // 0x2c00 - 4052(?) + map(0x3000, 0x3000).w(FUNC(de_3_state::sample_w)); + // 0x3800 - Watchdog reset + map(0x4000, 0x7fff).bankr("sample_bank"); + map(0x8000, 0xffff).rom(); +} static INPUT_PORTS_START( de3 ) PORT_START("X0") @@ -205,8 +240,16 @@ INPUT_PORTS_END // 6821 PIA at 0x2000 void de_3_state::sound_w(uint8_t data) { - if(data != 0xfe) - m_decobsmt->bsmt_comms_w(data); + if (m_decobsmt) + { + if(data != 0xfe) + m_decobsmt->bsmt_comms_w(data); + } + if (memregion("sound1")) + { + m_sound_data = data; + m_audiocpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); + } } // 6821 PIA at 0x2400 @@ -371,6 +414,48 @@ void de_3_state::lamps_w(offs_t offset, uint8_t data) } } +WRITE_LINE_MEMBER(de_3_state::ym2151_irq_w) +{ + m_audiocpu->set_input_line(M6809_IRQ_LINE,state); +} + +WRITE_LINE_MEMBER(de_3_state::msm5205_irq_w) +{ + m_msm5205->data_w(m_sample_data >> 4); + if(m_more_data) + { + if(m_nmi_enable) + m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); // generate NMI when we need more data + m_more_data = false; + } + else + { + m_more_data = true; + m_sample_data <<= 4; + } +} + +// Sound board +void de_3_state::sample_w(uint8_t data) +{ + m_sample_data = data; +} + +uint8_t de_3_state::sound_latch_r() +{ + m_audiocpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); + return m_sound_data; +} + +void de_3_state::sample_bank_w(uint8_t data) +{ + static constexpr uint8_t prescale[4] = { msm5205_device::S96_4B, msm5205_device::S48_4B, msm5205_device::S64_4B, 0 }; + + m_sample_bank->set_entry(data & 15); + m_nmi_enable = !BIT(data, 7); + m_msm5205->playmode_w(prescale[BIT(data, 4, 2)]); + m_msm5205->reset_w(BIT(data, 6)); +} void de_3_state::machine_start() { @@ -378,11 +463,42 @@ void de_3_state::machine_start() save_item(NAME(m_row)); save_item(NAME(m_sol)); + save_item(NAME(m_nmi_enable)); + save_item(NAME(m_sample_data)); + save_item(NAME(m_more_data)); + + if (memregion("sound1")) + { + uint8_t *const ROM = memregion("sound1")->base(); + m_sample_bank->configure_entries(0, 16, &ROM[0x0000], 0x4000); + m_sample_bank->set_entry(0); + } } void de_3_state::machine_reset() { genpin_class::machine_reset(); + + if (memregion("sound1")) + m_sample_bank->set_entry(0); +} + +void de_3_state::de_bg_audio(machine_config &config) +{ + /* sound CPU */ + MC6809E(config, m_audiocpu, XTAL(8'000'000) / 4); // MC68B09E + m_audiocpu->set_addrmap(AS_PROGRAM, &de_3_state::audio_map); + + SPEAKER(config, "bg").front_center(); + + YM2151(config, m_ym2151, XTAL(3'579'545)); + m_ym2151->irq_handler().set(FUNC(de_3_state::ym2151_irq_w)); + m_ym2151->add_route(ALL_OUTPUTS, "bg", 0.40); + + MSM5205(config, m_msm5205, XTAL(384'000)); + m_msm5205->vck_legacy_callback().set(FUNC(de_3_state::msm5205_irq_w)); + m_msm5205->set_prescaler_selector(msm5205_device::S96_4B); + m_msm5205->add_route(ALL_OUTPUTS, "bg", 0.90); } void de_3_state::de_3(machine_config &config) @@ -399,20 +515,27 @@ void de_3_state::de_3(machine_config &config) decocpu.dmdstatus_read_callback().set(FUNC(de_3_state::dmd_status_r)); genpin_audio(config); - - DECOBSMT(config, m_decobsmt, 0); } void de_3_state::de_3_dmd2(machine_config &config) { de_3(config); DECODMD2(config, m_dmdtype2, 0, "dmdcpu"); + DECOBSMT(config, m_decobsmt, 0); } void de_3_state::de_3_dmd1(machine_config &config) { de_3(config); DECODMD1(config, m_dmdtype1, 0, "dmdcpu"); + DECOBSMT(config, m_decobsmt, 0); +} + +void de_3_state::de_3_dmdo(machine_config &config) +{ + de_3(config); + DECODMD1(config, m_dmdtype1, 0, "dmdcpu"); + de_bg_audio(config); } void de_3_state::de_3b(machine_config &config) @@ -430,13 +553,12 @@ void de_3_state::de_3b(machine_config &config) genpin_audio(config); + DECODMD3(config, m_dmdtype3, 0, "dmdcpu"); + /* sound hardware */ DECOBSMT(config, m_decobsmt, 0); - - DECODMD3(config, m_dmdtype3, 0, "dmdcpu"); } - void de_3_state::detest(machine_config &config) { /* basic machine hardware */ @@ -514,7 +636,7 @@ ROM_START(btmn_106) ROM_LOAD("batman.u7", 0x8000, 0x8000, CRC(b2e88bf5) SHA1(28f814ea73f8eefd1bb5499a599e67a6850c92c0)) ROM_REGION(0x1000000, "bsmt", 0) ROM_LOAD("batman.u17", 0x000000, 0x40000, CRC(b84914dd) SHA1(333d88033428705cbd0a40d70d938c0021bb0015)) - ROM_LOAD("batman.u21", 0x040000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) + ROM_LOAD("batman.u21", 0x080000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) ROM_END ROM_START(btmn_103) @@ -527,7 +649,7 @@ ROM_START(btmn_103) ROM_LOAD("batman.u7", 0x8000, 0x8000, CRC(b2e88bf5) SHA1(28f814ea73f8eefd1bb5499a599e67a6850c92c0)) ROM_REGION(0x1000000, "bsmt", 0) ROM_LOAD("batman.u17", 0x000000, 0x40000, CRC(b84914dd) SHA1(333d88033428705cbd0a40d70d938c0021bb0015)) - ROM_LOAD("batman.u21", 0x040000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) + ROM_LOAD("batman.u21", 0x080000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) ROM_END ROM_START(btmn_103f) @@ -540,7 +662,7 @@ ROM_START(btmn_103f) ROM_LOAD("batman.u7", 0x8000, 0x8000, CRC(b2e88bf5) SHA1(28f814ea73f8eefd1bb5499a599e67a6850c92c0)) ROM_REGION(0x1000000, "bsmt", 0) ROM_LOAD("batman.u17", 0x000000, 0x40000, CRC(b84914dd) SHA1(333d88033428705cbd0a40d70d938c0021bb0015)) - ROM_LOAD("batman.u21", 0x040000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) + ROM_LOAD("batman.u21", 0x080000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) ROM_END ROM_START(btmn_103g) @@ -553,7 +675,7 @@ ROM_START(btmn_103g) ROM_LOAD("batman.u7", 0x8000, 0x8000, CRC(b2e88bf5) SHA1(28f814ea73f8eefd1bb5499a599e67a6850c92c0)) ROM_REGION(0x1000000, "bsmt", 0) ROM_LOAD("batman.u17", 0x000000, 0x40000, CRC(b84914dd) SHA1(333d88033428705cbd0a40d70d938c0021bb0015)) - ROM_LOAD("batman.u21", 0x040000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) + ROM_LOAD("batman.u21", 0x080000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) ROM_END ROM_START(btmn_101) @@ -566,7 +688,7 @@ ROM_START(btmn_101) ROM_LOAD("batman.u7", 0x8000, 0x8000, CRC(b2e88bf5) SHA1(28f814ea73f8eefd1bb5499a599e67a6850c92c0)) ROM_REGION(0x1000000, "bsmt", 0) ROM_LOAD("batman.u17", 0x000000, 0x40000, CRC(b84914dd) SHA1(333d88033428705cbd0a40d70d938c0021bb0015)) - ROM_LOAD("batman.u21", 0x040000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) + ROM_LOAD("batman.u21", 0x080000, 0x20000, CRC(42dab6ac) SHA1(facf993db2ce240c9e825ca9a21ac65a0fbba188)) ROM_END /*------------------------------------------------------------ @@ -579,9 +701,9 @@ ROM_START(ckpt_a17) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("chkpntds.512", 0x00000, 0x10000, CRC(14d9c6d6) SHA1(5470a4ebe7bc4a056f75aa1fffe3a4e3e24457c6)) ROM_RELOAD(0x10000, 0x10000) - ROM_REGION(0x10000, "soundcpu", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("chkpntf7.rom", 0x8000, 0x8000, CRC(e6f6d716) SHA1(a034eb94acb174f7dbe192a55cfd00715ca85a75)) - ROM_REGION(0x1000000, "bsmt", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("chkpntf6.rom", 0x00000, 0x20000, CRC(2d08043e) SHA1(476c9945354e733bfc9a854760ca8cfa3bc62294)) ROM_LOAD("chkpntf5.rom", 0x20000, 0x20000, CRC(167daa2c) SHA1(458781726c73a09da2b8e8313e1d359cb795a744)) ROM_END @@ -1253,9 +1375,9 @@ ROM_START(tmnt_104) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("tmntdsp.104", 0x00000, 0x10000, CRC(545686b7) SHA1(713df7820d024db3406f5e171f62a53e34474f70)) ROM_RELOAD(0x10000, 0x10000) - ROM_REGION(0x10000, "soundcpu", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmntf7.rom", 0x8000, 0x8000, CRC(59ba0153) SHA1(e7b02a656c67a0d866020a60ee90e30bef77f67f)) - ROM_REGION(0x1000000, "bsmt", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("tmntf6.rom", 0x00000, 0x20000, CRC(5668d45a) SHA1(65766cb47791ec0a2243015d487f1156a2819fe6)) ROM_LOAD("tmntf4.rom", 0x20000, 0x20000, CRC(6c38cd84) SHA1(bbe8797fe1622cb8f0842c4d7159760fed080880)) ROM_END @@ -1267,9 +1389,9 @@ ROM_START(tmnt_104g) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("tmntdsp.104", 0x00000, 0x10000, CRC(545686b7) SHA1(713df7820d024db3406f5e171f62a53e34474f70)) ROM_RELOAD(0x10000, 0x10000) - ROM_REGION(0x10000, "soundcpu", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmntf7.rom", 0x8000, 0x8000, CRC(59ba0153) SHA1(e7b02a656c67a0d866020a60ee90e30bef77f67f)) - ROM_REGION(0x1000000, "bsmt", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("tmntf6.rom", 0x00000, 0x20000, CRC(5668d45a) SHA1(65766cb47791ec0a2243015d487f1156a2819fe6)) ROM_LOAD("tmntf4.rom", 0x20000, 0x20000, CRC(6c38cd84) SHA1(bbe8797fe1622cb8f0842c4d7159760fed080880)) ROM_END @@ -1281,9 +1403,9 @@ ROM_START(tmnt_103) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("tmntdsp.104", 0x00000, 0x10000, CRC(545686b7) SHA1(713df7820d024db3406f5e171f62a53e34474f70)) ROM_RELOAD(0x10000, 0x10000) - ROM_REGION(0x10000, "soundcpu", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmntf7.rom", 0x8000, 0x8000, CRC(59ba0153) SHA1(e7b02a656c67a0d866020a60ee90e30bef77f67f)) - ROM_REGION(0x1000000, "bsmt", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("tmntf6.rom", 0x00000, 0x20000, CRC(5668d45a) SHA1(65766cb47791ec0a2243015d487f1156a2819fe6)) ROM_LOAD("tmntf4.rom", 0x20000, 0x20000, CRC(6c38cd84) SHA1(bbe8797fe1622cb8f0842c4d7159760fed080880)) ROM_END @@ -1295,9 +1417,9 @@ ROM_START(tmnt_101) ROM_REGION(0x20000, "dmdcpu", 0) ROM_LOAD("tmntdspa.103", 0x00000, 0x10000, CRC(d52a7d49) SHA1(9249aafe272a052d19f1dd461708e8152516f79f)) ROM_RELOAD(0x10000, 0x10000) - ROM_REGION(0x10000, "soundcpu", 0) + ROM_REGION(0x10000, "audiocpu", 0) ROM_LOAD("tmntf7.rom", 0x8000, 0x8000, CRC(59ba0153) SHA1(e7b02a656c67a0d866020a60ee90e30bef77f67f)) - ROM_REGION(0x1000000, "bsmt", 0) + ROM_REGION(0x40000, "sound1", 0) ROM_LOAD("tmntf6.rom", 0x00000, 0x20000, CRC(5668d45a) SHA1(65766cb47791ec0a2243015d487f1156a2819fe6)) ROM_LOAD("tmntf4.rom", 0x20000, 0x20000, CRC(6c38cd84) SHA1(bbe8797fe1622cb8f0842c4d7159760fed080880)) ROM_END @@ -1826,7 +1948,7 @@ GAME(1991, btmn_103, btmn_106, de_3_dmd1, de3, de_3_state, empty_init, ROT GAME(1991, btmn_103f, btmn_106, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Batman (France 1.03, display F1.03)", MACHINE_IS_SKELETON_MECHANICAL) // BATMAN FRANCE 1.03. DISP VER: BATMAN F1.03 GAME(1991, btmn_103g, btmn_106, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Batman (Germany 1.03, display G1.04)", MACHINE_IS_SKELETON_MECHANICAL) // BATMAN GERMANY 1.03. DISP VER: BATMAN G1.04 GAME(1991, btmn_101, btmn_106, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Batman (USA 1.01, display A1.02)", MACHINE_IS_SKELETON_MECHANICAL) // BATMAN USA 1.01 -GAME(1991, ckpt_a17, 0, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Checkpoint (1.7)", MACHINE_IS_SKELETON_MECHANICAL) // CP80 3/6/91 +GAME(1991, ckpt_a17, 0, de_3_dmdo, de3, de_3_state, empty_init, ROT0, "Data East", "Checkpoint (1.7)", MACHINE_IS_SKELETON_MECHANICAL) // CP80 3/6/91 GAME(1994, gnr_300, 0, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Guns N Roses (USA 3.00, display A3.00)", MACHINE_IS_SKELETON_MECHANICAL) // GUNS-N-ROSES AUGUST 21, 1994 USA CPU 3.00. DISPLAY VERSION- GNR A3.00 AUGUST 16, 1994 GAME(1994, gnr_300f, gnr_300, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Guns N Roses (French 3.00, display F3.00)", MACHINE_IS_SKELETON_MECHANICAL) // GUNS-N-ROSES AUGUST 21, 1994 FRENCH CPU 3.00. DISPLAY VERSION- GNR F3.00 AUGUST 16, 1994 GAME(1994, gnr_300d, gnr_300, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Guns N Roses (Dutch 3.00, display A3.00)", MACHINE_IS_SKELETON_MECHANICAL) // GUNS-N-ROSES AUGUST 21, 1994 DUTCH CPU 3.00. DISPLAY VERSION- GNR A3.00 AUGUST 16, 1994 @@ -1878,10 +2000,10 @@ GAME(1993, tftc_302, tftc_303, de_3_dmd2, de3, de_3_state, empty_init, ROT GAME(1993, tftc_300, tftc_303, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Tales From the Crypt (USA 3.00, display A3.00)", MACHINE_IS_SKELETON_MECHANICAL) // TFTC DECEMBER 15, 1993 USA CPU 3.00. DISPLAY VERSION- CRYPT A3.00 12/16/1993 GAME(1993, tftc_200, tftc_303, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Tales From the Crypt (USA 2.00, display A2.00)", MACHINE_IS_SKELETON_MECHANICAL) // TFTC DECEMBER 03, 1993 USA CPU 2.00. DISPLAY VERSION- CRYPT A2.00 12/3/1993 GAME(1993, tftc_104s, tftc_303, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "Tales From the Crypt (USA 1.04, display L1.03)", MACHINE_IS_SKELETON_MECHANICAL) // TFTC NOVEMBER 19, 1993 USA CPU 1.04. DISPLAY VERSION- CRYPT L1.03 11/11/1993 -GAME(1991, tmnt_104, 0, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (USA 1.04, display A1.04)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. USA 1.04. DISPLAY VER: TMNT A1.04 -GAME(1991, tmnt_104g, tmnt_104, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (Germany 1.04, display A1.04)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. GERMANY 1.04. -GAME(1991, tmnt_103, tmnt_104, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (1.03)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. A 1.03 -GAME(1991, tmnt_101, tmnt_104, de_3_dmd1, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (1.01)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. A 1.01 +GAME(1991, tmnt_104, 0, de_3_dmdo, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (USA 1.04, display A1.04)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. USA 1.04. DISPLAY VER: TMNT A1.04 +GAME(1991, tmnt_104g, tmnt_104, de_3_dmdo, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (Germany 1.04, display A1.04)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. GERMANY 1.04. +GAME(1991, tmnt_103, tmnt_104, de_3_dmdo, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (1.03)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. A 1.03 +GAME(1991, tmnt_101, tmnt_104, de_3_dmdo, de3, de_3_state, empty_init, ROT0, "Data East", "Teenage Mutant Ninja Turtles (1.01)", MACHINE_IS_SKELETON_MECHANICAL) // T.M.N.T. A 1.01 GAME(1994, tomy_400, 0, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "The Who's Tommy Pinball Wizard (USA 4.00, display A4.00)", MACHINE_IS_SKELETON_MECHANICAL) // TOMMY APRIL 6, 1994 USA CPU 4.00. DISPLAY VERSION- TOMMY A4.00 MAY 5, 1994 GAME(1994, tomy_300h, tomy_400, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "The Who's Tommy Pinball Wizard (Dutch 3.00, display A3.00)", MACHINE_IS_SKELETON_MECHANICAL) // TOMMY FEBRUARY 16, 1994 DUTCH CPU 3.00. DISPLAY VERSION- TOMMY A3.00 FEBRUARY 15, 1994 GAME(1994, tomy_102, tomy_400, de_3_dmd2, de3, de_3_state, empty_init, ROT0, "Data East", "The Who's Tommy Pinball Wizard (USA 1.02, display A3.00)", MACHINE_IS_SKELETON_MECHANICAL) // TOMMY JANUARY 26, 1994 USA CPU 1.02. DISPLAY VERSION- TOMMY A3.00 FEBRUARY 15, 1994 diff --git a/src/mame/drivers/fidel_phantom.cpp b/src/mame/drivers/fidel_phantom.cpp index fc931593a5f..cd1f192df5c 100644 --- a/src/mame/drivers/fidel_phantom.cpp +++ b/src/mame/drivers/fidel_phantom.cpp @@ -23,17 +23,26 @@ using the same ROM as the original Chesster. Model 6124 extra hardware is on a daughterboard, the housing is the same as model 6100, except for button labels. Model 6126 has a dedicated PCB, this version also has a motion sensor at the front -and 2 leds to mimick eyes, and the housing is green instead of beige. +and 2 leds to mimick eyes, and the housing color theme is green instead of beige. -To play, wait until the motor is finished before making a move. At boot-up, the -computer will do a self-test. -After the player captures a piece, select the captured piece from the MAME sensorboard -spawn block and place it at the designated box at the edge of the chessboard. +At boot-up, the computer will do a self-test, the user can start playing after the +motor has moved to the upper-right corner. The computer will continue positioning +pieces though, so it may be a bit distracting. Or, just hold INSERT (on PC) for a +while to speed up MAME before starting a new game. + +After the user captures a piece, select the captured piece from the MAME sensorboard +spawn block and place it anywhere on a free spot at the designated box at the +edge of the chessboard. TODO: - sensorboard undo buffer goes out of control, probably not worth solving this issue - cphantom artwork should be green instead of beige -- motor position in artwork? + +BTANB: +- cphantom: As the manual suggests, the computer's move should be displayed on the + LCD while it's moving the piece just like in fphantom, but this is often too brief + or not displayed at all. (This may seem like a minor bug in the game, but it + actually makes it more difficult to write a MAME UCI plugin for this driver.) ******************************************************************************/ @@ -67,7 +76,9 @@ public: m_board(*this, "board"), m_display(*this, "display"), m_inputs(*this, "IN.%u", 0), - m_out_motor(*this, "motor.%u", 0U) + m_out_motor(*this, "motor.%u", 0U), + m_out_motorx(*this, "motorx%u", 0U), + m_out_motory(*this, "motory") { } void phantom(machine_config &config); @@ -85,6 +96,8 @@ protected: required_device<pwm_display_device> m_display; optional_ioport_array<2> m_inputs; output_finder<5> m_out_motor; + output_finder<2> m_out_motorx; + output_finder<> m_out_motory; // address maps virtual void main_map(address_map &map); @@ -117,13 +130,14 @@ protected: bool m_hmotor_sensor0_ff; bool m_hmotor_sensor1_ff; int m_piece; - bool m_piece_collision; u8 m_pieces_map[0x40][0x40]; }; void phantom_state::machine_start() { m_out_motor.resolve(); + m_out_motorx.resolve(); + m_out_motory.resolve(); // register for savestates save_item(NAME(m_mux)); @@ -137,7 +151,6 @@ void phantom_state::machine_start() save_item(NAME(m_hmotor_sensor0_ff)); save_item(NAME(m_hmotor_sensor1_ff)); save_item(NAME(m_piece)); - save_item(NAME(m_piece_collision)); save_item(NAME(m_pieces_map)); } @@ -209,7 +222,6 @@ void phantom_state::init_motors() m_hmotor_sensor0_ff = false; m_hmotor_sensor1_ff = false; m_piece = 0; - m_piece_collision = false; memset(m_pieces_map, 0, sizeof(m_pieces_map)); } @@ -238,6 +250,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(phantom_state::motors_timer) if ((m_motors_ctrl & 0x08) && m_hmotor_pos < 0xc0) m_hmotor_pos++; check_rotation(); + + // output motor position + int magnet = BIT(m_motors_ctrl, 4); + m_out_motorx[magnet ^ 1] = 0xd0; // hide + m_out_motorx[magnet] = m_hmotor_pos; + m_out_motory = m_vmotor_pos; } void phantom_state::update_pieces_position(int state) @@ -254,26 +272,30 @@ void phantom_state::update_pieces_position(int state) if (state) { - if (m_piece_collision) - m_piece_collision = valid_pos = false; - if (valid_pos) { - m_piece = m_board->read_piece(x, y); - m_board->write_piece(x, y, 0); + // check if piece was picked up by user + int pos = (y << 4 & 0xf0) | (x & 0x0f); + if (pos == m_board->get_handpos()) + m_piece = 0; + else + m_piece = m_board->read_piece(x, y); + + if (m_piece != 0) + m_board->write_piece(x, y, 0); } else m_piece = m_pieces_map[m_vmotor_pos / 4][m_hmotor_pos / 4]; m_pieces_map[m_vmotor_pos / 4][m_hmotor_pos / 4] = 0; } - else + else if (m_piece != 0) { // check for pieces collisions if (valid_pos && m_board->read_piece(x, y) != 0) { valid_pos = false; - m_piece_collision = true; + logerror("Chesspiece collision at %C%d\n", x + 'A', y + 1); } if (valid_pos) @@ -545,7 +567,7 @@ void phantom_state::phantom(machine_config &config) const attotime irq_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); // 4060, 600Hz m_maincpu->set_periodic_int(FUNC(phantom_state::irq0_line_assert), irq_period); - TIMER(config, "motors_timer").configure_periodic(FUNC(phantom_state::motors_timer), irq_period * 5); + TIMER(config, "motors_timer").configure_periodic(FUNC(phantom_state::motors_timer), irq_period * 9); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); m_board->set_size(12, 8); diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 85800d54676..60dfbda78cf 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -13301,11 +13301,11 @@ ROM_START( froggrs ) ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) ROM_END -/* Hermatic Frogger, found on a Video Dens PCB */ +// Hermatic Frogger, found on a Video Dens PCB ROM_START( froggervd ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "frogvd_r1-libro-s1.ac9", 0x0000, 0x0800, CRC(81c2020e) SHA1(8c9292b399a408795e78b7dc5c706d3b526d3751) ) // 2716 - ROM_LOAD( "frogvd_r2-libro-s2.ae9", 0x0800, 0x0800, CRC(a892ab61) SHA1(828cc04d73738ea17055c152098d592b776f4fb1) BAD_DUMP ) // 2716 (hand-patched at XX0) + ROM_LOAD( "frogvd_r2-libro-s2.ae9", 0x0800, 0x0800, CRC(a892ab61) SHA1(828cc04d73738ea17055c152098d592b776f4fb1) ) // 2716 ROM_LOAD( "frogvd_r3-libro-s3.af9", 0x1000, 0x0800, CRC(637a2ff8) SHA1(e9b9fc692ca5d8deb9cd30d9d73ad25c8d8bafe1) ) // 2716 ROM_LOAD( "frogvd_r4-libro-s4.ah9", 0x1800, 0x0800, CRC(1dc9ab15) SHA1(94b327dd2eaf0ffb19fee86a2a890a0012d52849) ) // 2716 ROM_LOAD( "frogvd_r5-libro-s5.aj9", 0x2000, 0x0800, CRC(35e11cd2) SHA1(c2d01324c052d79ad9de00d13ddc4322f9c44292) ) // 2716 @@ -13313,7 +13313,7 @@ ROM_START( froggervd ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "frogvd_r11-ot1.bc5", 0x0000, 0x0800, CRC(79326efe) SHA1(087cd61ba9c09be6ff71be8f89933a4a0f620650) ) // 2716 - ROM_LOAD( "frogvd_r12-ot2.bd5", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) BAD_DUMP ) // 2716 (hand-patched at XXe) + ROM_LOAD( "frogvd_r12-ot2.bd5", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) // 2716 ROM_LOAD( "frogvd_r13-ot3.be5", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) // 2716 ROM_REGION( 0x1000, "gfx1", 0 ) @@ -13748,11 +13748,11 @@ ROM_START( mandinka ) ROM_LOAD( "2b_sonido.bin", 0x1000, 0x1000, BAD_DUMP CRC(e8af1d77) SHA1(d05d7c015962989651a90f4bf9e64cd98c2ddd38) ) // FIXED BITS (xxx1xxxx) ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_LOAD( "9.bin", 0x0000, 0x0800, BAD_DUMP CRC(cba03b26) SHA1(9aa307db69bac1f7b14194b68ea969a547e6f92f) ) // bitrot - ROM_LOAD( "10.bin", 0x0800, 0x0800, CRC(3029f94f) SHA1(3b432b42e79f8b0a7d65e197f373a04e3c92ff20) ) + ROM_LOAD( "9.bin", 0x0000, 0x0800, CRC(2082ad0a) SHA1(c6014d9575e92adf09b0961c2158a779ebe940c4) ) + ROM_LOAD( "10.bin", 0x0800, 0x0800, CRC(3029f94f) SHA1(3b432b42e79f8b0a7d65e197f373a04e3c92ff20) ) ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "6e.bin", 0x0000, 0x0020, BAD_DUMP CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) // Not dumped on this set + ROM_LOAD( "7603-5.bin", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) ROM_END ROM_START( olmandingo ) diff --git a/src/mame/drivers/generalplus_gpl_unknown.cpp b/src/mame/drivers/generalplus_gpl_unknown.cpp index 4382a2c46ac..1420868448a 100644 --- a/src/mame/drivers/generalplus_gpl_unknown.cpp +++ b/src/mame/drivers/generalplus_gpl_unknown.cpp @@ -23,6 +23,7 @@ #include "emu.h" #include "cpu/unsp/unsp.h" +#include "machine/timer.h" #include "emupal.h" #include "screen.h" @@ -58,7 +59,34 @@ private: required_device<palette_device> m_palette; required_device<screen_device> m_screen; - required_region_ptr<uint8_t> m_spirom; + required_region_ptr<uint16_t> m_spirom; + + uint16_t reg3001_r(offs_t offset); + void reg3001_w(offs_t offset, uint16_t data); + uint16_t reg3002_r(offs_t offset); + void reg3002_w(offs_t offset, uint16_t data); + uint16_t reg3003_r(offs_t offset); + void reg3003_w(offs_t offset, uint16_t data); + uint16_t reg3004_r(offs_t offset); + uint16_t reg3005_r(offs_t offset); + void reg3005_w(offs_t offset, uint16_t data); + + void reg3034_w(offs_t offset, uint16_t data); + void reg3041_w(offs_t offset, uint16_t data); + + uint16_t reg3050_r(offs_t offset); + void reg3050_w(offs_t offset, uint16_t data); + + void reg3051_w(offs_t offset, uint16_t data); + void reg3092_w(offs_t offset, uint16_t data); + + uint16_t reg3094_r(offs_t offset); + uint16_t reg3095_r(offs_t offset); + + uint16_t reg30e4_r(offs_t offset); + uint16_t reg30e5_r(offs_t offset); + + TIMER_DEVICE_CALLBACK_MEMBER(scanline); void map(address_map &map); }; @@ -72,14 +100,160 @@ uint32_t generalplus_gpl_unknown_state::screen_update(screen_device &screen, bit static INPUT_PORTS_START( generalplus_gpl_unknown ) INPUT_PORTS_END +uint16_t generalplus_gpl_unknown_state::reg3001_r(offs_t offset) +{ + return machine().rand(); +} + +void generalplus_gpl_unknown_state::reg3001_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3001_w %04x\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg3002_r(offs_t offset) +{ + return machine().rand(); +} + +void generalplus_gpl_unknown_state::reg3002_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3002_w %04x\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg3003_r(offs_t offset) +{ + return machine().rand(); +} + +void generalplus_gpl_unknown_state::reg3003_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3003_w %04x\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg3004_r(offs_t offset) +{ + return machine().rand(); +} + +uint16_t generalplus_gpl_unknown_state::reg3005_r(offs_t offset) +{ + return machine().rand(); +} + +void generalplus_gpl_unknown_state::reg3005_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3005_w %04x\n", machine().describe_context(), data); +} + + +void generalplus_gpl_unknown_state::reg3034_w(offs_t offset, uint16_t data) +{ + // writes a lot of 0x5555 here in a block + //logerror("%s: reg3034_w %04x\n", machine().describe_context(), data); +} + +void generalplus_gpl_unknown_state::reg3041_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3041_w %04x\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg3050_r(offs_t offset) +{ + return machine().rand(); +} + +void generalplus_gpl_unknown_state::reg3050_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3050_w %04x\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg30e4_r(offs_t offset) +{ + return machine().rand(); +} + +uint16_t generalplus_gpl_unknown_state::reg30e5_r(offs_t offset) +{ + return machine().rand(); +} + +/* +mapacman vectors + +004015: 4844 - just reti + 4845 fiq - has code, acks by writing 8000 to 3051, very similar to irq0?) + 4809 boot vector + 4854 irq 0 - has code, acks by writing 8000 to 3051 + 4863 irq 1 - just acks by writing 4000 to 3051, no payload + 486A irq 2 (used - needed to pass check on value in RAM changing in boot) acks with 2000 to 3051 + 487D irq 3 (used - needed to pass check on value in RAM changing shortly after) acks with 0100 to 3051? + 4886 irq 4 - just acks by writing 10 to 3051, no payload + 488C irq 5 - push/pop/return + 488F irq 6 - push/pop/return + 4892 irq 7 - minimal payload, no 3051 ack? +*/ + +void generalplus_gpl_unknown_state::reg3051_w(offs_t offset, uint16_t data) +{ + if (data & 0x8000) + m_maincpu->set_input_line(UNSP_IRQ0_LINE, CLEAR_LINE); + + if (data & 0x2000) + m_maincpu->set_input_line(UNSP_IRQ2_LINE, CLEAR_LINE); + + if (data & 0x0100) + m_maincpu->set_input_line(UNSP_IRQ3_LINE, CLEAR_LINE); + + + logerror("%s: reg3051_w %04x (IRQ Ack?)\n", machine().describe_context(), data); +} + +void generalplus_gpl_unknown_state::reg3092_w(offs_t offset, uint16_t data) +{ + //logerror("%s: reg3092_w %04x (Video?)\n", machine().describe_context(), data); +} + +uint16_t generalplus_gpl_unknown_state::reg3094_r(offs_t offset) +{ + return machine().rand(); +} + +uint16_t generalplus_gpl_unknown_state::reg3095_r(offs_t offset) +{ + return machine().rand(); +} + void generalplus_gpl_unknown_state::map(address_map &map) { - map(0x000000, 0x000fff).ram(); // unknown, RAM? - // 1000-3fff are probably registers - map(0x004000, 0x00ffff).ram(); // internal ROM? there are jumps to this region + many fetches for jump tables etc. doesn't seem the usual unSP 8000-ffff ROM mapping + map(0x000000, 0x000fff).ram(); // RAM + //map(0x001000, 0x0017ff).ram(); // acts like open bus? + + //map(0x003000, 0x003fff).ram(); // system regs + map(0x003001, 0x003001).rw(FUNC(generalplus_gpl_unknown_state::reg3001_r), FUNC(generalplus_gpl_unknown_state::reg3001_w)); + map(0x003002, 0x003002).rw(FUNC(generalplus_gpl_unknown_state::reg3002_r), FUNC(generalplus_gpl_unknown_state::reg3002_w)); + map(0x003003, 0x003003).rw(FUNC(generalplus_gpl_unknown_state::reg3003_r), FUNC(generalplus_gpl_unknown_state::reg3003_w)); + map(0x003004, 0x003004).r(FUNC(generalplus_gpl_unknown_state::reg3004_r)); + map(0x003005, 0x003005).rw(FUNC(generalplus_gpl_unknown_state::reg3005_r), FUNC(generalplus_gpl_unknown_state::reg3005_w)); + + map(0x003034, 0x003034).w(FUNC(generalplus_gpl_unknown_state::reg3034_w)); + + map(0x003041, 0x003041).w(FUNC(generalplus_gpl_unknown_state::reg3041_w)); + + map(0x003050, 0x003050).rw(FUNC(generalplus_gpl_unknown_state::reg3050_r), FUNC(generalplus_gpl_unknown_state::reg3050_w)); + map(0x003051, 0x003051).w(FUNC(generalplus_gpl_unknown_state::reg3051_w)); + + map(0x003092, 0x003092).w(FUNC(generalplus_gpl_unknown_state::reg3092_w)); + map(0x003094, 0x003094).r(FUNC(generalplus_gpl_unknown_state::reg3094_r)); + map(0x003095, 0x003095).r(FUNC(generalplus_gpl_unknown_state::reg3095_r)); + + map(0x0030e4, 0x0030e4).r(FUNC(generalplus_gpl_unknown_state::reg30e4_r)); + map(0x0030e5, 0x0030e5).r(FUNC(generalplus_gpl_unknown_state::reg30e5_r)); + + map(0x004000, 0x00bfff).rom().region("maincpu", 0x0000); + map(0x00c000, 0x00ffff).rom().region("maincpu", 0x0000); - map(0x200000, 0x3fffff).ram(); // almost certainly RAM where the SPI ROM gets copied (or just ROM if it can execute directly from SPI here) + map(0x200000, 0x3fffff).rom().region("spi", 0x0000); // has direct access to SPI ROM } @@ -89,28 +263,41 @@ void generalplus_gpl_unknown_state::machine_start() void generalplus_gpl_unknown_state::machine_reset() { - address_space& mem = m_maincpu->space(AS_PROGRAM); - for (int j = 0; j < 0x200000/2; j++) +} + +// hack just so we can trigger some IRQs until sources are known +TIMER_DEVICE_CALLBACK_MEMBER(generalplus_gpl_unknown_state::scanline) +{ + int scanline = param; + + if (scanline == 50) { - uint16_t data = (m_spirom[(j*2)+1] << 8) | (m_spirom[(j*2)+0]); - mem.write_word(0x200000+j, data); + m_maincpu->set_input_line(UNSP_IRQ2_LINE, ASSERT_LINE); } - m_maincpu->set_state_int(UNSP_PC, 0x1000); // this is not the boot code, everything in the SPI ROM seems like relatively small functions (that never touch internal registers) only the very last one in SPI ROM has no callers from in the SPI ROM code - m_maincpu->set_state_int(UNSP_SR, 0x0020); + if (scanline == 90) + { + m_maincpu->set_input_line(UNSP_IRQ0_LINE, ASSERT_LINE); + } + + if (scanline == 126) + { + m_maincpu->set_input_line(UNSP_IRQ3_LINE, ASSERT_LINE); + } } void generalplus_gpl_unknown_state::generalplus_gpl_unknown(machine_config &config) { - - UNSP_12(config, m_maincpu, 96000000); // unknown CPU, no unSP2.0 opcodes? + UNSP_20(config, m_maincpu, 96000000); // internal ROM uses unsp2.0 opcodes, unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &generalplus_gpl_unknown_state::map); + m_maincpu->set_vectorbase(0x4010); // there is also a set of vectors for what looks to be a burn-in test at 4000, maybe external pin selects? + TIMER(config, "scantimer").configure_scanline(FUNC(generalplus_gpl_unknown_state::scanline), "screen", 0, 1); - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + SCREEN(config, m_screen, SCREEN_TYPE_LCD); m_screen->set_refresh_hz(60); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(10)); - m_screen->set_size(64*8, 32*8); - m_screen->set_visarea(0*8, 320-1, 0*8, 240-1); // not the correct resolution + m_screen->set_size(128, 128); + m_screen->set_visarea(0, 128-1, 0, 128-1); // not the correct resolution m_screen->set_screen_update(FUNC(generalplus_gpl_unknown_state::screen_update)); //m_screen->screen_vblank().set(FUNC(generalplus_gpl_unknown_state::screen_vblank)); @@ -118,44 +305,44 @@ void generalplus_gpl_unknown_state::generalplus_gpl_unknown(machine_config &conf } -ROM_START( mapacman ) - ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD16_WORD_SWAP( "internal.rom", 0x000000, 0x18000, NO_DUMP ) +ROM_START( mapacman ) // this is the single game (no games hidden behind solder pads) release + ROM_REGION16_BE( 0x18000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "mapacman_internal.rom", 0x000000, 0x10000, CRC(9ea69d2a) SHA1(17f5001794f4454bf5856cfa170834509d68bed0) ) - ROM_REGION( 0x800000, "spi", ROMREGION_ERASEFF ) - ROM_LOAD( "fm25q16a.bin", 0x000000, 0x200000, CRC(aeb472ac) SHA1(500c24b725f6d3308ef8cbdf4259f5be556c7c92) ) + ROM_REGION16_BE( 0x800000, "spi", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "fm25q16a.bin", 0x000000, 0x200000, CRC(aeb472ac) SHA1(500c24b725f6d3308ef8cbdf4259f5be556c7c92) ) ROM_END ROM_START( taspinv ) - ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION16_BE( 0x18000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_WORD_SWAP( "internal.rom", 0x000000, 0x18000, NO_DUMP ) - ROM_REGION( 0x800000, "spi", ROMREGION_ERASEFF ) - ROM_LOAD( "tinyarcade_spaceinvaders.bin", 0x000000, 0x200000, CRC(11ac4c77) SHA1(398d5eff83a4e94487ed810819085a0e44582908) ) + ROM_REGION16_BE( 0x800000, "spi", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "tinyarcade_spaceinvaders.bin", 0x000000, 0x200000, CRC(11ac4c77) SHA1(398d5eff83a4e94487ed810819085a0e44582908) ) ROM_END ROM_START( tagalaga ) - ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION16_BE( 0x18000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_WORD_SWAP( "internal.rom", 0x000000, 0x18000, NO_DUMP ) - ROM_REGION( 0x800000, "spi", ROMREGION_ERASEFF ) - ROM_LOAD( "tinyarcadegalaga_fm25q16a_a14015.bin", 0x000000, 0x200000, CRC(2a91460c) SHA1(ce297642d2d51ce568e93c0c57432446633b2077) ) + ROM_REGION16_BE( 0x800000, "spi", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "tinyarcadegalaga_fm25q16a_a14015.bin", 0x000000, 0x200000, CRC(2a91460c) SHA1(ce297642d2d51ce568e93c0c57432446633b2077) ) ROM_END ROM_START( parcade ) - ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION16_BE( 0x18000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_WORD_SWAP( "internal.rom", 0x000000, 0x18000, NO_DUMP ) - ROM_REGION( 0x800000, "spi", ROMREGION_ERASEFF ) - ROM_LOAD( "palacearcade_gpr25l3203_c22016.bin", 0x000000, 0x400000, CRC(98fbd2a1) SHA1(ffc19aadd53ead1f9f3472475606941055ca09f9) ) + ROM_REGION16_BE( 0x800000, "spi", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "palacearcade_gpr25l3203_c22016.bin", 0x000000, 0x400000, CRC(98fbd2a1) SHA1(ffc19aadd53ead1f9f3472475606941055ca09f9) ) ROM_END ROM_START( taturtf ) - ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION16_BE( 0x18000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_WORD_SWAP( "internal.rom", 0x000000, 0x18000, NO_DUMP ) - ROM_REGION( 0x800000, "spi", ROMREGION_ERASEFF ) - ROM_LOAD( "tinyarcadeturtlefighter_25q32bst16_684016.bin", 0x000000, 0x400000, CRC(8e046f2d) SHA1(e48492cf953f22a47fa2b88a8f96a1e459b8c487) ) + ROM_REGION16_BE( 0x800000, "spi", ROMREGION_ERASEFF ) + ROM_LOAD16_WORD_SWAP( "tinyarcadeturtlefighter_25q32bst16_684016.bin", 0x000000, 0x400000, CRC(8e046f2d) SHA1(e48492cf953f22a47fa2b88a8f96a1e459b8c487) ) ROM_END diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index b8983aa1175..4264a0a52d6 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -1544,7 +1544,7 @@ u8 mdallas_state::read_in() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: < ON> [YES] [NO] [NEXT] [<W] [^N] [Sv] [E>] diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index 0c69858ca4a..b4314ce5354 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -449,7 +449,7 @@ u8 bmboxing_state::input_r() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: * left = P2 side * * right = P1 side * @@ -3774,7 +3774,7 @@ u8 mwcbaseb_state::input_r() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (visitor team side) (home team side) COMP PITCH [SCORE] [INNING] diff --git a/src/mame/drivers/hh_pps41.cpp b/src/mame/drivers/hh_pps41.cpp index c17c79e9973..4c8b70ec97d 100644 --- a/src/mame/drivers/hh_pps41.cpp +++ b/src/mame/drivers/hh_pps41.cpp @@ -988,7 +988,7 @@ void horocomp_state::write_spk(u8 data) // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: CAP. AQU. [ ] SAG. @@ -1197,7 +1197,7 @@ void mwcfootb_state::sub_write_r(u16 data) // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (home team side) (visitor team side) [1] RECEIVERS [2] [1] RECEIVERS [2] diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index f7eb6717a7f..bcd6014c6ed 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -53,11 +53,11 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm @MP1204 TMS1100 1980, Entex Baseball 3 (6007) *MP1209 TMS1100 1980, U.S. Games Space Cruiser/Strategy Football @MP1211 TMS1100 1980, Entex Space Invader (6012) - *MP1215 TMS1100 1980, Tiger Playmaker + @MP1215 TMS1100 1980, Tiger Playmaker @MP1218 TMS1100 1980, Entex Basketball 2 (6010) @MP1219 TMS1100 1980, U.S. Games Super Sports-4 @MP1221 TMS1100 1980, Entex Raise The Devil (6011) - *MP1231 TMS1100 1983, Tandy 3-in-1 Sports Arena (model 60-2178) + @MP1231 TMS1100 1984, Tandy 3 in 1 Sports Arena (model 60-2178) @MP1296 TMS1100 1982, Entex Black Knight Pinball (6081) *MP1311 TMS1100 1981, Bandai TC7: Air Traffic Control @MP1312 TMS1100 1983, Gakken FX-Micom R-165/Radio Shack Science Fair Microcomputer Trainer @@ -125,7 +125,7 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm *MP6354 ? 1982, Tsukuda The Dracula (? note: 40-pin, VFD-capable) *MP6361 ? 1983, Defender Strikes (? note: VFD-capable) @MP7302 TMS1400 1980, Tiger Deluxe Football with Instant Replay - @MP7304 TMS1400 1980, Tiger 7 in 1 Sports Stadium (model 7-555) + @MP7304 TMS1400 1982, Tiger 7 in 1 Sports Stadium (model 7-555) @MP7313 TMS1400 1980, Parker Brothers Bank Shot @MP7314 TMS1400 1980, Parker Brothers Split Second MP7324 TMS1400 1985, Tiger K28/Coleco Talking Teacher -> tispeak.cpp @@ -172,7 +172,7 @@ TODO: but not for newer ones (rev. E or TMS1400 MCUs). TMS0970/0980 osc. is on-die. - fake-press ON button when emulation starts for machines that have it on the button matrix (doesn't look like any relies on it though) -- 7in1ss: in 2-player mode, game select and skill select can be configured after selecting a game? +- t7in1ss: in 2-player mode, game select and skill select can be configured after selecting a game? Possibly BTANB, players are expected to quickly press the "First Up" button after the alarm sound. - bship discrete sound, netlist is documented - finish bshipb SN76477 sound @@ -202,7 +202,7 @@ TODO: #include "speaker.h" // internal artwork -#include "7in1ss.lh" +#include "t7in1ss.lh" #include "alphie.lh" #include "amaztron.lh" // clickable #include "arcmania.lh" // clickable @@ -261,6 +261,7 @@ TODO: #include "palmmd8.lh" #include "pbmastm.lh" #include "phpball.lh" +#include "playmaker.lh" #include "qfire.lh" // clickable #include "quizwizc.lh" #include "raisedvl.lh" @@ -272,6 +273,7 @@ TODO: #include "starwbc.lh" // clickable #include "stopthief.lh" // clickable #include "subwars.lh" +#include "t3in1sa.lh" #include "tandy12.lh" // clickable #include "tbreakup.lh" #include "tc4.lh" @@ -743,7 +745,7 @@ u8 mathmagi_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: ON ONE [SEL] [NXT] [?] [/] | | [7] [8] [9] [x] @@ -1529,6 +1531,7 @@ the letter buttons from it, the 8-character encoding for date input uses letters and digits in combination. This fact and the use of the P key are why the digit buttons are mapped here as keyboard inputs rather than as a keypad. + */ static INPUT_PORTS_START( zodiac ) @@ -2381,8 +2384,7 @@ class quizwizc_state : public hh_tms1k_state { public: quizwizc_state(const machine_config &mconfig, device_type type, const char *tag) : - hh_tms1k_state(mconfig, type, tag), - m_pinout(0) + hh_tms1k_state(mconfig, type, tag) { } void quizwizc(machine_config &config); @@ -2392,7 +2394,7 @@ protected: private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - u16 m_pinout; // cartridge R pins + u16 m_pinout = 0x07; // cartridge R pins void update_display(); void write_r(u16 data); @@ -2419,10 +2421,16 @@ DEVICE_IMAGE_LOAD_MEMBER(quizwizc_state::cart_load) } // get cartridge pinout K1 to R connections - std::string pinout(image.get_feature("pinout")); - m_pinout = std::stoul(pinout, nullptr, 2) & 0xe7; + const char *pinout = image.get_feature("pinout"); + m_pinout = pinout ? strtoul(pinout, nullptr, 2) & 0xe7 : 0; m_pinout = bitswap<8>(m_pinout,4,3,7,5,2,1,6,0) << 4; + if (m_pinout == 0) + { + image.seterror(image_error::INVALIDIMAGE, "Invalid cartridge pinout"); + return image_init_result::FAIL; + } + return image_init_result::PASS; } @@ -2571,8 +2579,7 @@ class tc4_state : public hh_tms1k_state { public: tc4_state(const machine_config &mconfig, device_type type, const char *tag) : - hh_tms1k_state(mconfig, type, tag), - m_pinout(0) + hh_tms1k_state(mconfig, type, tag) { } void tc4(machine_config &config); @@ -2582,7 +2589,7 @@ protected: private: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); - u8 m_pinout; // cartridge K pins + u8 m_pinout = 0xf; // cartridge K pins void update_display(); void write_r(u16 data); @@ -2609,8 +2616,8 @@ DEVICE_IMAGE_LOAD_MEMBER(tc4_state::cart_load) } // get cartridge pinout R9 to K connections - std::string pinout(image.get_feature("pinout")); - m_pinout = std::stoul(pinout, nullptr, 0) & 0xf; + const char *pinout = image.get_feature("pinout"); + m_pinout = pinout ? strtoul(pinout, nullptr, 0) & 0xf : 0xf; return image_init_result::PASS; } @@ -3535,7 +3542,7 @@ ROM_END /*************************************************************************** Entex (Electronic) Soccer - * TMS1000NL MP0158 (die label same) + * TMS1000NL MP0158 (die label 1000B, MP0158) * 2 7seg LEDs, 30 other LEDs, 1-bit sound known releases: @@ -3599,14 +3606,14 @@ u8 esoccer_state::read_k() static INPUT_PORTS_START( esoccer ) PORT_START("IN.0") // R0 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_START("IN.1") // R1 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY PORT_START("IN.2") // R2 @@ -3620,7 +3627,7 @@ INPUT_PORTS_END void esoccer_state::esoccer(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=33pF + TMS1000(config, m_maincpu, 475000); // approximation - RC osc. R=47K, C=33pF m_maincpu->k().set(FUNC(esoccer_state::read_k)); m_maincpu->r().set(FUNC(esoccer_state::write_r)); m_maincpu->o().set(FUNC(esoccer_state::write_o)); @@ -3628,7 +3635,7 @@ void esoccer_state::esoccer(machine_config &config) // video hardware PWM_DISPLAY(config, m_display).set_size(10, 7); m_display->set_segmask(0x300, 0x7f); - m_display->set_bri_levels(0.01, 0.1); // player led is brighter + m_display->set_bri_levels(0.008, 0.08); // player led is brighter config.set_default_layout(layout_esoccer); // sound hardware @@ -4050,7 +4057,7 @@ u8 ebball3_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: main device (batter side): remote pitcher: @@ -4219,7 +4226,7 @@ INPUT_PORTS_END void esbattle_state::esbattle(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=33pF + TMS1000(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=33pF m_maincpu->k().set(FUNC(esbattle_state::read_k)); m_maincpu->r().set(FUNC(esbattle_state::write_r)); m_maincpu->o().set(FUNC(esbattle_state::write_o)); @@ -5242,8 +5249,6 @@ public: void gpoker(machine_config &config); protected: - virtual void machine_reset() override; - required_device<beep_device> m_beeper; void update_display(); @@ -5252,12 +5257,6 @@ protected: virtual u8 read_k(); }; -void gpoker_state::machine_reset() -{ - hh_tms1k_state::machine_reset(); - m_beeper->set_state(0); -} - // handlers void gpoker_state::update_display() @@ -5295,7 +5294,7 @@ u8 gpoker_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [7] [8] [9] [DL] | (on/off switch) [4] [5] [6] [BT] @@ -5418,7 +5417,7 @@ void gjackpot_state::write_r(u16 data) // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (note: on dual-function buttons, upper label=Gin, lower label=Black Jack) BJ --o GIN @@ -5981,7 +5980,7 @@ u8 fxmcr165_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [C] [D] [E] [F] [ADR SET] [8] [9] [A] [B] [INCR] @@ -6115,7 +6114,7 @@ u8 elecdet_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [1] [2] [3] [SUSPECT] [4] [5] [6] [PRIVATE QUESTION] @@ -6268,7 +6267,7 @@ u8 starwbc_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (reconnnaissance=yellow) (tactical reaction=green) [MAGNA] [ENEMY] [EM] [BS] [SCR] @@ -6732,7 +6731,7 @@ u8 horseran_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [PURSE] [DIST.] [P. POSN.] [DAYS] [R.S.L.] [7] [8] [9] [RACES] [WINS] [PLACES] [SHOWS] [EARNINGS] [4] [5] [6] @@ -7854,7 +7853,7 @@ u8 bigtrak_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: USA version: UK version: @@ -8118,7 +8117,7 @@ u8 mbdtower_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (green) (l.blue) (red) [YES/ [REPEAT] [NO/ @@ -8248,7 +8247,7 @@ u8 arcmania_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (orange) (orange) (orange) [1] [2] [3] @@ -8371,7 +8370,7 @@ u8 cnsector_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: COMBAT INFORMATION CENTER [NEXT SHIP] [RECALL] [MOVE SHIP] @@ -8834,7 +8833,7 @@ u8 stopthief_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [1] [2] [OFF] [3] [4] [ON] @@ -8993,7 +8992,7 @@ u8 bankshot_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (note: remember that you can rotate the display in MAME) [SELECT [BALL UP] [BALL OVER] @@ -9240,7 +9239,7 @@ u8 lostreas_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: (note: Canadian version differs slightly to accomodoate dual-language) [N-S(gold)] [1] [2] [3] [AIR] @@ -9654,12 +9653,14 @@ ROM_END /*************************************************************************** - Tandy Computerized Arcade (1981, 1982, 1995) + Tandy Computerized Arcade (model 60-2159 or 60-2159A) * TMS1100 MCU, label CD7282SL * 12 lamps behind buttons, 1-bit sound known releases: - World: Tandy-12: Computerized Arcade, published by Tandy + - World: Computerized Arcade, published by Tandy, Radio Shack brand. + This one is model 60-2495 from the mid-90s, perhaps different hardware! - Mexico: Fabuloso Fred, published by Ensueño Toys (also released as 9-button version, a clone of Mego Fabulous Fred) @@ -9730,7 +9731,7 @@ u8 tandy12_state::read_k() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: REPEAT-2 SPACE-2 [O] OFF--ON [O] @@ -9956,6 +9957,172 @@ ROM_END /*************************************************************************** + Tandy 3 in 1 Sports Arena (model 60-2178) + * TMS1100 (just a datestamp label (8331), die label 1100B MP1231) + * 2x2-digit 7seg LED display + 47 other LEDs, 1-bit sound + + For Tandy Sports Arena (model 60-2158), see cmsport, this is a different game. + This version is very similar to ssports4 released a few years earlier. + + 3 overlays were included for the games (Tandy calls them graphic sheets), + MAME external artwork is needed for those. + + It is always in 2-player head-to-head mode, the Player switch is just meant + for allowing the other player to have full control over 2 defense spots. + +***************************************************************************/ + +class t3in1sa_state : public hh_tms1k_state +{ +public: + t3in1sa_state(const machine_config &mconfig, device_type type, const char *tag) : + hh_tms1k_state(mconfig, type, tag) + { } + + void t3in1sa(machine_config &config); + +private: + void update_display(); + void write_r(u16 data); + void write_o(u16 data); + u8 read_k(); +}; + +// handlers + +void t3in1sa_state::update_display() +{ + m_display->matrix(m_r, m_o | (m_r << 6 & 0x100)); +} + +void t3in1sa_state::write_r(u16 data) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R0,R1,R5,R7-R9: input mux + m_inp_mux = (data & 3) | (data >> 3 & 4) | (data >> 4 & 0x38); + + // R2: led data high + // R3-R7: led select + // R0,R1,R8,R9: digit select + m_r = data; + update_display(); +} + +void t3in1sa_state::write_o(u16 data) +{ + // O0-O7: led data low + m_o = data; + update_display(); +} + +u8 t3in1sa_state::read_k() +{ + // K: multiplexed inputs + return read_inputs(6); +} + +// config + +/* physical button layout and labels are like this: + + ↑ + [ ] [ ] [ ] + TEAM-MATE PASS + ←[ ] [ ]→ shoot + ↗ ↖ + [ ] [ ] [ ] + STATUS ↓ KICK + pass + shoot + +Game and difficulty switches are under the yellow buttons, +player switch is under the red buttons. P1 is yellow, P2 is red. + +*/ + +static INPUT_PORTS_START( t3in1sa ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + + PORT_START("IN.2") // R5 + PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x00, "1" ) // AMATEUR + PORT_CONFSETTING( 0x01, "2" ) // PRO + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_CONFNAME( 0x08, 0x08, DEF_STR( Players ) ) + PORT_CONFSETTING( 0x08, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + + PORT_START("IN.3") // R7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_CONFNAME( 0x0e, 0x08, "Game Select" ) + PORT_CONFSETTING( 0x08, "Football" ) // F + PORT_CONFSETTING( 0x04, "Basketball" ) // B + PORT_CONFSETTING( 0x02, "Soccer" ) // S + + PORT_START("IN.4") // R8 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Up-Left / Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Up-Right / Status") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pass / Shoot") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Team-Mate") + + PORT_START("IN.5") // R9 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL PORT_NAME("P2 Up-Left / Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("P2 Up-Right / Status") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Pass / Shoot") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Team-Mate") +INPUT_PORTS_END + +void t3in1sa_state::t3in1sa(machine_config &config) +{ + // basic machine hardware + TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(t3in1sa_state::read_k)); + m_maincpu->r().set(FUNC(t3in1sa_state::write_r)); + m_maincpu->o().set(FUNC(t3in1sa_state::write_o)); + + // video hardware + PWM_DISPLAY(config, m_display).set_size(10, 9); + m_display->set_segmask(0x303, 0x7f); + m_display->set_bri_levels(0.005, 0.05); // offense leds are brighter + config.set_default_layout(layout_t3in1sa); + + // sound hardware + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, m_speaker); + m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); +} + +// roms + +ROM_START( t3in1sa ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1231", 0x0000, 0x0800, CRC(1c24e5c2) SHA1(0b6c2edea27eba15e890d82475b91a5e9ef6c4b9) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_t3in1sa_output.pla", 0, 365, CRC(de82a294) SHA1(7187666a510919b90798b92b9104ac5d6820d559) ) +ROM_END + + + + + +/*************************************************************************** + Telesensory Systems, Inc.(TSI) Speech+ * TMS1000 MCU, label TMS1007NL (die label 1000B, 1007A) * TSI S14001A speech chip, GI S14007-A 2KB maskrom for samples @@ -12316,127 +12483,162 @@ ROM_END /*************************************************************************** - Tiger Deluxe Football (model 7-550) - * TMS1400NLL MP7302 (die label TMS1400 MP7302) - * 4-digit 7seg LED display, 80 red/green LEDs, 1-bit sound + Tiger Playmaker: Hockey, Soccer, Basketball (model 7-540 or 7-540A) + * TMS1100 MP1215 (die label 1100B MP1215) + * 2-digit 7seg LED display + 40 other LEDs, 1-bit sound - According to the manual, player 1 is green, player 2 is red. But when - playing a 1-player game, the CPU controls green, so on MAME, player 1 - is the red side. + The games are on playcards(Tiger calls them that), the hardware detects which + game is inserted from a notch at the lower-right. The playcards also function + as an overlay. MAME external artwork is needed for those. + + Booting the handheld with no playcard inserted will initiate a halftime show. + + "Playmaker" is actually Tiger's trademark for the d-pad controller, this + controller term was also used in for example Deluxe Football, and 7 in 1 Sports + Stadium. The d-pad has a ball shape at the bottom that sits on a concave base. + It is patented under US4256931 (mid-1979, a couple of years before Nintendo's + Game & Watch d-pad with US4687200). ***************************************************************************/ -class dxfootb_state : public hh_tms1k_state +class playmaker_state : public hh_tms1k_state { public: - dxfootb_state(const machine_config &mconfig, device_type type, const char *tag) : + playmaker_state(const machine_config &mconfig, device_type type, const char *tag) : hh_tms1k_state(mconfig, type, tag) { } - void dxfootb(machine_config &config); + void playmaker(machine_config &config); + +protected: + virtual void machine_start() override; private: + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); + u8 m_notch = 0; // cartridge K1/K2 + void update_display(); void write_r(u16 data); void write_o(u16 data); u8 read_k(); }; +void playmaker_state::machine_start() +{ + hh_tms1k_state::machine_start(); + + // register for savestates + save_item(NAME(m_notch)); +} + // handlers -void dxfootb_state::update_display() +DEVICE_IMAGE_LOAD_MEMBER(playmaker_state::cart_load) { - // 2 led groups (double multiplexed) - u16 g1 = (m_r & 0x100) ? 0x7f : 0; - u16 g2 = (m_r & 0x80) ? 0x7f << 7 : 0; - m_display->matrix((m_r & g1) | (m_r << 7 & g2), m_o); + if (!image.loaded_through_softlist()) + { + image.seterror(image_error::UNSUPPORTED, "Can only load through softwarelist"); + return image_init_result::FAIL; + } + + // get cartridge notch + const char *notch = image.get_feature("notch"); + m_notch = notch ? strtoul(notch, nullptr, 0) & 3 : 0; + + return image_init_result::PASS; } -void dxfootb_state::write_r(u16 data) +void playmaker_state::update_display() { - // R9,R10: speaker out - m_speaker->level_w(data >> 9 & 3); + m_display->matrix(m_r, m_o); +} - // R3-R6: input mux - m_inp_mux = data >> 3 & 0xf; +void playmaker_state::write_r(u16 data) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); - // R0-R6: led select - // R7,R8: group select + // R0-R3: input mux + m_inp_mux = data & 0xf; + + // R0-R7: led select + // R8,R9: digit select m_r = data; update_display(); } -void dxfootb_state::write_o(u16 data) +void playmaker_state::write_o(u16 data) { - // O0-O7: led data + // O0-O6: led data m_o = data; update_display(); } -u8 dxfootb_state::read_k() +u8 playmaker_state::read_k() { - // K: multiplexed inputs - return read_inputs(4); + // K: multiplexed inputs, cartridge notch from R3 + return read_inputs(3) | ((m_inp_mux & 8) ? m_notch : 0); } // config -static INPUT_PORTS_START( dxfootb ) - PORT_START("IN.0") // R3 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Replay / Skill (Green)") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Score / Skill (Red)") - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("IN.1") // R4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) +static INPUT_PORTS_START( playmaker ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) - PORT_START("IN.2") // R5 + PORT_START("IN.1") // R1 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL - PORT_START("IN.3") // R6 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Shoot") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Pass") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Shoot / P1 Skill") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pass / P2 Skill") INPUT_PORTS_END -void dxfootb_state::dxfootb(machine_config &config) +void playmaker_state::playmaker(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=47pF - m_maincpu->k().set(FUNC(dxfootb_state::read_k)); - m_maincpu->r().set(FUNC(dxfootb_state::write_r)); - m_maincpu->o().set(FUNC(dxfootb_state::write_o)); + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=20K, C=250pF + m_maincpu->k().set(FUNC(playmaker_state::read_k)); + m_maincpu->r().set(FUNC(playmaker_state::write_r)); + m_maincpu->o().set(FUNC(playmaker_state::write_o)); // video hardware - PWM_DISPLAY(config, m_display).set_size(7+7, 8); - m_display->set_segmask(0x3c00, 0x7f); - config.set_default_layout(layout_dxfootb); + PWM_DISPLAY(config, m_display).set_size(10, 7); + m_display->set_segmask(0x300, 0x7f); + m_display->set_bri_levels(0.004, 0.04); // player 1 leds are brighter + config.set_default_layout(layout_playmaker); // sound hardware SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker); - static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0 }; - m_speaker->set_levels(4, speaker_levels); m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); + + // cartridge + generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "playmaker_cart")); + cartslot.set_must_be_loaded(false); + cartslot.set_device_load(FUNC(playmaker_state::cart_load)); + + SOFTWARE_LIST(config, "cart_list").set_original("playmaker"); } // roms -ROM_START( dxfootb ) - ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "mp7302", 0x0000, 0x1000, CRC(a8077062) SHA1(c1318fe5c8f2db021d7d1264fc70158944045fa3) ) +ROM_START( playmaker ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1215", 0x0000, 0x0800, CRC(bfc7b6c8) SHA1(33f6e2b86fae2fd9e4b0a4b8dc842c257ca3047d) ) ROM_REGION( 867, "maincpu:mpla", 0 ) ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) - ROM_REGION( 557, "maincpu:opla", 0 ) - ROM_LOAD( "tms1400_dxfootb_output.pla", 0, 557, CRC(a1b3d2c0) SHA1(8030e6dcd3878b58668c98cff36d93b764e1d67f) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_playmaker_output.pla", 0, 365, CRC(0cd484d6) SHA1(4a9af9f3d18af504145690cb0f6444ff1aef26ca) ) ROM_END @@ -12445,28 +12647,27 @@ ROM_END /*************************************************************************** - Tiger 7 in 1 Sports Stadium (model 7-555) - * TMS1400 MP7304 (die label TMS1400 MP7304A) - * 2x2-digit 7seg LED display + 39 other LEDs, 1-bit sound + Tiger Deluxe Football with Instant Replay (model 7-550) + * TMS1400NLL MP7302 (die label TMS1400 MP7302) + * 4-digit 7seg LED display, 80 red/green LEDs, 1-bit sound - This handheld includes 7 games: 1: Basketball, 2: Hockey, 3: Soccer, - 4: Maze, 5: Baseball, 6: Football, 7: Raquetball. - MAME external artwork is needed for the switchable overlays. + According to the manual, player 1 is green, player 2 is red. But when + playing a 1-player game, the CPU controls green, so on MAME, player 1 + is the red side. - known releases: - - World: 7 in 1 Sports Stadium, published by Tiger - - USA: 7 in 1 Sports, published by Sears + Booting the handheld with the Score and Replay buttons held down will + initiate a halftime show. ***************************************************************************/ -class ss7in1_state : public hh_tms1k_state +class dxfootb_state : public hh_tms1k_state { public: - ss7in1_state(const machine_config &mconfig, device_type type, const char *tag) : + dxfootb_state(const machine_config &mconfig, device_type type, const char *tag) : hh_tms1k_state(mconfig, type, tag) { } - void ss7in1(machine_config &config); + void dxfootb(machine_config &config); private: void update_display(); @@ -12477,33 +12678,36 @@ private: // handlers -void ss7in1_state::update_display() +void dxfootb_state::update_display() { - m_display->matrix(m_r, m_o); + // 2 led groups (double multiplexed) + u16 g1 = (m_r & 0x100) ? 0x7f : 0; + u16 g2 = (m_r & 0x80) ? 0x7f << 7 : 0; + m_display->matrix((m_r & g1) | (m_r << 7 & g2), m_o); } -void ss7in1_state::write_r(u16 data) +void dxfootb_state::write_r(u16 data) { - // R9: speaker out - m_speaker->level_w(data >> 9 & 1); + // R9,R10: speaker out + m_speaker->level_w(data >> 9 & 3); - // R0-R2,R10: input mux - m_inp_mux = (data & 7) | (data >> 7 & 8); + // R3-R6: input mux + m_inp_mux = data >> 3 & 0xf; - // R0-R3: digit select - // R4-R8: led select + // R0-R6: led select + // R7,R8: group select m_r = data; update_display(); } -void ss7in1_state::write_o(u16 data) +void dxfootb_state::write_o(u16 data) { // O0-O7: led data m_o = data; update_display(); } -u8 ss7in1_state::read_k() +u8 dxfootb_state::read_k() { // K: multiplexed inputs return read_inputs(4); @@ -12511,63 +12715,62 @@ u8 ss7in1_state::read_k() // config -static INPUT_PORTS_START( ss7in1 ) - PORT_START("IN.0") // R0 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL +static INPUT_PORTS_START( dxfootb ) + PORT_START("IN.0") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Replay / Skill (Green)") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Score / Skill (Red)") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN.1") // R1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_START("IN.1") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Pass") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Kick") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pass") - PORT_START("IN.2") // R2 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_START("IN.2") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL - PORT_START("IN.3") // R10 - PORT_CONFNAME( 0x01, 0x00, DEF_STR( Players ) ) - PORT_CONFSETTING( 0x00, "1" ) - PORT_CONFSETTING( 0x01, "2" ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("IN.3") // R6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) INPUT_PORTS_END -void ss7in1_state::ss7in1(machine_config &config) +void dxfootb_state::dxfootb(machine_config &config) { // basic machine hardware TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=47pF - m_maincpu->k().set(FUNC(ss7in1_state::read_k)); - m_maincpu->r().set(FUNC(ss7in1_state::write_r)); - m_maincpu->o().set(FUNC(ss7in1_state::write_o)); + m_maincpu->k().set(FUNC(dxfootb_state::read_k)); + m_maincpu->r().set(FUNC(dxfootb_state::write_r)); + m_maincpu->o().set(FUNC(dxfootb_state::write_o)); // video hardware - PWM_DISPLAY(config, m_display).set_size(9, 8); - m_display->set_segmask(0xf, 0x7f); - m_display->set_bri_levels(0.01, 0.04); // player led is brighter - config.set_default_layout(layout_7in1ss); + PWM_DISPLAY(config, m_display).set_size(7+7, 8); + m_display->set_segmask(0x3c00, 0x7f); + config.set_default_layout(layout_dxfootb); // sound hardware SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker); + static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0 }; + m_speaker->set_levels(4, speaker_levels); m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); } // roms -ROM_START( 7in1ss ) +ROM_START( dxfootb ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "mp7304", 0x0000, 0x1000, CRC(2a1c8390) SHA1(fa10e60686af6828a61f05046abc3854ab49af95) ) + ROM_LOAD( "mp7302", 0x0000, 0x1000, CRC(a8077062) SHA1(c1318fe5c8f2db021d7d1264fc70158944045fa3) ) ROM_REGION( 867, "maincpu:mpla", 0 ) ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) ROM_REGION( 557, "maincpu:opla", 0 ) - ROM_LOAD( "tms1400_7in1ss_output.pla", 0, 557, CRC(6b7660f7) SHA1(bb7d58fa04e7606ccdf5b209e1b089948bdd1e7c) ) + ROM_LOAD( "tms1400_dxfootb_output.pla", 0, 557, CRC(a1b3d2c0) SHA1(8030e6dcd3878b58668c98cff36d93b764e1d67f) ) ROM_END @@ -12875,6 +13078,137 @@ ROM_END /*************************************************************************** + Tiger 7 in 1 Sports Stadium (model 7-555) + * TMS1400 MP7304 (die label TMS1400 MP7304A) + * 2x2-digit 7seg LED display + 39 other LEDs, 1-bit sound + + This handheld includes 7 games: 1: Basketball, 2: Hockey, 3: Soccer, + 4: Maze, 5: Baseball, 6: Football, 7: Raquetball. + MAME external artwork is needed for the switchable overlays. + + known releases: + - World: 7 in 1 Sports Stadium, published by Tiger + - USA: 7 in 1 Sports, published by Sears + +***************************************************************************/ + +class t7in1ss_state : public hh_tms1k_state +{ +public: + t7in1ss_state(const machine_config &mconfig, device_type type, const char *tag) : + hh_tms1k_state(mconfig, type, tag) + { } + + void t7in1ss(machine_config &config); + +private: + void update_display(); + void write_r(u16 data); + void write_o(u16 data); + u8 read_k(); +}; + +// handlers + +void t7in1ss_state::update_display() +{ + m_display->matrix(m_r, m_o); +} + +void t7in1ss_state::write_r(u16 data) +{ + // R9: speaker out + m_speaker->level_w(data >> 9 & 1); + + // R0-R2,R10: input mux + m_inp_mux = (data & 7) | (data >> 7 & 8); + + // R0-R3: digit select + // R4-R8: led select + m_r = data; + update_display(); +} + +void t7in1ss_state::write_o(u16 data) +{ + // O0-O7: led data + m_o = data; + update_display(); +} + +u8 t7in1ss_state::read_k() +{ + // K: multiplexed inputs + return read_inputs(4); +} + +// config + +static INPUT_PORTS_START( t7in1ss ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + + PORT_START("IN.3") // R10 + PORT_CONFNAME( 0x01, 0x00, DEF_STR( Players ) ) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x01, "2" ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + +void t7in1ss_state::t7in1ss(machine_config &config) +{ + // basic machine hardware + TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(t7in1ss_state::read_k)); + m_maincpu->r().set(FUNC(t7in1ss_state::write_r)); + m_maincpu->o().set(FUNC(t7in1ss_state::write_o)); + + // video hardware + PWM_DISPLAY(config, m_display).set_size(9, 8); + m_display->set_segmask(0xf, 0x7f); + m_display->set_bri_levels(0.004, 0.04); // player led is brighter + config.set_default_layout(layout_t7in1ss); + + // sound hardware + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, m_speaker); + m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); +} + +// roms + +ROM_START( t7in1ss ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "mp7304", 0x0000, 0x1000, CRC(2a1c8390) SHA1(fa10e60686af6828a61f05046abc3854ab49af95) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) + ROM_REGION( 557, "maincpu:opla", 0 ) + ROM_LOAD( "tms1400_t7in1ss_output.pla", 0, 557, CRC(6b7660f7) SHA1(bb7d58fa04e7606ccdf5b209e1b089948bdd1e7c) ) +ROM_END + + + + + +/*************************************************************************** + Tomy(tronics) Break Up (manufactured in Japan) * PCB label TOMY B.O. * TMS1040 MP2726 TOMY WIPE (die label MP2726A) @@ -13213,11 +13547,13 @@ ROM_END * TMS1100 MP1219 (no decap) * 4 7seg LEDs, 49 other LEDs, 1-bit sound + The game is very similar to t3in1sa, even parts of the ROM match. But by + the time that one was released (in 1983 or 1984), U.S. Games did not exist + anymore. I suspect t3in1sa was programmed by the same (Hong Kong) company. + This handheld includes 4 games: Basketball, Football, Soccer, Hockey. MAME external artwork is needed for the switchable overlays. - The later Coleco Total Control 4 is clearly based on this. - ***************************************************************************/ class ssports4_state : public hh_tms1k_state @@ -13294,14 +13630,14 @@ static INPUT_PORTS_START( ssports4 ) PORT_CONFSETTING( 0x00, "2" ) PORT_START("IN.3") // R8 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_16WAY PORT_NAME("P1 Kick") // or diagonal up-left - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_16WAY PORT_NAME("P1 Info") // or diagonal up-right + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_16WAY PORT_NAME("P1 Up-Left / Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_16WAY PORT_NAME("P1 Up-Right / Info") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_16WAY PORT_NAME("P1 Pass") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_16WAY PORT_NAME("P1 O.P.") // offensive player (modifier button) PORT_START("IN.4") // R9 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Kick") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Info") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Up-Left / Kick") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Up-Right / Info") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 Pass") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL PORT_16WAY PORT_NAME("P2 O.P.") @@ -13317,7 +13653,7 @@ INPUT_PORTS_END void ssports4_state::ssports4(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF m_maincpu->k().set(FUNC(ssports4_state::read_k)); m_maincpu->r().set(FUNC(ssports4_state::write_r)); m_maincpu->o().set(FUNC(ssports4_state::write_o)); @@ -13325,7 +13661,7 @@ void ssports4_state::ssports4(machine_config &config) // video hardware PWM_DISPLAY(config, m_display).set_size(10, 9); m_display->set_segmask(0x303, 0x7f); - m_display->set_bri_levels(0.003, 0.03); // offense leds are brighter + m_display->set_bri_levels(0.005, 0.05); // offense leds are brighter config.set_default_layout(layout_ssports4); // sound hardware @@ -13628,6 +13964,7 @@ CONS( 1980, tcfball, 0, 0, tcfball, tcfball, tcfball_state, emp CONS( 1980, tcfballa, tcfball, 0, tcfballa, tcfballa, tcfballa_state, empty_init, "Tandy Corporation", "Championship Football (model 60-2151)", MACHINE_SUPPORTS_SAVE ) CONS( 1981, tandy12, 0, 0, tandy12, tandy12, tandy12_state, empty_init, "Tandy Corporation", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: *** CONS( 1982, monkeysee, 0, 0, monkeysee, monkeysee, monkeysee_state, empty_init, "Tandy Corporation", "Monkey See (1982 version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1984, t3in1sa, 0, 0, t3in1sa, t3in1sa, t3in1sa_state, empty_init, "Tandy Corporation", "3 in 1 Sports Arena", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) COMP( 1976, speechp, 0, 0, speechp, speechp, speechp_state, empty_init, "Telesensory Systems, Inc.", "Speech+", MACHINE_SUPPORTS_SAVE ) @@ -13652,11 +13989,12 @@ CONS( 1979, timaze, 0, 0, timaze, timaze, timaze_state, emp SYST( 1979, tithermos, 0, 0, tithermos, tithermos, tithermos_state, empty_init, "Texas Instruments", "Electronic Digital Thermostat", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING ) CONS( 1979, subwars, 0, 0, subwars, subwars, subwars_state, empty_init, "Tiger Electronics", "Sub Wars (LED version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, playmaker, 0, 0, playmaker, playmaker, playmaker_state, empty_init, "Tiger Electronics", "Playmaker: Hockey, Soccer, Basketball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1980, dxfootb, 0, 0, dxfootb, dxfootb, dxfootb_state, empty_init, "Tiger Electronics", "Deluxe Football with Instant Replay", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, 7in1ss, 0, 0, ss7in1, ss7in1, ss7in1_state, empty_init, "Tiger Electronics", "7 in 1 Sports Stadium", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1979, copycat, 0, 0, copycat, copycat, copycat_state, empty_init, "Tiger Electronics", "Copy Cat (model 7-520)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1989, copycatm2, copycat, 0, copycatm2, copycatm2, copycatm2_state, empty_init, "Tiger Electronics", "Copy Cat (model 7-522)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1981, ditto, 0, 0, ditto, ditto, ditto_state, empty_init, "Tiger Electronics", "Ditto", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1982, t7in1ss, 0, 0, t7in1ss, t7in1ss, t7in1ss_state, empty_init, "Tiger Electronics", "7 in 1 Sports Stadium", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1979, tbreakup, 0, 0, tbreakup, tbreakup, tbreakup_state, empty_init, "Tomy", "Break Up (Tomy)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, phpball, 0, 0, phpball, phpball, phpball_state, empty_init, "Tomy", "Power House Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp index 408df17b279..cfa4ee6b65c 100644 --- a/src/mame/drivers/hh_ucom4.cpp +++ b/src/mame/drivers/hh_ucom4.cpp @@ -424,7 +424,7 @@ u8 ssfball_state::input_b_r() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: [A] [B] [C] [PASS] [KICK/ ^FORMATION^ DISPLAY] @@ -845,7 +845,7 @@ u8 splasfgt_state::input_b_r() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: * left = P1 side * * right = P2 side * (note: in 1P mode, switch sides between turns) @@ -2453,7 +2453,7 @@ u8 tmtennis_state::input_r(offs_t offset) // config -/* Pro-Tennis physical button layout and labels is like this: +/* Pro-Tennis physical button layout and labels are like this: * left = P2/CPU side * * right = P1 side * @@ -2946,7 +2946,7 @@ u8 alnchase_state::input_r() // config -/* physical button layout and labels is like this: +/* physical button layout and labels are like this: POWER SOUND LEVEL PLAYER ON ON PRO TWO START diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp index d4586d2e3f8..574bfa14bfd 100644 --- a/src/mame/drivers/igs011.cpp +++ b/src/mame/drivers/igs011.cpp @@ -4385,7 +4385,7 @@ ROM_END /*************************************************************************** - 東方之珠/Dōngfāng Zhī Zhū + 東方之珠/Dung1 Fong1 Zi1 Zyu1 (Hong Kong version of 中國龍/Zhōngguó Lóng, V011H) ***************************************************************************/ @@ -4514,7 +4514,7 @@ ROM_END /*************************************************************************** - Long Hu Bang (V035C) + 龙虎榜/Lóng hǔ bǎng (V035C) Other files in the zip: @@ -4541,7 +4541,7 @@ ROM_END /*************************************************************************** -Long Hu Bang (V033C) +龙虎榜/Lóng hǔ bǎng (V033C) PCB Layout ---------- @@ -4603,7 +4603,7 @@ ROM_END /*************************************************************************** -Da Ban Cheng +大阪城/Daai6 Baan2 Sing4 PCB Layout ---------- @@ -4710,7 +4710,7 @@ ROM_END /*************************************************************************** -Long Hu Bang II +龍虎榜/Lung4 Fu2 Bong2 II IGS, 1996 PCB Layout @@ -4936,14 +4936,14 @@ GAME( 1995, drgnwrldv30, drgnwrld, drgnwrld, drgnwrld, igs011_state, i GAME( 1995, drgnwrldv21, drgnwrld, drgnwrld_igs012, drgnwrld, igs011_state, init_drgnwrldv21, ROT0, "IGS", "Dragon World (World, V021O)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, drgnwrldv21j, drgnwrld, drgnwrld_igs012, drgnwrldj, igs011_state, init_drgnwrldv21j, ROT0, "IGS / Alta", "Zhongguo Long (Japan, V021J)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, drgnwrldv20j, drgnwrld, drgnwrld_igs012, drgnwrldj, igs011_state, init_drgnwrldv20j, ROT0, "IGS / Alta", "Zhongguo Long (Japan, V020J)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, drgnwrldv11h, drgnwrld, drgnwrld, drgnwrldc, igs011_state, init_drgnwrldv11h, ROT0, "IGS", "Dongfang Zhi Zhu (Hong Kong, V011H, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, drgnwrldv11ha, drgnwrld, drgnwrld_igs012, drgnwrldc, igs011_state, init_drgnwrldv40k, ROT0, "IGS", "Dongfang Zhi Zhu (Hong Kong, V011H, set 2)", MACHINE_SUPPORTS_SAVE ) // different encryption and with IGS012 +GAME( 1995, drgnwrldv11h, drgnwrld, drgnwrld, drgnwrldc, igs011_state, init_drgnwrldv11h, ROT0, "IGS", "Dung Fong Zi Zyu (Hong Kong, V011H, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, drgnwrldv11ha, drgnwrld, drgnwrld_igs012, drgnwrldc, igs011_state, init_drgnwrldv40k, ROT0, "IGS", "Dung Fong Zi Zyu (Hong Kong, V011H, set 2)", MACHINE_SUPPORTS_SAVE ) // different encryption and with IGS012 GAME( 1995, drgnwrldv10c, drgnwrld, drgnwrld, drgnwrldc, igs011_state, init_drgnwrldv10c, ROT0, "IGS", "Zhongguo Long (China, V010C)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, lhb, 0, lhb, lhb, igs011_state, init_lhb, ROT0, "IGS", "Long Hu Bang (China, V035C)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, lhbv33c, lhb, lhb, lhb, igs011_state, init_lhbv33c, ROT0, "IGS", "Long Hu Bang (China, V033C)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, dbc, lhb, lhb, lhb, igs011_state, init_dbc, ROT0, "IGS", "Da Ban Cheng (Hong Kong, V027H)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, dbc, lhb, lhb, lhb, igs011_state, init_dbc, ROT0, "IGS", "Daai Baan Sing (Hong Kong, V027H)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, ryukobou, lhb, lhb, lhb, igs011_state, init_ryukobou, ROT0, "IGS / Alta", "Mahjong Ryukobou (Japan, V030J)", MACHINE_SUPPORTS_SAVE ) -GAME( 1996, lhb2, 0, lhb2, lhb2, igs011_state, init_lhb2, ROT0, "IGS", "Long Hu Bang II (Hong Kong, V185H)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, lhb2, 0, lhb2, lhb2, igs011_state, init_lhb2, ROT0, "IGS", "Lung Fu Bong II (Hong Kong, V185H)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, xymg, 0, xymg, xymg, igs011_state, init_xymg, ROT0, "IGS", "Xingyun Man Guan (China, V651C)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, wlcc, xymg, wlcc, wlcc, igs011_state, init_wlcc, ROT0, "IGS", "Wanli Changcheng (China, V638C)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, vbowl, 0, vbowl, vbowl, igs011_state, init_vbowl, ROT0, "IGS", "Virtua Bowling (World, V101XCM)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/macp.cpp b/src/mame/drivers/macp.cpp index b4387f970cc..22a68225f5d 100644 --- a/src/mame/drivers/macp.cpp +++ b/src/mame/drivers/macp.cpp @@ -393,6 +393,12 @@ ROM_START(macgalxy) ROM_LOAD("galaxy2.bin", 0x2000, 0x2000, CRC(f0efb723) SHA1(697b3c9f3ebedca1087354eda5dfe9719d497045)) ROM_END +ROM_START(macgalxyb) + ROM_REGION(0x4000, "maincpu", 0) + ROM_LOAD("system_iv_fabricante_m-73_macsa_galaxy_m5_6.bin", 0x0000, 0x2000, CRC(38319685) SHA1(54e979bba16d79d3589b3ae3f9e8e29071ef5b36)) + ROM_LOAD("modelo_a-01202_fabricante_m-73_macsa_galaxy_05.bin", 0x2000, 0x2000, CRC(c1f40cbf) SHA1(566d962f55367379346155f2078b92b4e1e6a79d)) +ROM_END + ROM_START(macjungl) ROM_REGION(0x4000, "maincpu", 0) ROM_LOAD("jungle1.bin", 0x0000, 0x2000, CRC(461a3e1b) SHA1(96981b4d8db0412c474169eaf5e5386be5006ffe)) @@ -463,7 +469,8 @@ ROM_END } // Anonymous namespace // MAC S.A. pinballs -GAME( 1986, macgalxy, 0, mac16k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "MAC's Galaxy", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1986, macgalxy, 0, mac16k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "MAC's Galaxy (yellow version, M.6)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME( 1986, macgalxyb, macgalxy, mac16k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "MAC's Galaxy (blue version, M.042)", MACHINE_IS_SKELETON_MECHANICAL ) GAME( 1987, macjungl, 0, mac16k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "MAC Jungle", MACHINE_IS_SKELETON_MECHANICAL ) GAME( 1987, spctrain, 0, mac32k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "Space Train (Pinball)", MACHINE_IS_SKELETON_MECHANICAL ) GAME( 1987, spctraino, spctrain, mac16k, macp, macp_state, empty_init, ROT0, "MAC S.A.", "Space Train (Pinball, old hardware)", MACHINE_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp index bf91fc423e8..9dc077f1602 100644 --- a/src/mame/drivers/slapfght.cpp +++ b/src/mame/drivers/slapfght.cpp @@ -909,15 +909,9 @@ void slapfght_state::perfrman(machine_config &config) config.set_perfect_quantum(m_maincpu); /* video hardware */ - BUFFERED_SPRITERAM8(config, m_spriteram); - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); - m_screen->set_size(64*8, 32*8); - m_screen->set_visarea(0*8, 32*8-1, 2*8, 32*8-1); + m_screen->set_raw(36_MHz_XTAL/6, 388, 0, 296, 270, 0, 240); m_screen->set_screen_update(FUNC(slapfght_state::screen_update_perfrman)); - m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram8_device::vblank_copy_rising)); m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); @@ -943,7 +937,7 @@ void slapfght_state::perfrman(machine_config &config) void slapfght_state::tigerh(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(36'000'000)/6); // 6MHz + Z80(config, m_maincpu, 36_MHz_XTAL/6); // 6MHz m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_map_mcu); m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_mcu); @@ -952,7 +946,7 @@ void slapfght_state::tigerh(machine_config &config) mainlatch.q_out_cb<1>().set(FUNC(slapfght_state::flipscreen_w)); mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w)); - Z80(config, m_audiocpu, XTAL(36'000'000)/12); // 3MHz + Z80(config, m_audiocpu, 36_MHz_XTAL/12); // 3MHz m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_sound_map); m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(360)); // music speed, verified with pcb recording @@ -961,15 +955,9 @@ void slapfght_state::tigerh(machine_config &config) config.set_perfect_quantum(m_maincpu); /* video hardware */ - BUFFERED_SPRITERAM8(config, m_spriteram); - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); - m_screen->set_size(64*8, 32*8); - m_screen->set_visarea(1*8, 36*8-1, 2*8-1, 32*8-1-1); + m_screen->set_raw(36_MHz_XTAL/6, 388, 0, 296, 270, 0, 240); m_screen->set_screen_update(FUNC(slapfght_state::screen_update_slapfight)); - m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram8_device::vblank_copy_rising)); m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); @@ -980,12 +968,12 @@ void slapfght_state::tigerh(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", XTAL(36'000'000)/24)); // 1.5MHz + ay8910_device &ay1(AY8910(config, "ay1", 36_MHz_XTAL/24)); // 1.5MHz ay1.port_a_read_callback().set_ioport("IN0"); ay1.port_b_read_callback().set_ioport("IN1"); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay2(AY8910(config, "ay2", XTAL(36'000'000)/24)); // 1.5MHz + ay8910_device &ay2(AY8910(config, "ay2", 36_MHz_XTAL/24)); // 1.5MHz ay2.port_a_read_callback().set_ioport("DSW1"); ay2.port_b_read_callback().set_ioport("DSW2"); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); @@ -1027,7 +1015,7 @@ void slapfght_state::tigerhb4(machine_config &config) void slapfght_state::slapfigh(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(36'000'000)/6); // 6MHz + Z80(config, m_maincpu, 36_MHz_XTAL/6); // 6MHz m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::slapfigh_map_mcu); m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_mcu); @@ -1037,7 +1025,7 @@ void slapfght_state::slapfigh(machine_config &config) mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w)); mainlatch.q_out_cb<4>().set_membank("bank1"); - Z80(config, m_audiocpu, XTAL(36'000'000)/12); // 3MHz + Z80(config, m_audiocpu, 36_MHz_XTAL/12); // 3MHz m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_sound_map); m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(180)); @@ -1047,15 +1035,9 @@ void slapfght_state::slapfigh(machine_config &config) config.set_perfect_quantum(m_maincpu); /* video hardware */ - BUFFERED_SPRITERAM8(config, m_spriteram); - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); - m_screen->set_size(64*8, 32*8); - m_screen->set_visarea(1*8, 36*8-1, 2*8-1, 32*8-1-1); + m_screen->set_raw(36_MHz_XTAL/6, 388, 0, 296, 270, 0, 240); m_screen->set_screen_update(FUNC(slapfght_state::screen_update_slapfight)); - m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram8_device::vblank_copy_rising)); m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq)); m_screen->set_palette(m_palette); @@ -1066,12 +1048,12 @@ void slapfght_state::slapfigh(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", XTAL(36'000'000)/24)); // 1.5MHz + ay8910_device &ay1(AY8910(config, "ay1", 36_MHz_XTAL/24)); // 1.5MHz ay1.port_a_read_callback().set_ioport("IN0"); ay1.port_b_read_callback().set_ioport("IN1"); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay2(AY8910(config, "ay2", XTAL(36'000'000)/24)); // 1.5MHz + ay8910_device &ay2(AY8910(config, "ay2", 36_MHz_XTAL/24)); // 1.5MHz ay2.port_a_read_callback().set_ioport("DSW1"); ay2.port_b_read_callback().set_ioport("DSW2"); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); @@ -1563,6 +1545,37 @@ Notes: A77_05 to A77_08 - 27256 EPROM A77_03, A77_04 - 2764 EPROM (replace with A77_03-1, A77_04-1 on Alcon) A77_13 - Motorola MC68705P5S Micro-Controller (protected). Clock 3.000MHz + +Non-color PROM usage (slap fight board names, seem common for all games): + ROM14.2C: + Horizontal signals. In normal mode hpos goes from 0 to 387, in + flipped mode hpos goes from 291 to -96. The prom address is: + ((hpos >> 2) & 0x7f) | (flip ? 0x80 : 0x00) + + Bits are: + 0: 1 = sync active + 1: 1 = blank active + 2: unused + 3: 0 = reset hpos + + ROM15.8B: + Vertical signals. Vpos goes from 0 to 269. The prom address is + vpos >> 1. + + Bits are: + 0: 0 = sync active + 1: 1 = blank active + 2: unused + 3: 0 = reset vpos + + ROM16.1E, ROM17.1C: + Two nibbles providing a byte (1E high, 1C low). Seems linked with + reading the sprite ram, addressing is a little weird and usage not + obvious. Low 3 bits seem to choose a target (0=none, + 1,3=position, 4=code, 2=misc, 5+ unknown). + + ROM18.2B: + Something to do with sprites, even less clear. */ ROM_START( alcon ) @@ -1593,10 +1606,15 @@ ROM_START( alcon ) ROM_LOAD( "a77_09.7h", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) - ROM_REGION( 0x0300, "proms", 0 ) + ROM_REGION( 0x0720, "proms", 0 ) ROM_LOAD( "21_82s129.12q", 0x0000, 0x0100, CRC(a0efaf99) SHA1(5df01663480acad1f89abab8662d437617a66d1c) ) /* Silkscreened as ROM21 */ ROM_LOAD( "20_82s129.12m", 0x0100, 0x0100, CRC(a56d57e5) SHA1(bfbd0db52b23fe1b4994e05103be3d412c1c013e) ) /* Silkscreened as ROM20 */ ROM_LOAD( "19_82s129.12n", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) /* Silkscreened as ROM19 */ + ROM_LOAD( "14_82s129.2c", 0x0300, 0x0100, CRC(4dc04453) SHA1(524e5a212ab496c52adc0def995b75e89aba48e7) ) /* Silkscreened as ROM14 */ + ROM_LOAD( "15_82s129.8b", 0x0400, 0x0100, CRC(48ac3db4) SHA1(6a73fe21529bc760b8df1893aee9e89fb60976eb) ) /* Silkscreened as ROM15 */ + ROM_LOAD( "16_82s129.1e", 0x0500, 0x0100, CRC(59490887) SHA1(c894edecbcfc67972ad893cd7c8197d07862a20a) ) /* Silkscreened as ROM16 */ + ROM_LOAD( "17_82s129.1c", 0x0600, 0x0100, CRC(d492e6c2) SHA1(5789adda3a63ef8656ebd012416fcf3f991241fe) ) /* Silkscreened as ROM17 */ + ROM_LOAD( "18_82s123.2b", 0x0700, 0x0020, CRC(aa0ca5a5) SHA1(4c45be71658f40ebb05634febba5822f1a8a7f79) ) /* Silkscreened as ROM18 */ ROM_END ROM_START( slapfigh ) @@ -1626,10 +1644,15 @@ ROM_START( slapfigh ) ROM_LOAD( "a77_10.8h", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) ROM_LOAD( "a77_09.7h", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) - ROM_REGION( 0x0300, "proms", 0 ) + ROM_REGION( 0x0720, "proms", 0 ) ROM_LOAD( "21_82s129.12q", 0x0000, 0x0100, CRC(a0efaf99) SHA1(5df01663480acad1f89abab8662d437617a66d1c) ) /* Silkscreened as ROM21 */ ROM_LOAD( "20_82s129.12m", 0x0100, 0x0100, CRC(a56d57e5) SHA1(bfbd0db52b23fe1b4994e05103be3d412c1c013e) ) /* Silkscreened as ROM20 */ ROM_LOAD( "19_82s129.12n", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) /* Silkscreened as ROM19 */ + ROM_LOAD( "14_82s129.2c", 0x0300, 0x0100, CRC(4dc04453) SHA1(524e5a212ab496c52adc0def995b75e89aba48e7) ) /* Silkscreened as ROM14 */ + ROM_LOAD( "15_82s129.8b", 0x0400, 0x0100, CRC(48ac3db4) SHA1(6a73fe21529bc760b8df1893aee9e89fb60976eb) ) /* Silkscreened as ROM15 */ + ROM_LOAD( "16_82s129.1e", 0x0500, 0x0100, CRC(59490887) SHA1(c894edecbcfc67972ad893cd7c8197d07862a20a) ) /* Silkscreened as ROM16 */ + ROM_LOAD( "17_82s129.1c", 0x0600, 0x0100, CRC(d492e6c2) SHA1(5789adda3a63ef8656ebd012416fcf3f991241fe) ) /* Silkscreened as ROM17 */ + ROM_LOAD( "18_82s123.2b", 0x0700, 0x0020, CRC(aa0ca5a5) SHA1(4c45be71658f40ebb05634febba5822f1a8a7f79) ) /* Silkscreened as ROM18 */ ROM_END /* @@ -1668,10 +1691,15 @@ ROM_START( slapfigha ) ROM_LOAD( "a76_11.8h", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) ROM_LOAD( "a76_10.6h", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) - ROM_REGION( 0x0300, "proms", 0 ) + ROM_REGION( 0x0720, "proms", 0 ) ROM_LOAD( "a76-17.12q", 0x0000, 0x0100, CRC(a0efaf99) SHA1(5df01663480acad1f89abab8662d437617a66d1c) ) /* 82S129 Biploar PROM, Silkscreened as ROM21 */ ROM_LOAD( "a76-15.12m", 0x0100, 0x0100, CRC(a56d57e5) SHA1(bfbd0db52b23fe1b4994e05103be3d412c1c013e) ) /* 82S129 Biploar PROM, Silkscreened as ROM20 */ ROM_LOAD( "a76-16.12n", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) /* 82S129 Biploar PROM, Silkscreened as ROM19 */ + ROM_LOAD( "14_82s129.2c", 0x0300, 0x0100, CRC(4dc04453) SHA1(524e5a212ab496c52adc0def995b75e89aba48e7) ) /* Silkscreened as ROM14 */ + ROM_LOAD( "15_82s129.8b", 0x0400, 0x0100, CRC(48ac3db4) SHA1(6a73fe21529bc760b8df1893aee9e89fb60976eb) ) /* Silkscreened as ROM15 */ + ROM_LOAD( "16_82s129.1e", 0x0500, 0x0100, CRC(59490887) SHA1(c894edecbcfc67972ad893cd7c8197d07862a20a) ) /* Silkscreened as ROM16 */ + ROM_LOAD( "17_82s129.1c", 0x0600, 0x0100, CRC(d492e6c2) SHA1(5789adda3a63ef8656ebd012416fcf3f991241fe) ) /* Silkscreened as ROM17 */ + ROM_LOAD( "18_82s123.2b", 0x0700, 0x0020, CRC(aa0ca5a5) SHA1(4c45be71658f40ebb05634febba5822f1a8a7f79) ) /* Silkscreened as ROM18 */ ROM_END /* @@ -1899,7 +1927,6 @@ A68_02 & 06 to 09 - 27256 EPROM A68_04/05 - 2764 EPROM A68_14 - Motorola MC68705P5 Micro-Controller (protected). Clock 3.000MHz [36/12] X - Unpopulated socket - */ ROM_START( grdian ) diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp index 8759aa3e7ba..ab1c5df7b81 100644 --- a/src/mame/drivers/tmnt.cpp +++ b/src/mame/drivers/tmnt.cpp @@ -4,11 +4,93 @@ This driver contains several Konami 68000 based games. For the most part they run on incompatible boards, but since 90% of the work is done by the custom -ICs emulated in video/konamiic.c, we can just as well keep them all +ICs emulated in video/k0*.cpp, we can just as well keep them all together. driver by Nicola Salmoria +*************************************************************************** + +Teenage Mutant Ninja Turtles, Konami, 1989 +Hardware info by Guru + +PCB Layout +---------- + +GX963 +PWB351853A +|------------------------------------------------------------------| +| MB3731 963A25.D5 963A17.H4 963A15.K4 | +| VOL | +| 963A18.H6 963A16.K6 | +| 963A30.G7 | +| 007341 |--------| |--------| | +| 007341 4066 MCM2018 |KONAMI | |KONAMI | | +| 4066 640kHz |051960 | |051937 | | +| 3.579545MHz | | | | | +| LM358 Y3014 |-------------| |--------| |--------| | +|J C324 | 007232 | | +|A 963A26.C13 |-------------| 963E20.G13 007644 007644 | +|M C324 007340 007340 MB8464 MB8464 | +|M LM358 640kHz D780C-1 963X21.J15 963X22.K15| +|A D7759C MB8416 963X23.I17 963X24.K17| +| |-------------------| | +| 963A27.D18 YM2151 24MHz | 68000 | | +| 051550 963A31.G19 |-------------------| | +| | +| 052535(X3) |--------| |--------| | +| 005273(X10) MCM2018 |KONAMI | |KONAMI | | +| MCM2018 |052109 | |051962 | | +| CN4 | | | | | +| CN3 |--------| |--------| | +| MB8464 | +|DIPSW1 DIPSW2 DIPSW3 MB8464 963A28.H27 963A29.K27| +|------------------------------------------------------------------| +Notes: + 68000 - Motorola MC68000P8 CPU. Clock input 8.000MHz [24/3] + D780C-1 - NEC D780C-1 Z80-compatible CPU. Clock input 3.579545MHz + D7759C - NEC uPD7759C ADPCM Speech Synthesizer. Clock input 640kHz on pin 23 + YM2151 - Yamaha YM2151 FM Operator Type-M (OPM) sound chip. Clock input 3.579545MHz + LM358 - Motorola LM358 Dual Operational Amplifier + Y3014 - Yamaha YM3014B Serial Input Floating D/A Converter. Clock input 320kHz [640/2] on pin 5 + C324 - NEC uPC324 Quad Operational Amplifier (equivalent to LM324) + MB8464 - Fujitsu MB8464 8kBx8-bit SRAM + MCM2018 - Motorola MCM2018 2kBx8-bit SRAM + MB8416 - Fujitsu MB8416 2kBx8-bit SRAM + 051550 - Custom ceramic module providing coin counter drivers, watchdog timer and master reset signal + MB3731 - Fujitsu MB3731 Audio Power Amplifier + VOL - 5K-ohm volume pot + 4066 - Oki M4066 Quad Bilateral Switch + 007340 - Konami custom resistor array pack + 007341 - Konami custom resistor array pack + 052535 - Konami custom resistor array pack + 005273 - Konami custom resistor array pack + 007232 - Konami custom PCM Controller/Sample Player. Clock input 3.579545MHz on pin 51 + 052109 - Konami custom Tilemap Generator \ + 051962 - Konami custom Tilemap Generator / paired together + 051960 - Konami custom Sprite Generator \ + 051937 - Konami custom Sprite Generator / paired together + 007644 - Konami custom (unknown purpose) DIP22 400mil-wide IC + 963A27.D18 - 1Mbit 28-pin mask ROM (uPD7759 samples) + 963A26.C13 - 1Mbit 28-pin mask ROM (007232 PCM samples) + 963A25.D5 - 4Mbit 40-pin mask ROM (title theme sample for uPD7759) + 963E20.G13 - 32kBx8-bit (27256) OTP EPROM (Z80 program) + 963A17.H4 \ + 963A15.K4 \ + 963A18.H6 / 4Mbit 40-pin mask ROM (sprite data) + 963A16.K6 / + 963A28.H27 \ + 963A29.K27 / 4Mbit 40-pin mask ROM (tile data) + 963A31.G19 - AMD27S21 Bi-polar PROM (priority encoder) + 963A30.G7 - AMD27S21 Bi-polar PROM (sprite address decoder) + DIPDW1/2 - 8-position DIP switch + DIPSW3 - 4-position DIP switch + CN3/4 - 15-position connector for player 3 & 4 controls + HSync - 14.9626kHz + VSync - 59.1846Hz + +*************************************************************************** + Notes: - Golfing Greats has a peculiar way to know where the ball is laying: the hardware latches the color of roz pixel at the center (more or less) of the diff --git a/src/mame/drivers/ymmu100.cpp b/src/mame/drivers/ymmu100.cpp index 7aa1ba22e14..e3b4ab7590e 100644 --- a/src/mame/drivers/ymmu100.cpp +++ b/src/mame/drivers/ymmu100.cpp @@ -742,7 +742,7 @@ ROM_START( mu100 ) ROM_LOAD32_WORD( "sx743b0.ic35", 0x0000002, 0x400000, CRC(a9109a6c) SHA1(a67bb49378a38a2d809bd717d286e18bc6496db0) ) ROM_LOAD32_WORD( "xt445a0-828.ic36", 0x0800000, 0x200000, CRC(225c2280) SHA1(23b5e046fd2e2ac01af3e6dc6357c5c6547b286b) ) ROM_LOAD32_WORD( "xt461a0-829.ic37", 0x0800002, 0x200000, CRC(a1d138a3) SHA1(46a7a7225cd7e1818ba551325d2af5ac1bf5b2bf) ) - ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(cbf037da) SHA1(37449e741243305de38cb913b17041942ad334cd) BAD_DUMP) // Bit 12 fixed to 1 + ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(2e82cbd4) SHA1(d1f0e2713bf2cca9156c562e23fcce4fa5d7cfb3) ) ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) ) ROM_END @@ -761,7 +761,7 @@ ROM_START( mu100r ) ROM_LOAD32_WORD( "sx743b0.ic35", 0x000002, 0x400000, CRC(a9109a6c) SHA1(a67bb49378a38a2d809bd717d286e18bc6496db0) ) ROM_LOAD32_WORD( "xt445a0-828.ic36", 0x800000, 0x200000, CRC(225c2280) SHA1(23b5e046fd2e2ac01af3e6dc6357c5c6547b286b) ) ROM_LOAD32_WORD( "xt461a0-829.ic37", 0x800002, 0x200000, CRC(a1d138a3) SHA1(46a7a7225cd7e1818ba551325d2af5ac1bf5b2bf) ) - ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(cbf037da) SHA1(37449e741243305de38cb913b17041942ad334cd) BAD_DUMP) // Bit 12 fixed to 1 + ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(2e82cbd4) SHA1(d1f0e2713bf2cca9156c562e23fcce4fa5d7cfb3) ) ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) ) ROM_END @@ -775,7 +775,7 @@ ROM_START( mu100b ) ROM_LOAD32_WORD( "sx743b0.ic35", 0x0000002, 0x400000, CRC(a9109a6c) SHA1(a67bb49378a38a2d809bd717d286e18bc6496db0) ) ROM_LOAD32_WORD( "xt445a0-828.ic36", 0x0800000, 0x200000, CRC(225c2280) SHA1(23b5e046fd2e2ac01af3e6dc6357c5c6547b286b) ) ROM_LOAD32_WORD( "xt461a0-829.ic37", 0x0800002, 0x200000, CRC(a1d138a3) SHA1(46a7a7225cd7e1818ba551325d2af5ac1bf5b2bf) ) - ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(cbf037da) SHA1(37449e741243305de38cb913b17041942ad334cd) BAD_DUMP) // Bit 12 fixed to 1 + ROM_LOAD32_WORD( "xt462a0.ic39", 0x1000000, 0x400000, CRC(2e82cbd4) SHA1(d1f0e2713bf2cca9156c562e23fcce4fa5d7cfb3) ) ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) ) ROM_END diff --git a/src/mame/includes/dgn_beta.h b/src/mame/includes/dgn_beta.h index 9cacd165e73..b1fe2bd9ac1 100644 --- a/src/mame/includes/dgn_beta.h +++ b/src/mame/includes/dgn_beta.h @@ -11,11 +11,12 @@ #pragma once -#include "video/mc6845.h" #include "imagedev/floppy.h" -#include "machine/wd_fdc.h" #include "machine/6821pia.h" #include "machine/ram.h" +#include "machine/wd_fdc.h" +#include "video/mc6845.h" + #include "emupal.h" /* Tags */ @@ -30,56 +31,6 @@ #define DGNBETA_CPU_SPEED_HZ 2000000 /* 2MHz */ #define DGNBETA_FRAMES_PER_SECOND 50 -#define RamSize 256 /* 256K by default */ -#define RamPageSize 4096 /* ram pages are 4096 bytes */ - -#define MaxTasks 16 /* Tasks 0..15 */ -#define MaxPage 16 /* 16 4K pages */ -#define NoPagingTask MaxTasks /* Task registers to use when paging disabled 16 */ - -#define RAMPage 0 /* Page with RAM in at power on */ -#define VideoPage 6 /* Page where video ram mapped */ -#define IOPage MaxPage-1 /* Page for I/O */ -#define ROMPage MaxPage-2 /* Page for ROM */ -#define LastPage MaxPage-1 - -#define RAMPageValue 0x00 /* page with RAM at power on */ -#define VideoPageValue 0x1F /* Default page for video ram */ -#define NoMemPageValue 0xC0 /* Page guaranteed not to have memory in */ -#define ROMPageValue 0xFE /* Page with boot ROM */ -#define IOPageValue 0xFF /* Page with I/O & Boot ROM */ - -#define TextVidBasePage 0x18 /* Base page of text video ram */ - -/***** Keyboard stuff *****/ -#define NoKeyrows 0x0a /* Number of rows in keyboard */ - -/* From Dragon Beta OS9 keyboard driver */ -#define KAny 0x04 /* Any key pressed mask PB2 */ -#define KOutClk 0x08 /* Output shift register clock */ -#define KInClk 0x10 /* Input shift register clock */ -#define KOutDat KInClk /* Also used for data into output shifter */ -#define KInDat 0x20 /* Keyboard data in from keyboard (serial stream) */ - -/***** Video Modes *****/ - -enum BETA_VID_MODES -{ - TEXT_40x25, /* Text mode 40x25 */ - TEXT_80x25, /* Text mode 80x25 */ - GRAPH_320x256x4, /* Graphics 320x256x4 */ - GRAPH_320x256x16, /* Graphics 320x256x16 */ - GRAPH_640x512x2 /* Graphics 640X512X2 */ -}; - -#define iosize (0xfEFF-0xfc00) - -struct PageReg -{ - int value; /* Value of the page register */ - uint8_t *memory; /* The memory it actually points to */ -}; - class dgn_beta_state : public driver_device { @@ -109,6 +60,56 @@ protected: virtual void machine_reset() override; private: + static constexpr unsigned RamSize = 256; // 256K by default + static constexpr unsigned RamPageSize = 4096; // ram pages are 4096 bytes + + static constexpr unsigned MaxTasks = 16; // Tasks 0..15 + static constexpr unsigned MaxPage = 16; // 16 4K pages + static constexpr unsigned NoPagingTask = MaxTasks; // Task registers to use when paging disabled 16 + + static constexpr unsigned RAMPage = 0; // Page with RAM in at power on + static constexpr unsigned VideoPage = 6; // Page where video ram mapped + static constexpr unsigned IOPage = MaxPage-1; // Page for I/O + static constexpr unsigned ROMPage = MaxPage-2; // Page for ROM + static constexpr unsigned LastPage = MaxPage-1; + + static constexpr uint8_t RAMPageValue = 0x00; // page with RAM at power on + static constexpr uint8_t VideoPageValue = 0x1f; // Default page for video ram + static constexpr uint8_t NoMemPageValue = 0xc0; // Page guaranteed not to have memory in + static constexpr uint8_t ROMPageValue = 0xfe; // Page with boot ROM + static constexpr uint8_t IOPageValue = 0xff; // Page with I/O & Boot ROM + + static constexpr uint8_t TextVidBasePage = 0x18; // Base page of text video RAM + + /***** Keyboard stuff *****/ + static constexpr uint8_t NoKeyrows = 0x0a; // Number of rows in keyboard + + /* From Dragon Beta OS9 keyboard driver */ + static constexpr uint8_t KAny = 0x04; // Any key pressed mask PB2 + static constexpr uint8_t KOutClk = 0x08; // Output shift register clock + static constexpr uint8_t KInClk = 0x10; // Input shift register clock + static constexpr uint8_t KOutDat = KInClk; // Also used for data into output shifter + static constexpr uint8_t KInDat = 0x20; // Keyboard data in from keyboard (serial stream) + + /***** Video Modes *****/ + + enum BETA_VID_MODES + { + TEXT_40x25, /* Text mode 40x25 */ + TEXT_80x25, /* Text mode 80x25 */ + GRAPH_320x256x4, /* Graphics 320x256x4 */ + GRAPH_320x256x16, /* Graphics 320x256x16 */ + GRAPH_640x512x2 /* Graphics 640X512X2 */ + }; + + static constexpr unsigned iosize = 0xfeff-0xfc00; + + struct PageReg + { + int value; /* Value of the page register */ + uint8_t *memory; /* The memory it actually points to */ + }; + static void floppy_formats(format_registration &fr); required_device<mc6845_device> m_mc6845; diff --git a/src/mame/includes/slapfght.h b/src/mame/includes/slapfght.h index ff3aa5c0f3e..2cd6b72b37b 100644 --- a/src/mame/includes/slapfght.h +++ b/src/mame/includes/slapfght.h @@ -28,9 +28,9 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), + m_spriteram(*this, "spriteram"), m_fixvideoram(*this, "fixvideoram"), m_fixcolorram(*this, "fixcolorram") { } @@ -59,10 +59,10 @@ private: required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - required_device<buffered_spriteram8_device> m_spriteram; required_shared_ptr<uint8_t> m_videoram; required_shared_ptr<uint8_t> m_colorram; + required_shared_ptr<uint8_t> m_spriteram; optional_shared_ptr<uint8_t> m_fixvideoram; optional_shared_ptr<uint8_t> m_fixcolorram; diff --git a/src/mame/layout/dxfootb.lay b/src/mame/layout/dxfootb.lay index d6ab2170a1c..1a467fd66f2 100644 --- a/src/mame/layout/dxfootb.lay +++ b/src/mame/layout/dxfootb.lay @@ -7,7 +7,7 @@ license:CC0 <!-- define elements --> <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element> - <element name="dark"><rect><color red="0.14" green="0.14" blue="0.14" /></rect></element> + <element name="dark"><rect><color red="0.14" green="0.15" blue="0.14" /></rect></element> <element name="digit" defstate="0"> <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> @@ -26,11 +26,11 @@ license:CC0 <!-- main display --> <group name="display1"> - <bounds x="0" y="0" width="30.3" height="15.4" /> + <bounds x="0" y="0" width="30.2" height="15.4" /> <!-- bezel (etched, not white) --> - <element ref="dark"><bounds x="0" y="0" width="30.3" height="15.4" /></element> - <element ref="black"><bounds x="0.2" y="0.2" width="29.9" height="15" /></element> + <element ref="dark"><bounds x="0" y="0" width="30.2" height="15.4" /></element> + <element ref="black"><bounds x="0.2" y="0.2" width="29.8" height="15" /></element> <repeat count="9"> <param name="x" start="3" increment="3" /> @@ -73,9 +73,9 @@ license:CC0 <!-- build screen --> <view name="Internal Layout"> - <bounds left="-1" right="21.2" top="-1" bottom="31.3" /> + <bounds left="-1" right="21.2" top="-1" bottom="31.2" /> - <group ref="display1"><bounds x="0" y="0" width="15.4" height="30.3" /><orientation rotate="90" /></group> + <group ref="display1"><bounds x="0" y="0" width="15.4" height="30.2" /><orientation rotate="90" /></group> <group ref="display2"><bounds x="17.2" y="10.2" width="3" height="9.8" /><orientation rotate="90" /></group> </view> </mamelayout> diff --git a/src/mame/layout/esoccer.lay b/src/mame/layout/esoccer.lay index 9f43a873633..0bd6dbb8f44 100644 --- a/src/mame/layout/esoccer.lay +++ b/src/mame/layout/esoccer.lay @@ -31,8 +31,7 @@ license:CC0 <view name="Internal Layout"> <bounds left="2.5" right="33.5" top="5.7" bottom="40.3" /> - <!-- bezel --> - + <!-- bezel --> <element ref="static_green"><bounds x="5" y="5" width="25" height="35" /></element> <!-- middle --> @@ -89,45 +88,44 @@ license:CC0 <element ref="static_black"><bounds x="3" y="1.6" width="30" height="4" /></element> <element ref="static_black"><bounds x="3" y="40.4" width="30" height="4" /></element> - <!-- leds --> - - <element name="0.0" ref="led"><bounds x="15" y="7.5" width="1" height="1" /></element> + <!-- leds --> + <element name="0.2" ref="led"><bounds x="15" y="7.5" width="1" height="1" /></element> <element name="0.1" ref="led"><bounds x="17.5" y="7.5" width="1" height="1" /></element> - <element name="0.2" ref="led"><bounds x="20" y="7.5" width="1" height="1" /></element> - - <element name="1.0" ref="led"><bounds x="10" y="10" width="1" height="1" /></element> - <element name="1.1" ref="led"><bounds x="15" y="10" width="1" height="1" /></element> - <element name="1.2" ref="led"><bounds x="20" y="10" width="1" height="1" /></element> - <element name="1.3" ref="led"><bounds x="25" y="10" width="1" height="1" /></element> - - <element name="2.0" ref="led"><bounds x="10" y="15" width="1" height="1" /></element> - <element name="2.1" ref="led"><bounds x="15" y="15" width="1" height="1" /></element> - <element name="2.2" ref="led"><bounds x="20" y="15" width="1" height="1" /></element> - <element name="2.3" ref="led"><bounds x="25" y="15" width="1" height="1" /></element> - - <element name="3.0" ref="led"><bounds x="10" y="20" width="1" height="1" /></element> - <element name="3.1" ref="led"><bounds x="15" y="20" width="1" height="1" /></element> - <element name="3.2" ref="led"><bounds x="20" y="20" width="1" height="1" /></element> - <element name="3.3" ref="led"><bounds x="25" y="20" width="1" height="1" /></element> - - <element name="4.0" ref="led"><bounds x="10" y="25" width="1" height="1" /></element> - <element name="4.1" ref="led"><bounds x="15" y="25" width="1" height="1" /></element> - <element name="4.2" ref="led"><bounds x="20" y="25" width="1" height="1" /></element> - <element name="4.3" ref="led"><bounds x="25" y="25" width="1" height="1" /></element> - - <element name="5.0" ref="led"><bounds x="10" y="30" width="1" height="1" /></element> - <element name="5.1" ref="led"><bounds x="15" y="30" width="1" height="1" /></element> - <element name="5.2" ref="led"><bounds x="20" y="30" width="1" height="1" /></element> - <element name="5.3" ref="led"><bounds x="25" y="30" width="1" height="1" /></element> - - <element name="6.0" ref="led"><bounds x="10" y="35" width="1" height="1" /></element> - <element name="6.1" ref="led"><bounds x="15" y="35" width="1" height="1" /></element> - <element name="6.2" ref="led"><bounds x="20" y="35" width="1" height="1" /></element> - <element name="6.3" ref="led"><bounds x="25" y="35" width="1" height="1" /></element> - - <element name="7.0" ref="led"><bounds x="15" y="37.5" width="1" height="1" /></element> + <element name="0.0" ref="led"><bounds x="20" y="7.5" width="1" height="1" /></element> + + <element name="1.3" ref="led"><bounds x="10" y="10" width="1" height="1" /></element> + <element name="1.2" ref="led"><bounds x="15" y="10" width="1" height="1" /></element> + <element name="1.1" ref="led"><bounds x="20" y="10" width="1" height="1" /></element> + <element name="1.0" ref="led"><bounds x="25" y="10" width="1" height="1" /></element> + + <element name="2.3" ref="led"><bounds x="10" y="15" width="1" height="1" /></element> + <element name="2.2" ref="led"><bounds x="15" y="15" width="1" height="1" /></element> + <element name="2.1" ref="led"><bounds x="20" y="15" width="1" height="1" /></element> + <element name="2.0" ref="led"><bounds x="25" y="15" width="1" height="1" /></element> + + <element name="3.3" ref="led"><bounds x="10" y="20" width="1" height="1" /></element> + <element name="3.2" ref="led"><bounds x="15" y="20" width="1" height="1" /></element> + <element name="3.1" ref="led"><bounds x="20" y="20" width="1" height="1" /></element> + <element name="3.0" ref="led"><bounds x="25" y="20" width="1" height="1" /></element> + + <element name="4.3" ref="led"><bounds x="10" y="25" width="1" height="1" /></element> + <element name="4.2" ref="led"><bounds x="15" y="25" width="1" height="1" /></element> + <element name="4.1" ref="led"><bounds x="20" y="25" width="1" height="1" /></element> + <element name="4.0" ref="led"><bounds x="25" y="25" width="1" height="1" /></element> + + <element name="5.3" ref="led"><bounds x="10" y="30" width="1" height="1" /></element> + <element name="5.2" ref="led"><bounds x="15" y="30" width="1" height="1" /></element> + <element name="5.1" ref="led"><bounds x="20" y="30" width="1" height="1" /></element> + <element name="5.0" ref="led"><bounds x="25" y="30" width="1" height="1" /></element> + + <element name="6.3" ref="led"><bounds x="10" y="35" width="1" height="1" /></element> + <element name="6.2" ref="led"><bounds x="15" y="35" width="1" height="1" /></element> + <element name="6.1" ref="led"><bounds x="20" y="35" width="1" height="1" /></element> + <element name="6.0" ref="led"><bounds x="25" y="35" width="1" height="1" /></element> + + <element name="7.2" ref="led"><bounds x="15" y="37.5" width="1" height="1" /></element> <element name="7.1" ref="led"><bounds x="17.5" y="37.5" width="1" height="1" /></element> - <element name="7.2" ref="led"><bounds x="20" y="37.5" width="1" height="1" /></element> + <element name="7.0" ref="led"><bounds x="20" y="37.5" width="1" height="1" /></element> <element name="digit8" ref="digit"><bounds x="30.5" y="20" width="2" height="3" /></element> <element ref="text_score"><bounds x="30" y="23.2" width="3" height="0.8" /></element> diff --git a/src/mame/layout/fidel_cphantom.lay b/src/mame/layout/fidel_cphantom.lay index 3db9aa3124e..463954a61fb 100644 --- a/src/mame/layout/fidel_cphantom.lay +++ b/src/mame/layout/fidel_cphantom.lay @@ -7,7 +7,7 @@ license:CC0 <!-- define elements --> <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> - + <element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element> <element name="redb"><rect><color red="0.81" green="0.3" blue="0.29" /></rect></element> <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> <element name="disk_white"><disk><color red="0.99" green="0.99" blue="0.99" /></disk></element> @@ -38,6 +38,29 @@ license:CC0 </disk> </element> + <element name="mpos0" defstate="0"> + <rect> + <bounds x="0" y="0" width="256" height="2" /> + <color alpha="0" /> + </rect> + <disk> + <bounds state="0" x="0" y="0" width="2" height="2" /> + <bounds state="240" x="240" y="0" width="2" height="2" /> + <color red="0.9" green="0.0" blue="0.6" alpha="0.35" /> + </disk> + </element> + <element name="mpos1" defstate="0"> + <rect> + <bounds x="0" y="0" width="256" height="2" /> + <color alpha="0" /> + </rect> + <disk> + <bounds state="0" x="0" y="0" width="2" height="2" /> + <bounds state="240" x="240" y="0" width="2" height="2" /> + <color red="0.9" green="0.0" blue="0.6" alpha="0.85" /> + </disk> + </element> + <element name="text_1"> <rect><color red="0.209" green="0.209" blue="0.201" /></rect> <text string="1"><color red="0.843" green="0.678" blue="0.482" /></text> @@ -189,6 +212,7 @@ license:CC0 <element name="text_p5"> <image file="chess/wn.svg"/></element> <element name="text_p6"> <image file="chess/wp.svg"/></element> + <!-- sb board --> <element name="cblack"><rect><color red="0.209" green="0.209" blue="0.201" /></rect></element> @@ -403,6 +427,7 @@ license:CC0 </repeat> </group> + <!-- sb ui --> <element name="hlub" defstate="0"> @@ -535,6 +560,9 @@ license:CC0 <element ref="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></element> </group> + +<!-- bottom panel --> + <group name="panel"> <bounds x="0" y="0" width="122" height="17" /> @@ -635,8 +663,7 @@ license:CC0 <element ref="text_p6" ><bounds x="43.5" y="9.5" width="2.3" height="2.5" /></element> <element name="0.7" ref="led" blend="multiply"><bounds x="43.5" y="9.5" width="2.3" height="2.5" /></element> - <!-- lcd panel --> - + <!-- lcd screen --> <element ref="cwhite"><bounds x="3.5" y="5" width="20.25" height="7.5" /></element> <element ref="black"><bounds x="3.725" y="5.225" width="19.8" height="7.05" /></element> <element ref="lcd_bg"><bounds x="4.625" y="6.125" width="18" height="5.25" /></element> @@ -654,42 +681,6 @@ license:CC0 <element name="4.7" ref="ldot"><bounds x="13.3925" y="9.2375" width="0.45" height="0.45" /></element> </group> -<!-- motor status --> - - <element name="text_motor"><text string="MOTOR:"><color red="0.843" green="0.678" blue="0.482" /></text></element> - <element name="text_motoru"> - <text string="U" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="U" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motord"> - <text string="D" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="D" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorl"> - <text string="L" state="0" align="2"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="L" state="1" align="2"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorr"> - <text string="R" state="0" align="1"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="R" state="1" align="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorx"> - <text string="X" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="X" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - - <group name="motor"> - <bounds x="0" y="0" width="10" height="12" /> - <element ref="text_motor"><bounds x="0" y="0" width="10" height="2" /></element> - <element ref="cwhite"><bounds x="0" y="11" width="10" height="1" /></element> - - <element name="motor.1" ref="text_motoru"><bounds x="0" y="3" width="10" height="2" /></element> - <element name="motor.2" ref="text_motorl"><bounds x="0" y="5" width="3.5" height="2" /></element> - <element name="motor.3" ref="text_motorr"><bounds x="6.5" y="5" width="3.5" height="2" /></element> - <element name="motor.4" ref="text_motorx"><bounds x="0" y="5" width="10" height="2" /></element> - <element name="motor.0" ref="text_motord"><bounds x="0" y="7" width="10" height="2" /></element> - </group> - <!-- build screen --> @@ -701,13 +692,26 @@ license:CC0 <element ref="cwhite"><bounds x="-0.5" y="3" width="81" height="81" /></element> <group ref="sb_board"><bounds x="-20.5" y="3.5" width="121" height="80" /></group> - <group ref="sb_ui"><bounds x="-33" y="3" width="10" height="80" /></group> - <group ref="motor"><bounds x="-33" y="84.5" width="10" height="12" /></group> - <group ref="panel"><bounds x="-21" y="85" width="122" height="17" /></group> <element name="eye_led" ref="led"><bounds x="20" y="100" width="1.5" height="1.5" /></element> <element name="eye_led" ref="led"><bounds x="58.5" y="100" width="1.5" height="1.5" /></element> + + <!-- optional motor position overlay --> + <collection name="Motor Position"> + <repeat count="2"> + <param name="i" start="0" increment="1" /> + + <element name="motorx~i~" ref="mpos~i~"> + <animate name="motory" /> + <bounds state="4" x="-17.5" y="84.0" width="160" height="1.25" /> + <bounds state="136" x="-17.5" y="1.5" width="160" height="1.25" /> + </element> + </repeat> + + <element ref="blackb"><bounds x="110" y="0" width="5" height="100" /></element> + </collection> + </view> </mamelayout> diff --git a/src/mame/layout/fidel_phantom.lay b/src/mame/layout/fidel_phantom.lay index 034a75dab3a..2b84bdc80df 100644 --- a/src/mame/layout/fidel_phantom.lay +++ b/src/mame/layout/fidel_phantom.lay @@ -7,7 +7,7 @@ license:CC0 <!-- define elements --> <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> - + <element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element> <element name="redb"><rect><color red="0.81" green="0.3" blue="0.29" /></rect></element> <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> <element name="disk_white"><disk><color red="0.99" green="0.99" blue="0.99" /></disk></element> @@ -38,6 +38,29 @@ license:CC0 </disk> </element> + <element name="mpos0" defstate="0"> + <rect> + <bounds x="0" y="0" width="256" height="2" /> + <color alpha="0" /> + </rect> + <disk> + <bounds state="0" x="0" y="0" width="2" height="2" /> + <bounds state="240" x="240" y="0" width="2" height="2" /> + <color red="0.9" green="0.0" blue="0.6" alpha="0.35" /> + </disk> + </element> + <element name="mpos1" defstate="0"> + <rect> + <bounds x="0" y="0" width="256" height="2" /> + <color alpha="0" /> + </rect> + <disk> + <bounds state="0" x="0" y="0" width="2" height="2" /> + <bounds state="240" x="240" y="0" width="2" height="2" /> + <color red="0.9" green="0.0" blue="0.6" alpha="0.85" /> + </disk> + </element> + <element name="text_1"> <rect><color red="0.209" green="0.209" blue="0.201" /></rect> <text string="1"><color red="0.843" green="0.678" blue="0.482" /></text> @@ -189,6 +212,7 @@ license:CC0 <element name="text_p5"> <image file="chess/wn.svg"/></element> <element name="text_p6"> <image file="chess/wp.svg"/></element> + <!-- sb board --> <element name="cblack"><rect><color red="0.209" green="0.209" blue="0.201" /></rect></element> @@ -403,6 +427,7 @@ license:CC0 </repeat> </group> + <!-- sb ui --> <element name="hlub" defstate="0"> @@ -535,6 +560,9 @@ license:CC0 <element ref="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></element> </group> + +<!-- bottom panel --> + <group name="panel"> <bounds x="0" y="0" width="122" height="17" /> @@ -635,8 +663,7 @@ license:CC0 <element ref="text_p6" ><bounds x="43.5" y="9.5" width="2.3" height="2.5" /></element> <element name="0.7" ref="led" blend="multiply"><bounds x="43.5" y="9.5" width="2.3" height="2.5" /></element> - <!-- lcd panel --> - + <!-- lcd screen --> <element ref="cwhite"><bounds x="3.5" y="5" width="20.25" height="7.5" /></element> <element ref="black"><bounds x="3.725" y="5.225" width="19.8" height="7.05" /></element> <element ref="lcd_bg"><bounds x="4.625" y="6.125" width="18" height="5.25" /></element> @@ -654,42 +681,6 @@ license:CC0 <element name="4.7" ref="ldot"><bounds x="13.3925" y="9.2375" width="0.45" height="0.45" /></element> </group> -<!-- motor status --> - - <element name="text_motor"><text string="MOTOR:"><color red="0.843" green="0.678" blue="0.482" /></text></element> - <element name="text_motoru"> - <text string="U" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="U" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motord"> - <text string="D" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="D" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorl"> - <text string="L" state="0" align="2"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="L" state="1" align="2"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorr"> - <text string="R" state="0" align="1"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="R" state="1" align="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - <element name="text_motorx"> - <text string="X" state="0"><color red="0.209" green="0.209" blue="0.201" /></text> - <text string="X" state="1"><color red="0.9" green="0.9" blue="0.85" /></text> - </element> - - <group name="motor"> - <bounds x="0" y="0" width="10" height="12" /> - <element ref="text_motor"><bounds x="0" y="0" width="10" height="2" /></element> - <element ref="cwhite"><bounds x="0" y="11" width="10" height="1" /></element> - - <element name="motor.1" ref="text_motoru"><bounds x="0" y="3" width="10" height="2" /></element> - <element name="motor.2" ref="text_motorl"><bounds x="0" y="5" width="3.5" height="2" /></element> - <element name="motor.3" ref="text_motorr"><bounds x="6.5" y="5" width="3.5" height="2" /></element> - <element name="motor.4" ref="text_motorx"><bounds x="0" y="5" width="10" height="2" /></element> - <element name="motor.0" ref="text_motord"><bounds x="0" y="7" width="10" height="2" /></element> - </group> - <!-- build screen --> @@ -701,10 +692,23 @@ license:CC0 <element ref="cwhite"><bounds x="-0.5" y="3" width="81" height="81" /></element> <group ref="sb_board"><bounds x="-20.5" y="3.5" width="121" height="80" /></group> - <group ref="sb_ui"><bounds x="-33" y="3" width="10" height="80" /></group> - <group ref="motor"><bounds x="-33" y="84.5" width="10" height="12" /></group> - <group ref="panel"><bounds x="-21" y="85" width="122" height="17" /></group> + + <!-- optional motor position overlay --> + <collection name="Motor Position"> + <repeat count="2"> + <param name="i" start="0" increment="1" /> + + <element name="motorx~i~" ref="mpos~i~"> + <animate name="motory" /> + <bounds state="4" x="-17.5" y="84.0" width="160" height="1.25" /> + <bounds state="136" x="-17.5" y="1.5" width="160" height="1.25" /> + </element> + </repeat> + + <element ref="blackb"><bounds x="110" y="0" width="5" height="100" /></element> + </collection> + </view> </mamelayout> diff --git a/src/mame/layout/playmaker.lay b/src/mame/layout/playmaker.lay new file mode 100644 index 00000000000..fc454f7d6d6 --- /dev/null +++ b/src/mame/layout/playmaker.lay @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<!-- +license:CC0 +--> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + <disk state="1"><color red="0.5" green="0.05" blue="0.075" /></disk> + <disk state="2"><color red="1.0" green="0.1" blue="0.15" /></disk> + </element> + + +<!-- led matrix --> + + <group name="display1"> + <bounds x="0" y="0" width="36" height="21" /> + + <repeat count="5"> + <param name="y" start="0" increment="5" /> + <param name="i2" start="4" increment="-1" /> + + <repeat count="8"> + <param name="x" start="0" increment="5" /> + <param name="i1" start="7" increment="-1" /> + <element name="~i1~.~i2~" ref="led"><bounds x="~x~" y="~y~" width="1" height="1" /></element> + </repeat> + </repeat> + </group> + + +<!-- 7seg leds --> + + <group name="display2"> + <bounds x="0" y="0" width="5.5" height="3" /> + + <element name="digit8" ref="digit"><bounds x="0" y="0" width="2" height="3" /></element> + <element name="digit9" ref="digit"><bounds x="3.5" y="0" width="2" height="3" /></element> + </group> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="2.1" right="35" top="-2" bottom="38" /> + + <group ref="display1"><bounds x="12" y="0" width="21" height="36" /><orientation rotate="270" /></group> + <group ref="display2"><bounds x="4.1" y="14" width="3.9" height="8" /><orientation rotate="270" /></group> + </view> +</mamelayout> diff --git a/src/mame/layout/ssports4.lay b/src/mame/layout/ssports4.lay index cfb6545fb6e..cd2eb5121e4 100644 --- a/src/mame/layout/ssports4.lay +++ b/src/mame/layout/ssports4.lay @@ -6,25 +6,26 @@ license:CC0 <!-- define elements --> - <element name="static_white"><rect><color red="0.7" green="0.7" blue="0.7" /></rect></element> - <element name="digit" defstate="0"> - <led7seg><color red="1.0" green="0.25" blue="0.28" /></led7seg> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> </element> <element name="led" defstate="0"> - <text string=""></text> + <rect> + <bounds x="-1.5" y="-1.5" width="4" height="4" /> + <color alpha="0" /> + </rect> <disk state="0"> - <color red="0.1" green="0.025" blue="0.028" /> - <bounds x="0.25" y="0.25" width="0.5" height="0.5" /> + <color red="0.1" green="0.01" blue="0.015" /> + <bounds x="0" y="0" width="1" height="1" /> </disk> <disk state="1"> - <color red="0.5" green="0.125" blue="0.14" /> - <bounds x="0.25" y="0.25" width="0.5" height="0.5" /> + <color red="0.5" green="0.05" blue="0.075" /> + <bounds x="0" y="0" width="1" height="1" /> </disk> <disk state="2"> - <color red="1.0" green="0.25" blue="0.28" /> - <bounds x="0.25" y="0.25" width="0.5" height="0.5" /> + <color red="1.0" green="0.1" blue="0.15" /> + <bounds x="0" y="0" width="1" height="1" /> </disk> </element> @@ -32,21 +33,18 @@ license:CC0 <!-- build screen --> <view name="Internal Layout"> - <bounds left="1.5" right="11" top="0" bottom="11" /> - <element ref="static_white"><bounds x="4" y="-0.5" width="0.1" height="12" /></element> - - <!-- score panel leds --> - - <element name="0.8" ref="led"><bounds x="2.5" y="9" width="1" height="1" /></element> - <element name="1.8" ref="led"><bounds x="2.5" y="1" width="1" height="1" /></element> + <bounds left="1.5" right="10.5" top="0" bottom="11" /> - <element name="digit9" ref="digit"><bounds x="2" y="7" width="1.5" height="1" /><orientation rotate="270" /></element> - <element name="digit8" ref="digit"><bounds x="2" y="6" width="1.5" height="1" /><orientation rotate="270" /></element> - <element name="digit1" ref="digit"><bounds x="2" y="4" width="1.5" height="1" /><orientation rotate="270" /></element> - <element name="digit0" ref="digit"><bounds x="2" y="3" width="1.5" height="1" /><orientation rotate="270" /></element> + <!-- score panel leds --> + <element name="0.8" ref="led"><bounds x="2.25" y="8" width="1" height="1" /></element> + <element name="1.8" ref="led"><bounds x="2.25" y="2" width="1" height="1" /></element> - <!-- playfield leds --> + <element name="digit9" ref="digit"><bounds x="2.25" y="7.125" width="1" height="0.75" /><orientation rotate="270" /></element> + <element name="digit8" ref="digit"><bounds x="2.25" y="6.125" width="1" height="0.75" /><orientation rotate="270" /></element> + <element name="digit1" ref="digit"><bounds x="2.25" y="4.125" width="1" height="0.75" /><orientation rotate="270" /></element> + <element name="digit0" ref="digit"><bounds x="2.25" y="3.125" width="1" height="0.75" /><orientation rotate="270" /></element> + <!-- playfield leds --> <element name="7.0" ref="led"><bounds x="5" y="9" width="1" height="1" /></element> <element name="7.1" ref="led"><bounds x="5" y="8" width="1" height="1" /></element> <element name="7.2" ref="led"><bounds x="5" y="7" width="1" height="1" /></element> @@ -67,7 +65,7 @@ license:CC0 <element name="6.7" ref="led"><bounds x="6" y="2" width="1" height="1" /></element> <element name="6.8" ref="led"><bounds x="6" y="1" width="1" height="1" /></element> - <element name="9.8" ref="led"><bounds x="7" y="10" width="1" height="1" /></element> + <element name="9.8" ref="led"><bounds x="7" y="9.75" width="1" height="1" /></element> <element name="5.0" ref="led"><bounds x="7" y="9" width="1" height="1" /></element> <element name="5.1" ref="led"><bounds x="7" y="8" width="1" height="1" /></element> <element name="5.2" ref="led"><bounds x="7" y="7" width="1" height="1" /></element> @@ -77,7 +75,7 @@ license:CC0 <element name="5.6" ref="led"><bounds x="7" y="3" width="1" height="1" /></element> <element name="5.7" ref="led"><bounds x="7" y="2" width="1" height="1" /></element> <element name="5.8" ref="led"><bounds x="7" y="1" width="1" height="1" /></element> - <element name="8.8" ref="led"><bounds x="7" y="0" width="1" height="1" /></element> + <element name="8.8" ref="led"><bounds x="7" y="0.25" width="1" height="1" /></element> <element name="4.0" ref="led"><bounds x="8" y="9" width="1" height="1" /></element> <element name="4.1" ref="led"><bounds x="8" y="8" width="1" height="1" /></element> diff --git a/src/mame/layout/t3in1sa.lay b/src/mame/layout/t3in1sa.lay new file mode 100644 index 00000000000..b188837d81a --- /dev/null +++ b/src/mame/layout/t3in1sa.lay @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!-- +license:CC0 +--> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + <disk state="1"><color red="0.5" green="0.05" blue="0.075" /></disk> + <disk state="2"><color red="1.0" green="0.1" blue="0.15" /></disk> + </element> + + +<!-- led matrix --> + + <group name="display1"> + <bounds x="0" y="0" width="25" height="13" /> + + <repeat count="5"> + <param name="y" start="0" increment="3" /> + <param name="i1" start="7" increment="-1" /> + + <repeat count="9"> + <param name="x" start="0" increment="3" /> + <param name="i2" start="0" increment="1" /> + <element name="~i1~.~i2~" ref="led"><bounds x="~x~" y="~y~" width="1" height="1" /></element> + </repeat> + </repeat> + </group> + + +<!-- 7seg leds --> + + <group name="display2"> + <bounds x="0" y="0" width="10" height="3" /> + + <element name="digit9" ref="digit"><bounds x="0" y="0" width="2" height="3" /></element> + <element name="digit8" ref="digit"><bounds x="2" y="0" width="2" height="3" /></element> + <element name="digit1" ref="digit"><bounds x="6" y="0" width="2" height="3" /></element> + <element name="digit0" ref="digit"><bounds x="8" y="0" width="2" height="3" /></element> + </group> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="4" right="25" top="-2" bottom="27" /> + + <group ref="display1"><bounds x="10" y="0" width="13" height="25" /><orientation rotate="270" /></group> + <group ref="display2"><bounds x="6" y="9" width="2" height="7" /><orientation rotate="270" /></group> + + <element name="0.8" ref="led"><bounds x="6.8" y="18.33" width="0.33" height="0.33" /></element> + <element name="1.8" ref="led"><bounds x="6.8" y="6.33" width="0.33" height="0.33" /></element> + </view> +</mamelayout> diff --git a/src/mame/layout/7in1ss.lay b/src/mame/layout/t7in1ss.lay index 5fb95ac1914..8d97c5a4626 100644 --- a/src/mame/layout/7in1ss.lay +++ b/src/mame/layout/t7in1ss.lay @@ -7,13 +7,13 @@ license:CC0 <!-- define elements --> <element name="digit" defstate="0"> - <led7seg><color red="1.0" green="0.25" blue="0.28" /></led7seg> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> </element> <element name="led" defstate="0"> - <disk state="0"><color red="0.1" green="0.025" blue="0.028" /></disk> - <disk state="1"><color red="0.5" green="0.125" blue="0.14" /></disk> - <disk state="2"><color red="1.0" green="0.25" blue="0.28" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + <disk state="1"><color red="0.5" green="0.05" blue="0.075" /></disk> + <disk state="2"><color red="1.0" green="0.1" blue="0.15" /></disk> </element> diff --git a/src/mame/machine/decocass_tape.cpp b/src/mame/machine/decocass_tape.cpp index 199a11c1e47..a42c44639e6 100644 --- a/src/mame/machine/decocass_tape.cpp +++ b/src/mame/machine/decocass_tape.cpp @@ -12,6 +12,8 @@ #include "cpu/m6502/m6502.h" #include "cpu/mcs48/mcs48.h" +#include <sstream> + #define LOG_CASSETTE_STATE 0 /*************************************************************************** @@ -154,68 +156,76 @@ static uint16_t tape_crc16_byte(uint16_t crc, uint8_t data) describes the state of the tape -------------------------------------------------*/ -const char *decocass_tape_device::describe_state() +std::string decocass_tape_device::describe_state() { - static char buffer[40]; - char temprname[40]; - const char *rname = temprname; - - if (m_region == REGION_LEADER) - rname = "LEAD"; - else if (m_region == REGION_LEADER_GAP) - rname = "LGAP"; - else if (m_region == REGION_BOT) - rname = "BOT "; - else if (m_region == REGION_BOT_GAP) - rname = "BGAP"; - else if (m_region == REGION_TRAILER) - rname = "TRLR"; - else if (m_region == REGION_TRAILER_GAP) - rname = "TGAP"; - else if (m_region == REGION_EOT) - rname = "EOT "; - else if (m_region == REGION_EOT_GAP) - rname = "EGAP"; - else + std::ostringstream buffer; + util::stream_format(buffer, "{%9d=", m_clockpos); + + switch (m_region) { - char tempbname[40]; - const char *bname = tempbname; - int clk; + case REGION_LEADER: + buffer << "LEAD}"; + break; + case REGION_LEADER_GAP: + buffer << "LGAP}"; + break; + case REGION_BOT: + buffer << "BOT }"; + break; + case REGION_BOT_GAP: + buffer << "BGAP}"; + break; + case REGION_TRAILER: + buffer << "TRLR}"; + break; + case REGION_TRAILER_GAP: + buffer << "TGAP}"; + break; + case REGION_EOT: + buffer << "EOT }"; + break; + case REGION_EOT_GAP: + buffer << "EGAP}"; + break; + default: + util::stream_format(buffer, "BL%02X.", m_region - REGION_DATA_BLOCK_0); if (m_bytenum <= BYTE_PRE_GAP_33) - sprintf(tempbname, "PR%02d", m_bytenum - BYTE_PRE_GAP_0); + util::stream_format(buffer, "PR%02d", m_bytenum - BYTE_PRE_GAP_0); else if (m_bytenum == BYTE_LEADIN) - bname = "LDIN"; + buffer << "LDIN"; else if (m_bytenum == BYTE_HEADER) - bname = "HEAD"; + buffer << "HEAD"; else if (m_bytenum <= BYTE_DATA_255) - sprintf(tempbname, "BY%02X", m_bytenum - BYTE_DATA_0); + util::stream_format(buffer, "BY%02X", m_bytenum - BYTE_DATA_0); else if (m_bytenum == BYTE_CRC16_MSB) - bname = "CRCM"; + buffer << "CRCM"; else if (m_bytenum == BYTE_CRC16_LSB) - bname = "CRCL"; + buffer << "CRCL"; else if (m_bytenum == BYTE_TRAILER) - bname = "TRLR"; + buffer << "TRLR"; else if (m_bytenum == BYTE_LEADOUT) - bname = "LOUT"; - else if (m_bytenum == BYTE_LONGCLOCK) - bname = "LONG"; - else - sprintf(tempbname, "PO%02d", m_bytenum - BYTE_POSTGAP_0); - - /* in the main data area, the clock alternates at the clock rate */ - if (m_bytenum >= BYTE_LEADIN && m_bytenum <= BYTE_LEADOUT) - clk = ((uint32_t)(m_clockpos - REGION_BOT_GAP_END_CLOCK) & 1) ? 0 : 1; + buffer << "LOUT"; else if (m_bytenum == BYTE_LONGCLOCK) - clk = 1; + buffer << "LONG"; else - clk = 0; + util::stream_format(buffer, "PO%02d", m_bytenum - BYTE_POSTGAP_0); - sprintf(temprname, "BL%02X.%4s.%d.%d", m_region - REGION_DATA_BLOCK_0, bname, m_bitnum, clk); + { + // in the main data area, the clock alternates at the clock rate + int clk; + if (m_bytenum >= BYTE_LEADIN && m_bytenum <= BYTE_LEADOUT) + clk = BIT(~uint32_t(m_clockpos - REGION_BOT_GAP_END_CLOCK), 0); + else if (m_bytenum == BYTE_LONGCLOCK) + clk = 1; + else + clk = 0; + + util::stream_format(buffer, ".%d.%d}", m_bitnum, clk); + } } - sprintf(buffer, "{%9d=%s}", m_clockpos, rname); - return buffer; + return std::move(buffer).str(); } @@ -271,7 +281,7 @@ TIMER_CALLBACK_MEMBER( decocass_tape_device::tape_clock_callback ) /* log */ if (LOG_CASSETTE_STATE) - describe_state(); + describe_state(); // FIXME: is this supposed to actually do something with the result? } diff --git a/src/mame/machine/decocass_tape.h b/src/mame/machine/decocass_tape.h index da7749a2603..051e6af3784 100644 --- a/src/mame/machine/decocass_tape.h +++ b/src/mame/machine/decocass_tape.h @@ -67,7 +67,7 @@ private: uint16_t m_crc16[256]; /* CRC16 for each block */ optional_region_ptr<uint8_t> m_tape_data; - const char *describe_state(); + std::string describe_state(); TIMER_CALLBACK_MEMBER( tape_clock_callback ); }; diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp index 05066fab936..57ef3ec8fc7 100644 --- a/src/mame/machine/dgn_beta.cpp +++ b/src/mame/machine/dgn_beta.cpp @@ -2,7 +2,7 @@ // copyright-holders:Nathan Woods /*************************************************************************** - machine\dgn_beta.c (machine.c) + machine/dgn_beta.cpp Moved out of dragon.c, 2005-05-05, P.Harvey-Smith. @@ -57,21 +57,22 @@ ***************************************************************************/ -#include <functional> - -#include <cmath> #include "emu.h" -#include "debug/debugcon.h" +#include "includes/dgn_beta.h" + +#include "includes/coco.h" // for CoCo OS-9 disassembler enhancements + #include "cpu/m6809/m6809.h" +#include "imagedev/floppy.h" #include "machine/6821pia.h" -#include "includes/dgn_beta.h" -#include "includes/coco.h" #include "machine/mos6551.h" -#include "imagedev/floppy.h" +#include "machine/ram.h" -#include "debugger.h" #include "debug/debugcon.h" -#include "machine/ram.h" +#include "debugger.h" + +#include <cmath> +#include <functional> #define VERBOSE 0 @@ -118,13 +119,10 @@ void dgn_beta_state::UpdateBanks(int first, int last) int bank_start; int bank_end; int MapPage; - char page_num[10]; LOG_BANK_UPDATE(("\n\n%s Updating banks %d to %d\n", machine().describe_context(), first, last)); for(Page=first;Page<=last;Page++) { - sprintf(page_num,"bank%d",Page+1); - bank_start = Page < 16 ? Page * 0x1000 : 0xff00; bank_end = Page < 15 ? bank_start + 0xfff : Page == 15 ? 0xfbff : 0xffff; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 6c76a28c723..849ee7c2827 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -1272,6 +1272,7 @@ punchy // punchy3 // usafootb // usafootba // +usafootf // wrldtour // wrldtour2 // wrldtour3 // @@ -16668,7 +16669,6 @@ vespovar // Elektronika vfutbol // Elektronika @source:hh_tms1k.cpp -7in1ss // Tiger Electronics alphie // Playskool arcmania // Milton Bradley arrball // A-One LSI @@ -16733,6 +16733,7 @@ palmf31 // Canon palmmd8 // Canon pbmastm // Parker Bros phpball // Tomy +playmaker // Tiger Electronics qfire // Electroplay quizwizc // Coleco raisedvl // Entex @@ -16747,6 +16748,8 @@ starwbcp // Kenner (patent) stopthief // Parker Bros stopthiefp // Parker Bros (patent) subwars // Tiger Electronics +t3in1sa // Tandy Corporation +t7in1ss // Tiger Electronics tandy12 // Tandy Corporation tbreakup // Tomy tc4 // Coleco @@ -20631,6 +20634,7 @@ glxplay2 // kidnap // mac_1808 // macgalxy // +macgalxyb // (c) 1986 MAC S.A. macjungl // macjungn // nbamac // diff --git a/src/mame/video/slapfght.cpp b/src/mame/video/slapfght.cpp index eef63a3d517..0418c2d6cb8 100644 --- a/src/mame/video/slapfght.cpp +++ b/src/mame/video/slapfght.cpp @@ -136,9 +136,9 @@ WRITE_LINE_MEMBER(slapfght_state::palette_bank_w) void slapfght_state::draw_perfrman_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int layer) { - uint8_t *src = m_spriteram->buffer(); + const uint8_t *src = m_spriteram; - for (int offs = 0; offs < m_spriteram->bytes(); offs += 4) + for (int offs = 0; offs < m_spriteram.bytes(); offs += 4) { /* 0: xxxxxxxx - code @@ -186,9 +186,9 @@ uint32_t slapfght_state::screen_update_perfrman(screen_device &screen, bitmap_in void slapfght_state::draw_slapfight_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - uint8_t *src = m_spriteram->buffer(); + const uint8_t *src = m_spriteram; - for (int offs = 0; offs < m_spriteram->bytes(); offs += 4) + for (int offs = 0; offs < m_spriteram.bytes(); offs += 4) { /* 0: xxxxxxxx - code low @@ -201,8 +201,8 @@ void slapfght_state::draw_slapfight_sprites(bitmap_ind16 &bitmap, const rectangl */ int code = src[offs + 0] | ((src[offs + 2] & 0xc0) << 2); - int sy = src[offs + 3]; - int sx = (src[offs + 1] | (src[offs + 2] << 8 & 0x100)) - 13; + int sy = src[offs + 3] + 2; + int sx = (src[offs + 1] | (src[offs + 2] << 8 & 0x100)) - 17; int color = src[offs + 2] >> 1 & 0xf; int fx = 0, fy = 0; @@ -213,6 +213,9 @@ void slapfght_state::draw_slapfight_sprites(bitmap_ind16 &bitmap, const rectangl fx = fy = 1; } + if (sy > 256-8) + sy -= 256; + m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, code, color, fx, fy, sx, sy, 0); } } |