summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--hash/apple2.xml24
-rw-r--r--hash/pce_tourvision.xml229
-rw-r--r--makefile11
-rw-r--r--plugins/boot.lua5
-rw-r--r--plugins/cheat/init.lua10
-rw-r--r--plugins/cheat/simple_conv.lua33
-rw-r--r--plugins/cheatfind/init.lua33
-rw-r--r--scripts/genie.lua12
-rw-r--r--scripts/src/mame/frontend.lua6
-rw-r--r--scripts/src/osd/modules.lua25
-rw-r--r--scripts/src/osd/sdl.lua4
-rw-r--r--scripts/src/osd/sdl_cfg.lua8
-rw-r--r--src/devices/bus/a7800/a78_slot.h1
-rw-r--r--src/devices/bus/a800/a800_slot.h1
-rw-r--r--src/devices/bus/adam/exp.h1
-rw-r--r--src/devices/bus/apf/slot.h1
-rw-r--r--src/devices/bus/arcadia/slot.h1
-rw-r--r--src/devices/bus/astrocde/slot.h1
-rw-r--r--src/devices/bus/c64/exp.h1
-rw-r--r--src/devices/bus/cbm2/exp.h1
-rw-r--r--src/devices/bus/centronics/nec_p72.cpp2
-rw-r--r--src/devices/bus/chanf/slot.h1
-rw-r--r--src/devices/bus/coco/cococart.h1
-rw-r--r--src/devices/bus/coleco/exp.h1
-rw-r--r--src/devices/bus/cpc/cpc_rom.h1
-rw-r--r--src/devices/bus/crvision/slot.h1
-rw-r--r--src/devices/bus/gameboy/gb_slot.h1
-rw-r--r--src/devices/bus/gba/gba_slot.h1
-rw-r--r--src/devices/bus/generic/slot.h1
-rw-r--r--src/devices/bus/intv/slot.h1
-rw-r--r--src/devices/bus/iq151/iq151.h1
-rw-r--r--src/devices/bus/isa/omti8621.cpp2
-rw-r--r--src/devices/bus/isa/sc499.h1
-rw-r--r--src/devices/bus/kc/kc.h1
-rw-r--r--src/devices/bus/m5/slot.h1
-rw-r--r--src/devices/bus/megadrive/md_slot.h1
-rw-r--r--src/devices/bus/msx_slot/cartridge.h1
-rw-r--r--src/devices/bus/neogeo/slot.h1
-rw-r--r--src/devices/bus/nes/aladdin.h1
-rw-r--r--src/devices/bus/nes/datach.h1
-rw-r--r--src/devices/bus/nes/karastudio.h1
-rw-r--r--src/devices/bus/nes/nes_slot.h1
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.h1
-rw-r--r--src/devices/bus/nubus/nubus_image.cpp2
-rw-r--r--src/devices/bus/odyssey2/slot.h1
-rw-r--r--src/devices/bus/pce/pce_slot.h1
-rw-r--r--src/devices/bus/plus4/exp.h1
-rw-r--r--src/devices/bus/psx/memcard.h1
-rw-r--r--src/devices/bus/ql/rom.h1
-rw-r--r--src/devices/bus/rs232/null_modem.cpp7
-rw-r--r--src/devices/bus/rs232/null_modem.h2
-rw-r--r--src/devices/bus/saturn/sat_slot.h1
-rw-r--r--src/devices/bus/scv/slot.h1
-rw-r--r--src/devices/bus/sega8/sega8_slot.h1
-rw-r--r--src/devices/bus/snes/snes_slot.h1
-rw-r--r--src/devices/bus/ti99_peb/ti_rs232.h4
-rw-r--r--src/devices/bus/ti99x/990_tap.cpp2
-rw-r--r--src/devices/bus/ti99x/gromport.h1
-rw-r--r--src/devices/bus/vboy/slot.h1
-rw-r--r--src/devices/bus/vc4000/slot.h1
-rwxr-xr-xsrc/devices/bus/vcs/vcs_slot.h1
-rw-r--r--src/devices/bus/vectrex/slot.h1
-rw-r--r--src/devices/bus/vic10/exp.h1
-rw-r--r--src/devices/bus/vic20/exp.h1
-rw-r--r--src/devices/bus/vidbrain/exp.h1
-rw-r--r--src/devices/bus/wswan/slot.h1
-rw-r--r--src/devices/bus/z88/z88.h1
-rw-r--r--src/devices/cpu/sparc/mb86901.cpp7
-rw-r--r--src/devices/cpu/sparc/ss1fcode.ipp10
-rw-r--r--src/devices/imagedev/bitbngr.h1
-rw-r--r--src/devices/imagedev/cassette.h1
-rw-r--r--src/devices/imagedev/floppy.h1
-rw-r--r--src/devices/imagedev/midiin.h1
-rw-r--r--src/devices/imagedev/midiout.h1
-rw-r--r--src/devices/imagedev/printer.h1
-rw-r--r--src/devices/imagedev/snapquik.h1
-rw-r--r--src/devices/machine/hp_taco.h1
-rw-r--r--src/devices/machine/i8251.cpp4
-rw-r--r--src/devices/machine/smartmed.h1
-rw-r--r--src/emu/crsshair.cpp371
-rw-r--r--src/emu/crsshair.h98
-rw-r--r--src/emu/debug/debugcmd.cpp31
-rw-r--r--src/emu/debug/debugcmd.h3
-rw-r--r--src/emu/debug/debugcpu.cpp54
-rw-r--r--src/emu/debug/debugcpu.h5
-rw-r--r--src/emu/debug/debughlp.cpp47
-rw-r--r--src/emu/diimage.h2
-rw-r--r--src/emu/validity.cpp924
-rw-r--r--src/emu/validity.h23
-rw-r--r--src/emu/video/rgbgen.h293
-rw-r--r--src/emu/video/rgbsse.cpp6
-rw-r--r--src/emu/video/rgbsse.h251
-rw-r--r--src/emu/video/rgbutil.h8
-rw-r--r--src/emu/video/rgbvmx.h193
-rw-r--r--src/frontend/mame/mame.cpp2
-rw-r--r--src/frontend/mame/mame.h9
-rw-r--r--src/frontend/mame/ui/datfile.cpp313
-rw-r--r--src/frontend/mame/ui/datfile.h97
-rw-r--r--src/frontend/mame/ui/defimg.ipp (renamed from src/frontend/mame/ui/defimg.h)15
-rw-r--r--src/frontend/mame/ui/inifile.cpp2
-rw-r--r--src/frontend/mame/ui/inifile.h10
-rw-r--r--src/frontend/mame/ui/menu.h2
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp43
-rw-r--r--src/frontend/mame/ui/miscmenu.h3
-rw-r--r--src/frontend/mame/ui/selgame.cpp887
-rw-r--r--src/frontend/mame/ui/selgame.h28
-rw-r--r--src/frontend/mame/ui/selmenu.cpp845
-rw-r--r--src/frontend/mame/ui/selmenu.h109
-rw-r--r--src/frontend/mame/ui/selsoft.cpp554
-rw-r--r--src/frontend/mame/ui/selsoft.h14
-rw-r--r--src/frontend/mame/ui/starimg.ipp (renamed from src/frontend/mame/ui/starimg.h)15
-rw-r--r--src/frontend/mame/ui/toolbar.h110
-rw-r--r--src/frontend/mame/ui/toolbar.ipp121
-rw-r--r--src/frontend/mame/ui/ui.cpp8
-rw-r--r--src/lib/formats/bbc_dsk.cpp7
-rw-r--r--src/mame/drivers/a310.cpp16
-rw-r--r--src/mame/drivers/airbustr.cpp92
-rw-r--r--src/mame/drivers/ajax.cpp58
-rw-r--r--src/mame/drivers/apexc.cpp6
-rw-r--r--src/mame/drivers/apple2.cpp12
-rw-r--r--src/mame/drivers/apple2e.cpp20
-rw-r--r--src/mame/drivers/asuka.cpp120
-rw-r--r--src/mame/drivers/chihiro.cpp15
-rw-r--r--src/mame/drivers/ddenlovr.cpp74
-rw-r--r--src/mame/drivers/epos.cpp42
-rw-r--r--src/mame/drivers/feversoc.cpp55
-rw-r--r--src/mame/drivers/gaiden.cpp4
-rw-r--r--src/mame/drivers/galspnbl.cpp6
-rw-r--r--src/mame/drivers/jonos.cpp30
-rw-r--r--src/mame/drivers/konin.cpp73
-rw-r--r--src/mame/drivers/mbc200.cpp170
-rw-r--r--src/mame/drivers/mz80.cpp6
-rw-r--r--src/mame/drivers/nbmj8688.cpp43
-rw-r--r--src/mame/drivers/pacman.cpp4
-rw-r--r--src/mame/drivers/pdp1.cpp8
-rw-r--r--src/mame/drivers/rainbow.cpp2
-rw-r--r--src/mame/drivers/sidepckt.cpp2
-rw-r--r--src/mame/drivers/sun4.cpp330
-rw-r--r--src/mame/drivers/tim100.cpp167
-rw-r--r--src/mame/drivers/tm990189.cpp2
-rw-r--r--src/mame/drivers/tourvis.cpp21
-rw-r--r--src/mame/drivers/tx0.cpp8
-rw-r--r--src/mame/drivers/vixen.cpp12
-rw-r--r--src/mame/drivers/vt240.cpp51
-rw-r--r--src/mame/drivers/wc90b.cpp2
-rw-r--r--src/mame/includes/airbustr.h16
-rw-r--r--src/mame/includes/ajax.h12
-rw-r--r--src/mame/includes/apollo.h2
-rw-r--r--src/mame/includes/epos.h5
-rw-r--r--src/mame/includes/hp48.h2
-rw-r--r--src/mame/machine/ajax.cpp32
-rw-r--r--src/mame/machine/archimds.cpp2
-rw-r--r--src/mame/machine/coco_vhd.h2
-rw-r--r--src/mame/machine/microdrv.h1
-rw-r--r--src/mame/machine/ng_memcard.h1
-rw-r--r--src/mame/machine/osborne1.cpp7
-rw-r--r--src/mame/machine/pce220_ser.h2
-rw-r--r--src/mame/machine/sms.cpp2
-rw-r--r--src/mame/machine/x68k_hdc.h2
-rw-r--r--src/mame/mame.lst7
-rw-r--r--src/mame/video/airbustr.cpp14
-rw-r--r--src/mame/video/ajax.cpp4
-rw-r--r--src/mame/video/cave.cpp4
-rw-r--r--src/mame/video/epos.cpp14
-rw-r--r--src/mame/video/rdptpipe.cpp2
-rw-r--r--src/osd/sdl/video.cpp2
166 files changed, 4292 insertions, 3296 deletions
diff --git a/hash/apple2.xml b/hash/apple2.xml
index 62ba71b2585..1f4e1b3b10f 100644
--- a/hash/apple2.xml
+++ b/hash/apple2.xml
@@ -571,7 +571,7 @@
<software name="aklabeth">
<description>Akalabeth - World of Doom</description>
- <year>19??</year>
+ <year>1979</year>
<publisher>California Pacific Computer</publisher>
<part name="flop1" interface="floppy_5_25">
@@ -629,7 +629,7 @@
<software name="alien">
<description>Alien</description>
- <year>19??</year>
+ <year>1982</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="flop1" interface="floppy_5_25">
@@ -1932,7 +1932,7 @@
<software name="bbcstlwf">
<description>Beyond Beyond Castle Wolfenstein</description>
- <year>19??</year>
+ <year>1984</year>
<publisher>Mindscape</publisher>
<part name="flop11" interface="floppy_5_25">
@@ -2110,7 +2110,7 @@
<software name="betedugv">
<description>La Bete du Gevaudan (crack)</description>
- <year>19??</year>
+ <year>1985</year>
<publisher>Cil</publisher>
<part name="flop11" interface="floppy_5_25">
@@ -2168,7 +2168,7 @@
<software name="bilestod">
<description>The Bilestoad (crack)</description>
- <year>19??</year>
+ <year>1982</year>
<publisher>Mangrove Earthshoe</publisher>
<part name="flop11" interface="floppy_5_25">
@@ -3614,7 +3614,7 @@
<software name="cmpairna">
<description>Computer Air Combat - New Aircraft</description>
<year>198?</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3626,7 +3626,7 @@
<software name="cmpambsh">
<description>Computer Ambush</description>
<year>1982</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3638,7 +3638,7 @@
<software name="cmpbaseb">
<description>Computer Baseball</description>
<year>1981</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3650,7 +3650,7 @@
<software name="cmpbsmrk">
<description>Computer Bismarck</description>
<year>1980</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3662,7 +3662,7 @@
<software name="cmpcnfl">
<description>Computer Conflict</description>
<year>1980</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3674,7 +3674,7 @@
<software name="cmpnapol">
<description>Computer Napoleonics</description>
<year>1980</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
@@ -3686,7 +3686,7 @@
<software name="cmpqb">
<description>Computer Quarterback</description>
<year>1981</year>
- <publisher>Strategic Simluations, Inc.</publisher>
+ <publisher>Strategic Simulations, Inc.</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="143360">
diff --git a/hash/pce_tourvision.xml b/hash/pce_tourvision.xml
index 6c3d736309c..4d7ae85b830 100644
--- a/hash/pce_tourvision.xml
+++ b/hash/pce_tourvision.xml
@@ -14,18 +14,20 @@
</part>
</software>
+
<software name="bullfght">
<description>Bull Fight - Ring no Haja (Tourvision PCE bootleg)</description>
<year>1989</year>
<publisher>bootleg (Tourvision) / Cream</publisher>
<part name="cart" interface="tourvision_cart">
- <dataarea name="rom" size="0x060000">
+ <dataarea name="rom" size="393216">
<!-- verified identical -->
<rom name="bull fight - ring no haja (japan).pce" size="393216" crc="5c4d1991" sha1="6cd94e6209da2939752ab6b1c2d46e5b48c8e0cb" offset="000000" />
</dataarea>
</part>
</software>
+
<!--1943 Kai -->
<software name="1943kai">
<description>1943 Kai (Tourvision PCE bootleg)</description>
@@ -39,6 +41,21 @@
</part>
</software>
+
+ <!--Adventure Island -->
+ <software name="advislnd">
+ <description>Adventure Island (Tourvision PCE bootleg)</description>
+ <year>1991</year>
+ <publisher>bootleg (Tourvision) / Hudson Soft</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE advislnd -->
+ <rom name="adventure_island.bin" size="1048576" crc="5d57f1c7" sha1="e4becb5175c0ca945f86fa199bb94cbd2399bd2d" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Aero Blasters - Hudson / Kaneko -->
<software name="aeroblst">
<description>Aero Blasters (Tourvision PCE bootleg)</description>
@@ -53,6 +70,20 @@
</software>
+ <!--Alice In Wonderland -->
+ <software name="alice">
+ <description>Alice In Wonderland (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Face</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE alice -->
+ <rom name="alice_in_wonderland.bin" size="1048576" crc="d1e941ef" sha1="7ca02fee191a270df29764e3eca1f93bd996622b" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--After Burner -->
<software name="aburner2">
<description>After Burner (Tourvision PCE bootleg)</description>
@@ -277,6 +308,20 @@
</software>
+ <!--Drop Rock Hora Hora -->
+ <software name="droprock">
+ <description>Drop Rock Hora Hora (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Data East</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE droprock -->
+ <rom name="drop_rock_hora_hora.bin" size="1048576" crc="66cf9db8" sha1="66d1d916a6f13a52ca164fda740fb532386992be" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Dragon Spirit -->
<software name="dspirit">
<description>Dragon Spirit (Tourvision PCE bootleg)</description>
@@ -311,6 +356,20 @@ Notes:
</software>
+ <!--Fighting Run -->
+ <software name="fightrun">
+ <description>Fighting Run (Tourvision PCE bootleg)</description>
+ <year>1991</year>
+ <publisher>bootleg (Tourvision) / Nichibutsu</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE fightrun -->
+ <rom name="fighting_run.bin" size="1048576" crc="004bba0a" sha1="9f3933eeb60fcd95d05db093156bce65dc4a82fd" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Final Blaster -->
<software name="finlblst">
<description>Final Blaster (Tourvision PCE bootleg)</description>
@@ -381,8 +440,6 @@ Notes:
</software>
-
-
<!--Gunhed -->
<software name="gunhed">
<description>GunHed (Tourvision PCE bootleg)</description>
@@ -411,7 +468,21 @@ Notes:
</software>
- <!--Jakie Chan - Hudson -->
+ <!--Image Fight -->
+ <software name="imagefgt">
+ <description>Image Fight (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Irem</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE imagefgt -->
+ <rom name="image_fight.bin" size="1048576" crc="ad6a4eb1" sha1="b802f718a3a199f9257e19b7044482cc05c1c7a6" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
+ <!--Jackie Chan - Hudson -->
<software name="jchan">
<description>Jackie Chan (Tourvision PCE bootleg)</description>
<year>1991</year>
@@ -425,7 +496,7 @@ Notes:
</software>
- <!--jinmu Densho -->
+ <!--Jinmu Densho -->
<software name="jinmu">
<description>Jinmu Denshou (Tourvision PCE bootleg)</description>
<year>1989</year>
@@ -439,6 +510,20 @@ Notes:
</software>
+ <!--Kato Chan &amp; Ken Chan -->
+ <software name="katochan">
+ <description>Kato Chan &amp; Ken Chan (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Hudson</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE katochan -->
+ <rom name="kato_ken.bin" size="1048576" crc="47993b98" sha1="1febf57b96df7649675b944df01cec48daa4e12c" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Kiki Kaikai -->
<software name="kikikai">
<description>Kiki Kaikai (Tourvision PCE bootleg)</description>
@@ -467,7 +552,6 @@ Notes:
</software>
-
<!--Makyo Densetsu - The Legenary Axe - Victor Musical Industries, Inc. -->
<software name="makyoden">
<description>Makyou Densetsu - The Legenary Axe (Tourvision PCE bootleg)</description>
@@ -482,6 +566,20 @@ Notes:
</software>
+ <!--Mesopotamia -->
+ <software name="mesopot">
+ <description>Mesopotamia (Tourvision PCE bootleg)</description>
+ <year>1991</year>
+ <publisher>bootleg (Tourvision) / Atlus</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE mesopot -->
+ <rom name="mesopotamia.bin" size="1048576" crc="ea8af850" sha1="1b50db3fadc0b635527fd047cfede556b1de3547" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Mizubaku Daibouken Liquid Kids -->
<software name="mizubaku">
<description>Mizubaku Daibouken Liquid Kids (Tourvision PCE bootleg)</description>
@@ -514,7 +612,7 @@ Notes:
<software name="nryukend">
<description>Ninja Ryukenden (Tourvision PCE bootleg)</description>
<year>1992</year>
- <publisher>bootleg (Tourvision) / Temco / Hudson Soft</publisher>
+ <publisher>bootleg (Tourvision) / Tecmo / Hudson Soft</publisher>
<part name="cart" interface="tourvision_cart">
<dataarea name="rom" size="524288">
<!-- verified identical -->
@@ -538,6 +636,20 @@ Notes:
</software>
+ <!--Ordyne -->
+ <software name="ordyne">
+ <description>Ordyne (Tourvision PCE bootleg)</description>
+ <year>1991</year>
+ <publisher>bootleg (Tourvision) / Namco</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE ordyne -->
+ <rom name="ordyne.bin" size="1048576" crc="885363ed" sha1="2e66a3ba7575fd68df10e50b6833088d2fe220eb" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Outrun -->
<software name="outrun">
<description>Out Run (Tourvision PCE bootleg)</description>
@@ -659,6 +771,20 @@ Notes:
</software>
+ <!--Power Sports -->
+ <software name="psports">
+ <description>Power Sports (Tourvision PCE bootleg)</description>
+ <year>1992</year>
+ <publisher>bootleg (Tourvision) / Hudson</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE psports -->
+ <rom name="power_sports.bin" size="1048576" crc="6e38b029" sha1="17d70f2bb0bb1d13dc4b5a9f1605e69707e9335d" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Pro Yakyuu World Stadium '91 -->
<software name="proyak91">
<description>Pro Yakyuu World Stadium '91 (Tourvision PCE bootleg)</description>
@@ -701,6 +827,20 @@ Notes:
</software>
+ <!--Puzznic -->
+ <software name="puzznic">
+ <description>Puzznic (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Taito</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE puzznic -->
+ <rom name="puzznic.bin" size="1048576" crc="1e73808a" sha1="fa7f56426aad9b05dea0df4ddd78c2cb0fa399aa" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Raiden -->
<software name="raiden">
<description>Raiden (Tourvision PCE bootleg)</description>
@@ -818,6 +958,34 @@ Notes:
</software>
+ <!--Sokoban World -->
+ <software name="sokoban">
+ <description>Sokoban World (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Media Rings Corp.</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x20000 matches PCE sokoban -->
+ <rom name="sokoban_world.bin" size="1048576" crc="97e966ec" sha1="3002c88d776849ed065d142458048d390140ed96" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
+ <!--Soldier Blade -->
+ <software name="soldblad">
+ <description>Soldier Blade (Tourvision PCE bootleg)</description>
+ <year>1992</year>
+ <publisher>bootleg (Tourvision) / Hudson Soft</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x80000 matches PCE soldblad -->
+ <rom name="soldier_blade.bin" size="1048576" crc="99d53041" sha1="51c02df6d9666459a0f7cfdcd84b29e3be856460" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Son Son II -->
<software name="sonson2">
<description>Son Son II (Tourvision PCE bootleg)</description>
@@ -853,6 +1021,20 @@ Notes:
</software>
+ <!--Spin Pair -->
+ <software name="spinpair">
+ <description>Spin Pair (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Hudson Soft</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE spinpair -->
+ <rom name="spin_pair.bin" size="1048576" crc="a2d2d0a1" sha1="4590e9c46c830d051a04efb40088fbb99109402c" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Super Star Soldier - Hudson / Kaneko -->
<software name="sssoldr">
<description>Super Star Soldier (Tourvision PCE bootleg)</description>
@@ -875,6 +1057,7 @@ Notes:
<part name="cart" interface="tourvision_cart">
<dataarea name="rom" size="262144">
<!-- verified identical -->
+ <!-- 1MB Original Dump - super_volley_ball.bin - 8a32a1ca - 80144fb4035415eb9b2c67d78d55757ed0d641a1 -->
<rom name="super volleyball (japan).pce" size="262144" crc="ce2e4f9f" sha1="46dd4acebe25de38f28e56cf149b24b42f3aef31" offset="000000" />
</dataarea>
</part>
@@ -930,6 +1113,20 @@ Notes:
</software>
+ <!--The NewZealand Story -->
+ <software name="tnzs">
+ <description>The NewZealand Story (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Taito</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE tnzs -->
+ <rom name="the_newzealand_story.bin" size="1048576" crc="53b25bf6" sha1="5f04cdbd37df84d20692d05f72fb4e28f0d3f79d" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--Toy Shop Boys -->
<software name="toyshopb">
<description>Toy Shop Boys (Tourvision PCE bootleg)</description>
@@ -944,6 +1141,20 @@ Notes:
</software>
+ <!--Tricky -->
+ <software name="tricky">
+ <description>Tricky (Tourvision PCE bootleg)</description>
+ <year>1990</year>
+ <publisher>bootleg (Tourvision) / Taito</publisher>
+ <part name="cart" interface="tourvision_cart">
+ <dataarea name="rom" size="1048576">
+ <!-- 0x40000 matches PCE tricky -->
+ <rom name="tricky.bin" size="1048576" crc="9fee2fcd" sha1="ed6fb947aa4758b74d584e71d0720dc217c1af41" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<!--
USA Pro Basketball - Aicom
@@ -1034,6 +1245,7 @@ Notes:
</part>
</software>
+
<!--Xevious -->
<software name="xevious">
<description>Xevious (Tourvision PCE bootleg)</description>
@@ -1061,6 +1273,3 @@ Notes:
</software>
</softwarelist>
-
-
-
diff --git a/makefile b/makefile
index 0f0cca80955..09ae6636549 100644
--- a/makefile
+++ b/makefile
@@ -140,6 +140,12 @@ endif
ifneq ($(filter %86,$(UNAME_P)),)
PLATFORM := x86
endif
+ifneq ($(filter alpha,$(UNAME_M)),)
+PLATFORM := alpha
+endif
+ifneq ($(filter alpha,$(UNAME_P)),)
+PLATFORM := alpha
+endif
ifneq ($(filter arm%,$(UNAME_M)),)
PLATFORM := arm
endif
@@ -155,6 +161,11 @@ endif
ifneq ($(filter powerpc,$(UNAME_P)),)
PLATFORM := powerpc
endif
+ifneq ($(filter mips64%,$(UNAME_M)),)
+ifeq ($(shell getconf LONG_BIT),64)
+PLATFORM := mips64
+endif
+endif
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
OS := linux
endif
diff --git a/plugins/boot.lua b/plugins/boot.lua
index 11ee6682bae..2e5b46e679d 100644
--- a/plugins/boot.lua
+++ b/plugins/boot.lua
@@ -2,7 +2,8 @@
-- copyright-holders:Miodrag Milanovic
require('lfs')
-local function env_replace(str)
+-- add helper to lfs for plugins to use
+function lfs.env_replace(str)
local pathsep = package.config:sub(1,1)
local function dorep(val)
ret = os.getenv(val)
@@ -19,7 +20,7 @@ local function env_replace(str)
end
return str
end
-local dir = env_replace(manager:options().entries.pluginspath:value())
+local dir = lfs.env_replace(manager:options().entries.pluginspath:value())
package.path = package.path .. ";" .. dir .. "/?.lua;" .. dir .. "/?/init.lua"
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index e2d44150e22..303ffad6ffd 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -71,7 +71,6 @@ function cheat.startplugin()
local function load_cheats()
local filename = emu.romname()
- local json = require("json")
local newcheats = {}
local file = emu.file(manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat") , 1)
if emu.softname() ~= "" then
@@ -81,7 +80,7 @@ function cheat.startplugin()
end
end
end
- function add(addcheats)
+ local function add(addcheats)
if not next(newcheats) then
newcheats = addcheats
else
@@ -90,6 +89,7 @@ function cheat.startplugin()
end
end
end
+ local json = require("json")
local ret = file:open(filename .. ".json")
while not ret do
add(json.parse(file:read(file:size())))
@@ -101,6 +101,12 @@ function cheat.startplugin()
add(xml.conv_cheat(file:read(file:size())))
ret = file:open_next()
end
+ local simp = require("cheat/simple_conv")
+ ret = file:open("cheat.simple")
+ while not ret do
+ add(simp.conv_cheat(filename, file:read(file:size())))
+ ret = file:open_next()
+ end
return newcheats
end
diff --git a/plugins/cheat/simple_conv.lua b/plugins/cheat/simple_conv.lua
new file mode 100644
index 00000000000..bb209d7af86
--- /dev/null
+++ b/plugins/cheat/simple_conv.lua
@@ -0,0 +1,33 @@
+local simple = {}
+
+-- converter for simple cheats
+-- simple cheats are single address every frame ram cheats in one file called cheat.simple
+-- format: <set name>,<cputag>,<hex offset>,<b|w|d|q - size>,<hex value>,<desc>
+-- only program address space is supported, comments are prepended with ;
+-- size is b - u8, w - u16, d - u32, q - u64
+function simple.conv_cheat(romset, data)
+ local cheats = {}
+ for line in data:gmatch('([^\n;]+)') do
+ local set, cputag, offset, size, val, name = line:match('([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),(.+)')
+ if set == romset then
+ local cheat = {}
+ cheat.desc = name
+ cheat.space = { cpup = { tag = cputag, type = "program" } }
+ if size == "w" then
+ size "u16"
+ elseif size == "d" then
+ size = "u32"
+ elseif size == "q" then
+ size = "u64"
+ else
+ size = "u8"
+ end
+ cheat.script = { run = "cpup:write_" .. size .. "(0x" .. offset .. ",0x" .. val .. ", true)" }
+ cheats[#cheats + 1] = cheat
+ end
+ end
+ return cheats
+end
+
+return simple
+
diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua
index 659ffca33db..05a0c541e90 100644
--- a/plugins/cheatfind/init.lua
+++ b/plugins/cheatfind/init.lua
@@ -581,21 +581,21 @@ function cheatfind.startplugin()
if wid == "h" then
wid = "u16"
form = "%08x %04x"
- xmlcheat = "pw"
+ xmlcheat = "w"
elseif wid == "l" then
wid = "u32"
form = "%08x %08x"
- xmlcheat = "pd"
+ xmlcheat = "d"
elseif wid == "j" then
wid = "u64"
form = "%08x %016x"
- xmlcheat = "pq"
+ xmlcheat = "q"
else
wid = "u8"
form = "%08x %02x"
- xmlcheat = "pb"
+ xmlcheat = "b"
end
- xmlcheat = string.format("<mamecheat version=1>\n<cheat desc=\"%s\">\n<script state=\"run\">\n<action>%s.%s@%X=%X</action>\n</script>\n</cheat>\n</mamecheat>", cheat.desc, dev.tag:sub(2), xmlcheat, match.addr, match.newval)
+
if dev.space.shortname then
cheat.ram = { ram = dev.tag }
@@ -611,15 +611,30 @@ function cheatfind.startplugin()
_G.ce.inject(cheat)
end
elseif match.mode == 2 then
- local filename = string.format("%s/%s_%08X_cheat", manager:machine():options().entries.cheatpath:value():match("([^;]+)"), emu.romname(), match.addr)
+ -- lfs.env_replace is defined in boot.lua
+ local setname = emu.romname()
+ if emu.softname() ~= "" then
+ for name, image in pairs(manager:machine().images) do
+ if image:exists() and image:software_list_name() ~= "" then
+ setname = image:software_list_name() .. "/" .. emu.softname()
+ end
+ end
+ end
+ local cheatpath = lfs.env_replace(manager:machine():options().entries.cheatpath:value()):match("([^;]+)")
+ local filename = string.format("%s/%s_%08X_cheat", cheatpath, setname, match.addr)
local json = require("json")
local file = io.open(filename .. ".json", "w")
if file then
file:write(json.stringify({[1] = cheat}, {indent = true}))
file:close()
- file = io.open(filename .. ".xml", "w")
- file:write(xmlcheat)
- file:close()
+ if not dev.space.shortname then -- no xml or simple for ram_device cheat
+ file = io.open(filename .. ".xml", "w")
+ file:write(string.format("<mamecheat version=1>\n<cheat desc=\"%s\">\n<script state=\"run\">\n<action>%s.pp%s@%X=%X</action>\n</script>\n</cheat>\n</mamecheat>", cheat.desc, dev.tag:sub(2), xmlcheat, match.addr, match.newval))
+ file:close()
+ file = io.open(cheatpath .. "/cheat.simple", "a")
+ file:write(string.format("%s,%s,%X,%s,%X,%s\n", setname, dev.tag, match.addr, xmlcheat, match.newval, cheat.desc))
+ file:close()
+ end
manager:machine():popmessage("Cheat written to " .. filename)
else
manager:machine():popmessage("Unable to write file\nCheck cheatpath dir exists")
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 903d77ce3ed..d07ff394ce2 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -982,6 +982,12 @@ end
end
end
+if (_OPTIONS["PLATFORM"]=="alpha") then
+ defines {
+ "PTR64=1",
+ }
+end
+
if (_OPTIONS["PLATFORM"]=="arm") then
buildoptions {
"-Wno-cast-align",
@@ -997,6 +1003,12 @@ if (_OPTIONS["PLATFORM"]=="arm64") then
}
end
+if (_OPTIONS["PLATFORM"]=="mips64") then
+ defines {
+ "PTR64=1",
+ }
+end
+
local subdir
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]
diff --git a/scripts/src/mame/frontend.lua b/scripts/src/mame/frontend.lua
index 2ed2721c600..d1660dc0f22 100644
--- a/scripts/src/mame/frontend.lua
+++ b/scripts/src/mame/frontend.lua
@@ -134,7 +134,7 @@ files {
MAME_DIR .. "src/frontend/mame/ui/datfile.h",
MAME_DIR .. "src/frontend/mame/ui/datmenu.cpp",
MAME_DIR .. "src/frontend/mame/ui/datmenu.h",
- MAME_DIR .. "src/frontend/mame/ui/defimg.h",
+ MAME_DIR .. "src/frontend/mame/ui/defimg.ipp",
MAME_DIR .. "src/frontend/mame/ui/dirmenu.cpp",
MAME_DIR .. "src/frontend/mame/ui/dirmenu.h",
MAME_DIR .. "src/frontend/mame/ui/icorender.h",
@@ -156,8 +156,8 @@ files {
MAME_DIR .. "src/frontend/mame/ui/selsoft.h",
MAME_DIR .. "src/frontend/mame/ui/sndmenu.cpp",
MAME_DIR .. "src/frontend/mame/ui/sndmenu.h",
- MAME_DIR .. "src/frontend/mame/ui/starimg.h",
- MAME_DIR .. "src/frontend/mame/ui/toolbar.h",
+ MAME_DIR .. "src/frontend/mame/ui/starimg.ipp",
+ MAME_DIR .. "src/frontend/mame/ui/toolbar.ipp",
MAME_DIR .. "src/frontend/mame/ui/utils.cpp",
MAME_DIR .. "src/frontend/mame/ui/utils.h",
MAME_DIR .. "src/frontend/mame/ui/widgets.cpp",
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index 7b24531fbf5..25a7aca2c0e 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -35,6 +35,14 @@ function addoptionsfromstring(str)
end
end
+function pkgconfigcmd()
+ local pkgconfig = os.getenv("PKG_CONFIG")
+ if pkgconfig == nil then
+ return "pkg-config"
+ end
+ return pkgconfig
+end
+
function osdmodulesbuild()
removeflags {
@@ -243,11 +251,12 @@ function qtdebuggerbuild()
local version = str_to_version(_OPTIONS["gcc_version"])
if _OPTIONS["gcc"]~=nil and (string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "asmjs")) then
configuration { "gmake or ninja" }
- if (version >= 30600) then
- buildoptions {
- "-Wno-inconsistent-missing-override",
- }
- end
+ if (version >= 30600) then
+ buildoptions {
+ "-Wno-inconsistent-missing-override",
+ }
+ end
+ configuration { }
end
files {
@@ -343,7 +352,7 @@ function qtdebuggerbuild()
}
else
buildoptions {
- backtick("pkg-config --cflags Qt5Widgets"),
+ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
}
end
end
@@ -378,7 +387,7 @@ function osdmodulestargetconf()
if _OPTIONS["NO_USE_MIDI"]~="1" then
if _OPTIONS["targetos"]=="linux" then
- local str = backtick("pkg-config --libs alsa")
+ local str = backtick(pkgconfigcmd() .. " --libs alsa")
addlibfromstring(str)
addoptionsfromstring(str)
elseif _OPTIONS["targetos"]=="macosx" then
@@ -419,7 +428,7 @@ function osdmodulestargetconf()
"Qt5Widgets",
}
else
- local str = backtick("pkg-config --libs Qt5Widgets")
+ local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets")
addlibfromstring(str)
addoptionsfromstring(str)
end
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index ce450349cee..44b957d8dde 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -42,7 +42,7 @@ function maintargetosdoptions(_target,_subtarget)
links {
"SDL2_ttf",
}
- local str = backtick("pkg-config --libs fontconfig")
+ local str = backtick(pkgconfigcmd() .. " --libs fontconfig")
addlibfromstring(str)
addoptionsfromstring(str)
end
@@ -132,7 +132,7 @@ function sdlconfigcmd()
if _OPTIONS["targetos"]=="asmjs" then
return "sdl2-config"
elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
- return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
+ return pkgconfigcmd() .. " sdl2"
else
return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
end
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 0fd15e5ca27..b73c9253819 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -1,6 +1,8 @@
-- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team
+dofile('modules.lua')
+
forcedincludes {
MAME_DIR .. "src/osd/sdl/sdlprefix.h"
}
@@ -52,7 +54,7 @@ end
if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
buildoptions {
- backtick("pkg-config --cflags alsa"),
+ backtick(pkgconfigcmd() .. " --cflags alsa"),
}
end
@@ -94,7 +96,7 @@ if BASE_TARGETOS=="unix" then
}
if _OPTIONS["targetos"]~="asmjs" then
buildoptions {
- backtick("pkg-config --cflags fontconfig"),
+ backtick(pkgconfigcmd() .. " --cflags fontconfig"),
}
end
end
@@ -121,7 +123,7 @@ elseif _OPTIONS["targetos"]=="linux" then
}
else
buildoptions {
- backtick("pkg-config --cflags Qt5Widgets"),
+ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
}
end
elseif _OPTIONS["targetos"]=="macosx" then
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h
index cbdc38741f2..b230c0913ba 100644
--- a/src/devices/bus/a7800/a78_slot.h
+++ b/src/devices/bus/a7800/a78_slot.h
@@ -107,7 +107,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "a7800_cart"; }
virtual const char *file_extensions() const override { return "bin,a78"; }
virtual device_image_partialhash_func get_partial_hash() const override { return &a78_partialhash; }
diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h
index 6efdd0839e9..c55ff587311 100644
--- a/src/devices/bus/a800/a800_slot.h
+++ b/src/devices/bus/a800/a800_slot.h
@@ -108,7 +108,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "a8bit_cart"; }
virtual const char *file_extensions() const override { return "bin,rom,car"; }
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index bd764c667c9..270b96bfd44 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -84,7 +84,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "adam_rom"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h
index e8260ab55bc..cbfe11fb28c 100644
--- a/src/devices/bus/apf/slot.h
+++ b/src/devices/bus/apf/slot.h
@@ -79,7 +79,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "apfm1000_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h
index e018b40595d..2fa5f0419be 100644
--- a/src/devices/bus/arcadia/slot.h
+++ b/src/devices/bus/arcadia/slot.h
@@ -68,7 +68,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "arcadia_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h
index 1a28ccf4b96..7590c2acab6 100644
--- a/src/devices/bus/astrocde/slot.h
+++ b/src/devices/bus/astrocde/slot.h
@@ -68,7 +68,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "astrocde_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index f380e22e39d..0d8a6037d82 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -146,7 +146,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "c64_cart,vic10_cart"; }
virtual const char *file_extensions() const override { return "80,a0,e0,crt"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h
index ce5daf10dbb..c1fd7b589ee 100644
--- a/src/devices/bus/cbm2/exp.h
+++ b/src/devices/bus/cbm2/exp.h
@@ -93,7 +93,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "cbm2_cart"; }
virtual const char *file_extensions() const override { return "20,40,60"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/centronics/nec_p72.cpp b/src/devices/bus/centronics/nec_p72.cpp
index 8ef53e54513..0c45018359d 100644
--- a/src/devices/bus/centronics/nec_p72.cpp
+++ b/src/devices/bus/centronics/nec_p72.cpp
@@ -35,7 +35,7 @@ const rom_entry *nec_p72_t::device_rom_region() const
// ADDRESS_MAP( p72_mem )
//-------------------------------------------------
-static ADDRESS_MAP_START( p72_mem, AS_PROGRAM, 8, nec_p72_t )
+static ADDRESS_MAP_START( p72_mem, AS_PROGRAM, 16, nec_p72_t )
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* 1Mbit firmware */
AM_RANGE(0x100000, 0x1fffff) AM_RAM /* 1Mbit external RAM */ /* TODO might be 2x1Mbit */
ADDRESS_MAP_END
diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h
index 78ee692640e..e5ad8ab06bc 100644
--- a/src/devices/bus/chanf/slot.h
+++ b/src/devices/bus/chanf/slot.h
@@ -82,7 +82,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "channelf_cart"; }
virtual const char *file_extensions() const override { return "bin,chf"; }
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index f92459b4388..1c0d3137caa 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -99,7 +99,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "coco_cart"; }
virtual const char *file_extensions() const override { return "ccc,rom"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/coleco/exp.h b/src/devices/bus/coleco/exp.h
index 09511c5357f..3d8091c215b 100644
--- a/src/devices/bus/coleco/exp.h
+++ b/src/devices/bus/coleco/exp.h
@@ -90,7 +90,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return ":coleco_cart"; }
virtual const char *file_extensions() const override { return "rom,col,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h
index ee758aba761..87cf006f202 100644
--- a/src/devices/bus/cpc/cpc_rom.h
+++ b/src/devices/bus/cpc/cpc_rom.h
@@ -37,7 +37,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "cpc_rom"; }
virtual const char *file_extensions() const override { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
UINT8* base() { return m_base.get(); }
diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h
index d3bb02d6790..83819e6535b 100644
--- a/src/devices/bus/crvision/slot.h
+++ b/src/devices/bus/crvision/slot.h
@@ -73,7 +73,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "crvision_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h
index 497eaac38f4..49fefc591ea 100644
--- a/src/devices/bus/gameboy/gb_slot.h
+++ b/src/devices/bus/gameboy/gb_slot.h
@@ -136,7 +136,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "gameboy_cart"; }
virtual const char *file_extensions() const override { return "bin,gb,gbc"; }
diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h
index 62c25bc6674..d9972f1813d 100644
--- a/src/devices/bus/gba/gba_slot.h
+++ b/src/devices/bus/gba/gba_slot.h
@@ -103,7 +103,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "gba_cart"; }
virtual const char *file_extensions() const override { return "gba,bin"; }
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index 5cef5d21d92..3d6d2042b59 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -125,7 +125,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return m_must_be_loaded; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return m_interface; }
virtual const char *file_extensions() const override { return m_extensions; }
diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h
index 7d970f18a52..0c1670f071c 100644
--- a/src/devices/bus/intv/slot.h
+++ b/src/devices/bus/intv/slot.h
@@ -115,7 +115,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "intv_cart"; }
virtual const char *file_extensions() const override { return "bin,int,rom,itv"; }
diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h
index 292362f0d45..c0d72529870 100644
--- a/src/devices/bus/iq151/iq151.h
+++ b/src/devices/bus/iq151/iq151.h
@@ -103,7 +103,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "iq151_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp
index 167ff406b91..85312f8dae4 100644
--- a/src/devices/bus/isa/omti8621.cpp
+++ b/src/devices/bus/isa/omti8621.cpp
@@ -61,9 +61,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "awd"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_create(int format_type, util::option_resolution *format_options) override;
protected:
diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h
index 390b79dac5c..d868612f2a6 100644
--- a/src/devices/bus/isa/sc499.h
+++ b/src/devices/bus/isa/sc499.h
@@ -41,7 +41,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return "sc499_cass"; }
virtual const char *file_extensions() const override { return "act,ct"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
UINT8 *read_block(int block_num);
void write_block(int block_num, UINT8 *ptr);
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index e31007ea85e..bc8160ebce6 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -101,7 +101,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "kc_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h
index 9c72dc3c32a..c35384a0267 100644
--- a/src/devices/bus/m5/slot.h
+++ b/src/devices/bus/m5/slot.h
@@ -82,7 +82,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "m5_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index b6cb59147d5..09ae5a84111 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -161,7 +161,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return m_must_be_loaded; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index da3c631859e..e9519a90d48 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -50,7 +50,6 @@ public:
virtual bool is_creatable() const override { return false; }
virtual bool must_be_loaded() const override { return false; }
virtual bool is_reset_on_load() const override { return true; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "msx_cart"; }
virtual const char *file_extensions() const override { return "mx1,bin,rom"; }
diff --git a/src/devices/bus/neogeo/slot.h b/src/devices/bus/neogeo/slot.h
index 482e096272b..2a47752c79d 100644
--- a/src/devices/bus/neogeo/slot.h
+++ b/src/devices/bus/neogeo/slot.h
@@ -203,7 +203,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "neo_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index 6d2caeba96d..1f7800242ea 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -62,7 +62,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "ade_cart"; }
virtual const char *file_extensions() const override { return "nes,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h
index a2ae7df2753..e5d137357c2 100644
--- a/src/devices/bus/nes/datach.h
+++ b/src/devices/bus/nes/datach.h
@@ -64,7 +64,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "datach_cart"; }
virtual const char *file_extensions() const override { return "nes,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index 8d75e3d555d..3aeb96c118a 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -61,7 +61,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "ks_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 65b43e7fb5d..3d843381d85 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -360,7 +360,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "nes_cart"; }
virtual const char *file_extensions() const override { return "nes,unf,unif"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual device_image_partialhash_func get_partial_hash() const override { return &nes_partialhash; }
// slot interface overrides
diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h
index 53dd8eb66a3..94d89736cac 100644
--- a/src/devices/bus/nes/sunsoft_dcs.h
+++ b/src/devices/bus/nes/sunsoft_dcs.h
@@ -58,7 +58,6 @@ public:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "ntb_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp
index 2a13a9c8613..86ffdee6de1 100644
--- a/src/devices/bus/nubus/nubus_image.cpp
+++ b/src/devices/bus/nubus/nubus_image.cpp
@@ -44,9 +44,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "img"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index 6634ed57c61..9fb3594ce2a 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -79,7 +79,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "odyssey_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index e680ef7b950..4838230d769 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -83,7 +83,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return m_interface; }
virtual const char *file_extensions() const override { return "pce,bin"; }
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index 8d69029c132..84be90e4764 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -132,7 +132,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "plus4_cart"; }
virtual const char *file_extensions() const override { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/psx/memcard.h b/src/devices/bus/psx/memcard.h
index 3b03e4220c9..26608085453 100644
--- a/src/devices/bus/psx/memcard.h
+++ b/src/devices/bus/psx/memcard.h
@@ -26,7 +26,6 @@ public:
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "mc"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual bool call_create(int format_type, util::option_resolution *format_options) override;
diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h
index 282c47cac3d..244f3b02f1a 100644
--- a/src/devices/bus/ql/rom.h
+++ b/src/devices/bus/ql/rom.h
@@ -107,7 +107,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "ql_cart"; }
virtual const char *file_extensions() const override { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/rs232/null_modem.cpp b/src/devices/bus/rs232/null_modem.cpp
index 4c5d7417a8b..63df2f925b7 100644
--- a/src/devices/bus/rs232/null_modem.cpp
+++ b/src/devices/bus/rs232/null_modem.cpp
@@ -15,7 +15,8 @@ null_modem_device::null_modem_device(const machine_config &mconfig, const char *
m_rs232_stopbits(*this, "RS232_STOPBITS"),
m_input_count(0),
m_input_index(0),
- m_timer_poll(nullptr)
+ m_timer_poll(nullptr),
+ m_rts(ASSERT_LINE)
{
}
@@ -68,6 +69,8 @@ WRITE_LINE_MEMBER(null_modem_device::update_serial)
output_dcd(0);
output_dsr(0);
output_cts(0);
+
+ m_rts = ASSERT_LINE;
}
void null_modem_device::device_reset()
@@ -99,7 +102,7 @@ void null_modem_device::queue()
m_input_count = m_stream->input(m_input_buffer, sizeof(m_input_buffer));
}
- if (m_input_count != 0)
+ if (m_input_count != 0 && m_rts == ASSERT_LINE)
{
transmit_register_setup(m_input_buffer[m_input_index++]);
diff --git a/src/devices/bus/rs232/null_modem.h b/src/devices/bus/rs232/null_modem.h
index aed62fb3aad..2db8b428879 100644
--- a/src/devices/bus/rs232/null_modem.h
+++ b/src/devices/bus/rs232/null_modem.h
@@ -15,6 +15,7 @@ public:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); }
+ virtual WRITE_LINE_MEMBER( input_rts ) override { m_rts = (line_state) state; }
DECLARE_WRITE_LINE_MEMBER(update_serial);
@@ -46,6 +47,7 @@ private:
UINT32 m_input_count;
UINT32 m_input_index;
emu_timer *m_timer_poll;
+ line_state m_rts;
};
extern const device_type NULL_MODEM;
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index e8a711c3a0b..c373a0eb857 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -84,7 +84,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "sat_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h
index 3fa5a02578a..250048c49c4 100644
--- a/src/devices/bus/scv/slot.h
+++ b/src/devices/bus/scv/slot.h
@@ -83,7 +83,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "scv_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h
index 7e00a20bb27..270fb421f58 100644
--- a/src/devices/bus/sega8/sega8_slot.h
+++ b/src/devices/bus/sega8/sega8_slot.h
@@ -132,7 +132,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return m_must_be_loaded; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return m_interface; }
virtual const char *file_extensions() const override { return m_extensions; }
diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h
index 02b00a1cb87..663ff71d6c6 100644
--- a/src/devices/bus/snes/snes_slot.h
+++ b/src/devices/bus/snes/snes_slot.h
@@ -177,7 +177,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/ti99_peb/ti_rs232.h b/src/devices/bus/ti99_peb/ti_rs232.h
index 24c190aac2d..129561d9bf5 100644
--- a/src/devices/bus/ti99_peb/ti_rs232.h
+++ b/src/devices/bus/ti99_peb/ti_rs232.h
@@ -127,8 +127,7 @@ public:
bool is_reset_on_load() const override { return false; }
const char *image_interface() const override { return ""; }
const char *file_extensions() const override { return ""; }
- const option_guide *create_option_guide() const override { return nullptr; }
-
+
protected:
virtual void device_start(void) override;
bool call_load() override;
@@ -155,7 +154,6 @@ public:
bool is_reset_on_load() const override { return false; }
const char *image_interface() const override { return ""; }
const char *file_extensions() const override { return ""; }
- const option_guide *create_option_guide() const override { return nullptr; }
protected:
virtual void device_start(void) override;
diff --git a/src/devices/bus/ti99x/990_tap.cpp b/src/devices/bus/ti99x/990_tap.cpp
index 3f6e48ddc52..4b5f0e0e696 100644
--- a/src/devices/bus/ti99x/990_tap.cpp
+++ b/src/devices/bus/ti99x/990_tap.cpp
@@ -902,9 +902,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h
index 76983631e70..1473c7662d0 100644
--- a/src/devices/bus/ti99x/gromport.h
+++ b/src/devices/bus/ti99x/gromport.h
@@ -121,7 +121,6 @@ protected:
bool is_reset_on_load() const override { return false; }
const char *image_interface() const override { return "ti99_cart"; }
const char *file_extensions() const override { return "rpk"; }
- const option_guide *create_option_guide() const override { return nullptr; }
private:
bool m_readrom;
diff --git a/src/devices/bus/vboy/slot.h b/src/devices/bus/vboy/slot.h
index ca9e784ad8c..a0d90c68ab7 100644
--- a/src/devices/bus/vboy/slot.h
+++ b/src/devices/bus/vboy/slot.h
@@ -78,7 +78,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "vboy_cart"; }
virtual const char *file_extensions() const override { return "vb,bin"; }
diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h
index 6b40c6cbcbe..01e587c62bf 100644
--- a/src/devices/bus/vc4000/slot.h
+++ b/src/devices/bus/vc4000/slot.h
@@ -80,7 +80,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "vc4000_cart"; }
virtual const char *file_extensions() const override { return "bin,rom"; }
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index 984cf5c9d12..3f25a1ad737 100755
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -107,7 +107,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "a2600_cart"; }
virtual const char *file_extensions() const override { return "bin,a26"; }
diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h
index 5a1bf306213..cfd74b2b173 100644
--- a/src/devices/bus/vectrex/slot.h
+++ b/src/devices/bus/vectrex/slot.h
@@ -79,7 +79,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "vectrex_cart"; }
virtual const char *file_extensions() const override { return "bin,gam,vec"; }
diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h
index 9ca71e33653..58fbaed0637 100644
--- a/src/devices/bus/vic10/exp.h
+++ b/src/devices/bus/vic10/exp.h
@@ -131,7 +131,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "vic10_cart"; }
virtual const char *file_extensions() const override { return "80,e0"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index 097cbc994dd..023cc861d9e 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -122,7 +122,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "vic1001_cart"; }
virtual const char *file_extensions() const override { return "20,40,60,70,a0,b0,crt"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h
index e431ff3f1a6..9f1fd18ccf1 100644
--- a/src/devices/bus/vidbrain/exp.h
+++ b/src/devices/bus/vidbrain/exp.h
@@ -147,7 +147,6 @@ protected:
virtual bool is_reset_on_load() const override { return 1; }
virtual const char *image_interface() const override { return "vidbrain_cart"; }
virtual const char *file_extensions() const override { return "bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h
index ae5ab7d81d6..9cae282da10 100644
--- a/src/devices/bus/wswan/slot.h
+++ b/src/devices/bus/wswan/slot.h
@@ -91,7 +91,6 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 1; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual const char *image_interface() const override { return "wswan_cart"; }
virtual const char *file_extensions() const override { return "ws,wsc,bin"; }
diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h
index 0c39edd5e24..cca92231fae 100644
--- a/src/devices/bus/z88/z88.h
+++ b/src/devices/bus/z88/z88.h
@@ -106,7 +106,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return "z88_cart"; }
virtual const char *file_extensions() const override { return "epr,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// slot interface overrides
virtual std::string get_default_card_software() override;
diff --git a/src/devices/cpu/sparc/mb86901.cpp b/src/devices/cpu/sparc/mb86901.cpp
index 0ff6eb9cf41..ee08106e260 100644
--- a/src/devices/cpu/sparc/mb86901.cpp
+++ b/src/devices/cpu/sparc/mb86901.cpp
@@ -2735,8 +2735,10 @@ void mb86901_device::execute_trap()
PSR |= PSR_S_MASK;
int cwp = PSR & PSR_CWP_MASK;
+ int new_cwp = ((cwp + NWINDOWS) - 1) % NWINDOWS;
+
PSR &= ~PSR_CWP_MASK;
- PSR |= ((cwp + NWINDOWS) - 1) % NWINDOWS;
+ PSR |= new_cwp;
update_gpr_pointers();
@@ -2863,6 +2865,7 @@ void mb86901_device::dispatch_instruction(UINT32 op)
if (illegal_IU_instr)
{
+ printf("illegal instruction at %08x\n", PC);
m_trap = 1;
m_illegal_instruction = 1;
}
@@ -2958,7 +2961,7 @@ void mb86901_device::execute_step()
m_reset_mode = 1;
return;
}
- else if ((PSR & PSR_ET_MASK) && (m_bp_irl == 15 || m_bp_irl > ((PSR >> PSR_PIL_SHIFT) & PSR_PIL_MASK)))
+ else if ((PSR & PSR_ET_MASK) && (m_bp_irl == 15 || m_bp_irl > ((PSR & PSR_PIL_MASK) >> PSR_PIL_SHIFT)))
{
m_trap = 1;
m_interrupt_level = m_bp_irl;
diff --git a/src/devices/cpu/sparc/ss1fcode.ipp b/src/devices/cpu/sparc/ss1fcode.ipp
index f206e6be185..fa27713d143 100644
--- a/src/devices/cpu/sparc/ss1fcode.ipp
+++ b/src/devices/cpu/sparc/ss1fcode.ipp
@@ -20,7 +20,7 @@ void mb86901_device::log_fcodes()
opcode >>= 16;
}
- if (opcode == 0x4627)
+ if (false)//opcode == 0x6304)
{
m_log_fcodes = true;
//machine().debugger().debug_break();
@@ -29,10 +29,10 @@ void mb86901_device::log_fcodes()
{
return;
}
- else if (opcode == 0x0cb8)
- {
- m_log_fcodes = false;
- }
+ //else if (opcode == 0x0cb8)
+ //{
+ // m_log_fcodes = false;
+ //}
UINT32 handler_base = opcode << 2;
handler_base += REG(2); // l1 = r2 + opcode << 2
diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h
index 083bafe8c59..5929cc62034 100644
--- a/src/devices/imagedev/bitbngr.h
+++ b/src/devices/imagedev/bitbngr.h
@@ -29,7 +29,6 @@ public:
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return ""; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
void output(UINT8 data);
UINT32 input(void *buffer, UINT32 length);
diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h
index 30ffa5d169c..ab7441bfe17 100644
--- a/src/devices/imagedev/cassette.h
+++ b/src/devices/imagedev/cassette.h
@@ -70,7 +70,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return m_interface; }
virtual const char *file_extensions() const override { return m_extension_list; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
cassette_state get_state() { return m_state; }
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index 4fe681d1d49..7beb4fbcee6 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -93,7 +93,6 @@ public:
virtual bool must_be_loaded() const override { return false; }
virtual bool is_reset_on_load() const override { return false; }
virtual const char *file_extensions() const override { return extension_list; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
void setup_write(floppy_image_format_t *output_format);
void setup_load_cb(load_cb cb);
diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h
index b4c04d1e549..3309d366f7c 100644
--- a/src/devices/imagedev/midiin.h
+++ b/src/devices/imagedev/midiin.h
@@ -43,7 +43,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "mid"; }
virtual bool core_opens_image_file() const override { return FALSE; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
protected:
// device-level overrides
diff --git a/src/devices/imagedev/midiout.h b/src/devices/imagedev/midiout.h
index b154773ddea..0954987a824 100644
--- a/src/devices/imagedev/midiout.h
+++ b/src/devices/imagedev/midiout.h
@@ -46,7 +46,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "mid"; }
virtual bool core_opens_image_file() const override { return FALSE; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual void tx(UINT8 state) { rx_w(state); }
diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h
index a430b8ec28c..d32bbeb8786 100644
--- a/src/devices/imagedev/printer.h
+++ b/src/devices/imagedev/printer.h
@@ -42,7 +42,6 @@ public:
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "prn"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h
index 3b88319a121..dbc3ac7dd8c 100644
--- a/src/devices/imagedev/snapquik.h
+++ b/src/devices/imagedev/snapquik.h
@@ -37,7 +37,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return m_interface; }
virtual const char *file_extensions() const override { return m_file_extensions; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
TIMER_CALLBACK_MEMBER(process_snapshot_or_quickload);
void set_handler(snapquick_load_delegate load, const char *ext, seconds_t sec) { m_load = load; m_file_extensions = ext; m_delay_seconds = sec; };
diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h
index bd830feed43..4a34ec420ed 100644
--- a/src/devices/machine/hp_taco.h
+++ b/src/devices/machine/hp_taco.h
@@ -55,7 +55,6 @@ public:
virtual bool must_be_loaded() const override { return false; }
virtual bool is_reset_on_load() const override { return false; }
virtual const char *file_extensions() const override;
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// Tape position, 1 unit = 1 inch / (968 * 1024)
typedef INT32 tape_pos_t;
diff --git a/src/devices/machine/i8251.cpp b/src/devices/machine/i8251.cpp
index 7b0d272970d..3cb0f59a02c 100644
--- a/src/devices/machine/i8251.cpp
+++ b/src/devices/machine/i8251.cpp
@@ -416,8 +416,8 @@ WRITE8_MEMBER(i8251_device::command_w)
1 = transmit enable
*/
- m_rts_handler(!BIT(data, 5));
- m_dtr_handler(!BIT(data, 1));
+ m_rts_handler(BIT(data, 5));
+ m_dtr_handler(BIT(data, 1));
if (data & (1<<4))
{
diff --git a/src/devices/machine/smartmed.h b/src/devices/machine/smartmed.h
index 15ad48d4235..b34ced7ff1d 100644
--- a/src/devices/machine/smartmed.h
+++ b/src/devices/machine/smartmed.h
@@ -213,7 +213,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return "sm_memc"; }
virtual const char *file_extensions() const override { return "smc"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp
index d976e49714f..c55d1c46c4d 100644
--- a/src/emu/crsshair.cpp
+++ b/src/emu/crsshair.cpp
@@ -95,117 +95,119 @@ static const rgb_t crosshair_colors[] =
rgb_t(0xff,0xff,0xff)
};
+
//**************************************************************************
-// CROSSHAIR MANAGER
+// RENDER CROSSHAIR
//**************************************************************************
//-------------------------------------------------
-// crosshair_manager - constructor
+// render_crosshair - constructor
//-------------------------------------------------
-crosshair_manager::crosshair_manager(running_machine &machine)
+render_crosshair::render_crosshair(running_machine &machine, int player)
: m_machine(machine)
+ , m_player(player)
+ , m_used(false)
+ , m_mode(CROSSHAIR_VISIBILITY_OFF)
+ , m_visible(false)
+ , m_texture(nullptr)
+ , m_x(0.0f)
+ , m_y(0.0f)
+ , m_last_x(0.0f)
+ , m_last_y(0.0f)
+ , m_time(0)
{
- /* request a callback upon exiting */
- machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(crosshair_manager::exit), this));
-
- /* setup the default auto visibility time */
- m_auto_time = CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT;
-
- /* determine who needs crosshairs */
- for (auto &port : machine.ioport().ports())
- for (ioport_field &field : port.second->fields())
- if (field.crosshair_axis() != CROSSHAIR_AXIS_NONE)
- {
- int player = field.player();
+ // for now, use the main screen
+ m_screen = machine.first_screen();
+}
- assert(player < MAX_PLAYERS);
- /* mark as used and set the default visibility and mode */
- m_usage = TRUE;
- m_used[player] = TRUE;
- m_mode[player] = CROSSHAIR_VISIBILITY_DEFAULT;
- m_visible[player] = (CROSSHAIR_VISIBILITY_DEFAULT == CROSSHAIR_VISIBILITY_OFF) ? FALSE : TRUE;
+//-------------------------------------------------
+// render_crosshair - destructor
+//-------------------------------------------------
- /* for now, use the main screen */
- m_screen[player] = machine.first_screen();
+render_crosshair::~render_crosshair()
+{
+ m_machine.render().texture_free(m_texture);
+}
- create_bitmap(player);
- }
- /* register callbacks for when we load/save configurations */
- if (m_usage)
- machine.configuration().config_register("crosshairs", config_saveload_delegate(FUNC(crosshair_manager::config_load), this), config_saveload_delegate(FUNC(crosshair_manager::config_save), this));
+//-------------------------------------------------
+// set_bitmap_name - change the bitmap name
+//-------------------------------------------------
- /* register the animation callback */
- if (machine.first_screen() != nullptr)
- machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(crosshair_manager::animate), this));
+void render_crosshair::set_bitmap_name(const char *name)
+{
+ // update bitmap if name has changed
+ bool changed = name != m_name;
+ m_name = name;
+ if (changed)
+ create_bitmap();
}
-/*-------------------------------------------------
-exit - free memory allocated for
-the crosshairs
--------------------------------------------------*/
-void crosshair_manager::exit()
+//-------------------------------------------------
+// set_default_bitmap - reset to default bitmap
+//-------------------------------------------------
+
+void render_crosshair::set_default_bitmap()
{
- /* free bitmaps and textures for each player */
- for (int player = 0; player < MAX_PLAYERS; player++)
- {
- machine().render().texture_free(m_texture[player]);
- m_texture[player] = nullptr;
- m_bitmap[player] = nullptr;
- }
+ // update bitmap if name has changed
+ bool changed = !m_name.empty();
+ m_name.clear();
+ if (changed || m_bitmap == nullptr)
+ create_bitmap();
}
-/*-------------------------------------------------
- create_bitmap - create the rendering
- structures for the given player
--------------------------------------------------*/
-void crosshair_manager::create_bitmap(int player)
+//-------------------------------------------------
+// create_bitmap - create the rendering
+// structures for the given player
+//-------------------------------------------------
+
+void render_crosshair::create_bitmap()
{
int x, y;
- char filename[20];
- rgb_t color = crosshair_colors[player];
+ rgb_t color = m_player < ARRAY_LENGTH(crosshair_colors) ? crosshair_colors[m_player] : rgb_t::white;
- /* if we have a bitmap and texture for this player, kill it */
- if (m_bitmap[player] == nullptr) {
- m_bitmap[player] = std::make_unique<bitmap_argb32>();
- m_texture[player] = machine().render().texture_alloc(render_texture::hq_scale);
+ // if we have a bitmap and texture for this player, kill it
+ if (m_bitmap == nullptr)
+ {
+ m_bitmap = std::make_unique<bitmap_argb32>();
+ m_texture = m_machine.render().texture_alloc(render_texture::hq_scale);
}
- emu_file crossfile(machine().options().crosshair_path(), OPEN_FLAG_READ);
- if (m_name[player][0] != 0)
+ emu_file crossfile(m_machine.options().crosshair_path(), OPEN_FLAG_READ);
+ if (!m_name.empty())
{
- /* look for user specified file */
- sprintf(filename, "%s.png", m_name[player]);
- render_load_png(*m_bitmap[player], crossfile, nullptr, filename);
+ // look for user specified file
+ std::string filename = m_name + ".png";
+ render_load_png(*m_bitmap, crossfile, nullptr, filename.c_str());
}
else
{
- /* look for default cross?.png in crsshair\game dir */
- sprintf(filename, "cross%d.png", player + 1);
- render_load_png(*m_bitmap[player], crossfile, machine().system().name, filename);
+ // look for default cross?.png in crsshair/game dir
+ std::string filename = string_format("cross%d.png", m_player + 1);
+ render_load_png(*m_bitmap, crossfile, m_machine.system().name, filename.c_str());
- /* look for default cross?.png in crsshair dir */
- if (!m_bitmap[player]->valid())
- render_load_png(*m_bitmap[player], crossfile, nullptr, filename);
+ // look for default cross?.png in crsshair dir
+ if (!m_bitmap->valid())
+ render_load_png(*m_bitmap, crossfile, nullptr, filename.c_str());
}
/* if that didn't work, use the built-in one */
- if (!m_bitmap[player]->valid())
+ if (!m_bitmap->valid())
{
/* allocate a blank bitmap to start with */
- m_bitmap[player]->allocate(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE);
- m_bitmap[player]->fill(rgb_t(0x00,0xff,0xff,0xff));
+ m_bitmap->allocate(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE);
+ m_bitmap->fill(rgb_t(0x00,0xff,0xff,0xff));
/* extract the raw source data to it */
for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
{
/* assume it is mirrored vertically */
- UINT32 *dest0 = &m_bitmap[player]->pix32(y);
- UINT32 *dest1 = &m_bitmap[player]->pix32(CROSSHAIR_RAW_SIZE - 1 - y);
+ UINT32 *dest0 = &m_bitmap->pix32(y);
+ UINT32 *dest1 = &m_bitmap->pix32(CROSSHAIR_RAW_SIZE - 1 - y);
/* extract to two rows simultaneously */
for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
@@ -215,45 +217,117 @@ void crosshair_manager::create_bitmap(int player)
}
/* reference the new bitmap */
- m_texture[player]->set_bitmap(*m_bitmap[player], m_bitmap[player]->cliprect(), TEXFORMAT_ARGB32);
+ m_texture->set_bitmap(*m_bitmap, m_bitmap->cliprect(), TEXFORMAT_ARGB32);
}
-/*-------------------------------------------------
- get_user_settings - return the
- current crosshair settings for a player
- Note: auto_time is common for all players
--------------------------------------------------*/
-void crosshair_manager::get_user_settings(UINT8 player, crosshair_user_settings *settings)
+//-------------------------------------------------
+// animate - update the crosshair state
+//-------------------------------------------------
+
+void render_crosshair::animate(UINT16 auto_time)
{
- settings->auto_time = m_auto_time;
- settings->used = m_used[player];
- settings->mode = m_mode[player];
- strcpy(settings->name, m_name[player]);
+ // read all the port values
+ if (m_used)
+ m_machine.ioport().crosshair_position(m_player, m_x, m_y);
+
+ // auto visibility
+ if (m_mode == CROSSHAIR_VISIBILITY_AUTO)
+ {
+ if ((m_x != m_last_x) || (m_y != m_last_y))
+ {
+ // crosshair has moved, keep crosshair visible
+ m_visible = true;
+ m_last_x = m_x;
+ m_last_y = m_y;
+ m_time = 0;
+ }
+ else
+ {
+ // see if the player has been motionless for time specified
+ // slightly confusing formula, but the effect is:
+ // auto_time = 0 makes the crosshair barely visible while moved
+ // every increment in auto_time is about .2s at 60Hz
+ if (m_time > auto_time * 12 + 2)
+ // time exceeded so turn crosshair invisible
+ m_visible = false;
+
+ // increment player visibility time
+ m_time++;
+ }
+ }
}
+//-------------------------------------------------
+// draw - render the crosshair to the container
+//-------------------------------------------------
+
+void render_crosshair::draw(render_container &container, UINT8 fade)
+{
+ // add a quad assuming a 4:3 screen (this is not perfect)
+ container.add_quad(m_x - 0.03f, m_y - 0.04f, m_x + 0.03f, m_y + 0.04f,
+ rgb_t(0xc0, fade, fade, fade),
+ m_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+}
+
+
+//**************************************************************************
+// CROSSHAIR MANAGER
+//**************************************************************************
+
+//-------------------------------------------------
+// crosshair_manager - constructor
+//-------------------------------------------------
+
+crosshair_manager::crosshair_manager(running_machine &machine)
+ : m_machine(machine)
+ , m_usage(false)
+ , m_animation_counter(0)
+ , m_auto_time(CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT)
+{
+ /* request a callback upon exiting */
+ machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(crosshair_manager::exit), this));
+
+ for (int player = 0; player < MAX_PLAYERS; player++)
+ m_crosshair[player] = std::make_unique<render_crosshair>(machine, player);
+
+ /* determine who needs crosshairs */
+ for (auto &port : machine.ioport().ports())
+ for (ioport_field &field : port.second->fields())
+ if (field.crosshair_axis() != CROSSHAIR_AXIS_NONE)
+ {
+ int player = field.player();
+
+ assert(player < MAX_PLAYERS);
+
+ /* mark as used and set the default visibility and mode */
+ m_usage = true;
+ m_crosshair[player]->set_used(true);
+ m_crosshair[player]->set_mode(CROSSHAIR_VISIBILITY_DEFAULT);
+ m_crosshair[player]->set_visible(CROSSHAIR_VISIBILITY_DEFAULT != CROSSHAIR_VISIBILITY_OFF);
+ m_crosshair[player]->set_default_bitmap();
+ }
+
+ /* register callbacks for when we load/save configurations */
+ if (m_usage)
+ machine.configuration().config_register("crosshairs", config_saveload_delegate(FUNC(crosshair_manager::config_load), this), config_saveload_delegate(FUNC(crosshair_manager::config_save), this));
+
+ /* register the animation callback */
+ if (machine.first_screen() != nullptr)
+ machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(crosshair_manager::animate), this));
+}
+
/*-------------------------------------------------
- set_user_settings - modify the
- current crosshair settings for a player
- Note: auto_time is common for all players
+exit - free memory allocated for
+the crosshairs
-------------------------------------------------*/
-void crosshair_manager::set_user_settings(UINT8 player, crosshair_user_settings *settings)
+void crosshair_manager::exit()
{
- m_auto_time = settings->auto_time;
- m_used[player] = settings->used;
- m_mode[player] = settings->mode;
-
- /* set visibility as specified by mode */
- /* auto mode starts with visibility off */
- m_visible[player] = (settings->mode == CROSSHAIR_VISIBILITY_ON) ? TRUE : FALSE;
-
- /* update bitmap if name has changed */
- int changed = strcmp(settings->name, m_name[player]);
- strcpy(m_name[player], settings->name);
- if (changed != 0)
- create_bitmap(player);
+ /* free bitmaps and textures for each player */
+ for (int player = 0; player < MAX_PLAYERS; player++)
+ m_crosshair[player] = nullptr;
}
@@ -279,37 +353,7 @@ void crosshair_manager::animate(screen_device &device, bool vblank_state)
m_fade = 0xa0 + (0x60 * (~m_animation_counter & 0x7f) / 0x80);
for (player = 0; player < MAX_PLAYERS; player++)
- {
- /* read all the lightgun values */
- if (m_used[player])
- device.machine().ioport().crosshair_position(player, m_x[player], m_y[player]);
-
- /* auto visibility */
- if (m_mode[player] == CROSSHAIR_VISIBILITY_AUTO)
- {
- if ((m_x[player] != m_last_x[player]) || (m_y[player] != m_last_y[player]))
- {
- /* crosshair has moved, keep crosshair visible */
- m_visible[player] = TRUE;
- m_last_x[player] = m_x[player];
- m_last_y[player] = m_y[player];
- m_time[player] = 0;
- }
- else
- {
- /* see if the player has been motionless for time specified */
- /* slightly confusing formula, but the effect is: */
- /* auto_time = 0 makes the crosshair barely visible while moved */
- /* every increment in auto_time is about .2s at 60Hz */
- if (m_time[player] > m_auto_time * 12 + 2)
- /* time exceeded so turn crosshair invisible */
- m_visible[player] = FALSE;
-
- /* increment player visibility time */
- m_time[player]++;
- }
- }
- }
+ m_crosshair[player]->animate(m_auto_time);
}
@@ -323,16 +367,13 @@ void crosshair_manager::render(screen_device &screen)
int player;
for (player = 0; player < MAX_PLAYERS; player++)
- /* draw if visible and the right screen */
- if (m_visible[player] &&
- ((m_screen[player] == &screen) || (m_screen[player] == CROSSHAIR_SCREEN_ALL)))
- {
- /* add a quad assuming a 4:3 screen (this is not perfect) */
- screen.container().add_quad(m_x[player] - 0.03f, m_y[player] - 0.04f,
- m_x[player] + 0.03f, m_y[player] + 0.04f,
- rgb_t(0xc0, m_fade, m_fade, m_fade),
- m_texture[player], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
+ {
+ render_crosshair &crosshair = *m_crosshair[player];
+
+ // draw if visible and the right screen
+ if (crosshair.is_visible() && ((crosshair.screen() == &screen) || (crosshair.screen() == CROSSHAIR_SCREEN_ALL)))
+ crosshair.draw(screen.container(), m_fade);
+ }
}
/*-------------------------------------------------
@@ -362,24 +403,26 @@ void crosshair_manager::config_load(config_type cfg_type, xml_data_node *parentn
player = xml_get_attribute_int(crosshairnode, "player", -1);
- /* check to make sure we have a valid player */
- /* also check if the player really uses a crosshair */
- if (player >=0 && player < MAX_PLAYERS && m_used[player])
+ // check to make sure we have a valid player
+ if (player >= 0 && player < MAX_PLAYERS)
{
- /* get, check, and store visibility mode */
- mode = xml_get_attribute_int(crosshairnode, "mode", CROSSHAIR_VISIBILITY_DEFAULT);
- if (mode >= CROSSHAIR_VISIBILITY_OFF && mode <= CROSSHAIR_VISIBILITY_AUTO)
+ // check if the player really uses a crosshair
+ render_crosshair &crosshair = *m_crosshair[player];
+ if (crosshair.is_used())
{
- m_mode[player] = (UINT8)mode;
- /* set visibility as specified by mode */
- /* auto mode starts with visibility off */
- m_visible[player] = (mode == CROSSHAIR_VISIBILITY_ON) ? TRUE : FALSE;
- }
+ // get, check, and store visibility mode
+ mode = xml_get_attribute_int(crosshairnode, "mode", CROSSHAIR_VISIBILITY_DEFAULT);
+ if (mode >= CROSSHAIR_VISIBILITY_OFF && mode <= CROSSHAIR_VISIBILITY_AUTO)
+ {
+ crosshair.set_mode((UINT8)mode);
+ /* set visibility as specified by mode */
+ /* auto mode starts with visibility off */
+ crosshair.set_visible(mode == CROSSHAIR_VISIBILITY_ON);
+ }
- /* get and store crosshair pic name, truncate name to max length */
- strncpy(m_name[player], xml_get_attribute_string(crosshairnode, "pic", ""), CROSSHAIR_PIC_NAME_LENGTH);
- /* update bitmap */
- create_bitmap(player);
+ // get and store crosshair pic name
+ crosshair.set_bitmap_name(xml_get_attribute_string(crosshairnode, "pic", ""));
+ }
}
}
@@ -412,28 +455,30 @@ void crosshair_manager::config_save(config_type cfg_type, xml_data_node *parentn
for (player = 0; player < MAX_PLAYERS; player++)
{
- if (m_used[player])
+ const render_crosshair &crosshair = *m_crosshair[player];
+
+ if (crosshair.is_used())
{
/* create a node */
crosshairnode = xml_add_child(parentnode, "crosshair", nullptr);
if (crosshairnode != nullptr)
{
- int changed = FALSE;
+ bool changed = false;
xml_set_attribute_int(crosshairnode, "player", player);
- if (m_visible[player] != CROSSHAIR_VISIBILITY_DEFAULT)
+ if (crosshair.mode() != CROSSHAIR_VISIBILITY_DEFAULT)
{
- xml_set_attribute_int(crosshairnode, "mode", m_mode[player]);
- changed = TRUE;
+ xml_set_attribute_int(crosshairnode, "mode", crosshair.mode());
+ changed = true;
}
- /* the default graphic name is "", so only save if not */
- if (*(m_name[player]) != 0)
+ // only save graphic name if not the default
+ if (*crosshair.bitmap_name() != '\0')
{
- xml_set_attribute(crosshairnode, "pic", m_name[player]);
- changed = TRUE;
+ xml_set_attribute(crosshairnode, "pic", crosshair.bitmap_name());
+ changed = true;
}
/* if nothing changed, kill the node */
diff --git a/src/emu/crsshair.h b/src/emu/crsshair.h
index 0faf47f508e..a20c3303d91 100644
--- a/src/emu/crsshair.h
+++ b/src/emu/crsshair.h
@@ -31,22 +31,64 @@
#define CROSSHAIR_VISIBILITY_AUTOTIME_MAX 50
#define CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT 15
-/* maximum crosshair pic filename size */
-#define CROSSHAIR_PIC_NAME_LENGTH 12
-
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
-/* user-controllable settings for a player */
-struct crosshair_user_settings
+// ======================> render_crosshair
+
+class render_crosshair
{
- UINT8 used; /* is used */
- UINT8 mode; /* visibility mode */
- UINT8 auto_time; /* time in seconds to blank crosshair if no movement */
- char name[CROSSHAIR_PIC_NAME_LENGTH + 1]; /* bitmap name */
+public:
+ // construction/destruction
+ render_crosshair(running_machine &machine, int player);
+ ~render_crosshair();
+
+ // getters
+ running_machine &machine() const { return m_machine; }
+ int player() const { return m_player; }
+ bool is_used() const { return m_used; }
+ UINT8 mode() const { return m_mode; }
+ bool is_visible() const { return m_visible; }
+ screen_device *screen() const { return m_screen; }
+ float x() const { return m_x; }
+ float y() const { return m_y; }
+ const char *bitmap_name() const { return m_name.c_str(); }
+
+ // setters
+ void set_used(bool used) { m_used = used; }
+ void set_mode(UINT8 mode) { m_mode = mode; }
+ void set_visible(bool visible) { m_visible = visible; }
+ void set_screen(screen_device *screen) { m_screen = screen; }
+ //void setxy(float x, float y);
+ void set_bitmap_name(const char *name);
+ void set_default_bitmap();
+
+ // updates
+ void animate(UINT16 auto_time);
+ void draw(render_container &container, UINT8 fade);
+
+private:
+ // private helpers
+ void create_bitmap();
+
+ // private state
+ running_machine & m_machine; // reference to our machine
+ int m_player; // player number
+ bool m_used; // usage for this crosshair
+ UINT8 m_mode; // visibility mode for this crosshair
+ bool m_visible; // visibility for this crosshair
+ std::unique_ptr<bitmap_argb32> m_bitmap; // bitmap for this crosshair
+ render_texture * m_texture; // texture for this crosshair
+ screen_device * m_screen; // the screen on which this crosshair is drawn
+ float m_x; // current X position
+ float m_y; // current Y position
+ float m_last_x; // last X position
+ float m_last_y; // last Y position
+ UINT16 m_time; // time since last movement
+ std::string m_name; // name of png file
};
@@ -61,21 +103,16 @@ public:
/* draws crosshair(s) in a given screen, if necessary */
void render(screen_device &screen);
- /* sets the screen(s) for a given player's crosshair */
- void set_screen(int player, screen_device *screen) { m_screen[player] = screen; }
+ // return true if any crosshairs are used
+ bool get_usage() const { return m_usage; }
- /* return TRUE if any crosshairs are used */
- int get_usage() const { return m_usage; }
-
- /* return the current crosshair settings for the given player */
- void get_user_settings(UINT8 player, crosshair_user_settings *settings);
-
- /* modify the current crosshair settings for the given player */
- void set_user_settings(UINT8 player, crosshair_user_settings *settings);
// getters
running_machine &machine() const { return m_machine; }
+ render_crosshair &get_crosshair(int player) const { assert(player >= 0 && player < MAX_PLAYERS); assert(m_crosshair[player] != nullptr); return *m_crosshair[player]; }
+ UINT16 auto_time() const { return m_auto_time; }
+ void set_auto_time(UINT16 auto_time) { m_auto_time = auto_time; }
+
private:
- void create_bitmap(int player);
void exit();
void animate(screen_device &device, bool vblank_state);
@@ -85,22 +122,11 @@ private:
// internal state
running_machine & m_machine; // reference to our machine
- UINT8 m_usage; /* true if any crosshairs are used */
- UINT8 m_used[MAX_PLAYERS]; /* usage per player */
- UINT8 m_mode[MAX_PLAYERS]; /* visibility mode per player */
- UINT8 m_visible[MAX_PLAYERS]; /* visibility per player */
- std::unique_ptr<bitmap_argb32> m_bitmap[MAX_PLAYERS]; /* bitmap per player */
- render_texture * m_texture[MAX_PLAYERS]; /* texture per player */
- screen_device * m_screen[MAX_PLAYERS]; /* the screen on which this player's crosshair is drawn */
- float m_x[MAX_PLAYERS]; /* current X position */
- float m_y[MAX_PLAYERS]; /* current Y position */
- float m_last_x[MAX_PLAYERS]; /* last X position */
- float m_last_y[MAX_PLAYERS]; /* last Y position */
- UINT8 m_fade; /* color fading factor */
- UINT8 m_animation_counter; /* animation frame index */
- UINT16 m_auto_time; /* time in seconds to turn invisible */
- UINT16 m_time[MAX_PLAYERS]; /* time since last movement */
- char m_name[MAX_PLAYERS][CROSSHAIR_PIC_NAME_LENGTH + 1]; /* name of crosshair png file */
+ bool m_usage; // true if any crosshairs are used
+ std::unique_ptr<render_crosshair> m_crosshair[MAX_PLAYERS]; // per-player crosshair state
+ UINT8 m_fade; // color fading factor
+ UINT8 m_animation_counter; // animation frame index
+ UINT16 m_auto_time; // time in seconds to turn invisible
};
#endif /* __CRSSHAIR_H__ */
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index bdfd4dbf826..ff734e9f65d 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -380,6 +380,30 @@ bool debugger_commands::validate_number_parameter(const char *param, UINT64 *res
/*-------------------------------------------------
+ validate_boolean_parameter - validates a
+ boolean parameter
+-------------------------------------------------*/
+
+bool debugger_commands::validate_boolean_parameter(const char *param, bool *result)
+{
+ /* nullptr parameter does nothing and returns no error */
+ if (param == nullptr)
+ return true;
+
+ /* evaluate the expression; success if no error */
+ bool is_true = (strcmp(param, "true") == 0 || strcmp(param, "TRUE") == 0 || strcmp(param, "1") == 0);
+ bool is_false = (strcmp(param, "false") == 0 || strcmp(param, "FALSE") == 0 || strcmp(param, "0") == 0);
+
+ if (!is_true && !is_false)
+ return false;
+
+ *result = is_true;
+
+ return true;
+}
+
+
+/*-------------------------------------------------
validate_cpu_parameter - validates a
parameter as a cpu
-------------------------------------------------*/
@@ -2444,6 +2468,7 @@ void debugger_commands::execute_dasm(int ref, int params, const char *param[])
void debugger_commands::execute_trace_internal(int ref, int params, const char *param[], bool trace_over)
{
const char *action = nullptr;
+ bool detect_loops = true;
device_t *cpu;
FILE *f = nullptr;
const char *mode;
@@ -2455,7 +2480,9 @@ void debugger_commands::execute_trace_internal(int ref, int params, const char *
/* validate parameters */
if (!validate_cpu_parameter((params > 1) ? param[1] : nullptr, &cpu))
return;
- if (!debug_command_parameter_command(action = param[2]))
+ if (!validate_boolean_parameter((params > 2) ? param[2] : nullptr, &detect_loops))
+ return;
+ if (!debug_command_parameter_command(action = param[3]))
return;
/* open the file */
@@ -2479,7 +2506,7 @@ void debugger_commands::execute_trace_internal(int ref, int params, const char *
}
/* do it */
- cpu->debug()->trace(f, trace_over, action);
+ cpu->debug()->trace(f, trace_over, detect_loops, action);
if (f)
m_console.printf("Tracing CPU '%s' to file %s\n", cpu->tag(), filename.c_str());
else
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h
index 7ecfc87958b..eae6fc611d3 100644
--- a/src/emu/debug/debugcmd.h
+++ b/src/emu/debug/debugcmd.h
@@ -25,6 +25,9 @@ class debugger_commands
public:
debugger_commands(running_machine& machine, debugger_cpu& cpu, debugger_console& console);
+ /* validates a parameter as a boolean value */
+ bool validate_boolean_parameter(const char *param, bool *result);
+
/* validates a parameter as a numeric value */
bool validate_number_parameter(const char *param, UINT64 *result);
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index d28a15bd79b..b9062d3894d 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -2637,14 +2637,14 @@ UINT32 device_debug::compute_opcode_crc32(offs_t pc) const
// trace - trace execution of a given device
//-------------------------------------------------
-void device_debug::trace(FILE *file, bool trace_over, const char *action)
+void device_debug::trace(FILE *file, bool trace_over, bool detect_loops, const char *action)
{
// delete any existing tracers
m_trace = nullptr;
// if we have a new file, make a new tracer
if (file != nullptr)
- m_trace = std::make_unique<tracer>(*this, *file, trace_over, action);
+ m_trace = std::make_unique<tracer>(*this, *file, trace_over, detect_loops, action);
}
@@ -3305,14 +3305,15 @@ bool device_debug::registerpoint::hit()
// tracer - constructor
//-------------------------------------------------
-device_debug::tracer::tracer(device_debug &debug, FILE &file, bool trace_over, const char *action)
- : m_debug(debug),
- m_file(file),
- m_action((action != nullptr) ? action : ""),
- m_loops(0),
- m_nextdex(0),
- m_trace_over(trace_over),
- m_trace_over_target(~0)
+device_debug::tracer::tracer(device_debug &debug, FILE &file, bool trace_over, bool detect_loops, const char *action)
+ : m_debug(debug)
+ , m_file(file)
+ , m_action((action != nullptr) ? action : "")
+ , m_detect_loops(detect_loops)
+ , m_loops(0)
+ , m_nextdex(0)
+ , m_trace_over(trace_over)
+ , m_trace_over_target(~0)
{
memset(m_history, 0, sizeof(m_history));
}
@@ -3344,23 +3345,26 @@ void device_debug::tracer::update(offs_t pc)
m_trace_over_target = ~0;
}
- // check for a loop condition
- int count = 0;
- for (auto & elem : m_history)
- if (elem == pc)
- count++;
-
- // if more than 1 hit, just up the loop count and get out
- if (count > 1)
+ if (m_detect_loops)
{
- m_loops++;
- return;
- }
+ // check for a loop condition
+ int count = 0;
+ for (auto & elem : m_history)
+ if (elem == pc)
+ count++;
+
+ // if more than 1 hit, just up the loop count and get out
+ if (count > 1)
+ {
+ m_loops++;
+ return;
+ }
- // if we just finished looping, indicate as much
- if (m_loops != 0)
- fprintf(&m_file, "\n (loops for %d instructions)\n\n", m_loops);
- m_loops = 0;
+ // if we just finished looping, indicate as much
+ if (m_loops != 0)
+ fprintf(&m_file, "\n (loops for %d instructions)\n\n", m_loops);
+ m_loops = 0;
+ }
// execute any trace actions first
if (!m_action.empty())
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index bc4ee3675cf..aa2018201dd 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -263,7 +263,7 @@ public:
void track_mem_data_clear() { m_track_mem_set.clear(); }
// tracing
- void trace(FILE *file, bool trace_over, const char *action);
+ void trace(FILE *file, bool trace_over, bool detect_loops, const char *action);
void trace_printf(const char *fmt, ...) ATTR_PRINTF(2,3);
void trace_flush() { if (m_trace != nullptr) m_trace->flush(); }
@@ -336,7 +336,7 @@ private:
class tracer
{
public:
- tracer(device_debug &debug, FILE &file, bool trace_over, const char *action);
+ tracer(device_debug &debug, FILE &file, bool trace_over, bool detect_loops, const char *action);
~tracer();
void update(offs_t pc);
@@ -350,6 +350,7 @@ private:
FILE & m_file; // tracing file for this CPU
std::string m_action; // action to perform during a trace
offs_t m_history[TRACE_LOOPS]; // history of recent PCs
+ bool m_detect_loops; // whether or not we should detect loops
int m_loops; // number of instructions in a loop
int m_nextdex; // next index
bool m_trace_over; // true if we're tracing over
diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp
index 8d66f59d85a..6f14f4d3e64 100644
--- a/src/emu/debug/debughlp.cpp
+++ b/src/emu/debug/debughlp.cpp
@@ -140,8 +140,8 @@ static const help_item static_help_list[] =
" focus <cpu> -- focuses debugger only on <cpu>\n"
" ignore [<cpu>[,<cpu>[,...]]] -- stops debugging on <cpu>\n"
" observe [<cpu>[,<cpu>[,...]]] -- resumes debugging on <cpu>\n"
- " trace {<filename>|OFF}[,<cpu>[,<action>]] -- trace the given CPU to a file (defaults to active CPU)\n"
- " traceover {<filename>|OFF}[,<cpu>[,<action>]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n"
+ " trace {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]] -- trace the given CPU to a file (defaults to active CPU)\n"
+ " traceover {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]] -- trace the given CPU to a file, but skip subroutines (defaults to active CPU)\n"
" traceflush -- flushes all open trace files\n"
},
{
@@ -818,11 +818,14 @@ static const help_item static_help_list[] =
{
"trace",
"\n"
- " trace {<filename>|OFF}[,<cpu>[,<action>]]\n"
+ " trace {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]]\n"
"\n"
"Starts or stops tracing of the execution of the specified <cpu>. If <cpu> is omitted, "
"the currently active CPU is specified. When enabling tracing, specify the filename in the "
- "<filename> parameter. To disable tracing, substitute the keyword 'off' for <filename>. If you "
+ "<filename> parameter. To disable tracing, substitute the keyword 'off' for <filename>. "
+ "<detectloops> should be either true or false. If <detectloops> is true or omitted, the trace "
+ "will have loops detected and condensed to a single line. If it is false, the trace will contain "
+ "every opcode as it is executed. If you "
"wish to log additional information on each trace, you can append an <action> parameter which "
"is a command that is executed before each trace is logged. Generally, this is used to include "
"a 'tracelog' command. Note that you may need to embed the action within braces { } in order "
@@ -831,11 +834,14 @@ static const help_item static_help_list[] =
"\n"
"Examples:\n"
"\n"
+ "trace joust.tr\n"
+ " Begin tracing the currently active CPU, logging output to joust.tr.\n"
+ "\n"
"trace dribling.tr,0\n"
" Begin tracing the execution of CPU #0, logging output to dribling.tr.\n"
"\n"
- "trace joust.tr\n"
- " Begin tracing the currently active CPU, logging output to joust.tr.\n"
+ "trace starswep.tr,0,false\n"
+ " Begin tracing the execution of CPU #0, logging output to starswep.tr, with loop detection disabled.\n"
"\n"
"trace >>pigskin.tr\n"
" Begin tracing the currently active CPU, appending log output to pigskin.tr.\n"
@@ -843,39 +849,44 @@ static const help_item static_help_list[] =
"trace off,0\n"
" Turn off tracing on CPU #0.\n"
"\n"
- "trace asteroid.tr,0,{tracelog \"A=%02X \",a}\n"
+ "trace asteroid.tr,0,true,{tracelog \"A=%02X \",a}\n"
" Begin tracing the execution of CPU #0, logging output to asteroid.tr. Before each line, "
"output A=<aval> to the tracelog.\n"
},
{
"traceover",
"\n"
- " traceover {<filename>|OFF}[,<cpu>[,<action>]]\n"
+ " traceover {<filename>|OFF}[,<cpu>[,<detectloops>[,<action>]]]\n"
"\n"
"Starts or stops tracing of the execution of the specified <cpu>. When tracing reaches "
"a subroutine or call, tracing will skip over the subroutine. The same algorithm is used as is "
"used in the step over command. This means that traceover will not work properly when calls "
"are recusive or the return address is not immediately following the call instruction. If "
- "<cpu> is omitted, the currently active CPU is specified. When enabling tracing, specify the "
- "filename in the <filename> parameter. To disable tracing, substitute the keyword 'off' for "
- "<filename>. If you wish to log additional information on each trace, you can append an <action> "
- "parameter which is a command that is executed before each trace is logged. Generally, this is "
- "used to include a 'tracelog' command. Note that you may need to embed the action within braces "
- "{ } in order to prevent commas and semicolons from being interpreted as applying to the trace "
- "command itself.\n"
+ "<detectloops> should be either true or false. If <detectloops> is true or omitted, the trace "
+ "will have loops detected and condensed to a single line. If it is false, the trace will contain "
+ "every opcode as it is executed. If <cpu> is omitted, the currently active CPU is specified. When "
+ "enabling tracing, specify the filename in the <filename> parameter. To disable tracing, substitute "
+ "the keyword 'off' for <filename>. If you wish to log additional information on each trace, you can "
+ "append an <action> parameter which is a command that is executed before each trace is logged. "
+ "Generally, this is used to include a 'tracelog' command. Note that you may need to embed the "
+ "action within braces { } in order to prevent commas and semicolons from being interpreted as "
+ "applying to the trace command itself.\n"
"\n"
"Examples:\n"
"\n"
+ "traceover joust.tr\n"
+ " Begin tracing the currently active CPU, logging output to joust.tr.\n"
+ "\n"
"traceover dribling.tr,0\n"
" Begin tracing the execution of CPU #0, logging output to dribling.tr.\n"
"\n"
- "traceover joust.tr\n"
- " Begin tracing the currently active CPU, logging output to joust.tr.\n"
+ "traceover starswep.tr,0,false\n"
+ " Begin tracing the execution of CPU #0, logging output to starswep.tr, with loop detection disabled.\n"
"\n"
"traceover off,0\n"
" Turn off tracing on CPU #0.\n"
"\n"
- "traceover asteroid.tr,0,{tracelog \"A=%02X \",a}\n"
+ "traceover asteroid.tr,0,true,{tracelog \"A=%02X \",a}\n"
" Begin tracing the execution of CPU #0, logging output to asteroid.tr. Before each line, "
"output A=<aval> to the tracelog.\n"
},
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 0c5d391d616..e2c6d3600a0 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -162,7 +162,7 @@ public:
virtual bool is_reset_on_load() const = 0;
virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const = 0;
- virtual const option_guide *create_option_guide() const = 0;
+ virtual const option_guide *create_option_guide() const { return nullptr; }
const image_device_format *device_get_indexed_creatable_format(int index) const { if (index < m_formatlist.size()) return m_formatlist.at(index).get(); else return nullptr; }
const image_device_format *device_get_named_creatable_format(const char *format_name);
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index d732d3e892e..b6a90b396fb 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -10,7 +10,10 @@
#include "emu.h"
#include "validity.h"
+
#include "emuopts.h"
+#include "video/rgbutil.h"
+
#include <ctype.h>
@@ -50,6 +53,20 @@ inline int validity_checker::get_defstr_index(const char *string, bool suppress_
//-------------------------------------------------
+// random_u64
+// random_s64
+// random_u32
+// random_s32
+//-------------------------------------------------
+#undef rand
+inline INT32 validity_checker::random_i32() { return INT32(random_u32()); }
+inline UINT32 validity_checker::random_u32() { return rand() ^ (rand() << 15); }
+inline INT64 validity_checker::random_i64() { return INT64(random_u64()); }
+inline UINT64 validity_checker::random_u64() { return UINT64(random_u32()) ^ (UINT64(random_u32()) << 30); }
+
+
+
+//-------------------------------------------------
// validate_tag - ensure that the given tag
// meets the general requirements
//-------------------------------------------------
@@ -182,6 +199,7 @@ bool validity_checker::check_all_matching(const char *string)
validate_begin();
validate_core();
validate_inlines();
+ validate_rgb();
// if we had warnings or errors, output
if (m_errors > 0 || m_warnings > 0 || !m_verbose_text.empty())
@@ -362,13 +380,12 @@ void validity_checker::validate_core()
void validity_checker::validate_inlines()
{
-#undef rand
- volatile UINT64 testu64a = rand() ^ (rand() << 15) ^ ((UINT64)rand() << 30) ^ ((UINT64)rand() << 45);
- volatile INT64 testi64a = rand() ^ (rand() << 15) ^ ((INT64)rand() << 30) ^ ((INT64)rand() << 45);
- volatile UINT32 testu32a = rand() ^ (rand() << 15);
- volatile UINT32 testu32b = rand() ^ (rand() << 15);
- volatile INT32 testi32a = rand() ^ (rand() << 15);
- volatile INT32 testi32b = rand() ^ (rand() << 15);
+ volatile UINT64 testu64a = random_u64();
+ volatile INT64 testi64a = random_i64();
+ volatile UINT32 testu32a = random_u32();
+ volatile UINT32 testu32b = random_u32();
+ volatile INT32 testi32a = random_i32();
+ volatile INT32 testi32b = random_i32();
INT32 resulti32, expectedi32;
UINT32 resultu32, expectedu32;
INT64 resulti64, expectedi64;
@@ -482,6 +499,834 @@ void validity_checker::validate_inlines()
//-------------------------------------------------
+// validate_rgb - validate optimised RGB utility
+// class
+//-------------------------------------------------
+
+void validity_checker::validate_rgb()
+{
+ /*
+ This performs cursory tests of most of the vector-optimised RGB
+ utilities, concentrating on the low-level maths. It uses random
+ values most of the time for a quick go/no-go indication rather
+ than trying to exercise edge cases. It doesn't matter too much
+ if the compiler optimises out some of the operations since it's
+ really intended to check for logic bugs in the vector code. If
+ the compiler can work out that the code produces the expected
+ result, that's good enough.
+
+ The tests for bitwise logical operations are ordered to minimise
+ the chance of all-zero or all-one patterns producing a
+ misleading good result.
+
+ The following functions are not tested yet:
+ rgbaint_t()
+ clamp_and_clear(const UINT32)
+ sign_extend(const UINT32, const UINT32)
+ min(const INT32)
+ max(const INT32)
+ blend(const rgbaint_t&, UINT8)
+ scale_and_clamp(const rgbaint_t&)
+ scale_imm_and_clamp(const INT32)
+ scale2_add_and_clamp(const rgbaint_t&, const rgbaint_t&, const rgbaint_t&)
+ scale_add_and_clamp(const rgbaint_t&, const rgbaint_t&);
+ scale_imm_add_and_clamp(const INT32, const rgbaint_t&);
+ static bilinear_filter(UINT32, UINT32, UINT32, UINT32, UINT8, UINT8)
+ bilinear_filter_rgbaint(UINT32, UINT32, UINT32, UINT32, UINT8, UINT8)
+ */
+
+ auto random_i32_nolimit = [this]
+ {
+ INT32 result;
+ do { result = random_i32(); } while ((result == std::numeric_limits<INT32>::min()) || (result == std::numeric_limits<INT32>::max()));
+ return result;
+ };
+
+ volatile INT32 expected_a, expected_r, expected_g, expected_b;
+ volatile INT32 actual_a, actual_r, actual_g, actual_b;
+ volatile INT32 imm;
+ rgbaint_t rgb, other;
+ rgb_t packed;
+ auto check_expected = [&] (const char *desc)
+ {
+ const volatile INT32 a = rgb.get_a32();
+ const volatile INT32 r = rgb.get_r32();
+ const volatile INT32 g = rgb.get_g32();
+ const volatile INT32 b = rgb.get_b32();
+ if (a != expected_a) osd_printf_error("Error testing %s get_a32() = %d (expected %d)\n", desc, a, expected_a);
+ if (r != expected_r) osd_printf_error("Error testing %s get_r32() = %d (expected %d)\n", desc, r, expected_r);
+ if (g != expected_g) osd_printf_error("Error testing %s get_g32() = %d (expected %d)\n", desc, g, expected_g);
+ if (b != expected_b) osd_printf_error("Error testing %s get_b32() = %d (expected %d)\n", desc, b, expected_b);
+ };
+
+ // check set/get
+ expected_a = random_i32();
+ expected_r = random_i32();
+ expected_g = random_i32();
+ expected_b = random_i32();
+ rgb.set(expected_a, expected_r, expected_g, expected_b);
+ check_expected("rgbaint_t::set(a, r, g, b)");
+
+ // check construct/set
+ expected_a = random_i32();
+ expected_r = random_i32();
+ expected_g = random_i32();
+ expected_b = random_i32();
+ rgb.set(rgbaint_t(expected_a, expected_r, expected_g, expected_b));
+ check_expected("rgbaint_t::set(rgbaint_t)");
+
+ // check construct/assign
+ expected_a = random_i32();
+ expected_r = random_i32();
+ expected_g = random_i32();
+ expected_b = random_i32();
+ rgb = rgbaint_t(expected_a, expected_r, expected_g, expected_b);
+ check_expected("rgbaint_t assignment");
+
+ // check piecewise set
+ rgb.set_a(expected_a = random_i32());
+ check_expected("rgbaint_t::set_a");
+ rgb.set_r(expected_r = random_i32());
+ check_expected("rgbaint_t::set_r");
+ rgb.set_g(expected_g = random_i32());
+ check_expected("rgbaint_t::set_g");
+ rgb.set_b(expected_b = random_i32());
+ check_expected("rgbaint_t::set_b");
+
+ // test merge_alpha
+ expected_a = rand();
+ rgb.merge_alpha(rgbaint_t(expected_a, rand(), rand(), rand()));
+ check_expected("rgbaint_t::merge_alpha");
+
+ // test RGB addition (method)
+ expected_a += actual_a = random_i32();
+ expected_r += actual_r = random_i32();
+ expected_g += actual_g = random_i32();
+ expected_b += actual_b = random_i32();
+ rgb.add(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::add");
+
+ // test RGB addition (operator)
+ expected_a += actual_a = random_i32();
+ expected_r += actual_r = random_i32();
+ expected_g += actual_g = random_i32();
+ expected_b += actual_b = random_i32();
+ rgb += rgbaint_t(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::operator+=");
+
+ // test offset addition (method)
+ imm = random_i32();
+ expected_a += imm;
+ expected_r += imm;
+ expected_g += imm;
+ expected_b += imm;
+ rgb.add_imm(imm);
+ check_expected("rgbaint_t::add_imm");
+
+ // test offset addition (operator)
+ imm = random_i32();
+ expected_a += imm;
+ expected_r += imm;
+ expected_g += imm;
+ expected_b += imm;
+ rgb += imm;
+ check_expected("rgbaint_t::operator+=");
+
+ // test immediate RGB addition
+ expected_a += actual_a = random_i32();
+ expected_r += actual_r = random_i32();
+ expected_g += actual_g = random_i32();
+ expected_b += actual_b = random_i32();
+ rgb.add_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::add_imm_rgba");
+
+ // test RGB subtraction (method)
+ expected_a -= actual_a = random_i32();
+ expected_r -= actual_r = random_i32();
+ expected_g -= actual_g = random_i32();
+ expected_b -= actual_b = random_i32();
+ rgb.sub(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::sub");
+
+ // test RGB subtraction (operator)
+ expected_a -= actual_a = random_i32();
+ expected_r -= actual_r = random_i32();
+ expected_g -= actual_g = random_i32();
+ expected_b -= actual_b = random_i32();
+ rgb -= rgbaint_t(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::operator-=");
+
+ // test offset subtraction
+ imm = random_i32();
+ expected_a -= imm;
+ expected_r -= imm;
+ expected_g -= imm;
+ expected_b -= imm;
+ rgb.sub_imm(imm);
+ check_expected("rgbaint_t::sub_imm");
+
+ // test immediate RGB subtraction
+ expected_a -= actual_a = random_i32();
+ expected_r -= actual_r = random_i32();
+ expected_g -= actual_g = random_i32();
+ expected_b -= actual_b = random_i32();
+ rgb.sub_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::sub_imm_rgba");
+
+ // test reversed RGB subtraction
+ expected_a = (actual_a = random_i32()) - expected_a;
+ expected_r = (actual_r = random_i32()) - expected_r;
+ expected_g = (actual_g = random_i32()) - expected_g;
+ expected_b = (actual_b = random_i32()) - expected_b;
+ rgb.subr(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::subr");
+
+ // test reversed offset subtraction
+ imm = random_i32();
+ expected_a = imm - expected_a;
+ expected_r = imm - expected_r;
+ expected_g = imm - expected_g;
+ expected_b = imm - expected_b;
+ rgb.subr_imm(imm);
+ check_expected("rgbaint_t::subr_imm");
+
+ // test reversed immediate RGB subtraction
+ expected_a = (actual_a = random_i32()) - expected_a;
+ expected_r = (actual_r = random_i32()) - expected_r;
+ expected_g = (actual_g = random_i32()) - expected_g;
+ expected_b = (actual_b = random_i32()) - expected_b;
+ rgb.subr_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::subr_imm_rgba");
+
+ // test RGB multiplication (method)
+ expected_a *= actual_a = random_i32();
+ expected_r *= actual_r = random_i32();
+ expected_g *= actual_g = random_i32();
+ expected_b *= actual_b = random_i32();
+ rgb.mul(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::mul");
+
+ // test RGB multiplication (operator)
+ expected_a *= actual_a = random_i32();
+ expected_r *= actual_r = random_i32();
+ expected_g *= actual_g = random_i32();
+ expected_b *= actual_b = random_i32();
+ rgb *= rgbaint_t(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::operator*=");
+
+ // test factor multiplication (method)
+ imm = random_i32();
+ expected_a *= imm;
+ expected_r *= imm;
+ expected_g *= imm;
+ expected_b *= imm;
+ rgb.mul_imm(imm);
+ check_expected("rgbaint_t::mul_imm");
+
+ // test factor multiplication (operator)
+ imm = random_i32();
+ expected_a *= imm;
+ expected_r *= imm;
+ expected_g *= imm;
+ expected_b *= imm;
+ rgb *= imm;
+ check_expected("rgbaint_t::operator*=");
+
+ // test immediate RGB multiplication
+ expected_a *= actual_a = random_i32();
+ expected_r *= actual_r = random_i32();
+ expected_g *= actual_g = random_i32();
+ expected_b *= actual_b = random_i32();
+ rgb.mul_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::mul_imm_rgba");
+
+ // test RGB and not
+ expected_a &= ~(actual_a = random_i32());
+ expected_r &= ~(actual_r = random_i32());
+ expected_g &= ~(actual_g = random_i32());
+ expected_b &= ~(actual_b = random_i32());
+ rgb.andnot_reg(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::andnot_reg");
+
+ // test RGB or
+ expected_a |= actual_a = random_i32();
+ expected_r |= actual_r = random_i32();
+ expected_g |= actual_g = random_i32();
+ expected_b |= actual_b = random_i32();
+ rgb.or_reg(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::or_reg");
+
+ // test RGB and
+ expected_a &= actual_a = random_i32();
+ expected_r &= actual_r = random_i32();
+ expected_g &= actual_g = random_i32();
+ expected_b &= actual_b = random_i32();
+ rgb.and_reg(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::and_reg");
+
+ // test RGB xor
+ expected_a ^= actual_a = random_i32();
+ expected_r ^= actual_r = random_i32();
+ expected_g ^= actual_g = random_i32();
+ expected_b ^= actual_b = random_i32();
+ rgb.xor_reg(rgbaint_t(actual_a, actual_r, actual_g, actual_b));
+ check_expected("rgbaint_t::xor_reg");
+
+ // test uniform or
+ imm = random_i32();
+ expected_a |= imm;
+ expected_r |= imm;
+ expected_g |= imm;
+ expected_b |= imm;
+ rgb.or_imm(imm);
+ check_expected("rgbaint_t::or_imm");
+
+ // test uniform and
+ imm = random_i32();
+ expected_a &= imm;
+ expected_r &= imm;
+ expected_g &= imm;
+ expected_b &= imm;
+ rgb.and_imm(imm);
+ check_expected("rgbaint_t::and_imm");
+
+ // test uniform xor
+ imm = random_i32();
+ expected_a ^= imm;
+ expected_r ^= imm;
+ expected_g ^= imm;
+ expected_b ^= imm;
+ rgb.xor_imm(imm);
+ check_expected("rgbaint_t::xor_imm");
+
+ // test immediate RGB or
+ expected_a |= actual_a = random_i32();
+ expected_r |= actual_r = random_i32();
+ expected_g |= actual_g = random_i32();
+ expected_b |= actual_b = random_i32();
+ rgb.or_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::or_imm_rgba");
+
+ // test immediate RGB and
+ expected_a &= actual_a = random_i32();
+ expected_r &= actual_r = random_i32();
+ expected_g &= actual_g = random_i32();
+ expected_b &= actual_b = random_i32();
+ rgb.and_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::and_imm_rgba");
+
+ // test immediate RGB xor
+ expected_a ^= actual_a = random_i32();
+ expected_r ^= actual_r = random_i32();
+ expected_g ^= actual_g = random_i32();
+ expected_b ^= actual_b = random_i32();
+ rgb.xor_imm_rgba(actual_a, actual_r, actual_g, actual_b);
+ check_expected("rgbaint_t::xor_imm_rgba");
+
+ // test 8-bit get
+ expected_a = INT32(UINT32(expected_a) & 0x00ff);
+ expected_r = INT32(UINT32(expected_r) & 0x00ff);
+ expected_g = INT32(UINT32(expected_g) & 0x00ff);
+ expected_b = INT32(UINT32(expected_b) & 0x00ff);
+ actual_a = INT32(UINT32(rgb.get_a()));
+ actual_r = INT32(UINT32(rgb.get_r()));
+ actual_g = INT32(UINT32(rgb.get_g()));
+ actual_b = INT32(UINT32(rgb.get_b()));
+ if (actual_a != expected_a) osd_printf_error("Error testing rgbaint_t::get_a() = %d (expected %d)\n", actual_a, expected_a);
+ if (actual_r != expected_r) osd_printf_error("Error testing rgbaint_t::get_r() = %d (expected %d)\n", actual_r, expected_r);
+ if (actual_g != expected_g) osd_printf_error("Error testing rgbaint_t::get_g() = %d (expected %d)\n", actual_g, expected_g);
+ if (actual_b != expected_b) osd_printf_error("Error testing rgbaint_t::get_b() = %d (expected %d)\n", actual_b, expected_b);
+
+ // test set from packed RGBA
+ imm = random_i32();
+ expected_a = INT32((UINT32(imm) >> 24) & 0x00ff);
+ expected_r = INT32((UINT32(imm) >> 16) & 0x00ff);
+ expected_g = INT32((UINT32(imm) >> 8) & 0x00ff);
+ expected_b = INT32((UINT32(imm) >> 0) & 0x00ff);
+ rgb.set(UINT32(imm));
+ check_expected("rgbaint_t::set(UINT32)");
+
+ // while we have a value loaded that we know doesn't exceed 8-bit range, check the non-clamping convert-to-rgba
+ packed = rgb.to_rgba();
+ if (UINT32(imm) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba() = %08x (expected %08x)\n", UINT32(packed), UINT32(imm));
+
+ // test construct from packed RGBA and assign
+ imm = random_i32();
+ expected_a = INT32((UINT32(imm) >> 24) & 0x00ff);
+ expected_r = INT32((UINT32(imm) >> 16) & 0x00ff);
+ expected_g = INT32((UINT32(imm) >> 8) & 0x00ff);
+ expected_b = INT32((UINT32(imm) >> 0) & 0x00ff);
+ rgb = rgbaint_t(UINT32(imm));
+ check_expected("rgbaint_t(UINT32)");
+
+ // while we have a value loaded that we know doesn't exceed 8-bit range, check the non-clamping convert-to-rgba
+ packed = rgb.to_rgba();
+ if (UINT32(imm) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba() = %08x (expected %08x)\n", UINT32(packed), UINT32(imm));
+
+ // test set with rgb_t
+ packed = random_u32();
+ expected_a = INT32(UINT32(packed.a()));
+ expected_r = INT32(UINT32(packed.r()));
+ expected_g = INT32(UINT32(packed.g()));
+ expected_b = INT32(UINT32(packed.b()));
+ rgb.set(packed);
+ check_expected("rgbaint_t::set(rgba_t)");
+
+ // test construct with rgb_t
+ packed = random_u32();
+ expected_a = INT32(UINT32(packed.a()));
+ expected_r = INT32(UINT32(packed.r()));
+ expected_g = INT32(UINT32(packed.g()));
+ expected_b = INT32(UINT32(packed.b()));
+ rgb = rgbaint_t(packed);
+ check_expected("rgbaint_t::set(rgba_t)");
+
+ // test clamping convert-to-rgba with hand-crafted values to catch edge cases
+ rgb.set(std::numeric_limits<INT32>::min(), -1, 0, 1);
+ packed = rgb.to_rgba_clamp();
+ if (UINT32(0x00000001) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba_clamp() = %08x (expected 0x00000001)\n", UINT32(packed));
+ rgb.set(254, 255, 256, std::numeric_limits<INT32>::max());
+ packed = rgb.to_rgba_clamp();
+ if (UINT32(0xfeffffff) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba_clamp() = %08x (expected 0xfeffffff)\n", UINT32(packed));
+ rgb.set(std::numeric_limits<INT32>::max(), std::numeric_limits<INT32>::min(), 256, -1);
+ packed = rgb.to_rgba_clamp();
+ if (UINT32(0xff00ff00) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba_clamp() = %08x (expected 0xff00ff00)\n", UINT32(packed));
+ rgb.set(0, 255, 1, 254);
+ packed = rgb.to_rgba_clamp();
+ if (UINT32(0x00ff01fe) != UINT32(packed))
+ osd_printf_error("Error testing rgbaint_t::to_rgba_clamp() = %08x (expected 0x00ff01fe)\n", UINT32(packed));
+
+ // test in-place clamping with hand-crafted values to catch edge cases
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 1;
+ rgb.set(std::numeric_limits<INT32>::min(), -1, 0, 1);
+ rgb.clamp_to_uint8();
+ check_expected("rgbaint_t::clamp_to_uint8");
+ expected_a = 254;
+ expected_r = 255;
+ expected_g = 255;
+ expected_b = 255;
+ rgb.set(254, 255, 256, std::numeric_limits<INT32>::max());
+ rgb.clamp_to_uint8();
+ check_expected("rgbaint_t::clamp_to_uint8");
+ expected_a = 255;
+ expected_r = 0;
+ expected_g = 255;
+ expected_b = 0;
+ rgb.set(std::numeric_limits<INT32>::max(), std::numeric_limits<INT32>::min(), 256, -1);
+ rgb.clamp_to_uint8();
+ check_expected("rgbaint_t::clamp_to_uint8");
+ expected_a = 0;
+ expected_r = 255;
+ expected_g = 1;
+ expected_b = 254;
+ rgb.set(0, 255, 1, 254);
+ rgb.clamp_to_uint8();
+ check_expected("rgbaint_t::clamp_to_uint8");
+
+ // test shift left
+ expected_a = (actual_a = random_i32()) << 19;
+ expected_r = (actual_r = random_i32()) << 3;
+ expected_g = (actual_g = random_i32()) << 21;
+ expected_b = (actual_b = random_i32()) << 6;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shl(rgbaint_t(19, 3, 21, 6));
+ check_expected("rgbaint_t::shl");
+
+ // test shift left immediate
+ expected_a = (actual_a = random_i32()) << 7;
+ expected_r = (actual_r = random_i32()) << 7;
+ expected_g = (actual_g = random_i32()) << 7;
+ expected_b = (actual_b = random_i32()) << 7;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shl_imm(7);
+ check_expected("rgbaint_t::shl_imm");
+
+ // test logical shift right
+ expected_a = INT32(UINT32(actual_a = random_i32()) >> 8);
+ expected_r = INT32(UINT32(actual_r = random_i32()) >> 18);
+ expected_g = INT32(UINT32(actual_g = random_i32()) >> 26);
+ expected_b = INT32(UINT32(actual_b = random_i32()) >> 4);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shr(rgbaint_t(8, 18, 26, 4));
+ check_expected("rgbaint_t::shr");
+
+ // test logical shift right with opposite signs
+ expected_a = INT32(UINT32(actual_a = -actual_a) >> 21);
+ expected_r = INT32(UINT32(actual_r = -actual_r) >> 13);
+ expected_g = INT32(UINT32(actual_g = -actual_g) >> 11);
+ expected_b = INT32(UINT32(actual_b = -actual_b) >> 17);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shr(rgbaint_t(21, 13, 11, 17));
+ check_expected("rgbaint_t::shr");
+
+ // test logical shift right immediate
+ expected_a = INT32(UINT32(actual_a = random_i32()) >> 5);
+ expected_r = INT32(UINT32(actual_r = random_i32()) >> 5);
+ expected_g = INT32(UINT32(actual_g = random_i32()) >> 5);
+ expected_b = INT32(UINT32(actual_b = random_i32()) >> 5);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shr_imm(5);
+ check_expected("rgbaint_t::shr_imm");
+
+ // test logical shift right immediate with opposite signs
+ expected_a = INT32(UINT32(actual_a = -actual_a) >> 15);
+ expected_r = INT32(UINT32(actual_r = -actual_r) >> 15);
+ expected_g = INT32(UINT32(actual_g = -actual_g) >> 15);
+ expected_b = INT32(UINT32(actual_b = -actual_b) >> 15);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.shr_imm(15);
+ check_expected("rgbaint_t::shr_imm");
+
+ // test arithmetic shift right
+ expected_a = (actual_a = random_i32()) >> 16;
+ expected_r = (actual_r = random_i32()) >> 20;
+ expected_g = (actual_g = random_i32()) >> 14;
+ expected_b = (actual_b = random_i32()) >> 2;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.sra(rgbaint_t(16, 20, 14, 2));
+ check_expected("rgbaint_t::sra");
+
+ // test arithmetic shift right with opposite signs
+ expected_a = (actual_a = -actual_a) >> 1;
+ expected_r = (actual_r = -actual_r) >> 29;
+ expected_g = (actual_g = -actual_g) >> 10;
+ expected_b = (actual_b = -actual_b) >> 22;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.sra(rgbaint_t(1, 29, 10, 22));
+ check_expected("rgbaint_t::sra");
+
+ // test arithmetic shift right immediate (method)
+ expected_a = (actual_a = random_i32()) >> 12;
+ expected_r = (actual_r = random_i32()) >> 12;
+ expected_g = (actual_g = random_i32()) >> 12;
+ expected_b = (actual_b = random_i32()) >> 12;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.sra_imm(12);
+ check_expected("rgbaint_t::sra_imm");
+
+ // test arithmetic shift right immediate with opposite signs (method)
+ expected_a = (actual_a = -actual_a) >> 9;
+ expected_r = (actual_r = -actual_r) >> 9;
+ expected_g = (actual_g = -actual_g) >> 9;
+ expected_b = (actual_b = -actual_b) >> 9;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.sra_imm(9);
+ check_expected("rgbaint_t::sra_imm");
+
+ // test arithmetic shift right immediate (operator)
+ expected_a = (actual_a = random_i32()) >> 7;
+ expected_r = (actual_r = random_i32()) >> 7;
+ expected_g = (actual_g = random_i32()) >> 7;
+ expected_b = (actual_b = random_i32()) >> 7;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb >>= 7;
+ check_expected("rgbaint_t::operator>>=");
+
+ // test arithmetic shift right immediate with opposite signs (operator)
+ expected_a = (actual_a = -actual_a) >> 11;
+ expected_r = (actual_r = -actual_r) >> 11;
+ expected_g = (actual_g = -actual_g) >> 11;
+ expected_b = (actual_b = -actual_b) >> 11;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb >>= 11;
+ check_expected("rgbaint_t::operator>>=");
+
+ // test RGB equality comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = ~INT32(0);
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq(rgbaint_t(actual_a, actual_r - 1, actual_g + 1, std::numeric_limits<INT32>::min()));
+ check_expected("rgbaint_t::cmpeq");
+ expected_a = 0;
+ expected_r = ~INT32(0);
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq(rgbaint_t(std::numeric_limits<INT32>::max(), actual_r, actual_g - 1, actual_b + 1));
+ check_expected("rgbaint_t::cmpeq");
+
+ // test immediate equality comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = ~INT32(0);
+ expected_r = (actual_r == actual_a) ? ~INT32(0) : 0;
+ expected_g = (actual_g == actual_a) ? ~INT32(0) : 0;
+ expected_b = (actual_b == actual_a) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(actual_a);
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = (actual_a == actual_r) ? ~INT32(0) : 0;
+ expected_r = ~INT32(0);
+ expected_g = (actual_g == actual_r) ? ~INT32(0) : 0;
+ expected_b = (actual_b == actual_r) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(actual_r);
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = (actual_a == actual_g) ? ~INT32(0) : 0;
+ expected_r = (actual_r == actual_g) ? ~INT32(0) : 0;
+ expected_g = ~INT32(0);
+ expected_b = (actual_b == actual_g) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(actual_g);
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = (actual_a == actual_b) ? ~INT32(0) : 0;
+ expected_r = (actual_r == actual_b) ? ~INT32(0) : 0;
+ expected_g = (actual_g == actual_b) ? ~INT32(0) : 0;
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(actual_b);
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(std::numeric_limits<INT32>::min());
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = !actual_a ? ~INT32(0) : 0;
+ expected_r = !actual_r ? ~INT32(0) : 0;
+ expected_g = !actual_g ? ~INT32(0) : 0;
+ expected_b = !actual_b ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(0);
+ check_expected("rgbaint_t::cmpeq_imm");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm(std::numeric_limits<INT32>::max());
+ check_expected("rgbaint_t::cmpeq_imm");
+
+ // test immediate RGB equality comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = ~INT32(0);
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm_rgba(std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_g, actual_b - 1);
+ check_expected("rgbaint_t::cmpeq_imm_rgba");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpeq_imm_rgba(actual_a + 1, std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_b);
+ check_expected("rgbaint_t::cmpeq_imm_rgba");
+
+ // test RGB greater than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = ~INT32(0);
+ expected_g = 0;
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt(rgbaint_t(actual_a, actual_r - 1, actual_g + 1, std::numeric_limits<INT32>::min()));
+ check_expected("rgbaint_t::cmpgt");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = ~INT32(0);
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt(rgbaint_t(std::numeric_limits<INT32>::max(), actual_r, actual_g - 1, actual_b + 1));
+ check_expected("rgbaint_t::cmpgt");
+
+ // test immediate greater than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = (actual_r > actual_a) ? ~INT32(0) : 0;
+ expected_g = (actual_g > actual_a) ? ~INT32(0) : 0;
+ expected_b = (actual_b > actual_a) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(actual_a);
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = (actual_a > actual_r) ? ~INT32(0) : 0;
+ expected_r = 0;
+ expected_g = (actual_g > actual_r) ? ~INT32(0) : 0;
+ expected_b = (actual_b > actual_r) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(actual_r);
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = (actual_a > actual_g) ? ~INT32(0) : 0;
+ expected_r = (actual_r > actual_g) ? ~INT32(0) : 0;
+ expected_g =0;
+ expected_b = (actual_b > actual_g) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(actual_g);
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = (actual_a > actual_b) ? ~INT32(0) : 0;
+ expected_r = (actual_r > actual_b) ? ~INT32(0) : 0;
+ expected_g = (actual_g > actual_b) ? ~INT32(0) : 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(actual_b);
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = ~INT32(0);
+ expected_r = ~INT32(0);
+ expected_g = ~INT32(0);
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(std::numeric_limits<INT32>::min());
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = (actual_a > 0) ? ~INT32(0) : 0;
+ expected_r = (actual_r > 0) ? ~INT32(0) : 0;
+ expected_g = (actual_g > 0) ? ~INT32(0) : 0;
+ expected_b = (actual_b > 0) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(0);
+ check_expected("rgbaint_t::cmpgt_imm");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm(std::numeric_limits<INT32>::max());
+ check_expected("rgbaint_t::cmpgt_imm");
+
+ // test immediate RGB greater than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = ~INT32(0);
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm_rgba(std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_g, actual_b - 1);
+ check_expected("rgbaint_t::cmpgt_imm_rgba");
+ expected_a = 0;
+ expected_r = ~INT32(0);
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmpgt_imm_rgba(actual_a + 1, std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_b);
+ check_expected("rgbaint_t::cmpgt_imm_rgba");
+
+ // test RGB less than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = ~INT32(0);
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt(rgbaint_t(actual_a, actual_r - 1, actual_g + 1, std::numeric_limits<INT32>::min()));
+ check_expected("rgbaint_t::cmplt");
+ expected_a = ~INT32(0);
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt(rgbaint_t(std::numeric_limits<INT32>::max(), actual_r, actual_g - 1, actual_b + 1));
+ check_expected("rgbaint_t::cmplt");
+
+ // test immediate less than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = (actual_r < actual_a) ? ~INT32(0) : 0;
+ expected_g = (actual_g < actual_a) ? ~INT32(0) : 0;
+ expected_b = (actual_b < actual_a) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(actual_a);
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = (actual_a < actual_r) ? ~INT32(0) : 0;
+ expected_r = 0;
+ expected_g = (actual_g < actual_r) ? ~INT32(0) : 0;
+ expected_b = (actual_b < actual_r) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(actual_r);
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = (actual_a < actual_g) ? ~INT32(0) : 0;
+ expected_r = (actual_r < actual_g) ? ~INT32(0) : 0;
+ expected_g =0;
+ expected_b = (actual_b < actual_g) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(actual_g);
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = (actual_a < actual_b) ? ~INT32(0) : 0;
+ expected_r = (actual_r < actual_b) ? ~INT32(0) : 0;
+ expected_g = (actual_g < actual_b) ? ~INT32(0) : 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(actual_b);
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = 0;
+ expected_r = 0;
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(std::numeric_limits<INT32>::min());
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = (actual_a < 0) ? ~INT32(0) : 0;
+ expected_r = (actual_r < 0) ? ~INT32(0) : 0;
+ expected_g = (actual_g < 0) ? ~INT32(0) : 0;
+ expected_b = (actual_b < 0) ? ~INT32(0) : 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(0);
+ check_expected("rgbaint_t::cmplt_imm");
+ expected_a = ~INT32(0);
+ expected_r = ~INT32(0);
+ expected_g = ~INT32(0);
+ expected_b = ~INT32(0);
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm(std::numeric_limits<INT32>::max());
+ check_expected("rgbaint_t::cmplt_imm");
+
+ // test immediate RGB less than comparison
+ actual_a = random_i32_nolimit();
+ actual_r = random_i32_nolimit();
+ actual_g = random_i32_nolimit();
+ actual_b = random_i32_nolimit();
+ expected_a = 0;
+ expected_r = ~INT32(0);
+ expected_g = 0;
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm_rgba(std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_g, actual_b - 1);
+ check_expected("rgbaint_t::cmplt_imm_rgba");
+ expected_a = ~INT32(0);
+ expected_r = 0;
+ expected_g = ~INT32(0);
+ expected_b = 0;
+ rgb.set(actual_a, actual_r, actual_g, actual_b);
+ rgb.cmplt_imm_rgba(actual_a + 1, std::numeric_limits<INT32>::min(), std::numeric_limits<INT32>::max(), actual_b);
+ check_expected("rgbaint_t::cmplt_imm_rgba");
+}
+
+
+//-------------------------------------------------
// validate_driver - validate basic driver
// information
//-------------------------------------------------
@@ -1024,42 +1869,45 @@ void validity_checker::output_callback(osd_output_channel channel, const char *m
std::string output;
switch (channel)
{
- case OSD_OUTPUT_CHANNEL_ERROR:
- // count the error
- m_errors++;
+ case OSD_OUTPUT_CHANNEL_ERROR:
+ // count the error
+ m_errors++;
- // output the source(driver) device 'tag'
- build_output_prefix(output);
+ // output the source(driver) device 'tag'
+ build_output_prefix(output);
- // generate the string
- strcatvprintf(output, msg, args);
- m_error_text.append(output);
- break;
- case OSD_OUTPUT_CHANNEL_WARNING:
- // count the error
- m_warnings++;
+ // generate the string
+ strcatvprintf(output, msg, args);
+ m_error_text.append(output);
+ break;
- // output the source(driver) device 'tag'
- build_output_prefix(output);
+ case OSD_OUTPUT_CHANNEL_WARNING:
+ // count the error
+ m_warnings++;
- // generate the string and output to the original target
- strcatvprintf(output, msg, args);
- m_warning_text.append(output);
- break;
- case OSD_OUTPUT_CHANNEL_VERBOSE:
- // if we're not verbose, skip it
- if (!m_print_verbose) break;
+ // output the source(driver) device 'tag'
+ build_output_prefix(output);
- // output the source(driver) device 'tag'
- build_output_prefix(output);
+ // generate the string and output to the original target
+ strcatvprintf(output, msg, args);
+ m_warning_text.append(output);
+ break;
- // generate the string and output to the original target
- strcatvprintf(output, msg, args);
- m_verbose_text.append(output);
- break;
- default:
- chain_output(channel, msg, args);
- break;
+ case OSD_OUTPUT_CHANNEL_VERBOSE:
+ // if we're not verbose, skip it
+ if (!m_print_verbose) break;
+
+ // output the source(driver) device 'tag'
+ build_output_prefix(output);
+
+ // generate the string and output to the original target
+ strcatvprintf(output, msg, args);
+ m_verbose_text.append(output);
+ break;
+
+ default:
+ chain_output(channel, msg, args);
+ break;
}
}
@@ -1075,7 +1923,7 @@ void validity_checker::output_via_delegate(osd_output_channel channel, const cha
// call through to the delegate with the proper parameters
va_start(argptr, format);
- this->chain_output(channel, format, argptr);
+ chain_output(channel, format, argptr);
va_end(argptr);
}
diff --git a/src/emu/validity.h b/src/emu/validity.h
index cca0eda18da..a25a922e7b6 100644
--- a/src/emu/validity.h
+++ b/src/emu/validity.h
@@ -8,10 +8,10 @@
***************************************************************************/
-#pragma once
+#ifndef MAME_EMU_VALIDITY_H
+#define MAME_EMU_VALIDITY_H
-#ifndef __VALIDITY_H__
-#define __VALIDITY_H__
+#pragma once
#include "emu.h"
#include "drivenum.h"
@@ -28,10 +28,6 @@ class machine_config;
// core validity checker class
class validity_checker : public osd_output
{
- // internal map types
- typedef std::unordered_map<std::string,const game_driver *> game_driver_map;
- typedef std::unordered_map<std::string,FPTR> int_map;
-
public:
validity_checker(emu_options &options);
~validity_checker();
@@ -63,6 +59,10 @@ protected:
virtual void output_callback(osd_output_channel channel, const char *msg, va_list args) override;
private:
+ // internal map types
+ typedef std::unordered_map<std::string,const game_driver *> game_driver_map;
+ typedef std::unordered_map<std::string,FPTR> int_map;
+
// internal helpers
const char *ioport_string_from_index(UINT32 index);
int get_defstr_index(const char *string, bool suppress_error = false);
@@ -75,6 +75,7 @@ private:
// internal sub-checks
void validate_core();
void validate_inlines();
+ void validate_rgb();
void validate_driver();
void validate_roms();
void validate_analog_input_field(ioport_field &field);
@@ -88,6 +89,12 @@ private:
void output_via_delegate(osd_output_channel channel, const char *format, ...) ATTR_PRINTF(3,4);
void output_indented_errors(std::string &text, const char *header);
+ // random number generation
+ INT32 random_i32();
+ UINT32 random_u32();
+ INT64 random_i64();
+ UINT64 random_u64();
+
// internal driver list
driver_enumerator m_drivlist;
@@ -115,4 +122,4 @@ private:
bool m_validate_all;
};
-#endif
+#endif // MAME_EMU_VALIDITY_H
diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h
index 42014d14106..3b2279a3d01 100644
--- a/src/emu/video/rgbgen.h
+++ b/src/emu/video/rgbgen.h
@@ -8,8 +8,8 @@
***************************************************************************/
-#ifndef __RGBGEN__
-#define __RGBGEN__
+#ifndef MAME_EMU_VIDEO_RGBGEN_H
+#define MAME_EMU_VIDEO_RGBGEN_H
/***************************************************************************
@@ -19,36 +19,51 @@
class rgbaint_t
{
public:
- inline rgbaint_t(): m_a(0), m_r(0), m_g(0), m_b(0) { }
- inline rgbaint_t(UINT32 rgba) { set(rgba); }
- inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
- inline rgbaint_t(const rgb_t& rgba) { set(rgba); }
+ rgbaint_t(): m_a(0), m_r(0), m_g(0), m_b(0) { }
+ explicit rgbaint_t(UINT32 rgba) { set(rgba); }
+ rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
+ explicit rgbaint_t(const rgb_t& rgba) { set(rgba); }
- inline void set(rgbaint_t& other) { set(other.m_a, other.m_r, other.m_g, other.m_b); }
- inline void set(UINT32 rgba) { set((rgba >> 24) & 0xff, (rgba >> 16) & 0xff, (rgba >> 8) & 0xff, rgba & 0xff); }
- inline void set(INT32 a, INT32 r, INT32 g, INT32 b)
+ rgbaint_t(const rgbaint_t& other) = default;
+ rgbaint_t &operator=(const rgbaint_t& other) = default;
+
+ void set(const rgbaint_t& other) { set(other.m_a, other.m_r, other.m_g, other.m_b); }
+ void set(UINT32 rgba) { set((rgba >> 24) & 0xff, (rgba >> 16) & 0xff, (rgba >> 8) & 0xff, rgba & 0xff); }
+ void set(INT32 a, INT32 r, INT32 g, INT32 b)
{
m_a = a;
m_r = r;
m_g = g;
m_b = b;
}
- inline void set(const rgb_t& rgba) { set(rgba.a(), rgba.r(), rgba.g(), rgba.b()); }
+ void set(const rgb_t& rgba) { set(rgba.a(), rgba.r(), rgba.g(), rgba.b()); }
- inline rgb_t to_rgba() const
- {
- return rgb_t(m_a, m_r, m_g, m_b);
- }
+ rgb_t to_rgba() const { return rgb_t(get_a(), get_r(), get_g(), get_b()); }
- inline rgb_t to_rgba_clamp() const
+ rgb_t to_rgba_clamp() const
{
- UINT8 a = (m_a < 0) ? 0 : (m_a > 255) ? 255 : m_a;
- UINT8 r = (m_r < 0) ? 0 : (m_r > 255) ? 255 : m_r;
- UINT8 g = (m_g < 0) ? 0 : (m_g > 255) ? 255 : m_g;
- UINT8 b = (m_b < 0) ? 0 : (m_b > 255) ? 255 : m_b;
+ const UINT8 a = (m_a < 0) ? 0 : (m_a > 255) ? 255 : m_a;
+ const UINT8 r = (m_r < 0) ? 0 : (m_r > 255) ? 255 : m_r;
+ const UINT8 g = (m_g < 0) ? 0 : (m_g > 255) ? 255 : m_g;
+ const UINT8 b = (m_b < 0) ? 0 : (m_b > 255) ? 255 : m_b;
return rgb_t(a, r, g, b);
}
+ void set_a(const INT32 value) { m_a = value; }
+ void set_r(const INT32 value) { m_r = value; }
+ void set_g(const INT32 value) { m_g = value; }
+ void set_b(const INT32 value) { m_b = value; }
+
+ UINT8 get_a() const { return UINT8(UINT32(m_a)); }
+ UINT8 get_r() const { return UINT8(UINT32(m_r)); }
+ UINT8 get_g() const { return UINT8(UINT32(m_g)); }
+ UINT8 get_b() const { return UINT8(UINT32(m_b)); }
+
+ INT32 get_a32() const { return m_a; }
+ INT32 get_r32() const { return m_r; }
+ INT32 get_g32() const { return m_g; }
+ INT32 get_b32() const { return m_b; }
+
inline void add(const rgbaint_t& color)
{
add_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
@@ -85,7 +100,7 @@ public:
m_b -= b;
}
- inline void subr(rgbaint_t& color)
+ inline void subr(const rgbaint_t& color)
{
subr_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
}
@@ -103,67 +118,7 @@ public:
m_b = b - m_b;
}
- inline void set_a(const INT32 value)
- {
- m_a = value;
- }
-
- inline void set_r(const INT32 value)
- {
- m_r = value;
- }
-
- inline void set_g(const INT32 value)
- {
- m_g = value;
- }
-
- inline void set_b(const INT32 value)
- {
- m_b = value;
- }
-
- inline UINT8 get_a() const
- {
- return m_a;
- }
-
- inline UINT8 get_r() const
- {
- return m_r;
- }
-
- inline UINT8 get_g() const
- {
- return m_g;
- }
-
- inline UINT8 get_b() const
- {
- return m_b;
- }
-
- inline INT32 get_a32() const
- {
- return m_a;
- }
-
- inline INT32 get_r32() const
- {
- return m_r;
- }
-
- inline INT32 get_g32() const
- {
- return m_g;
- }
-
- inline INT32 get_b32() const
- {
- return m_b;
- }
-
- inline void mul(rgbaint_t& color)
+ inline void mul(const rgbaint_t& color)
{
mul_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
}
@@ -202,10 +157,10 @@ public:
inline void shr(const rgbaint_t& shift)
{
- m_a >>= shift.m_a;
- m_r >>= shift.m_r;
- m_g >>= shift.m_g;
- m_b >>= shift.m_b;
+ m_a = INT32(UINT32(m_a) >> shift.m_a);
+ m_r = INT32(UINT32(m_r) >> shift.m_r);
+ m_g = INT32(UINT32(m_g) >> shift.m_g);
+ m_b = INT32(UINT32(m_b) >> shift.m_b);
}
inline void shr_imm(const UINT8 shift)
@@ -213,10 +168,10 @@ public:
if (shift == 0)
return;
- m_a >>= shift;
- m_r >>= shift;
- m_g >>= shift;
- m_b >>= shift;
+ m_a = INT32(UINT32(m_a) >> shift);
+ m_r = INT32(UINT32(m_r) >> shift);
+ m_g = INT32(UINT32(m_g) >> shift);
+ m_b = INT32(UINT32(m_b) >> shift);
}
inline void sra(const rgbaint_t& shift)
@@ -260,15 +215,15 @@ public:
m_b |= high_mask;
}
- inline void or_reg(const rgbaint_t& color)
- {
- or_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
- }
+ void or_reg(const rgbaint_t& color) { or_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b); }
+ void and_reg(const rgbaint_t& color) { and_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b); }
+ void xor_reg(const rgbaint_t& color) { xor_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b); }
- inline void or_imm(const INT32 imm)
- {
- or_imm_rgba(imm, imm, imm, imm);
- }
+ void andnot_reg(const rgbaint_t& color) { and_imm_rgba(~color.m_a, ~color.m_r, ~color.m_g, ~color.m_b); }
+
+ void or_imm(INT32 imm) { or_imm_rgba(imm, imm, imm, imm); }
+ void and_imm(INT32 imm) { and_imm_rgba(imm, imm, imm, imm); }
+ void xor_imm(INT32 imm) { xor_imm_rgba(imm, imm, imm, imm); }
inline void or_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
{
@@ -278,21 +233,6 @@ public:
m_b |= b;
}
- inline void and_reg(const rgbaint_t& color)
- {
- and_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
- }
-
- inline void andnot_reg(const rgbaint_t& color)
- {
- and_imm_rgba(~color.m_a, ~color.m_r, ~color.m_g, ~color.m_b);
- }
-
- inline void and_imm(const INT32 imm)
- {
- and_imm_rgba(imm, imm, imm, imm);
- }
-
inline void and_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
{
m_a &= a;
@@ -301,16 +241,6 @@ public:
m_b &= b;
}
- inline void xor_reg(const rgbaint_t& color)
- {
- xor_imm_rgba(color.m_a, color.m_r, color.m_g, color.m_b);
- }
-
- inline void xor_imm(const INT32 imm)
- {
- xor_imm_rgba(imm, imm, imm, imm);
- }
-
inline void xor_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
{
m_a ^= a;
@@ -321,22 +251,12 @@ public:
inline void clamp_and_clear(const UINT32 sign)
{
- if (m_a & sign)
- m_a = 0;
-
- if (m_r & sign)
- m_r = 0;
-
- if (m_g & sign)
- m_g = 0;
+ if (m_a & sign) m_a = 0;
+ if (m_r & sign) m_r = 0;
+ if (m_g & sign) m_g = 0;
+ if (m_b & sign) m_b = 0;
- if (m_b & sign)
- m_b = 0;
-
- m_a = (m_a < 0) ? 0 : (m_a > 255) ? 255 : m_a;
- m_r = (m_r < 0) ? 0 : (m_r > 255) ? 255 : m_r;
- m_g = (m_g < 0) ? 0 : (m_g > 255) ? 255 : m_g;
- m_b = (m_b < 0) ? 0 : (m_b > 255) ? 255 : m_b;
+ clamp_to_uint8();
}
inline void clamp_to_uint8()
@@ -370,6 +290,14 @@ public:
m_b = (m_b > value) ? value : m_b;
}
+ inline void max(const INT32 value)
+ {
+ m_a = (m_a < value) ? value : m_a;
+ m_r = (m_r < value) ? value : m_r;
+ m_g = (m_g < value) ? value : m_g;
+ m_b = (m_b < value) ? value : m_b;
+ }
+
void blend(const rgbaint_t& other, UINT8 factor);
void scale_and_clamp(const rgbaint_t& scale);
@@ -378,83 +306,76 @@ public:
void scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& other);
void scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other);
- inline void cmpeq(const rgbaint_t& value)
+ void cmpeq(const rgbaint_t& value) { cmpeq_imm_rgba(value.m_a, value.m_r, value.m_g, value.m_b); }
+ void cmpgt(const rgbaint_t& value) { cmpgt_imm_rgba(value.m_a, value.m_r, value.m_g, value.m_b); }
+ void cmplt(const rgbaint_t& value) { cmplt_imm_rgba(value.m_a, value.m_r, value.m_g, value.m_b); }
+
+ void cmpeq_imm(INT32 value) { cmpeq_imm_rgba(value, value, value, value); }
+ void cmpgt_imm(INT32 value) { cmpgt_imm_rgba(value, value, value, value); }
+ void cmplt_imm(INT32 value) { cmplt_imm_rgba(value, value, value, value); }
+
+ void cmpeq_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b)
{
- m_a = (m_a == value.m_a) ? 0xffffffff : 0;
- m_r = (m_r == value.m_r) ? 0xffffffff : 0;
- m_g = (m_g == value.m_g) ? 0xffffffff : 0;
- m_b = (m_b == value.m_b) ? 0xffffffff : 0;
+ m_a = (m_a == a) ? 0xffffffff : 0;
+ m_r = (m_r == r) ? 0xffffffff : 0;
+ m_g = (m_g == g) ? 0xffffffff : 0;
+ m_b = (m_b == b) ? 0xffffffff : 0;
}
- inline void cmpeq_imm(const INT32 value)
+ void cmpgt_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b)
{
- m_a = (m_a == value) ? 0xffffffff : 0;
- m_r = (m_r == value) ? 0xffffffff : 0;
- m_g = (m_g == value) ? 0xffffffff : 0;
- m_b = (m_b == value) ? 0xffffffff : 0;
+ m_a = (m_a > a) ? 0xffffffff : 0;
+ m_r = (m_r > r) ? 0xffffffff : 0;
+ m_g = (m_g > g) ? 0xffffffff : 0;
+ m_b = (m_b > b) ? 0xffffffff : 0;
}
- inline void cmpgt(const rgbaint_t& value)
+ void cmplt_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b)
{
- m_a = (m_a > value.m_a) ? 0xffffffff : 0;
- m_r = (m_r > value.m_r) ? 0xffffffff : 0;
- m_g = (m_g > value.m_g) ? 0xffffffff : 0;
- m_b = (m_b > value.m_b) ? 0xffffffff : 0;
+ m_a = (m_a < a) ? 0xffffffff : 0;
+ m_r = (m_r < r) ? 0xffffffff : 0;
+ m_g = (m_g < g) ? 0xffffffff : 0;
+ m_b = (m_b < b) ? 0xffffffff : 0;
}
- inline void cmpgt_imm(const INT32 value)
+ void merge_alpha(const rgbaint_t& alpha)
{
- m_a = (m_a > value) ? 0xffffffff : 0;
- m_r = (m_r > value) ? 0xffffffff : 0;
- m_g = (m_g > value) ? 0xffffffff : 0;
- m_b = (m_b > value) ? 0xffffffff : 0;
+ m_a = alpha.m_a;
}
- inline void cmplt(const rgbaint_t& value)
+ rgbaint_t& operator+=(const rgbaint_t& other)
{
- m_a = (m_a < value.m_a) ? 0xffffffff : 0;
- m_r = (m_r < value.m_r) ? 0xffffffff : 0;
- m_g = (m_g < value.m_g) ? 0xffffffff : 0;
- m_b = (m_b < value.m_b) ? 0xffffffff : 0;
+ add_imm_rgba(other.m_a, other.m_r, other.m_g, other.m_b);
+ return *this;
}
- inline void cmplt_imm(const INT32 value)
+ rgbaint_t& operator+=(const INT32 other)
{
- m_a = (m_a < value) ? 0xffffffff : 0;
- m_r = (m_r < value) ? 0xffffffff : 0;
- m_g = (m_g < value) ? 0xffffffff : 0;
- m_b = (m_b < value) ? 0xffffffff : 0;
+ add_imm_rgba(other, other, other, other);
+ return *this;
}
- inline void merge_alpha(rgbaint_t& alpha)
+ rgbaint_t &operator-=(const rgbaint_t& other)
{
- m_a = alpha.m_a;
+ sub_imm_rgba(other.m_a, other.m_r, other.m_g, other.m_b);
+ return *this;
}
- inline rgbaint_t operator=(const rgbaint_t& other)
+ rgbaint_t& operator*=(const rgbaint_t& other)
{
- m_a = other.m_a;
- m_r = other.m_r;
- m_g = other.m_g;
- m_b = other.m_b;
+ mul_imm_rgba(other.m_a, other.m_r, other.m_g, other.m_b);
return *this;
}
- inline rgbaint_t& operator+=(const rgbaint_t& other)
+ rgbaint_t& operator*=(const INT32 other)
{
- m_a += other.m_a;
- m_r += other.m_r;
- m_g += other.m_g;
- m_b += other.m_b;
+ mul_imm_rgba(other, other, other, other);
return *this;
}
- inline rgbaint_t& operator+=(const INT32 other)
+ rgbaint_t& operator>>=(const INT32 shift)
{
- m_a += other;
- m_r += other;
- m_g += other;
- m_b += other;
+ sra_imm(shift);
return *this;
}
@@ -477,7 +398,7 @@ public:
return ((ag0 << 8) & 0xff00ff00) | (rb0 & 0x00ff00ff);
}
- inline void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
+ void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
UINT32 rb0 = (rgb00 & 0x00ff00ff) + ((((rgb01 & 0x00ff00ff) - (rgb00 & 0x00ff00ff)) * u) >> 8);
UINT32 rb1 = (rgb10 & 0x00ff00ff) + ((((rgb11 & 0x00ff00ff) - (rgb10 & 0x00ff00ff)) * u) >> 8);
@@ -504,4 +425,4 @@ protected:
INT32 m_b;
};
-#endif /* __RGBGEN__ */
+#endif // MAME_EMU_VIDEO_RGBGEN_H
diff --git a/src/emu/video/rgbsse.cpp b/src/emu/video/rgbsse.cpp
index ed20479fd9e..a26abed5609 100644
--- a/src/emu/video/rgbsse.cpp
+++ b/src/emu/video/rgbsse.cpp
@@ -166,13 +166,13 @@ const struct rgbaint_t::_statics rgbaint_t::statics =
void rgbaint_t::blend(const rgbaint_t& other, UINT8 factor)
{
- __m128i scale1 = _mm_set1_epi32(factor);
- __m128i scale2 = _mm_sub_epi32(_mm_set1_epi32(0x100), scale1);
+ const __m128i scale1 = _mm_set1_epi32(factor);
+ const rgbaint_t scale2(_mm_sub_epi32(_mm_set1_epi32(0x100), scale1));
rgbaint_t scaled_other(other);
scaled_other.mul(scale2);
- mul(scale1);
+ mul(rgbaint_t(scale1));
add(scaled_other);
sra_imm(8);
}
diff --git a/src/emu/video/rgbsse.h b/src/emu/video/rgbsse.h
index 99e99ddcde2..a7ac2ad3fc3 100644
--- a/src/emu/video/rgbsse.h
+++ b/src/emu/video/rgbsse.h
@@ -10,10 +10,16 @@
***************************************************************************/
-#ifndef __RGBSSE__
-#define __RGBSSE__
+#ifndef MAME_EMU_VIDEO_RGBSSE_H
+#define MAME_EMU_VIDEO_RGBSSE_H
+
+#pragma once
#include <emmintrin.h>
+#ifdef __SSE4_1__
+#include <smmintrin.h>
+#endif
+
/***************************************************************************
TYPE DEFINITIONS
@@ -22,16 +28,19 @@
class rgbaint_t
{
public:
- inline rgbaint_t() { }
- inline rgbaint_t(UINT32 rgba) { set(rgba); }
- inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
- inline rgbaint_t(const rgb_t& rgb) { set(rgb); }
- inline rgbaint_t(__m128i rgba) { m_value = rgba; }
+ rgbaint_t() { }
+ explicit rgbaint_t(UINT32 rgba) { set(rgba); }
+ rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
+ explicit rgbaint_t(const rgb_t& rgb) { set(rgb); }
+ explicit rgbaint_t(__m128i rgba) { m_value = rgba; }
+
+ rgbaint_t(const rgbaint_t& other) = default;
+ rgbaint_t &operator=(const rgbaint_t& other) = default;
- inline void set(rgbaint_t& other) { m_value = other.m_value; }
- inline void set(UINT32 rgba) { m_value = _mm_and_si128(_mm_set1_epi32(0xff), _mm_set_epi32(rgba >> 24, rgba >> 16, rgba >> 8, rgba)); }
- inline void set(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_set_epi32(a, r, g, b); }
- inline void set(const rgb_t& rgb) { m_value = _mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(rgb), _mm_setzero_si128()), _mm_setzero_si128()); }
+ void set(const rgbaint_t& other) { m_value = other.m_value; }
+ void set(UINT32 rgba) { m_value = _mm_and_si128(_mm_set1_epi32(0xff), _mm_set_epi32(rgba >> 24, rgba >> 16, rgba >> 8, rgba)); }
+ void set(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_set_epi32(a, r, g, b); }
+ void set(const rgb_t& rgb) { m_value = _mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(rgb), _mm_setzero_si128()), _mm_setzero_si128()); }
inline rgb_t to_rgba() const
{
@@ -43,6 +52,35 @@ public:
return _mm_cvtsi128_si32(_mm_packus_epi16(_mm_packs_epi32(m_value, _mm_setzero_si128()), _mm_setzero_si128()));
}
+#ifdef __SSE4_1__
+ void set_a(const INT32 value) { m_value = _mm_insert_epi32(m_value, value, 3); }
+ void set_r(const INT32 value) { m_value = _mm_insert_epi32(m_value, value, 2); }
+ void set_g(const INT32 value) { m_value = _mm_insert_epi32(m_value, value, 1); }
+ void set_b(const INT32 value) { m_value = _mm_insert_epi32(m_value, value, 0); }
+#else
+ void set_a(const INT32 value) { m_value = _mm_or_si128(_mm_and_si128(m_value, alpha_mask()), _mm_set_epi32(value, 0, 0, 0)); }
+ void set_r(const INT32 value) { m_value = _mm_or_si128(_mm_and_si128(m_value, red_mask()), _mm_set_epi32(0, value, 0, 0)); }
+ void set_g(const INT32 value) { m_value = _mm_or_si128(_mm_and_si128(m_value, green_mask()), _mm_set_epi32(0, 0, value, 0)); }
+ void set_b(const INT32 value) { m_value = _mm_or_si128(_mm_and_si128(m_value, blue_mask()), _mm_set_epi32(0, 0, 0, value)); }
+#endif
+
+ UINT8 get_a() const { return UINT8(unsigned(_mm_extract_epi16(m_value, 6))); }
+ UINT8 get_r() const { return UINT8(unsigned(_mm_extract_epi16(m_value, 4))); }
+ UINT8 get_g() const { return UINT8(unsigned(_mm_extract_epi16(m_value, 2))); }
+ UINT8 get_b() const { return UINT8(unsigned(_mm_extract_epi16(m_value, 0))); }
+
+#ifdef __SSE4_1__
+ INT32 get_a32() const { return _mm_extract_epi32(m_value, 3); }
+ INT32 get_r32() const { return _mm_extract_epi32(m_value, 2); }
+ INT32 get_g32() const { return _mm_extract_epi32(m_value, 1); }
+ INT32 get_b32() const { return _mm_extract_epi32(m_value, 0); }
+#else
+ INT32 get_a32() const { return (_mm_extract_epi16(m_value, 7) << 16) | _mm_extract_epi16(m_value, 6); }
+ INT32 get_r32() const { return (_mm_extract_epi16(m_value, 5) << 16) | _mm_extract_epi16(m_value, 4); }
+ INT32 get_g32() const { return (_mm_extract_epi16(m_value, 3) << 16) | _mm_extract_epi16(m_value, 2); }
+ INT32 get_b32() const { return (_mm_extract_epi16(m_value, 1) << 16) | _mm_extract_epi16(m_value, 0); }
+#endif
+
inline void add(const rgbaint_t& color2)
{
m_value = _mm_add_epi32(m_value, color2.m_value);
@@ -73,7 +111,7 @@ public:
m_value = _mm_sub_epi32(m_value, _mm_set_epi32(a, r, g, b));
}
- inline void subr(rgbaint_t& color2)
+ inline void subr(const rgbaint_t& color2)
{
m_value = _mm_sub_epi32(color2.m_value, m_value);
}
@@ -88,66 +126,6 @@ public:
m_value = _mm_sub_epi32(_mm_set_epi32(a, r, g, b), m_value);
}
- inline void set_a(const INT32 value)
- {
- m_value = _mm_or_si128(_mm_and_si128(m_value, alpha_mask()), _mm_set_epi32(value, 0, 0, 0));
- }
-
- inline void set_r(const INT32 value)
- {
- m_value = _mm_or_si128(_mm_and_si128(m_value, red_mask()), _mm_set_epi32(0, value, 0, 0));
- }
-
- inline void set_g(const INT32 value)
- {
- m_value = _mm_or_si128(_mm_and_si128(m_value, green_mask()), _mm_set_epi32(0, 0, value, 0));
- }
-
- inline void set_b(const INT32 value)
- {
- m_value = _mm_or_si128(_mm_and_si128(m_value, blue_mask()), _mm_set_epi32(0, 0, 0, value));
- }
-
- inline UINT8 get_a() const
- {
- return _mm_extract_epi16(m_value, 6);
- }
-
- inline UINT8 get_r() const
- {
- return _mm_extract_epi16(m_value, 4);
- }
-
- inline UINT8 get_g() const
- {
- return _mm_extract_epi16(m_value, 2);
- }
-
- inline UINT8 get_b() const
- {
- return _mm_extract_epi16(m_value, 0);
- }
-
- inline INT32 get_a32() const
- {
- return (_mm_extract_epi16(m_value, 7) << 16) | _mm_extract_epi16(m_value, 6);
- }
-
- inline INT32 get_r32() const
- {
- return (_mm_extract_epi16(m_value, 5) << 16) | _mm_extract_epi16(m_value, 4);
- }
-
- inline INT32 get_g32() const
- {
- return (_mm_extract_epi16(m_value, 3) << 16) | _mm_extract_epi16(m_value, 2);
- }
-
- inline INT32 get_b32() const
- {
- return (_mm_extract_epi16(m_value, 1) << 16) | _mm_extract_epi16(m_value, 0);
- }
-
inline void mul(const rgbaint_t& color)
{
__m128i tmp1 = _mm_mul_epu32(m_value, color.m_value);
@@ -237,55 +215,19 @@ public:
m_value = _mm_srai_epi32(m_value, shift);
}
- inline void or_reg(const rgbaint_t& color2)
- {
- m_value = _mm_or_si128(m_value, color2.m_value);
- }
-
- inline void or_imm(const INT32 value)
- {
- m_value = _mm_or_si128(m_value, _mm_set1_epi32(value));
- }
-
- inline void or_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_or_si128(m_value, _mm_set_epi32(a, r, g, b));
- }
-
- inline void and_reg(const rgbaint_t& color)
- {
- m_value = _mm_and_si128(m_value, color.m_value);
- }
-
- inline void andnot_reg(const rgbaint_t& color)
- {
- m_value = _mm_andnot_si128(color.m_value, m_value);
- }
-
- inline void and_imm(const INT32 value)
- {
- m_value = _mm_and_si128(m_value, _mm_set1_epi32(value));
- }
-
- inline void and_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_and_si128(m_value, _mm_set_epi32(a, r, g, b));
- }
+ void or_reg(const rgbaint_t& color2) { m_value = _mm_or_si128(m_value, color2.m_value); }
+ void and_reg(const rgbaint_t& color2) { m_value = _mm_and_si128(m_value, color2.m_value); }
+ void xor_reg(const rgbaint_t& color2) { m_value = _mm_xor_si128(m_value, color2.m_value); }
- inline void xor_reg(const rgbaint_t& color2)
- {
- m_value = _mm_xor_si128(m_value, color2.m_value);
- }
+ void andnot_reg(const rgbaint_t& color2) { m_value = _mm_andnot_si128(color2.m_value, m_value); }
- inline void xor_imm(const INT32 value)
- {
- m_value = _mm_xor_si128(m_value, _mm_set1_epi32(value));
- }
+ void or_imm(INT32 value) { m_value = _mm_or_si128(m_value, _mm_set1_epi32(value)); }
+ void and_imm(INT32 value) { m_value = _mm_and_si128(m_value, _mm_set1_epi32(value)); }
+ void xor_imm(INT32 value) { m_value = _mm_xor_si128(m_value, _mm_set1_epi32(value)); }
- inline void xor_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_xor_si128(m_value, _mm_set_epi32(a, r, g, b));
- }
+ void or_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_or_si128(m_value, _mm_set_epi32(a, r, g, b)); }
+ void and_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_and_si128(m_value, _mm_set_epi32(a, r, g, b)); }
+ void xor_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_xor_si128(m_value, _mm_set_epi32(a, r, g, b)); }
inline void clamp_and_clear(const UINT32 sign)
{
@@ -369,56 +311,17 @@ public:
clamp_to_uint8();
}
- inline void cmpeq(const rgbaint_t& value)
- {
- m_value = _mm_cmpeq_epi32(m_value, value.m_value);
- }
+ void cmpeq(const rgbaint_t& value) { m_value = _mm_cmpeq_epi32(m_value, value.m_value); }
+ void cmpgt(const rgbaint_t& value) { m_value = _mm_cmpgt_epi32(m_value, value.m_value); }
+ void cmplt(const rgbaint_t& value) { m_value = _mm_cmplt_epi32(m_value, value.m_value); }
- inline void cmpeq_imm(const INT32 value)
- {
- m_value = _mm_cmpeq_epi32(m_value, _mm_set1_epi32(value));
- }
+ void cmpeq_imm(INT32 value) { m_value = _mm_cmpeq_epi32(m_value, _mm_set1_epi32(value)); }
+ void cmpgt_imm(INT32 value) { m_value = _mm_cmpgt_epi32(m_value, _mm_set1_epi32(value)); }
+ void cmplt_imm(INT32 value) { m_value = _mm_cmplt_epi32(m_value, _mm_set1_epi32(value)); }
- inline void cmpeq_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_cmpeq_epi32(m_value, _mm_set_epi32(a, r, g, b));
- }
-
- inline void cmpgt(const rgbaint_t& value)
- {
- m_value = _mm_cmpgt_epi32(m_value, value.m_value);
- }
-
- inline void cmpgt_imm(const INT32 value)
- {
- m_value = _mm_cmpgt_epi32(m_value, _mm_set1_epi32(value));
- }
-
- inline void cmpgt_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_cmpgt_epi32(m_value, _mm_set_epi32(a, r, g, b));
- }
-
- inline void cmplt(const rgbaint_t& value)
- {
- m_value = _mm_cmplt_epi32(m_value, value.m_value);
- }
-
- inline void cmplt_imm(const INT32 value)
- {
- m_value = _mm_cmplt_epi32(m_value, _mm_set1_epi32(value));
- }
-
- inline void cmplt_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
- m_value = _mm_cmplt_epi32(m_value, _mm_set_epi32(a, r, g, b));
- }
-
- inline rgbaint_t operator=(const rgbaint_t& other)
- {
- m_value = other.m_value;
- return *this;
- }
+ void cmpeq_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_cmpeq_epi32(m_value, _mm_set_epi32(a, r, g, b)); }
+ void cmpgt_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_cmpgt_epi32(m_value, _mm_set_epi32(a, r, g, b)); }
+ void cmplt_imm_rgba(INT32 a, INT32 r, INT32 g, INT32 b) { m_value = _mm_cmplt_epi32(m_value, _mm_set_epi32(a, r, g, b)); }
inline rgbaint_t& operator+=(const rgbaint_t& other)
{
@@ -459,8 +362,12 @@ public:
inline void merge_alpha(const rgbaint_t& alpha)
{
+#ifdef __SSE4_1__
+ m_value = _mm_insert_epi32(m_value, _mm_extract_epi32(alpha.m_value, 3), 3);
+#else
m_value = _mm_insert_epi16(m_value, _mm_extract_epi16(alpha.m_value, 7), 7);
m_value = _mm_insert_epi16(m_value, _mm_extract_epi16(alpha.m_value, 6), 6);
+#endif
}
static UINT32 bilinear_filter(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
@@ -487,7 +394,7 @@ public:
return _mm_cvtsi128_si32(color01);
}
- inline void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
+ void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
__m128i color00 = _mm_cvtsi32_si128(rgb00);
__m128i color01 = _mm_cvtsi32_si128(rgb01);
@@ -519,11 +426,11 @@ protected:
INT16 scale_table[256][8];
};
- static inline __m128i alpha_mask() { return *(__m128i *)&statics.alpha_mask[0]; }
- static inline __m128i red_mask() { return *(__m128i *)&statics.red_mask[0]; }
- static inline __m128i green_mask() { return *(__m128i *)&statics.green_mask[0]; }
- static inline __m128i blue_mask() { return *(__m128i *)&statics.blue_mask[0]; }
- static inline __m128i scale_factor(UINT8 index) { return *(__m128i *)&statics.scale_table[index][0]; }
+ static __m128i alpha_mask() { return *(__m128i *)&statics.alpha_mask[0]; }
+ static __m128i red_mask() { return *(__m128i *)&statics.red_mask[0]; }
+ static __m128i green_mask() { return *(__m128i *)&statics.green_mask[0]; }
+ static __m128i blue_mask() { return *(__m128i *)&statics.blue_mask[0]; }
+ static __m128i scale_factor(UINT8 index) { return *(__m128i *)&statics.scale_table[index][0]; }
__m128i m_value;
diff --git a/src/emu/video/rgbutil.h b/src/emu/video/rgbutil.h
index 15def4da2c0..e0ccd299a4e 100644
--- a/src/emu/video/rgbutil.h
+++ b/src/emu/video/rgbutil.h
@@ -9,10 +9,10 @@
***************************************************************************/
-#ifndef __RGBUTIL__
-#define __RGBUTIL__
+#ifndef MAME_EMU_VIDEO_RGBUTIL_H
+#define MAME_EMU_VIDEO_RGBUTIL_H
-/* use SSE on 64-bit implementations, where it can be assumed */
+// use SSE on 64-bit implementations, where it can be assumed
#if (!defined(MAME_DEBUG) || defined(__OPTIMIZE__)) && (defined(__SSE2__) || defined(_MSC_VER)) && defined(PTR64)
#include "rgbsse.h"
#elif defined(__ALTIVEC__)
@@ -21,4 +21,4 @@
#include "rgbgen.h"
#endif
-#endif /* __RGBUTIL__ */
+#endif // MAME_EMU_VIDEO_RGBUTIL_H
diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h
index e034261461e..d4cc5184d69 100644
--- a/src/emu/video/rgbvmx.h
+++ b/src/emu/video/rgbvmx.h
@@ -28,15 +28,18 @@ protected:
typedef __vector unsigned int VECU32;
public:
- inline rgbaint_t() { set(0, 0, 0, 0); }
- inline rgbaint_t(UINT32 rgba) { set(rgba); }
- inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
- inline rgbaint_t(const rgb_t& rgb) { set(rgb); }
- inline rgbaint_t(VECS32 rgba) : m_value(rgba) { }
+ rgbaint_t() { set(0, 0, 0, 0); }
+ explicit rgbaint_t(UINT32 rgba) { set(rgba); }
+ rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
+ explicit rgbaint_t(const rgb_t& rgb) { set(rgb); }
+ explicit rgbaint_t(VECS32 rgba) : m_value(rgba) { }
- inline void set(rgbaint_t& other) { m_value = other.m_value; }
+ rgbaint_t(const rgbaint_t& other) = default;
+ rgbaint_t &operator=(const rgbaint_t& other) = default;
- inline void set(UINT32 rgba)
+ void set(const rgbaint_t& other) { m_value = other.m_value; }
+
+ void set(UINT32 rgba)
{
const VECU32 zero = { 0, 0, 0, 0 };
#ifdef __LITTLE_ENDIAN__
@@ -48,7 +51,7 @@ public:
#endif
}
- inline void set(INT32 a, INT32 r, INT32 g, INT32 b)
+ void set(INT32 a, INT32 r, INT32 g, INT32 b)
{
#ifdef __LITTLE_ENDIAN__
const VECS32 result = { b, g, r, a };
@@ -58,7 +61,7 @@ public:
m_value = result;
}
- inline void set(const rgb_t& rgb)
+ void set(const rgb_t& rgb)
{
const VECU32 zero = { 0, 0, 0, 0 };
#ifdef __LITTLE_ENDIAN__
@@ -88,94 +91,31 @@ public:
return result;
}
- inline void add(const rgbaint_t& color2)
- {
- m_value = vec_add(m_value, color2.m_value);
- }
-
- inline void add_imm(const INT32 imm)
- {
- const VECS32 temp = { imm, imm, imm, imm };
- m_value = vec_add(m_value, temp);
- }
-
- inline void add_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
-#ifdef __LITTLE_ENDIAN__
- const VECS32 temp = { b, g, r, a };
-#else
- const VECS32 temp = { a, r, g, b };
-#endif
- m_value = vec_add(m_value, temp);
- }
-
- inline void sub(const rgbaint_t& color2)
- {
- m_value = vec_sub(m_value, color2.m_value);
- }
-
- inline void sub_imm(const INT32 imm)
- {
- const VECS32 temp = { imm, imm, imm, imm };
- m_value = vec_sub(m_value, temp);
- }
-
- inline void sub_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
-#ifdef __LITTLE_ENDIAN__
- const VECS32 temp = { b, g, r, a };
-#else
- const VECS32 temp = { a, r, g, b };
-#endif
- m_value = vec_sub(m_value, temp);
- }
-
- inline void subr(rgbaint_t& color2)
- {
- m_value = vec_sub(color2.m_value, m_value);
- }
-
- inline void subr_imm(const INT32 imm)
- {
- const VECS32 temp = { imm, imm, imm, imm };
- m_value = vec_sub(temp, m_value);
- }
-
- inline void subr_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
- {
-#ifdef __LITTLE_ENDIAN__
- const VECS32 temp = { b, g, r, a };
-#else
- const VECS32 temp = { a, r, g, b };
-#endif
- m_value = vec_sub(temp, m_value);
- }
-
- inline void set_a(const INT32 value)
+ void set_a(const INT32 value)
{
const VECS32 temp = { value, value, value, value };
m_value = vec_perm(m_value, temp, alpha_perm);
}
- inline void set_r(const INT32 value)
+ void set_r(const INT32 value)
{
const VECS32 temp = { value, value, value, value };
m_value = vec_perm(m_value, temp, red_perm);
}
- inline void set_g(const INT32 value)
+ void set_g(const INT32 value)
{
const VECS32 temp = { value, value, value, value };
m_value = vec_perm(m_value, temp, green_perm);
}
- inline void set_b(const INT32 value)
+ void set_b(const INT32 value)
{
const VECS32 temp = { value, value, value, value };
m_value = vec_perm(m_value, temp, blue_perm);
}
- inline UINT8 get_a() const
+ UINT8 get_a() const
{
UINT8 result;
#ifdef __LITTLE_ENDIAN__
@@ -186,7 +126,7 @@ public:
return result;
}
- inline UINT8 get_r() const
+ UINT8 get_r() const
{
UINT8 result;
#ifdef __LITTLE_ENDIAN__
@@ -197,7 +137,7 @@ public:
return result;
}
- inline UINT8 get_g() const
+ UINT8 get_g() const
{
UINT8 result;
#ifdef __LITTLE_ENDIAN__
@@ -208,7 +148,7 @@ public:
return result;
}
- inline UINT8 get_b() const
+ UINT8 get_b() const
{
UINT8 result;
#ifdef __LITTLE_ENDIAN__
@@ -219,7 +159,7 @@ public:
return result;
}
- inline INT32 get_a32() const
+ INT32 get_a32() const
{
INT32 result;
#ifdef __LITTLE_ENDIAN__
@@ -230,7 +170,7 @@ public:
return result;
}
- inline INT32 get_r32() const
+ INT32 get_r32() const
{
INT32 result;
#ifdef __LITTLE_ENDIAN__
@@ -241,7 +181,7 @@ public:
return result;
}
- inline INT32 get_g32() const
+ INT32 get_g32() const
{
INT32 result;
#ifdef __LITTLE_ENDIAN__
@@ -252,7 +192,7 @@ public:
return result;
}
- inline INT32 get_b32() const
+ INT32 get_b32() const
{
INT32 result;
#ifdef __LITTLE_ENDIAN__
@@ -263,6 +203,69 @@ public:
return result;
}
+ inline void add(const rgbaint_t& color2)
+ {
+ m_value = vec_add(m_value, color2.m_value);
+ }
+
+ inline void add_imm(const INT32 imm)
+ {
+ const VECS32 temp = { imm, imm, imm, imm };
+ m_value = vec_add(m_value, temp);
+ }
+
+ inline void add_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
+ {
+#ifdef __LITTLE_ENDIAN__
+ const VECS32 temp = { b, g, r, a };
+#else
+ const VECS32 temp = { a, r, g, b };
+#endif
+ m_value = vec_add(m_value, temp);
+ }
+
+ inline void sub(const rgbaint_t& color2)
+ {
+ m_value = vec_sub(m_value, color2.m_value);
+ }
+
+ inline void sub_imm(const INT32 imm)
+ {
+ const VECS32 temp = { imm, imm, imm, imm };
+ m_value = vec_sub(m_value, temp);
+ }
+
+ inline void sub_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
+ {
+#ifdef __LITTLE_ENDIAN__
+ const VECS32 temp = { b, g, r, a };
+#else
+ const VECS32 temp = { a, r, g, b };
+#endif
+ m_value = vec_sub(m_value, temp);
+ }
+
+ inline void subr(const rgbaint_t& color2)
+ {
+ m_value = vec_sub(color2.m_value, m_value);
+ }
+
+ inline void subr_imm(const INT32 imm)
+ {
+ const VECS32 temp = { imm, imm, imm, imm };
+ m_value = vec_sub(temp, m_value);
+ }
+
+ inline void subr_imm_rgba(const INT32 a, const INT32 r, const INT32 g, const INT32 b)
+ {
+#ifdef __LITTLE_ENDIAN__
+ const VECS32 temp = { b, g, r, a };
+#else
+ const VECS32 temp = { a, r, g, b };
+#endif
+ m_value = vec_sub(temp, m_value);
+ }
+
inline void mul(const rgbaint_t& color)
{
const VECU32 shift = vec_splat_u32(-16);
@@ -545,12 +548,6 @@ public:
m_value = VECS32(vec_cmplt(m_value, temp));
}
- inline rgbaint_t operator=(const rgbaint_t& other)
- {
- m_value = other.m_value;
- return *this;
- }
-
inline rgbaint_t& operator+=(const rgbaint_t& other)
{
m_value = vec_add(m_value, other.m_value);
@@ -607,7 +604,7 @@ public:
m_value = vec_perm(m_value, alpha.m_value, alpha_perm);
}
- static UINT32 bilinear_filter(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
+ static UINT32 bilinear_filter(const UINT32 &rgb00, const UINT32 &rgb01, const UINT32 &rgb10, const UINT32 &rgb11, UINT8 u, UINT8 v)
{
const VECS32 zero = vec_splat_s32(0);
@@ -650,7 +647,7 @@ public:
return result;
}
- inline void bilinear_filter_rgbaint(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
+ void bilinear_filter_rgbaint(const UINT32 &rgb00, const UINT32 &rgb01, const UINT32 &rgb10, const UINT32 &rgb11, UINT8 u, UINT8 v)
{
const VECS32 zero = vec_splat_s32(0);
@@ -688,13 +685,13 @@ public:
}
protected:
- VECS32 m_value;
+ VECS32 m_value;
- static const VECU8 alpha_perm;
- static const VECU8 red_perm;
- static const VECU8 green_perm;
- static const VECU8 blue_perm;
- static const VECS16 scale_table[256];
+ static const VECU8 alpha_perm;
+ static const VECU8 red_perm;
+ static const VECU8 green_perm;
+ static const VECU8 blue_perm;
+ static const VECS16 scale_table[256];
};
diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp
index 2be26a357c0..c6f4824ced4 100644
--- a/src/frontend/mame/mame.cpp
+++ b/src/frontend/mame/mame.cpp
@@ -298,7 +298,7 @@ void mame_machine_manager::create_custom(running_machine& machine)
m_autoboot_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(mame_machine_manager::autoboot_callback), this));
// start datfile manager
- m_datfile = std::make_unique<datfile_manager>(machine, m_ui->options());
+ m_datfile = std::make_unique<ui::datfile_manager>(machine, m_ui->options());
// start favorite manager
m_favorite = std::make_unique<favorite_manager>(machine, m_ui->options());
diff --git a/src/frontend/mame/mame.h b/src/frontend/mame/mame.h
index 6f1d7f8ef5e..859c788e2e9 100644
--- a/src/frontend/mame/mame.h
+++ b/src/frontend/mame/mame.h
@@ -20,11 +20,14 @@ class osd_interface;
//**************************************************************************
class lua_engine;
class cheat_manager;
-class datfile_manager;
class inifile_manager;
class favorite_manager;
class mame_ui_manager;
+namespace ui {
+class datfile_manager;
+} // namespace ui
+
// ======================> machine_manager
class mame_machine_manager : public machine_manager
@@ -58,7 +61,7 @@ public:
void schedule_new_driver(const game_driver &driver);
mame_ui_manager& ui() const { assert(m_ui != nullptr); return *m_ui; }
cheat_manager &cheat() const { assert(m_cheat != nullptr); return *m_cheat; }
- datfile_manager &datfile() const { assert(m_datfile != nullptr); return *m_datfile; }
+ ui::datfile_manager &datfile() const { assert(m_datfile != nullptr); return *m_datfile; }
inifile_manager &inifile() const { assert(m_inifile != nullptr); return *m_inifile; }
favorite_manager &favorite() const { assert(m_favorite != nullptr); return *m_favorite; }
private:
@@ -72,7 +75,7 @@ private:
emu_timer *m_autoboot_timer; // autoboot timer
std::unique_ptr<mame_ui_manager> m_ui; // internal data from ui.cpp
std::unique_ptr<cheat_manager> m_cheat; // internal data from cheat.cpp
- std::unique_ptr<datfile_manager> m_datfile; // internal data from datfile.c
+ std::unique_ptr<ui::datfile_manager> m_datfile; // internal data from datfile.c
std::unique_ptr<inifile_manager> m_inifile; // internal data from inifile.c for INIs
std::unique_ptr<favorite_manager> m_favorite; // internal data from inifile.c for favorites
diff --git a/src/frontend/mame/ui/datfile.cpp b/src/frontend/mame/ui/datfile.cpp
index ee196d11668..17552f34d68 100644
--- a/src/frontend/mame/ui/datfile.cpp
+++ b/src/frontend/mame/ui/datfile.cpp
@@ -9,29 +9,37 @@
***************************************************************************/
#include "emu.h"
+#include "ui/datfile.h"
+
#include "drivenum.h"
#include "ui/moptions.h"
-#include "ui/datfile.h"
#include "ui/utils.h"
+#include <utility>
+
+
+namespace ui {
+namespace {
//-------------------------------------------------
// TAGS
//-------------------------------------------------
-static std::string DATAFILE_TAG("$");
-static std::string TAG_BIO("$bio");
-static std::string TAG_INFO("$info");
-static std::string TAG_MAME("$mame");
-static std::string TAG_COMMAND("$cmd");
-static std::string TAG_END("$end");
-static std::string TAG_DRIVER("$drv");
-static std::string TAG_STORY("$story");
-static std::string TAG_HISTORY_R("## REVISION:");
-static std::string TAG_MAMEINFO_R("# MAMEINFO.DAT");
-static std::string TAG_MESSINFO_R("# MESSINFO.DAT");
-static std::string TAG_SYSINFO_R("# This file was generated on");
-static std::string TAG_STORY_R("# version");
-static std::string TAG_COMMAND_SEPARATOR("-----------------------------------------------");
-static std::string TAG_GAMEINIT_R("# GAMEINIT.DAT");
+std::string const DATAFILE_TAG("$");
+std::string const TAG_BIO("$bio");
+std::string const TAG_INFO("$info");
+std::string const TAG_MAME("$mame");
+std::string const TAG_COMMAND("$cmd");
+std::string const TAG_END("$end");
+std::string const TAG_DRIVER("$drv");
+std::string const TAG_STORY("$story");
+std::string const TAG_HISTORY_R("## REVISION:");
+std::string const TAG_MAMEINFO_R("# MAMEINFO.DAT");
+std::string const TAG_MESSINFO_R("# MESSINFO.DAT");
+std::string const TAG_SYSINFO_R("# This file was generated on");
+std::string const TAG_STORY_R("# version");
+std::string const TAG_COMMAND_SEPARATOR("-----------------------------------------------");
+std::string const TAG_GAMEINIT_R("# GAMEINIT.DAT");
+
+} // anonymous namespace
//-------------------------------------------------
// Statics
@@ -55,7 +63,7 @@ std::string datfile_manager::m_story_rev;
std::string datfile_manager::m_ginit_rev;
bool datfile_manager::first_run = true;
-#define opendatsfile(f) if (parseopen(#f".dat")) { init_##f(); parseclose(); }
+#define opendatsfile(f) do { fileptr datfile = parseopen(#f".dat"); if (datfile) init_##f(std::move(datfile)); } while (false)
//-------------------------------------------------
// ctor
@@ -80,10 +88,10 @@ datfile_manager::datfile_manager(running_machine &machine, ui_options &moptions)
//-------------------------------------------------
// initialize sysinfo.dat index
//-------------------------------------------------
-void datfile_manager::init_sysinfo()
+void datfile_manager::init_sysinfo(fileptr &&fp)
{
int swcount = 0;
- auto count = index_datafile(m_sysidx, swcount, TAG_SYSINFO_R, m_sysinfo_rev, '.');
+ auto count = index_datafile(std::move(fp), m_sysidx, swcount, m_sysinfo_rev, TAG_SYSINFO_R, '.');
osd_printf_verbose("Sysinfo.dat games found = %i\n", count);
osd_printf_verbose("Rev = %s\n", m_sysinfo_rev.c_str());
}
@@ -91,20 +99,20 @@ void datfile_manager::init_sysinfo()
//-------------------------------------------------
// initialize story.dat index
//-------------------------------------------------
-void datfile_manager::init_story()
+void datfile_manager::init_story(fileptr &&fp)
{
int swcount = 0;
- auto count = index_datafile(m_storyidx, swcount, TAG_STORY_R, m_story_rev, 's');
+ auto count = index_datafile(std::move(fp), m_storyidx, swcount, m_story_rev, TAG_STORY_R, 's');
osd_printf_verbose("Story.dat games found = %i\n", count);
}
//-------------------------------------------------
// initialize history.dat index
//-------------------------------------------------
-void datfile_manager::init_history()
+void datfile_manager::init_history(fileptr &&fp)
{
int swcount = 0;
- auto count = index_datafile(m_histidx, swcount, TAG_HISTORY_R, m_history_rev, ' ');
+ auto count = index_datafile(std::move(fp), m_histidx, swcount, m_history_rev, TAG_HISTORY_R, ' ');
osd_printf_verbose("History.dat systems found = %i\n", count);
osd_printf_verbose("History.dat software packages found = %i\n", swcount);
osd_printf_verbose("Rev = %s\n", m_history_rev.c_str());
@@ -113,11 +121,11 @@ void datfile_manager::init_history()
//-------------------------------------------------
// initialize gameinit.dat index
//-------------------------------------------------
-void datfile_manager::init_gameinit()
+void datfile_manager::init_gameinit(fileptr &&fp)
{
int swcount = 0;
drvindex tmp;
- auto count = index_mame_mess_info(m_ginitidx, tmp, swcount);
+ auto count = index_mame_mess_info(std::move(fp), m_ginitidx, tmp, swcount);
osd_printf_verbose("Gameinit.dat games found = %i\n", count);
osd_printf_verbose("Rev = %s\n", m_ginit_rev.c_str());
}
@@ -125,10 +133,10 @@ void datfile_manager::init_gameinit()
//-------------------------------------------------
// initialize mameinfo.dat index
//-------------------------------------------------
-void datfile_manager::init_mameinfo()
+void datfile_manager::init_mameinfo(fileptr &&fp)
{
int drvcount = 0;
- auto count = index_mame_mess_info(m_mameidx, m_drvidx, drvcount);
+ auto count = index_mame_mess_info(std::move(fp), m_mameidx, m_drvidx, drvcount);
osd_printf_verbose("Mameinfo.dat games found = %i\n", count);
osd_printf_verbose("Mameinfo.dat drivers found = %d\n", drvcount);
osd_printf_verbose("Rev = %s\n", m_mame_rev.c_str());
@@ -137,10 +145,10 @@ void datfile_manager::init_mameinfo()
//-------------------------------------------------
// initialize messinfo.dat index
//-------------------------------------------------
-void datfile_manager::init_messinfo()
+void datfile_manager::init_messinfo(fileptr &&fp)
{
int drvcount = 0;
- auto count = index_mame_mess_info(m_messidx, m_messdrvidx, drvcount);
+ auto count = index_mame_mess_info(std::move(fp), m_messidx, m_messdrvidx, drvcount);
osd_printf_verbose("Messinfo.dat games found = %i\n", count);
osd_printf_verbose("Messinfo.dat drivers found = %d\n", drvcount);
osd_printf_verbose("Rev = %s\n", m_mess_rev.c_str());
@@ -149,46 +157,54 @@ void datfile_manager::init_messinfo()
//-------------------------------------------------
// initialize command.dat index
//-------------------------------------------------
-void datfile_manager::init_command()
+void datfile_manager::init_command(fileptr &&fp)
{
int swcount = 0;
- std::string tmp, tmp2;
- auto count = index_datafile(m_cmdidx, swcount, tmp, tmp2, 'c');
+ std::string tmp;
+ auto count = index_datafile(std::move(fp), m_cmdidx, swcount, tmp, std::string(), 'c');
osd_printf_verbose("Command.dat games found = %i\n", count);
}
-bool datfile_manager::has_software(std::string &softlist, std::string &softname, std::string &parentname)
+bool datfile_manager::has_software(std::string const &softlist, std::string const &softname, std::string const &parentname) const
{
- // Find software in software list index
- if (m_swindex.find(softlist) == m_swindex.end())
- return false;
+ return bool(find_software(softlist, softname, parentname));
+}
- m_itemsiter = m_swindex[softlist].find(softname);
- if (m_itemsiter == m_swindex[softlist].end() && !parentname.empty())
- m_itemsiter = m_swindex[softlist].find(parentname);
+long const *datfile_manager::find_software(std::string const &softlist, std::string const &softname, std::string const &parentname) const
+{
+ // Find software in software list index
+ auto const software(m_swindex.find(softlist));
+ if (software == m_swindex.end())
+ return nullptr;
- if (m_itemsiter == m_swindex[softlist].end())
- return false;
+ auto itemsiter = software->second.find(softname);
+ if ((itemsiter == software->second.end()) && !parentname.empty())
+ itemsiter = software->second.find(parentname);
- return true;
+ return (itemsiter != software->second.end()) ? &itemsiter->second : nullptr;
}
+
//-------------------------------------------------
// load software info
//-------------------------------------------------
-void datfile_manager::load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname)
+void datfile_manager::load_software_info(std::string const &softlist, std::string &buffer, std::string const &softname, std::string const &parentname)
{
+ if (m_swindex.empty())
+ return;
+
// Load history text
- if (!m_swindex.empty() && parseopen("history.dat"))
+ fileptr const datfile = parseopen("history.dat");
+ if (datfile)
{
// Find software in software list index
- if (!has_software(softlist, softname, parentname))
+ long const *const s_offset = find_software(softlist, softname, parentname);
+ if (!s_offset)
return;
- auto s_offset = m_itemsiter->second;
char rbuf[64 * 1024];
- fseek(fp, s_offset, SEEK_SET);
+ std::fseek(datfile.get(), *s_offset, SEEK_SET);
std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, datfile.get()) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
@@ -199,7 +215,6 @@ void datfile_manager::load_software_info(std::string &softlist, std::string &buf
// add this string to the buffer
buffer.append(readbuf).append("\n");
}
- parseclose();
}
}
@@ -208,66 +223,69 @@ void datfile_manager::load_software_info(std::string &softlist, std::string &buf
//-------------------------------------------------
void datfile_manager::load_data_info(const game_driver *drv, std::string &buffer, int type)
{
- dataindex index_idx;
- drvindex driver_idx;
- std::string tag, filename;
+ dataindex const *index_idx = nullptr;
+ drvindex const *driver_idx = nullptr;
+ std::string const *tag;
+ std::string filename;
switch (type)
{
- case UI_HISTORY_LOAD:
- filename = "history.dat";
- tag = TAG_BIO;
- index_idx = m_histidx;
- break;
- case UI_MAMEINFO_LOAD:
- filename = "mameinfo.dat";
- tag = TAG_MAME;
- index_idx = m_mameidx;
- driver_idx = m_drvidx;
- break;
- case UI_SYSINFO_LOAD:
- filename = "sysinfo.dat";
- tag = TAG_BIO;
- index_idx = m_sysidx;
- break;
- case UI_MESSINFO_LOAD:
- filename = "messinfo.dat";
- tag = TAG_MAME;
- index_idx = m_messidx;
- driver_idx = m_messdrvidx;
- break;
- case UI_STORY_LOAD:
- filename = "story.dat";
- tag = TAG_STORY;
- index_idx = m_storyidx;
- break;
- case UI_GINIT_LOAD:
- filename = "gameinit.dat";
- tag = TAG_MAME;
- index_idx = m_ginitidx;
- break;
+ case UI_HISTORY_LOAD:
+ filename = "history.dat";
+ tag = &TAG_BIO;
+ index_idx = &m_histidx;
+ break;
+ case UI_MAMEINFO_LOAD:
+ filename = "mameinfo.dat";
+ tag = &TAG_MAME;
+ index_idx = &m_mameidx;
+ driver_idx = &m_drvidx;
+ break;
+ case UI_SYSINFO_LOAD:
+ filename = "sysinfo.dat";
+ tag = &TAG_BIO;
+ index_idx = &m_sysidx;
+ break;
+ case UI_MESSINFO_LOAD:
+ filename = "messinfo.dat";
+ tag = &TAG_MAME;
+ index_idx = &m_messidx;
+ driver_idx = &m_messdrvidx;
+ break;
+ case UI_STORY_LOAD:
+ filename = "story.dat";
+ tag = &TAG_STORY;
+ index_idx = &m_storyidx;
+ break;
+ case UI_GINIT_LOAD:
+ filename = "gameinit.dat";
+ tag = &TAG_MAME;
+ index_idx = &m_ginitidx;
+ break;
+ default:
+ assert(false);
+ return;
}
- if (parseopen(filename.c_str()))
+ fileptr const datfile = parseopen(filename.c_str());
+ if (datfile)
{
- load_data_text(drv, buffer, index_idx, tag);
+ load_data_text(datfile.get(), drv, buffer, *index_idx, *tag);
// load driver info
- if (!driver_idx.empty())
- load_driver_text(drv, buffer, driver_idx, TAG_DRIVER);
+ if (driver_idx && !driver_idx->empty())
+ load_driver_text(datfile.get(), drv, buffer, *driver_idx, TAG_DRIVER);
// cleanup mameinfo and sysinfo double line spacing
- if ((tag == TAG_MAME && type != UI_GINIT_LOAD) || type == UI_SYSINFO_LOAD)
+ if (((*tag == TAG_MAME) && (type != UI_GINIT_LOAD)) || (type == UI_SYSINFO_LOAD))
strreplace(buffer, "\n\n", "\n");
-
- parseclose();
}
}
//-------------------------------------------------
// load a game text into the buffer
//-------------------------------------------------
-void datfile_manager::load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag)
+void datfile_manager::load_data_text(FILE *fp, game_driver const *drv, std::string &buffer, dataindex const &idx, std::string const &tag)
{
auto itemsiter = idx.find(drv);
if (itemsiter == idx.end())
@@ -285,10 +303,10 @@ void datfile_manager::load_data_text(const game_driver *drv, std::string &buffer
}
auto s_offset = itemsiter->second;
- fseek(fp, s_offset, SEEK_SET);
+ std::fseek(fp, s_offset, SEEK_SET);
char rbuf[64 * 1024];
std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, fp) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
@@ -309,7 +327,7 @@ void datfile_manager::load_data_text(const game_driver *drv, std::string &buffer
// load a driver name and offset into an
// indexed array
//-------------------------------------------------
-void datfile_manager::load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag)
+void datfile_manager::load_driver_text(FILE *fp, game_driver const *drv, std::string &buffer, drvindex const &idx, std::string const &tag)
{
std::string s(core_filename_extract_base(drv->source_file));
auto index = idx.find(s);
@@ -320,10 +338,10 @@ void datfile_manager::load_driver_text(const game_driver *drv, std::string &buff
buffer.append("\n--- DRIVER INFO ---\n").append("Driver: ").append(s).append("\n\n");
auto s_offset = index->second;
- fseek(fp, s_offset, SEEK_SET);
+ std::fseek(fp, s_offset, SEEK_SET);
char rbuf[64 * 1024];
std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, fp) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
@@ -344,7 +362,7 @@ void datfile_manager::load_driver_text(const game_driver *drv, std::string &buff
// load a game name and offset into an
// indexed array (mameinfo)
//-------------------------------------------------
-int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount)
+int datfile_manager::index_mame_mess_info(fileptr &&fp, dataindex &index, drvindex &index_drv, int &drvcount)
{
size_t foundtag;
auto t_mame = TAG_MAMEINFO_R.size();
@@ -354,7 +372,7 @@ int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv,
char rbuf[64 * 1024];
std::string readbuf, xid, name;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, fp.get()) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
if (m_mame_rev.empty() && readbuf.compare(0, t_mame, TAG_MAMEINFO_R) == 0)
@@ -375,7 +393,7 @@ int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv,
else if (readbuf.compare(0, t_info, TAG_INFO) == 0)
{
// TAG_INFO
- fgets(rbuf, 64 * 1024, fp);
+ std::fgets(rbuf, 64 * 1024, fp.get());
xid = chartrimcarriage(rbuf);
name = readbuf.substr(t_info + 1);
if (xid == TAG_MAME)
@@ -383,11 +401,11 @@ int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv,
// validate driver
auto game_index = driver_list::find(name.c_str());
if (game_index != -1)
- index.emplace(&driver_list::driver(game_index), ftell(fp));
+ index.emplace(&driver_list::driver(game_index), std::ftell(fp.get()));
}
else if (xid == TAG_DRIVER)
{
- index_drv.emplace(name, ftell(fp));
+ index_drv.emplace(name, std::ftell(fp.get()));
drvcount++;
}
}
@@ -399,28 +417,27 @@ int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv,
// load a game name and offset into an
// indexed array
//-------------------------------------------------
-int datfile_manager::index_datafile(dataindex &index, int &swcount, std::string &tag, std::string &str, char sep)
+int datfile_manager::index_datafile(fileptr &&fp, dataindex &index, int &swcount, std::string &rev, std::string const &tag, char sep)
{
std::string readbuf;
- auto tag_size = tag.size();
- auto t_info = TAG_INFO.size();
- auto t_bio = TAG_BIO.size();
+ auto const tag_size = tag.size();
+ auto const t_info = TAG_INFO.size();
+ auto const t_bio = TAG_BIO.size();
char rbuf[64 * 1024];
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, fp.get()) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
if (!tag.empty())
- if (str.empty() && readbuf.compare(0, tag_size, tag) == 0)
+ {
+ if (rev.empty() && readbuf.compare(0, tag_size, tag) == 0)
{
if (sep != 's')
- {
- auto found = readbuf.find(sep, tag_size + 1);
- str = readbuf.substr(tag_size + 1, found - tag_size);
- }
+ rev = readbuf.substr(tag_size + 1, readbuf.find(sep, tag_size + 1) - tag_size);
else
- str = readbuf.substr(tag_size + 1);
+ rev = readbuf.substr(tag_size + 1);
}
+ }
if (readbuf.compare(0, t_info, TAG_INFO) == 0)
{
@@ -431,13 +448,13 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount, std::string
{
auto game_index = driver_list::find(e.c_str());
if (game_index != -1)
- index.emplace(&driver_list::driver(game_index), ftell(fp));
+ index.emplace(&driver_list::driver(game_index), std::ftell(fp.get()));
}
}
else if (!readbuf.empty() && readbuf[0] == DATAFILE_TAG[0])
{
// search for software info
- fgets(rbuf, 64 * 1024, fp);
+ std::fgets(rbuf, 64 * 1024, fp.get());
std::string readbuf_2(chartrimcarriage(rbuf));
if (readbuf_2.compare(0, t_bio, TAG_BIO) == 0)
{
@@ -448,7 +465,7 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount, std::string
std::vector<std::string> token_roms = tokenize(s_roms, ',');
for (auto & li : token_list)
for (auto & ro : token_roms)
- m_swindex[li].emplace(ro, ftell(fp));
+ m_swindex[li].emplace(ro, std::ftell(fp.get()));
swcount++;
}
}
@@ -459,47 +476,45 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount, std::string
//---------------------------------------------------------
// parseopen - Open up file for reading
//---------------------------------------------------------
-bool datfile_manager::parseopen(const char *filename)
+datfile_manager::fileptr datfile_manager::parseopen(const char *filename)
{
emu_file file(m_options.history_path(), OPEN_FLAG_READ);
if (file.open(filename) != osd_file::error::NONE)
- return false;
+ return fileptr(nullptr, &std::fclose);
- m_fullpath = file.fullpath();
+ std::string const fullpath = file.fullpath();
file.close();
- fp = fopen(m_fullpath.c_str(), "rb");
+ fileptr result(std::fopen(fullpath.c_str(), "rb"), &std::fclose);
- fgetc(fp);
- fseek(fp, 0, SEEK_SET);
- return true;
+ fgetc(result.get());
+ fseek(result.get(), 0, SEEK_SET);
+ return result;
}
//-------------------------------------------------
// create the menu index
//-------------------------------------------------
-void datfile_manager::index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index)
+void datfile_manager::index_menuidx(fileptr &&fp, const game_driver *drv, dataindex const &idx, drvindex &index)
{
- dataindex::iterator itemsiter = idx.find(drv);
+ auto itemsiter = idx.find(drv);
if (itemsiter == idx.end())
{
- auto cloneof = driver_list::non_bios_clone(*drv);
+ auto const cloneof = driver_list::non_bios_clone(*drv);
if (cloneof == -1)
return;
- else
- {
- auto c_drv = &driver_list::driver(cloneof);
- if ((itemsiter = idx.find(c_drv)) == idx.end())
- return;
- }
+
+ auto const c_drv = &driver_list::driver(cloneof);
+ if ((itemsiter = idx.find(c_drv)) == idx.end())
+ return;
}
// seek to correct point in datafile
- auto s_offset = itemsiter->second;
- fseek(fp, s_offset, SEEK_SET);
- auto tinfo = TAG_INFO.size();
+ auto const s_offset = itemsiter->second;
+ std::fseek(fp.get(), s_offset, SEEK_SET);
+ auto const tinfo = TAG_INFO.size();
char rbuf[64 * 1024];
std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, fp.get()) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
@@ -509,9 +524,9 @@ void datfile_manager::index_menuidx(const game_driver *drv, dataindex &idx, drvi
// TAG_COMMAND identifies the driver
if (readbuf == TAG_COMMAND)
{
- fgets(rbuf, 64 * 1024, fp);
+ std::fgets(rbuf, 64 * 1024, fp.get());
chartrimcarriage(rbuf);
- index.emplace(rbuf, ftell(fp));
+ index.emplace(rbuf, std::ftell(fp.get()));
}
}
}
@@ -519,16 +534,17 @@ void datfile_manager::index_menuidx(const game_driver *drv, dataindex &idx, drvi
//-------------------------------------------------
// load command text into the buffer
//-------------------------------------------------
-void datfile_manager::load_command_info(std::string &buffer, std::string &sel)
+void datfile_manager::load_command_info(std::string &buffer, std::string const &sel)
{
- if (parseopen("command.dat"))
+ fileptr const datfile = parseopen("command.dat");
+ if (datfile)
{
// open and seek to correct point in datafile
- auto offset = m_menuidx.at(sel);
- fseek(fp, offset, SEEK_SET);
+ auto const offset = m_menuidx.at(sel);
+ std::fseek(datfile.get(), offset, SEEK_SET);
char rbuf[64 * 1024];
std::string readbuf;
- while (fgets(rbuf, 64 * 1024, fp) != nullptr)
+ while (std::fgets(rbuf, 64 * 1024, datfile.get()) != nullptr)
{
readbuf = chartrimcarriage(rbuf);
@@ -543,7 +559,6 @@ void datfile_manager::load_command_info(std::string &buffer, std::string &sel)
// add this string to the buffer
buffer.append(readbuf).append("\n");;
}
- parseclose();
}
}
@@ -552,13 +567,15 @@ void datfile_manager::load_command_info(std::string &buffer, std::string &sel)
//-------------------------------------------------
void datfile_manager::command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems)
{
- if (parseopen("command.dat"))
+ fileptr datfile = parseopen("command.dat");
+ if (datfile)
{
m_menuidx.clear();
- index_menuidx(drv, m_cmdidx, m_menuidx);
+ index_menuidx(std::move(datfile), drv, m_cmdidx, m_menuidx);
menuitems.reserve(m_menuidx.size());
- for (auto & elem : m_menuidx)
+ for (auto const &elem : m_menuidx)
menuitems.push_back(elem.first);
- parseclose();
}
}
+
+} // namespace ui
diff --git a/src/frontend/mame/ui/datfile.h b/src/frontend/mame/ui/datfile.h
index 260b23a40ce..93d13527cc9 100644
--- a/src/frontend/mame/ui/datfile.h
+++ b/src/frontend/mame/ui/datfile.h
@@ -8,13 +8,20 @@
***************************************************************************/
+#ifndef MAME_FRONTEND_UI_DATFILE_H
+#define MAME_FRONTEND_UI_DATFILE_H
+
#pragma once
-#ifndef __UI_DATFILE_H__
-#define __UI_DATFILE_H__
+#include <cstdio>
+#include <memory>
+#include <string>
+#include <unordered_map>
+
class ui_options;
+namespace ui {
//-------------------------------------------------
// Datafile Manager
//-------------------------------------------------
@@ -29,36 +36,38 @@ public:
// actions
void load_data_info(const game_driver *drv, std::string &buffer, int type);
- void load_command_info(std::string &buffer, std::string &sel);
- void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname);
+ void load_command_info(std::string &buffer, std::string const &sel);
+ void load_software_info(std::string const &softlist, std::string &buffer, std::string const &softname, std::string const &parentname);
void command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems);
void reset_run() { first_run = true; }
- std::string rev_history() const { return m_history_rev; }
- std::string rev_mameinfo() const { return m_mame_rev; }
- std::string rev_messinfo() const { return m_mess_rev; }
- std::string rev_sysinfo() const { return m_sysinfo_rev; }
- std::string rev_storyinfo() const { return m_story_rev; }
- std::string rev_ginitinfo() const { return m_ginit_rev; }
-
- bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); }
- bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); }
- bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); }
- bool has_command(const game_driver *driver) { return (m_cmdidx.find(driver) != m_cmdidx.end()); }
- bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); }
- bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); }
- bool has_gameinit(const game_driver *driver) { return (m_ginitidx.find(driver) != m_ginitidx.end()); }
- bool has_software(std::string &softlist, std::string &softname, std::string &parentname);
-
- bool has_data(const game_driver *a = nullptr)
+ std::string const &rev_history() const { return m_history_rev; }
+ std::string const &rev_mameinfo() const { return m_mame_rev; }
+ std::string const &rev_messinfo() const { return m_mess_rev; }
+ std::string const &rev_sysinfo() const { return m_sysinfo_rev; }
+ std::string const &rev_storyinfo() const { return m_story_rev; }
+ std::string const &rev_ginitinfo() const { return m_ginit_rev; }
+
+ bool has_history(game_driver const *driver) const { return m_histidx.find(driver) != m_histidx.end(); }
+ bool has_mameinfo(game_driver const *driver) const { return m_mameidx.find(driver) != m_mameidx.end(); }
+ bool has_messinfo(game_driver const *driver) const { return m_messidx.find(driver) != m_messidx.end(); }
+ bool has_command(game_driver const *driver) const { return m_cmdidx.find(driver) != m_cmdidx.end(); }
+ bool has_sysinfo(game_driver const *driver) const { return m_sysidx.find(driver) != m_sysidx.end(); }
+ bool has_story(game_driver const *driver) const { return m_storyidx.find(driver) != m_storyidx.end(); }
+ bool has_gameinit(game_driver const *driver) const { return m_ginitidx.find(driver) != m_ginitidx.end(); }
+ bool has_software(std::string const &softlist, std::string const &softname, std::string const &parentname) const;
+
+ bool has_data(game_driver const *a = nullptr) const
{
- const game_driver *d = (a != nullptr) ? a : &machine().system();
- return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d) || has_gameinit(d));
+ game_driver const *const d(a ? a : &machine().system());
+ return has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d) || has_gameinit(d);
}
+
private:
using drvindex = std::unordered_map<std::string, long>;
using dataindex = std::unordered_map<const game_driver *, long>;
using swindex = std::unordered_map<std::string, drvindex>;
+ using fileptr = std::unique_ptr<FILE, int (*)(FILE *)>;
// global index
static dataindex m_histidx, m_mameidx, m_messidx, m_cmdidx, m_sysidx, m_storyidx, m_ginitidx;
@@ -66,34 +75,32 @@ private:
static swindex m_swindex;
// internal helpers
- void init_history();
- void init_mameinfo();
- void init_messinfo();
- void init_command();
- void init_sysinfo();
- void init_story();
- void init_gameinit();
-
- // file open/close/seek
- bool parseopen(const char *filename);
- void parseclose() { if (fp != nullptr) fclose(fp); }
-
- int index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount);
- int index_datafile(dataindex &index, int &swcount, std::string &tag, std::string &str, char sep);
- void index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index);
- drvindex::const_iterator m_itemsiter;
-
- void load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag);
- void load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag);
+ void init_history(fileptr &&fp);
+ void init_mameinfo(fileptr &&fp);
+ void init_messinfo(fileptr &&fp);
+ void init_command(fileptr &&fp);
+ void init_sysinfo(fileptr &&fp);
+ void init_story(fileptr &&fp);
+ void init_gameinit(fileptr &&fp);
+
+ fileptr parseopen(char const *filename);
+
+ int index_mame_mess_info(fileptr &&fp, dataindex &index, drvindex &index_drv, int &drvcount);
+ int index_datafile(fileptr &&fp, dataindex &index, int &swcount, std::string &rev, std::string const &tag, char sep);
+ void index_menuidx(fileptr &&fp, game_driver const *drv, dataindex const &idx, drvindex &index);
+
+ long const *find_software(std::string const &softlist, std::string const &softname, std::string const &parentname) const;
+
+ void load_data_text(FILE *fp, game_driver const *drv, std::string &buffer, dataindex const &idx, std::string const &tag);
+ void load_driver_text(FILE *fp, game_driver const *drv, std::string &buffer, drvindex const &idx, std::string const &tag);
// internal state
running_machine &m_machine; // reference to our machine
ui_options &m_options;
- std::string m_fullpath;
static std::string m_history_rev, m_mame_rev, m_mess_rev, m_sysinfo_rev, m_story_rev, m_ginit_rev;
- FILE *fp = nullptr;
static bool first_run;
};
+} // namespace ui
-#endif /* __UI_DATFILE_H__ */
+#endif // MAME_FRONTEND_UI_DATFILE_H
diff --git a/src/frontend/mame/ui/defimg.h b/src/frontend/mame/ui/defimg.ipp
index bce018449d1..0d348a1ebc9 100644
--- a/src/frontend/mame/ui/defimg.h
+++ b/src/frontend/mame/ui/defimg.ipp
@@ -1,8 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Maurizio Petrarota
+#ifndef MAME_FRONTEND_UI_DEFIMG_IPP
+#define MAME_FRONTEND_UI_DEFIMG_IPP
+#pragma once
-static const UINT32 no_avail_bmp[] =
-{
+namespace ui {
+namespace {
+// TODO: move this to an external image file and zlib compress it into a souce file as part of the build process
+
+UINT32 const no_avail_bmp[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x04231f20, 0x32231f20, 0x7b231f20, 0xc2231f20, 0xf3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf3231f20, 0xc2231f20, 0x7b231f20, 0x32231f20, 0x04231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -260,3 +266,8 @@ static const UINT32 no_avail_bmp[] =
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
+
+} // anonymous namespace
+} // namespace ui
+
+#endif // MAME_FRONTEND_UI_DEFIMG_IPP
diff --git a/src/frontend/mame/ui/inifile.cpp b/src/frontend/mame/ui/inifile.cpp
index d8693356f05..f0f6adbfc38 100644
--- a/src/frontend/mame/ui/inifile.cpp
+++ b/src/frontend/mame/ui/inifile.cpp
@@ -313,7 +313,7 @@ bool favorite_manager::isgame_favorite(const game_driver *driver)
// check if game is already in favorite list
//-------------------------------------------------
-bool favorite_manager::isgame_favorite(ui_software_info &swinfo)
+bool favorite_manager::isgame_favorite(ui_software_info const &swinfo)
{
for (size_t x = 0; x < m_list.size(); x++)
if (m_list[x] == swinfo)
diff --git a/src/frontend/mame/ui/inifile.h b/src/frontend/mame/ui/inifile.h
index 0658cf1f7db..f8da04145a7 100644
--- a/src/frontend/mame/ui/inifile.h
+++ b/src/frontend/mame/ui/inifile.h
@@ -8,10 +8,10 @@
***************************************************************************/
-#pragma once
+#ifndef MAME_FRONTEND_UI_INIFILE_H
+#define MAME_FRONTEND_UI_INIFILE_H
-#ifndef __UI_INIFILE_H__
-#define __UI_INIFILE_H__
+#pragma once
#include "../frontend/mame/ui/utils.h"
@@ -97,7 +97,7 @@ public:
// check
bool isgame_favorite();
bool isgame_favorite(const game_driver *driver);
- bool isgame_favorite(ui_software_info &swinfo);
+ bool isgame_favorite(ui_software_info const &swinfo);
// save
void save_favorite_games();
@@ -120,4 +120,4 @@ private:
ui_options &m_options;
};
-#endif /* __UI_INIFILE_H__ */
+#endif // MAME_FRONTEND_UI_INIFILE_H
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index 3c74031852d..b4e2c5b05cc 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -100,8 +100,6 @@ private:
void draw_text_box();
public:
- void *m_prev_selected;
-
// mouse handling
bool mouse_hit, mouse_button;
render_target *mouse_target;
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 65ef98899be..14a068e88cc 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -280,14 +280,13 @@ void menu_crosshair::handle()
/* handle events */
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- crosshair_user_settings settings;
crosshair_item_data *data = (crosshair_item_data *)menu_event->itemref;
bool changed = false;
//int set_def = false;
int newval = data->cur;
/* retreive the user settings */
- machine().crosshair().get_user_settings(data->player, &settings);
+ render_crosshair &crosshair = machine().crosshair().get_crosshair(data->player);
switch (menu_event->iptkey)
{
@@ -321,13 +320,15 @@ void menu_crosshair::handle()
{
/* visibility state */
case CROSSHAIR_ITEM_VIS:
- settings.mode = newval;
+ crosshair.set_mode(newval);
+ // set visibility as specified by mode - auto mode starts with visibility off
+ crosshair.set_visible(newval == CROSSHAIR_VISIBILITY_ON);
changed = true;
break;
/* auto time */
case CROSSHAIR_ITEM_AUTO_TIME:
- settings.auto_time = newval;
+ machine().crosshair().set_auto_time(newval);
changed = true;
break;
}
@@ -339,18 +340,17 @@ void menu_crosshair::handle()
switch (menu_event->iptkey)
{
case IPT_UI_SELECT:
- /* clear the name string to reset to default crosshair */
- settings.name[0] = 0;
+ crosshair.set_default_bitmap();
changed = true;
break;
case IPT_UI_LEFT:
- strcpy(settings.name, data->last_name);
+ crosshair.set_bitmap_name(data->last_name);
changed = true;
break;
case IPT_UI_RIGHT:
- strcpy(settings.name, data->next_name);
+ crosshair.set_bitmap_name(data->next_name);
changed = true;
break;
}
@@ -358,9 +358,6 @@ void menu_crosshair::handle()
if (changed)
{
- /* save the user settings */
- machine().crosshair().set_user_settings(data->player, &settings);
-
/* rebuild the menu */
reset(reset_options::REMEMBER_POSITION);
}
@@ -379,7 +376,6 @@ menu_crosshair::menu_crosshair(mame_ui_manager &mui, render_container &container
void menu_crosshair::populate()
{
- crosshair_user_settings settings;
crosshair_item_data *data;
char temp_text[16];
int player;
@@ -390,16 +386,16 @@ void menu_crosshair::populate()
for (player = 0; player < MAX_PLAYERS; player++)
{
/* get the user settings */
- machine().crosshair().get_user_settings(player, &settings);
+ render_crosshair &crosshair = machine().crosshair().get_crosshair(player);
/* add menu items for usable crosshairs */
- if (settings.used)
+ if (crosshair.is_used())
{
/* Make sure to keep these matched to the CROSSHAIR_VISIBILITY_xxx types */
static const char *const vis_text[] = { "Off", "On", "Auto" };
/* track if we need the auto time menu */
- if (settings.mode == CROSSHAIR_VISIBILITY_AUTO) use_auto = true;
+ if (crosshair.mode() == CROSSHAIR_VISIBILITY_AUTO) use_auto = true;
/* CROSSHAIR_ITEM_VIS - allocate a data item and fill it */
data = (crosshair_item_data *)m_pool_alloc(sizeof(*data));
@@ -408,7 +404,7 @@ void menu_crosshair::populate()
data->min = CROSSHAIR_VISIBILITY_OFF;
data->max = CROSSHAIR_VISIBILITY_AUTO;
data->defvalue = CROSSHAIR_VISIBILITY_DEFAULT;
- data->cur = settings.mode;
+ data->cur = crosshair.mode();
/* put on arrows */
if (data->cur > data->min)
@@ -418,7 +414,7 @@ void menu_crosshair::populate()
/* add CROSSHAIR_ITEM_VIS menu */
sprintf(temp_text, "P%d Visibility", player + 1);
- item_append(temp_text, vis_text[settings.mode], flags, data);
+ item_append(temp_text, vis_text[crosshair.mode()], flags, data);
/* CROSSHAIR_ITEM_PIC - allocate a data item and fill it */
data = (crosshair_item_data *)m_pool_alloc(sizeof(*data));
@@ -438,7 +434,7 @@ void menu_crosshair::populate()
bool found = false;
/* if we are using the default, then we just need to find the first in the list */
- if (*(settings.name) == 0)
+ if (*crosshair.bitmap_name() == '\0')
using_default = true;
/* look for the current name, then remember the name before */
@@ -460,7 +456,7 @@ void menu_crosshair::populate()
data->next_name[length] = 0;
finished = true;
}
- else if (!strncmp(dir->name, settings.name, length))
+ else if (!strncmp(dir->name, crosshair.bitmap_name(), length))
{
/* we found the current name */
/* so loop once more to find the next name */
@@ -490,21 +486,18 @@ void menu_crosshair::populate()
/* add CROSSHAIR_ITEM_PIC menu */
sprintf(temp_text, "P%d Crosshair", player + 1);
- item_append(temp_text, using_default ? "DEFAULT" : settings.name, flags, data);
+ item_append(temp_text, using_default ? "DEFAULT" : crosshair.bitmap_name(), flags, data);
}
}
if (use_auto)
{
- /* any player can be used to get the autotime */
- machine().crosshair().get_user_settings(0, &settings);
-
/* CROSSHAIR_ITEM_AUTO_TIME - allocate a data item and fill it */
data = (crosshair_item_data *)m_pool_alloc(sizeof(*data));
data->type = CROSSHAIR_ITEM_AUTO_TIME;
data->min = CROSSHAIR_VISIBILITY_AUTOTIME_MIN;
data->max = CROSSHAIR_VISIBILITY_AUTOTIME_MAX;
data->defvalue = CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT;
- data->cur = settings.auto_time;
+ data->cur = machine().crosshair().auto_time();
/* put on arrows in visible menu */
if (data->cur > data->min)
@@ -513,7 +506,7 @@ void menu_crosshair::populate()
flags |= FLAG_RIGHT_ARROW;
/* add CROSSHAIR_ITEM_AUTO_TIME menu */
- sprintf(temp_text, "%d", settings.auto_time);
+ sprintf(temp_text, "%d", machine().crosshair().auto_time());
item_append(_("Visible Delay"), temp_text, flags, data);
}
// else
diff --git a/src/frontend/mame/ui/miscmenu.h b/src/frontend/mame/ui/miscmenu.h
index 6b8dfff3b69..5431b2e9996 100644
--- a/src/frontend/mame/ui/miscmenu.h
+++ b/src/frontend/mame/ui/miscmenu.h
@@ -69,6 +69,9 @@ private:
CROSSHAIR_ITEM_AUTO_TIME
};
+ // FIXME: use std::string instead of fixed-length arrays
+ constexpr static int CROSSHAIR_PIC_NAME_LENGTH = 12;
+
/* internal crosshair menu item data */
struct crosshair_item_data
{
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index 20147fe3bd3..08ce99bc61d 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -37,8 +37,8 @@
extern const char UI_VERSION_TAG[];
namespace ui {
-static bool first_start = true;
-static const char *dats_info[] = {
+namespace {
+char const *const dats_info[] = {
__("General Info"),
__("History"),
__("Mameinfo"),
@@ -46,8 +46,12 @@ static const char *dats_info[] = {
__("Messinfo"),
__("Command"),
__("Gameinit"),
- __("Mamescore") };
+ __("Mamescore")
+};
+} // anonymous namespace
+
+bool menu_select_game::first_start = true;
std::vector<const game_driver *> menu_select_game::m_sortedlist;
int menu_select_game::m_isabios = 0;
@@ -57,8 +61,11 @@ int menu_select_game::m_isabios = 0;
menu_select_game::menu_select_game(mame_ui_manager &mui, render_container &container, const char *gamename)
: menu_select_launch(mui, container, false)
+ , m_info_buffer()
+ , m_info_driver(nullptr)
+ , m_info_software(nullptr)
+ , m_info_view(-1)
{
- set_focus(focused_menu::main);
highlight = 0;
std::string error_string, last_filter, sub_filter;
ui_options &moptions = mui.options();
@@ -174,7 +181,7 @@ menu_select_game::~menu_select_game()
void menu_select_game::handle()
{
- if (m_prev_selected == nullptr)
+ if (!m_prev_selected)
m_prev_selected = item[0].ref;
bool check_filter = false;
@@ -231,11 +238,19 @@ void menu_select_game::handle()
{
// handle IPT_CUSTOM (mouse right click)
if (!isfavorite())
- menu::stack_push<menu_machine_configure>(ui(), container(), (const game_driver *)m_prev_selected, menu_event->mouse.x0, menu_event->mouse.y0);
+ {
+ menu::stack_push<menu_machine_configure>(
+ ui(), container(),
+ reinterpret_cast<const game_driver *>(m_prev_selected),
+ menu_event->mouse.x0, menu_event->mouse.y0);
+ }
else
{
- ui_software_info *sw = (ui_software_info *)m_prev_selected;
- menu::stack_push<menu_machine_configure>(ui(), container(), (const game_driver *)sw->driver, menu_event->mouse.x0, menu_event->mouse.y0);
+ ui_software_info *sw = reinterpret_cast<ui_software_info *>(m_prev_selected);
+ menu::stack_push<menu_machine_configure>(
+ ui(), container(),
+ (const game_driver *)sw->driver,
+ menu_event->mouse.x0, menu_event->mouse.y0);
}
}
else if (menu_event->iptkey == IPT_UI_LEFT)
@@ -418,8 +433,9 @@ void menu_select_game::handle()
inkey_special(menu_event);
}
else if (menu_event->iptkey == IPT_UI_CONFIGURE)
+ {
inkey_navigation();
-
+ }
else if (menu_event->iptkey == IPT_OTHER)
{
m_prev_selected = nullptr;
@@ -740,252 +756,6 @@ void menu_select_game::build_available_list()
std::stable_sort(m_unavailsortedlist.begin(), m_unavailsortedlist.end(), sorted_game_list);
}
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- const game_driver *driver = nullptr;
- ui_software_info *swinfo = nullptr;
- float width, maxwidth = origx2 - origx1;
- std::string tempbuf[5];
- rgb_t color = UI_BACKGROUND_COLOR;
- bool isstar = false;
- inifile_manager &inifile = mame_machine_manager::instance()->inifile();
- float tbarspace = ui().get_line_height();
- float text_size = 1.0f;
-
- tempbuf[0] = string_format(_("%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"),
- emulator_info::get_appname(),
- bare_build_version,
- visible_items,
- (driver_list::total() - 1),
- m_isabios);
-
- std::string filtered;
- if (main_filters::actual == FILTER_CATEGORY && inifile.total() > 0)
- {
- filtered = string_format(_("%1$s (%2$s - %3$s) - "),
- main_filters::text[main_filters::actual],
- inifile.get_file(),
- inifile.get_category());
- }
- else if (main_filters::actual == FILTER_MANUFACTURER)
- {
- filtered = string_format(_("%1$s (%2$s) - "),
- main_filters::text[main_filters::actual],
- c_mnfct::ui[c_mnfct::actual]);
- }
- else if (main_filters::actual == FILTER_YEAR)
- {
- filtered = string_format(_("%1$s (%2$s) - "),
- main_filters::text[main_filters::actual],
- c_year::ui[c_year::actual]);
- }
-
- // display the current typeahead
- if (isfavorite())
- tempbuf[1].clear();
- else
- tempbuf[1] = string_format(_("%1$s Search: %2$s_"), filtered, m_search);
-
- // get the size of the text
- for (int line = 0; line < 2; ++line)
- {
- ui().draw_text_full(container(), tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(width, maxwidth);
- }
-
- if (maxwidth > origx2 - origx1)
- {
- text_size = (origx2 - origx1) / maxwidth;
- maxwidth = origx2 - origx1;
- }
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace;
-
- // draw a box
- ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (int line = 0; line < 2; ++line)
- {
- ui().draw_text_full(container(), tempbuf[line].c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- y1 += ui().get_line_height();
- }
-
- // determine the text to render below
- if (!isfavorite())
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : ((m_prev_selected != nullptr) ? (const game_driver *)m_prev_selected : nullptr);
- else
- {
- swinfo = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
- if (swinfo != nullptr && swinfo->startempty == 1)
- driver = swinfo->driver;
- }
-
- if (driver != nullptr)
- {
- isstar = mame_machine_manager::instance()->favorite().isgame_favorite(driver);
-
- // first line is game name
- tempbuf[0] = string_format(_("Romset: %1$-.100s"), driver->name);
-
- // next line is year, manufacturer
- tempbuf[1] = string_format(_("%1$s, %2$-.100s"), driver->year, driver->manufacturer);
-
- // next line is clone/parent status
- int cloneof = driver_list::non_bios_clone(*driver);
-
- if (cloneof != -1)
- tempbuf[2] = string_format(_("Driver is clone of: %1$-.100s"), driver_list::driver(cloneof).description);
- else
- tempbuf[2] = _("Driver is parent");
-
- // next line is overall driver status
- if (driver->flags & MACHINE_NOT_WORKING)
- tempbuf[3] = _("Overall: NOT WORKING");
- else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- tempbuf[3] = _("Overall: Unemulated Protection");
- else
- tempbuf[3] = _("Overall: Working");
-
- // next line is graphics, sound status
- if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
- tempbuf[4] = _("Graphics: Imperfect, ");
- else
- tempbuf[4] = _("Graphics: OK, ");
-
- if (driver->flags & MACHINE_NO_SOUND)
- tempbuf[4].append(_("Sound: Unimplemented"));
- else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- tempbuf[4].append(_("Sound: Imperfect"));
- else
- tempbuf[4].append(_("Sound: OK"));
-
- color = UI_GREEN_COLOR;
-
- if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
- | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
- color = UI_YELLOW_COLOR;
-
- if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
- color = UI_RED_COLOR;
- }
-
- else if (swinfo != nullptr)
- {
- isstar = mame_machine_manager::instance()->favorite().isgame_favorite(*swinfo);
-
- // first line is system
- tempbuf[0] = string_format(_("System: %1$-.100s"), swinfo->driver->description);
-
- // next line is year, publisher
- tempbuf[1] = string_format(_("%1$s, %2$-.100s"), swinfo->year, swinfo->publisher);
-
- // next line is parent/clone
- if (!swinfo->parentname.empty())
- tempbuf[2] = string_format(_("Software is clone of: %1$-.100s"), !swinfo->parentlongname.empty() ? swinfo->parentlongname : swinfo->parentname);
- else
- tempbuf[2] = _("Software is parent");
-
- // next line is supported status
- if (swinfo->supported == SOFTWARE_SUPPORTED_NO)
- {
- tempbuf[3] = _("Supported: No");
- color = UI_RED_COLOR;
- }
- else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL)
- {
- tempbuf[3] = _("Supported: Partial");
- color = UI_YELLOW_COLOR;
- }
- else
- {
- tempbuf[3] = _("Supported: Yes");
- color = UI_GREEN_COLOR;
- }
-
- // last line is romset name
- tempbuf[4] = string_format(_("romset: %1$-.100s"), swinfo->shortname);
- }
- else
- {
- std::string copyright(emulator_info::get_copyright());
- size_t found = copyright.find("\n");
-
- tempbuf[0].clear();
- tempbuf[1] = string_format(_("%1$s %2$s"), emulator_info::get_appname(), build_version);
- tempbuf[2] = copyright.substr(0, found);
- tempbuf[3] = copyright.substr(found + 1);
- tempbuf[4].clear();
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw toolbar
- draw_toolbar(x1, y1, x2, y2);
-
- // get the size of the text
- maxwidth = origx2 - origx1;
-
- for (auto & elem : tempbuf)
- {
- ui().draw_text_full(container(), elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- if (maxwidth > origx2 - origx1)
- {
- text_size = (origx2 - origx1) / maxwidth;
- maxwidth = origx2 - origx1;
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- ui().draw_outlined_box(container(), x1, y1, x2, y2, color);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // is favorite? draw the star
- if (isstar)
- draw_star(x1, y1);
-
- // draw all lines
- for (auto & elem : tempbuf)
- {
- ui().draw_text_full(container(), elem.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- y1 += ui().get_line_height();
- }
-}
//-------------------------------------------------
// force the game select menu to be visible
@@ -1021,10 +791,10 @@ void menu_select_game::inkey_select(const event *menu_event)
menu::stack_push<menu_game_options>(ui(), container());
// special case for configure machine
- else if ((FPTR)driver == CONF_MACHINE)
+ else if (FPTR(driver) == CONF_MACHINE)
{
- if (m_prev_selected != nullptr)
- menu::stack_push<menu_machine_configure>(ui(), container(), (const game_driver *)m_prev_selected);
+ if (m_prev_selected)
+ menu::stack_push<menu_machine_configure>(ui(), container(), reinterpret_cast<const game_driver *>(m_prev_selected));
return;
}
@@ -1086,22 +856,24 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
ui_software_info *ui_swinfo = (ui_software_info *)menu_event->itemref;
ui_options &mopt = ui().options();
- // special case for configure options
if ((FPTR)ui_swinfo == CONF_OPTS)
+ {
+ // special case for configure options
menu::stack_push<menu_game_options>(ui(), container());
- // special case for configure machine
+ }
else if ((FPTR)ui_swinfo == CONF_MACHINE)
{
- if (m_prev_selected != nullptr)
+ // special case for configure machine
+ if (m_prev_selected)
{
- ui_software_info *swinfo = (ui_software_info *)m_prev_selected;
+ ui_software_info *swinfo = reinterpret_cast<ui_software_info *>(m_prev_selected);
menu::stack_push<menu_machine_configure>(ui(), container(), (const game_driver *)swinfo->driver);
}
return;
}
- // special case for configure plugins
else if ((FPTR)ui_swinfo == CONF_PLUGINS)
{
+ // special case for configure plugins
menu::stack_push<menu_plugins_configure>(ui(), container());
}
else if (ui_swinfo->startempty == 1)
@@ -1112,9 +884,9 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
media_auditor auditor(enumerator);
media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
- // if everything looks good, schedule the new driver
if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED)
{
+ // if everything looks good, schedule the new driver
s_bios biosname;
if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
menu::stack_push<bios_selection>(ui(), container(), biosname, (void *)ui_swinfo->driver, false, false);
@@ -1129,10 +901,9 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
stack_reset();
}
}
-
- // otherwise, display an error
else
{
+ // otherwise, display an error
reset(reset_options::REMEMBER_REF);
m_ui_error = true;
}
@@ -1199,7 +970,7 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
// returns if the search can be activated
//-------------------------------------------------
-inline bool menu_select_game::isfavorite()
+inline bool menu_select_game::isfavorite() const
{
return (main_filters::actual == FILTER_FAVORITE);
}
@@ -1233,73 +1004,6 @@ void menu_select_game::inkey_special(const event *menu_event)
}
-void menu_select_game::inkey_navigation()
-{
- switch (get_focus())
- {
- case focused_menu::main:
- if (selected <= visible_items)
- {
- m_prev_selected = item[selected].ref;
- selected = visible_items + 1;
- }
- else
- {
- if (ui_globals::panels_status != HIDE_LEFT_PANEL)
- set_focus(focused_menu::left);
-
- else if (ui_globals::panels_status == HIDE_BOTH)
- {
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- }
- else
- {
- set_focus(focused_menu::righttop);
- }
- }
- break;
-
- case focused_menu::left:
- if (ui_globals::panels_status != HIDE_RIGHT_PANEL)
- {
- set_focus(focused_menu::righttop);
- }
- else
- {
- set_focus(focused_menu::main);
- if (m_prev_selected == nullptr)
- {
- selected = 0;
- return;
- }
-
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- }
- break;
-
- case focused_menu::righttop:
- set_focus(focused_menu::rightbottom);
- break;
-
- case focused_menu::rightbottom:
- set_focus(focused_menu::main);
- if (m_prev_selected == nullptr)
- {
- selected = 0;
- return;
- }
-
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- break;
- }
-}
-
//-------------------------------------------------
// build list
//-------------------------------------------------
@@ -1954,40 +1658,129 @@ float menu_select_game::draw_left_panel(float x1, float y1, float x2, float y2)
// draw infos
//-------------------------------------------------
-void menu_select_game::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
+void menu_select_game::infos_render(float origx1, float origy1, float origx2, float origy2)
{
- float line_height = ui().get_line_height();
- static std::string buffer;
+ float const line_height = ui().get_line_height();
+ float text_size = ui().options().infos_size();
std::vector<int> xstart;
std::vector<int> xend;
- float text_size = ui().options().infos_size();
- const game_driver *driver = nullptr;
- ui_software_info *soft = nullptr;
- bool is_favorites = ((item[0].flags & FLAG_UI_FAVORITE) != 0);
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- static int oldview = -1;
- static int old_sw_view = -1;
-
- if (is_favorites)
+
+ ui_software_info const *software;
+ game_driver const *driver;
+ get_selection(software, driver);
+
+ if (software && ((software->startempty != 1) || !driver))
{
- soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
- if (soft && soft->startempty == 1)
+ m_info_driver = nullptr;
+
+ float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
+ float ud_arrow_width = line_height * machine().render().ui_aspect();
+ float oy1 = origy1 + line_height;
+
+ // apply title to right panel
+ if (software->usage.empty())
+ {
+ ui().draw_text_full(container(), _("History"), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ ui_globals::cur_sw_dats_view = 0;
+ }
+ else
+ {
+ float title_size = 0.0f;
+ float txt_length = 0.0f;
+ std::string t_text[2];
+ t_text[0] = _("History");
+ t_text[1] = _("Usage");
+
+ for (auto & elem: t_text)
+ {
+ ui().draw_text_full(container(), elem.c_str(), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ mame_ui_manager::NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_length, nullptr);
+ txt_length += 0.01f;
+ title_size = (std::max)(txt_length, title_size);
+ }
+
+ rgb_t fgcolor = UI_TEXT_COLOR;
+ rgb_t bgcolor = UI_TEXT_BG_COLOR;
+ if (get_focus() == focused_menu::rightbottom)
+ {
+ fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00);
+ bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff);
+ }
+
+ float middle = origx2 - origx1;
+
+ if (bgcolor != UI_TEXT_BG_COLOR)
+ {
+ ui().draw_textured_box(container(), origx1 + ((middle - title_size) * 0.5f), origy1, origx1 + ((middle + title_size) * 0.5f),
+ origy1 + line_height, bgcolor, rgb_t(255, 43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ }
+
+ ui().draw_text_full(container(), t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
+ ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+
+ draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
+ }
+
+ if (m_info_software != software || m_info_view != ui_globals::cur_sw_dats_view)
+ {
+ m_info_buffer.clear();
+ m_info_view = ui_globals::cur_sw_dats_view;
+ m_info_software = software;
+ if (ui_globals::cur_sw_dats_view == 0)
+ {
+ if (software->startempty == 1)
+ mame_machine_manager::instance()->datfile().load_data_info(software->driver, m_info_buffer, UI_HISTORY_LOAD);
+ else
+ mame_machine_manager::instance()->datfile().load_software_info(software->listname, m_info_buffer, software->shortname, software->parentname);
+ }
+ else
+ m_info_buffer = software->usage;
+ }
+
+ if (m_info_buffer.empty())
{
- driver = soft->driver;
- oldsoft = nullptr;
+ ui().draw_text_full(container(), _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, ui::text_layout::CENTER,
+ ui::text_layout::WORD, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ return;
}
else
- olddriver = nullptr;
+ {
+ m_total_lines = ui().wrap_text(container(), m_info_buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
+ }
+
+ int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
+ if (m_total_lines < r_visible_lines)
+ r_visible_lines = m_total_lines;
+ if (m_topline_datsview < 0)
+ m_topline_datsview = 0;
+ if (m_topline_datsview + r_visible_lines >= m_total_lines)
+ m_topline_datsview = m_total_lines - r_visible_lines;
+
+ for (int r = 0; r < r_visible_lines; ++r)
+ {
+ int itemline = r + m_topline_datsview;
+ std::string tempbuf(m_info_buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
+
+ // up arrow
+ if (r == 0 && m_topline_datsview != 0)
+ draw_info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
+ // bottom arrow
+ else if (r == r_visible_lines - 1 && itemline != m_total_lines - 1)
+ draw_info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
+ else
+ ui().draw_text_full(container(), tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, ui::text_layout::LEFT,
+ ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
+ oy1 += (line_height * text_size);
+ }
+
+ // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
+ right_visible_lines = r_visible_lines - (m_topline_datsview != 0) - (m_topline_datsview + r_visible_lines != m_total_lines);
}
- else
+ else if (driver)
{
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : ((m_prev_selected != nullptr) ? (const game_driver *)m_prev_selected : nullptr);
- oldsoft = nullptr;
- }
+ m_info_software = nullptr;
- if (driver)
- {
float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
float ud_arrow_width = line_height * machine().render().ui_aspect();
float oy1 = origy1 + line_height;
@@ -2036,19 +1829,19 @@ void menu_select_game::infos_render(void *selectedref, float origx1, float origy
draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size);
- if (driver != olddriver || ui_globals::curdats_view != oldview)
+ if (driver != m_info_driver || ui_globals::curdats_view != m_info_view)
{
- buffer.clear();
- olddriver = driver;
- oldview = ui_globals::curdats_view;
+ m_info_buffer.clear();
+ m_info_driver = driver;
+ m_info_view = ui_globals::curdats_view;
m_topline_datsview = 0;
m_total_lines = 0;
std::vector<std::string> m_item;
if (ui_globals::curdats_view == UI_GENERAL_LOAD)
- general_info(driver, buffer);
+ general_info(driver, m_info_buffer);
else if (ui_globals::curdats_view != UI_COMMAND_LOAD)
- mame_machine_manager::instance()->datfile().load_data_info(driver, buffer, ui_globals::curdats_view);
+ mame_machine_manager::instance()->datfile().load_data_info(driver, m_info_buffer, ui_globals::curdats_view);
else
mame_machine_manager::instance()->datfile().command_sub_menu(driver, m_item);
@@ -2057,25 +1850,25 @@ void menu_select_game::infos_render(void *selectedref, float origx1, float origy
for (size_t x = 0; x < m_item.size(); ++x)
{
std::string t_buffer;
- buffer.append(m_item[x]).append("\n");
+ m_info_buffer.append(m_item[x]).append("\n");
mame_machine_manager::instance()->datfile().load_command_info(t_buffer, m_item[x]);
if (!t_buffer.empty())
- buffer.append(t_buffer).append("\n");
+ m_info_buffer.append(t_buffer).append("\n");
}
- convert_command_glyph(buffer);
+ convert_command_glyph(m_info_buffer);
}
}
- if (buffer.empty())
+ if (m_info_buffer.empty())
{
ui().draw_text_full(container(), _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, ui::text_layout::CENTER,
ui::text_layout::WORD, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
return;
}
else if (ui_globals::curdats_view != UI_STORY_LOAD && ui_globals::curdats_view != UI_COMMAND_LOAD)
- m_total_lines = ui().wrap_text(container(), buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
+ m_total_lines = ui().wrap_text(container(), m_info_buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
else
- m_total_lines = ui().wrap_text(container(), buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * gutter_width), xstart, xend, text_size);
+ m_total_lines = ui().wrap_text(container(), m_info_buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * gutter_width), xstart, xend, text_size);
int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
if (m_total_lines < r_visible_lines)
@@ -2089,7 +1882,7 @@ void menu_select_game::infos_render(void *selectedref, float origx1, float origy
for (int r = 0; r < r_visible_lines; ++r)
{
int itemline = r + m_topline_datsview;
- std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
+ std::string tempbuf(m_info_buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
// up arrow
if (r == 0 && m_topline_datsview != 0)
@@ -2149,8 +1942,10 @@ void menu_select_game::infos_render(void *selectedref, float origx1, float origy
ui::text_layout::RIGHT, ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
}
else
+ {
ui().draw_text_full(container(), tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, ui::text_layout::LEFT,
ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
+ }
}
else
{
@@ -2164,335 +1959,81 @@ void menu_select_game::infos_render(void *selectedref, float origx1, float origy
// return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
right_visible_lines = r_visible_lines - (m_topline_datsview != 0) - (m_topline_datsview + r_visible_lines != m_total_lines);
}
- else if (soft)
- {
- float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
- float ud_arrow_width = line_height * machine().render().ui_aspect();
- float oy1 = origy1 + line_height;
-
- // apply title to right panel
- if (soft->usage.empty())
- {
- ui().draw_text_full(container(), _("History"), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
- mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- ui_globals::cur_sw_dats_view = 0;
- }
- else
- {
- float title_size = 0.0f;
- float txt_length = 0.0f;
- std::string t_text[2];
- t_text[0] = _("History");
- t_text[1] = _("Usage");
-
- for (auto & elem: t_text)
- {
- ui().draw_text_full(container(), elem.c_str(), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
- mame_ui_manager::NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_length, nullptr);
- txt_length += 0.01f;
- title_size = (std::max)(txt_length, title_size);
- }
-
- rgb_t fgcolor = UI_TEXT_COLOR;
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- if (get_focus() == focused_menu::rightbottom)
- {
- fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00);
- bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff);
- }
-
- float middle = origx2 - origx1;
-
- if (bgcolor != UI_TEXT_BG_COLOR)
- {
- ui().draw_textured_box(container(), origx1 + ((middle - title_size) * 0.5f), origy1, origx1 + ((middle + title_size) * 0.5f),
- origy1 + line_height, bgcolor, rgb_t(255, 43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
- }
-
- ui().draw_text_full(container(), t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1,
- ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, fgcolor, bgcolor, nullptr, nullptr);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size);
- }
-
- if (oldsoft != soft || old_sw_view != ui_globals::cur_sw_dats_view)
- {
- buffer.clear();
- old_sw_view = ui_globals::cur_sw_dats_view;
- oldsoft = soft;
- if (ui_globals::cur_sw_dats_view == 0)
- {
- if (soft->startempty == 1)
- mame_machine_manager::instance()->datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD);
- else
- mame_machine_manager::instance()->datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname);
- }
- else
- buffer = soft->usage;
- }
-
- if (buffer.empty())
- {
- ui().draw_text_full(container(), _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, ui::text_layout::CENTER,
- ui::text_layout::WORD, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- return;
- }
- else
- {
- m_total_lines = ui().wrap_text(container(), buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size);
- }
-
- int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size));
- if (m_total_lines < r_visible_lines)
- r_visible_lines = m_total_lines;
- if (m_topline_datsview < 0)
- m_topline_datsview = 0;
- if (m_topline_datsview + r_visible_lines >= m_total_lines)
- m_topline_datsview = m_total_lines - r_visible_lines;
-
- for (int r = 0; r < r_visible_lines; ++r)
- {
- int itemline = r + m_topline_datsview;
- std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline]));
-
- // up arrow
- if (r == 0 && m_topline_datsview != 0)
- draw_info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- // bottom arrow
- else if (r == r_visible_lines - 1 && itemline != m_total_lines - 1)
- draw_info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
- else
- ui().draw_text_full(container(), tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, ui::text_layout::LEFT,
- ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- oy1 += (line_height * text_size);
- }
-
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
- right_visible_lines = r_visible_lines - (m_topline_datsview != 0) - (m_topline_datsview + r_visible_lines != m_total_lines);
- }
}
+
//-------------------------------------------------
-// draw right panel
+// get selected software and/or driver
//-------------------------------------------------
-void menu_select_game::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2)
+void menu_select_game::get_selection(ui_software_info const *&software, game_driver const *&driver) const
{
- rgb_t fgcolor = UI_TEXT_COLOR;
- bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH);
- float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER;
- float space = x2 - origx1;
- float lr_arrow_width = 0.4f * space * machine().render().ui_aspect();
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * space;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * space;
-
- ui().draw_outlined_box(container(), origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
+ if (item[0].flags & FLAG_UI_FAVORITE) // TODO: work out why this doesn't use isfavorite()
{
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RPANEL_ARROW;
+ software = reinterpret_cast<ui_software_info const *>(get_selection_ptr());
+ driver = software ? software->driver : nullptr;
}
-
- if (hide)
+ else
{
- draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return;
+ software = nullptr;
+ driver = reinterpret_cast<game_driver const *>(get_selection_ptr());
}
-
- draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- origx1 = x2;
- origy1 = draw_right_box_title(origx1, origy1, origx2, origy2);
-
- if (ui_globals::rpanel == RP_IMAGES)
- arts_render(selectedref, origx1, origy1, origx2, origy2);
- else
- infos_render(selectedref, origx1, origy1, origx2, origy2);
}
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-void menu_select_game::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
+void menu_select_game::make_topbox_text(std::string &line0, std::string &line1, std::string &line2) const
{
- bool is_favorites = ((item[0].flags & FLAG_UI_FAVORITE) != 0);
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- const game_driver *driver = nullptr;
- ui_software_info *soft = nullptr;
+ inifile_manager &inifile = mame_machine_manager::instance()->inifile();
+
+ line0 = string_format(_("%1$s %2$s ( %3$d / %4$d machines (%5$d BIOS) )"),
+ emulator_info::get_appname(),
+ bare_build_version,
+ visible_items,
+ (driver_list::total() - 1),
+ m_isabios);
- if (is_favorites)
+ std::string filtered;
+ if (main_filters::actual == FILTER_CATEGORY && inifile.total() > 0)
{
- soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
- if (soft && soft->startempty == 1)
- {
- driver = soft->driver;
- oldsoft = nullptr;
- }
- else
- olddriver = nullptr;
+ filtered = string_format(_("%1$s (%2$s - %3$s) - "),
+ main_filters::text[main_filters::actual],
+ inifile.get_file(),
+ inifile.get_category());
}
- else
+ else if (main_filters::actual == FILTER_MANUFACTURER)
{
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : ((m_prev_selected != nullptr) ? (const game_driver *)m_prev_selected : nullptr);
- oldsoft = nullptr;
+ filtered = string_format(_("%1$s (%2$s) - "),
+ main_filters::text[main_filters::actual],
+ c_mnfct::ui[c_mnfct::actual]);
}
-
- if (driver != nullptr)
+ else if (main_filters::actual == FILTER_YEAR)
{
- if (ui_globals::default_image)
- ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW;
-
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (driver != olddriver || !snapx_valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- snapfile.set_restrict_to_mediapath(true);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- // try to load snapshot first from saved "0000.png" file
- std::string fullname(driver->name);
- render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png");
-
- if (!tmp_bitmap->valid())
- render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg");
-
- // if fail, attemp to load from standard file
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
-
- // if fail again, attemp to load from parent file
- if (!tmp_bitmap->valid())
- {
- // set clone status
- bool cloneof = strcmp(driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- if (cloneof)
- {
- fullname.assign(driver->parent).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->parent).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- }
-
- olddriver = driver;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- draw_snapx(origx1, origy1, origx2, origy2);
+ filtered = string_format(_("%1$s (%2$s) - "),
+ main_filters::text[main_filters::actual],
+ c_year::ui[c_year::actual]);
}
- else if (soft != nullptr)
- {
- std::string fullname, pathname;
-
- if (ui_globals::default_image)
- (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW;
-
- // arts title and searchpath
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (soft != oldsoft || !snapx_valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
- if (soft->startempty == 1)
- {
- // Load driver snapshot
- fullname.assign(soft->driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- else if (ui_globals::curimage_view == TITLES_VIEW)
- {
- // First attempt from name list
- pathname.assign(soft->listname).append("_titles");
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- else
- {
- // First attempt from name list
- pathname = soft->listname;
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+ // display the current typeahead
+ if (isfavorite())
+ line1.clear();
+ else
+ line1 = string_format(_("%1$s Search: %2$s_"), filtered, m_search);
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
+ line2.clear();
+}
- if (!tmp_bitmap->valid())
- {
- // Second attempt from driver name + part name
- pathname.assign(soft->driver->name).append(soft->part);
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- }
+std::string menu_select_game::make_driver_description(game_driver const &driver) const
+{
+ // first line is game name
+ return string_format(_("Romset: %1$-.100s"), driver.name);
+}
- oldsoft = soft;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
- auto_free(machine(), tmp_bitmap);
- }
- // if the image is available, loaded and valid, display it
- draw_snapx(origx1, origy1, origx2, origy2);
- }
+std::string menu_select_game::make_software_description(ui_software_info const &software) const
+{
+ // first line is system
+ return string_format(_("System: %1$-.100s"), software.driver->description);
}
} // namespace ui
diff --git a/src/frontend/mame/ui/selgame.h b/src/frontend/mame/ui/selgame.h
index c1c934bee62..699d9222f1b 100644
--- a/src/frontend/mame/ui/selgame.h
+++ b/src/frontend/mame/ui/selgame.h
@@ -27,7 +27,6 @@ public:
static void force_game_select(mame_ui_manager &mui, render_container &container);
protected:
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
private:
@@ -40,9 +39,15 @@ private:
enum { VISIBLE_GAMES_IN_SEARCH = 200 };
char m_search[40];
+ static bool first_start;
static int m_isabios;
int highlight;
+ std::string m_info_buffer;
+ game_driver const *m_info_driver;
+ ui_software_info const *m_info_software;
+ int m_info_view;
+
static std::vector<const game_driver *> m_sortedlist;
std::vector<const game_driver *> m_availsortedlist;
std::vector<const game_driver *> m_unavailsortedlist;
@@ -56,8 +61,13 @@ private:
// draw left panel
virtual float draw_left_panel(float x1, float y1, float x2, float y2) override;
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override;
+ // get selected software and/or driver
+ virtual void get_selection(ui_software_info const *&software, game_driver const *&driver) const override;
+
+ // text for main top/bottom panels
+ virtual void make_topbox_text(std::string &line0, std::string &line1, std::string &line2) const override;
+ virtual std::string make_driver_description(game_driver const &driver) const override;
+ virtual std::string make_software_description(ui_software_info const &software) const override;
// internal methods
void build_custom();
@@ -65,24 +75,28 @@ private:
void build_available_list();
void build_list(const char *filter_text = nullptr, int filter = 0, bool bioscheck = false, std::vector<const game_driver *> vec = {});
- bool isfavorite();
+ bool isfavorite() const;
void populate_search();
void init_sorted_list();
bool load_available_machines();
void load_custom_filters();
+ void *get_selection_ptr() const
+ {
+ void *const selected_ref(get_selection_ref());
+ return (FPTR(selected_ref) > skip_main_items) ? selected_ref : m_prev_selected;
+ }
+
// General info
void general_info(const game_driver *driver, std::string &buffer);
- void arts_render(void *selectedref, float x1, float y1, float x2, float y2);
- void infos_render(void *selectedref, float x1, float y1, float x2, float y2);
+ virtual void infos_render(float x1, float y1, float x2, float y2) override;
// handlers
void inkey_select(const event *menu_event);
void inkey_select_favorite(const event *menu_event);
void inkey_special(const event *menu_event);
void inkey_export();
- void inkey_navigation();
};
} // namespace ui
diff --git a/src/frontend/mame/ui/selmenu.cpp b/src/frontend/mame/ui/selmenu.cpp
index 24eea3378ed..64b4855c967 100644
--- a/src/frontend/mame/ui/selmenu.cpp
+++ b/src/frontend/mame/ui/selmenu.cpp
@@ -13,12 +13,13 @@
#include "ui/selmenu.h"
#include "ui/icorender.h"
+#include "ui/inifile.h"
#include "ui/utils.h"
// these hold static bitmap images
-#include "ui/defimg.h"
-#include "ui/starimg.h"
-#include "ui/toolbar.h"
+#include "ui/defimg.ipp"
+#include "ui/starimg.ipp"
+#include "ui/toolbar.ipp"
#include "cheat.h"
#include "mame.h"
@@ -26,6 +27,7 @@
#include "drivenum.h"
#include "emuopts.h"
#include "rendutil.h"
+#include "softlist.h"
#include "uiinput.h"
#include <algorithm>
@@ -73,6 +75,8 @@ menu_select_launch::cache_ptr_map menu_select_launch::s_caches;
menu_select_launch::cache::cache(running_machine &machine)
: m_snapx_bitmap(std::make_unique<bitmap_argb32>(0, 0))
, m_snapx_texture()
+ , m_snapx_driver(nullptr)
+ , m_snapx_software(nullptr)
, m_no_avail_bitmap(std::make_unique<bitmap_argb32>(256, 256))
, m_star_bitmap(std::make_unique<bitmap_argb32>(32, 32))
, m_star_texture()
@@ -145,6 +149,7 @@ menu_select_launch::~menu_select_launch()
menu_select_launch::menu_select_launch(mame_ui_manager &mui, render_container &container, bool is_swlist)
: menu(mui, container)
+ , m_prev_selected(nullptr)
, m_total_lines(0)
, m_topline_datsview(0)
, m_ui_error(false)
@@ -186,216 +191,263 @@ menu_select_launch::menu_select_launch(mame_ui_manager &mui, render_container &c
//-------------------------------------------------
-// draw right box title
+// perform our special rendering
//-------------------------------------------------
-float menu_select_launch::draw_right_box_title(float x1, float y1, float x2, float y2)
+void menu_select_launch::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
- auto line_height = ui().get_line_height();
- float midl = (x2 - x1) * 0.5f;
+ std::string tempbuf[5];
- // add outlined box for options
- ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // add separator line
- container().add_line(x1 + midl, y1, x1 + midl, y1 + line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ // determine the text for the header
+ make_topbox_text(tempbuf[0], tempbuf[1], tempbuf[2]);
- std::string buffer[RP_LAST + 1];
- buffer[RP_IMAGES] = _("Images");
- buffer[RP_INFOS] = _("Infos");
+ // get the size of the text
+ float maxwidth = origx2 - origx1;
+ for (int line = 0; line < 3; ++line)
+ {
+ float width;
+ ui().draw_text_full(container(), tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
+ width += 2 * UI_BOX_LR_BORDER;
+ maxwidth = (std::max)(width, maxwidth);
+ }
- // check size
float text_size = 1.0f;
- for (auto & elem : buffer)
+ if (maxwidth > origx2 - origx1)
{
- auto textlen = ui().get_string_width(elem.c_str()) + 0.01f;
- float tmp_size = (textlen > midl) ? (midl / textlen) : 1.0f;
- text_size = MIN(text_size, tmp_size);
+ text_size = (origx2 - origx1) / maxwidth;
+ maxwidth = origx2 - origx1;
}
- for (int cells = RP_FIRST; cells <= RP_LAST; ++cells)
+ // compute our bounds
+ float tbarspace = ui().get_line_height();
+ float x1 = 0.5f - 0.5f * maxwidth;
+ float x2 = x1 + maxwidth;
+ float y1 = origy1 - top;
+ float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace;
+
+ // draw a box
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
+
+ // draw the text within it
+ for (int line = 0; line < 3; ++line)
{
- rgb_t bgcolor = UI_TEXT_BG_COLOR;
- rgb_t fgcolor = UI_TEXT_COLOR;
+ ui().draw_text_full(container(), tempbuf[line].c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
+ y1 += ui().get_line_height();
+ }
- if (mouse_hit && x1 <= mouse_x && x1 + midl > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y)
- {
- if (ui_globals::rpanel != cells)
- {
- bgcolor = UI_MOUSEOVER_BG_COLOR;
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RP_FIRST + cells;
- }
- }
+ // determine the text to render below
+ ui_software_info const *swinfo;
+ game_driver const *driver;
+ get_selection(swinfo, driver);
- if (ui_globals::rpanel != cells)
+ bool isstar = false;
+ rgb_t color = UI_BACKGROUND_COLOR;
+ if (swinfo && ((swinfo->startempty != 1) || !driver))
+ {
+ isstar = mame_machine_manager::instance()->favorite().isgame_favorite(*swinfo);
+
+ // first line is long name or system
+ tempbuf[0] = make_software_description(*swinfo);
+
+ // next line is year, publisher
+ tempbuf[1] = string_format(_("%1$s, %2$-.100s"), swinfo->year, swinfo->publisher);
+
+ // next line is parent/clone
+ if (!swinfo->parentname.empty())
+ tempbuf[2] = string_format(_("Software is clone of: %1$-.100s"), !swinfo->parentlongname.empty() ? swinfo->parentlongname : swinfo->parentname);
+ else
+ tempbuf[2] = _("Software is parent");
+
+ // next line is supported status
+ if (swinfo->supported == SOFTWARE_SUPPORTED_NO)
{
- container().add_line(x1, y1 + line_height, x1 + midl, y1 + line_height, UI_LINE_WIDTH,
- UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- if (fgcolor != UI_MOUSEOVER_COLOR)
- fgcolor = UI_CLONE_COLOR;
+ tempbuf[3] = _("Supported: No");
+ color = UI_RED_COLOR;
}
-
- if (m_focus == focused_menu::righttop && ui_globals::rpanel == cells)
+ else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL)
{
- fgcolor = rgb_t(0xff, 0xff, 0x00);
- bgcolor = rgb_t(0xff, 0xff, 0xff);
- ui().draw_textured_box(container(), x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height,
- bgcolor, rgb_t(43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ tempbuf[3] = _("Supported: Partial");
+ color = UI_YELLOW_COLOR;
}
- else if (bgcolor == UI_MOUSEOVER_BG_COLOR)
+ else
{
- container().add_rect(x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height,
- bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ tempbuf[3] = _("Supported: Yes");
+ color = UI_GREEN_COLOR;
}
- ui().draw_text_full(container(), buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH,
- ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
- x1 += midl;
+ // last line is romset name
+ tempbuf[4] = string_format(_("romset: %1$-.100s"), swinfo->shortname);
}
+ else if (driver)
+ {
+ isstar = mame_machine_manager::instance()->favorite().isgame_favorite(driver);
- return (y1 + line_height + UI_LINE_WIDTH);
-}
+ // first line is game description/game name
+ tempbuf[0] = make_driver_description(*driver);
+ // next line is year, manufacturer
+ tempbuf[1] = string_format(_("%1$s, %2$-.100s"), driver->year, driver->manufacturer);
-//-------------------------------------------------
-// common function for images render
-//-------------------------------------------------
+ // next line is clone/parent status
+ int cloneof = driver_list::non_bios_clone(*driver);
-std::string menu_select_launch::arts_render_common(float origx1, float origy1, float origx2, float origy2)
-{
- auto line_height = ui().get_line_height();
- std::string snaptext, searchstr;
- auto title_size = 0.0f;
- auto txt_lenght = 0.0f;
- auto gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
+ if (cloneof != -1)
+ tempbuf[2] = string_format(_("Driver is clone of: %1$-.100s"), driver_list::driver(cloneof).description);
+ else
+ tempbuf[2] = _("Driver is parent");
- get_title_search(snaptext, searchstr);
+ // next line is overall driver status
+ if (driver->flags & MACHINE_NOT_WORKING)
+ tempbuf[3] = _("Overall: NOT WORKING");
+ else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
+ tempbuf[3] = _("Overall: Unemulated Protection");
+ else
+ tempbuf[3] = _("Overall: Working");
- // apply title to right panel
- for (int x = FIRST_VIEW; x < LAST_VIEW; x++)
- {
- ui().draw_text_full(container(), _(arts_info[x].first), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER,
- ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &txt_lenght, nullptr);
- txt_lenght += 0.01f;
- title_size = MAX(txt_lenght, title_size);
- }
+ // next line is graphics, sound status
+ if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
+ tempbuf[4] = _("Graphics: Imperfect, ");
+ else
+ tempbuf[4] = _("Graphics: OK, ");
- rgb_t fgcolor = (m_focus == focused_menu::rightbottom) ? rgb_t(0xff, 0xff, 0x00) : UI_TEXT_COLOR;
- rgb_t bgcolor = (m_focus == focused_menu::rightbottom) ? rgb_t(0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR;
- float middle = origx2 - origx1;
+ if (driver->flags & MACHINE_NO_SOUND)
+ tempbuf[4].append(_("Sound: Unimplemented"));
+ else if (driver->flags & MACHINE_IMPERFECT_SOUND)
+ tempbuf[4].append(_("Sound: Imperfect"));
+ else
+ tempbuf[4].append(_("Sound: OK"));
- // check size
- float sc = title_size + 2.0f * gutter_width;
- float tmp_size = (sc > middle) ? ((middle - 2.0f * gutter_width) / sc) : 1.0f;
- title_size *= tmp_size;
+ color = UI_GREEN_COLOR;
- if (bgcolor != UI_TEXT_BG_COLOR)
+ if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
+ | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
+ color = UI_YELLOW_COLOR;
+
+ if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
+ color = UI_RED_COLOR;
+ }
+ else
{
- ui().draw_textured_box(container(), origx1 + ((middle - title_size) * 0.5f), origy1, origx1 + ((middle + title_size) * 0.5f),
- origy1 + line_height, bgcolor, rgb_t(43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ std::string copyright(emulator_info::get_copyright());
+ size_t found = copyright.find("\n");
+
+ tempbuf[0].clear();
+ tempbuf[1] = string_format(_("%1$s %2$s"), emulator_info::get_appname(), build_version);
+ tempbuf[2] = copyright.substr(0, found);
+ tempbuf[3] = copyright.substr(found + 1);
+ tempbuf[4].clear();
}
- ui().draw_text_full(container(), snaptext.c_str(), origx1, origy1, origx2 - origx1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
- mame_ui_manager::NORMAL, fgcolor, bgcolor, nullptr, nullptr, tmp_size);
-
- draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curimage_view, FIRST_VIEW, LAST_VIEW, title_size);
+ // compute our bounds
+ x1 = 0.5f - 0.5f * maxwidth;
+ x2 = x1 + maxwidth;
+ y1 = y2;
+ y2 = origy1 - UI_BOX_TB_BORDER;
- return searchstr;
-}
+ // draw toolbar
+ draw_toolbar(x1, y1, x2, y2);
+ // get the size of the text
+ maxwidth = origx2 - origx1;
-//-------------------------------------------------
-// perform rendering of image
-//-------------------------------------------------
-
-void menu_select_launch::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float origy1, float origx2, float origy2)
-{
- bool no_available = false;
- float line_height = ui().get_line_height();
-
- // if it fails, use the default image
- if (!tmp_bitmap->valid())
+ for (auto &elem : tempbuf)
{
- tmp_bitmap->allocate(256, 256);
- const bitmap_argb32 &src(m_cache->no_avail_bitmap());
- for (int x = 0; x < 256; x++)
- {
- for (int y = 0; y < 256; y++)
- tmp_bitmap->pix32(y, x) = src.pix32(y, x);
- }
- no_available = true;
+ float width;
+ ui().draw_text_full(container(), elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
+ width += 2 * UI_BOX_LR_BORDER;
+ maxwidth = (std::max)(maxwidth, width);
}
- bitmap_argb32 &snapx_bitmap(m_cache->snapx_bitmap());
- if (tmp_bitmap->valid())
+ if (maxwidth > origx2 - origx1)
{
- float panel_width = origx2 - origx1 - 0.02f;
- float panel_height = origy2 - origy1 - 0.02f - (2.0f * UI_BOX_TB_BORDER) - (2.0f * line_height);
- int screen_width = machine().render().ui_target().width();
- int screen_height = machine().render().ui_target().height();
+ text_size = (origx2 - origx1) / maxwidth;
+ maxwidth = origx2 - origx1;
+ }
- if (machine().render().ui_target().orientation() & ORIENTATION_SWAP_XY)
- std::swap(screen_height, screen_width);
+ // compute our bounds
+ x1 = 0.5f - 0.5f * maxwidth;
+ x2 = x1 + maxwidth;
+ y1 = origy2 + UI_BOX_TB_BORDER;
+ y2 = origy2 + bottom;
- int panel_width_pixel = panel_width * screen_width;
- int panel_height_pixel = panel_height * screen_height;
+ // draw a box
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, color);
- // Calculate resize ratios for resizing
- auto ratioW = (float)panel_width_pixel / tmp_bitmap->width();
- auto ratioH = (float)panel_height_pixel / tmp_bitmap->height();
- auto ratioI = (float)tmp_bitmap->height() / tmp_bitmap->width();
- auto dest_xPixel = tmp_bitmap->width();
- auto dest_yPixel = tmp_bitmap->height();
+ // take off the borders
+ x1 += UI_BOX_LR_BORDER;
+ x2 -= UI_BOX_LR_BORDER;
+ y1 += UI_BOX_TB_BORDER;
- // force 4:3 ratio min
- if (ui().options().forced_4x3_snapshot() && ratioI < 0.75f && ui_globals::curimage_view == SNAPSHOT_VIEW)
+ // is favorite? draw the star
+ if (isstar)
+ draw_star(x1, y1);
+
+ // draw all lines
+ for (auto &elem : tempbuf)
+ {
+ ui().draw_text_full(container(), elem.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
+ y1 += ui().get_line_height();
+ }
+}
+
+
+void menu_select_launch::inkey_navigation()
+{
+ switch (get_focus())
+ {
+ case focused_menu::main:
+ if (selected <= visible_items)
{
- // smaller ratio will ensure that the image fits in the view
- dest_yPixel = tmp_bitmap->width() * 0.75f;
- ratioH = (float)panel_height_pixel / dest_yPixel;
- float ratio = MIN(ratioW, ratioH);
- dest_xPixel = tmp_bitmap->width() * ratio;
- dest_yPixel *= ratio;
+ m_prev_selected = item[selected].ref;
+ selected = visible_items + 1;
}
- // resize the bitmap if necessary
- else if (ratioW < 1 || ratioH < 1 || (ui().options().enlarge_snaps() && !no_available))
+ else
{
- // smaller ratio will ensure that the image fits in the view
- float ratio = MIN(ratioW, ratioH);
- dest_xPixel = tmp_bitmap->width() * ratio;
- dest_yPixel = tmp_bitmap->height() * ratio;
- }
+ if (ui_globals::panels_status != HIDE_LEFT_PANEL)
+ set_focus(focused_menu::left);
- bitmap_argb32 *dest_bitmap;
+ else if (ui_globals::panels_status == HIDE_BOTH)
+ {
+ for (int x = 0; x < item.size(); ++x)
+ if (item[x].ref == m_prev_selected)
+ selected = x;
+ }
+ else
+ {
+ set_focus(focused_menu::righttop);
+ }
+ }
+ break;
- // resample if necessary
- if (dest_xPixel != tmp_bitmap->width() || dest_yPixel != tmp_bitmap->height())
+ case focused_menu::left:
+ if (ui_globals::panels_status != HIDE_RIGHT_PANEL)
{
- dest_bitmap = auto_alloc(machine(), bitmap_argb32);
- dest_bitmap->allocate(dest_xPixel, dest_yPixel);
- render_color color = { 1.0f, 1.0f, 1.0f, 1.0f };
- render_resample_argb_bitmap_hq(*dest_bitmap, *tmp_bitmap, color, true);
+ set_focus(focused_menu::righttop);
}
else
- dest_bitmap = tmp_bitmap;
-
- snapx_bitmap.allocate(panel_width_pixel, panel_height_pixel);
- int x1 = (0.5f * panel_width_pixel) - (0.5f * dest_xPixel);
- int y1 = (0.5f * panel_height_pixel) - (0.5f * dest_yPixel);
-
- for (int x = 0; x < dest_xPixel; x++)
- for (int y = 0; y < dest_yPixel; y++)
- snapx_bitmap.pix32(y + y1, x + x1) = dest_bitmap->pix32(y, x);
+ {
+ set_focus(focused_menu::main);
+ select_prev();
+ }
+ break;
- auto_free(machine(), dest_bitmap);
+ case focused_menu::righttop:
+ set_focus(focused_menu::rightbottom);
+ break;
- // apply bitmap
- m_cache->snapx_texture()->set_bitmap(snapx_bitmap, snapx_bitmap.cliprect(), TEXFORMAT_ARGB32);
- }
- else
- {
- snapx_bitmap.reset();
+ case focused_menu::rightbottom:
+ set_focus(focused_menu::main);
+ select_prev();
+ break;
}
}
@@ -479,7 +531,7 @@ void menu_select_launch::draw_info_arrow(int ub, float origx1, float origx2, flo
// draw toolbar
//-------------------------------------------------
-void menu_select_launch::draw_toolbar(float x1, float y1, float x2, float y2, bool software)
+void menu_select_launch::draw_toolbar(float x1, float y1, float x2, float y2)
{
// draw a box
ui().draw_outlined_box(container(), x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
@@ -490,8 +542,8 @@ void menu_select_launch::draw_toolbar(float x1, float y1, float x2, float y2, bo
y1 += UI_BOX_TB_BORDER;
y2 -= UI_BOX_TB_BORDER;
- texture_ptr_vector const &t_texture = software ? m_cache->sw_toolbar_texture() : m_cache->toolbar_texture();
- bitmap_ptr_vector const &t_bitmap = software ? m_cache->sw_toolbar_bitmap() : m_cache->toolbar_bitmap();
+ texture_ptr_vector const &t_texture(m_is_swlist ? m_cache->sw_toolbar_texture() : m_cache->toolbar_texture());
+ bitmap_ptr_vector const &t_bitmap(m_is_swlist ? m_cache->sw_toolbar_bitmap() : m_cache->toolbar_bitmap());
auto const num_valid(std::count_if(std::begin(t_bitmap), std::end(t_bitmap), [](bitmap_ptr const &e) { return e && e->valid(); }));
@@ -533,27 +585,6 @@ void menu_select_launch::draw_star(float x0, float y0)
}
-//-------------------------------------------------
-// draw snapshot
-//-------------------------------------------------
-
-void menu_select_launch::draw_snapx(float origx1, float origy1, float origx2, float origy2)
-{
- // if the image is available, loaded and valid, display it
- if (snapx_valid())
- {
- float const line_height = ui().get_line_height();
- float const x1 = origx1 + 0.01f;
- float const x2 = origx2 - 0.01f;
- float const y1 = origy1 + UI_BOX_TB_BORDER + line_height;
- float const y2 = origy2 - UI_BOX_TB_BORDER - line_height;
-
- // apply texture
- container().add_quad(x1, y1, x2, y2, rgb_t::white, m_cache->snapx_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- }
-}
-
-
void menu_select_launch::set_pressed()
{
(m_repeat == 0) ? m_repeat = osd_ticks() + osd_ticks_per_second() / 2 : m_repeat = osd_ticks() + osd_ticks_per_second() / 4;
@@ -1219,7 +1250,7 @@ void menu_select_launch::draw(UINT32 flags)
float effective_width = visible_width - 2.0f * gutter_width;
float effective_left = visible_left + gutter_width;
- if (m_prev_selected != nullptr && m_focus == focused_menu::main && selected < visible_items)
+ if ((m_focus == focused_menu::main) && (selected < visible_items))
m_prev_selected = nullptr;
int const n_loop = (std::min)(m_visible_lines, visible_items);
@@ -1364,7 +1395,7 @@ void menu_select_launch::draw(UINT32 flags)
x1 = x2;
x2 += right_panel_size;
- draw_right_panel(get_selection_ref(), x1, y1, x2, y2);
+ draw_right_panel(x1, y1, x2, y2);
x1 = primary_left - UI_BOX_LR_BORDER;
x2 = primary_left + primary_width + UI_BOX_LR_BORDER;
@@ -1390,6 +1421,450 @@ void menu_select_launch::draw(UINT32 flags)
}
+//-------------------------------------------------
+// draw right panel
+//-------------------------------------------------
+
+void menu_select_launch::draw_right_panel(float origx1, float origy1, float origx2, float origy2)
+{
+ bool const hide((ui_globals::panels_status == HIDE_RIGHT_PANEL) || (ui_globals::panels_status == HIDE_BOTH));
+ float const x2(hide ? origx2 : (origx1 + 2.0f * UI_BOX_LR_BORDER));
+ float const space(x2 - origx1);
+ float const lr_arrow_width(0.4f * space * machine().render().ui_aspect());
+
+ // set left-right arrows dimension
+ float const ar_x0(0.5f * (x2 + origx1) - 0.5f * lr_arrow_width);
+ float const ar_y0(0.5f * (origy2 + origy1) + 0.1f * space);
+ float const ar_x1(ar_x0 + lr_arrow_width);
+ float const ar_y1(0.5f * (origy2 + origy1) + 0.9f * space);
+
+ ui().draw_outlined_box(container(), origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
+
+ rgb_t fgcolor(UI_TEXT_COLOR);
+ if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
+ {
+ fgcolor = UI_MOUSEOVER_COLOR;
+ hover = HOVER_RPANEL_ARROW;
+ }
+
+ if (hide)
+ {
+ draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
+ return;
+ }
+
+ draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
+ origy1 = draw_right_box_title(x2, origy1, origx2, origy2);
+
+ if (ui_globals::rpanel == RP_IMAGES)
+ arts_render(x2, origy1, origx2, origy2);
+ else
+ infos_render(x2, origy1, origx2, origy2);
+}
+
+
+//-------------------------------------------------
+// draw right box title
+//-------------------------------------------------
+
+float menu_select_launch::draw_right_box_title(float x1, float y1, float x2, float y2)
+{
+ auto line_height = ui().get_line_height();
+ float midl = (x2 - x1) * 0.5f;
+
+ // add outlined box for options
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+
+ // add separator line
+ container().add_line(x1 + midl, y1, x1 + midl, y1 + line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+
+ std::string buffer[RP_LAST + 1];
+ buffer[RP_IMAGES] = _("Images");
+ buffer[RP_INFOS] = _("Infos");
+
+ // check size
+ float text_size = 1.0f;
+ for (auto & elem : buffer)
+ {
+ auto textlen = ui().get_string_width(elem.c_str()) + 0.01f;
+ float tmp_size = (textlen > midl) ? (midl / textlen) : 1.0f;
+ text_size = MIN(text_size, tmp_size);
+ }
+
+ for (int cells = RP_FIRST; cells <= RP_LAST; ++cells)
+ {
+ rgb_t bgcolor = UI_TEXT_BG_COLOR;
+ rgb_t fgcolor = UI_TEXT_COLOR;
+
+ if (mouse_hit && x1 <= mouse_x && x1 + midl > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y)
+ {
+ if (ui_globals::rpanel != cells)
+ {
+ bgcolor = UI_MOUSEOVER_BG_COLOR;
+ fgcolor = UI_MOUSEOVER_COLOR;
+ hover = HOVER_RP_FIRST + cells;
+ }
+ }
+
+ if (ui_globals::rpanel != cells)
+ {
+ container().add_line(x1, y1 + line_height, x1 + midl, y1 + line_height, UI_LINE_WIDTH,
+ UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ if (fgcolor != UI_MOUSEOVER_COLOR)
+ fgcolor = UI_CLONE_COLOR;
+ }
+
+ if (m_focus == focused_menu::righttop && ui_globals::rpanel == cells)
+ {
+ fgcolor = rgb_t(0xff, 0xff, 0x00);
+ bgcolor = rgb_t(0xff, 0xff, 0xff);
+ ui().draw_textured_box(container(), x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height,
+ bgcolor, rgb_t(43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ }
+ else if (bgcolor == UI_MOUSEOVER_BG_COLOR)
+ {
+ container().add_rect(x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height,
+ bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ }
+
+ ui().draw_text_full(container(), buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH,
+ ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size);
+ x1 += midl;
+ }
+
+ return (y1 + line_height + UI_LINE_WIDTH);
+}
+
+
+//-------------------------------------------------
+// perform our special rendering
+//-------------------------------------------------
+
+void menu_select_launch::arts_render(float origx1, float origy1, float origx2, float origy2)
+{
+ ui_software_info const *software;
+ game_driver const *driver;
+ get_selection(software, driver);
+
+ if (software && ((software->startempty != 1) || !driver))
+ {
+ m_cache->set_snapx_driver(nullptr);
+
+ if (ui_globals::default_image)
+ (software->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW;
+
+ // arts title and searchpath
+ std::string const searchstr = arts_render_common(origx1, origy1, origx2, origy2);
+
+ // loads the image if necessary
+ if (m_cache->snapx_software_is(software) || !snapx_valid() || ui_globals::switch_image)
+ {
+ emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
+ bitmap_argb32 *tmp_bitmap;
+ tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
+
+ if (software->startempty == 1)
+ {
+ // Load driver snapshot
+ std::string fullname = std::string(software->driver->name) + ".png";
+ render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(software->driver->name).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+ }
+ }
+ else if (ui_globals::curimage_view == TITLES_VIEW)
+ {
+ // First attempt from name list
+ std::string const pathname = software->listname + "_titles";
+ std::string fullname = software->shortname + ".png";
+ render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(software->shortname).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+ }
+ }
+ else
+ {
+ // First attempt from name list
+ std::string pathname = software->listname;
+ std::string fullname = software->shortname + ".png";
+ render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(software->shortname).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+ }
+
+ if (!tmp_bitmap->valid())
+ {
+ // Second attempt from driver name + part name
+ pathname.assign(software->driver->name).append(software->part);
+ fullname.assign(software->shortname).append(".png");
+ render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(software->shortname).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
+ }
+ }
+ }
+
+ m_cache->set_snapx_software(software);
+ ui_globals::switch_image = false;
+ arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
+ auto_free(machine(), tmp_bitmap);
+ }
+
+ // if the image is available, loaded and valid, display it
+ draw_snapx(origx1, origy1, origx2, origy2);
+ }
+ else if (driver)
+ {
+ m_cache->set_snapx_software(nullptr);
+
+ if (ui_globals::default_image)
+ ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW;
+
+ std::string const searchstr = arts_render_common(origx1, origy1, origx2, origy2);
+
+ // loads the image if necessary
+ if (!m_cache->snapx_driver_is(driver) || !snapx_valid() || ui_globals::switch_image)
+ {
+ emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
+ snapfile.set_restrict_to_mediapath(true);
+ bitmap_argb32 *tmp_bitmap;
+ tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
+
+ // try to load snapshot first from saved "0000.png" file
+ std::string fullname(driver->name);
+ render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png");
+
+ if (!tmp_bitmap->valid())
+ render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg");
+
+ // if fail, attemp to load from standard file
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(driver->name).append(".png");
+ render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(driver->name).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+ }
+ }
+
+ // if fail again, attemp to load from parent file
+ if (!tmp_bitmap->valid())
+ {
+ // set clone status
+ bool cloneof = strcmp(driver->parent, "0");
+ if (cloneof)
+ {
+ int cx = driver_list::find(driver->parent);
+ if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
+ cloneof = false;
+ }
+
+ if (cloneof)
+ {
+ fullname.assign(driver->parent).append(".png");
+ render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+
+ if (!tmp_bitmap->valid())
+ {
+ fullname.assign(driver->parent).append(".jpg");
+ render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
+ }
+ }
+ }
+
+ m_cache->set_snapx_driver(driver);
+ ui_globals::switch_image = false;
+ arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
+ auto_free(machine(), tmp_bitmap);
+ }
+
+ // if the image is available, loaded and valid, display it
+ draw_snapx(origx1, origy1, origx2, origy2);
+ }
+}
+
+
+//-------------------------------------------------
+// common function for images render
+//-------------------------------------------------
+
+std::string menu_select_launch::arts_render_common(float origx1, float origy1, float origx2, float origy2)
+{
+ float const line_height = ui().get_line_height();
+ float const gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f;
+
+ std::string snaptext, searchstr;
+ get_title_search(snaptext, searchstr);
+
+ // apply title to right panel
+ float title_size = 0.0f;
+ for (int x = FIRST_VIEW; x < LAST_VIEW; x++)
+ {
+ float text_length;
+ ui().draw_text_full(container(),
+ _(arts_info[x].first), origx1, origy1, origx2 - origx1,
+ ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black,
+ &text_length, nullptr);
+ title_size = (std::max)(text_length + 0.01f, title_size);
+ }
+
+ rgb_t const fgcolor = (m_focus == focused_menu::rightbottom) ? rgb_t(0xff, 0xff, 0x00) : UI_TEXT_COLOR;
+ rgb_t const bgcolor = (m_focus == focused_menu::rightbottom) ? rgb_t(0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR;
+ float const middle = origx2 - origx1;
+
+ // check size
+ float const sc = title_size + 2.0f * gutter_width;
+ float const tmp_size = (sc > middle) ? ((middle - 2.0f * gutter_width) / sc) : 1.0f;
+ title_size *= tmp_size;
+
+ if (bgcolor != UI_TEXT_BG_COLOR)
+ {
+ ui().draw_textured_box(container(), origx1 + ((middle - title_size) * 0.5f), origy1, origx1 + ((middle + title_size) * 0.5f),
+ origy1 + line_height, bgcolor, rgb_t(43, 43, 43), hilight_main_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+ }
+
+ ui().draw_text_full(container(),
+ snaptext.c_str(), origx1, origy1, origx2 - origx1,
+ ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NORMAL, fgcolor, bgcolor,
+ nullptr, nullptr, tmp_size);
+
+ draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curimage_view, FIRST_VIEW, LAST_VIEW, title_size);
+
+ return searchstr;
+}
+
+
+//-------------------------------------------------
+// perform rendering of image
+//-------------------------------------------------
+
+void menu_select_launch::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float origy1, float origx2, float origy2)
+{
+ bool no_available = false;
+ float line_height = ui().get_line_height();
+
+ // if it fails, use the default image
+ if (!tmp_bitmap->valid())
+ {
+ tmp_bitmap->allocate(256, 256);
+ const bitmap_argb32 &src(m_cache->no_avail_bitmap());
+ for (int x = 0; x < 256; x++)
+ {
+ for (int y = 0; y < 256; y++)
+ tmp_bitmap->pix32(y, x) = src.pix32(y, x);
+ }
+ no_available = true;
+ }
+
+ bitmap_argb32 &snapx_bitmap(m_cache->snapx_bitmap());
+ if (tmp_bitmap->valid())
+ {
+ float panel_width = origx2 - origx1 - 0.02f;
+ float panel_height = origy2 - origy1 - 0.02f - (2.0f * UI_BOX_TB_BORDER) - (2.0f * line_height);
+ int screen_width = machine().render().ui_target().width();
+ int screen_height = machine().render().ui_target().height();
+
+ if (machine().render().ui_target().orientation() & ORIENTATION_SWAP_XY)
+ std::swap(screen_height, screen_width);
+
+ int panel_width_pixel = panel_width * screen_width;
+ int panel_height_pixel = panel_height * screen_height;
+
+ // Calculate resize ratios for resizing
+ auto ratioW = (float)panel_width_pixel / tmp_bitmap->width();
+ auto ratioH = (float)panel_height_pixel / tmp_bitmap->height();
+ auto ratioI = (float)tmp_bitmap->height() / tmp_bitmap->width();
+ auto dest_xPixel = tmp_bitmap->width();
+ auto dest_yPixel = tmp_bitmap->height();
+
+ // force 4:3 ratio min
+ if (ui().options().forced_4x3_snapshot() && ratioI < 0.75f && ui_globals::curimage_view == SNAPSHOT_VIEW)
+ {
+ // smaller ratio will ensure that the image fits in the view
+ dest_yPixel = tmp_bitmap->width() * 0.75f;
+ ratioH = (float)panel_height_pixel / dest_yPixel;
+ float ratio = MIN(ratioW, ratioH);
+ dest_xPixel = tmp_bitmap->width() * ratio;
+ dest_yPixel *= ratio;
+ }
+ // resize the bitmap if necessary
+ else if (ratioW < 1 || ratioH < 1 || (ui().options().enlarge_snaps() && !no_available))
+ {
+ // smaller ratio will ensure that the image fits in the view
+ float ratio = MIN(ratioW, ratioH);
+ dest_xPixel = tmp_bitmap->width() * ratio;
+ dest_yPixel = tmp_bitmap->height() * ratio;
+ }
+
+ bitmap_argb32 *dest_bitmap;
+
+ // resample if necessary
+ if (dest_xPixel != tmp_bitmap->width() || dest_yPixel != tmp_bitmap->height())
+ {
+ dest_bitmap = auto_alloc(machine(), bitmap_argb32);
+ dest_bitmap->allocate(dest_xPixel, dest_yPixel);
+ render_color color = { 1.0f, 1.0f, 1.0f, 1.0f };
+ render_resample_argb_bitmap_hq(*dest_bitmap, *tmp_bitmap, color, true);
+ }
+ else
+ dest_bitmap = tmp_bitmap;
+
+ snapx_bitmap.allocate(panel_width_pixel, panel_height_pixel);
+ int x1 = (0.5f * panel_width_pixel) - (0.5f * dest_xPixel);
+ int y1 = (0.5f * panel_height_pixel) - (0.5f * dest_yPixel);
+
+ for (int x = 0; x < dest_xPixel; x++)
+ for (int y = 0; y < dest_yPixel; y++)
+ snapx_bitmap.pix32(y + y1, x + x1) = dest_bitmap->pix32(y, x);
+
+ auto_free(machine(), dest_bitmap);
+
+ // apply bitmap
+ m_cache->snapx_texture()->set_bitmap(snapx_bitmap, snapx_bitmap.cliprect(), TEXFORMAT_ARGB32);
+ }
+ else
+ {
+ snapx_bitmap.reset();
+ }
+}
+
+
+//-------------------------------------------------
+// draw snapshot
+//-------------------------------------------------
+
+void menu_select_launch::draw_snapx(float origx1, float origy1, float origx2, float origy2)
+{
+ // if the image is available, loaded and valid, display it
+ if (snapx_valid())
+ {
+ float const line_height = ui().get_line_height();
+ float const x1 = origx1 + 0.01f;
+ float const x2 = origx2 - 0.01f;
+ float const y1 = origy1 + UI_BOX_TB_BORDER + line_height;
+ float const y2 = origy2 - UI_BOX_TB_BORDER - line_height;
+
+ // apply texture
+ container().add_quad(x1, y1, x2, y2, rgb_t::white, m_cache->snapx_texture(), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ }
+}
+
+
void menu_select_launch::exit(running_machine &machine)
{
std::lock_guard<std::mutex> guard(s_cache_guard);
diff --git a/src/frontend/mame/ui/selmenu.h b/src/frontend/mame/ui/selmenu.h
index 006c0f54b4e..99838673e36 100644
--- a/src/frontend/mame/ui/selmenu.h
+++ b/src/frontend/mame/ui/selmenu.h
@@ -21,6 +21,8 @@
#include <vector>
+struct ui_software_info;
+
namespace ui {
class menu_select_launch : public menu
{
@@ -44,28 +46,17 @@ protected:
focused_menu get_focus() const { return m_focus; }
void set_focus(focused_menu focus) { m_focus = focus; }
- // draw right box
- float draw_right_box_title(float x1, float y1, float x2, float y2);
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
- // images render
- std::string arts_render_common(float origx1, float origy1, float origx2, float origy2);
- void arts_render_images(bitmap_argb32 *bitmap, float origx1, float origy1, float origx2, float origy2);
+ // hanlders
+ void inkey_navigation();
// draw arrow
void draw_common_arrow(float origx1, float origy1, float origx2, float origy2, int current, int dmin, int dmax, float title);
void draw_info_arrow(int ub, float origx1, float origx2, float oy1, float line_height, float text_size, float ud_arrow_width);
- // draw toolbar
- void draw_toolbar(float x1, float y1, float x2, float y2, bool software = false);
-
- // draw star
- void draw_star(float x0, float y0);
-
- // draw snapshot if valid
- void draw_snapx(float origx1, float origy1, float origx2, float origy2);
- bool snapx_valid() const { return m_cache->snapx_bitmap().valid(); }
-
int visible_items;
+ void *m_prev_selected;
int m_total_lines;
int m_topline_datsview; // right box top line
bool m_ui_error;
@@ -82,6 +73,11 @@ private:
bitmap_argb32 &snapx_bitmap() { return *m_snapx_bitmap; }
render_texture *snapx_texture() { return m_snapx_texture.get(); }
+ bool snapx_driver_is(game_driver const *value) const { return m_snapx_driver == value; }
+ bool snapx_software_is(ui_software_info const *software) const { return m_snapx_software == software; }
+ void set_snapx_driver(game_driver const *value) { m_snapx_driver = value; }
+ void set_snapx_software(ui_software_info const *software) { m_snapx_software = software; }
+
bitmap_argb32 &no_avail_bitmap() { return *m_no_avail_bitmap; }
render_texture *star_texture() { return m_star_texture.get(); }
@@ -91,16 +87,19 @@ private:
texture_ptr_vector const &sw_toolbar_texture() { return m_sw_toolbar_texture; }
private:
- bitmap_ptr m_snapx_bitmap;
- texture_ptr m_snapx_texture;
- bitmap_ptr m_no_avail_bitmap;
- bitmap_ptr m_star_bitmap;
- texture_ptr m_star_texture;
-
- bitmap_ptr_vector m_toolbar_bitmap;
- bitmap_ptr_vector m_sw_toolbar_bitmap;
- texture_ptr_vector m_toolbar_texture;
- texture_ptr_vector m_sw_toolbar_texture;
+ bitmap_ptr m_snapx_bitmap;
+ texture_ptr m_snapx_texture;
+ game_driver const *m_snapx_driver;
+ ui_software_info const *m_snapx_software;
+
+ bitmap_ptr m_no_avail_bitmap;
+ bitmap_ptr m_star_bitmap;
+ texture_ptr m_star_texture;
+
+ bitmap_ptr_vector m_toolbar_bitmap;
+ bitmap_ptr_vector m_sw_toolbar_bitmap;
+ texture_ptr_vector m_toolbar_texture;
+ texture_ptr_vector m_sw_toolbar_texture;
};
using cache_ptr = std::shared_ptr<cache>;
using cache_ptr_map = std::map<running_machine *, cache_ptr>;
@@ -111,12 +110,37 @@ private:
bool mouse_pressed() const { return (osd_ticks() >= m_repeat); }
void set_pressed();
+ bool snapx_valid() const { return m_cache->snapx_bitmap().valid(); }
+
// draw left panel
virtual float draw_left_panel(float x1, float y1, float x2, float y2) = 0;
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) = 0;
+ // draw infos
+ virtual void infos_render(float x1, float y1, float x2, float y2) = 0;
+ // get selected software and/or driver
+ virtual void get_selection(ui_software_info const *&software, game_driver const *&driver) const = 0;
+ void select_prev()
+ {
+ if (!m_prev_selected)
+ {
+ selected = 0;
+ }
+ else
+ {
+ for (int x = 0; x < item.size(); ++x)
+ {
+ if (item[x].ref == m_prev_selected)
+ {
+ selected = x;
+ break;
+ }
+ }
+ }
+ }
+
+ void draw_toolbar(float x1, float y1, float x2, float y2);
+ void draw_star(float x0, float y0);
float draw_icon(int linenum, void *selectedref, float x1, float y1);
void get_title_search(std::string &title, std::string &search);
@@ -130,18 +154,33 @@ private:
// draw game list
virtual void draw(UINT32 flags) override;
+ // draw right panel
+ void draw_right_panel(float origx1, float origy1, float origx2, float origy2);
+ float draw_right_box_title(float x1, float y1, float x2, float y2);
+
+ // images render
+ void arts_render(float origx1, float origy1, float origx2, float origy2);
+ std::string arts_render_common(float origx1, float origy1, float origx2, float origy2);
+ void arts_render_images(bitmap_argb32 *bitmap, float origx1, float origy1, float origx2, float origy2);
+ void draw_snapx(float origx1, float origy1, float origx2, float origy2);
+
+ // text for main top/bottom panels
+ virtual void make_topbox_text(std::string &line0, std::string &line1, std::string &line2) const = 0;
+ virtual std::string make_driver_description(game_driver const &driver) const = 0;
+ virtual std::string make_software_description(ui_software_info const &software) const = 0;
+
// cleanup function
static void exit(running_machine &machine);
- cache_ptr m_cache;
- bool m_is_swlist;
- focused_menu m_focus;
- bool m_pressed; // mouse button held down
- osd_ticks_t m_repeat;
+ cache_ptr m_cache;
+ bool m_is_swlist;
+ focused_menu m_focus;
+ bool m_pressed; // mouse button held down
+ osd_ticks_t m_repeat;
- render_texture *m_icons_texture[MAX_ICONS_RENDER];
- bitmap_ptr m_icons_bitmap[MAX_ICONS_RENDER];
- game_driver const *m_old_icons[MAX_ICONS_RENDER];
+ render_texture *m_icons_texture[MAX_ICONS_RENDER];
+ bitmap_ptr m_icons_bitmap[MAX_ICONS_RENDER];
+ game_driver const *m_old_icons[MAX_ICONS_RENDER];
static std::mutex s_cache_guard;
static cache_ptr_map s_caches;
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
index a884fd6070c..8839666d838 100644
--- a/src/frontend/mame/ui/selsoft.cpp
+++ b/src/frontend/mame/ui/selsoft.cpp
@@ -298,9 +298,10 @@ void menu_select_software::handle()
check_filter = true;
m_prev_selected = nullptr;
}
-
else if (menu_event->iptkey == IPT_UI_CONFIGURE)
+ {
inkey_navigation();
+ }
}
if (menu_event && !menu_event->itemref)
@@ -650,231 +651,6 @@ void menu_select_software::build_software_list()
m_sortedlist.push_back(&m_swinfo[x]);
}
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void menu_select_software::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- ui_software_info *swinfo = (selectedref != nullptr) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
- const game_driver *driver = nullptr;
- float width;
- std::string tempbuf[5], filtered;
- rgb_t color = UI_BACKGROUND_COLOR;
- bool isstar = false;
- float tbarspace = ui().get_line_height();
- float text_size = 1.0f;
-
- // determine the text for the header
- int vis_item = (m_search[0] != 0) ? visible_items : (m_has_empty_start ? visible_items - 1 : visible_items);
- tempbuf[0] = string_format(_("%1$s %2$s ( %3$d / %4$d software packages )"), emulator_info::get_appname(), bare_build_version, vis_item, m_swinfo.size() - 1);
- tempbuf[1] = string_format(_("Driver: \"%1$s\" software list "), m_driver->description);
-
- if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
- filtered = string_format(_("Region: %1$s -"), m_filter.region.ui[m_filter.region.actual]);
- else if (sw_filters::actual == UI_SW_PUBLISHERS)
- filtered = string_format(_("Publisher: %1$s -"), m_filter.publisher.ui[m_filter.publisher.actual]);
- else if (sw_filters::actual == UI_SW_YEARS)
- filtered = string_format(_("Year: %1$s -"), m_filter.year.ui[m_filter.year.actual]);
- else if (sw_filters::actual == UI_SW_LIST)
- filtered = string_format(_("Software List: %1$s -"), m_filter.swlist.description[m_filter.swlist.actual]);
- else if (sw_filters::actual == UI_SW_TYPE)
- filtered = string_format(_("Device type: %1$s -"), m_filter.type.ui[m_filter.type.actual]);
-
- tempbuf[2] = string_format(_("%s Search: %s_"), filtered, m_search);
-
- // get the size of the text
- float maxwidth = origx2 - origx1;
-
- for (int line = 0; line < 3; ++line)
- {
- ui().draw_text_full(container(), tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(width, maxwidth);
- }
-
- if (maxwidth > origx2 - origx1)
- {
- text_size = (origx2 - origx1) / maxwidth;
- maxwidth = origx2 - origx1;
- }
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace;
-
- // draw a box
- ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // draw the text within it
- for (int line = 0; line < 3; ++line)
- {
- ui().draw_text_full(container(), tempbuf[line].c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- y1 += ui().get_line_height();
- }
-
- // determine the text to render below
- if (swinfo != nullptr && swinfo->startempty == 1)
- driver = swinfo->driver;
-
- if (driver != nullptr)
- {
- isstar = mame_machine_manager::instance()->favorite().isgame_favorite(driver);
-
- // first line is game description
- tempbuf[0] = string_format(_("%1$-.100s"), driver->description);
-
- // next line is year, manufacturer
- tempbuf[1] = string_format(_("%1$s, %2$-.100s"), driver->year, driver->manufacturer);
-
- // next line is clone/parent status
- int cloneof = driver_list::non_bios_clone(*driver);
-
- if (cloneof != -1)
- tempbuf[2] = string_format(_("Driver is clone of: %1$-.100s"), driver_list::driver(cloneof).description);
- else
- tempbuf[2] = _("Driver is parent");
-
- // next line is overall driver status
- if (driver->flags & MACHINE_NOT_WORKING)
- tempbuf[3] = _("Overall: NOT WORKING");
- else if (driver->flags & MACHINE_UNEMULATED_PROTECTION)
- tempbuf[3] = _("Overall: Unemulated Protection");
- else
- tempbuf[3] = _("Overall: Working");
-
- // next line is graphics, sound status
- if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS))
- tempbuf[4] = _("Graphics: Imperfect, ");
- else
- tempbuf[4] = _("Graphics: OK, ");
-
- if (driver->flags & MACHINE_NO_SOUND)
- tempbuf[4].append(_("Sound: Unimplemented"));
- else if (driver->flags & MACHINE_IMPERFECT_SOUND)
- tempbuf[4].append(_("Sound: Imperfect"));
- else
- tempbuf[4].append(_("Sound: OK"));
-
- color = UI_GREEN_COLOR;
-
- if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS
- | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
- color = UI_YELLOW_COLOR;
-
- if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
- color = UI_RED_COLOR;
- }
-
- else if (swinfo != nullptr)
- {
- isstar = mame_machine_manager::instance()->favorite().isgame_favorite(*swinfo);
-
- // first line is long name
- tempbuf[0] = string_format(_("%1$-.100s"), swinfo->longname.c_str());
-
- // next line is year, publisher
- tempbuf[1] = string_format(_("%1$s, %2$-.100s"), swinfo->year.c_str(), swinfo->publisher.c_str());
-
- // next line is parent/clone
- if (!swinfo->parentname.empty())
- tempbuf[2] = string_format(_("Software is clone of: %1$-.100s"), !swinfo->parentlongname.empty() ? swinfo->parentlongname.c_str() : swinfo->parentname.c_str());
- else
- tempbuf[2] = _("Software is parent");
-
- // next line is supported status
- if (swinfo->supported == SOFTWARE_SUPPORTED_NO)
- {
- tempbuf[3] = _("Supported: No");
- color = UI_RED_COLOR;
- }
- else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL)
- {
- tempbuf[3] = _("Supported: Partial");
- color = UI_YELLOW_COLOR;
- }
- else
- {
- tempbuf[3] = _("Supported: Yes");
- color = UI_GREEN_COLOR;
- }
-
- // last line is romset name
- tempbuf[4] = string_format(_("romset: %1$-.100s"), swinfo->shortname.c_str());
- }
- else
- {
- std::string copyright(emulator_info::get_copyright());
- size_t found = copyright.find("\n");
-
- tempbuf[0].clear();
- tempbuf[1] = string_format("%s %s", emulator_info::get_appname(), build_version);
- tempbuf[2] = copyright.substr(0, found);
- tempbuf[3] = copyright.substr(found + 1);
- tempbuf[4].clear();
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = y2;
- y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw toolbar
- draw_toolbar(x1, y1, x2, y2, true);
-
- // get the size of the text
- maxwidth = origx2 - origx1;
-
- for (auto &elem : tempbuf)
- {
- ui().draw_text_full(container(), elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(maxwidth, width);
- }
-
- if (maxwidth > origx2 - origx1)
- {
- text_size = (origx2 - origx1) / maxwidth;
- maxwidth = origx2 - origx1;
- }
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- ui().draw_outlined_box(container(), x1, y1, x2, y2, color);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
-
- // is favorite? draw the star
- if (isstar)
- draw_star(x1, y1);
-
- // draw all lines
- for (auto & elem : tempbuf)
- {
- ui().draw_text_full(container(), elem.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
- mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size);
- y1 += ui().get_line_height();
- }
-}
//-------------------------------------------------
// handle select key event
@@ -989,73 +765,6 @@ void menu_select_software::inkey_special(const event *menu_event)
}
-void menu_select_software::inkey_navigation()
-{
- switch (get_focus())
- {
- case focused_menu::main:
- if (selected <= visible_items)
- {
- m_prev_selected = item[selected].ref;
- selected = visible_items + 1;
- }
- else
- {
- if (ui_globals::panels_status != HIDE_LEFT_PANEL)
- set_focus(focused_menu::left);
-
- else if (ui_globals::panels_status == HIDE_BOTH)
- {
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- }
- else
- {
- set_focus(focused_menu::righttop);
- }
- }
- break;
-
- case focused_menu::left:
- if (ui_globals::panels_status != HIDE_RIGHT_PANEL)
- {
- set_focus(focused_menu::righttop);
- }
- else
- {
- set_focus(focused_menu::main);
- if (m_prev_selected == nullptr)
- {
- selected = 0;
- return;
- }
-
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- }
- break;
-
- case focused_menu::righttop:
- set_focus(focused_menu::rightbottom);
- break;
-
- case focused_menu::rightbottom:
- set_focus(focused_menu::main);
- if (m_prev_selected == nullptr)
- {
- selected = 0;
- return;
- }
-
- for (int x = 0; x < item.size(); ++x)
- if (item[x].ref == m_prev_selected)
- selected = x;
- break;
- }
-}
-
//-------------------------------------------------
// load custom filters info from file
//-------------------------------------------------
@@ -1551,14 +1260,14 @@ float menu_select_software::draw_left_panel(float x1, float y1, float x2, float
// draw infos
//-------------------------------------------------
-void menu_select_software::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
+void menu_select_software::infos_render(float origx1, float origy1, float origx2, float origy2)
{
float line_height = ui().get_line_height();
static std::string buffer;
std::vector<int> xstart;
std::vector<int> xend;
float text_size = ui().options().infos_size();
- ui_software_info *soft = (selectedref != nullptr) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
+ ui_software_info *soft = (get_selection_ref() != nullptr) ? (ui_software_info *)get_selection_ref() : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
static ui_software_info *oldsoft = nullptr;
static int old_sw_view = -1;
@@ -1690,214 +1399,7 @@ void menu_select_software::infos_render(void *selectedref, float origx1, float o
right_visible_lines = r_visible_lines - (m_topline_datsview != 0) - (m_topline_datsview + r_visible_lines != m_total_lines);
}
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void menu_select_software::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- static ui_software_info *oldsoft = nullptr;
- static const game_driver *olddriver = nullptr;
- const game_driver *driver = nullptr;
- ui_software_info *soft = (selectedref != nullptr) ? (ui_software_info *)selectedref : ((m_prev_selected != nullptr) ? (ui_software_info *)m_prev_selected : nullptr);
-
- if (soft != nullptr && soft->startempty == 1)
- {
- driver = soft->driver;
- oldsoft = nullptr;
- }
- else
- olddriver = nullptr;
-
- if (driver != nullptr)
- {
- if (ui_globals::default_image)
- ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW;
-
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (driver != olddriver || !snapx_valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- snapfile.set_restrict_to_mediapath(true);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- // try to load snapshot first from saved "0000.png" file
- std::string fullname(driver->name);
- render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png");
-
- if (!tmp_bitmap->valid())
- render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg");
-
- // if fail, attemp to load from standard file
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
-
- // if fail again, attemp to load from parent file
- if (!tmp_bitmap->valid())
- {
- // set clone status
- bool cloneof = strcmp(driver->parent, "0");
- if (cloneof)
- {
- int cx = driver_list::find(driver->parent);
- if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
- cloneof = false;
- }
-
- if (cloneof)
- {
- fullname.assign(driver->parent).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(driver->parent).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- }
-
- olddriver = driver;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- draw_snapx(origx1, origy1, origx2, origy2);
- }
- else if (soft != nullptr)
- {
- std::string fullname, pathname;
- if (ui_globals::default_image)
- (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW;
-
- // arts title and searchpath
- std::string searchstr;
- searchstr = arts_render_common(origx1, origy1, origx2, origy2);
-
- // loads the image if necessary
- if (soft != oldsoft || !snapx_valid() || ui_globals::switch_image)
- {
- emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ);
- bitmap_argb32 *tmp_bitmap;
- tmp_bitmap = auto_alloc(machine(), bitmap_argb32);
-
- if (soft->startempty == 1)
- {
- // Load driver snapshot
- fullname.assign(soft->driver->name).append(".png");
- render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->driver->name).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str());
- }
- }
- else if (ui_globals::curimage_view == TITLES_VIEW)
- {
- // First attempt from name list
- pathname.assign(soft->listname).append("_titles");
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- else
- {
- // First attempt from name list
- pathname = soft->listname;
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
-
- if (!tmp_bitmap->valid())
- {
- // Second attempt from driver name + part name
- pathname.assign(soft->driver->name).append(soft->part);
- fullname.assign(soft->shortname).append(".png");
- render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
-
- if (!tmp_bitmap->valid())
- {
- fullname.assign(soft->shortname).append(".jpg");
- render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str());
- }
- }
- }
-
- oldsoft = soft;
- ui_globals::switch_image = false;
- arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2);
- auto_free(machine(), tmp_bitmap);
- }
-
- // if the image is available, loaded and valid, display it
- draw_snapx(origx1, origy1, origx2, origy2);
- }
-}
-
-void menu_select_software::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2)
-{
- rgb_t fgcolor = UI_TEXT_COLOR;
- bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH);
- float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER;
- float space = x2 - origx1;
- float lr_arrow_width = 0.4f * space * machine().render().ui_aspect();
-
- // set left-right arrows dimension
- float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width;
- float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * space;
- float ar_x1 = ar_x0 + lr_arrow_width;
- float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * space;
-
- ui().draw_outlined_box(container(), origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
-
- if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y)
- {
- fgcolor = UI_MOUSEOVER_COLOR;
- hover = HOVER_RPANEL_ARROW;
- }
-
- if (hide)
- {
- draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X);
- return;
- }
-
- draw_arrow(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90);
- origx1 = x2;
- origy1 = draw_right_box_title(origx1, origy1, origx2, origy2);
-
- if (ui_globals::rpanel == RP_IMAGES)
- arts_render(selectedref, origx1, origy1, origx2, origy2);
- else
- infos_render(selectedref, origx1, origy1, origx2, origy2);
-}
//-------------------------------------------------
// ctor
@@ -2136,4 +1638,52 @@ void bios_selection::custom_render(void *selectedref, float top, float bottom, f
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
+
+//-------------------------------------------------
+// get selected software and/or driver
+//-------------------------------------------------
+
+void menu_select_software::get_selection(ui_software_info const *&software, game_driver const *&driver) const
+{
+ software = reinterpret_cast<ui_software_info const *>(get_selection_ref());
+ driver = software ? software->driver : nullptr;
+}
+
+
+void menu_select_software::make_topbox_text(std::string &line0, std::string &line1, std::string &line2) const
+{
+ // determine the text for the header
+ int vis_item = (m_search[0] != 0) ? visible_items : (m_has_empty_start ? visible_items - 1 : visible_items);
+ line0 = string_format(_("%1$s %2$s ( %3$d / %4$d software packages )"), emulator_info::get_appname(), bare_build_version, vis_item, m_swinfo.size() - 1);
+ line1 = string_format(_("Driver: \"%1$s\" software list "), m_driver->description);
+
+ std::string filtered;
+ if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
+ filtered = string_format(_("Region: %1$s -"), m_filter.region.ui[m_filter.region.actual]);
+ else if (sw_filters::actual == UI_SW_PUBLISHERS)
+ filtered = string_format(_("Publisher: %1$s -"), m_filter.publisher.ui[m_filter.publisher.actual]);
+ else if (sw_filters::actual == UI_SW_YEARS)
+ filtered = string_format(_("Year: %1$s -"), m_filter.year.ui[m_filter.year.actual]);
+ else if (sw_filters::actual == UI_SW_LIST)
+ filtered = string_format(_("Software List: %1$s -"), m_filter.swlist.description[m_filter.swlist.actual]);
+ else if (sw_filters::actual == UI_SW_TYPE)
+ filtered = string_format(_("Device type: %1$s -"), m_filter.type.ui[m_filter.type.actual]);
+
+ line2 = string_format(_("%s Search: %s_"), filtered, m_search);
+}
+
+
+std::string menu_select_software::make_driver_description(game_driver const &driver) const
+{
+ // first line is game description
+ return string_format(_("%1$-.100s"), driver.description);
+}
+
+
+std::string menu_select_software::make_software_description(ui_software_info const &software) const
+{
+ // first line is long name
+ return string_format(_("%1$-.100s"), software.longname);
+}
+
} // namespace ui
diff --git a/src/frontend/mame/ui/selsoft.h b/src/frontend/mame/ui/selsoft.h
index 5661be86c1c..1f18671f9d8 100644
--- a/src/frontend/mame/ui/selsoft.h
+++ b/src/frontend/mame/ui/selsoft.h
@@ -27,7 +27,6 @@ public:
virtual ~menu_select_software() override;
protected:
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
private:
@@ -44,8 +43,13 @@ private:
// draw left panel
virtual float draw_left_panel(float x1, float y1, float x2, float y2) override;
- // draw right panel
- virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override;
+ // get selected software and/or driver
+ virtual void get_selection(ui_software_info const *&software, game_driver const *&driver) const override;
+
+ // text for main top/bottom panels
+ virtual void make_topbox_text(std::string &line0, std::string &line1, std::string &line2) const override;
+ virtual std::string make_driver_description(game_driver const &driver) const override;
+ virtual std::string make_software_description(ui_software_info const &software) const override;
ui_software_info *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1];
std::vector<ui_software_info *> m_displaylist, m_tmp, m_sortedlist;
@@ -57,13 +61,11 @@ private:
void find_matches(const char *str, int count);
void load_sw_custom_filters();
- void arts_render(void *selectedref, float x1, float y1, float x2, float y2);
- void infos_render(void *selectedref, float x1, float y1, float x2, float y2);
+ virtual void infos_render(float x1, float y1, float x2, float y2) override;
// handlers
void inkey_select(const event *menu_event);
void inkey_special(const event *menu_event);
- void inkey_navigation();
};
class software_parts : public menu
diff --git a/src/frontend/mame/ui/starimg.h b/src/frontend/mame/ui/starimg.ipp
index f57ebb8797f..6918c3315ea 100644
--- a/src/frontend/mame/ui/starimg.h
+++ b/src/frontend/mame/ui/starimg.ipp
@@ -1,8 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Maurizio Petrarota
+#ifndef MAME_FRONTEND_UI_STARIMG_IPP
+#define MAME_FRONTEND_UI_STARIMG_IPP
+#pragma once
-static const UINT32 favorite_star_bmp[] =
-{
+namespace ui {
+namespace {
+// TODO: move this to an external image file and zlib compress it into a souce file as part of the build process
+
+UINT32 const favorite_star_bmp[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -36,3 +42,8 @@ static const UINT32 favorite_star_bmp[] =
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
};
+
+} // anonymous namespace
+} // namespace ui
+
+#endif // MAME_FRONTEND_UI_STAR_IPP
diff --git a/src/frontend/mame/ui/toolbar.h b/src/frontend/mame/ui/toolbar.h
deleted file mode 100644
index 93ee1e3467b..00000000000
--- a/src/frontend/mame/ui/toolbar.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Dankan1890
-static const UINT32 toolbar_bitmap_bmp[][1024] = {
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000,
- 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000,
- 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0x8BD07A00, 0xAAD07A00, 0xAAD07A00, 0xAAC48715, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAACA810B, 0xAAD07A00, 0xA4D07A00, 0x7DD07A00, 0x1CD07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x07D07A00, 0x7BD38206, 0xFFE8B82B, 0xFFF9E24B, 0xFFFEEE55, 0xFFFDEE55, 0xFFCBA95F, 0xFFEBEBEB, 0xFFF1F1F1, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFFCFCFC, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFCFCFC, 0xFFFAFAFA, 0xFFF7F7F7, 0xFFF5F5F5, 0xFFF2F2F2, 0xFFE9E9E9, 0xFFD4AC2F, 0xFFFDEE55, 0xFFFDEC53, 0xFFF6DE47, 0xE4DE9E19, 0x49D38105, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x2DD07A00, 0xD7E39E1C, 0xFFFDDC4A, 0xFFFBD047, 0xFFFACC45, 0xFFF9CB45, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF0E5CC, 0xFFD4B167, 0xFFD2B066, 0xFFD0AE64, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A12A, 0xFFF9CB45, 0xFFFACD46, 0xFFFBD348, 0xFFF7CD3E, 0xB2DB9112, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x52D07A00, 0xFCEBAD2C, 0xFFFCCC44, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B437, 0xFFF9C943, 0xFFD3A02A, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A02A, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFFBCB44, 0xFADD9416, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEBAD2B, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B335, 0xFFF9C741, 0xFFD3A029, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A029, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFDD9416, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAB2A, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B133, 0xFFF8C43F, 0xFFD29F28, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29F28, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFDD9315, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAA28, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B032, 0xFFF8C23C, 0xFFD29E27, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29E27, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFDD9214, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA826, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFC9A352, 0xFFCFCDC7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFD8A329, 0xFFE5AE30, 0xFFCC9723, 0xFFECECEC, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD0CCC2, 0xFFD8A128, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFDD9113, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA624, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFD7A63B, 0xFFCCBFA3, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF8F2E6, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFF5F5F5, 0xFFE1E1E1, 0xFFD8D7D5, 0xFFCBB280, 0xFFE9AF2F, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFDD9012, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA422, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF1B430, 0xFFD6A02D, 0xFFD0B57B, 0xFFD3C099, 0xFFD9C8A3, 0xFFDFCDA8, 0xFFE4D3AE, 0xFFE7D6B1, 0xFFE9D8B3, 0xFFE8D7B2, 0xFFE5D3AE, 0xFFE1CFAA, 0xFFDBCAA5, 0xFFD5C298, 0xFFD0AB5D, 0xFFDDA42C, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFDD8F11, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA120, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF4B32F, 0xFFE9AB2B, 0xFFE5A72A, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE5A82A, 0xFFEDAE2D, 0xFFF5B430, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFDD8E10, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9F1E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFDD8D0F, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9D1C, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFDD8B0E, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9A19, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF0A725, 0xFFE8A324, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE5A124, 0xFFE9A424, 0xFFF4AA26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFDD8A0D, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99917, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFE9A122, 0xFFD7A84A, 0xFFE5CC98, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFE9D6AE, 0xFFE4C78C, 0xFFD89C2A, 0xFFF0A522, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFDD890B, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99614, 0xFFF6A41F, 0xFFF6A41F, 0xFFEFA11F, 0xFFD7A94D, 0xFFFBF9F6, 0xFFF7F7F7, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF8F8F8, 0xFFEEE1C5, 0xFFDBA136, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFDC880A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99413, 0xFFF6A11C, 0xFFF6A11C, 0xFFE79B1C, 0xFFDDC594, 0xFFF3F3F3, 0xFFEDEDED, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFEDEDED, 0xFFF2EFEA, 0xFFD2AA59, 0xFFF6A11C, 0xFFF6A11C, 0xFFF6A11C, 0xFFDC8709, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99110, 0xFFF69D18, 0xFFF69D18, 0xFFE49719, 0xFFDCCAA5, 0xFFE9E9E9, 0xFFE2E2E2, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEAEAEA, 0xFFCEAB61, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFDC8608, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88F0E, 0xFFF59A15, 0xFFF59A15, 0xFFE39518, 0xFFDAC9A4, 0xFFE7E7E7, 0xFFE0E0E0, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFE4E4E4, 0xFFE7E7E7, 0xFFCDAA60, 0xFFF59A15, 0xFFF59A15, 0xFFF59A15, 0xFFDC8507, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88D0C, 0xFFF59712, 0xFFF59712, 0xFFE39315, 0xFFD8C6A1, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCCA95F, 0xFFF59712, 0xFFF59712, 0xFFF59712, 0xFFDC8406, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88B0A, 0xFFF5930F, 0xFFF5930F, 0xFFE39114, 0xFFD5C49F, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFCBA85E, 0xFFF5930F, 0xFFF5930F, 0xFFF5930F, 0xFFDC8205, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88808, 0xFFF5900C, 0xFFF5900C, 0xFFE38E11, 0xFFD3C29D, 0xFFDCDCDC, 0xFFCECECE, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFCAA75D, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFDC8104, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88706, 0xFFF58E09, 0xFFF58E09, 0xFFE38D10, 0xFFD1C09B, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFC8A65C, 0xFFF58E09, 0xFFF58E09, 0xFFF58E09, 0xFFDC8103, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88504, 0xFFF48B07, 0xFFF48B07, 0xFFE38B0E, 0xFFCEBD98, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFC7A55B, 0xFFF48B07, 0xFFF48B07, 0xFFF48B07, 0xFFDC8002, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x52D07A00, 0xFCE78404, 0xFFF48905, 0xFFF48905, 0xFFE28A0D, 0xFFCDBC97, 0xFFD3D3D3, 0xFFC6C6C6, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFCDCDCD, 0xFFD4D4D4, 0xFFC7A45A, 0xFFF48905, 0xFFF48905, 0xFFF38905, 0xFADC7F02, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x2ED07A00, 0xD8DF7F01, 0xFFF38602, 0xFFF48602, 0xFFE2880B, 0xFFCBBA95, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFC6A359, 0xFFF48602, 0xFFF48602, 0xFFED8402, 0xB2D97D01, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x08D07A00, 0x7BD37B00, 0xFFE27F00, 0xFFF08401, 0xFFE2870A, 0xFFCAB893, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFC5A258, 0xFFF38501, 0xFFEE8301, 0xE4DB7D00, 0x49D27B00, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43D07A00, 0x8DD07A00, 0xAACD7D05, 0xAAC28919, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC48715, 0xA5D07A00, 0x7FD07A00, 0x1DD07A00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFB0BABD, 0xFFAEB9BC, 0xFFDADBDB, 0xFFABC1C8, 0xFFD9DDDE, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFDEE0E0, 0xFFBECFD4, 0xFFC5D1D4, 0xFF6CADC1, 0xFF53B4CE, 0xFF89B6C4, 0xFF35AAC8, 0xFFA8C3CC, 0xFFA6B9BE, 0x59758F96, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD2D7D9, 0xFF5CABC4, 0xFF4AB6D1, 0xFF35ACD0, 0xFF2ABAE5, 0xFF25B0D9, 0xFF28B6E3, 0xFF49ACC8, 0xFF3AACCB, 0x632385A4, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDEDFDF, 0xFFA7C0C9, 0xFF79B4C5, 0xFF3CA1C0, 0xFF29B3E0, 0xFF25B0DC, 0xFF5DC2E3, 0xFFB1E2F2, 0xFF59C2E3, 0xFF26B3DE, 0xFF26A8D2, 0xA41C8CAD, 0x661783A4, 0x180E6784,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFF87AEBA, 0xFF24A7D1, 0xFF25ABD5, 0xFF25A8D1, 0xFF1EA4CF, 0xFF9BD7EA, 0xFFFFFFFF, 0xFF91D3E8, 0xFF23A6D0, 0xFF25A9D2, 0xFD26ACD4, 0xD11E94B8, 0x280D647F,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFBFCCD1, 0xFF85B3C2, 0xFF1F96BC, 0xFF229FC7, 0xFF229FC6, 0xFF1B9BC5, 0xFF95D1E4, 0xFFFFFFFF, 0xFF8DCDE2, 0xFF219DC6, 0xFF229FC6, 0xFF22A0C8, 0xBE1986A9, 0x46137696,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFF77A5B4, 0xFF2795B9, 0xFF2099C0, 0xFF2097BD, 0xFF2097BD, 0xFF1A95BC, 0xFF8BC9DD, 0xFFFEFEFF, 0xFF7CC2D8, 0xFF1D96BC, 0xFF2097BD, 0xFF2097BE, 0xFB219BC1, 0xDE1780A1,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFCBD2D3, 0xFF5293A8, 0xFF1D8FB3, 0xFF1C8EB1, 0xFF1C8EB1, 0xFF198CB0, 0xFF77BAD0, 0xFFFCFDFE, 0xFF64B1CA, 0xFF178BAF, 0xFF1C8EB1, 0xFF1C8EB2, 0xF21984A6, 0x5E0F6884,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFF85ABB8, 0xFF2789AA, 0xFF1B87A9, 0xFF1A85A7, 0xFF1A85A7, 0xFF1884A6, 0xFF69AEC5, 0xFFF9FCFD, 0xFF51A2BC, 0xFF1683A5, 0xFF1A85A7, 0xFF1A85A7, 0xFB1B88AB, 0xC0147695,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFAFC0C6, 0xFF5F95A6, 0xFF177998, 0xFF187C9D, 0xFF187C9C, 0xFF177B9C, 0xFF2C87A4, 0xFF75B0C3, 0xFF1E7F9F, 0xFF177B9C, 0xFF187C9C, 0xFF177D9D, 0xD7147190, 0x7C0F6682,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF94B1B9, 0xFF167695, 0xFF167695, 0xFF157593, 0xFF137492, 0xFF4E97AE, 0xFFA3CAD6, 0xFF4390A9, 0xFF147492, 0xFF157593, 0xFF177796, 0xBD126D8B, 0x190B5B75,
- 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD6D7D8, 0xFF7FA4B0, 0xFF4D899B, 0xFF21718B, 0xFF136D8A, 0xFF0C6986, 0xFF7FB0BF, 0xFFE5EFF2, 0xFF78ABBB, 0xFF116C89, 0xFC136C88, 0xCA106682, 0x990F6580, 0x240B5E78,
- 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD3D6D6, 0xFFBFC9CC, 0xFF3D7E93, 0xFF126681, 0xFF116682, 0xFF22728B, 0xFF44889D, 0xFF1F6F89, 0xF90F6480, 0xFC116681, 0x620D607A, 0x0A0A5A74, 0x020A5B75,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFBDBFC0, 0xFF819BA4, 0xFF96A8AD, 0xFF467C8E, 0xF220687F, 0xCB276A7F, 0xE90E607A, 0x520B5D77, 0x5F0B5D77, 0x2B0B5D77, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72407283, 0x6626687D, 0x22467584, 0x800B5C76, 0x1A0A5B75, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-}
-};
-
-#define UI_TOOLBAR_BUTTONS ARRAY_LENGTH(toolbar_bitmap_bmp)
diff --git a/src/frontend/mame/ui/toolbar.ipp b/src/frontend/mame/ui/toolbar.ipp
new file mode 100644
index 00000000000..3b2473a49de
--- /dev/null
+++ b/src/frontend/mame/ui/toolbar.ipp
@@ -0,0 +1,121 @@
+// license:BSD-3-Clause
+// copyright-holders:Dankan1890
+#ifndef MAME_FRONTEND_UI_TOOLBAR_IPP
+#define MAME_FRONTEND_UI_TOOLBAR_IPP
+#pragma once
+
+namespace ui {
+namespace {
+// TODO: move this to an external image file and zlib compress it into a souce file as part of the build process
+
+UINT32 const toolbar_bitmap_bmp[][1024] = {
+ {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000,
+ 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000,
+ 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
+ },
+ {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0x8BD07A00, 0xAAD07A00, 0xAAD07A00, 0xAAC48715, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAACA810B, 0xAAD07A00, 0xA4D07A00, 0x7DD07A00, 0x1CD07A00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x07D07A00, 0x7BD38206, 0xFFE8B82B, 0xFFF9E24B, 0xFFFEEE55, 0xFFFDEE55, 0xFFCBA95F, 0xFFEBEBEB, 0xFFF1F1F1, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFFCFCFC, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFCFCFC, 0xFFFAFAFA, 0xFFF7F7F7, 0xFFF5F5F5, 0xFFF2F2F2, 0xFFE9E9E9, 0xFFD4AC2F, 0xFFFDEE55, 0xFFFDEC53, 0xFFF6DE47, 0xE4DE9E19, 0x49D38105, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x2DD07A00, 0xD7E39E1C, 0xFFFDDC4A, 0xFFFBD047, 0xFFFACC45, 0xFFF9CB45, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF0E5CC, 0xFFD4B167, 0xFFD2B066, 0xFFD0AE64, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A12A, 0xFFF9CB45, 0xFFFACD46, 0xFFFBD348, 0xFFF7CD3E, 0xB2DB9112, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x52D07A00, 0xFCEBAD2C, 0xFFFCCC44, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B437, 0xFFF9C943, 0xFFD3A02A, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A02A, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFFBCB44, 0xFADD9416, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEBAD2B, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B335, 0xFFF9C741, 0xFFD3A029, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A029, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFDD9416, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAB2A, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B133, 0xFFF8C43F, 0xFFD29F28, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29F28, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFDD9315, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAA28, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B032, 0xFFF8C23C, 0xFFD29E27, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29E27, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFDD9214, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA826, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFC9A352, 0xFFCFCDC7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFD8A329, 0xFFE5AE30, 0xFFCC9723, 0xFFECECEC, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD0CCC2, 0xFFD8A128, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFDD9113, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA624, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFD7A63B, 0xFFCCBFA3, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF8F2E6, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFF5F5F5, 0xFFE1E1E1, 0xFFD8D7D5, 0xFFCBB280, 0xFFE9AF2F, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFDD9012, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA422, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF1B430, 0xFFD6A02D, 0xFFD0B57B, 0xFFD3C099, 0xFFD9C8A3, 0xFFDFCDA8, 0xFFE4D3AE, 0xFFE7D6B1, 0xFFE9D8B3, 0xFFE8D7B2, 0xFFE5D3AE, 0xFFE1CFAA, 0xFFDBCAA5, 0xFFD5C298, 0xFFD0AB5D, 0xFFDDA42C, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFDD8F11, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA120, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF4B32F, 0xFFE9AB2B, 0xFFE5A72A, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE5A82A, 0xFFEDAE2D, 0xFFF5B430, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFDD8E10, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9F1E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFDD8D0F, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9D1C, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFDD8B0E, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9A19, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF0A725, 0xFFE8A324, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE5A124, 0xFFE9A424, 0xFFF4AA26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFDD8A0D, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99917, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFE9A122, 0xFFD7A84A, 0xFFE5CC98, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFE9D6AE, 0xFFE4C78C, 0xFFD89C2A, 0xFFF0A522, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFDD890B, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99614, 0xFFF6A41F, 0xFFF6A41F, 0xFFEFA11F, 0xFFD7A94D, 0xFFFBF9F6, 0xFFF7F7F7, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF8F8F8, 0xFFEEE1C5, 0xFFDBA136, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFDC880A, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99413, 0xFFF6A11C, 0xFFF6A11C, 0xFFE79B1C, 0xFFDDC594, 0xFFF3F3F3, 0xFFEDEDED, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFEDEDED, 0xFFF2EFEA, 0xFFD2AA59, 0xFFF6A11C, 0xFFF6A11C, 0xFFF6A11C, 0xFFDC8709, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99110, 0xFFF69D18, 0xFFF69D18, 0xFFE49719, 0xFFDCCAA5, 0xFFE9E9E9, 0xFFE2E2E2, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEAEAEA, 0xFFCEAB61, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFDC8608, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88F0E, 0xFFF59A15, 0xFFF59A15, 0xFFE39518, 0xFFDAC9A4, 0xFFE7E7E7, 0xFFE0E0E0, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFE4E4E4, 0xFFE7E7E7, 0xFFCDAA60, 0xFFF59A15, 0xFFF59A15, 0xFFF59A15, 0xFFDC8507, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88D0C, 0xFFF59712, 0xFFF59712, 0xFFE39315, 0xFFD8C6A1, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCCA95F, 0xFFF59712, 0xFFF59712, 0xFFF59712, 0xFFDC8406, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88B0A, 0xFFF5930F, 0xFFF5930F, 0xFFE39114, 0xFFD5C49F, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFCBA85E, 0xFFF5930F, 0xFFF5930F, 0xFFF5930F, 0xFFDC8205, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88808, 0xFFF5900C, 0xFFF5900C, 0xFFE38E11, 0xFFD3C29D, 0xFFDCDCDC, 0xFFCECECE, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFCAA75D, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFDC8104, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88706, 0xFFF58E09, 0xFFF58E09, 0xFFE38D10, 0xFFD1C09B, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFC8A65C, 0xFFF58E09, 0xFFF58E09, 0xFFF58E09, 0xFFDC8103, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88504, 0xFFF48B07, 0xFFF48B07, 0xFFE38B0E, 0xFFCEBD98, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFC7A55B, 0xFFF48B07, 0xFFF48B07, 0xFFF48B07, 0xFFDC8002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x52D07A00, 0xFCE78404, 0xFFF48905, 0xFFF48905, 0xFFE28A0D, 0xFFCDBC97, 0xFFD3D3D3, 0xFFC6C6C6, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFCDCDCD, 0xFFD4D4D4, 0xFFC7A45A, 0xFFF48905, 0xFFF48905, 0xFFF38905, 0xFADC7F02, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x2ED07A00, 0xD8DF7F01, 0xFFF38602, 0xFFF48602, 0xFFE2880B, 0xFFCBBA95, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFC6A359, 0xFFF48602, 0xFFF48602, 0xFFED8402, 0xB2D97D01, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x08D07A00, 0x7BD37B00, 0xFFE27F00, 0xFFF08401, 0xFFE2870A, 0xFFCAB893, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFC5A258, 0xFFF38501, 0xFFEE8301, 0xE4DB7D00, 0x49D27B00, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43D07A00, 0x8DD07A00, 0xAACD7D05, 0xAAC28919, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC48715, 0xA5D07A00, 0x7FD07A00, 0x1DD07A00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
+ },
+ {
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFB0BABD, 0xFFAEB9BC, 0xFFDADBDB, 0xFFABC1C8, 0xFFD9DDDE, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFDEE0E0, 0xFFBECFD4, 0xFFC5D1D4, 0xFF6CADC1, 0xFF53B4CE, 0xFF89B6C4, 0xFF35AAC8, 0xFFA8C3CC, 0xFFA6B9BE, 0x59758F96, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD2D7D9, 0xFF5CABC4, 0xFF4AB6D1, 0xFF35ACD0, 0xFF2ABAE5, 0xFF25B0D9, 0xFF28B6E3, 0xFF49ACC8, 0xFF3AACCB, 0x632385A4, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDEDFDF, 0xFFA7C0C9, 0xFF79B4C5, 0xFF3CA1C0, 0xFF29B3E0, 0xFF25B0DC, 0xFF5DC2E3, 0xFFB1E2F2, 0xFF59C2E3, 0xFF26B3DE, 0xFF26A8D2, 0xA41C8CAD, 0x661783A4, 0x180E6784,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFF87AEBA, 0xFF24A7D1, 0xFF25ABD5, 0xFF25A8D1, 0xFF1EA4CF, 0xFF9BD7EA, 0xFFFFFFFF, 0xFF91D3E8, 0xFF23A6D0, 0xFF25A9D2, 0xFD26ACD4, 0xD11E94B8, 0x280D647F,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFBFCCD1, 0xFF85B3C2, 0xFF1F96BC, 0xFF229FC7, 0xFF229FC6, 0xFF1B9BC5, 0xFF95D1E4, 0xFFFFFFFF, 0xFF8DCDE2, 0xFF219DC6, 0xFF229FC6, 0xFF22A0C8, 0xBE1986A9, 0x46137696,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFF77A5B4, 0xFF2795B9, 0xFF2099C0, 0xFF2097BD, 0xFF2097BD, 0xFF1A95BC, 0xFF8BC9DD, 0xFFFEFEFF, 0xFF7CC2D8, 0xFF1D96BC, 0xFF2097BD, 0xFF2097BE, 0xFB219BC1, 0xDE1780A1,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFCBD2D3, 0xFF5293A8, 0xFF1D8FB3, 0xFF1C8EB1, 0xFF1C8EB1, 0xFF198CB0, 0xFF77BAD0, 0xFFFCFDFE, 0xFF64B1CA, 0xFF178BAF, 0xFF1C8EB1, 0xFF1C8EB2, 0xF21984A6, 0x5E0F6884,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFF85ABB8, 0xFF2789AA, 0xFF1B87A9, 0xFF1A85A7, 0xFF1A85A7, 0xFF1884A6, 0xFF69AEC5, 0xFFF9FCFD, 0xFF51A2BC, 0xFF1683A5, 0xFF1A85A7, 0xFF1A85A7, 0xFB1B88AB, 0xC0147695,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFAFC0C6, 0xFF5F95A6, 0xFF177998, 0xFF187C9D, 0xFF187C9C, 0xFF177B9C, 0xFF2C87A4, 0xFF75B0C3, 0xFF1E7F9F, 0xFF177B9C, 0xFF187C9C, 0xFF177D9D, 0xD7147190, 0x7C0F6682,
+ 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF94B1B9, 0xFF167695, 0xFF167695, 0xFF157593, 0xFF137492, 0xFF4E97AE, 0xFFA3CAD6, 0xFF4390A9, 0xFF147492, 0xFF157593, 0xFF177796, 0xBD126D8B, 0x190B5B75,
+ 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD6D7D8, 0xFF7FA4B0, 0xFF4D899B, 0xFF21718B, 0xFF136D8A, 0xFF0C6986, 0xFF7FB0BF, 0xFFE5EFF2, 0xFF78ABBB, 0xFF116C89, 0xFC136C88, 0xCA106682, 0x990F6580, 0x240B5E78,
+ 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD3D6D6, 0xFFBFC9CC, 0xFF3D7E93, 0xFF126681, 0xFF116682, 0xFF22728B, 0xFF44889D, 0xFF1F6F89, 0xF90F6480, 0xFC116681, 0x620D607A, 0x0A0A5A74, 0x020A5B75,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFBDBFC0, 0xFF819BA4, 0xFF96A8AD, 0xFF467C8E, 0xF220687F, 0xCB276A7F, 0xE90E607A, 0x520B5D77, 0x5F0B5D77, 0x2B0B5D77, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72407283, 0x6626687D, 0x22467584, 0x800B5C76, 0x1A0A5B75, 0x00000000, 0x00000000, 0x00000000, 0x00000000
+ }
+};
+
+#define UI_TOOLBAR_BUTTONS (ARRAY_LENGTH(toolbar_bitmap_bmp))
+
+} // anonymous namespace
+} // namespace ui
+
+#endif // MAME_FRONTEND_UI_TOOLBAR_IPP
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 10e34a4b9ca..7c729224ef5 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -565,10 +565,10 @@ void mame_ui_manager::draw_text_full(render_container &container, const char *or
// append text to it
layout.add_text(
- origs,
- fgcolor,
- draw == OPAQUE_ ? bgcolor : rgb_t::transparent,
- text_size);
+ origs,
+ fgcolor,
+ draw == OPAQUE_ ? bgcolor : rgb_t::transparent,
+ text_size);
// and emit it (if we are asked to do so)
if (draw != NONE)
diff --git a/src/lib/formats/bbc_dsk.cpp b/src/lib/formats/bbc_dsk.cpp
index 8b39ed17b1f..9b05f14f0be 100644
--- a/src/lib/formats/bbc_dsk.cpp
+++ b/src/lib/formats/bbc_dsk.cpp
@@ -148,7 +148,8 @@ int bbc_adfs_format::find_size(io_generic *io, UINT32 form_factor)
continue;
// valid images will have sector counts adfs-s = 0x280; adfs-m = 0x500; adfs-l = 0xa00; though many adfs-s images are incorrect
- if ((size == (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors == 0x280 || sectors == 0x500 || sectors == 0xa00)) {
+ // format d/e (size 819200) we accept on the size only
+ if ((size == (UINT64)compute_track_size(f) * f.track_count * f.head_count) && (sectors == 0x280 || sectors == 0x500 || sectors == 0xa00 || size == 819200)) {
return i;
}
}
@@ -198,6 +199,10 @@ const bbc_adfs_format::format bbc_adfs_format::formats[] =
floppy_image::FF_35, floppy_image::DSQD, floppy_image::MFM,
2000, 16, 80, 2, 256, {}, -1, { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, 60, 22, 43
},
+ { // 800K 3 1/2 inch 80 track double sided double density
+ floppy_image::FF_35, floppy_image::DSQD, floppy_image::MFM,
+ 2000, 5, 80, 2, 1024, {}, -1, { 0,1,2,3,4 }, 60, 22, 43
+ },
{}
};
diff --git a/src/mame/drivers/a310.cpp b/src/mame/drivers/a310.cpp
index 7acb2a355c9..3202bd6d510 100644
--- a/src/mame/drivers/a310.cpp
+++ b/src/mame/drivers/a310.cpp
@@ -8,6 +8,15 @@
* Enhanced: R. Belmont, June 2007
* Angelo Salese, August 2010
*
+ * Notes:
+ * - default NVRAM is plainly wrong. Use the status/configure commands to set up properly
+ * (Scroll Lock is currently mapped with Right SHIFT, use this to move to next page of status).
+ * In order to load a floppy, you need at very least:
+ * configure floppies 2
+ * configure filesystem adfs
+ * configure monitortype 12
+ * Then reboot / reset the machine, and use cat to (attempt) to load a floppy contents.
+ *
* TODO:
* - Make floppies to work;
* - Attempting to load the GUI gives an exception;
@@ -67,7 +76,7 @@
//#include "machine/aakart.h"
#include "machine/ram.h"
#include "machine/wd_fdc.h"
-#include "formats/applix_dsk.h"
+#include "formats/bbc_dsk.h"
#include "softlist.h"
class a310_state : public archimedes_state
@@ -327,7 +336,8 @@ static INPUT_PORTS_START( a310 )
INPUT_PORTS_END
FLOPPY_FORMATS_MEMBER( a310_state::floppy_formats )
- FLOPPY_APPLIX_FORMAT
+ FLOPPY_BBC_DFS_FORMAT,
+ FLOPPY_BBC_ADFS_FORMAT
FLOPPY_FORMATS_END
static SLOT_INTERFACE_START( a310_floppies )
@@ -335,7 +345,7 @@ static SLOT_INTERFACE_START( a310_floppies )
SLOT_INTERFACE_END
WRITE_LINE_MEMBER( archimedes_state::a310_kart_tx_w )
-{
+{
if(state)
archimedes_request_irq_b(ARCHIMEDES_IRQB_KBD_RECV_FULL);
else
diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp
index 29aa298c9fb..ceb26ccd0c3 100644
--- a/src/mame/drivers/airbustr.cpp
+++ b/src/mame/drivers/airbustr.cpp
@@ -266,12 +266,12 @@ WRITE8_MEMBER(airbustr_state::master_nmi_trigger_w)
WRITE8_MEMBER(airbustr_state::master_bankswitch_w)
{
- membank("bank1")->set_entry(data & 0x07);
+ membank("masterbank")->set_entry(data & 0x07);
}
WRITE8_MEMBER(airbustr_state::slave_bankswitch_w)
{
- membank("bank2")->set_entry(data & 0x07);
+ membank("slavebank")->set_entry(data & 0x07);
flip_screen_set(data & 0x10);
@@ -281,7 +281,7 @@ WRITE8_MEMBER(airbustr_state::slave_bankswitch_w)
WRITE8_MEMBER(airbustr_state::sound_bankswitch_w)
{
- membank("bank3")->set_entry(data & 0x07);
+ membank("audiobank")->set_entry(data & 0x07);
}
READ8_MEMBER(airbustr_state::soundcommand_status_r)
@@ -316,7 +316,7 @@ WRITE8_MEMBER(airbustr_state::soundcommand2_w)
}
-WRITE8_MEMBER(airbustr_state::airbustr_coin_counter_w)
+WRITE8_MEMBER(airbustr_state::coin_counter_w)
{
machine().bookkeeping().coin_counter_w(0, data & 1);
machine().bookkeeping().coin_counter_w(1, data & 2);
@@ -327,7 +327,7 @@ WRITE8_MEMBER(airbustr_state::airbustr_coin_counter_w)
/* Memory Maps */
static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, airbustr_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("masterbank")
AM_RANGE(0xc000, 0xcfff) AM_DEVREADWRITE("pandora", kaneko_pandora_device, spriteram_r, spriteram_w)
AM_RANGE(0xd000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("devram") // shared with protection device
@@ -343,11 +343,11 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, airbustr_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank2")
- AM_RANGE(0xc000, 0xc3ff) AM_RAM_WRITE(airbustr_videoram2_w) AM_SHARE("videoram2")
- AM_RANGE(0xc400, 0xc7ff) AM_RAM_WRITE(airbustr_colorram2_w) AM_SHARE("colorram2")
- AM_RANGE(0xc800, 0xcbff) AM_RAM_WRITE(airbustr_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0xcc00, 0xcfff) AM_RAM_WRITE(airbustr_colorram_w) AM_SHARE("colorram")
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("slavebank")
+ AM_RANGE(0xc000, 0xc3ff) AM_RAM_WRITE(videoram2_w) AM_SHARE("videoram2")
+ AM_RANGE(0xc400, 0xc7ff) AM_RAM_WRITE(colorram2_w) AM_SHARE("colorram2")
+ AM_RANGE(0xc800, 0xcbff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
+ AM_RANGE(0xcc00, 0xcfff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
AM_RANGE(0xd000, 0xd5ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0xd600, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xefff) AM_RAM
@@ -358,18 +358,18 @@ static ADDRESS_MAP_START( slave_io_map, AS_IO, 8, airbustr_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_WRITE(slave_bankswitch_w)
AM_RANGE(0x02, 0x02) AM_READWRITE(soundcommand2_r, soundcommand_w)
- AM_RANGE(0x04, 0x0c) AM_WRITE(airbustr_scrollregs_w)
+ AM_RANGE(0x04, 0x0c) AM_WRITE(scrollregs_w)
AM_RANGE(0x0e, 0x0e) AM_READ(soundcommand_status_r)
AM_RANGE(0x20, 0x20) AM_READ_PORT("P1")
AM_RANGE(0x22, 0x22) AM_READ_PORT("P2")
AM_RANGE(0x24, 0x24) AM_READ_PORT("SYSTEM")
- AM_RANGE(0x28, 0x28) AM_WRITE(airbustr_coin_counter_w)
+ AM_RANGE(0x28, 0x28) AM_WRITE(coin_counter_w)
AM_RANGE(0x38, 0x38) AM_WRITENOP // irq ack / irq mask
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, airbustr_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank3")
+ AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("audiobank")
AM_RANGE(0xc000, 0xdfff) AM_RAM
ADDRESS_MAP_END
@@ -541,16 +541,9 @@ INTERRUPT_GEN_MEMBER(airbustr_state::slave_interrupt)
void airbustr_state::machine_start()
{
- UINT8 *MASTER = memregion("master")->base();
- UINT8 *SLAVE = memregion("slave")->base();
- UINT8 *AUDIO = memregion("audiocpu")->base();
-
- membank("bank1")->configure_entries(0, 3, &MASTER[0x00000], 0x4000);
- membank("bank1")->configure_entries(3, 5, &MASTER[0x10000], 0x4000);
- membank("bank2")->configure_entries(0, 3, &SLAVE[0x00000], 0x4000);
- membank("bank2")->configure_entries(3, 5, &SLAVE[0x10000], 0x4000);
- membank("bank3")->configure_entries(0, 3, &AUDIO[0x00000], 0x4000);
- membank("bank3")->configure_entries(3, 5, &AUDIO[0x10000], 0x4000);
+ membank("masterbank")->configure_entries(0, 8, memregion("master")->base(), 0x4000);
+ membank("slavebank")->configure_entries(0, 8, memregion("slave")->base(), 0x4000);
+ membank("audiobank")->configure_entries(0, 8, memregion("audiocpu")->base(), 0x4000);
save_item(NAME(m_soundlatch_status));
save_item(NAME(m_soundlatch2_status));
@@ -569,10 +562,6 @@ void airbustr_state::machine_reset()
m_fg_scrollx = 0;
m_fg_scrolly = 0;
m_highbits = 0;
-
- membank("bank1")->set_entry(0x02);
- membank("bank2")->set_entry(0x02);
- membank("bank3")->set_entry(0x02);
}
/* Machine Driver */
@@ -607,8 +596,8 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(airbustr_state, screen_update_airbustr)
- MCFG_SCREEN_VBLANK_DRIVER(airbustr_state, screen_eof_airbustr)
+ MCFG_SCREEN_UPDATE_DRIVER(airbustr_state, screen_update)
+ MCFG_SCREEN_VBLANK_DRIVER(airbustr_state, screen_eof)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", airbustr)
@@ -646,17 +635,14 @@ MACHINE_CONFIG_END
/* ROMs */
ROM_START( airbustr )
- ROM_REGION( 0x24000, "master", 0 )
- ROM_LOAD( "pr12.h19", 0x00000, 0x0c000, CRC(91362eb2) SHA1(cd85acfa6542af68dd1cad46f9426a95cfc9432e) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "master", 0 )
+ ROM_LOAD( "pr12.h19", 0x00000, 0x20000, CRC(91362eb2) SHA1(cd85acfa6542af68dd1cad46f9426a95cfc9432e) )
- ROM_REGION( 0x24000, "slave", 0 )
- ROM_LOAD( "pr13.l15", 0x00000, 0x0c000, CRC(13b2257b) SHA1(325efa54e757a1f08caf81801930d61ea4e7b6d4) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "slave", 0 )
+ ROM_LOAD( "pr13.l15", 0x00000, 0x20000, CRC(13b2257b) SHA1(325efa54e757a1f08caf81801930d61ea4e7b6d4) )
- ROM_REGION( 0x24000, "audiocpu", 0 )
- ROM_LOAD( "pr-21.bin", 0x00000, 0x0c000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "audiocpu", 0 )
+ ROM_LOAD( "pr-21.bin", 0x00000, 0x20000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
ROM_REGION( 0x1000, "mcu", 0 ) //MCU is a 80c51 like DJ Boy / Heavy Unit?
ROM_LOAD( "i80c51", 0x0000, 0x1000, NO_DUMP )
@@ -673,17 +659,14 @@ ROM_START( airbustr )
ROM_END
ROM_START( airbustrj )
- ROM_REGION( 0x24000, "master", 0 )
- ROM_LOAD( "pr-14j.bin", 0x00000, 0x0c000, CRC(6b9805bd) SHA1(db6df33cf17316a4b81d7731dca9fe8bbf81f014) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "master", 0 )
+ ROM_LOAD( "pr-14j.bin", 0x00000, 0x20000, CRC(6b9805bd) SHA1(db6df33cf17316a4b81d7731dca9fe8bbf81f014) )
- ROM_REGION( 0x24000, "slave", 0 )
- ROM_LOAD( "pr-11j.bin", 0x00000, 0x0c000, CRC(85464124) SHA1(8cce8dfdede48032c40d5f155fd58061866668de) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "slave", 0 )
+ ROM_LOAD( "pr-11j.bin", 0x00000, 0x20000, CRC(85464124) SHA1(8cce8dfdede48032c40d5f155fd58061866668de) )
- ROM_REGION( 0x24000, "audiocpu", 0 )
- ROM_LOAD( "pr-21.bin", 0x00000, 0x0c000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "audiocpu", 0 )
+ ROM_LOAD( "pr-21.bin", 0x00000, 0x20000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
ROM_REGION( 0x1000, "mcu", 0 ) //MCU is a 80c51 like DJ Boy / Heavy Unit?
ROM_LOAD( "i80c51", 0x0000, 0x1000, NO_DUMP )
@@ -713,17 +696,14 @@ Rom 5 is on a piggyback daughterboard with a z80 and a PAL
*/
ROM_START( airbustrb )
- ROM_REGION( 0x24000, "master", 0 )
- ROM_LOAD( "5.bin", 0x00000, 0x0c000, CRC(9e4216a2) SHA1(46572da4df5a67b10cc3ee21bdc0ec4bcecaaf93) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "master", 0 )
+ ROM_LOAD( "5.bin", 0x00000, 0x20000, CRC(9e4216a2) SHA1(46572da4df5a67b10cc3ee21bdc0ec4bcecaaf93) )
- ROM_REGION( 0x24000, "slave", 0 )
- ROM_LOAD( "1.bin", 0x00000, 0x0c000, CRC(85464124) SHA1(8cce8dfdede48032c40d5f155fd58061866668de) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "slave", 0 )
+ ROM_LOAD( "1.bin", 0x00000, 0x20000, CRC(85464124) SHA1(8cce8dfdede48032c40d5f155fd58061866668de) )
- ROM_REGION( 0x24000, "audiocpu", 0 )
- ROM_LOAD( "2.bin", 0x00000, 0x0c000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
- ROM_CONTINUE( 0x10000, 0x14000 )
+ ROM_REGION( 0x20000, "audiocpu", 0 )
+ ROM_LOAD( "2.bin", 0x00000, 0x20000, CRC(6e0a5df0) SHA1(616b7c7aaf52a9a55b63c60717c1866940635cd4) )
ROM_REGION( 0x80000, "gfx1", 0 )
/* Same content as airbusj, pr-001.bin, different sized roms / interleave */
diff --git a/src/mame/drivers/ajax.cpp b/src/mame/drivers/ajax.cpp
index 1e7b55127fa..64990f48aba 100644
--- a/src/mame/drivers/ajax.cpp
+++ b/src/mame/drivers/ajax.cpp
@@ -21,25 +21,25 @@
#include "includes/konamipt.h"
static ADDRESS_MAP_START( ajax_main_map, AS_PROGRAM, 8, ajax_state )
- AM_RANGE(0x0000, 0x01c0) AM_READWRITE(ajax_ls138_f10_r, ajax_ls138_f10_w) /* bankswitch + sound command + FIRQ command */
+ AM_RANGE(0x0000, 0x01c0) AM_READWRITE(ls138_f10_r, ls138_f10_w) /* bankswitch + sound command + FIRQ command */
AM_RANGE(0x0800, 0x0807) AM_DEVREADWRITE("k051960", k051960_device, k051937_r, k051937_w) /* sprite control registers */
AM_RANGE(0x0c00, 0x0fff) AM_DEVREADWRITE("k051960", k051960_device, k051960_r, k051960_w) /* sprite RAM 2128SL at J7 */
AM_RANGE(0x1000, 0x1fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")/* palette */
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("share1") /* shared RAM with the 6809 */
AM_RANGE(0x4000, 0x5fff) AM_RAM /* RAM 6264L at K10 */
- AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank2") /* banked ROM */
- AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM N11 */
+ AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("mainbank") /* banked ROM */
+ AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM N11 */
ADDRESS_MAP_END
static ADDRESS_MAP_START( ajax_sub_map, AS_PROGRAM, 8, ajax_state )
AM_RANGE(0x0000, 0x07ff) AM_DEVREADWRITE("k051316", k051316_device, read, write) /* 051316 zoom/rotation layer */
AM_RANGE(0x0800, 0x080f) AM_DEVWRITE("k051316", k051316_device, ctrl_w) /* 051316 control registers */
AM_RANGE(0x1000, 0x17ff) AM_DEVREAD("k051316", k051316_device, rom_r) /* 051316 (ROM test) */
- AM_RANGE(0x1800, 0x1800) AM_WRITE(ajax_bankswitch_2_w) /* bankswitch control */
+ AM_RANGE(0x1800, 0x1800) AM_WRITE(bankswitch_2_w) /* bankswitch control */
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("share1") /* shared RAM with the 052001 */
AM_RANGE(0x4000, 0x7fff) AM_DEVREADWRITE("k052109", k052109_device, read, write) /* video RAM + color RAM + video registers */
- AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank1") /* banked ROM */
- AM_RANGE(0xa000, 0xffff) AM_ROM /* ROM I16 */
+ AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("subbank") /* banked ROM */
+ AM_RANGE(0xa000, 0xffff) AM_ROM AM_REGION ("sub", 0x12000) /* ROM I16 */
ADDRESS_MAP_END
static ADDRESS_MAP_START( ajax_sound_map, AS_PROGRAM, 8, ajax_state )
@@ -185,7 +185,7 @@ static MACHINE_CONFIG_START( ajax, ajax_state )
MCFG_SCREEN_RAW_PARAMS(XTAL_24MHz/3, 528, 112, 400, 256, 16, 240)
// 6MHz dotclock is more realistic, however needs drawing updates. replace when ready
// MCFG_SCREEN_RAW_PARAMS(XTAL_24MHz/4, 396, hbend, hbstart, 256, 16, 240)
- MCFG_SCREEN_UPDATE_DRIVER(ajax_state, screen_update_ajax)
+ MCFG_SCREEN_UPDATE_DRIVER(ajax_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 2048)
@@ -242,15 +242,13 @@ MACHINE_CONFIG_END
*/
ROM_START( ajax )
- ROM_REGION( 0x28000, "maincpu", 0 ) /* 052001 code */
- ROM_LOAD( "770_m01.n11", 0x10000, 0x08000, CRC(4a64e53a) SHA1(acd249bfcb5f248c41b3e40c7c1bce1b8c645d3a) ) /* banked ROM */
- ROM_CONTINUE( 0x08000, 0x08000 ) /* fixed ROM */
- ROM_LOAD( "770_l02.n12", 0x18000, 0x10000, CRC(ad7d592b) SHA1(c75d9696b16de231c479379dd02d33fe54021d88) ) /* banked ROM */
+ ROM_REGION( 0x20000, "maincpu", 0 ) /* 052001 code */
+ ROM_LOAD( "770_m01.n11", 0x00000, 0x10000, CRC(4a64e53a) SHA1(acd249bfcb5f248c41b3e40c7c1bce1b8c645d3a) ) /* last 0x8000 fixed, first 0x8000 banked */
+ ROM_LOAD( "770_l02.n12", 0x10000, 0x10000, CRC(ad7d592b) SHA1(c75d9696b16de231c479379dd02d33fe54021d88) ) /* banked ROM */
- ROM_REGION( 0x22000, "sub", 0 ) /* 64k + 72k for banked ROMs */
- ROM_LOAD( "770_l05.i16", 0x20000, 0x02000, CRC(ed64fbb2) SHA1(429046edaf1299afa7fb9c385b4ef0c244ec2409) ) /* banked ROM */
- ROM_CONTINUE( 0x0a000, 0x06000 ) /* fixed ROM */
- ROM_LOAD( "770_f04.g16", 0x10000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_REGION( 0x18000, "sub", 0 ) /* 96k */
+ ROM_LOAD( "770_f04.g16", 0x00000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_LOAD( "770_l05.i16", 0x10000, 0x08000, CRC(ed64fbb2) SHA1(429046edaf1299afa7fb9c385b4ef0c244ec2409) ) /* last 0x6000 fixed, first 0x2000 banked */
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "770_h03.f16", 0x00000, 0x08000, CRC(2ffd2afc) SHA1(ca2ef684f87bcf9b70b3ec66ec80685edaf04b9b) )
@@ -308,15 +306,13 @@ ROM_START( ajax )
ROM_END
ROM_START( typhoon )
- ROM_REGION( 0x28000, "maincpu", 0 ) /* 052001 code */
- ROM_LOAD( "770_k01.n11", 0x10000, 0x08000, CRC(5ba74a22) SHA1(897d3309f2efb3bfa56e86581ee4a492e656788c) ) /* banked ROM */
- ROM_CONTINUE( 0x08000, 0x08000 ) /* fixed ROM */
- ROM_LOAD( "770_k02.n12", 0x18000, 0x10000, CRC(3bcf782a) SHA1(4b6127bced0b2519f8ad30587f32588a16368071) ) /* banked ROM */
+ ROM_REGION( 0x20000, "maincpu", 0 ) /* 052001 code */
+ ROM_LOAD( "770_k01.n11", 0x00000, 0x10000, CRC(5ba74a22) SHA1(897d3309f2efb3bfa56e86581ee4a492e656788c) ) /* last 0x8000 fixed, first 0x8000 banked */
+ ROM_LOAD( "770_k02.n12", 0x10000, 0x10000, CRC(3bcf782a) SHA1(4b6127bced0b2519f8ad30587f32588a16368071) ) /* banked ROM */
- ROM_REGION( 0x22000, "sub", 0 ) /* 64k + 72k for banked ROMs */
- ROM_LOAD( "770_k05.i16", 0x20000, 0x02000, CRC(0f1bebbb) SHA1(012a8867ee0febaaadd7bcbc91e462bda5d3a411) ) /* banked ROM */
- ROM_CONTINUE( 0x0a000, 0x06000 ) /* fixed ROM */
- ROM_LOAD( "770_f04.g16", 0x10000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_REGION( 0x18000, "sub", 0 ) /* 96k */
+ ROM_LOAD( "770_f04.g16", 0x00000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_LOAD( "770_k05.i16", 0x10000, 0x08000, CRC(0f1bebbb) SHA1(012a8867ee0febaaadd7bcbc91e462bda5d3a411) ) /* last 0x6000 fixed, first 0x2000 banked */
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "770_h03.f16", 0x00000, 0x08000, CRC(2ffd2afc) SHA1(ca2ef684f87bcf9b70b3ec66ec80685edaf04b9b) )
@@ -344,15 +340,13 @@ ROM_START( typhoon )
ROM_END
ROM_START( ajaxj )
- ROM_REGION( 0x28000, "maincpu", 0 ) /* 052001 code */
- ROM_LOAD( "770_l01.n11", 0x10000, 0x08000, CRC(7cea5274) SHA1(8e3b2b11a8189e3a1703b3b4b453fbb386f5537f) ) /* banked ROM */
- ROM_CONTINUE( 0x08000, 0x08000 ) /* fixed ROM */
- ROM_LOAD( "770_l02.n12", 0x18000, 0x10000, CRC(ad7d592b) SHA1(c75d9696b16de231c479379dd02d33fe54021d88) ) /* banked ROM */
-
- ROM_REGION( 0x22000, "sub", 0 ) /* 64k + 72k for banked ROMs */
- ROM_LOAD( "770_l05.i16", 0x20000, 0x02000, CRC(ed64fbb2) SHA1(429046edaf1299afa7fb9c385b4ef0c244ec2409) ) /* banked ROM */
- ROM_CONTINUE( 0x0a000, 0x06000 ) /* fixed ROM */
- ROM_LOAD( "770_f04.g16", 0x10000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_REGION( 0x20000, "maincpu", 0 ) /* 052001 code */
+ ROM_LOAD( "770_l01.n11", 0x00000, 0x10000, CRC(7cea5274) SHA1(8e3b2b11a8189e3a1703b3b4b453fbb386f5537f) ) /* last 0x8000 fixed, first 0x8000 banked */
+ ROM_LOAD( "770_l02.n12", 0x10000, 0x10000, CRC(ad7d592b) SHA1(c75d9696b16de231c479379dd02d33fe54021d88) ) /* banked ROM */
+
+ ROM_REGION( 0x18000, "sub", 0 ) /* 96k */
+ ROM_LOAD( "770_f04.g16", 0x00000, 0x10000, CRC(e0e4ec9c) SHA1(15ae09c3ad67ec626d8178ec1417f0c57ca4eca4) ) /* banked ROM */
+ ROM_LOAD( "770_l05.i16", 0x10000, 0x8000, CRC(ed64fbb2) SHA1(429046edaf1299afa7fb9c385b4ef0c244ec2409) ) /* last 0x6000 fixed, first 0x2000 banked */
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the SOUND CPU */
ROM_LOAD( "770_f03.f16", 0x00000, 0x08000, CRC(3fe914fd) SHA1(c691920402bd859e2bf765084704a8bfad302cfa) )
diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp
index d56f89e5e24..acbdb0b39c0 100644
--- a/src/mame/drivers/apexc.cpp
+++ b/src/mame/drivers/apexc.cpp
@@ -84,9 +84,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 1; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "apc"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -213,9 +211,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
protected:
// device-level overrides
virtual void device_config_complete() override { update_names(); }
@@ -247,9 +243,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
protected:
// device-level overrides
virtual void device_config_complete() override { update_names(); }
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 29fc76670c7..78775951801 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -711,7 +711,11 @@ READ8_MEMBER(napple2_state::c800_r)
{
if (offset == 0x7ff)
{
- m_cnxx_slot = -1;
+ if (!space.debugger_access())
+ {
+ m_cnxx_slot = -1;
+ }
+
return 0xff;
}
@@ -727,7 +731,11 @@ WRITE8_MEMBER(napple2_state::c800_w)
{
if (offset == 0x7ff)
{
- m_cnxx_slot = -1;
+ if (!space.debugger_access())
+ {
+ m_cnxx_slot = -1;
+ }
+
return;
}
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index f9d8f382cce..4df687fe202 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -1985,8 +1985,12 @@ READ8_MEMBER(apple2e_state::c800_r)
if (offset == 0x7ff)
{
- m_cnxx_slot = CNXX_UNCLAIMED;
- update_slotrom_banks();
+ if (!space.debugger_access())
+ {
+ m_cnxx_slot = CNXX_UNCLAIMED;
+ update_slotrom_banks();
+ }
+
return 0xff;
}
@@ -2005,7 +2009,7 @@ READ8_MEMBER(apple2e_state::c800_int_r)
return m_iicplus_ce00[offset-0x600];
}
- if (offset == 0x7ff)
+ if ((offset == 0x7ff) && !space.debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
@@ -2021,7 +2025,7 @@ READ8_MEMBER(apple2e_state::c800_b2_int_r)
return m_iicplus_ce00[offset-0x600];
}
- if (offset == 0x7ff)
+ if ((offset == 0x7ff) && !space.debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
@@ -2040,8 +2044,12 @@ WRITE8_MEMBER(apple2e_state::c800_w)
if (offset == 0x7ff)
{
- m_cnxx_slot = CNXX_UNCLAIMED;
- update_slotrom_banks();
+ if (!space.debugger_access())
+ {
+ m_cnxx_slot = CNXX_UNCLAIMED;
+ update_slotrom_banks();
+ }
+
return;
}
diff --git a/src/mame/drivers/asuka.cpp b/src/mame/drivers/asuka.cpp
index dcf86e81ce7..9b1db784a9a 100644
--- a/src/mame/drivers/asuka.cpp
+++ b/src/mame/drivers/asuka.cpp
@@ -248,7 +248,7 @@ void asuka_state::device_timer(emu_timer &timer, device_timer_id id, int param,
INTERRUPT_GEN_MEMBER(asuka_state::cadash_interrupt)
{
- timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), TIMER_CADASH_INTERRUPT5);
+ timer_set(m_maincpu->cycles_to_attotime(500), TIMER_CADASH_INTERRUPT5);
device.execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */
}
@@ -259,12 +259,12 @@ INTERRUPT_GEN_MEMBER(asuka_state::cadash_interrupt)
WRITE8_MEMBER(asuka_state::sound_bankswitch_w)
{
- membank("bank1")->set_entry(data & 0x03);
+ membank("audiobank")->set_entry(data & 0x03);
}
WRITE8_MEMBER(asuka_state::sound_bankswitch_2151_w)
{
- membank("bank1")->set_entry(data & 0x03);
+ membank("audiobank")->set_entry(data & 0x03);
}
@@ -384,7 +384,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( bonzeadv_z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
+ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("audiobank")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write)
AM_RANGE(0xe200, 0xe200) AM_DEVWRITE("tc0140syt", tc0140syt_device, slave_port_w)
@@ -398,7 +398,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
+ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("audiobank")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
// AM_RANGE(0x9002, 0x9100) AM_READNOP
@@ -412,7 +412,7 @@ ADDRESS_MAP_END
/* no MSM5205 */
static ADDRESS_MAP_START( cadash_z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
+ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("audiobank")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, slave_port_w)
@@ -775,8 +775,7 @@ GFXDECODE_END
void asuka_state::machine_start()
{
/* configure the banks */
- membank("bank1")->configure_entry(0, memregion("audiocpu")->base());
- membank("bank1")->configure_entries(1, 3, memregion("audiocpu")->base() + 0x10000, 0x04000);
+ membank("audiobank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x04000);
save_item(NAME(m_adpcm_pos));
save_item(NAME(m_adpcm_data));
@@ -1214,9 +1213,8 @@ ROM_START( bonzeadv )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "b41-02.7", 0x00000, 0x80000, CRC(29f205d9) SHA1(9e9f0c2755a9aa5acfe2601911bfa07d8d61164c) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b41-13.20", 0x00000, 0x04000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
/* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
@@ -1239,9 +1237,8 @@ ROM_START( bonzeadvo )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "b41-02.7", 0x00000, 0x80000, CRC(29f205d9) SHA1(9e9f0c2755a9aa5acfe2601911bfa07d8d61164c) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b41-13.20", 0x00000, 0x04000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
/* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
@@ -1264,9 +1261,8 @@ ROM_START( bonzeadvu )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "b41-02.7", 0x00000, 0x80000, CRC(29f205d9) SHA1(9e9f0c2755a9aa5acfe2601911bfa07d8d61164c) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b41-13.20", 0x00000, 0x04000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
/* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
@@ -1289,9 +1285,8 @@ ROM_START( jigkmgri )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "b41-02.7", 0x00000, 0x80000, CRC(29f205d9) SHA1(9e9f0c2755a9aa5acfe2601911bfa07d8d61164c) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b41-13.20", 0x00000, 0x04000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) /* banked */
/* CPU3 - CCHIP aka TC0030CMD marked b41-05.43 */
@@ -1323,9 +1318,8 @@ ROM_START( bonzeadvp ) /* Labels consists of hand written checksum values of the
ROM_LOAD16_BYTE( "03eb.ic16", 0x40000, 0x20000, CRC(39f32715) SHA1(5c555fde1ae0bb1e796e0122157bc694392122f3) ) // ^
ROM_LOAD16_BYTE( "b8e1.ic22", 0x40001, 0x20000, CRC(15b836cf) SHA1(0f7e5cb6a57c336125909e28af664fe7387947d4) ) // ^
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b41-13.20", 0x00000, 0x04000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) // missing from dump
- ROM_CONTINUE( 0x10000, 0x0c000) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b41-13.20", 0x00000, 0x10000, CRC(9e464254) SHA1(b6f6126b54c15320ecaa652d0eeabaa4cd94bd26) ) // missing from dump /* banked */
/* is the C-Chip the same as the final? */
@@ -1351,9 +1345,8 @@ ROM_START( asuka )
ROM_LOAD16_BYTE( "b68-07.ic5", 0x80000, 0x10000, CRC(c113acc8) SHA1(613c61a78df73dcb0b9c9018ae829e865baac772) )
ROM_LOAD16_BYTE( "b68-06.ic4", 0x80001, 0x10000, CRC(f517e64d) SHA1(8be491bfe0f7eed58521de9d31da677acf635c23) )
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b68-11.ic27", 0x00000, 0x04000, CRC(c378b508) SHA1(1b145fe736b924f298e02532cf9f26cc18b42ca7) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b68-11.ic27", 0x00000, 0x10000, CRC(c378b508) SHA1(1b145fe736b924f298e02532cf9f26cc18b42ca7) ) /* banked */
ROM_REGION( 0x10000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b68-10.ic24", 0x00000, 0x10000, CRC(387aaf40) SHA1(47c583564ef1d49ece15f97221b2e073e8fb0544) )
@@ -1378,9 +1371,8 @@ ROM_START( asukaj ) /* Known to exist but not dumped: revision 1 with B68 08-1 &
ROM_LOAD16_BYTE( "b68-07.ic5", 0x80000, 0x10000, CRC(c113acc8) SHA1(613c61a78df73dcb0b9c9018ae829e865baac772) )
ROM_LOAD16_BYTE( "b68-06.ic4", 0x80001, 0x10000, CRC(f517e64d) SHA1(8be491bfe0f7eed58521de9d31da677acf635c23) )
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "b68-11.ic27", 0x00000, 0x04000, CRC(c378b508) SHA1(1b145fe736b924f298e02532cf9f26cc18b42ca7) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b68-11.ic27", 0x00000, 0x10000, CRC(c378b508) SHA1(1b145fe736b924f298e02532cf9f26cc18b42ca7) ) /* banked */
ROM_REGION( 0x10000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "b68-10.ic24", 0x00000, 0x10000, CRC(387aaf40) SHA1(47c583564ef1d49ece15f97221b2e073e8fb0544) )
@@ -1405,9 +1397,8 @@ ROM_START( mofflott )
ROM_LOAD16_BYTE( "c17-05.bin", 0x80000, 0x10000, CRC(57ac4741) SHA1(3188ff0866324c68fba8e9745a0cb186784cb53d) )
ROM_LOAD16_BYTE( "c17-04.bin", 0x80001, 0x10000, CRC(f4250410) SHA1(1f5f6baca4aa695ce2ae5c65adcb460da872a239) )
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c17-07.bin", 0x00000, 0x04000, CRC(cdb7bc2c) SHA1(5113055c954a39918436db75cc06b53c29c60728) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c17-07.bin", 0x00000, 0x10000, CRC(cdb7bc2c) SHA1(5113055c954a39918436db75cc06b53c29c60728) ) /* banked */
ROM_REGION( 0x10000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "c17-06.bin", 0x00000, 0x10000, CRC(5c332125) SHA1(408f42df18b38347c8a4e177a9484162a66877e1) )
@@ -1426,9 +1417,8 @@ ROM_START( cadash )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", 0 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1457,9 +1447,8 @@ ROM_START( cadashp )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x0800, "plds", 0 )
ROM_LOAD( "pal16l8b-c21-09.ic34", 0x0000, 0x0104, CRC(4b296700) SHA1(79d6c8fb13e30795d9c1f49885ada658f9722b68) )
@@ -1481,9 +1470,8 @@ ROM_START( cadashj )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", ROMREGION_ERASE00 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1508,9 +1496,8 @@ ROM_START( cadashj1 )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", ROMREGION_ERASE00 ) /* HD64180RP8 code (link) */ // the board this set was from did not have the link section populated
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1535,9 +1522,8 @@ ROM_START( cadashjo )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", ROMREGION_ERASE00 ) /* HD64180RP8 code (link) */ // the board this set was from did not have the link section populated
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1562,9 +1548,8 @@ ROM_START( cadashu )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", 0 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1589,9 +1574,8 @@ ROM_START( cadashi )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", 0 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1616,9 +1600,8 @@ ROM_START( cadashf )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", 0 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1643,9 +1626,8 @@ ROM_START( cadashg )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "c21-01.1", 0x00000, 0x80000, CRC(1ff6f39c) SHA1(742f296efc8073fafa73da2c8d7d26ca9514b6bf) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "c21-08.38", 0x00000, 0x04000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "c21-08.38", 0x00000, 0x10000, CRC(dca495a0) SHA1(4e0f401f1b967da75f33fd7294860ad0b4bf2dce) ) /* banked */
ROM_REGION( 0x08000, "subcpu", 0 ) /* HD64180RP8 code (link) */
ROM_LOAD( "c21-07.57", 0x00000, 0x08000, CRC(f02292bd) SHA1(0a5c06a048ad67f90e0d766b504582e9eef035f7) )
@@ -1670,9 +1652,8 @@ ROM_START( galmedes )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "gm-obj.ic6", 0x00000, 0x80000, CRC(7a4a1315) SHA1(e2010ee4222415fd55ba3102003be4151d29e39b) ) /* Sprites (16 x 16) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "gm-snd.ic27", 0x00000, 0x04000, CRC(d6f56c21) SHA1(ff9743448ac8ce57a2f8c33a26145e7b92cbe3c3) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "gm-snd.ic27", 0x00000, 0x10000, CRC(d6f56c21) SHA1(ff9743448ac8ce57a2f8c33a26145e7b92cbe3c3) ) /* banked */
ROM_REGION( 0x144, "pals", 0 )
ROM_LOAD( "b68-04.ic32", 0x00000, 0x144, CRC(9be618d1) SHA1(61ee33c3db448a05ff8f455e77fe17d51106baec) )
@@ -1694,9 +1675,8 @@ ROM_START( earthjkr )
ROM_LOAD16_BYTE( "ej_1.ic5", 0x80000, 0x10000, CRC(cb4891db) SHA1(af1112608cdd897ef6028ef617f5ca69d7964861) )
ROM_LOAD16_BYTE( "ej_0.ic4", 0x80001, 0x10000, CRC(b612086f) SHA1(625748fcb698ec57b7b3ce46019cf85de99aaaa1) )
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "ej_2.ic27", 0x00000, 0x04000, CRC(42ba2566) SHA1(c437388684b565c7504d6bad6accd73aa000faca) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "ej_2.ic27", 0x00000, 0x10000, CRC(42ba2566) SHA1(c437388684b565c7504d6bad6accd73aa000faca) ) /* banked */
ROM_REGION( 0x144, "pals", 0 )
ROM_LOAD( "b68-04.ic32", 0x00000, 0x144, CRC(9be618d1) SHA1(61ee33c3db448a05ff8f455e77fe17d51106baec) )
@@ -1718,9 +1698,8 @@ ROM_START( earthjkrp ) // was production PCB complete with MASK rom, could just
ROM_LOAD16_BYTE( "ej_1.ic5", 0x80000, 0x10000, CRC(cb4891db) SHA1(af1112608cdd897ef6028ef617f5ca69d7964861) )
ROM_LOAD16_BYTE( "ej_0.ic4", 0x80001, 0x10000, CRC(b612086f) SHA1(625748fcb698ec57b7b3ce46019cf85de99aaaa1) )
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "ej_2.ic27", 0x00000, 0x04000, CRC(42ba2566) SHA1(c437388684b565c7504d6bad6accd73aa000faca) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "ej_2.ic27", 0x00000, 0x10000, CRC(42ba2566) SHA1(c437388684b565c7504d6bad6accd73aa000faca) ) /* banked */
ROM_REGION( 0x144, "pals", 0 )
ROM_LOAD( "b68-04.ic32", 0x00000, 0x144, CRC(9be618d1) SHA1(61ee33c3db448a05ff8f455e77fe17d51106baec) )
@@ -1740,9 +1719,8 @@ ROM_START( eto )
ROM_REGION( 0x80000, "gfx2", 0 )
ROM_LOAD( "eto-3.ic6", 0x00000, 0x80000, CRC(dd247397) SHA1(53a7bf877fd7e5f3daf295a698f4012447b6f113) ) /* SCR tiles (8 x 8) */
- ROM_REGION( 0x1c000, "audiocpu", 0 ) /* sound cpu */
- ROM_LOAD( "eto-5.ic27", 0x00000, 0x04000, CRC(b3689da0) SHA1(812d2e0a794403df9f0a5035784f14cd070ea080) )
- ROM_CONTINUE( 0x10000, 0x0c000 ) /* banked stuff */
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "eto-5.ic27", 0x00000, 0x10000, CRC(b3689da0) SHA1(812d2e0a794403df9f0a5035784f14cd070ea080) ) /* banked */
ROM_END
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index a02ac8ca796..10c14b95ad8 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -423,6 +423,7 @@ void jvs_master::send_packet(int destination, int length, UINT8 *data)
{
push((UINT8)destination);
push((UINT8)length);
+ length--;
while (length > 0)
{
push(*data);
@@ -979,9 +980,9 @@ int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffe
memcpy(endpoints[4].position, buffer, size);
endpoints[4].position = endpoints[4].position + size;
endpoints[4].remain = endpoints[4].remain - size;
- printf("\n\r");
if (endpoints[4].remain == 0)
{
+ printf("\n\r");
// extract packets
int numpk = jvs.buffer_in[1];
int p = 2;
@@ -996,7 +997,7 @@ int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffe
p++;
int len = jvs.buffer_in[p];
p++;
- if ((p + len) >= jvs.buffer_in_expected)
+ if ((p + len) > jvs.buffer_in_expected)
break;
int chk = dest + len;
for (int m = len - 1; m > 0; m--)
@@ -1014,18 +1015,22 @@ int ohci_hlean2131qc_device::handle_bulk_pid(int endpoint, int pid, UINT8 *buffe
// update buffer_out
if (recv > 0)
{
+ chk = 0;
+ for (int m = 0; m < recv; m++)
+ chk = chk + jvs.buffer_out[jvs.buffer_out_used + 5 + m];
+ jvs.buffer_out[jvs.buffer_out_used + 5 + recv] = chk & 255;
jvs.buffer_out_packets++;
// jvs node address
jvs.buffer_out[jvs.buffer_out_used] = jvs.buffer_out[jvs.buffer_out_used + 5];
// dummy
jvs.buffer_out[jvs.buffer_out_used + 1] = 0;
// length following
- recv++;
+ recv += 2;
jvs.buffer_out[jvs.buffer_out_used + 2] = recv & 255;
jvs.buffer_out[jvs.buffer_out_used + 3] = (recv >> 8) & 255;
// body
- jvs.buffer_out[jvs.buffer_out_used + 4] = 0xa0;
- jvs.buffer_out_used = jvs.buffer_out_used + recv + 5;
+ jvs.buffer_out[jvs.buffer_out_used + 4] = 0xe0;
+ jvs.buffer_out_used = jvs.buffer_out_used + recv + 5 - 1;
jvs.buffer_out[1] = (UINT8)jvs.buffer_out_packets;
}
p = p + len;
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index f95e11765f5..adc86a9e39a 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -8197,54 +8197,42 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // "b"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s"
- PORT_START("DSW1") /* IN11 - DSW1 */
- PORT_DIPNAME( 0x01, 0x01, "Unknown 2-0" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Unknown 2-1" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Unknown 2-4" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Unknown 2-5" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
PORT_START("DSW2") /* IN12 - DSW2 */
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) )
- PORT_DIPSETTING( 0x18, "0" )
- PORT_DIPSETTING( 0x14, "1" )
- PORT_DIPSETTING( 0x10, "2" )
- PORT_DIPSETTING( 0x1c, "3" )
- PORT_DIPSETTING( 0x0c, "4" )
- PORT_DIPSETTING( 0x08, "5" )
- PORT_DIPSETTING( 0x04, "6" )
- PORT_DIPSETTING( 0x00, "7" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) )
+ PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4,5")
+ PORT_DIPSETTING( 0x18, "1" )
+ PORT_DIPSETTING( 0x14, "2" )
+ PORT_DIPSETTING( 0x10, "3" )
+ PORT_DIPSETTING( 0x1c, "4" )
+ PORT_DIPSETTING( 0x0c, "5" )
+ PORT_DIPSETTING( 0x08, "6" )
+ PORT_DIPSETTING( 0x04, "7" )
+ PORT_DIPSETTING( 0x00, "8" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Unknown 1-6" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
+ PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SW1:8")
+/*
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )*/
+
+ PORT_START("DSW1") /* IN11 - DSW1 */
+ PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" )
+ PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW2:2" )
+ PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" )
+ PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )
+ PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
+ PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" )
INPUT_PORTS_END
static INPUT_PORTS_START( hparadis )
diff --git a/src/mame/drivers/epos.cpp b/src/mame/drivers/epos.cpp
index 8d292830ca1..590c05e3a8c 100644
--- a/src/mame/drivers/epos.cpp
+++ b/src/mame/drivers/epos.cpp
@@ -27,6 +27,10 @@
between the two palettes. This effect is not emulated, but since both
halfs of the palette are identical, this is not an issue. See $039c.
The other games have a different color test, not using the busy loop.
+
+ - Find out how Beastie Feastie's 2nd player inputs work.
+
+ - Fix flip screen support for The Dealer and Beastie Feastie.
***************************************************************************/
@@ -81,7 +85,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( io_map, AS_IO, 8, epos_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW") AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(epos_port_1_w)
+ AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(port_1_w)
AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") AM_DEVWRITE("aysnd", ay8910_device, data_w)
AM_RANGE(0x03, 0x03) AM_READ_PORT("UNK")
AM_RANGE(0x06, 0x06) AM_DEVWRITE("aysnd", ay8910_device, address_w)
@@ -93,7 +97,7 @@ static ADDRESS_MAP_START( dealer_io_map, AS_IO, 8, epos_state )
AM_RANGE(0x20, 0x24) AM_WRITE(dealer_decrypt_rom)
AM_RANGE(0x34, 0x34) AM_DEVWRITE("aysnd", ay8910_device, data_w)
AM_RANGE(0x38, 0x38) AM_READ_PORT("DSW")
- AM_RANGE(0x3C, 0x3C) AM_DEVWRITE("aysnd", ay8910_device, address_w)
+ AM_RANGE(0x3c, 0x3c) AM_DEVWRITE("aysnd", ay8910_device, address_w)
AM_RANGE(0x40, 0x40) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
ADDRESS_MAP_END
@@ -349,6 +353,18 @@ static INPUT_PORTS_START( dealer )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
INPUT_PORTS_END
+static INPUT_PORTS_START( beastf )
+ PORT_INCLUDE(dealer)
+
+ PORT_MODIFY("INPUTS")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
+INPUT_PORTS_END
/*************************************
*
@@ -397,7 +413,7 @@ static MACHINE_CONFIG_START( epos, epos_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(272, 241)
MCFG_SCREEN_VISIBLE_AREA(0, 271, 0, 235)
- MCFG_SCREEN_UPDATE_DRIVER(epos_state, screen_update_epos)
+ MCFG_SCREEN_UPDATE_DRIVER(epos_state, screen_update)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -428,12 +444,14 @@ static MACHINE_CONFIG_START( dealer, epos_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
MCFG_SCREEN_SIZE(272, 241)
MCFG_SCREEN_VISIBLE_AREA(0, 271, 0, 235)
- MCFG_SCREEN_UPDATE_DRIVER(epos_state, screen_update_epos)
+ MCFG_SCREEN_UPDATE_DRIVER(epos_state, screen_update)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, 11000000/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ // port a writes?
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(epos_state, flip_screen_w))
MACHINE_CONFIG_END
@@ -597,6 +615,17 @@ ROM_START( revenger )
ROM_LOAD( "82s123.u66", 0x0000, 0x0020, NO_DUMP ) /* missing */
ROM_END
+ROM_START( beastf )
+ ROM_REGION( 0x40000, "maincpu", 0 )
+ ROM_LOAD( "bf-b09084.u1", 0x0000, 0x2000, CRC(820d4019) SHA1(e953aaeeb626776dd86c521066b553d054ae4422) )
+ ROM_LOAD( "bf-b09084.u2", 0x2000, 0x2000, CRC(967405d8) SHA1(dd763be909e6966521b01ee878df9cef865c3b30) )
+ ROM_LOAD( "bf-b09084.u3", 0x4000, 0x2000, CRC(3edb5381) SHA1(14c236045e6df7a475c32222652860689d4f68ce) )
+ ROM_LOAD( "bf-b09084.u4", 0x6000, 0x2000, CRC(c8cd9640) SHA1(72da881b903ead873cc3f4df27646d1ffdd63c1c) )
+
+ ROM_REGION( 0x0020, "proms", 0 )
+ ROM_LOAD( "82s123.u66", 0x0000, 0x0020, CRC(f4f6ddc5) BAD_DUMP SHA1(cab915acbefb5f451f538dd538bf9b3dd14bb1f5) ) // not dumped, taken from suprglob
+ROM_END
+
DRIVER_INIT_MEMBER(epos_state,dealer)
{
UINT8 *rom = memregion("maincpu")->base();
@@ -651,5 +680,6 @@ GAME( 1983, theglob, suprglob, epos, suprglob, driver_device, 0, ROT270
GAME( 1983, theglob2, suprglob, epos, suprglob, driver_device, 0, ROT270, "Epos Corporation", "The Glob (earlier)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, theglob3, suprglob, epos, suprglob, driver_device, 0, ROT270, "Epos Corporation", "The Glob (set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, igmo, 0, epos, igmo, driver_device, 0, ROT270, "Epos Corporation", "IGMO", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, dealer, 0, dealer, dealer, epos_state, dealer, ROT270, "Epos Corporation", "The Dealer", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, revenger, 0, dealer, dealer, epos_state, dealer, ROT270, "Epos Corporation", "Revenger", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, dealer, 0, dealer, dealer, epos_state, dealer, ROT270, "Epos Corporation", "The Dealer", MACHINE_WRONG_COLORS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, revenger, 0, dealer, dealer, epos_state, dealer, ROT270, "Epos Corporation", "Revenger", MACHINE_NOT_WORKING | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1984, beastf, 0, dealer, beastf, epos_state, dealer, ROT270, "Epos Corporation", "Beaste Feastie", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/feversoc.cpp b/src/mame/drivers/feversoc.cpp
index bc0c81f1b6d..b03e46008ae 100644
--- a/src/mame/drivers/feversoc.cpp
+++ b/src/mame/drivers/feversoc.cpp
@@ -10,9 +10,9 @@ driver by Angelo Salese & Nicola Salmoria
TODO:
- Determine what buttons 5-7 actually do
-- Find out where the NVRAM maps to
- Layout including lamps
- Add hopper, etc.
+- Figure out remaining DIPs
============================================================================
@@ -68,6 +68,7 @@ U0564 LH28F800SU OBJ4-1
#include "sound/okim6295.h"
#include "machine/eepromser.h"
#include "machine/rtc4543.h"
+#include "machine/nvram.h"
class feversoc_state : public driver_device
@@ -75,7 +76,9 @@ class feversoc_state : public driver_device
public:
feversoc_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_mainram(*this, "workram"),
+ m_mainram1(*this, "workram1"),
+ m_mainram2(*this, "workram2"),
+ m_nvram(*this, "nvram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
@@ -84,7 +87,9 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
- required_shared_ptr<UINT32> m_mainram;
+ required_shared_ptr<UINT32> m_mainram1;
+ required_shared_ptr<UINT32> m_mainram2;
+ required_shared_ptr<UINT32> m_nvram;
required_shared_ptr<UINT32> m_spriteram;
DECLARE_READ32_MEMBER(in0_r);
DECLARE_WRITE32_MEMBER(output_w);
@@ -183,7 +188,9 @@ WRITE32_MEMBER(feversoc_state::output_w)
static ADDRESS_MAP_START( feversoc_map, AS_PROGRAM, 32, feversoc_state )
AM_RANGE(0x00000000, 0x0003ffff) AM_ROM
- AM_RANGE(0x02000000, 0x0203dfff) AM_RAM AM_SHARE("workram") //work ram
+ AM_RANGE(0x02000000, 0x0202ffff) AM_RAM AM_SHARE("workram1") //work ram
+ AM_RANGE(0x02030000, 0x0203ffff) AM_RAM AM_SHARE("nvram")
+ AM_RANGE(0x02034000, 0x0203dfff) AM_RAM AM_SHARE("workram2") //work ram
AM_RANGE(0x0203e000, 0x0203ffff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x06000000, 0x06000003) AM_WRITE(output_w)
AM_RANGE(0x06000004, 0x06000007) AM_WRITENOP //???
@@ -224,30 +231,18 @@ static INPUT_PORTS_START( feversoc )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_H)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("rtc", rtc4543_device, data_r)
- PORT_DIPNAME( 0x0100, 0x0100, "DIP 1-1" )
+ PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Service_Mode ) ) PORT_DIPLOCATION( "DIP1:1" )
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, "DIP 1-2" )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, "DIP 1-3" )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, "DIP 1-4" )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, "DIP 1-5" )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, "DIP 1-6" )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, "DIP 1-7" )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, "DIP 1-8" )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "DIP1:2" )
+ PORT_DIPNAME( 0x0400, 0x0400, "Backup Memory" ) PORT_DIPLOCATION( "DIP1:3" )
+ PORT_DIPSETTING( 0x0400, "Use" )
+ PORT_DIPSETTING( 0x0000, "Reset" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "DIP1:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "DIP1:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "DIP1:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "DIP1:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "DIP1:8" )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Stop 1 (BTN1)")
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Stop 2 (BTN2)")
@@ -294,6 +289,8 @@ static MACHINE_CONFIG_START( feversoc, feversoc_state )
MCFG_EEPROM_SERIAL_93C56_ADD("eeprom")
MCFG_JRC6355E_ADD("rtc", XTAL_32_768kHz)
+
+ MCFG_NVRAM_ADD_0FILL("nvram")
MACHINE_CONFIG_END
/***************************************************************************
@@ -302,6 +299,8 @@ MACHINE_CONFIG_END
***************************************************************************/
+// Date of build, as displayed in service mode, is Apr 30 2004/22:44:21.
+// Program ROMs also contain leftover strings and tables from a previous build dated Apr 26 2004/20:25:31.
ROM_START( feversoc )
ROM_REGION32_BE( 0x40000, "maincpu", 0 )
ROM_LOAD16_BYTE( "prog0.u0139", 0x00001, 0x20000, CRC(fa699503) SHA1(96a834d4f7d5b764aa51db745afc2cd9a7c9783d) )
@@ -324,7 +323,9 @@ DRIVER_INIT_MEMBER(feversoc_state,feversoc)
m_maincpu->sh2drc_set_options(SH2DRC_FASTEST_OPTIONS);
m_maincpu->sh2drc_add_fastram(0x00000000, 0x0003ffff, 1, rom);
- m_maincpu->sh2drc_add_fastram(0x02000000, 0x0203dfff, 0, &m_mainram[0]);
+ m_maincpu->sh2drc_add_fastram(0x02000000, 0x0202ffff, 0, &m_mainram1[0]);
+ m_maincpu->sh2drc_add_fastram(0x02030000, 0x02033fff, 0, &m_nvram[0]);
+ m_maincpu->sh2drc_add_fastram(0x02034000, 0x0203dfff, 0, &m_mainram2[0]);
m_maincpu->sh2drc_add_fastram(0x0203e000, 0x0203ffff, 0, &m_spriteram[0]);
}
diff --git a/src/mame/drivers/gaiden.cpp b/src/mame/drivers/gaiden.cpp
index d2e52e5fbb4..ca633313c58 100644
--- a/src/mame/drivers/gaiden.cpp
+++ b/src/mame/drivers/gaiden.cpp
@@ -1262,7 +1262,7 @@ ROM_START( mastninj )
ROM_END
-ROM_START( wildfang ) /* Dipswitch selectable title of Wild Fang or Temco Knight */
+ROM_START( wildfang ) /* Dipswitch selectable title of Wild Fang or Tecmo Knight */
ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
ROM_LOAD16_BYTE( "1.3st", 0x00000, 0x20000, CRC(ab876c9b) SHA1(b02c822f107df4c9c4f0024998f225c1ddbbd496) )
ROM_LOAD16_BYTE( "2.5st", 0x00001, 0x20000, CRC(1dc74b3b) SHA1(c99051ebefd6ce666b13ab56c0a10b188f15ec28) )
@@ -1324,7 +1324,7 @@ ROM_START( wildfangs ) /* Wild Fang - No title change option */
ROM_LOAD( "tkni4.bin", 0x0000, 0x20000, CRC(a7a1dbcf) SHA1(2fee1d9745ce2ab54b0b9cbb6ab2e66ba9677245) ) /* samples */
ROM_END
-ROM_START( tknight ) /* Temco Knight - No title change option */
+ROM_START( tknight ) /* Tecmo Knight - No title change option */
ROM_REGION( 0x40000, "maincpu", 0 ) /* 2*128k for 68000 code */
ROM_LOAD16_BYTE( "tkni1.bin", 0x00000, 0x20000, CRC(9121daa8) SHA1(06ba7779602df8fae32e859371d27c0dbb8d3430) )
ROM_LOAD16_BYTE( "tkni2.bin", 0x00001, 0x20000, CRC(6669cd87) SHA1(8888522a3aef76a979ffc80ba457dd49f279abf1) )
diff --git a/src/mame/drivers/galspnbl.cpp b/src/mame/drivers/galspnbl.cpp
index d8d9b190048..31af356a85a 100644
--- a/src/mame/drivers/galspnbl.cpp
+++ b/src/mame/drivers/galspnbl.cpp
@@ -11,7 +11,7 @@ Notes:
- to start a 2 or more players game, press the start button multiple times
- the sprite graphics contain a "(c) Tecmo", and the sprite system is
indeed similar to other Tecmo games like Ninja Gaiden.
-- Clearly based on Temco's Super Pinball Action (see spbactn.c)
+- Clearly based on Tecmo's Super Pinball Action (see spbactn.c)
- There seems to be a bug in Hot Pinball's Demo Sounds. If you start the
game normally you get no demo sounds. However if you select the "Slide
Show" and run all the way through the game will start with demo sounds.
@@ -213,11 +213,11 @@ void galspnbl_state::machine_start()
static MACHINE_CONFIG_START( galspnbl, galspnbl_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* 12 MHz ??? - Use value from Temco's Super Pinball Action - NEEDS VERIFICATION!! */
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* 12 MHz ??? - Use value from Tecmo's Super Pinball Action - NEEDS VERIFICATION!! */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", galspnbl_state, irq3_line_hold)/* also has vector for 6, but it does nothing */
- MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* 4 MHz ??? - Use value from Temco's Super Pinball Action - NEEDS VERIFICATION!! */
+ MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* 4 MHz ??? - Use value from Tecmo's Super Pinball Action - NEEDS VERIFICATION!! */
MCFG_CPU_PROGRAM_MAP(audio_map)
/* NMI is caused by the main CPU */
diff --git a/src/mame/drivers/jonos.cpp b/src/mame/drivers/jonos.cpp
index 8e9458f6e93..9188de5bc70 100644
--- a/src/mame/drivers/jonos.cpp
+++ b/src/mame/drivers/jonos.cpp
@@ -2,18 +2,23 @@
// copyright-holders:Robbbert
/***************************************************************************
- Jonos Escort
+Jonos Escort
- 2013-09-12 Skeleton driver
+2013-09-12 Skeleton driver
- This computer is some sort of portable Z80-based system.
+It seems there were about 6 models of Escort, mostly Z-80A based running
+CP/M. However, this one appears to be an 8085-based terminal.
+
+Haven't found any info.
+
+There are interrupt handlers at 5.5 (0x002c) and 6.5 (0x0034).
+Data presented at 5000 will appear on screen in a dumb-terminal format.
- Haven't found any info.
****************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "cpu/i8085/i8085.h"
class jonos_state : public driver_device
@@ -40,13 +45,11 @@ private:
static ADDRESS_MAP_START(jonos_mem, AS_PROGRAM, 8, jonos_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("roms", 0)
- AM_RANGE(0x1000, 0x17ff) AM_RAM
- AM_RANGE(0x1800, 0x1fff) AM_RAM AM_SHARE("videoram")
- AM_RANGE(0x2000, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( jonos_io, AS_IO, 8, jonos_state)
- ADDRESS_MAP_GLOBAL_MASK(0xff)
+ AM_RANGE(0x1800, 0x27ff) AM_RAM AM_SHARE("videoram")
+ AM_RANGE(0x3000, 0x3001) // unknown device
+ AM_RANGE(0x4000, 0x4001) // unknown device
+ AM_RANGE(0x5000, 0x5003) // unknown device
+ AM_RANGE(0x6000, 0x6001) // unknown device
ADDRESS_MAP_END
/* Input ports */
@@ -119,9 +122,8 @@ GFXDECODE_END
static MACHINE_CONFIG_START( jonos, jonos_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz / 4)
+ MCFG_CPU_ADD("maincpu", I8085A, XTAL_16MHz / 4)
MCFG_CPU_PROGRAM_MAP(jonos_mem)
- MCFG_CPU_IO_MAP(jonos_io)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/konin.cpp b/src/mame/drivers/konin.cpp
index 09a732f4269..f3a3377d86d 100644
--- a/src/mame/drivers/konin.cpp
+++ b/src/mame/drivers/konin.cpp
@@ -2,11 +2,14 @@
// copyright-holders:Miodrag Milanovic, Robbbert
/***************************************************************************
- Mera-Elzab Konin
+Mera-Elzab Konin
- It's industrial computer used in Poland
+It's an industrial computer used in Poland
- 29/12/2011 Skeleton driver.
+No information has been found. All code is guesswork.
+
+2011-12-29 Skeleton driver.
+2016-07-15 Added terminal and uart.
'maincpu' (0384): unmapped i/o memory write to 00F8 = 56 & FF
'maincpu' (0388): unmapped i/o memory write to 00F8 = B6 & FF
@@ -28,22 +31,38 @@
'maincpu' (2AC6): unmapped i/o memory write to 00FA = 03 & FF
'maincpu' (0082): unmapped i/o memory write to 0024 = 06 & FF
+Debug stuff:
+- Start it up
+- Write FF to 7D57 to see some messages
+- Write 00 to 7D57 to silence it
+
+Even though it gives an input prompt, there's no code to accept anything
+
+Terminal settings: 8 data bits, 2 stop bits, no parity @ 9600
+
****************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
+#include "machine/i8251.h"
+#include "bus/rs232/rs232.h"
+#include "machine/clock.h"
class konin_state : public driver_device
{
public:
konin_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) ,
- m_maincpu(*this, "maincpu") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_uart(*this, "uart")
+ { }
+
+ WRITE_LINE_MEMBER(clock_w);
+private:
virtual void machine_reset() override;
- virtual void video_start() override;
- UINT32 screen_update_konin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
+ required_device<i8251_device> m_uart;
};
static ADDRESS_MAP_START( konin_mem, AS_PROGRAM, 8, konin_state )
@@ -55,24 +74,32 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( konin_io, AS_IO, 8, konin_state )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
+ AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
+ AM_RANGE(0xf7, 0xf7) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
ADDRESS_MAP_END
/* Input ports */
static INPUT_PORTS_START( konin )
INPUT_PORTS_END
+static DEVICE_INPUT_DEFAULTS_START( konin )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
+ DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
+ DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
+ DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
+DEVICE_INPUT_DEFAULTS_END
-void konin_state::machine_reset()
-{
-}
-void konin_state::video_start()
+void konin_state::machine_reset()
{
}
-UINT32 konin_state::screen_update_konin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+DECLARE_WRITE_LINE_MEMBER( konin_state::clock_w )
{
- return 0;
+ m_uart->write_txc(state);
+ m_uart->write_rxc(state);
}
static MACHINE_CONFIG_START( konin, konin_state )
@@ -81,17 +108,19 @@ static MACHINE_CONFIG_START( konin, konin_state )
MCFG_CPU_PROGRAM_MAP(konin_mem)
MCFG_CPU_IO_MAP(konin_io)
+ MCFG_DEVICE_ADD("uart", I8251, 0)
+ MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
+ MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
+ MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_SCREEN_UPDATE_DRIVER(konin_state, screen_update_konin)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart", i8251_device, write_rxd))
+ MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart", i8251_device, write_dsr))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart", i8251_device, write_cts))
+ MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", konin )
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(konin_state, clock_w))
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp
index 203646963cb..01c2dcc3ad4 100644
--- a/src/mame/drivers/mbc200.cpp
+++ b/src/mame/drivers/mbc200.cpp
@@ -1,38 +1,45 @@
// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
+// copyright-holders:Miodrag Milanovic, Robbbert
/***************************************************************************
- Sanyo MBC-200
+Sanyo MBC-200
- Machine MBC-1200 is identical but sold outside of Japan
+Machine MBC-1200 is identical but sold outside of Japan
- 16 x HM6116P-3 2K x 8 SRAM soldered onboard (so 32k ram)
- 4 x HM6116P-3 2K x 8 SRAM socketed (so 8k ram)
- 4 x MB83256 32K x 8 socketed (128k ram)
- Floppy = 5.25"
- MBC1200 has one floppy while MBC1250 has 2. The systems
- are otherwise identical.
+16 x HM6116P-3 2K x 8 SRAM soldered onboard (so 32k ram)
+4 x HM6116P-3 2K x 8 SRAM socketed (so 8k ram)
+4 x MB83256 32K x 8 socketed (128k ram)
+Floppy = 5.25"
+MBC1200 has one floppy while MBC1250 has 2. The systems are otherwise identical.
- On back side:
- - keyboard DIN connector
- - Centronics printer port
- - RS-232C 25pin connector
+Keyboard communicates via RS232 to uart at E0,E1. The processor and rom for it
+are undumped / unknown. The input codes are not ascii, so using custom code until
+the required details become available.
- TODO:
- - Keyboard
- - Sound
- - CP/M display (it runs into the weeds internally)
- - Other connections to the various PPI's
- - UART connections
- - Any other devices?
+On back side:
+- keyboard DIN connector
+- Centronics printer port
+- RS-232C 25pin connector
- 2011-10-31 Skeleton driver.
- 2014-05-18 Made rom get copied into ram, boot code from disk
- requires that ram is there otherwise you get
- a MEMORY ERROR. Now, CP/M loads and is executed, but
- nothing shows on the screen.
- Tried new wdc code, but the disk couldn't be read at all.
+SBASIC:
+Running programs: the file names used within SBASIC must be in
+uppercase. For example, run "DEMO" .
+You can also run a basic program from CP/M: sbasic "GRAPHICS" .
+To Break, press either ^N or ^O (display freezes), then ^C .
+Some control keys: 0x14 = Home; 0x8 = Left/BS; 0xA = Down; 0xB = Up; 0xC = Right.
+GAIJI.BAS doesn't work because GAIJI.FNT is missing.
+TODO:
+- Other connections to the various PPI's
+- UART connections
+- Any other devices?
+
+2011-10-31 Skeleton driver.
+2014-05-18 Made rom get copied into ram, boot code from disk
+ requires that ram is there otherwise you get
+ a MEMORY ERROR. CP/M now loads.
+
+2016-07-16 Added keyboard and sound.
****************************************************************************/
@@ -42,6 +49,9 @@
#include "machine/i8251.h"
#include "video/mc6845.h"
#include "machine/wd_fdc.h"
+#include "sound/beep.h"
+#include "sound/speaker.h"
+#include "machine/keyboard.h"
#include "softlist.h"
class mbc200_state : public driver_device
@@ -54,14 +64,19 @@ public:
, m_ppi_m(*this, "ppi_m")
, m_vram(*this, "vram")
, m_maincpu(*this, "maincpu")
+ , m_beep(*this, "beeper")
+ , m_speaker(*this, "speaker")
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
{ }
DECLARE_READ8_MEMBER(p2_porta_r);
+ DECLARE_WRITE8_MEMBER(p1_portc_w);
DECLARE_WRITE8_MEMBER(pm_porta_w);
DECLARE_WRITE8_MEMBER(pm_portb_w);
+ DECLARE_READ8_MEMBER(keyboard_r);
+ DECLARE_WRITE8_MEMBER(kbd_put);
MC6845_UPDATE_ROW(update_row);
required_device<palette_device> m_palette;
@@ -69,10 +84,13 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
UINT8 m_comm_latch;
+ UINT8 m_term_data;
required_device<mc6845_device> m_crtc;
required_device<i8255_device> m_ppi_m;
required_shared_ptr<UINT8> m_vram;
required_device<cpu_device> m_maincpu;
+ required_device<beep_device> m_beep;
+ required_device<speaker_sound_device> m_speaker;
required_device<mb8876_t> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
@@ -85,10 +103,15 @@ static ADDRESS_MAP_START(mbc200_mem, AS_PROGRAM, 8, mbc200_state)
AM_RANGE( 0x1000, 0xffff ) AM_RAM
ADDRESS_MAP_END
+WRITE8_MEMBER( mbc200_state::p1_portc_w )
+{
+ m_speaker->level_w(BIT(data,4)); // used by beep command in basic
+}
+
WRITE8_MEMBER( mbc200_state::pm_porta_w )
{
machine().scheduler().synchronize(); // force resync
- printf("A %02x %c\n",data,data);
+ //printf("A %02x %c\n",data,data);
m_comm_latch = data; // to slave CPU
}
@@ -110,17 +133,19 @@ WRITE8_MEMBER( mbc200_state::pm_portb_w )
floppy->mon_w(0);
floppy->ss_w(BIT(data, 7));
}
+ m_beep->set_state(BIT(data, 1)); // key-click
}
static ADDRESS_MAP_START( mbc200_io , AS_IO, 8, mbc200_state)
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0xe0, 0xe0) AM_DEVREADWRITE("i8251_1", i8251_device, data_r, data_w)
- AM_RANGE(0xe1, 0xe1) AM_DEVREADWRITE("i8251_1", i8251_device, status_r, control_w)
+ //AM_RANGE(0xe0, 0xe0) AM_DEVREADWRITE("uart1", i8251_device, data_r, data_w)
+ //AM_RANGE(0xe1, 0xe1) AM_DEVREADWRITE("uart1", i8251_device, status_r, control_w)
+ AM_RANGE(0xe0, 0xe1) AM_READ(keyboard_r) AM_WRITENOP
AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("fdc", mb8876_t, read, write)
AM_RANGE(0xe8, 0xeb) AM_DEVREADWRITE("ppi_m", i8255_device, read, write)
- AM_RANGE(0xec, 0xec) AM_DEVREADWRITE("i8251_2", i8251_device, data_r, data_w)
- AM_RANGE(0xed, 0xed) AM_DEVREADWRITE("i8251_2", i8251_device, status_r, control_w)
+ AM_RANGE(0xec, 0xec) AM_DEVREADWRITE("uart2", i8251_device, data_r, data_w)
+ AM_RANGE(0xed, 0xed) AM_DEVREADWRITE("uart2", i8251_device, status_r, control_w)
ADDRESS_MAP_END
@@ -154,6 +179,62 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( mbc200 )
INPUT_PORTS_END
+READ8_MEMBER( mbc200_state::keyboard_r )
+{
+ UINT8 data = 0;
+ if (offset)
+ {
+ if (m_term_data)
+ {
+ data = 2;
+ // handle CTRL key pressed
+ if (m_term_data < 0x20)
+ {
+ data |= 8;
+ m_term_data |= 0x40;
+ }
+ }
+ }
+ else
+ {
+ data = m_term_data;
+ m_term_data = 0;
+ }
+
+ return data;
+}
+
+// convert standard control keys to expected code;
+WRITE8_MEMBER( mbc200_state::kbd_put )
+{
+ switch (data)
+ {
+ case 0x0e:
+ m_term_data = 0xe2;
+ break;
+ case 0x0f:
+ m_term_data = 0xe3;
+ break;
+ case 0x08:
+ m_term_data = 0xe4;
+ break;
+ case 0x09:
+ m_term_data = 0xe5;
+ break;
+ case 0x0a:
+ m_term_data = 0xe6;
+ break;
+ case 0x0d:
+ m_term_data = 0xe7;
+ break;
+ case 0x1b:
+ m_term_data = 0xe8;
+ break;
+ default:
+ m_term_data = data;
+ }
+}
+
void mbc200_state::machine_start()
{
}
@@ -179,7 +260,7 @@ MC6845_UPDATE_ROW( mbc200_state::update_row )
for (x = 0; x < x_count; x++)
{
mem = (ma+x)*4+ra;
- gfx = m_vram[mem];
+ gfx = m_vram[mem & 0x7fff];
*p++ = palette[BIT(gfx, 7)];
*p++ = palette[BIT(gfx, 6)];
*p++ = palette[BIT(gfx, 5)];
@@ -232,7 +313,15 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state )
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_MC6845_UPDATE_ROW_CB(mbc200_state, update_row)
+ // sound
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("beeper", BEEP, 1000) // frequency unknown
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+
MCFG_DEVICE_ADD("ppi_1", I8255, 0)
+ MCFG_I8255_OUT_PORTC_CB(WRITE8(mbc200_state, p1_portc_w))
MCFG_DEVICE_ADD("ppi_2", I8255, 0)
MCFG_I8255_IN_PORTA_CB(READ8(mbc200_state, p2_porta_r))
@@ -241,12 +330,19 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state )
MCFG_I8255_OUT_PORTA_CB(WRITE8(mbc200_state, pm_porta_w))
MCFG_I8255_OUT_PORTB_CB(WRITE8(mbc200_state, pm_portb_w))
- MCFG_DEVICE_ADD("i8251_1", I8251, 0) // INS8251N
- MCFG_DEVICE_ADD("i8251_2", I8251, 0) // INS8251A
+ MCFG_DEVICE_ADD("uart1", I8251, 0) // INS8251N
+
+ MCFG_DEVICE_ADD("uart2", I8251, 0) // INS8251A
MCFG_MB8876_ADD("fdc", XTAL_8MHz / 8) // guess
MCFG_FLOPPY_DRIVE_ADD("fdc:0", mbc200_floppies, "qd", floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbc200_floppies, "qd", floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_SOUND(true)
+
+ /* Keyboard */
+ MCFG_DEVICE_ADD("keyboard", GENERIC_KEYBOARD, 0)
+ MCFG_GENERIC_KEYBOARD_CB(WRITE8(mbc200_state, kbd_put))
/* software lists */
MCFG_SOFTWARE_LIST_ADD("flop_list", "mbc200")
@@ -254,14 +350,14 @@ MACHINE_CONFIG_END
/* ROM definition */
ROM_START( mbc200 )
- ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASEFF )
ROM_REGION( 0x1000, "roms", 0 )
ROM_LOAD( "d2732a.bin", 0x0000, 0x1000, CRC(bf364ce8) SHA1(baa3a20a5b01745a390ef16628dc18f8d682d63b))
- ROM_REGION( 0x10000, "subcpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x3000, "subcpu", ROMREGION_ERASEFF )
ROM_LOAD( "m5l2764.bin", 0x0000, 0x2000, CRC(377300a2) SHA1(8563172f9e7f84330378a8d179f4138be5fda099))
ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1982, mbc200, 0, 0, mbc200, mbc200, driver_device, 0, "Sanyo", "MBC-200", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+COMP( 1982, mbc200, 0, 0, mbc200, mbc200, driver_device, 0, "Sanyo", "MBC-200", 0 )
diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp
index 6546e3b3325..708c795463d 100644
--- a/src/mame/drivers/mz80.cpp
+++ b/src/mame/drivers/mz80.cpp
@@ -137,17 +137,17 @@ static INPUT_PORTS_START( mz80k )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G25") PORT_CODE(KEYCODE_TILDE)
INPUT_PORTS_END
-// One of the keys labeled as 'Unused' in Line0 should be the Graph key; another one is the Spacebar. Also, PORT_NAMEs need to be verified
+// PORT_NAMEs need to be verified
static INPUT_PORTS_START( mz80a )
PORT_START("LINE0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Grph") PORT_CODE(KEYCODE_TAB)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Unused?")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl Break") PORT_CODE(KEYCODE_ESC)
PORT_START("LINE1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index 12bc50dc56d..455f67c5dbf 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -2210,7 +2210,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( ojousan )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easy)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -2219,47 +2219,18 @@ static INPUT_PORTS_START( ojousan )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
- PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" )
+ PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" ) PORT_DIPLOCATION("SWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Character Display Test" )
+ PORT_DIPNAME( 0x10, 0x10, "Character Display Test" ) PORT_DIPLOCATION("SWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SWA:6" )
+ PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SWA:7" )
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SWA:8" )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index ea7f03353c2..7168f43c9e2 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -6024,7 +6024,7 @@ ROM_START( sprglbpg )
ROM_END
-ROM_START( beastf )
+ROM_START( beastfp )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "bf-u2.bin", 0x0000, 0x2000, CRC(3afc517b) SHA1(5b74bca9e9cd4d8bcf94a340f8f0e53fe1dcfc1d) )
ROM_LOAD( "bf-u3.bin", 0x2000, 0x2000, CRC(8dbd76d0) SHA1(058c01e87ad583eb99d5043a821e6c68f1b30267) )
@@ -7287,7 +7287,7 @@ GAME( 1983, acitya, bwcasino, acitya, acitya, driver_device, 0, ROT
GAME( 1983, theglobp, suprglob, theglobp, theglobp, driver_device, 0, ROT90, "Epos Corporation", "The Glob (Pac-Man hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, sprglobp, suprglob, theglobp, theglobp, driver_device, 0, ROT90, "Epos Corporation", "Super Glob (Pac-Man hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, sprglbpg, suprglob, pacman, theglobp, driver_device, 0, ROT90, "bootleg", "Super Glob (Pac-Man hardware) (German bootleg)", MACHINE_SUPPORTS_SAVE )
-GAME( 1984, beastf, suprglob, theglobp, theglobp, driver_device, 0, ROT90, "Epos Corporation", "Beastie Feastie", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, beastfp, suprglob, theglobp, theglobp, driver_device, 0, ROT90, "Epos Corporation", "Beastie Feastie (conversion kit)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, drivfrcp, 0, drivfrcp, drivfrcp, pacman_state, drivfrcp, ROT90, "Shinkai Inc. (Magic Electronics Inc. license)", "Driving Force (Pac-Man conversion)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index e68974342a4..d1da0c11fb5 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -677,9 +677,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -712,9 +710,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -748,9 +744,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "typ"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -783,9 +777,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "drm"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index 78190d9141a..0af536e0107 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -2336,7 +2336,7 @@ WRITE_LINE_MEMBER(rainbow_state::irq_hi_w)
#ifdef ASSUME_MODEL_A_HARDWARE
m_irq_high = 0;
#else
- m_irq_high = (state == ASSERT_LINE) ? 0x80 : 0;
+ m_irq_high = (state == ASSERT_LINE) ? 0 : 0x80;
#endif
}
diff --git a/src/mame/drivers/sidepckt.cpp b/src/mame/drivers/sidepckt.cpp
index 73c2e6ee493..9538a974116 100644
--- a/src/mame/drivers/sidepckt.cpp
+++ b/src/mame/drivers/sidepckt.cpp
@@ -11,7 +11,7 @@ ernesto@imagina.com
Thanks must go to Mirko Buffoni for testing the music.
-i8751 protection simluation and other fixes by Bryan McPhail, 15/10/00.
+i8751 protection simulation and other fixes by Bryan McPhail, 15/10/00.
ToDo:
diff --git a/src/mame/drivers/sun4.cpp b/src/mame/drivers/sun4.cpp
index 8101d8d79fe..3d310619f92 100644
--- a/src/mame/drivers/sun4.cpp
+++ b/src/mame/drivers/sun4.cpp
@@ -381,21 +381,21 @@
21/11/2011 Skeleton driver.
20/06/2016 Much less skeletony.
-
+
// sun4: 16 contexts, 4096 segments, each PMEG is 32 PTEs, each PTE is 8K
// VA lower 13 bits in page, next 5 bits select PTE in PMEG, next 12 bits select PMEG, top 2 must be 00 or 11.
-
+
4/60 ROM notes:
-
+
ffe809fc: call to print "Sizing Memory" to the UART
ffe80a70: call to "Setting up RAM for monitor" that goes wrong
- ffe80210: testing memory
+ ffe80210: testing memory
ffe80274: loop that goes wobbly and fails
ffe80dc4: switch off boot mode, MMU maps ROM to copy in RAM from here on
ffe82000: start of FORTH (?) interpreter once decompressed
text in decompressed area claims to be FORTH-83 FCode, but the opcodes
do not match the documented OpenFirmware FCode ones at all.
-
+
4/3xx ROM notes:
sun4: CPU LEDs to 00 (PC=ffe92398) => ........
sun4: CPU LEDs to 01 (PC=ffe92450) => *.......
@@ -485,7 +485,7 @@ const sparc_disassembler::asi_desc_map::value_type sun4c_asi_desc[] = {
};
}
-enum
+enum
{
ARCH_SUN4 = 0,
ARCH_SUN4C,
@@ -500,10 +500,12 @@ public:
, m_maincpu(*this, "maincpu")
, m_scc1(*this, SCC1_TAG)
, m_scc2(*this, SCC2_TAG)
+ , m_fdc(*this, FDC_TAG)
, m_type0space(*this, "type0")
, m_type1space(*this, "type1")
, m_ram(*this, RAM_TAG)
, m_rom(*this, "user1")
+ , m_bw2_vram(*this, "bw2_vram")
, m_rom_ptr(nullptr)
, m_system_enable(0)
{
@@ -512,7 +514,7 @@ public:
virtual void machine_reset() override;
virtual void machine_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
+
static const device_timer_id TIMER_0 = 0;
static const device_timer_id TIMER_1 = 1;
@@ -528,25 +530,31 @@ public:
DECLARE_WRITE32_MEMBER( timer_w );
DECLARE_READ8_MEMBER( irq_r );
DECLARE_WRITE8_MEMBER( irq_w );
- DECLARE_READ8_MEMBER( fake_fdc_r );
-
+ DECLARE_READ8_MEMBER( fdc_r );
+ DECLARE_WRITE8_MEMBER( fdc_w );
+
DECLARE_DRIVER_INIT(sun4);
DECLARE_DRIVER_INIT(sun4c);
DECLARE_DRIVER_INIT(ss2);
-
+
DECLARE_FLOPPY_FORMATS( floppy_formats );
-
+
+ UINT32 bw2_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
protected:
required_device<mb86901_device> m_maincpu;
required_device<z80scc_device> m_scc1;
required_device<z80scc_device> m_scc2;
+ required_device<n82077aa_device> m_fdc;
optional_device<address_map_bank_device> m_type0space, m_type1space;
required_device<ram_device> m_ram;
required_memory_region m_rom;
+ optional_shared_ptr<UINT32> m_bw2_vram;
+
UINT32 *m_rom_ptr;
UINT32 m_context;
UINT8 m_system_enable;
- UINT32 m_buserror[4];
+ UINT32 m_buserr[4];
UINT32 m_counter[4];
private:
@@ -554,39 +562,70 @@ private:
UINT8 m_segmap[16][4096];
UINT32 m_pagemap[16384];
UINT32 m_cachetags[0x4000];
+ UINT32 m_cachedata[0x4000];
UINT32 m_ram_size, m_ram_size_words;
UINT8 m_ctx_mask; // SS2 is sun4c but has 16 contexts; most have 8
UINT8 m_pmeg_mask; // SS2 is sun4c but has 16384 PTEs; most have 8192
UINT8 m_irq_reg; // IRQ control
UINT8 m_diag;
int m_arch;
-
+
emu_timer *m_c0_timer, *m_c1_timer;
-
+
void start_timer(int num);
void l2p_command(int ref, int params, const char **param);
void fcodes_command(int ref, int params, const char **param);
};
+UINT32 sun4_state::bw2_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ UINT32 *scanline;
+ int x, y;
+ UINT8 pixels;
+ static const UINT32 palette[2] = { 0xffffff, 0 };
+ UINT8 *m_vram = (UINT8 *)m_bw2_vram.target();
+
+ for (y = 0; y < 900; y++)
+ {
+ scanline = &bitmap.pix32(y);
+ for (x = 0; x < 1152/8; x++)
+ {
+ pixels = m_vram[(y * (1152/8)) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = palette[(pixels>>7)&1];
+ *scanline++ = palette[(pixels>>6)&1];
+ *scanline++ = palette[(pixels>>5)&1];
+ *scanline++ = palette[(pixels>>4)&1];
+ *scanline++ = palette[(pixels>>3)&1];
+ *scanline++ = palette[(pixels>>2)&1];
+ *scanline++ = palette[(pixels>>1)&1];
+ *scanline++ = palette[(pixels&1)];
+ }
+ }
+
+ return 0;
+}
+
READ32_MEMBER( sun4_state::sun4c_mmu_r )
{
UINT8 asi = m_maincpu->get_asi();
int page;
+ UINT32 retval = 0;
// make debugger fetches emulate supervisor program for best compatibility with boot PROM execution
if (space.debugger_access()) asi = 9;
-
+
// supervisor program fetches in boot state are special
if ((!(m_system_enable & ENA_NOTBOOT)) && (asi == 9))
{
return m_rom_ptr[offset & 0x1ffff];
}
-
+
switch (asi)
{
case 2: // system space
switch (offset >> 26)
- {
+ {
case 3: // context reg
if (mem_mask == 0x00ff0000) return m_context<<16;
return m_context<<24;
@@ -595,17 +634,20 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
return m_system_enable<<24;
case 6: // bus error register
- //printf("sun4c: read buserror, PC=%x (mask %08x)\n", m_maincpu->pc(), mem_mask);
- return 0;
+ printf("sun4c: read buserror, PC=%x (mask %08x)\n", m_maincpu->pc(), mem_mask);
+ m_maincpu->set_input_line(SPARC_MAE, CLEAR_LINE);
+ retval = m_buserr[offset & 0xf];
+ m_buserr[offset & 0xf] = 0; // clear on reading
+ return retval;
case 8: // (d-)cache tags
//logerror("sun4: read dcache tags @ %x, PC = %x\n", offset, m_maincpu->pc());
- return m_cachetags[offset&0xfff];
+ return m_cachetags[(offset>>3)&0x3fff];
case 9: // (d-)cache data
- logerror("sun4c: read dcache data @ %x, PC = %x\n", offset, m_maincpu->pc());
- return 0xffffffff;
-
+ //logerror("sun4c: read dcache data @ %x, PC = %x\n", offset, m_maincpu->pc());
+ return m_cachedata[offset&0x3fff];
+
case 0xf: // UART bypass
//printf("read UART bypass @ %x mask %08x\n", offset<<2, mem_mask);
switch (offset & 3)
@@ -631,7 +673,7 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
{
return m_segmap[m_context & m_ctx_mask][(offset>>16) & 0xfff]<<24;
}
- else
+ else
{
// printf("sun4: read segment map w/unk mask %08x\n", mem_mask);
}
@@ -643,7 +685,7 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
//printf("sun4: read page map @ %x (entry %d, seg %d, PMEG %d, mem_mask %08x, PC=%x)\n", offset << 2, page, (offset >> 16) & 0xfff, m_segmap[m_context & m_ctx_mask][(offset >> 16) & 0xfff] & m_pmeg_mask, mem_mask, m_maincpu->pc());
return m_pagemap[page];
break;
-
+
case 8:
case 9:
case 10:
@@ -656,26 +698,26 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
if (m_pagemap[entry] & PM_VALID)
{
m_pagemap[entry] |= PM_ACCESSED;
-
+
UINT32 tmp = (m_pagemap[entry] & 0xffff) << 10;
tmp |= (offset & 0x3ff);
-
+
//printf("sun4: read translated vaddr %08x to phys %08x type %d, PTE %08x, PC=%x\n", offset<<2, tmp<<2, (m_pagemap[entry]>>26) & 3, m_pagemap[entry], m_maincpu->pc());
-
+
switch ((m_pagemap[entry] >> 26) & 3)
{
case 0: // type 0 space
return m_type0space->read32(space, tmp, mem_mask);
-
+
case 1: // type 1 space
// magic EPROM bypass
if ((tmp >= (0x6000000>>2)) && (tmp <= (0x6ffffff>>2)))
{
- return m_rom_ptr[offset & 0x1ffff];
+ return m_rom_ptr[offset & 0x1ffff];
}
//printf("Read type 1 @ VA %08x, phys %08x\n", offset<<2, tmp<<2);
return m_type1space->read32(space, tmp, mem_mask);
-
+
default:
printf("sun4c: access to memory type not defined in sun4c\n");
return 0;
@@ -687,19 +729,19 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
{
printf("sun4c: INVALID PTE entry %d %08x accessed! vaddr=%x PC=%x\n", entry, m_pagemap[entry], offset <<2, m_maincpu->pc());
//m_maincpu->trap(SPARC_DATA_ACCESS_EXCEPTION);
- //m_buserror[0] = 0x88; // read, invalid PTE
- //m_buserror[1] = offset<<2;
+ //m_buserr[0] = 0x88; // read, invalid PTE
+ //m_buserr[1] = offset<<2;
}
return 0;
- }
+ }
}
break;
-
+
default:
if (!space.debugger_access()) printf("sun4c: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
return 0;
}
-
+
printf("sun4c: read asi %d byte offset %x, PC = %x\n", asi, offset << 2, m_maincpu->pc());
return 0;
@@ -725,17 +767,29 @@ WRITE32_MEMBER( sun4_state::sun4c_mmu_w )
case 4: // system enable reg
m_system_enable = data>>24;
//printf("%08x to system enable, mask %08x\n", data, mem_mask);
+ if (m_system_enable & ENA_RESET)
+ {
+ m_system_enable = 0;
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ }
+ return;
+
+ case 6: // bus error
+ printf("%08x to bus error @ %x, mask %08x\n", data, offset, mem_mask);
+ m_buserr[offset & 0xf] = data;
return;
case 8: // cache tags
//logerror("sun4: %08x to cache tags @ %x, PC = %x\n", data, offset, m_maincpu->pc());
- m_cachetags[offset&0xfff] = data;
+ m_cachetags[(offset>>3)&0x3fff] = data & 0x03f8fffc;
return;
case 9: // cache data
- logerror("sun4c: %08x to cache data @ %x, PC = %x\n", data, offset, m_maincpu->pc());
+ //logerror("sun4c: %08x to cache data @ %x, PC = %x\n", data, offset, m_maincpu->pc());
+ m_cachedata[offset&0x3fff] = data;
return;
-
+
case 0xf: // UART bypass
//printf("%08x to UART bypass @ %x, mask %08x\n", data, offset<<2, mem_mask);
switch (offset & 3)
@@ -758,12 +812,12 @@ WRITE32_MEMBER( sun4_state::sun4c_mmu_w )
if (mem_mask == 0xffff0000) segdata = (data >> 16) & 0xff;
else if (mem_mask == 0xff000000) segdata = (data >> 24) & 0xff;
else logerror("sun4c: writing segment map with unknown mask %08x, PC=%x\n", mem_mask, m_maincpu->pc());
-
+
//printf("sun4: %08x to segment map @ %x (ctx %d entry %d, mem_mask %08x, PC=%x)\n", segdata, offset << 2, m_context, (offset>>16) & 0xfff, mem_mask, m_maincpu->pc());
m_segmap[m_context & m_ctx_mask][(offset>>16) & 0xfff] = segdata; // only 7 bits of the segment are necessary
}
return;
-
+
case 4: // page map
page = (m_segmap[m_context & m_ctx_mask][(offset >> 16) & 0xfff] & m_pmeg_mask) << 6; // get the PMEG
page += (offset >> 10) & 0x3f; // add the offset
@@ -781,21 +835,31 @@ WRITE32_MEMBER( sun4_state::sun4c_mmu_w )
if (m_pagemap[entry] & PM_VALID)
{
- m_pagemap[entry] |= PM_ACCESSED;
-
+ if ((!(m_pagemap[entry] & PM_WRITEMASK)) ||
+ ((m_pagemap[entry] & PM_SYSMASK) && !(asi & 1)))
+ {
+ printf("sun4c: write protect MMU error (PC=%x)\n", m_maincpu->pc());
+ m_buserr[0] = 0x8040; // write, protection error
+ m_buserr[1] = offset<<2;
+ m_maincpu->set_input_line(SPARC_MAE, ASSERT_LINE);
+ return;
+ }
+
+ m_pagemap[entry] |= (PM_ACCESSED | PM_MODIFIED);
+
UINT32 tmp = (m_pagemap[entry] & 0xffff) << 10;
tmp |= (offset & 0x3ff);
-
- //printf("sun4: write translated vaddr %08x to phys %08x type %d, PTE %08x, PC=%x\n", offset<<2, tmp<<2, (m_pagemap[entry]>>26) & 3, m_pagemap[entry], m_maincpu->pc());
+
+ printf("sun4: write translated vaddr %08x to phys %08x type %d, PTE %08x, ASI %d, PC=%x\n", offset<<2, tmp<<2, (m_pagemap[entry]>>26) & 3, m_pagemap[entry], asi, m_maincpu->pc());
switch ((m_pagemap[entry] >> 26) & 3)
{
case 0: // type 0
m_type0space->write32(space, tmp, data, mem_mask);
return;
-
+
case 1: // type 1
- //printf("write device space @ %x\n", tmp<<1);
+ //printf("write device space @ %x\n", tmp<<1);
m_type1space->write32(space, tmp, data, mem_mask);
return;
default:
@@ -807,12 +871,12 @@ WRITE32_MEMBER( sun4_state::sun4c_mmu_w )
{
printf("sun4c: INVALID PTE entry %d %08x accessed! vaddr=%x PC=%x\n", entry, m_pagemap[entry], offset <<2, m_maincpu->pc());
//m_maincpu->trap(SPARC_DATA_ACCESS_EXCEPTION);
- //m_buserror[0] = 0x8; // invalid PTE
- //m_buserror[1] = offset<<2;
+ //m_buserr[0] = 0x8; // invalid PTE
+ //m_buserr[1] = offset<<2;
return;
}
break;
-
+
}
printf("sun4c: %08x to asi %d byte offset %x, PC = %x, mask = %08x\n", data, asi, offset << 2, m_maincpu->pc(), mem_mask);
@@ -827,18 +891,18 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
// make debugger fetches emulate supervisor program for best compatibility with boot PROM execution
if (space.debugger_access()) asi = 9;
-
+
// supervisor program fetches in boot state are special
if ((!(m_system_enable & ENA_NOTBOOT)) && (asi == 9))
{
return m_rom_ptr[offset & 0x1ffff];
}
-
+
switch (asi)
{
case 2: // system space
switch (offset >> 26)
- {
+ {
case 3: // context reg
if (mem_mask == 0x00ff0000) return m_context<<16;
return m_context<<24;
@@ -857,7 +921,7 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
case 9: // (d-)cache data
logerror("sun4: read dcache data @ %x, PC = %x\n", offset, m_maincpu->pc());
return 0xffffffff;
-
+
case 0xf: // UART bypass
//printf("read UART bypass @ %x mask %08x (PC=%x)\n", offset<<2, mem_mask, m_maincpu->pc());
switch (offset & 3)
@@ -883,7 +947,7 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
{
return m_segmap[m_context][(offset>>16) & 0xfff]<<24;
}
- else
+ else
{
// printf("sun4: read segment map w/unk mask %08x\n", mem_mask);
}
@@ -894,10 +958,10 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
page += (offset >> 11) & 0x1f;
//printf("sun4: read page map @ %x (entry %d, seg %d, PMEG %d, mem_mask %08x, PC=%x)\n", offset << 2, page, (offset >> 16) & 0xfff, m_segmap[m_context & m_ctx_mask][(offset >> 16) & 0xfff] & m_pmeg_mask, mem_mask, m_maincpu->pc());
return m_pagemap[page];
-
+
case 6: // region map used in 4/4xx, I don't know anything about this
return 0;
-
+
case 8:
case 9:
case 10:
@@ -910,26 +974,26 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
if (m_pagemap[entry] & PM_VALID)
{
m_pagemap[entry] |= PM_ACCESSED;
-
+
UINT32 tmp = (m_pagemap[entry] & 0x7ffff) << 11;
tmp |= (offset & 0x7ff);
-
+
//printf("sun4: read translated vaddr %08x to phys %08x type %d, PTE %08x, PC=%x\n", offset<<2, tmp<<2, (m_pagemap[entry]>>26) & 3, m_pagemap[entry], m_maincpu->pc());
-
+
switch ((m_pagemap[entry] >> 26) & 3)
{
case 0: // type 0 space
return m_type0space->read32(space, tmp, mem_mask);
-
+
case 1: // type 1 space
// magic EPROM bypass
if ((tmp >= (0x6000000>>2)) && (tmp <= (0x6ffffff>>2)))
{
- return m_rom_ptr[offset & 0x1ffff];
+ return m_rom_ptr[offset & 0x1ffff];
}
//printf("Read type 1 @ VA %08x, phys %08x\n", offset<<2, tmp<<2);
return m_type1space->read32(space, tmp, mem_mask);
-
+
default:
printf("sun4: access to unhandled memory type\n");
return 0;
@@ -941,19 +1005,19 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
{
printf("sun4: INVALID PTE entry %d %08x accessed! vaddr=%x PC=%x\n", entry, m_pagemap[entry], offset <<2, m_maincpu->pc());
//m_maincpu->trap(SPARC_DATA_ACCESS_EXCEPTION);
- //m_buserror[0] = 0x88; // read, invalid PTE
- //m_buserror[1] = offset<<2;
+ //m_buserr2qor[0] = 0x88; // read, invalid PTE
+ //m_buserr[1] = offset<<2;
}
return 0;
- }
+ }
}
break;
-
+
default:
if (!space.debugger_access()) printf("sun4: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
return 0;
}
-
+
printf("sun4: read asi %d byte offset %x, PC = %x\n", asi, offset << 2, m_maincpu->pc());
return 0;
@@ -979,6 +1043,12 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
case 4: // system enable reg
m_system_enable = data>>24;
//printf("%08x to system enable, mask %08x\n", data, mem_mask);
+ if (m_system_enable & ENA_RESET)
+ {
+ m_system_enable = 0;
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ }
return;
case 7: // diag reg
@@ -988,9 +1058,9 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
for (int i = 0; i < 8; i++)
{
if (m_diag & (1<<i))
- {
- printf(".");
- }
+ {
+ printf(".");
+ }
else
{
printf("*");
@@ -999,7 +1069,7 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
printf("\n");
#endif
return;
-
+
case 8: // cache tags
//logerror("sun4: %08x to cache tags @ %x, PC = %x\n", data, offset, m_maincpu->pc());
m_cachetags[offset&0xfff] = data;
@@ -1008,7 +1078,7 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
case 9: // cache data
logerror("sun4: %08x to cache data @ %x, PC = %x\n", data, offset, m_maincpu->pc());
return;
-
+
case 0xf: // UART bypass
//printf("%08x to UART bypass @ %x, mask %08x\n", data, offset<<2, mem_mask);
switch (offset & 3)
@@ -1031,12 +1101,12 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
if (mem_mask == 0xffff0000) segdata = (data >> 16) & 0xff;
else if (mem_mask == 0xff000000) segdata = (data >> 24) & 0xff;
else logerror("sun4: writing segment map with unknown mask %08x, PC=%x\n", mem_mask, m_maincpu->pc());
-
+
//printf("sun4: %08x to segment map @ %x (ctx %d entry %d, mem_mask %08x, PC=%x)\n", segdata, offset << 2, m_context, (offset>>16) & 0xfff, mem_mask, m_maincpu->pc());
m_segmap[m_context][(offset>>16) & 0xfff] = segdata;
}
return;
-
+
case 4: // page map
page = (m_segmap[m_context][(offset >> 16) & 0xfff]) << 5; // get the PMEG
page += (offset >> 11) & 0x1f; // add the offset
@@ -1044,10 +1114,10 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
COMBINE_DATA(&m_pagemap[page]);
m_pagemap[page] &= 0xff07ffff; // these bits are cleared when written and tested as such
return;
-
+
case 6: // region map, used in 4/4xx
return;
-
+
case 8:
case 9:
case 10:
@@ -1059,10 +1129,10 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
if (m_pagemap[entry] & PM_VALID)
{
m_pagemap[entry] |= PM_ACCESSED;
-
+
UINT32 tmp = (m_pagemap[entry] & 0x7ffff) << 11;
tmp |= (offset & 0x7ff);
-
+
//printf("sun4: write translated vaddr %08x to phys %08x type %d, PTE %08x, PC=%x\n", offset<<2, tmp<<2, (m_pagemap[entry]>>26) & 3, m_pagemap[entry], m_maincpu->pc());
switch ((m_pagemap[entry] >> 26) & 3)
@@ -1070,9 +1140,9 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
case 0: // type 0
m_type0space->write32(space, tmp, data, mem_mask);
return;
-
+
case 1: // type 1
- //printf("write device space @ %x\n", tmp<<1);
+ //printf("write device space @ %x\n", tmp<<1);
m_type1space->write32(space, tmp, data, mem_mask);
return;
default:
@@ -1089,24 +1159,24 @@ WRITE32_MEMBER( sun4_state::sun4_mmu_w )
return;
}
break;
-
+
}
printf("sun4: %08x to asi %d byte offset %x, PC = %x, mask = %08x\n", data, asi, offset << 2, m_maincpu->pc(), mem_mask);
}
void sun4_state::l2p_command(int ref, int params, const char **param)
-{
+{
UINT64 addr, offset;
-
+
if (!machine().debugger().commands().validate_number_parameter(param[0], &addr)) return;
-
+
addr &= 0xffffffff;
offset = addr >> 2;
-
+
UINT8 pmeg = 0;
UINT32 entry = 0, tmp = 0;
-
+
if (m_arch == ARCH_SUN4)
{
pmeg = m_segmap[m_context][(offset >> 16) & 0xfff];
@@ -1179,8 +1249,8 @@ void sun4_state::machine_start()
m_rom_ptr = (UINT32 *)m_rom->base();
m_ram_ptr = (UINT32 *)m_ram->pointer();
m_ram_size = m_ram->size();
- m_ram_size_words = m_ram_size >> 2;
-
+ m_ram_size_words = m_ram_size >> 2;
+
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
using namespace std::placeholders;
@@ -1189,7 +1259,7 @@ void sun4_state::machine_start()
machine().debugger().console().register_command("fcodes", CMDFLAG_NONE, 0, 1, 1, std::bind(&sun4_state::fcodes_command, this, _1, _2, _3));
#endif
}
-
+
// allocate timers for the built-in two channel timer
m_c0_timer = timer_alloc(TIMER_0);
m_c1_timer = timer_alloc(TIMER_1);
@@ -1250,10 +1320,10 @@ WRITE32_MEMBER( sun4_state::ram_w )
m_parregs[0] |= 0x0f<<24;
break;
}
-
+
// indicate parity interrupt
m_parregs[0] |= 0x80000000;
-
+
// and can we take that now?
if (m_parregs[0] & 0x40000000)
{
@@ -1265,7 +1335,7 @@ WRITE32_MEMBER( sun4_state::ram_w )
//if ((offset<<2) == 0xfb2000) printf("write %08x to %08x, mask %08x, PC=%x\n", data, offset<<2, mem_mask, m_maincpu->pc());
- if (offset < m_ram_size_words)
+ if (offset < m_ram_size_words)
{
COMBINE_DATA(&m_ram_ptr[offset]);
return;
@@ -1282,11 +1352,11 @@ static ADDRESS_MAP_START(type1space_map, AS_PROGRAM, 32, sun4_state)
AM_RANGE(0x02000000, 0x020007ff) AM_DEVREADWRITE8(TIMEKEEPER_TAG, timekeeper_device, read, write, 0xffffffff)
AM_RANGE(0x03000000, 0x0300000f) AM_READWRITE(timer_r, timer_w) AM_MIRROR(0xfffff0)
AM_RANGE(0x05000000, 0x05000003) AM_READWRITE8(irq_r, irq_w, 0xffffffff)
- AM_RANGE(0x06000000, 0x0607ffff) AM_ROM AM_REGION("user1", 0)
-// AM_RANGE(0x07200000, 0x07200007) AM_DEVICE8(FDC_TAG, n82077aa_device, map, 0xffffffff)
- AM_RANGE(0x07200000, 0x07200003) AM_READ8(fake_fdc_r, 0xffffffff)
+ AM_RANGE(0x06000000, 0x0607ffff) AM_ROM AM_REGION("user1", 0)
+ AM_RANGE(0x07200000, 0x07200003) AM_READWRITE8(fdc_r, fdc_w, 0xffffffff)
AM_RANGE(0x08000000, 0x08000003) AM_READ(ss1_sl0_id) // slot 0 contains SCSI/DMA/Ethernet
AM_RANGE(0x0e000000, 0x0e000003) AM_READ(ss1_sl3_id) // slot 3 contains video board
+ AM_RANGE(0x0e800000, 0x0e8fffff) AM_RAM AM_SHARE("bw2_vram")
ADDRESS_MAP_END
static ADDRESS_MAP_START(type1space_s4_map, AS_PROGRAM, 32, sun4_state)
@@ -1294,9 +1364,43 @@ static ADDRESS_MAP_START(type1space_s4_map, AS_PROGRAM, 32, sun4_state)
AM_RANGE(0x01000000, 0x0100000f) AM_DEVREADWRITE8(SCC2_TAG, z80scc_device, ba_cd_inv_r, ba_cd_inv_w, 0xff00ff00)
ADDRESS_MAP_END
-READ8_MEMBER( sun4_state::fake_fdc_r )
+READ8_MEMBER( sun4_state::fdc_r )
{
- return 0x80; // always ready
+ if (space.debugger_access())
+ return 0;
+
+ switch(offset)
+ {
+ case 0: // Main Status (R)
+ return m_fdc->msr_r(space, 0, 0xff);
+ break;
+
+ case 1: // FIFO Data Port (R)
+ return m_fdc->fifo_r(space, 0, 0xff);
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+WRITE8_MEMBER( sun4_state::fdc_w )
+{
+ switch(offset)
+ {
+ case 0: // Data Rate Select Register (W)
+ m_fdc->dsr_w(space, 0, data, 0xff);
+ break;
+
+ case 1: // FIFO Data Port (W)
+ m_fdc->fifo_w(space, 0, data, 0xff);
+ break;
+
+ default:
+ break;
+ }
}
READ8_MEMBER( sun4_state::irq_r )
@@ -1307,7 +1411,7 @@ READ8_MEMBER( sun4_state::irq_r )
WRITE8_MEMBER( sun4_state::irq_w )
{
//printf("%02x to IRQ\n", data);
-
+
m_irq_reg = data;
}
@@ -1464,7 +1568,7 @@ static MACHINE_CONFIG_START( sun4, sun4_state )
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_BIG)
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(32)
MCFG_ADDRESS_MAP_BANK_STRIDE(0x80000000)
-
+
// MMU Type 1 device space
MCFG_DEVICE_ADD("type1", ADDRESS_MAP_BANK, 0)
MCFG_DEVICE_PROGRAM_MAP(type1space_s4_map)
@@ -1509,7 +1613,7 @@ static MACHINE_CONFIG_START( sun4c, sun4_state )
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_BIG)
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(32)
MCFG_ADDRESS_MAP_BANK_STRIDE(0x80000000)
-
+
// MMU Type 1 device space
MCFG_DEVICE_ADD("type1", ADDRESS_MAP_BANK, 0)
MCFG_DEVICE_PROGRAM_MAP(type1space_map)
@@ -1531,6 +1635,12 @@ static MACHINE_CONFIG_START( sun4c, sun4_state )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(SCC2_TAG, z80scc_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(SCC2_TAG, z80scc_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(SCC2_TAG, z80scc_device, ctsb_w))
+
+ MCFG_SCREEN_ADD("bwtwo", RASTER)
+ MCFG_SCREEN_UPDATE_DRIVER(sun4_state, bw2_update)
+ MCFG_SCREEN_SIZE(1152,900)
+ MCFG_SCREEN_VISIBLE_AREA(0, 1152-1, 0, 900-1)
+ MCFG_SCREEN_REFRESH_RATE(72)
MACHINE_CONFIG_END
/*
@@ -1628,10 +1738,10 @@ U0501 Revision
ROM_START( sun4_110 )
ROM_REGION32_BE( 0x80000, "user1", ROMREGION_ERASEFF )
- ROM_LOAD32_BYTE( "520-1651-09_2.8.1.bin", 0x000003, 0x010000, CRC(9b439222) SHA1(b3589f65478e53338aee6355567484421a913d00) )
- ROM_LOAD32_BYTE( "520-1652-09_2.8.1.bin", 0x000002, 0x010000, CRC(2bed25ec) SHA1(a9ff6c94ec8e0d6b084a300ff7bd8f2126c7a3b1) )
- ROM_LOAD32_BYTE( "520-1653-09_2.8.1.bin", 0x000001, 0x010000, CRC(d44b7f76) SHA1(2acea449d7782a10fda7f6529279a7e1882549e3) )
- ROM_LOAD32_BYTE( "520-1654-09_2.8.1.bin", 0x000000, 0x010000, CRC(1bef8469) SHA1(d5a89d29df7ffc01b305cd12d0b6eb77e126dcbf) )
+ ROM_LOAD32_BYTE( "520-1651-09_2.8.1.bin", 0x000003, 0x010000, CRC(9b439222) SHA1(b3589f65478e53338aee6355567484421a913d00) )
+ ROM_LOAD32_BYTE( "520-1652-09_2.8.1.bin", 0x000002, 0x010000, CRC(2bed25ec) SHA1(a9ff6c94ec8e0d6b084a300ff7bd8f2126c7a3b1) )
+ ROM_LOAD32_BYTE( "520-1653-09_2.8.1.bin", 0x000001, 0x010000, CRC(d44b7f76) SHA1(2acea449d7782a10fda7f6529279a7e1882549e3) )
+ ROM_LOAD32_BYTE( "520-1654-09_2.8.1.bin", 0x000000, 0x010000, CRC(1bef8469) SHA1(d5a89d29df7ffc01b305cd12d0b6eb77e126dcbf) )
ROM_END
// Sun 4/300, Cypress Semiconductor CY7C601, Texas Instruments 8847 FPU
@@ -1655,10 +1765,10 @@ ROM_END
ROM_START( sun4_400 )
ROM_REGION32_BE( 0x80000, "user1", ROMREGION_ERASEFF )
- ROM_LOAD32_BYTE( "525-1103-06_4.1.1.bin", 0x000000, 0x010000, CRC(c129c0a8) SHA1(4ecd51fb924e65f773a09cae35ce16b1744bd7b9) )
- ROM_LOAD32_BYTE( "525-1104-06_4.1.1.bin", 0x000001, 0x010000, CRC(fe3a95fc) SHA1(c3ebb89eb07d421ed4f3d7e1a66eb286f5a743e9) )
- ROM_LOAD32_BYTE( "525-1105-06_4.1.1.bin", 0x000002, 0x010000, CRC(0dc3564f) SHA1(c86e640be0ef14636a4de065ab73b5671501c555) )
- ROM_LOAD32_BYTE( "525-1106-06_4.1.1.bin", 0x000003, 0x010000, CRC(4464a98b) SHA1(41fd033296904476b53dfe7513eb8da403d7acd4) )
+ ROM_LOAD32_BYTE( "525-1103-06_4.1.1.bin", 0x000000, 0x010000, CRC(c129c0a8) SHA1(4ecd51fb924e65f773a09cae35ce16b1744bd7b9) )
+ ROM_LOAD32_BYTE( "525-1104-06_4.1.1.bin", 0x000001, 0x010000, CRC(fe3a95fc) SHA1(c3ebb89eb07d421ed4f3d7e1a66eb286f5a743e9) )
+ ROM_LOAD32_BYTE( "525-1105-06_4.1.1.bin", 0x000002, 0x010000, CRC(0dc3564f) SHA1(c86e640be0ef14636a4de065ab73b5671501c555) )
+ ROM_LOAD32_BYTE( "525-1106-06_4.1.1.bin", 0x000003, 0x010000, CRC(4464a98b) SHA1(41fd033296904476b53dfe7513eb8da403d7acd4) )
ROM_END
// SPARCstation IPC (Sun 4/40)
@@ -1691,7 +1801,7 @@ ROM_END
// SPARCstation 1+ (Sun 4/65)
ROM_START( sun4_65 )
ROM_REGION32_BE( 0x80000, "user1", ROMREGION_ERASEFF )
- ROM_LOAD( "525-1108-05_1.3_ver_4.bin", 0x000000, 0x020000, CRC(67f1b3e2) SHA1(276ec5ca1dcbdfa202120560f55d52036720f87d) )
+ ROM_LOAD( "525-1108-05_1.3_ver_4.bin", 0x000000, 0x020000, CRC(67f1b3e2) SHA1(276ec5ca1dcbdfa202120560f55d52036720f87d) )
ROM_END
// SPARCstation 2 (Sun 4/75)
diff --git a/src/mame/drivers/tim100.cpp b/src/mame/drivers/tim100.cpp
index d21b88dabb4..02d7de0fa61 100644
--- a/src/mame/drivers/tim100.cpp
+++ b/src/mame/drivers/tim100.cpp
@@ -1,50 +1,68 @@
// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-/***************************************************************************
+// copyright-holders:Miodrag Milanovic, Robbbert
+/********************************************************************************************************
- TIM-100 Terminal
- Mihajlo Pupin Institute
+TIM-100 Terminal
+Mihajlo Pupin Institute
- 21/12/2012 Skeleton driver.
+2012/12/21 Skeleton driver.
+2016/07/14 Fixed display etc [Robbbert]
-****************************************************************************/
+Notes:
+- Serial terminals appear to need 8 bits, 2 stop bits, odd parity @ 9600
+- Unable to set these settings as default, because std::bad_cast fatal error occurs at start
+- Unable to type anything as it seems uarts want BRKDET activated all the time, which we cannot do.
+- Unable to find any technical info at all, so it's all guesswork.
+
+*******************************************************************************************************/
#include "emu.h"
#include "cpu/i8085/i8085.h"
#include "machine/i8251.h"
#include "video/i8275.h"
+#include "bus/rs232/rs232.h"
+#include "machine/clock.h"
class tim100_state : public driver_device
{
public:
tim100_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_palette(*this, "palette")
+ : driver_device(mconfig, type, tag)
+ , m_p_videoram(*this, "videoram")
+ , m_maincpu(*this, "maincpu")
+ , m_palette(*this, "palette")
+ , m_crtc(*this, "crtc")
+ , m_uart17(*this, "uart_u17")
+ , m_uart18(*this, "uart_u18")
{ }
- required_device<cpu_device> m_maincpu;
- required_device<palette_device> m_palette;
- virtual void machine_start() override;
- virtual void machine_reset() override;
+ WRITE_LINE_MEMBER(drq_w);
+ WRITE_LINE_MEMBER(irq_w);
+ WRITE_LINE_MEMBER(clock_w);
I8275_DRAW_CHARACTER_MEMBER( crtc_display_pixels );
private:
+ virtual void machine_start() override;
UINT8 *m_charmap;
+ UINT16 m_dma_adr;
+ required_shared_ptr<UINT8> m_p_videoram;
+ required_device<cpu_device> m_maincpu;
+ required_device<palette_device> m_palette;
+ required_device<i8275_device> m_crtc;
+ required_device<i8251_device> m_uart17;
+ required_device<i8251_device> m_uart18;
};
static ADDRESS_MAP_START(tim100_mem, AS_PROGRAM, 8, tim100_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x1fff) AM_ROM // 2764 at U16
- AM_RANGE(0x2000, 0x27ff) AM_RAM // 2KB static ram CDM6116A at U15
-
- AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("i8276", i8275_device, read, write)
-
- AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("uart_u17", i8251_device, status_r, control_w)
- AM_RANGE(0x6001, 0x6001) AM_DEVREADWRITE("uart_u17", i8251_device, data_r, data_w)
-
- AM_RANGE(0x8000, 0x8000) AM_DEVREADWRITE("uart_u18", i8251_device, status_r, control_w)
- AM_RANGE(0x8001, 0x8001) AM_DEVREADWRITE("uart_u18", i8251_device, data_r, data_w)
+ AM_RANGE(0x2000, 0x27ff) AM_RAM AM_SHARE("videoram") // 2KB static ram CDM6116A at U15
+ AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("uart_u17", i8251_device, data_r, data_w)
+ AM_RANGE(0x6001, 0x6001) AM_DEVREADWRITE("uart_u17", i8251_device, status_r, control_w)
+ AM_RANGE(0x8000, 0x8000) AM_DEVREADWRITE("uart_u18", i8251_device, data_r, data_w)
+ AM_RANGE(0x8001, 0x8001) AM_DEVREADWRITE("uart_u18", i8251_device, status_r, control_w)
+ AM_RANGE(0xa000, 0xa000) AM_WRITENOP // continuously writes 00 here
+ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("crtc", i8275_device, read, write) // i8276
ADDRESS_MAP_END
static ADDRESS_MAP_START(tim100_io, AS_IO, 8, tim100_state)
@@ -57,6 +75,15 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( tim100 )
INPUT_PORTS_END
+static DEVICE_INPUT_DEFAULTS_START( tim100 )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
+ DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
+ DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_ODD )
+ DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
+DEVICE_INPUT_DEFAULTS_END
+
static const rgb_t tim100_palette[3] = {
rgb_t(0x00, 0x00, 0x00), // black
rgb_t(0xa0, 0xa0, 0xa0), // white
@@ -66,10 +93,6 @@ static const rgb_t tim100_palette[3] = {
void tim100_state::machine_start()
{
m_charmap = memregion("chargen")->base();
-}
-
-void tim100_state::machine_reset()
-{
m_palette->set_pen_colors(0, tim100_palette, ARRAY_LENGTH(tim100_palette));
}
@@ -90,34 +113,60 @@ static GFXDECODE_START( tim100 )
GFXDECODE_END
-// this gets called via a (i8275_dack_w), so does nothing currently
-// once fixed, pixel count needs adjusting
I8275_DRAW_CHARACTER_MEMBER( tim100_state::crtc_display_pixels )
{
- int i;
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- UINT8 pixels = m_charmap[(linecount & 15) + (charcode << 4)];
- if (vsp)
+ UINT8 pixels;
+ for (UINT8 i = 0; i < 2; i++)
{
- pixels = 0;
+ pixels = m_charmap[(i * 0x1000) | (linecount & 15) | (charcode << 4)];
+ if (vsp)
+ pixels = 0;
+
+ if (lten)
+ pixels = 0xff;
+
+ if (rvv)
+ pixels ^= 0xff;
+
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 7) ? (hlgt ? 2 : 1) : 0];
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 6) ? (hlgt ? 2 : 1) : 0];
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 5) ? (hlgt ? 2 : 1) : 0];
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 4) ? (hlgt ? 2 : 1) : 0];
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 3) ? (hlgt ? 2 : 1) : 0];
+ bitmap.pix32(y, x++) = palette[BIT(pixels, 2) ? (hlgt ? 2 : 1) : 0];
}
+}
- if (lten)
+WRITE_LINE_MEMBER( tim100_state::drq_w )
+{
+ if (state)
{
- pixels = 0xff;
+ address_space& mem = m_maincpu->space(AS_PROGRAM);
+ m_crtc->dack_w(mem, 0, m_p_videoram[m_dma_adr++]);
}
+}
- if (rvv)
+WRITE_LINE_MEMBER( tim100_state::irq_w )
+{
+ if (state)
{
- pixels ^= 0xff;
+ m_dma_adr = 2;
+ m_maincpu->set_input_line(I8085_RST65_LINE, HOLD_LINE);
}
+ else
+ m_maincpu->set_input_line(I8085_RST65_LINE, CLEAR_LINE);
+}
- for(i=0;i<8;i++) // 6 pixels
- {
- bitmap.pix32(y, x + i) = palette[(pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0];
- }
+DECLARE_WRITE_LINE_MEMBER( tim100_state::clock_w )
+{
+ m_uart17->write_txc(state);
+ m_uart17->write_rxc(state);
+ m_uart18->write_txc(state);
+ m_uart18->write_rxc(state);
}
+
static MACHINE_CONFIG_START( tim100, tim100_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",I8085A, XTAL_4_9152MHz) // divider unknown
@@ -126,28 +175,52 @@ static MACHINE_CONFIG_START( tim100, tim100_state )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DEVICE("i8276", i8275_device, screen_update)
+ MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(40*16, 16*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*16-1, 0, 16*16-1)
+ MCFG_SCREEN_SIZE(40*12, 16*16)
+ MCFG_SCREEN_VISIBLE_AREA(0, 40*12-1, 0, 16*16-1)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", tim100 )
- MCFG_DEVICE_ADD("i8276", I8275, XTAL_4_9152MHz)
- MCFG_I8275_CHARACTER_WIDTH(16)
+ MCFG_DEVICE_ADD("crtc", I8275, XTAL_4_9152MHz)
+ MCFG_I8275_CHARACTER_WIDTH(12)
MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(tim100_state, crtc_display_pixels)
- MCFG_I8275_IRQ_CALLBACK(INPUTLINE("maincpu", I8085_RST65_LINE))
+ MCFG_I8275_DRQ_CALLBACK(WRITELINE(tim100_state, drq_w))
+ MCFG_I8275_IRQ_CALLBACK(WRITELINE(tim100_state, irq_w))
+ MCFG_VIDEO_SET_SCREEN("screen")
MCFG_PALETTE_ADD("palette", 3)
MCFG_DEVICE_ADD("uart_u17", I8251, 0)
+ MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
+ MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
+ MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
+
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "keyboard")
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart_u17", i8251_device, write_rxd))
+ MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart_u17", i8251_device, write_dsr))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart_u17", i8251_device, write_cts))
+ MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", tim100 )
+
MCFG_DEVICE_ADD("uart_u18", I8251, 0)
+ MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_txd))
+ MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_dtr))
+ MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_rts))
+
+ MCFG_RS232_PORT_ADD("rs232a", default_rs232_devices, "terminal") //"keyboard")
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart_u18", i8251_device, write_rxd))
+ MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart_u18", i8251_device, write_dsr))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart_u18", i8251_device, write_cts))
+ MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", tim100 )
+
+ MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(tim100_state, clock_w))
MACHINE_CONFIG_END
/* ROM definition */
ROM_START( tim100 )
- ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x2000, "maincpu", 0 )
ROM_LOAD( "tim 100 v.3.2.0.u16", 0x0000, 0x2000, CRC(4de9c8ad) SHA1(b0914d6e8d618e92a87b4b39c35391541251e8cc))
// The first and 2nd halves of these roms are identical, confirmed ok
diff --git a/src/mame/drivers/tm990189.cpp b/src/mame/drivers/tm990189.cpp
index c586d7797b2..c4bf55120a2 100644
--- a/src/mame/drivers/tm990189.cpp
+++ b/src/mame/drivers/tm990189.cpp
@@ -439,9 +439,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return ""; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index 797497e578a..052fb4a6824 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -17,8 +17,10 @@
Known games (followed by game ID, some are duplicate):
1943 Kai (65)
+ Adventure Island (64)
Aero Blaster (32)
After Burner II (46)
+ Alice in Wonderland (61)
* Ankoku Densetu (Legendary Axe II)
Armed-F (?)
Ballistix (186)
@@ -44,8 +46,10 @@
* Dragon Egg!
Dragon Saber (65)
Dragon Spirit (?)
+ Drop Rock Hora Hora (12)
Dungeon Explorer (?)
* F1 Triple Battle
+ Fighting Run (195)
Final Blaster (29)
Final Lap Twin (79)
Final Match Tennis (62)
@@ -54,15 +58,19 @@
Gunhed (148)
Hana Taka Daka (Super Long Nose Goblin) (6)
* Hatris
+ Image Fight (99)
Jackie Chan (54)
Jinmu Densho (19)
+ Kato & Ken (42)
Kiki Kaikai (120)
Legend Of Hero Tomna (56)
Makyo Densetsu - The Legenary Axe (?)
+ Mesopotamia (197)
Mizubaku Daibouken Liquid Kids (10) (marketed as "Parasol Stars II")
Mr. Heli (23)
Ninja Ryukenden (10)
Operation Wolf (26)
+ Ordyne (94)
Out Run (38)
Override (53)
Pac-Land (16)
@@ -74,11 +82,11 @@
Power Eleven (83)
* Power Golf
Power League IV (?)
- * Power Sports
+ Power Sports (199)
Pro Yakyuu World Stadium '91 (192)
Psycho Chaser (14)
Puzzle Boy (57)
- * Puzznic
+ Puzznic (69)
R-Type II (61)
* Rabio Lepus Special
Raiden (111)
@@ -88,18 +96,21 @@
Shinobi (5)
Side Arms (2)
Skweek (89)
- * Soldier Blade
+ Sokoban World (66)
+ Soldier Blade (23)
Son Son II (80)
Special Criminal Investigation (58)
+ Spin Pair (50)
Super Star Soldier (42)
- Super Volley ball (?)
+ Super Volley ball (9)
Tatsujin (31)
Terra Cresta II (27)
+ The NewZealand Story (11)
Thunder Blade (?)
* Tiger Road
* Titan
Toy Shop Boys (51)
- * Tricky
+ Tricky (42)
* TV Sports
USA Pro Basketball (?)
Veigues (40)
diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp
index 85e557cac23..19d4bbc3802 100644
--- a/src/mame/drivers/tx0.cpp
+++ b/src/mame/drivers/tx0.cpp
@@ -367,9 +367,7 @@ public:
virtual bool is_creatable() const override { return 0; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -402,9 +400,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -438,9 +434,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "typ"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
@@ -473,9 +467,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "tap"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index d3c77194da5..d600fa0100b 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -75,13 +75,19 @@ void vixen_state::update_interrupt()
READ8_MEMBER( vixen_state::opram_r )
{
- membank("bank3")->set_entry(0); // read videoram
- return m_program->read_byte(offset);
+ if (!space.debugger_access())
+ membank("bank3")->set_entry(0); // read videoram
+ bool const prev_debugger_access(m_program->debugger_access());
+ m_program->set_debugger_access(space.debugger_access());
+ UINT8 const data(m_program->read_byte(offset));
+ m_program->set_debugger_access(prev_debugger_access);
+ return data;
}
READ8_MEMBER( vixen_state::oprom_r )
{
- membank("bank3")->set_entry(1); // read rom
+ if (!space.debugger_access())
+ membank("bank3")->set_entry(1); // read rom
return m_rom[offset];
}
diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp
index e8fe578f5bb..185f5d0ac12 100644
--- a/src/mame/drivers/vt240.cpp
+++ b/src/mame/drivers/vt240.cpp
@@ -20,7 +20,7 @@
#include "machine/x2212.h"
#include "video/upd7220.h"
-#define VERBOSE_DBG 1 /* general debug messages */
+#define VERBOSE_DBG 0 /* general debug messages */
#define DBG_LOG(N,M,A) \
do { \
@@ -123,7 +123,7 @@ WRITE_LINE_MEMBER(vt240_state::write_keyboard_clock)
WRITE_LINE_MEMBER(vt240_state::lben_w)
{
- m_lb = state ? false : true;
+ m_lb = state ? true : false;
}
WRITE_LINE_MEMBER(vt240_state::t11_reset_w)
@@ -386,45 +386,46 @@ WRITE16_MEMBER(vt240_state::vram_w)
if(ps == 0)
i++;
UINT8 mem = video_ram[(offset & 0x7fff) + (0x8000 * i)];
+ UINT8 out = 0, ifore = BIT(m_lu, (i ? 5 : 4)), iback = BIT(m_lu, (i ? 3 : 2));
+ for(int j = 0; j < 8; j++)
+ out |= BIT(chr, j) ? (ifore << j) : (iback << j);
switch(m_lu >> 6)
{
case 0:
break;
case 1:
- chr |= mem;
+ out |= mem;
break;
case 2:
logerror("invalid logic unit mode 2\n");
break;
case 3:
- chr ^= mem;
+ out ^= ~mem;
break;
}
- UINT8 out = 0, ifore = BIT(m_lu, (i ? 5 : 4)), iback = BIT(m_lu, (i ? 3 : 2));
- for(int j = 0; j < 8; j++)
- out |= BIT(chr, j) ? (ifore << j) : (iback << j);
if(!BIT(m_reg0, 3))
out = (out & ~m_mask) | (mem & m_mask);
else
out = (out & data) | (mem & ~data);
if(BIT(m_reg1, 3))
{
+ UINT8 out2 = out;
if(BIT(m_reg1, 2))
{
- out = mem;
- video_ram[((m_scrl << 1) | (offset & 1)) + (0x8000 * i)] = out;
+ out = video_ram[((offset & 0x7ffe) | 0) + (0x8000 * i)];
+ out2 = video_ram[((offset & 0x7ffe) | 1) + (0x8000 * i)];
}
- else
- {
- video_ram[((m_scrl << 1) | 0) + (0x8000 * i)] = out;
- video_ram[((m_scrl << 1) | 1) + (0x8000 * i)] = out;
- }
- m_scrl += BIT(m_reg1, 1) ? -1 : 1;
- m_scrl &= 0x3fff;
+ video_ram[((m_scrl << 1) | 0) + (0x8000 * i)] = out;
+ video_ram[((m_scrl << 1) | 1) + (0x8000 * i)] = out2;
}
else
video_ram[(offset & 0x7fff) + (0x8000 * i)] = out;
}
+ if(BIT(m_reg1, 3))
+ {
+ m_scrl += BIT(m_reg1, 1) ? -1 : 1;
+ m_scrl &= 0x3fff;
+ }
return;
}
if(!BIT(m_reg0, 3))
@@ -433,16 +434,14 @@ WRITE16_MEMBER(vt240_state::vram_w)
data = (chr & data) | (video_ram[offset] & ~data);
if(BIT(m_reg1, 3))
{
+ UINT8 data2 = data;
if(BIT(m_reg1, 2))
{
- data = video_ram[offset];
- video_ram[(m_scrl << 1) | (offset & 1)] = data;
- }
- else
- {
- video_ram[(m_scrl << 1) | 0] = data;
- video_ram[(m_scrl << 1) | 1] = data;
+ data = video_ram[(offset & ~1) | 0];
+ data2 = video_ram[(offset & ~1) | 1];
}
+ video_ram[(offset & 0x8000) | (m_scrl << 1) | 0] = data;
+ video_ram[(offset & 0x8000) | (m_scrl << 1) | 1] = data2;
m_scrl += BIT(m_reg1, 1) ? -1 : 1;
m_scrl &= 0x3fff;
}
@@ -671,7 +670,7 @@ static MACHINE_CONFIG_DERIVED( mc7105, vt240 )
// baud rate is supposed to be 4800 but keyboard is slightly faster
MCFG_DEVICE_REMOVE("keyboard_clock")
- MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
+ MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*64)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(vt240_state, write_keyboard_clock))
MACHINE_CONFIG_END
@@ -731,7 +730,7 @@ ROM_START( vt240 )
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1983, vt240, 0, 0, vt240, vt240, driver_device, 0, "Digital Equipment Corporation", "VT240", MACHINE_NOT_WORKING )
+COMP( 1983, vt240, 0, 0, vt240, vt240, driver_device, 0, "Digital Equipment Corporation", "VT240", MACHINE_IMPERFECT_GRAPHICS )
//COMP( 1983, vt241, 0, 0, vt220, vt220, driver_device, 0, "Digital Equipment Corporation", "VT241", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
// NOTE: the only difference between VT240 and VT241 is the latter comes with a VR241 Color monitor, while the former comes with a mono display; the ROMs and operation are identical.
-COMP( 1983, mc7105, 0, 0, mc7105, vt240, driver_device, 0, "Elektronika", "MC7105", MACHINE_NOT_WORKING )
+COMP( 1983, mc7105, 0, 0, mc7105, vt240, driver_device, 0, "Elektronika", "MC7105", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/wc90b.cpp b/src/mame/drivers/wc90b.cpp
index 7d849d44429..c97f88b4267 100644
--- a/src/mame/drivers/wc90b.cpp
+++ b/src/mame/drivers/wc90b.cpp
@@ -515,4 +515,4 @@ ROM_END
GAME( 1989, wc90b1, wc90, wc90b, wc90b, driver_device, 0, ROT0, "bootleg", "Euro League (Italian hack of Tecmo World Cup '90)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1989, wc90b2, wc90, wc90b, wc90b, driver_device, 0, ROT0, "bootleg", "Worldcup '90", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1989, wc90ba, wc90, wc90b, wc90b, driver_device, 0, ROT0, "bootleg", "Euro League (Italian hack of Temco World Cup '90 - alt version)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1989, wc90ba, wc90, wc90b, wc90b, driver_device, 0, ROT0, "bootleg", "Euro League (Italian hack of Tecmo World Cup '90 - alt version)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h
index 557f5e97b4d..aba98cff98c 100644
--- a/src/mame/includes/airbustr.h
+++ b/src/mame/includes/airbustr.h
@@ -75,20 +75,20 @@ public:
DECLARE_READ8_MEMBER(soundcommand2_r);
DECLARE_WRITE8_MEMBER(soundcommand_w);
DECLARE_WRITE8_MEMBER(soundcommand2_w);
- DECLARE_WRITE8_MEMBER(airbustr_coin_counter_w);
- DECLARE_WRITE8_MEMBER(airbustr_videoram_w);
- DECLARE_WRITE8_MEMBER(airbustr_colorram_w);
- DECLARE_WRITE8_MEMBER(airbustr_videoram2_w);
- DECLARE_WRITE8_MEMBER(airbustr_colorram2_w);
- DECLARE_WRITE8_MEMBER(airbustr_scrollregs_w);
+ DECLARE_WRITE8_MEMBER(coin_counter_w);
+ DECLARE_WRITE8_MEMBER(videoram_w);
+ DECLARE_WRITE8_MEMBER(colorram_w);
+ DECLARE_WRITE8_MEMBER(videoram2_w);
+ DECLARE_WRITE8_MEMBER(colorram2_w);
+ DECLARE_WRITE8_MEMBER(scrollregs_w);
DECLARE_DRIVER_INIT(airbustr);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
- UINT32 screen_update_airbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void screen_eof_airbustr(screen_device &screen, bool state);
+ UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void screen_eof(screen_device &screen, bool state);
INTERRUPT_GEN_MEMBER(slave_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(airbustr_scanline);
};
diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h
index 7ff39c253df..6c7abd7f54c 100644
--- a/src/mame/includes/ajax.h
+++ b/src/mame/includes/ajax.h
@@ -46,15 +46,15 @@ public:
required_device<generic_latch_8_device> m_soundlatch;
DECLARE_WRITE8_MEMBER(sound_bank_w);
- DECLARE_READ8_MEMBER(ajax_ls138_f10_r);
- DECLARE_WRITE8_MEMBER(ajax_ls138_f10_w);
- DECLARE_WRITE8_MEMBER(ajax_bankswitch_2_w);
- DECLARE_WRITE8_MEMBER(ajax_bankswitch_w);
- DECLARE_WRITE8_MEMBER(ajax_lamps_w);
+ DECLARE_READ8_MEMBER(ls138_f10_r);
+ DECLARE_WRITE8_MEMBER(ls138_f10_w);
+ DECLARE_WRITE8_MEMBER(bankswitch_2_w);
+ DECLARE_WRITE8_MEMBER(bankswitch_w);
+ DECLARE_WRITE8_MEMBER(lamps_w);
DECLARE_WRITE8_MEMBER(k007232_extvol_w);
virtual void machine_start() override;
virtual void machine_reset() override;
- UINT32 screen_update_ajax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE8_MEMBER(volume_callback0);
DECLARE_WRITE8_MEMBER(volume_callback1);
K051316_CB_MEMBER(zoom_callback);
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h
index cd6b6ba249e..7b7b4df2239 100644
--- a/src/mame/includes/apollo.h
+++ b/src/mame/includes/apollo.h
@@ -363,9 +363,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "ani,bin"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
DECLARE_WRITE16_MEMBER(write);
DECLARE_READ16_MEMBER(read);
diff --git a/src/mame/includes/epos.h b/src/mame/includes/epos.h
index da411ad52a1..1f9d5ed9565 100644
--- a/src/mame/includes/epos.h
+++ b/src/mame/includes/epos.h
@@ -23,13 +23,14 @@ public:
/* misc */
int m_counter;
DECLARE_WRITE8_MEMBER(dealer_decrypt_rom);
- DECLARE_WRITE8_MEMBER(epos_port_1_w);
+ DECLARE_WRITE8_MEMBER(port_1_w);
DECLARE_WRITE8_MEMBER(write_prtc);
+ DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_DRIVER_INIT(dealer);
virtual void machine_reset() override;
DECLARE_MACHINE_START(epos);
DECLARE_MACHINE_START(dealer);
- UINT32 screen_update_epos(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void get_pens( pen_t *pens );
required_device<cpu_device> m_maincpu;
};
diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h
index 2ca07fecbb8..ca5c0687e76 100644
--- a/src/mame/includes/hp48.h
+++ b/src/mame/includes/hp48.h
@@ -190,9 +190,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "crd"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/mame/machine/ajax.cpp b/src/mame/machine/ajax.cpp
index 9deefef82aa..5f38deb1281 100644
--- a/src/mame/machine/ajax.cpp
+++ b/src/mame/machine/ajax.cpp
@@ -16,7 +16,7 @@
#include "includes/ajax.h"
-/* ajax_bankswitch_w:
+/* bankswitch_w:
Handled by the LS273 Octal +ve edge trigger D-type Flip-flop with Reset at H11:
Bit Description
@@ -33,7 +33,7 @@
(*) The Coin Counters are handled by the Konami Custom 051550
*/
-WRITE8_MEMBER(ajax_state::ajax_bankswitch_w)
+WRITE8_MEMBER(ajax_state::bankswitch_w)
{
int bank = 0;
@@ -50,10 +50,10 @@ WRITE8_MEMBER(ajax_state::ajax_bankswitch_w)
/* bank # (ROMS N11 and N12) */
bank += (data & 0x07);
- membank("bank2")->set_entry(bank);
+ membank("mainbank")->set_entry(bank);
}
-/* ajax_lamps_w:
+/* lamps_w:
Handled by the LS273 Octal +ve edge trigger D-type Flip-flop with Reset at B9:
Bit Description
@@ -77,7 +77,7 @@ WRITE8_MEMBER(ajax_state::ajax_bankswitch_w)
LS393 C20 Dual -ve edge trigger 4-bit Binary Ripple Counter with Resets
*/
-WRITE8_MEMBER(ajax_state::ajax_lamps_w)
+WRITE8_MEMBER(ajax_state::lamps_w)
{
output().set_led_value(1, data & 0x02); /* super weapon lamp */
output().set_led_value(2, data & 0x04); /* power up lamps */
@@ -106,7 +106,7 @@ WRITE8_MEMBER(ajax_state::ajax_lamps_w)
0x01c0 (r) MIO2 Enables DIPSW #3 reading
*/
-READ8_MEMBER(ajax_state::ajax_ls138_f10_r)
+READ8_MEMBER(ajax_state::ls138_f10_r)
{
int data = 0, index;
static const char *const portnames[] = { "SYSTEM", "P1", "DSW1", "DSW2" };
@@ -134,7 +134,7 @@ READ8_MEMBER(ajax_state::ajax_ls138_f10_r)
return data;
}
-WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w)
+WRITE8_MEMBER(ajax_state::ls138_f10_w)
{
switch ((offset & 0x01c0) >> 6)
{
@@ -153,10 +153,10 @@ WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w)
m_soundlatch->write(space, offset, data);
break;
case 0x03: /* Bankswitch + coin counters + priority*/
- ajax_bankswitch_w(space, 0, data);
+ bankswitch_w(space, 0, data);
break;
case 0x05: /* Lamps + Joystick vibration + Control panel quaking */
- ajax_lamps_w(space, 0, data);
+ lamps_w(space, 0, data);
break;
default:
@@ -164,7 +164,7 @@ WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w)
}
}
-/* ajax_bankswitch_w_2:
+/* bankswitch_w_2:
Handled by the LS273 Octal +ve edge trigger D-type Flip-flop with Reset at K14:
Bit Description
@@ -179,7 +179,7 @@ WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w)
0 SRB0 /
*/
-WRITE8_MEMBER(ajax_state::ajax_bankswitch_2_w)
+WRITE8_MEMBER(ajax_state::bankswitch_2_w)
{
/* enable char ROM reading through the video RAM */
m_k052109->set_rmrd_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
@@ -191,7 +191,7 @@ WRITE8_MEMBER(ajax_state::ajax_bankswitch_2_w)
m_firq_enable = data & 0x10;
/* bank # (ROMS G16 and I16) */
- membank("bank1")->set_entry(data & 0x0f);
+ membank("subbank")->set_entry(data & 0x0f);
}
void ajax_state::machine_start()
@@ -199,11 +199,9 @@ void ajax_state::machine_start()
UINT8 *MAIN = memregion("maincpu")->base();
UINT8 *SUB = memregion("sub")->base();
- membank("bank1")->configure_entries(0, 9, &SUB[0x10000], 0x2000);
- membank("bank2")->configure_entries(0, 12, &MAIN[0x10000], 0x2000);
-
- membank("bank1")->set_entry(0);
- membank("bank2")->set_entry(0);
+ membank("mainbank")->configure_entries(0, 4, &MAIN[0x00000], 0x2000);
+ membank("mainbank")->configure_entries(4, 8, &MAIN[0x10000], 0x2000);
+ membank("subbank")->configure_entries(0, 9, &SUB[0x00000], 0x2000);
save_item(NAME(m_priority));
save_item(NAME(m_firq_enable));
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index b22ef889e37..f451db8993e 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -71,7 +71,7 @@ void archimedes_state::archimedes_request_fiq(int mask)
m_ioc_regs[FIQ_STATUS] |= mask;
//printf("STATUS:%02x IRQ:%02x MASK:%02x\n",m_ioc_regs[FIQ_STATUS],mask,m_ioc_regs[FIQ_MASK]);
-
+
if (m_ioc_regs[FIQ_STATUS] & m_ioc_regs[FIQ_MASK])
{
generic_pulse_irq_line(m_maincpu, ARM_FIRQ_LINE, 1);
diff --git a/src/mame/machine/coco_vhd.h b/src/mame/machine/coco_vhd.h
index 45f9f5fb224..c1b5b9bac90 100644
--- a/src/mame/machine/coco_vhd.h
+++ b/src/mame/machine/coco_vhd.h
@@ -36,9 +36,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "vhd"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
DECLARE_READ8_MEMBER(read) { return read(offset); }
diff --git a/src/mame/machine/microdrv.h b/src/mame/machine/microdrv.h
index 30853bd84d7..7c4c79ba3da 100644
--- a/src/mame/machine/microdrv.h
+++ b/src/mame/machine/microdrv.h
@@ -61,7 +61,6 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return "ql_cass"; }
virtual const char *file_extensions() const override { return "mdv"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
DECLARE_WRITE_LINE_MEMBER( clk_w );
diff --git a/src/mame/machine/ng_memcard.h b/src/mame/machine/ng_memcard.h
index a0638ffdb32..e81cfb03c79 100644
--- a/src/mame/machine/ng_memcard.h
+++ b/src/mame/machine/ng_memcard.h
@@ -41,7 +41,6 @@ public:
virtual bool must_be_loaded() const override { return false; }
virtual bool is_reset_on_load() const override { return false; }
virtual const char *file_extensions() const override { return "neo"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_load() override;
virtual void call_unload() override;
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp
index 1db3c9abf61..7fc4029677b 100644
--- a/src/mame/machine/osborne1.cpp
+++ b/src/mame/machine/osborne1.cpp
@@ -116,7 +116,12 @@ READ8_MEMBER( osborne1_state::opcode_r )
}
// Now that's sorted out we can call the normal read handler
- return m_maincpu->space(AS_PROGRAM).read_byte(offset);
+ address_space &program_space(m_maincpu->space(AS_PROGRAM));
+ bool const prev_debugger_access(program_space.debugger_access());
+ program_space.set_debugger_access(space.debugger_access());
+ UINT8 const data(program_space.read_byte(offset));
+ program_space.set_debugger_access(prev_debugger_access);
+ return data;
}
WRITE8_MEMBER( osborne1_state::bankswitch_w )
diff --git a/src/mame/machine/pce220_ser.h b/src/mame/machine/pce220_ser.h
index 6e035fc8521..1e7874feadd 100644
--- a/src/mame/machine/pce220_ser.h
+++ b/src/mame/machine/pce220_ser.h
@@ -38,9 +38,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "txt,ihx"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
UINT8 in_xin(void) { return m_xin & 0x01; }
diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp
index 2b400996f75..8296ac44fef 100644
--- a/src/mame/machine/sms.cpp
+++ b/src/mame/machine/sms.cpp
@@ -1324,7 +1324,7 @@ VIDEO_START_MEMBER(sms_state,sms1)
save_item(NAME(m_frame_sscope_state));
// Allow sscope screens to have crosshair, useful for the game missil3d
- machine().crosshair().set_screen(0, CROSSHAIR_SCREEN_ALL);
+ machine().crosshair().get_crosshair(0).set_screen(CROSSHAIR_SCREEN_ALL);
}
diff --git a/src/mame/machine/x68k_hdc.h b/src/mame/machine/x68k_hdc.h
index a79f3d956a6..3b41b8b0924 100644
--- a/src/mame/machine/x68k_hdc.h
+++ b/src/mame/machine/x68k_hdc.h
@@ -92,9 +92,7 @@ public:
virtual bool is_creatable() const override { return 1; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
- virtual const char *image_interface() const override { return nullptr; }
virtual const char *file_extensions() const override { return "hdf"; }
- virtual const option_guide *create_option_guide() const override { return nullptr; }
virtual bool call_create(int format_type, util::option_resolution *format_options) override;
DECLARE_WRITE16_MEMBER( hdc_w );
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 0f3e84daed6..a868ffc8504 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -11801,6 +11801,7 @@ suprglob // (c) 1983
theglob // (c) 1983
theglob2 // (c) 1983
theglob3 // (c) 1983
+beastf // (c) 1984
@source:eprom.cpp
eprom // 136069 (c) 1989
@@ -13658,8 +13659,8 @@ gstrikera // (c) [1993] Human
gstrikerj // (c) [1993] Human
twrldc94 // (c) 1994 Tecmo
twrldc94a // (c) 1994 Tecmo
-vgoalsca // (c) 199? Temco
-vgoalsoc // (c) 199? Temco
+vgoalsca // (c) 199? Tecmo
+vgoalsoc // (c) 199? Tecmo
@source:gsword.cpp
gsword // AC (c) 1984 Taito Corporation
@@ -29083,7 +29084,7 @@ abscam // hack
acitya // (c) 1983 Epos Corporation
alibaba // (c) 1982 Sega
alibabab // Mustafa" and 40 Thieves (Ali Baba bootleg)
-beastf // (c) 1984 Epos Corporation
+beastfp // (c) 1984 Epos Corporation
bigbucks // (c) 1986 Dynasoft Inc.
birdiy // (c) 1983 Mama Top
bucaner // hack
diff --git a/src/mame/video/airbustr.cpp b/src/mame/video/airbustr.cpp
index e258fa7a547..e6f1aa4af4a 100644
--- a/src/mame/video/airbustr.cpp
+++ b/src/mame/video/airbustr.cpp
@@ -35,25 +35,25 @@
#include "emu.h"
#include "includes/airbustr.h"
-WRITE8_MEMBER(airbustr_state::airbustr_videoram_w)
+WRITE8_MEMBER(airbustr_state::videoram_w)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(airbustr_state::airbustr_colorram_w)
+WRITE8_MEMBER(airbustr_state::colorram_w)
{
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(airbustr_state::airbustr_videoram2_w)
+WRITE8_MEMBER(airbustr_state::videoram2_w)
{
m_videoram2[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
-WRITE8_MEMBER(airbustr_state::airbustr_colorram2_w)
+WRITE8_MEMBER(airbustr_state::colorram2_w)
{
m_colorram2[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
@@ -71,7 +71,7 @@ WRITE8_MEMBER(airbustr_state::airbustr_colorram2_w)
Bg Y Bg X Fg Y Fg X <-Scroll High Bits (complemented!)
*/
-WRITE8_MEMBER(airbustr_state::airbustr_scrollregs_w)
+WRITE8_MEMBER(airbustr_state::scrollregs_w)
{
switch (offset) // offset 0 <-> port 4
{
@@ -125,7 +125,7 @@ void airbustr_state::video_start()
}
-UINT32 airbustr_state::screen_update_airbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 airbustr_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@@ -136,7 +136,7 @@ UINT32 airbustr_state::screen_update_airbustr(screen_device &screen, bitmap_ind1
return 0;
}
-void airbustr_state::screen_eof_airbustr(screen_device &screen, bool state)
+void airbustr_state::screen_eof(screen_device &screen, bool state)
{
// rising edge
if (state)
diff --git a/src/mame/video/ajax.cpp b/src/mame/video/ajax.cpp
index 35e68312860..6185728851d 100644
--- a/src/mame/video/ajax.cpp
+++ b/src/mame/video/ajax.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Manuel Abadia
/***************************************************************************
- video.c
+ ajax.cpp
Functions to emulate the video hardware of the machine.
@@ -72,7 +72,7 @@ K051316_CB_MEMBER(ajax_state::zoom_callback)
***************************************************************************/
-UINT32 ajax_state::screen_update_ajax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 ajax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_k052109->tilemap_update();
diff --git a/src/mame/video/cave.cpp b/src/mame/video/cave.cpp
index 777d4a878fe..de62851e4c8 100644
--- a/src/mame/video/cave.cpp
+++ b/src/mame/video/cave.cpp
@@ -1715,11 +1715,11 @@ UINT32 cave_state::screen_update_ppsatan_top(screen_device &screen, bitmap_rgb32
}
UINT32 cave_state::screen_update_ppsatan_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- machine().crosshair().set_screen(1, &screen);
+ machine().crosshair().get_crosshair(1).set_screen(&screen);
return screen_update_ppsatan_core(screen, bitmap, cliprect, 1);
}
UINT32 cave_state::screen_update_ppsatan_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- machine().crosshair().set_screen(0, &screen);
+ machine().crosshair().get_crosshair(0).set_screen(&screen);
return screen_update_ppsatan_core(screen, bitmap, cliprect, 2);
}
diff --git a/src/mame/video/epos.cpp b/src/mame/video/epos.cpp
index 55f58b09062..ecc350afd0a 100644
--- a/src/mame/video/epos.cpp
+++ b/src/mame/video/epos.cpp
@@ -54,8 +54,12 @@ void epos_state::get_pens( pen_t *pens )
}
}
+WRITE8_MEMBER(epos_state::flip_screen_w)
+{
+ flip_screen_set(BIT(data, 7));
+}
-WRITE8_MEMBER(epos_state::epos_port_1_w)
+WRITE8_MEMBER(epos_state::port_1_w)
{
/* D0 - start light #1
D1 - start light #2
@@ -73,7 +77,7 @@ WRITE8_MEMBER(epos_state::epos_port_1_w)
}
-UINT32 epos_state::screen_update_epos(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+UINT32 epos_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
pen_t pens[0x20];
offs_t offs;
@@ -86,6 +90,12 @@ UINT32 epos_state::screen_update_epos(screen_device &screen, bitmap_rgb32 &bitma
int x = (offs % 136) * 2;
int y = (offs / 136);
+
+ if (flip_screen())
+ {
+ x = 270 - x; // wrong
+ y = 240 - y; // wrong
+ }
bitmap.pix32(y, x + 0) = pens[(m_palette << 4) | (data & 0x0f)];
bitmap.pix32(y, x + 1) = pens[(m_palette << 4) | (data >> 4)];
diff --git a/src/mame/video/rdptpipe.cpp b/src/mame/video/rdptpipe.cpp
index b8371c0c0d7..31d63bb532e 100644
--- a/src/mame/video/rdptpipe.cpp
+++ b/src/mame/video/rdptpipe.cpp
@@ -342,7 +342,7 @@ void n64_texture_pipe_t::cycle_linear_lerp(color_t* TEX, color_t* prev, INT32 SS
TEX->add(t0);
TEX->add(t2);
TEX->add(t3);
- TEX->sra(2);
+ TEX->sra_imm(2);
}
}
diff --git a/src/osd/sdl/video.cpp b/src/osd/sdl/video.cpp
index 0a38902c64c..38204017290 100644
--- a/src/osd/sdl/video.cpp
+++ b/src/osd/sdl/video.cpp
@@ -388,7 +388,7 @@ void sdl_osd_interface::extract_video_config()
video_config.syncrefresh = options().sync_refresh();
if (!video_config.waitvsync && video_config.syncrefresh)
{
- osd_printf_warning("-syncrefresh specified without -waitsync. Reverting to -nosyncrefresh\n");
+ osd_printf_warning("-syncrefresh specified without -waitvsync. Reverting to -nosyncrefresh\n");
video_config.syncrefresh = 0;
}