summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author motoschifo <motoschifo@users.noreply.github.com>2016-02-13 20:34:21 +0100
committer motoschifo <motoschifo@users.noreply.github.com>2016-02-13 20:34:21 +0100
commite49253b0e0cfde7975a2f14190c1e5ad3a339d16 (patch)
treeba7f543e83f3b7f4cf0df7a1c8d2dd0f518f98f5
parent8b880ab07f43c80461e9645628da36929076c4d0 (diff)
parentc62ba64a5028055f4bff0bd8c840bcdb16fa08d6 (diff)
Merge pull request #3 from mamedev/master
Update from original
-rw-r--r--hash/electron_cass.xml8
-rw-r--r--hash/m5_cart.xml142
-rw-r--r--hash/m5_flop.xml2
-rw-r--r--scripts/build/makedep.py4
-rw-r--r--scripts/target/mame/arcade.lua4
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/bus/amiga/zorro/zorro.h4
-rw-r--r--src/devices/cpu/m6800/6800dasm.cpp16
-rw-r--r--src/devices/cpu/m6800/6800ops.inc20
-rw-r--r--src/devices/cpu/m6800/6800tbl.inc6
-rw-r--r--src/devices/cpu/m6800/m6800.h5
-rw-r--r--src/devices/machine/dmac.cpp39
-rw-r--r--src/devices/machine/dmac.h2
-rw-r--r--src/devices/machine/pic8259.cpp5
-rw-r--r--src/devices/machine/ram.cpp13
-rw-r--r--src/devices/machine/ram.h4
-rw-r--r--src/devices/video/jangou_blitter.cpp82
-rw-r--r--src/devices/video/jangou_blitter.h10
-rw-r--r--src/emu/inpttype.h6
-rw-r--r--src/emu/ioport.h6
-rw-r--r--src/emu/ui/custmenu.cpp42
-rw-r--r--src/emu/ui/datfile.cpp27
-rw-r--r--src/emu/ui/datfile.h15
-rw-r--r--src/emu/ui/datmenu.cpp573
-rw-r--r--src/emu/ui/datmenu.h77
-rw-r--r--src/emu/ui/dsplmenu.cpp26
-rw-r--r--src/emu/ui/mainmenu.cpp69
-rw-r--r--src/emu/ui/mainmenu.h9
-rw-r--r--src/emu/ui/menu.cpp338
-rw-r--r--src/emu/ui/menu.h13
-rw-r--r--src/emu/ui/optsmenu.cpp34
-rw-r--r--src/emu/ui/optsmenu.h1
-rw-r--r--src/emu/ui/selgame.cpp429
-rw-r--r--src/emu/ui/selgame.h17
-rw-r--r--src/emu/ui/selsoft.cpp13
-rw-r--r--src/emu/ui/simpleselgame.cpp4
-rw-r--r--src/emu/ui/simpleselgame.h1
-rw-r--r--src/emu/ui/toolbar.h69
-rw-r--r--src/emu/ui/utils.cpp14
-rw-r--r--src/emu/ui/utils.h16
-rw-r--r--src/lib/netlist/devices/net_lib.cpp3
-rw-r--r--src/mame/arcade.lst13
-rw-r--r--src/mame/audio/laserbat.cpp85
-rw-r--r--src/mame/audio/zaccaria.cpp466
-rw-r--r--src/mame/audio/zaccaria.h135
-rw-r--r--src/mame/drivers/1943.cpp62
-rw-r--r--src/mame/drivers/1945kiii.cpp197
-rw-r--r--src/mame/drivers/amazonlf.cpp91
-rw-r--r--src/mame/drivers/amiga.cpp17
-rw-r--r--src/mame/drivers/apple1.cpp11
-rw-r--r--src/mame/drivers/apple2e.cpp135
-rw-r--r--src/mame/drivers/asteroid.cpp18
-rw-r--r--src/mame/drivers/bublbobl.cpp37
-rw-r--r--src/mame/drivers/chihiro.cpp11
-rw-r--r--src/mame/drivers/fidel6502.cpp255
-rw-r--r--src/mame/drivers/fidel68k.cpp120
-rw-r--r--src/mame/drivers/fidelz80.cpp260
-rw-r--r--src/mame/drivers/flagrall.cpp225
-rw-r--r--src/mame/drivers/gaelco2.cpp6
-rw-r--r--src/mame/drivers/galpanic.cpp50
-rw-r--r--src/mame/drivers/goldstar.cpp295
-rw-r--r--src/mame/drivers/hh_ucom4.cpp2
-rw-r--r--src/mame/drivers/jangou.cpp73
-rw-r--r--src/mame/drivers/kchamp.cpp4
-rw-r--r--src/mame/drivers/laserbat.cpp41
-rw-r--r--src/mame/drivers/mitchell.cpp2
-rw-r--r--src/mame/drivers/nightgal.cpp160
-rw-r--r--src/mame/drivers/notetaker.cpp151
-rw-r--r--src/mame/drivers/pc9801.cpp7
-rw-r--r--src/mame/drivers/punchout.cpp58
-rw-r--r--src/mame/drivers/zaccaria.cpp267
-rw-r--r--src/mame/includes/galpanic.h23
-rw-r--r--src/mame/includes/laserbat.h35
-rw-r--r--src/mame/includes/punchout.h2
-rw-r--r--src/mame/includes/xbox.h10
-rw-r--r--src/mame/includes/zaccaria.h86
-rw-r--r--src/mame/layout/fidel_eag.lay20
-rw-r--r--src/mame/machine/gaelco2.cpp78
-rw-r--r--src/mame/machine/xbox.cpp99
-rw-r--r--src/mame/mess.lst2
-rw-r--r--src/mame/video/chihiro.cpp37
-rw-r--r--src/mame/video/galpanic.cpp31
-rw-r--r--src/mame/video/x68k.cpp2
-rw-r--r--src/osd/modules/osdwindow.h6
-rw-r--r--src/osd/modules/render/drawbgfx.cpp174
-rw-r--r--src/osd/sdl/window.cpp12
-rw-r--r--src/osd/sdl/window.h3
-rw-r--r--src/osd/windows/window.cpp13
88 files changed, 3287 insertions, 2769 deletions
diff --git a/hash/electron_cass.xml b/hash/electron_cass.xml
index 1ce422fddd5..8dce4799365 100644
--- a/hash/electron_cass.xml
+++ b/hash/electron_cass.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?>
+<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<!-- Electron Tapes -->
@@ -1229,7 +1229,7 @@
<software name="bugs">
<description>Bugs</description>
<year>1984</year>
- <publisher>>Virgin Games</publisher>
+ <publisher>Virgin Games</publisher>
<part name="cass" interface="electron_cass">
<dataarea name="cass" size="4276">
<rom name="bugs_e.uef" size="4276" crc="baccb319" sha1="65db34438d85422e2dccd3c1ad47ec1c1df21205" offset="0"/>
@@ -5066,7 +5066,7 @@
<software name="jungleji">
<description>Jungle Jive</description>
<year>1984</year>
- <publisher>>Virgin Games</publisher>
+ <publisher>Virgin Games</publisher>
<part name="cass" interface="electron_cass">
<dataarea name="cass" size="4738">
<rom name="junglejive_e.uef" size="4738" crc="d6b33eb1" sha1="db009e9bfab2cbe95a3c397b923892f477f38a1b" offset="0"/>
@@ -6065,7 +6065,7 @@
</part>
</software>
- <software name="nmaremazbr" cloneof="nmaremaz">>
+ <software name="nmaremazbr" cloneof="nmaremaz">
<description>Nightmare Maze (Blue Ribbon)</description>
<year>1984</year>
<publisher>Blue Ribbon</publisher>
diff --git a/hash/m5_cart.xml b/hash/m5_cart.xml
index 194e624fd79..c090bd9cfe1 100644
--- a/hash/m5_cart.xml
+++ b/hash/m5_cart.xml
@@ -608,85 +608,85 @@ come from... they might be eventually removed -->
<!-- This is only Sord memory expansion -->
- <software name="em-5" supported="no">
- <description>EM-5 Expansion memory 32Kb</description>
- <year>198?</year>
- <publisher>Sord</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="32768">
- </dataarea>
- </part>
- </software>
+ <software name="em-5" supported="no">
+ <description>EM-5 Expansion memory 32Kb</description>
+ <year>198?</year>
+ <publisher>Sord</publisher>
+ <part name="cart" interface="m5_cart">
+ <feature name="slot" value="ram"/>
+ <dataarea name="ram" size="32768">
+ </dataarea>
+ </part>
+ </software>
<!-- Homebrew memory modules -->
- <software name="64kbi" supported="no">
- <description>EM-64 Expansion memory 64Kb</description>
- <year>198?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- </part>
- </software>
-
- <software name="64kbf" supported="no">
- <description>64Kbf Expansion memory 64Kb</description>
- <year>199?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- <dataarea name="rom" size="20480">
- <rom name="basic-f (198x)(sord)(jp).bin" size="20480" crc="47be051f" sha1="9942b8f05a441b5dee7ab31ec5b8a643f7e268b8" offset="00000"/>
- </dataarea>
- </part>
- </software>
+ <software name="64kbi" supported="no">
+ <description>EM-64 Expansion memory 64Kb</description>
+ <year>198?</year>
+ <publisher>unknown</publisher>
+ <part name="cart" interface="m5_cart">
+ <feature name="slot" value="ram"/>
+ <dataarea name="ram" size="65536">
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="64kbf" supported="no">
+ <description>64Kbf Expansion memory 64Kb</description>
+ <year>199?</year>
+ <publisher>unknown</publisher>
+ <part name="cart" interface="m5_cart">
+ <feature name="slot" value="ram"/>
+ <dataarea name="ram" size="65536">
+ </dataarea>
+ <dataarea name="rom" size="20480">
+ <rom name="basic-f (198x)(sord)(jp).bin" size="20480" crc="47be051f" sha1="9942b8f05a441b5dee7ab31ec5b8a643f7e268b8" offset="00000"/>
+ </dataarea>
+ </part>
+ </software>
- <software name="64krx" supported="no">
- <description>64Krx Expansion board 64Kb</description>
- <year>199?</year>
- <publisher>unknown</publisher>
- <part name="cart" interface="m5_cart">
- <feature name="slot" value="ram"/>
- <dataarea name="ram" size="65536">
- </dataarea>
- <dataarea name="rom" size="0x16000">
- <rom name="krx_rom2.rom" size="0x2000" crc="5AF18FBD" sha1="cd67d65fb51cdb3a47cc8350a878a77360a353c8" offset="0x0000"/>
+ <software name="64krx" supported="no">
+ <description>64Krx Expansion board 64Kb</description>
+ <year>199?</year>
+ <publisher>unknown</publisher>
+ <part name="cart" interface="m5_cart">
+ <feature name="slot" value="ram"/>
+ <dataarea name="ram" size="65536">
+ </dataarea>
+ <dataarea name="rom" size="0x16000">
+ <rom name="krx_rom2.rom" size="0x2000" crc="5AF18FBD" sha1="cd67d65fb51cdb3a47cc8350a878a77360a353c8" offset="0x0000"/>
<rom name="basic-i (198x)(sord)(jp).bin" size="0x2000" crc="9a98e6ce" sha1="d11f7623919ee593e275e9f00f8a4acf7aed3cf5" offset="0x2000"/>
- <rom name="krx_rom4.rom" size="0x4000" crc="27FFB883" sha1="be930946e7cd5f0f3e803792906e087cce122703" offset="0x6000"/>
- <rom name="krx_rom5.rom" size="0x4000" crc="107B5DDC" sha1="071fa84c7b10d9d7841c504564825609ebf66140" offset="0xa000"/>
- <rom name="krx_rom6.rom" size="0x4000" crc="4D6E9C1A" sha1="d8bf96fc4016e245fd84d713fd988dd503a38d0b" offset="0xe000"/>
- <rom name="krx_rom7.rom" size="0x4000" crc="4EF7830A" sha1="9527236af9dd0db25498f4029793703ba8672af5" offset="0x12000"/>
+ <rom name="krx_rom4.rom" size="0x4000" crc="27FFB883" sha1="be930946e7cd5f0f3e803792906e087cce122703" offset="0x6000"/>
+ <rom name="krx_rom5.rom" size="0x4000" crc="107B5DDC" sha1="071fa84c7b10d9d7841c504564825609ebf66140" offset="0xa000"/>
+ <rom name="krx_rom6.rom" size="0x4000" crc="4D6E9C1A" sha1="d8bf96fc4016e245fd84d713fd988dd503a38d0b" offset="0xe000"/>
+ <rom name="krx_rom7.rom" size="0x4000" crc="4EF7830A" sha1="9527236af9dd0db25498f4029793703ba8672af5" offset="0x12000"/>
</dataarea>
- </part>
- </software>
+ </part>
+ </software>
<!-- Brno mod ROMs -->
- <software name="brnoboot" supported="no">
- <description>Boot for Brno ramdisk</description>
- <year>1989</year>
- <publisher>&lt;Pavel Brychta a spol.&gt;</publisher>
- <part name="cart" interface="m5_cart">
- <dataarea name="rom" size="3456">
- <rom name="brno_boot.rom" size="3456" crc="60008729" sha1="FB26E2AE9F74B0AE0D723B417A038A8EF3D72782" offset="00000"/>
- </dataarea>
- </part>
- </software>
-
- <software name="brno_win" supported="no">
- <description>Brno windows boot</description>
- <year>1989</year>
- <publisher>&lt;Ladislav Novak&gt;</publisher>
- <part name="cart" interface="m5_cart">
- <dataarea name="rom" size="8192">
- <rom name="brno_win.rom" size="8192" crc="f4cfb2ee" sha1="23f41d2d9ac915545409dd0163f3dc298f04eea2" offset="00000"/>
- </dataarea>
- </part>
- </software>
+ <software name="brnoboot" supported="no">
+ <description>Boot for Brno ramdisk</description>
+ <year>1989</year>
+ <publisher>&lt;Pavel Brychta a spol.&gt;</publisher>
+ <part name="cart" interface="m5_cart">
+ <dataarea name="rom" size="3456">
+ <rom name="brno_boot.rom" size="3456" crc="60008729" sha1="FB26E2AE9F74B0AE0D723B417A038A8EF3D72782" offset="00000"/>
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="brno_win" supported="no">
+ <description>Brno windows boot</description>
+ <year>1989</year>
+ <publisher>&lt;Ladislav Novak&gt;</publisher>
+ <part name="cart" interface="m5_cart">
+ <dataarea name="rom" size="8192">
+ <rom name="brno_win.rom" size="8192" crc="f4cfb2ee" sha1="23f41d2d9ac915545409dd0163f3dc298f04eea2" offset="00000"/>
+ </dataarea>
+ </part>
+ </software>
</softwarelist>
diff --git a/hash/m5_flop.xml b/hash/m5_flop.xml
index 1c9beb03a8e..54ab259fc8c 100644
--- a/hash/m5_flop.xml
+++ b/hash/m5_flop.xml
@@ -8,7 +8,7 @@
<publisher></publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="860416">
- <rom name="brno_boot_cpm.dsk" size="860416" crc="dabb3256" sha1="61a5d638f6166e09d3bbbb12b653f6bf3fb2393f" offset="0" />
+ <rom name="brno_boot_cpm.dsk" size="860416" crc="9484f399" sha1="efd1e664d5f4b80a7d49078cc80d187f72f4bc2f" offset="0" />
</dataarea>
</part>
</software>
diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py
index eba69370621..88035d776af 100644
--- a/scripts/build/makedep.py
+++ b/scripts/build/makedep.py
@@ -204,7 +204,9 @@ def parse_file_for_drivers(root, srcfile):
if len(content)>0:
if content.startswith('COMP') or content.startswith('CONS') or content.startswith('GAME') or content.startswith('SYST') or content.startswith('GAMEL'):
name = content[4:]
- drivers.append(name.rsplit(',', 14)[1])
+ splitname = name.rsplit(',', 14)
+ if len(splitname)>1:
+ drivers.append(splitname[1])
return 0
def parse_lua_file(srcfile):
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index e41da449e2e..f59119796fc 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -4021,6 +4021,8 @@ files {
createMAMEProjects(_target, _subtarget, "zaccaria")
files {
+ MAME_DIR .. "src/mame/audio/zaccaria.cpp",
+ MAME_DIR .. "src/mame/audio/zaccaria.h",
MAME_DIR .. "src/mame/drivers/laserbat.cpp",
MAME_DIR .. "src/mame/includes/laserbat.h",
MAME_DIR .. "src/mame/video/laserbat.cpp",
@@ -4247,6 +4249,7 @@ files {
MAME_DIR .. "src/mame/machine/inder_vid.cpp",
MAME_DIR .. "src/mame/machine/inder_vid.h",
MAME_DIR .. "src/mame/drivers/corona.cpp",
+ MAME_DIR .. "src/mame/drivers/amazonlf.cpp",
MAME_DIR .. "src/mame/drivers/crystal.cpp",
MAME_DIR .. "src/mame/video/vrender0.cpp",
MAME_DIR .. "src/mame/video/vrender0.h",
@@ -4286,7 +4289,6 @@ files {
MAME_DIR .. "src/mame/drivers/extrema.cpp",
MAME_DIR .. "src/mame/drivers/fastinvaders.cpp",
MAME_DIR .. "src/mame/drivers/fireball.cpp",
- MAME_DIR .. "src/mame/drivers/flagrall.cpp",
MAME_DIR .. "src/mame/drivers/flipjack.cpp",
MAME_DIR .. "src/mame/drivers/flower.cpp",
MAME_DIR .. "src/mame/includes/flower.h",
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index c1e73771342..cb9a150224a 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -1700,6 +1700,7 @@ files {
MAME_DIR .. "src/mame/drivers/fidelz80.cpp",
MAME_DIR .. "src/mame/includes/fidelz80.h",
MAME_DIR .. "src/mame/drivers/fidel6502.cpp",
+ MAME_DIR .. "src/mame/drivers/fidel68k.cpp",
}
createMESSProjects(_target, _subtarget, "force")
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h
index fb14b7f09ca..7a37e334ada 100644
--- a/src/devices/bus/amiga/zorro/zorro.h
+++ b/src/devices/bus/amiga/zorro/zorro.h
@@ -166,8 +166,10 @@
#define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \
+ device_t *temp = device; \
zorro_device::set_cputag(*device, _cputag); \
- MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot)
+ MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) \
+ device = temp;
// callbacks
#define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \
diff --git a/src/devices/cpu/m6800/6800dasm.cpp b/src/devices/cpu/m6800/6800dasm.cpp
index 49f908013cd..2e94ef3b62d 100644
--- a/src/devices/cpu/m6800/6800dasm.cpp
+++ b/src/devices/cpu/m6800/6800dasm.cpp
@@ -52,7 +52,8 @@ enum op_names {
rts, sba, sbca, sbcb, sec, sev, sta, stb,
_std, sei, sts, stx, suba, subb, subd, swi,
wai, tab, tap, tba, tim, tpa, tst, tsta,
- tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx
+ tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx,
+ bitx
};
static const char *const op_name_str[] = {
@@ -71,7 +72,8 @@ static const char *const op_name_str[] = {
"rts", "sba", "sbca", "sbcb", "sec", "sev", "sta", "stb",
"std", "sei", "sts", "stx", "suba", "subb", "subd", "swi",
"wai", "tab", "tap", "tba", "tim", "tpa", "tst", "tsta",
- "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx"
+ "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx",
+ "bitx"
};
/*
@@ -82,7 +84,7 @@ static const char *const op_name_str[] = {
* 2 invalid opcode for 1:6800/6802/6808, 2:6801/6803, 4:HD63701
*/
-static const UINT8 table[0x102][3] = {
+static const UINT8 table[0x104][3] = {
{ill, inh,7},{nop, inh,0},{ill, inh,7},{ill, inh,7},/* 00 */
{lsrd,inh,1},{asld,inh,1},{tap, inh,0},{tpa, inh,0},
{inx, inh,0},{dex, inh,0},{clv, inh,0},{sev, inh,0},
@@ -151,7 +153,11 @@ static const UINT8 table[0x102][3] = {
/* extra instruction $fc for NSC-8105 */
{addx,ext,0},
/* extra instruction $ec for NSC-8105 */
- {adcx,imb,0}
+ {adcx,imb,0},
+ /* extra instruction $bb for NSC-8105 */
+ {bitx,imx,0},
+ /* extra instruction $b2 for NSC-8105 */
+ {stx,imx,0}
};
/* some macros to keep things short */
@@ -188,6 +194,8 @@ static unsigned Dasm680x (int subtype, char *buf, unsigned pc, const UINT8 *opro
/* and check for extra instruction */
if (code == 0xfc) code = 0x0100;
if (code == 0xec) code = 0x0101;
+ if (code == 0x7b) code = 0x0102;
+ if (code == 0x71) code = 0x0103;
}
opcode = table[code][0];
diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc
index 4e92e401be7..078529d16ab 100644
--- a/src/devices/cpu/m6800/6800ops.inc
+++ b/src/devices/cpu/m6800/6800ops.inc
@@ -2285,17 +2285,18 @@ OP_HANDLER( stx_ex )
}
/* NSC8105 specific, guessed opcodes (tested by Night Gal Summer) */
-// $bb - load A from [X + $0]
-OP_HANDLER( ldax_imm )
+// $bb - $mask & [X + $disp8]
+OP_HANDLER( btst_ix )
{
UINT8 val;
- {EA=X+((M_RDOP_ARG(PCD)<<8) | M_RDOP_ARG((PCD+1)&0xffff));PC+=2;}
- val = RM(EAD);
+ UINT8 mask = M_RDOP_ARG(PCD);
+ {EA=X+(M_RDOP_ARG(PCD+1));PC+=2;}
+ val = RM(EAD) & mask;
CLR_NZVC; SET_NZ8(val);
}
// $b2 - assuming correct, store first byte to (X + $disp8)
-OP_HANDLER( nsc_unk )
+OP_HANDLER( stx_nsc )
{
IMM8;
UINT8 val = RM(EAD);
@@ -2304,13 +2305,4 @@ OP_HANDLER( nsc_unk )
CLR_NZV;
SET_NZ8(val);
WM(EAD,val);
-}
-
-// $00 - store A to [X + $0]
-OP_HANDLER( stax_imm )
-{
- CLR_NZV;
- SET_NZ8(A);
- EA=X;
- WM(EAD,A);
} \ No newline at end of file
diff --git a/src/devices/cpu/m6800/6800tbl.inc b/src/devices/cpu/m6800/6800tbl.inc
index 266ddb2a55c..10515e54bdc 100644
--- a/src/devices/cpu/m6800/6800tbl.inc
+++ b/src/devices/cpu/m6800/6800tbl.inc
@@ -106,7 +106,7 @@ const m6800_cpu_device::op_func m6800_cpu_device::hd63701_insn[0x100] = {
const m6800_cpu_device::op_func m6800_cpu_device::nsc8105_insn[0x100] = {
// 0
-&m6800_cpu_device::stax_imm,&m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::illegal,&m6800_cpu_device::tpa,
+&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::illegal,&m6800_cpu_device::tpa,
// 8
&m6800_cpu_device::inx, &m6800_cpu_device::clv, &m6800_cpu_device::dex, &m6800_cpu_device::sev, &m6800_cpu_device::clc, &m6800_cpu_device::cli, &m6800_cpu_device::sec, &m6800_cpu_device::sei,
// 10
@@ -150,9 +150,9 @@ const m6800_cpu_device::op_func m6800_cpu_device::nsc8105_insn[0x100] = {
// a8
&m6800_cpu_device::asl_ix, &m6800_cpu_device::dec_ix, &m6800_cpu_device::rol_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::inc_ix, &m6800_cpu_device::jmp_ix, &m6800_cpu_device::tst_ix, &m6800_cpu_device::clr_ix,
// b0
-&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::nsc_unk,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex,
+&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_nsc,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex,
// b8
-&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::ldax_imm,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex,
+&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::btst_ix,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex,
&m6800_cpu_device::subb_im,&m6800_cpu_device::sbcb_im,&m6800_cpu_device::cmpb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_im,&m6800_cpu_device::ldb_im, &m6800_cpu_device::bitb_im,&m6800_cpu_device::stb_im,
&m6800_cpu_device::eorb_im,&m6800_cpu_device::orb_im, &m6800_cpu_device::adcb_im,&m6800_cpu_device::addb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::ldx_im, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_im,
&m6800_cpu_device::subb_di,&m6800_cpu_device::sbcb_di,&m6800_cpu_device::cmpb_di,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_di,&m6800_cpu_device::ldb_di, &m6800_cpu_device::bitb_di,&m6800_cpu_device::stb_di,
diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h
index 6ddffe64242..82696a6ee43 100644
--- a/src/devices/cpu/m6800/m6800.h
+++ b/src/devices/cpu/m6800/m6800.h
@@ -426,9 +426,8 @@ protected:
void cpx_im();
void cpx_ix();
void trap();
- void ldax_imm();
- void stax_imm();
- void nsc_unk();
+ void btst_ix();
+ void stx_nsc();
};
diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp
index 34992fc4f5c..ba1167eb2d5 100644
--- a/src/devices/machine/dmac.cpp
+++ b/src/devices/machine/dmac.cpp
@@ -145,6 +145,8 @@ void dmac_device::check_interrupts()
// any interrupts pending?
if (m_istr & ISTR_INT_MASK)
m_istr |= ISTR_INT_P;
+ else
+ m_istr &= ~ISTR_INT_P;
}
else
m_istr &= ~ISTR_INT_P;
@@ -202,18 +204,19 @@ READ16_MEMBER( dmac_device::register_read )
case 0x48:
case 0x49:
- case 0x50:
- case 0x58:
- case 0x59:
- case 0x5a:
- case 0x5b:
- case 0x5c:
- case 0x5e:
- case 0x5f:
data = m_scsi_read_handler(offset);
if (VERBOSE)
- logerror("%s('%s'): read scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+ logerror("%s('%s'): read scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+
+ break;
+
+ case 0x50:
+ case 0x51:
+ case 0x52:
+ case 0x53:
+ if (VERBOSE)
+ logerror("%s('%s'): read xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
break;
@@ -306,20 +309,20 @@ WRITE16_MEMBER( dmac_device::register_write )
case 0x48:
case 0x49:
- case 0x50:
- case 0x58:
- case 0x59:
- case 0x5a:
- case 0x5b:
- case 0x5c:
- case 0x5e:
- case 0x5f:
if (VERBOSE)
- logerror("%s('%s'): write scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+ logerror("%s('%s'): write scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
m_scsi_write_handler(offset, data, 0xff);
break;
+ case 0x50:
+ case 0x51:
+ case 0x52:
+ case 0x53:
+ if (VERBOSE)
+ logerror("%s('%s'): write xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask);
+ break;
+
case 0x70:
if (VERBOSE)
logerror("%s('%s'): write dma start strobe %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask);
diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h
index 2d86c427013..8580b4c86ab 100644
--- a/src/devices/machine/dmac.h
+++ b/src/devices/machine/dmac.h
@@ -128,7 +128,7 @@ private:
ISTR_FE_FLG = 0x001 // fifo-empty flag
};
- static const int ISTR_INT_MASK = 0x1fc;
+ static const int ISTR_INT_MASK = 0x1ec;
// callbacks
devcb_write_line m_cfgout_handler;
diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp
index 40fe6fd916c..3064e212850 100644
--- a/src/devices/machine/pic8259.cpp
+++ b/src/devices/machine/pic8259.cpp
@@ -133,7 +133,10 @@ UINT32 pic8259_device::acknowledge()
}
}
}
- return 0;
+ logerror("Spurious IRQ\n");
+ if(m_is_x86)
+ return m_base + 7;
+ return 0xcd0000 + (m_vector_addr_high << 8) + m_vector_addr_low + (7 << (3-m_vector_size));
}
diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp
index 92728b55303..7dd8f9250a4 100644
--- a/src/devices/machine/ram.cpp
+++ b/src/devices/machine/ram.cpp
@@ -1,5 +1,5 @@
-// license:GPL-2.0+
-// copyright-holders:Dirk Best
+// license: BSD-3-Clause
+// copyright-holders: Dirk Best
/*************************************************************************
RAM device
@@ -23,8 +23,6 @@
// device type definition
const device_type RAM = &device_creator<ram_device>;
-
-
//-------------------------------------------------
// ram_device - constructor
//-------------------------------------------------
@@ -38,8 +36,6 @@ ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t
m_default_value = 0xCD;
}
-
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -68,7 +64,6 @@ void ram_device::device_start()
save_item(NAME(m_pointer));
}
-
//-------------------------------------------------
// device_validity_check - device-specific validity
// checks
@@ -171,8 +166,6 @@ void ram_device::device_validity_check(validity_checker &valid) const
}
}
-
-
//-------------------------------------------------
// parse_string - convert a ram string to an
// integer value
@@ -210,8 +203,6 @@ UINT32 ram_device::parse_string(const char *s)
return ram;
}
-
-
//-------------------------------------------------
// default_size
//-------------------------------------------------
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index 7d3f054895f..5140309f825 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -1,5 +1,5 @@
-// license:GPL-2.0+
-// copyright-holders:Dirk Best
+// license: BSD-3-Clause
+// copyright-holders: Dirk Best
/*************************************************************************
RAM device
diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp
index 07953576a45..e2acdb37ca1 100644
--- a/src/devices/video/jangou_blitter.cpp
+++ b/src/devices/video/jangou_blitter.cpp
@@ -5,7 +5,7 @@
Jangou Custom Blitter Chip, codename "???" (name scratched afaik)
device emulation by Angelo Salese, from original jangou.cpp implementation
- by Angelo Salese, David Haywood and Phil Bennett
+ by Angelo Salese, David Haywood and Phil Bennett.
TODO:
- BLTFLIP mechanism;
@@ -66,6 +66,7 @@ void jangou_blitter_device::device_reset()
{
memset(m_blit_data, 0, ARRAY_LENGTH(m_blit_data));
memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data));
+ m_bltflip = false;
}
@@ -83,19 +84,19 @@ UINT8 jangou_blitter_device::gfx_nibble( UINT32 niboffset )
}
void jangou_blitter_device::plot_gfx_pixel( UINT8 pix, int x, int y )
-{
- if (y < 0 || y >= 512)
+{
+ if (y < 0 || y >= 256)
return;
- if (x < 0 || x >= 512)
+ if (x < 0 || x >= 256)
return;
-
+
if (x & 1)
m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0);
else
m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f);
}
-WRITE8_MEMBER( jangou_blitter_device::blitter_process_w )
+WRITE8_MEMBER( jangou_blitter_device::process_w )
{
int src, x, y, h, w, flipx;
m_blit_data[offset] = data;
@@ -105,14 +106,23 @@ WRITE8_MEMBER( jangou_blitter_device::blitter_process_w )
int count = 0;
int xcount, ycount;
- //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]);
w = (m_blit_data[4] & 0xff) + 1;
h = (m_blit_data[5] & 0xff) + 1;
src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0));
src |= (m_blit_data[6] & 3) << 16;
x = (m_blit_data[2] & 0xff);
y = (m_blit_data[3] & 0xff);
-
+
+ #if 0
+ if(m_bltflip == true)
+ {
+ printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]);
+ printf("=>");
+ for(int i=0;i<0x10;i++)
+ printf("%02x ",m_pen_data[i]);
+ printf("\n");
+ }
+ #endif
// lowest bit of src controls flipping / draw direction?
flipx = (m_blit_data[0] & 1);
@@ -121,6 +131,7 @@ WRITE8_MEMBER( jangou_blitter_device::blitter_process_w )
else
src -= (w * h) - 1;
+
for (ycount = 0; ycount < h; ycount++)
{
for(xcount = 0; xcount < w; xcount++)
@@ -128,13 +139,12 @@ WRITE8_MEMBER( jangou_blitter_device::blitter_process_w )
int drawx = (x + xcount) & 0xff;
int drawy = (y + ycount) & 0xff;
UINT8 dat = gfx_nibble(src + count);
- UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
- UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
+ UINT8 cur_pen = m_pen_data[dat & 0x0f];
- dat = cur_pen_lo | (cur_pen_hi << 4);
+ //dat = cur_pen_lo | (cur_pen_hi << 4);
- if ((dat & 0xff) != 0)
- plot_gfx_pixel(dat, drawx, drawy);
+ if ((cur_pen & 0xff) != 0)
+ plot_gfx_pixel(cur_pen, drawx, drawy);
if (!flipx)
count--;
@@ -142,27 +152,43 @@ WRITE8_MEMBER( jangou_blitter_device::blitter_process_w )
count++;
}
}
+
+ //UINT32 new_src = src + count;
+
+ // update source and height after blitter operation
+ // TODO: Jangou doesn't agree with this, later HW?
+ #if 0
+ m_blit_data[0] = new_src & 0xfe;
+ m_blit_data[1] = new_src >> 8;
+ m_blit_data[5] = 0;
+ m_blit_data[6] = new_src >> 16;
+ #endif
+ m_bltflip = false;
}
}
-WRITE8_MEMBER( jangou_blitter_device::blitter_alt_process_w)
+// Sexy Gal swaps around upper src address
+WRITE8_MEMBER( jangou_blitter_device::alt_process_w )
{
- // TODO: convert this into a more useable function
- switch(offset)
- {
- case 0: blitter_process_w(space,0,data); break;
- case 1: blitter_process_w(space,1,data); break;
- case 2: blitter_process_w(space,6,data); break;
- case 3: blitter_process_w(space,2,data); break;
- case 4: blitter_process_w(space,3,data); break;
- case 5: blitter_process_w(space,4,data); break;
- case 6: blitter_process_w(space,5,data); break;
- }
+ const UINT8 translate_addr[7] = { 0, 1, 6, 2, 3, 4, 5 };
+
+ process_w(space,translate_addr[offset],data);
}
-WRITE8_MEMBER( jangou_blitter_device::blitter_vregs_w)
+WRITE8_MEMBER( jangou_blitter_device::vregs_w )
{
- // printf("%02x %02x\n", offset, data);
- m_pen_data[offset] = data & 0xf;
+ // bit 5 set by Jangou, left-over?
+ m_pen_data[offset] = data & 0x0f;
}
+WRITE8_MEMBER( jangou_blitter_device::bltflip_w )
+{
+ // TODO: unsure about how this works, Charles says it swaps the nibble but afaik it's used for CPU tiles in Night Gal Summer/Sexy Gal and they seems fine?
+ // Maybe flipx is actually bltflip for later HW?
+ m_bltflip = true;
+}
+
+READ_LINE_MEMBER( jangou_blitter_device::status_r )
+{
+ return false;
+}
diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h
index a8a4934a475..7a39172e7ca 100644
--- a/src/devices/video/jangou_blitter.h
+++ b/src/devices/video/jangou_blitter.h
@@ -33,9 +33,12 @@ public:
jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// I/O operations
- DECLARE_WRITE8_MEMBER( blitter_process_w );
- DECLARE_WRITE8_MEMBER( blitter_alt_process_w );
- DECLARE_WRITE8_MEMBER( blitter_vregs_w );
+ DECLARE_WRITE8_MEMBER( process_w );
+ DECLARE_WRITE8_MEMBER( alt_process_w );
+ DECLARE_WRITE8_MEMBER( vregs_w );
+ DECLARE_WRITE8_MEMBER( bltflip_w );
+ DECLARE_READ_LINE_MEMBER( status_r );
+
UINT8 m_blit_buffer[256 * 256];
protected:
@@ -50,6 +53,7 @@ private:
UINT8 m_blit_data[7];
UINT8 *m_gfxrom;
UINT32 m_gfxrommask;
+ bool m_bltflip;
};
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index 504a9e4aa8d..96395a60e7c 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -755,12 +755,8 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, "Load State", input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_START, "UI (First) Tape Start", input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_STOP, "UI (First) Tape Stop", input_seq(KEYCODE_F2, KEYCODE_LSHIFT) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HISTORY, "UI Show History", input_seq(KEYCODE_LALT, KEYCODE_H) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_MAMEINFO, "UI Show Mame/Messinfo", input_seq(KEYCODE_LALT, KEYCODE_M) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_COMMAND, "UI Show Command Info", input_seq(KEYCODE_LALT, KEYCODE_C) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SYSINFO, "UI Show Sysinfo", input_seq(KEYCODE_LALT, KEYCODE_S) )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DATS, "UI External DAT View", input_seq(KEYCODE_LALT, KEYCODE_D) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAVORITES, "UI Add/Remove favorites",input_seq(KEYCODE_LALT, KEYCODE_F) )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_STORY, "UI Show Story.dat", input_seq(KEYCODE_LALT, KEYCODE_T) )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_FILTER, NULL, input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_FILTER, NULL, input_seq() )
INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT_PANEL, NULL, input_seq() )
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index 6048f52e9c0..d398a8df2c1 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -371,12 +371,8 @@ enum ioport_type
IPT_UI_LOAD_STATE,
IPT_UI_TAPE_START,
IPT_UI_TAPE_STOP,
- IPT_UI_HISTORY,
- IPT_UI_MAMEINFO,
- IPT_UI_COMMAND,
- IPT_UI_SYSINFO,
+ IPT_UI_DATS,
IPT_UI_FAVORITES,
- IPT_UI_STORY,
IPT_UI_UP_FILTER,
IPT_UI_DOWN_FILTER,
IPT_UI_LEFT_PANEL,
diff --git a/src/emu/ui/custmenu.cpp b/src/emu/ui/custmenu.cpp
index 45ca407a84b..27cdf2c17c4 100644
--- a/src/emu/ui/custmenu.cpp
+++ b/src/emu/ui/custmenu.cpp
@@ -83,14 +83,14 @@ void ui_menu_custom_filter::handle()
{
custfltr::other[pos]--;
for ( ; custfltr::other[pos] > FILTER_UNAVAILABLE && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE_GAME); custfltr::other[pos]--) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) ;
changed = true;
}
else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::other[pos] < FILTER_LAST - 1)
{
custfltr::other[pos]++;
for ( ; custfltr::other[pos] < FILTER_LAST && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE_GAME); custfltr::other[pos]++) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) ;
changed = true;
}
else if (m_event->iptkey == IPT_UI_SELECT)
@@ -98,7 +98,7 @@ void ui_menu_custom_filter::handle()
size_t total = main_filters::length;
std::vector<std::string> s_sel(total);
for (size_t index = 0; index < total; ++index)
- if (index <= FILTER_UNAVAILABLE || index == FILTER_CATEGORY || index == FILTER_FAVORITE_GAME || index == FILTER_CUSTOM)
+ if (index <= FILTER_UNAVAILABLE || index == FILTER_CATEGORY || index == FILTER_FAVORITE || index == FILTER_CUSTOM)
s_sel[index] = "_skip_";
else
s_sel[index] = main_filters::text[index];
@@ -106,29 +106,6 @@ void ui_menu_custom_filter::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, custfltr::other[pos]));
}
}
- else if ((FPTR)m_event->itemref >= SCREEN_FILTER && (FPTR)m_event->itemref < SCREEN_FILTER + MAX_CUST_FILTER)
- {
- int pos = (int)((FPTR)m_event->itemref - SCREEN_FILTER);
- if (m_event->iptkey == IPT_UI_LEFT && custfltr::screen[pos] > 0)
- {
- custfltr::screen[pos]--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::screen[pos] < screen_filters::length - 1)
- {
- custfltr::screen[pos]++;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- size_t total = screen_filters::length;
- std::vector<std::string> s_sel(total);
- for (size_t index = 0; index < total; ++index)
- s_sel[index] = screen_filters::text[index];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, custfltr::screen[pos]));
- }
- }
else if ((FPTR)m_event->itemref >= YEAR_FILTER && (FPTR)m_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
{
int pos = (int)((FPTR)m_event->itemref - YEAR_FILTER);
@@ -207,16 +184,6 @@ void ui_menu_custom_filter::populate()
convert_command_glyph(fbuff);
item_append(fbuff.c_str(), c_year::ui[custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
}
-
- // add screen subitem
- else if (custfltr::other[x] == FILTER_SCREEN)
- {
- arrow_flags = get_arrow_flags(0, screen_filters::length - 1, custfltr::screen[x]);
- std::string fbuff("^!Screen type");
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), screen_filters::text[custfltr::screen[x]], arrow_flags, (void *)(FPTR)(SCREEN_FILTER + x));
- }
-
}
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
@@ -228,7 +195,6 @@ void ui_menu_custom_filter::populate()
item_append("Add filter", nullptr, 0, (void *)(FPTR)ADD_FILTER);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
-
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -287,8 +253,6 @@ void ui_menu_custom_filter::save_custom_filters()
cinfo.append(" Manufacturer filter = ").append(c_mnfct::ui[custfltr::mnfct[x]]).append("\n");
else if (custfltr::other[x] == FILTER_YEAR)
cinfo.append(" Year filter = ").append(c_year::ui[custfltr::year[x]]).append("\n");
- else if (custfltr::other[x] == FILTER_SCREEN)
- cinfo.append(" Screen filter = ").append(screen_filters::text[custfltr::screen[x]]).append("\n");
}
file.puts(cinfo.c_str());
file.close();
diff --git a/src/emu/ui/datfile.cpp b/src/emu/ui/datfile.cpp
index 5e8af15b335..9171242d072 100644
--- a/src/emu/ui/datfile.cpp
+++ b/src/emu/ui/datfile.cpp
@@ -165,6 +165,21 @@ void datfile_manager::init_command()
osd_printf_verbose("Command.dat games found = %i\n", count);
}
+bool datfile_manager::has_software(std::string &softlist, std::string &softname, std::string &parentname)
+{
+ // Find software in software list index
+ if (m_swindex.find(softlist) == m_swindex.end())
+ return false;
+
+ m_itemsiter = m_swindex[softlist].find(softname);
+ if (m_itemsiter == m_swindex[softlist].end() && !parentname.empty())
+ m_itemsiter = m_swindex[softlist].find(parentname);
+
+ if (m_itemsiter == m_swindex[softlist].end())
+ return false;
+
+ return true;
+}
//-------------------------------------------------
// load software info
//-------------------------------------------------
@@ -174,18 +189,10 @@ void datfile_manager::load_software_info(std::string &softlist, std::string &buf
if (!m_swindex.empty() && parseopen("history.dat"))
{
// Find software in software list index
- if (m_swindex.find(softlist) == m_swindex.end())
- return;
-
- drvindex::iterator itemsiter;
- itemsiter = m_swindex[softlist].find(softname);
- if (itemsiter == m_swindex[softlist].end() && !parentname.empty())
- itemsiter = m_swindex[softlist].find(parentname);
-
- if (itemsiter == m_swindex[softlist].end())
+ if (!has_software(softlist, softname, parentname))
return;
- long s_offset = (*itemsiter).second;
+ long s_offset = (*m_itemsiter).second;
char rbuf[64 * 1024];
fseek(fp, s_offset, SEEK_SET);
std::string readbuf;
diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h
index 959419eb0f7..8002a26daf4 100644
--- a/src/emu/ui/datfile.h
+++ b/src/emu/ui/datfile.h
@@ -31,13 +31,25 @@ public:
void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname);
void command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems);
void reset_run() { first_run = true; }
+ bool has_software(std::string &softlist, std::string &softname, std::string &parentname);
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; }
-
+
+ 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_data(const game_driver *d)
+ {
+ return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d));
+ }
private:
using drvindex = std::unordered_map<std::string, long>;
using dataindex = std::unordered_map<const game_driver *, long>;
@@ -63,6 +75,7 @@ private:
int index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount);
int index_datafile(dataindex &index, int &swcount);
void index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index);
+ drvindex::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);
diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp
index 72ab7509ae0..5e2d574edc0 100644
--- a/src/emu/ui/datmenu.cpp
+++ b/src/emu/ui/datmenu.cpp
@@ -18,107 +18,54 @@
#include "ui/utils.h"
#include "softlist.h"
-/**************************************************
- MENU COMMAND
-**************************************************/
//-------------------------------------------------
// ctor / dtor
//-------------------------------------------------
-ui_menu_command::ui_menu_command(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container)
+ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container)
{
- m_driver = (driver == nullptr) ? &machine.system() : driver;
-}
-
-ui_menu_command::~ui_menu_command()
-{
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_command::populate()
-{
- std::vector<std::string> text;
- machine().datfile().command_sub_menu(m_driver, text);
-
- if (!text.empty())
+ image_interface_iterator iter(machine.root_device());
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
- for (size_t menu_items = 0; menu_items < text.size(); menu_items++)
- item_append(text[menu_items].c_str(), nullptr, 0, (void *)(FPTR)menu_items);
+ if (image->filename())
+ {
+ m_list = strensure(image->software_list_name());
+ m_short = strensure(image->software_entry()->shortname());
+ m_long = strensure(image->software_entry()->longname());
+ m_parent = strensure(image->software_entry()->parentname());
+ }
}
- else
- item_append("No available Command for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_command::handle()
-{
- // process the menu
- const ui_menu_event *m_event = process(0);
+ m_driver = (driver == nullptr) ? &machine.system() : driver;
- if (m_event != nullptr && m_event->iptkey == IPT_UI_SELECT)
- {
- std::string m_title(item[selected].text);
- ui_menu::stack_push(global_alloc_clear<ui_menu_command_content>(machine(), container, m_title, m_driver));
- }
+ init_items();
}
//-------------------------------------------------
-// perform our special rendering
+// ctor
//-------------------------------------------------
-void ui_menu_command::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
+ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container)
{
- float width;
- ui_manager &mui = machine().ui();
- std::string tempbuf = std::string("Command Info - Game: ").append(m_driver->description);
-
- // get the size of the text
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
-
- // take off the borders
- x1 += UI_BOX_LR_BORDER;
- x2 -= UI_BOX_LR_BORDER;
- y1 += UI_BOX_TB_BORDER;
+ m_list = swinfo->listname;
+ m_short = swinfo->shortname;
+ m_long = swinfo->longname;
+ m_parent = swinfo->parentname;
+ m_driver = (driver == nullptr) ? &machine.system() : driver;
+ m_swinfo = swinfo;
- // draw the text within it
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ issoft = true;
+ if (machine.datfile().has_software(m_list, m_short, m_parent))
+ m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history());
+ if (swinfo && !swinfo->usage.empty())
+ m_items_list.emplace_back("Software Usage", 0, "");
}
//-------------------------------------------------
-// ctor / dtor
+// dtor
//-------------------------------------------------
-ui_menu_command_content::ui_menu_command_content(running_machine &machine, render_container *container, std::string p_title, const game_driver *driver) : ui_menu(machine, container)
-{
- m_driver = (driver == nullptr) ? &machine.system() : driver;
- m_title = p_title;
-}
-
-ui_menu_command_content::~ui_menu_command_content()
+ui_menu_dats_view::~ui_menu_dats_view()
{
}
@@ -126,212 +73,69 @@ ui_menu_command_content::~ui_menu_command_content()
// handle
//-------------------------------------------------
-void ui_menu_command_content::handle()
+void ui_menu_dats_view::handle()
{
- // process the menu
- process(0);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_command_content::populate()
-{
- machine().pause();
- std::string buffer;
- machine().datfile().load_command_info(buffer, m_title);
- float line_height = machine().ui().get_line_height();
-
- if (!buffer.empty())
+ const ui_menu_event *m_event = process(MENU_FLAG_UI_DATS);
+ if (m_event != nullptr)
{
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
- std::vector<int> xstart;
- std::vector<int> xend;
- convert_command_glyph(buffer);
- int total_lines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f,
- 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width), xstart, xend);
- for (int r = 0; r < total_lines; r++)
+ if (m_event->iptkey == IPT_UI_LEFT && actual > 0)
{
- std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r]));
- int first_dspace = tempbuf.find(" ");
- if (first_dspace > 0 )
- {
- std::string first_part(tempbuf.substr(0, first_dspace));
- std::string last_part(tempbuf.substr(first_dspace));
- strtrimspace(last_part);
- item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr);
- }
- else
- item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
+ actual--;
+ reset(UI_MENU_RESET_SELECT_FIRST);
}
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- }
-
- machine().resume();
- customtop = custombottom = line_height + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_command_content::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- ui_manager &mui = machine().ui();
-
- // get the size of the text
- mui.draw_text_full(container, m_title.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
-
- // compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_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
- mui.draw_text_full(container, m_title.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- std::string tempbuf = std::string("Command Info - Game: ").append(m_driver->description);
-
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
-
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_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
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-/**************************************************
- MENU SOFTWARE HISTORY
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_history_sw::ui_menu_history_sw(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container)
-{
- m_list = swinfo->listname;
- m_short = swinfo->shortname;
- m_long = swinfo->longname;
- m_parent = swinfo->parentname;
- m_driver = (driver == nullptr) ? &machine.system() : driver;
-}
-
-ui_menu_history_sw::ui_menu_history_sw(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container)
-{
- image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- {
- if (image->filename())
+ if (m_event->iptkey == IPT_UI_RIGHT && actual < m_items_list.size() - 1)
{
- m_list = strensure(image->software_list_name());
- m_short = strensure(image->software_entry()->shortname());
- m_long = strensure(image->software_entry()->longname());
- m_parent = strensure(image->software_entry()->parentname());
+ actual++;
+ reset(UI_MENU_RESET_SELECT_FIRST);
}
}
- m_driver = (driver == nullptr) ? &machine.system() : driver;
-}
-
-ui_menu_history_sw::~ui_menu_history_sw()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_history_sw::handle()
-{
- // process the menu
- process(0);
}
//-------------------------------------------------
// populate
//-------------------------------------------------
-void ui_menu_history_sw::populate()
+void ui_menu_dats_view::populate()
{
machine().pause();
- std::string buffer;
- machine().datfile().load_software_info(m_list, buffer, m_short, m_parent);
- float line_height = machine().ui().get_line_height();
-
- if (!buffer.empty())
- {
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
- std::vector<int> xstart;
- std::vector<int> xend;
- int total_lines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width),
- xstart, xend);
-
- for (int r = 0; r < total_lines; r++)
- {
- std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r]));
- item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
- }
- }
+ if (!issoft)
+ get_data();
else
- item_append("No available History for this software.", nullptr, MENU_FLAG_DISABLE, nullptr);
+ get_data_sw();
+ item_append(MENU_SEPARATOR_ITEM, nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), nullptr);
+ customtop = 2.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER;
+ custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
machine().resume();
-
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
//-------------------------------------------------
// perform our special rendering
//-------------------------------------------------
-void ui_menu_history_sw::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
+void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
- float width;
- std::string tempbuf = std::string("Software info - ").append(m_long);
ui_manager &mui = machine().ui();
+ float maxwidth = origx2 - origx1;
+ float width;
+ std::string driver;
- // get the size of the text
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
+ if (issoft)
+ driver = m_swinfo->longname;
+ else
+ driver = m_driver->description;
+
+ mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ width += 2 * UI_BOX_LR_BORDER;
+ maxwidth = MAX(origx2 - origx1, width);
// compute our bounds
float x1 = 0.5f - 0.5f * maxwidth;
float x2 = x1 + maxwidth;
float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
+ float y2 = origy1 - 2.0f * UI_BOX_TB_BORDER - mui.get_line_height();
// draw a box
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
@@ -341,166 +145,58 @@ void ui_menu_history_sw::custom_render(void *selectedref, float top, float botto
x2 -= UI_BOX_LR_BORDER;
y1 += UI_BOX_TB_BORDER;
- // draw the text within it
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-
- tempbuf.assign("System driver: ").append(m_driver->description);
-
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += 2 * UI_BOX_LR_BORDER;
- maxwidth = MAX(origx2 - origx1, width);
-
- // compute our bounds
- x1 = 0.5f - 0.5f * maxwidth;
- x2 = x1 + maxwidth;
- y1 = origy2 + UI_BOX_TB_BORDER;
- y2 = origy2 + bottom;
+ mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- // draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_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
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
-}
-
-/**************************************************
- MENU DATS
-**************************************************/
-//-------------------------------------------------
-// ctor / dtor
-//-------------------------------------------------
-
-ui_menu_dats::ui_menu_dats(running_machine &machine, render_container *container, int _flags, const game_driver *driver) : ui_menu(machine, container)
-{
- m_driver = (driver == nullptr) ? &machine.system() : driver;
- m_flags = _flags;
-}
-
-ui_menu_dats::~ui_menu_dats()
-{
-}
-
-//-------------------------------------------------
-// handle
-//-------------------------------------------------
-
-void ui_menu_dats::handle()
-{
- // process the menu
- process(0);
-}
-
-//-------------------------------------------------
-// populate
-//-------------------------------------------------
-
-void ui_menu_dats::populate()
-{
- machine().pause();
- switch (m_flags)
- {
- case UI_HISTORY_LOAD:
- if (!get_data(m_driver, m_flags))
- item_append("No available History for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
- break;
-
- case UI_MAMEINFO_LOAD:
- if (!get_data(m_driver, m_flags))
- item_append("No available MameInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
- break;
-
- case UI_MESSINFO_LOAD:
- if (!get_data(m_driver, m_flags))
- item_append("No available MessInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
- break;
-
- case UI_STORY_LOAD:
- if (!get_data(m_driver, UI_STORY_LOAD))
- item_append("No available Mamescore for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
- break;
-
- case UI_SYSINFO_LOAD:
- if (!get_data(m_driver, UI_SYSINFO_LOAD))
- item_append("No available Sysinfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
- break;
- }
+ x1 -= UI_BOX_LR_BORDER;
+ x2 += UI_BOX_LR_BORDER;
+ y1 -= UI_BOX_TB_BORDER;
- machine().resume();
- item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
- customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
-}
-
-//-------------------------------------------------
-// perform our special rendering
-//-------------------------------------------------
-
-void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
-{
- float width;
- std::string tempbuf, revision;
- datfile_manager &datfile = machine().datfile();
- ui_manager &mui = machine().ui();
-
- switch (m_flags)
+ maxwidth = 0;
+ for (auto & elem : m_items_list)
{
- case UI_HISTORY_LOAD:
- tempbuf.assign("History - Game / System: ").append(m_driver->description);
- revision.assign("History.dat Revision: ").append(datfile.rev_history());
- break;
-
- case UI_MESSINFO_LOAD:
- tempbuf.assign("MessInfo - System: ").append(m_driver->description);
- revision.assign("Messinfo.dat Revision: ").append(datfile.rev_messinfo());
- break;
-
- case UI_MAMEINFO_LOAD:
- tempbuf.assign("MameInfo - Game: ").append(m_driver->description);
- revision.assign("Mameinfo.dat Revision: ").append(datfile.rev_mameinfo());
- break;
-
- case UI_SYSINFO_LOAD:
- tempbuf.assign("Sysinfo - System: ").append(m_driver->description);
- revision.assign("Sysinfo.dat Revision: ").append(datfile.rev_sysinfo());
- break;
-
- case UI_STORY_LOAD:
- tempbuf.assign("MAMESCORE - Game: ").append(m_driver->description);
- revision.assign("Story.dat Revision: ").append(machine().datfile().rev_storyinfo());
- break;
+ mui.draw_text_full(container, elem.label.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
+ maxwidth += width;
}
- // get the size of the text
- mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
- width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
- float maxwidth = MAX(width, origx2 - origx1);
+ float space = (1.0f - maxwidth) / (m_items_list.size() * 2);
// compute our bounds
- float x1 = 0.5f - 0.5f * maxwidth;
- float x2 = x1 + maxwidth;
- float y1 = origy1 - top;
- float y2 = origy1 - UI_BOX_TB_BORDER;
+ y1 = y2 + UI_BOX_TB_BORDER;
+ y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER;
// draw a box
- mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+ mui.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
- mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
+ int x = 0;
+ for (auto & elem : m_items_list)
+ {
+ x1 += space;
+ rgb_t fcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR;
+ rgb_t bcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR;
+ mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
+ DRAW_NONE, fcolor, bcolor, &width, nullptr);
+ if (bcolor != UI_TEXT_BG_COLOR)
+ mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43),
+ hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
+
+ mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
+ DRAW_NORMAL, fcolor, bcolor, &width, nullptr);
+ x1 += width + space;
+ ++x;
+ }
+ // bottom
+ std::string revision;
+ revision.assign("Revision: ").append(m_items_list[actual].revision);
mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
@@ -529,36 +225,79 @@ void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, flo
// load data from DATs
//-------------------------------------------------
-bool ui_menu_dats::get_data(const game_driver *driver, int flags)
+void ui_menu_dats_view::get_data()
{
- std::string buffer;
- machine().datfile().load_data_info(driver, buffer, flags);
-
- if (buffer.empty())
- return false;
-
- float line_height = machine().ui().get_line_height();
- float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
std::vector<int> xstart;
std::vector<int> xend;
- int tlines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * UI_BOX_LR_BORDER) - 0.02f - (2.0f * gutter_width), xstart, xend);
- for (int r = 0; r < tlines; r++)
+ std::string buffer;
+ std::vector<std::string> m_item;
+ if (m_items_list[actual].option == UI_COMMAND_LOAD)
{
- std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r]));
- // special case for mamescore
- if (flags == UI_STORY_LOAD)
+ machine().datfile().command_sub_menu(m_driver, m_item);
+ if (!m_item.empty())
{
- size_t last_underscore = tempbuf.find_last_of('_');
- if (last_underscore != std::string::npos)
+ for (size_t x = 0; x < m_item.size(); ++x)
{
- std::string last_part(tempbuf.substr(last_underscore + 1));
- int primary = tempbuf.find("___");
- std::string first_part(tempbuf.substr(0, primary));
- item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr);
+ std::string t_buffer;
+ buffer.append(m_item[x]).append("\n");
+ machine().datfile().load_command_info(t_buffer, m_item[x]);
+ if (!t_buffer.empty())
+ buffer.append(t_buffer).append("\n");
}
+ convert_command_glyph(buffer);
}
+ }
+ else
+ machine().datfile().load_data_info(m_driver, buffer, m_items_list[actual].option);
+
+ int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend);
+ for (int x = 0; x < totallines; ++x)
+ {
+ std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
+ item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1));
+
+ }
+}
+
+void ui_menu_dats_view::get_data_sw()
+{
+ std::vector<int> xstart;
+ std::vector<int> xend;
+ std::string buffer;
+ std::vector<std::string> m_item;
+ if (m_items_list[actual].option == 0)
+ buffer = m_swinfo->usage;
+ else
+ {
+ if (m_swinfo->startempty == 1)
+ machine().datfile().load_data_info(m_swinfo->driver, buffer, UI_HISTORY_LOAD);
else
- item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
+ machine().datfile().load_software_info(m_swinfo->listname, buffer, m_swinfo->shortname, m_swinfo->parentname);
}
- return true;
+
+ int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend);
+ for (int x = 0; x < totallines; ++x)
+ {
+ std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
+ item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1));
+
+ }
+}
+
+void ui_menu_dats_view::init_items()
+{
+ datfile_manager &datfile = machine().datfile();
+ if (datfile.has_history(m_driver))
+ m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history());
+ if (datfile.has_mameinfo(m_driver))
+ m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo());
+ if (datfile.has_messinfo(m_driver))
+ m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo());
+ if (datfile.has_sysinfo(m_driver))
+ m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo());
+ if (datfile.has_story(m_driver))
+ m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo());
+ if (datfile.has_command(m_driver))
+ m_items_list.emplace_back("Command", UI_COMMAND_LOAD, "");
}
+
diff --git a/src/emu/ui/datmenu.h b/src/emu/ui/datmenu.h
index 652c6492c43..f799e5fa7d0 100644
--- a/src/emu/ui/datmenu.h
+++ b/src/emu/ui/datmenu.h
@@ -20,74 +20,33 @@ struct ui_software_info;
// class dats menu
//-------------------------------------------------
-class ui_menu_dats : public ui_menu
+class ui_menu_dats_view : public ui_menu
{
public:
- ui_menu_dats(running_machine &machine, render_container *container, int _flags, const game_driver *driver = nullptr);
- virtual ~ui_menu_dats();
+ ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr);
+ ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver = nullptr);
+ virtual ~ui_menu_dats_view();
virtual void populate() override;
virtual void handle() override;
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
private:
+ int actual;
const game_driver *m_driver;
- int m_flags;
-
- bool get_data(const game_driver *driver, int flags);
-};
-
-//-------------------------------------------------
-// class command data menu
-//-------------------------------------------------
-
-class ui_menu_command : public ui_menu
-{
-public:
- ui_menu_command(running_machine &machine, render_container *container, const game_driver *driver = nullptr);
- virtual ~ui_menu_command();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- const game_driver *m_driver;
-};
-
-//-------------------------------------------------
-// class command content data menu
-//-------------------------------------------------
-
-class ui_menu_command_content : public ui_menu
-{
-public:
- ui_menu_command_content(running_machine &machine, render_container *container, std::string title, const game_driver *driver = nullptr);
- virtual ~ui_menu_command_content();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
- const game_driver *m_driver;
- std::string m_title;
-};
-
-//-------------------------------------------------
-// class software history menu
-//-------------------------------------------------
-
-class ui_menu_history_sw : public ui_menu
-{
-public:
- ui_menu_history_sw(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr);
- ui_menu_history_sw(running_machine &machine, render_container *container, const game_driver *driver = nullptr);
- virtual ~ui_menu_history_sw();
- virtual void populate() override;
- virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
-
-private:
+ ui_software_info *m_swinfo;
std::string m_list, m_short, m_long, m_parent;
- const game_driver *m_driver;
+ void get_data();
+ void get_data_sw();
+ void init_items();
+ bool issoft;
+ struct list_items
+ {
+ list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; }
+ std::string label;
+ int option;
+ std::string revision;
+ };
+ std::vector<list_items> m_items_list;
};
#endif /* __UI_DATMENU_H__ */
diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp
index 71ca4812cf8..57797f6281e 100644
--- a/src/emu/ui/dsplmenu.cpp
+++ b/src/emu/ui/dsplmenu.cpp
@@ -66,23 +66,25 @@ ui_menu_display_options::ui_menu_display_options(running_machine &machine, rende
// create video list
m_list.push_back("auto");
+ m_list.push_back("opengl"); // TODO: check USE_OPENGL
std::string descr = options.description(OSDOPTION_VIDEO);
- std::string delim = ", ";
descr.erase(0, descr.find(":") + 2);
- size_t start = 0;
- size_t end = descr.find_first_of(delim, start);
- while (end != std::string::npos)
+ std::string delim = ", ";
+ size_t p1, p2 = 0;
+ for (;;)
{
- std::string name = descr.substr(start, end - start);
- if (name != "none" && name != "or")
- m_list.push_back(name);
- start = descr.find_first_not_of(delim, end);
- if (start == std::string::npos)
+ p1 = descr.find_first_not_of(delim, p2);
+ if (p1 == std::string::npos)
+ break;
+ p2 = descr.find_first_of(delim, p1 + 1);
+ if (p2 != std::string::npos)
+ m_list.push_back(descr.substr(p1, p2 - p1));
+ else
+ {
+ m_list.push_back(descr.substr(p1));
break;
- end = descr.find_first_of(delim, start);
- if (end == std::string::npos)
- end = descr.size();
+ }
}
m_options[1].status = 0;
diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp
index 9ea41a3963d..3ea29398fd2 100644
--- a/src/emu/ui/mainmenu.cpp
+++ b/src/emu/ui/mainmenu.cpp
@@ -136,45 +136,9 @@ void ui_menu_main::populate()
if (machine().options().cheat() && machine().cheat().first() != nullptr)
item_append("Cheat", nullptr, 0, (void *)CHEAT);
- /* add history menu */
- if (machine().ui().options().enabled_dats())
- item_append("History Info", nullptr, 0, (void *)HISTORY);
-
- // add software history menu
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0 && machine().ui().options().enabled_dats())
- {
- image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
- {
- const char *name = image->filename();
- if (name != nullptr)
- {
- item_append("Software History Info", nullptr, 0, (void *)SW_HISTORY);
- break;
- }
- }
- }
-
- /* add mameinfo / messinfo menu */
- if (machine().ui().options().enabled_dats())
- {
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0)
- item_append("MameInfo", nullptr, 0, (void *)MAMEINFO);
- else if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0)
- item_append("MessInfo", nullptr, 0, (void *)MAMEINFO);
- }
-
- /* add sysinfo menu */
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) == 0 && machine().ui().options().enabled_dats())
- item_append("SysInfo", nullptr, 0, (void *)SYSINFO);
-
- /* add command list menu */
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0 && machine().ui().options().enabled_dats())
- item_append("Commands Info", nullptr, 0, (void *)COMMAND);
-
- /* add story menu */
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0 && machine().ui().options().enabled_dats())
- item_append("Mamescores", nullptr, 0, (void *)STORYINFO);
+ // add dats menu
+ if (machine().ui().options().enabled_dats() && machine().datfile().has_data(&machine().system()))
+ item_append("External DAT View", nullptr, 0, (void *)EXTERNAL_DATS);
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
@@ -300,27 +264,8 @@ void ui_menu_main::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_barcode_reader>(machine(), container, nullptr));
break;
- case HISTORY:
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD));
- break;
-
- case MAMEINFO:
- if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD));
- else
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD));
- break;
-
- case SYSINFO:
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD));
- break;
-
- case COMMAND:
- ui_menu::stack_push(global_alloc_clear<ui_menu_command>(machine(), container));
- break;
-
- case STORYINFO:
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD));
+ case EXTERNAL_DATS:
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container));
break;
case ADD_FAVORITE:
@@ -333,10 +278,6 @@ void ui_menu_main::handle()
reset(UI_MENU_RESET_REMEMBER_POSITION);
break;
- case SW_HISTORY:
- ui_menu::stack_push(global_alloc_clear<ui_menu_history_sw>(machine(), container));
- break;
-
case QUIT_GAME:
ui_menu::stack_pop(machine());
machine().ui().request_quit();
diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h
index ca697558dbd..0684e230ad8 100644
--- a/src/emu/ui/mainmenu.h
+++ b/src/emu/ui/mainmenu.h
@@ -46,16 +46,13 @@ private:
BIOS_SELECTION,
BARCODE_READ,
PTY_INFO,
- HISTORY,
- MAMEINFO,
- SYSINFO,
+ EXTERNAL_DATS,
ADD_FAVORITE,
REMOVE_FAVORITE,
- COMMAND,
- STORYINFO,
- SW_HISTORY,
QUIT_GAME
};
+
+ //bool submenu;
};
#endif /* __UI_MAINMENU_H__ */
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index bd1eec20c05..f831ffa725f 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -59,9 +59,13 @@ static const ui_arts_info arts_info[] =
{ nullptr }
};
-static const char *hover_msg[] = { "Add or remove favorites", "Export displayed list to file", "Show history.dat info",
- "Show mameinfo.dat / messinfo.dat info", "Show command.dat info", "Setup directories",
- "Configure options" };
+static const char *hover_msg[] = {
+ "Add or remove favorites",
+ "Export displayed list to file",
+ "Show DATs view",
+ "Setup directories",
+ "Configure options"
+};
/***************************************************************************
GLOBAL VARIABLES
@@ -340,6 +344,8 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
draw_select_game(flags & UI_MENU_PROCESS_NOINPUT);
else if ((item[0].flags & MENU_FLAG_UI_PALETTE ) != 0)
draw_palette_menu();
+ else if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
+ draw_dats_menu();
else
draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY, flags & UI_MENU_PROCESS_NOIMAGE, flags & UI_MENU_PROCESS_NOINPUT);
@@ -463,7 +469,6 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
int itemnum, linenum;
bool mouse_hit, mouse_button;
float mouse_x = -1, mouse_y = -1;
- bool history_flag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
if (machine().ui().options().use_background_image() && &machine().system() == &GAME_NAME(___empty) && bgrnd_bitmap->valid() && !noimage)
container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
@@ -506,7 +511,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
if (visible_main_menu_height + visible_extra_menu_height + 2.0f * UI_BOX_TB_BORDER > 1.0f)
visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
- int visible_lines = floor(visible_main_menu_height / line_height);
+ visible_lines = floor(visible_main_menu_height / line_height);
visible_main_menu_height = (float)visible_lines * line_height;
// compute top/left of inner menu area by centering
@@ -525,19 +530,10 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// determine the first visible line based on the current selection
- int top_line = selected - visible_lines / 2;
- if (top_line < 0)
+ if (top_line < 0 || selected == 0)
top_line = 0;
-
if (top_line + visible_lines >= item.size())
- {
- if (history_flag)
- selected = item.size() - 1;
top_line = item.size() - visible_lines;
- }
-
- if (history_flag && selected != item.size() - 1)
- selected = top_line + visible_lines / 2;
// determine effective positions taking into account the hilighting arrows
float effective_width = visible_width - 2.0f * gutter_width;
@@ -574,12 +570,11 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
float line_y1 = line_y + line_height;
// set the hover if this is our item
- if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()
- && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
+ if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
hover = itemnum;
// if we're selected, draw with a different background
- if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
+ if (itemnum == selected)
{
fgcolor = UI_SELECTED_COLOR;
bgcolor = UI_SELECTED_BG_COLOR;
@@ -588,8 +583,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
}
// else if the mouse is over this item, draw with a different background
- else if (itemnum == hover && (((pitem.flags & MENU_FLAG_UI_HISTORY) == 0) || (linenum == 0 && top_line != 0)
- || (linenum == visible_lines - 1 && itemnum != item.size() - 1)))
+ else if (itemnum == hover && ((linenum == 0 && top_line != 0) || (linenum == visible_lines - 1 && itemnum != item.size() - 1)))
{
fgcolor = UI_MOUSEOVER_COLOR;
bgcolor = UI_MOUSEOVER_BG_COLOR;
@@ -633,11 +627,6 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- // draw the subitem left-justified
- else if (pitem.subtext == nullptr && (pitem.flags & MENU_FLAG_UI_HISTORY) != 0)
- machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
-
// if we don't have a subitem, just draw the string centered
else if (pitem.subtext == nullptr)
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
@@ -818,9 +807,8 @@ void ui_menu::draw_text_box()
void ui_menu::handle_events(UINT32 flags)
{
- int stop = FALSE;
+ bool stop = false;
ui_event local_menu_event;
- bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
// loop while we have interesting events
while (!stop && machine().ui_input().pop_event(&local_menu_event))
@@ -835,35 +823,43 @@ void ui_menu::handle_events(UINT32 flags)
selected = hover;
else if (hover == HOVER_ARROW_UP)
{
- selected -= visitems - 1;
- validate_selection(1);
+ if ((flags & MENU_FLAG_UI_DATS) != 0)
+ {
+ top_line -= visitems - (top_line + visible_lines == item.size() - 1);
+ return;
+ }
+ selected -= visitems;
+ if (selected < 0)
+ selected = 0;
+ top_line -= visitems - (top_line + visible_lines == item.size() - 1);
}
else if (hover == HOVER_ARROW_DOWN)
{
- selected += visitems - 1;
- validate_selection(1);
+ if ((flags & MENU_FLAG_UI_DATS) != 0)
+ {
+ top_line += visible_lines - 2;
+ return;
+ }
+ selected += visible_lines - 2 + (selected == 0);
+ if (selected > item.size() - 1)
+ selected = item.size() - 1;
+ top_line += visible_lines - 2;
}
}
break;
// if we are hovering over a valid item, fake a UI_SELECT with a double-click
case UI_EVENT_MOUSE_DOUBLE_CLICK:
- if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0)
+ if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0 && hover >= 0 && hover < item.size())
{
- if (hover >= 0 && hover < item.size())
+ selected = hover;
+ menu_event.iptkey = IPT_UI_SELECT;
+ if (selected == item.size() - 1)
{
- selected = hover;
- if (local_menu_event.event_type == UI_EVENT_MOUSE_DOUBLE_CLICK)
- {
- menu_event.iptkey = IPT_UI_SELECT;
- if (selected == item.size() - 1)
- {
- menu_event.iptkey = IPT_UI_CANCEL;
- ui_menu::stack_pop(machine());
- }
- }
- stop = TRUE;
+ menu_event.iptkey = IPT_UI_CANCEL;
+ ui_menu::stack_pop(machine());
}
+ stop = true;
}
break;
@@ -873,16 +869,29 @@ void ui_menu::handle_events(UINT32 flags)
{
if (local_menu_event.zdelta > 0)
{
- if (historyflag && selected == item.size() - 1)
- selected -= visitems + 1;
- else
- selected -= local_menu_event.num_lines;
+ if ((flags & MENU_FLAG_UI_DATS) != 0)
+ {
+ top_line -= local_menu_event.num_lines;
+ return;
+ }
+ selected -= local_menu_event.num_lines;
validate_selection(-1);
+ if (selected < top_line + (top_line != 0))
+ top_line -= local_menu_event.num_lines;
}
else
{
+ if ((flags & MENU_FLAG_UI_DATS) != 0)
+ {
+ top_line += local_menu_event.num_lines;
+ return;
+ }
selected += local_menu_event.num_lines;
validate_selection(1);
+ if (selected > item.size() - 1)
+ selected = item.size() - 1;
+ if (selected >= top_line + visitems + (top_line != 0))
+ top_line += local_menu_event.num_lines;
}
}
break;
@@ -891,7 +900,7 @@ void ui_menu::handle_events(UINT32 flags)
case UI_EVENT_CHAR:
menu_event.iptkey = IPT_SPECIAL;
menu_event.unichar = local_menu_event.ch;
- stop = TRUE;
+ stop = true;
break;
// ignore everything else
@@ -909,16 +918,12 @@ void ui_menu::handle_events(UINT32 flags)
void ui_menu::handle_keys(UINT32 flags)
{
- int ignorepause = ui_menu::stack_has_special_main_menu();
- int ignoreright;
- int ignoreleft;
+ bool ignorepause = ui_menu::stack_has_special_main_menu();
int code;
// bail if no items
if (item.empty())
return;
- bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
-
// if we hit select, return TRUE or pop the stack, depending on the item
if (exclusive_input_pressed(IPT_UI_SELECT, 0))
@@ -947,8 +952,11 @@ void ui_menu::handle_keys(UINT32 flags)
validate_selection(1);
// swallow left/right keys if they are not appropriate
- ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0);
- ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0);
+ bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0);
+ bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0);
+
+ if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
+ ignoreleft = ignoreright = false;
// accept left/right keys as-is with repeat
if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
@@ -959,60 +967,60 @@ void ui_menu::handle_keys(UINT32 flags)
// up backs up by one item
if (exclusive_input_pressed(IPT_UI_UP, 6))
{
- if (historyflag && selected <= (visitems / 2))
- return;
- else if (historyflag && visitems == item.size())
+ if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
{
- selected = item.size() - 1;
+ top_line--;
return;
}
- else if (historyflag && selected == item.size() - 1)
- selected = (item.size() - 1) - (visitems / 2);
-
- selected = (selected + item.size() - 1) % item.size();
+ (selected == 0) ? selected = top_line = item.size() - 1 : --selected;
validate_selection(-1);
+ top_line -= (selected == top_line && top_line != 0);
}
// down advances by one item
if (exclusive_input_pressed(IPT_UI_DOWN, 6))
{
- if (historyflag && (selected < visitems / 2))
- selected = visitems / 2;
- else if (historyflag && (selected + (visitems / 2) >= item.size()))
+ if ((item[0].flags & MENU_FLAG_UI_DATS) != 0)
{
- selected = item.size() - 1;
+ top_line++;
return;
}
-
- selected = (selected + 1) % item.size();
- validate_selection(1);
+ (selected == item.size() - 1) ? selected = top_line = 0 : ++selected;
+ top_line += (selected == top_line + visitems + (top_line != 0));
}
// page up backs up by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6))
{
- selected -= visitems - 1;
+ selected -= visitems;
+ top_line -= visitems - (top_line + visible_lines == item.size() - 1);
+ if (selected < 0)
+ selected = 0;
validate_selection(1);
}
// page down advances by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6))
{
- selected += visitems - 1;
+ selected += visible_lines - 2 + (selected == 0);
+ top_line += visible_lines - 2;
+
+ if (selected > item.size() - 1)
+ selected = item.size() - 1;
validate_selection(-1);
}
// home goes to the start
if (exclusive_input_pressed(IPT_UI_HOME, 0))
{
- selected = 0;
+ selected = top_line = 0;
validate_selection(1);
}
// end goes to the last
if (exclusive_input_pressed(IPT_UI_END, 0))
{
- selected = item.size() - 1;
+ selected = top_line = item.size() - 1;
validate_selection(-1);
}
@@ -1681,12 +1689,7 @@ void ui_menu::handle_main_keys(UINT32 flags)
}
if (!ignoreright && exclusive_input_pressed(IPT_UI_RIGHT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
- {
- // Swap the right panel
-// if (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))
-// menu_event.iptkey = IPT_UI_RIGHT_PANEL;
return;
- }
// up backs up by one item
if (exclusive_input_pressed(IPT_UI_UP, 6))
@@ -1924,19 +1927,9 @@ void ui_menu::handle_main_events(UINT32 flags)
menu_event.iptkey = IPT_UI_EXPORT;
stop = true;
}
- else if (hover == HOVER_B_HISTORY)
+ else if (hover == HOVER_B_DATS)
{
- menu_event.iptkey = IPT_UI_HISTORY;
- stop = true;
- }
- else if (hover == HOVER_B_MAMEINFO)
- {
- menu_event.iptkey = IPT_UI_MAMEINFO;
- stop = true;
- }
- else if (hover == HOVER_B_COMMAND)
- {
- menu_event.iptkey = IPT_UI_COMMAND;
+ menu_event.iptkey = IPT_UI_DATS;
stop = true;
}
else if (hover == HOVER_B_SETTINGS)
@@ -2035,7 +2028,6 @@ float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2)
float midl = (x2 - x1) * 0.5f;
// add outlined box for options
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// add separator line
@@ -2074,7 +2066,7 @@ float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2)
mui.draw_text_full(container, buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH,
JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
- x1 = x1 + midl;
+ x1 += midl;
}
return (y1 + line_height + UI_LINE_WIDTH);
@@ -2182,7 +2174,7 @@ void ui_menu::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float
// if it fails, use the default image
if (!tmp_bitmap->valid())
{
- tmp_bitmap->reset();
+ //tmp_bitmap->reset();
tmp_bitmap->allocate(256, 256);
for (int x = 0; x < 256; x++)
for (int y = 0; y < 256; y++)
@@ -2239,7 +2231,7 @@ void ui_menu::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float
else
dest_bitmap = tmp_bitmap;
- snapx_bitmap->reset();
+ //snapx_bitmap->reset();
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);
@@ -2435,7 +2427,7 @@ void ui_menu::info_arrow(int ub, float origx1, float origx2, float oy1, float li
}
//-------------------------------------------------
-// draw - draw a menu
+// draw - draw palette menu
//-------------------------------------------------
void ui_menu::draw_palette_menu()
@@ -2544,14 +2536,14 @@ void ui_menu::draw_palette_menu()
hover = itemnum;
// if we're selected, draw with a different background
- if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
+ if (itemnum == selected)
{
fgcolor = UI_SELECTED_COLOR;
bgcolor = UI_SELECTED_BG_COLOR;
}
// else if the mouse is over this item, draw with a different background
- else if (itemnum == hover && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
+ else if (itemnum == hover)
{
fgcolor = UI_MOUSEOVER_COLOR;
bgcolor = UI_MOUSEOVER_BG_COLOR;
@@ -2621,4 +2613,152 @@ void ui_menu::draw_palette_menu()
// return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size());
+}
+
+//-------------------------------------------------
+// draw - draw dats menu
+//-------------------------------------------------
+
+void ui_menu::draw_dats_menu()
+{
+ float line_height = machine().ui().get_line_height();
+ float ud_arrow_width = line_height * machine().render().ui_aspect();
+ float gutter_width = 0.52f * line_height * machine().render().ui_aspect();
+ mouse_x = -1, mouse_y = -1;
+ float visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER;
+ float visible_left = (1.0f - visible_width) * 0.5f;
+ ui_manager &mui = machine().ui();
+
+ // draw background image if available
+ if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid())
+ container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+
+ hover = item.size() + 1;
+ visible_items = item.size() - 2;
+ float extra_height = 2.0f * line_height;
+ float visible_extra_menu_height = customtop + custombottom + extra_height;
+
+ // locate mouse
+ mouse_hit = false;
+ mouse_button = false;
+ mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
+ if (mouse_target != nullptr)
+ if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
+ mouse_hit = true;
+
+ // account for extra space at the top and bottom
+ float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
+ visible_lines = floor(visible_main_menu_height / line_height);
+ visible_main_menu_height = (float)(visible_lines * line_height);
+
+ // compute top/left of inner menu area by centering
+ float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
+
+ // if the menu is at the bottom of the extra, adjust
+ visible_top += customtop;
+
+ // compute left box size
+ float x1 = visible_left;
+ float y1 = visible_top - UI_BOX_TB_BORDER;
+ float x2 = x1 + visible_width;
+ float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height;
+ float line = visible_top + (float)(visible_lines * line_height);
+
+ //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
+ mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+
+ if (visible_items < visible_lines)
+ visible_lines = visible_items;
+ if (top_line < 0)
+ top_line = 0;
+ if (top_line + visible_lines >= visible_items)
+ top_line = visible_items - visible_lines;
+
+ // determine effective positions taking into account the hilighting arrows
+ float effective_width = visible_width - 2.0f * gutter_width;
+ float effective_left = visible_left + gutter_width;
+
+ int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items;
+
+ for (int linenum = 0; linenum < n_loop; linenum++)
+ {
+ float line_y = visible_top + (float)linenum * line_height;
+ int itemnum = top_line + linenum;
+ const ui_menu_item &pitem = item[itemnum];
+ const char *itemtext = pitem.text;
+ rgb_t fgcolor = UI_TEXT_COLOR;
+ rgb_t bgcolor = UI_TEXT_BG_COLOR;
+ float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
+ float line_y0 = line_y;
+ float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
+ float line_y1 = line_y + line_height;
+
+ // if we're on the top line, display the up arrow
+ if (linenum == 0 && top_line != 0)
+ {
+ draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
+ 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0);
+
+ if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y)
+ {
+ fgcolor = UI_MOUSEOVER_COLOR;
+ bgcolor = UI_MOUSEOVER_BG_COLOR;
+ highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
+ hover = HOVER_ARROW_UP;
+ }
+ }
+ // if we're on the bottom line, display the down arrow
+ else if (linenum == visible_lines - 1 && itemnum != visible_items - 1)
+ {
+ draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height,
+ 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y);
+
+ if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y)
+ {
+ fgcolor = UI_MOUSEOVER_COLOR;
+ bgcolor = UI_MOUSEOVER_BG_COLOR;
+ highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
+ hover = HOVER_ARROW_DOWN;
+ }
+ }
+
+ // draw dats text
+ else if (pitem.subtext == nullptr)
+ {
+ mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, JUSTIFY_LEFT, WRAP_NEVER,
+ DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+ }
+ }
+
+ for (size_t count = visible_items; count < item.size(); count++)
+ {
+ const ui_menu_item &pitem = item[count];
+ const char *itemtext = pitem.text;
+ float line_x0 = x1 + 0.5f * UI_LINE_WIDTH;
+ float line_y0 = line;
+ float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
+ float line_y1 = line + line_height;
+ rgb_t fgcolor = UI_SELECTED_COLOR;
+ rgb_t bgcolor = UI_SELECTED_BG_COLOR;
+
+ if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
+ hover = count;
+
+ if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
+ container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height,
+ UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ else
+ {
+ highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
+ mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE,
+ DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
+ }
+ line += line_height;
+ }
+
+ // if there is something special to add, do it by calling the virtual method
+ custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
+
+ // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
+ visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items);
} \ No newline at end of file
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index 174d2866fac..512436dc232 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -28,7 +28,7 @@
#define MENU_FLAG_REDTEXT (1 << 4)
#define MENU_FLAG_DISABLE (1 << 5)
#define MENU_FLAG_UI (1 << 6)
-#define MENU_FLAG_UI_HISTORY (1 << 7)
+#define MENU_FLAG_UI_DATS (1 << 7)
#define MENU_FLAG_UI_SWLIST (1 << 8)
#define MENU_FLAG_UI_FAVORITE (1 << 9)
#define MENU_FLAG_UI_PALETTE (1 << 10)
@@ -250,10 +250,12 @@ protected:
static std::unique_ptr<bitmap_argb32> snapx_bitmap;
static render_texture *snapx_texture;
+ static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
+ static render_texture *hilight_main_texture;
private:
static std::unique_ptr<bitmap_argb32> no_avail_bitmap, bgrnd_bitmap, star_bitmap;
- static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
- static render_texture *hilight_main_texture, *bgrnd_texture, *star_texture;
+// static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap;
+ static render_texture *bgrnd_texture, *star_texture;
static bitmap_argb32 *icons_bitmap[];
static render_texture *icons_texture[];
@@ -264,9 +266,12 @@ private:
// draw game list
void draw_select_game(bool noinput);
- // draw game list
+ // draw palette menu
void draw_palette_menu();
+ // draw dats menu
+ void draw_dats_menu();
+
void get_title_search(std::string &title, std::string &search);
// handle keys
diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp
index 1884547d8c5..44ed9e11a37 100644
--- a/src/emu/ui/optsmenu.cpp
+++ b/src/emu/ui/optsmenu.cpp
@@ -77,7 +77,6 @@ void ui_menu_game_options::handle()
}
break;
}
-
case FILE_CATEGORY_FILTER:
{
if (m_event->iptkey == IPT_UI_LEFT)
@@ -105,7 +104,6 @@ void ui_menu_game_options::handle()
}
break;
}
-
case CATEGORY_FILTER:
{
if (m_event->iptkey == IPT_UI_LEFT)
@@ -131,7 +129,6 @@ void ui_menu_game_options::handle()
}
break;
}
-
case MANUFACT_CAT_FILTER:
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
{
@@ -142,7 +139,6 @@ void ui_menu_game_options::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual));
break;
-
case YEAR_CAT_FILTER:
if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
{
@@ -153,44 +149,22 @@ void ui_menu_game_options::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual));
break;
-
- case SCREEN_CAT_FILTER:
- if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT)
- {
- (m_event->iptkey == IPT_UI_RIGHT) ? screen_filters::actual++ : screen_filters::actual--;
- changed = true;
- }
- else if (m_event->iptkey == IPT_UI_SELECT)
- {
- std::vector<std::string> text(screen_filters::length);
- for (int x = 0; x < screen_filters::length; ++x)
- text[x] = screen_filters::text[x];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, text, screen_filters::actual));
- }
-
- break;
-
case MISC_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_misc_options>(machine(), container));
break;
-
case SOUND_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_sound_options>(machine(), container));
break;
-
case DISPLAY_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_display_options>(machine(), container));
break;
-
case CUSTOM_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_custom_ui>(machine(), container));
break;
-
case CONTROLLER_MENU:
if (m_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(global_alloc_clear<ui_menu_controller_mapping>(machine(), container));
@@ -258,14 +232,6 @@ void ui_menu_game_options::populate()
convert_command_glyph(fbuff);
item_append(fbuff.c_str(), c_year::ui[c_year::actual].c_str(), arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER);
}
- // add screen subitem
- else if (main_filters::actual == FILTER_SCREEN)
- {
- arrow_flags = get_arrow_flags(0, screen_filters::length - 1, screen_filters::actual);
- fbuff = "^!Screen type";
- convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), screen_filters::text[screen_filters::actual], arrow_flags, (void *)(FPTR)SCREEN_CAT_FILTER);
- }
// add custom subitem
else if (main_filters::actual == FILTER_CUSTOM)
{
diff --git a/src/emu/ui/optsmenu.h b/src/emu/ui/optsmenu.h
index b62e5712de9..13e857ec7ba 100644
--- a/src/emu/ui/optsmenu.h
+++ b/src/emu/ui/optsmenu.h
@@ -29,7 +29,6 @@ private:
FILE_CATEGORY_FILTER,
MANUFACT_CAT_FILTER,
YEAR_CAT_FILTER,
- SCREEN_CAT_FILTER,
CATEGORY_FILTER,
MISC_MENU,
DISPLAY_MENU,
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 2b5139f6cc3..592e24ebb41 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -37,6 +37,9 @@ extern const char UI_VERSION_TAG[];
static bool first_start = true;
static const char *dats_info[] = { "General Info", "History", "Mameinfo", "Sysinfo", "Messinfo", "Command", "Mamescore" };
+std::vector<const game_driver *> ui_menu_select_game::m_sortedlist;
+int ui_menu_select_game::m_isabios = 0;
+
//-------------------------------------------------
// sort
//-------------------------------------------------
@@ -162,7 +165,7 @@ ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_contai
ui_options &moptions = machine.ui().options();
// load drivers cache
- load_cache_info();
+ init_sorted_list();
// build drivers list
if (!load_available_machines())
@@ -184,6 +187,7 @@ ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_contai
sub_filter = tmp.substr(found + 1);
}
+ main_filters::actual = FILTER_ALL;
for (size_t ind = 0; ind < main_filters::length; ++ind)
if (last_filter == main_filters::text[ind])
{
@@ -205,12 +209,6 @@ ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_contai
if (sub_filter == c_year::ui[id])
c_year::actual = id;
}
- else if (main_filters::actual == FILTER_SCREEN)
- {
- for (size_t id = 0; id < screen_filters::length; ++id)
- if (sub_filter == screen_filters::text[id])
- screen_filters::actual = id;
- }
first_start = false;
}
@@ -237,7 +235,7 @@ ui_menu_select_game::~ui_menu_select_game()
const game_driver *driver = nullptr;
ui_software_info *swinfo = nullptr;
ui_options &mopt = machine().ui().options();
- if (main_filters::actual == FILTER_FAVORITE_GAME)
+ if (isfavorite())
swinfo = (selected >= 0 && selected < item.size()) ? (ui_software_info *)item[selected].ref : nullptr;
else
driver = (selected >= 0 && selected < item.size()) ? (const game_driver *)item[selected].ref : nullptr;
@@ -253,8 +251,6 @@ ui_menu_select_game::~ui_menu_select_game()
filter.append(",").append(c_mnfct::ui[c_mnfct::actual]);
else if (main_filters::actual == FILTER_YEAR)
filter.append(",").append(c_year::ui[c_year::actual]);
- else if (main_filters::actual == FILTER_SCREEN)
- filter.append(",").append(screen_filters::text[screen_filters::actual]);
mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE, error_string);
@@ -302,10 +298,10 @@ void ui_menu_select_game::handle()
// handle selections
else if (m_event->iptkey == IPT_UI_SELECT)
{
- if (main_filters::actual != FILTER_FAVORITE_GAME)
- inkey_select(m_event);
- else
+ if (isfavorite())
inkey_select_favorite(m_event);
+ else
+ inkey_select(m_event);
}
// handle UI_LEFT
@@ -375,110 +371,32 @@ void ui_menu_select_game::handle()
reset(UI_MENU_RESET_SELECT_FIRST);
}
- // handle UI_HISTORY
- else if (m_event->iptkey == IPT_UI_HISTORY && enabled_dats)
+ // handle UI_DATS
+ else if (m_event->iptkey == IPT_UI_DATS && enabled_dats)
{
- if (main_filters::actual != FILTER_FAVORITE_GAME)
+ if (!isfavorite())
{
const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD, driver));
+ if ((FPTR)driver > 3 && machine().datfile().has_data(driver))
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, driver));
}
else
{
ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3)
+ if ((FPTR)swinfo > 3 && machine().datfile().has_data(swinfo->driver))
{
if (swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD, swinfo->driver));
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo->driver));
else
- ui_menu::stack_push(global_alloc_clear<ui_menu_history_sw>(machine(), container, swinfo));
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo));
}
}
}
- // handle UI_MAMEINFO
- else if (m_event->iptkey == IPT_UI_MAMEINFO && enabled_dats)
- {
- if (main_filters::actual != FILTER_FAVORITE_GAME)
- {
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- {
- if ((driver->flags & MACHINE_TYPE_ARCADE) != 0)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD, driver));
- else
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD, driver));
- }
- }
- else
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3 && swinfo->startempty == 1)
- {
- if ((swinfo->driver->flags & MACHINE_TYPE_ARCADE) != 0)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD, swinfo->driver));
- else
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD, swinfo->driver));
- }
- }
- }
-
- // handle UI_STORY
- else if (m_event->iptkey == IPT_UI_STORY && enabled_dats)
- {
- if (main_filters::actual != FILTER_FAVORITE_GAME)
- {
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD, driver));
- }
- else
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3 && swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD, swinfo->driver));
- }
- }
-
- // handle UI_SYSINFO
- else if (m_event->iptkey == IPT_UI_SYSINFO && enabled_dats)
- {
- if (main_filters::actual != FILTER_FAVORITE_GAME)
- {
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD, driver));
- }
- else
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3 && swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD, swinfo->driver));
- }
- }
-
- // handle UI_COMMAND
- else if (m_event->iptkey == IPT_UI_COMMAND && enabled_dats)
- {
- if (main_filters::actual != FILTER_FAVORITE_GAME)
- {
- const game_driver *driver = (const game_driver *)m_event->itemref;
- if ((FPTR)driver > 3)
- ui_menu::stack_push(global_alloc_clear<ui_menu_command>(machine(), container, driver));
- }
- else
- {
- ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)swinfo > 3 && swinfo->startempty == 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_command>(machine(), container, swinfo->driver));
- }
- }
-
// handle UI_FAVORITES
else if (m_event->iptkey == IPT_UI_FAVORITES)
{
- if (main_filters::actual != FILTER_FAVORITE_GAME)
+ if (!isfavorite())
{
const game_driver *driver = (const game_driver *)m_event->itemref;
if ((FPTR)driver > 3)
@@ -552,8 +470,8 @@ void ui_menu_select_game::handle()
// if we're in an error state, overlay an error message
if (ui_error)
- machine().ui().draw_text_box(container, "The selected game is missing one or more required ROM or CHD images. "
- "Please select a different game.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
+ machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. "
+ "Please select a different machine.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
// handle filters selection from key shortcuts
if (check_filter)
@@ -573,14 +491,6 @@ void ui_menu_select_game::handle()
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual, SELECTOR_GAME, l_hover));
else if (l_hover == FILTER_YEAR)
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual, SELECTOR_GAME, l_hover));
- else if (l_hover == FILTER_SCREEN)
- {
- std::vector<std::string> text(screen_filters::length);
- for (int x = 0; x < screen_filters::length; ++x)
- text[x] = screen_filters::text[x];
-
- ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, text, screen_filters::actual, SELECTOR_GAME, l_hover));
- }
else
{
if (l_hover >= FILTER_ALL)
@@ -600,10 +510,10 @@ void ui_menu_select_game::populate()
ui_globals::switch_image = true;
int old_item_selected = -1;
- if (main_filters::actual != FILTER_FAVORITE_GAME)
+ if (!isfavorite())
{
// if search is not empty, find approximate matches
- if (m_search[0] != 0 && !no_active_search())
+ if (m_search[0] != 0 && !isfavorite())
populate_search();
else
{
@@ -618,28 +528,15 @@ void ui_menu_select_game::populate()
case FILTER_CATEGORY:
build_category();
break;
-
case FILTER_MANUFACTURER:
build_list(m_tmp, c_mnfct::ui[c_mnfct::actual].c_str());
break;
-
case FILTER_YEAR:
build_list(m_tmp, c_year::ui[c_year::actual].c_str());
break;
-
- case FILTER_SCREEN:
- case FILTER_STEREO:
- case FILTER_SAMPLES:
- case FILTER_NOSAMPLES:
- case FILTER_CHD:
- case FILTER_NOCHD:
- build_from_cache(m_tmp, screen_filters::actual);
- break;
-
case FILTER_CUSTOM:
build_custom();
break;
-
default:
build_list(m_tmp);
break;
@@ -805,7 +702,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
ui_manager &mui = machine().ui();
float tbarspace = mui.get_line_height();
- strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios + m_issbios);
+ strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios);
std::string filtered;
if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty())
@@ -821,11 +718,8 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
else if (main_filters::actual == FILTER_YEAR)
filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(c_year::ui[c_year::actual]).append(") -");
- else if (main_filters::actual == FILTER_SCREEN)
- filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(screen_filters::text[screen_filters::actual]).append(") -");
-
// display the current typeahead
- if (no_active_search())
+ if (isfavorite())
tempbuf[1].clear();
else
tempbuf[1].assign(filtered).append(" Search: ").append(m_search).append("_");
@@ -862,7 +756,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
}
// determine the text to render below
- if (main_filters::actual != FILTER_FAVORITE_GAME)
+ if (!isfavorite())
driver = ((FPTR)selectedref > 3) ? (const game_driver *)selectedref : nullptr;
else
{
@@ -1212,9 +1106,9 @@ void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event)
// returns if the search can be activated
//-------------------------------------------------
-inline bool ui_menu_select_game::no_active_search()
+inline bool ui_menu_select_game::isfavorite()
{
- return (main_filters::actual == FILTER_FAVORITE_GAME);
+ return (main_filters::actual == FILTER_FAVORITE);
}
//-------------------------------------------------
@@ -1226,14 +1120,14 @@ void ui_menu_select_game::inkey_special(const ui_menu_event *m_event)
int buflen = strlen(m_search);
// if it's a backspace and we can handle it, do so
- if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) && !no_active_search())
+ if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) && !isfavorite())
{
*(char *)utf8_previous_char(&m_search[buflen]) = 0;
reset(UI_MENU_RESET_SELECT_FIRST);
}
// if it's any other key and we're not maxed out, update
- else if ((m_event->unichar >= ' ' && m_event->unichar < 0x7f) && !no_active_search())
+ else if ((m_event->unichar >= ' ' && m_event->unichar < 0x7f) && !isfavorite())
{
buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar);
m_search[buflen] = 0;
@@ -1362,6 +1256,27 @@ void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers
m_displaylist.push_back(s_driver);
break;
}
+ case FILTER_CHD:
+ for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom)
+ if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
+ {
+ m_displaylist.push_back(s_driver);
+ break;
+ }
+ break;
+ case FILTER_NOCHD:
+ {
+ bool found = false;
+ for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom)
+ if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
+ {
+ found = true;
+ break;
+ }
+ if (!found)
+ m_displaylist.push_back(s_driver);
+ break;
+ }
}
}
}
@@ -1408,16 +1323,6 @@ void ui_menu_select_game::build_custom()
case FILTER_MANUFACTURER:
build_list(s_drivers, c_mnfct::ui[custfltr::mnfct[count]].c_str(), filter, bioscheck);
break;
- case FILTER_SCREEN:
- build_from_cache(s_drivers, custfltr::screen[count], filter, bioscheck);
- break;
- case FILTER_CHD:
- case FILTER_NOCHD:
- case FILTER_SAMPLES:
- case FILTER_NOSAMPLES:
- case FILTER_STEREO:
- build_from_cache(s_drivers, 0, filter, bioscheck);
- break;
default:
build_list(s_drivers, nullptr, filter, bioscheck);
break;
@@ -1442,59 +1347,6 @@ void ui_menu_select_game::build_category()
}
//-------------------------------------------------
-// build list from cache
-//-------------------------------------------------
-
-void ui_menu_select_game::build_from_cache(std::vector<const game_driver *> &s_drivers, int screens, int filter, bool bioscheck)
-{
- if (s_drivers.empty())
- {
- s_drivers = m_sortedlist;
- filter = main_filters::actual;
- }
-
- for (auto & s_driver : s_drivers)
- {
- if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0)
- continue;
- int idx = driver_list::find(s_driver->name);
-
- switch (filter)
- {
- case FILTER_SCREEN:
- if (driver_cache[idx].b_screen == screens)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_SAMPLES:
- if (driver_cache[idx].b_samples)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_NOSAMPLES:
- if (!driver_cache[idx].b_samples)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_STEREO:
- if (driver_cache[idx].b_stereo)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_CHD:
- if (driver_cache[idx].b_chd)
- m_displaylist.push_back(s_driver);
- break;
-
- case FILTER_NOCHD:
- if (!driver_cache[idx].b_chd)
- m_displaylist.push_back(s_driver);
- break;
- }
- }
-}
-
-//-------------------------------------------------
// populate search list
//-------------------------------------------------
@@ -1591,13 +1443,15 @@ void ui_menu_select_game::general_info(const game_driver *driver, std::string &b
strcatprintf(buffer, "Support Cocktail: %s\n", ((driver->flags & MACHINE_NO_COCKTAIL) ? "Yes" : "No"));
strcatprintf(buffer, "Driver is Bios: %s\n", ((driver->flags & MACHINE_IS_BIOS_ROOT) ? "Yes" : "No"));
strcatprintf(buffer, "Support Save: %s\n", ((driver->flags & MACHINE_SUPPORTS_SAVE) ? "Yes" : "No"));
-
- int idx = driver_list::find(driver->name);
- strcatprintf(buffer, "Screen Type: %s\n", screen_filters::text[driver_cache[idx].b_screen]);
strcatprintf(buffer, "Screen Orentation: %s\n", ((driver->flags & ORIENTATION_SWAP_XY) ? "Vertical" : "Horizontal"));
- strcatprintf(buffer, "Requires Samples: %s\n", (driver_cache[idx].b_samples ? "Yes" : "No"));
- strcatprintf(buffer, "Sound Channel: %s\n", (driver_cache[idx].b_stereo ? "Stereo" : "Mono"));
- strcatprintf(buffer, "Requires CHD: %s\n", (driver_cache[idx].b_chd ? "Yes" : "No"));
+ bool found = false;
+ for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom)
+ if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
+ {
+ found = true;
+ break;
+ }
+ strcatprintf(buffer, "Requires CHD: %s\n", (found ? "Yes" : "No"));
// audit the game first to see if we're going to work
if (machine().ui().options().info_audit())
@@ -1681,163 +1535,29 @@ void ui_menu_select_game::inkey_export()
// save drivers infos to file
//-------------------------------------------------
-void ui_menu_select_game::save_cache_info()
+void ui_menu_select_game::init_sorted_list()
{
- // attempt to open the output file
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
-
- if (file.open("info_", emulator_info::get_configname(), ".ini") == FILERR_NONE)
- {
- m_sortedlist.clear();
-
- // generate header
- std::string buffer = std::string("#\n").append(UI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
-
- // generate full list
- for (int x = 0; x < driver_list::total(); ++x)
- {
- const game_driver *driver = &driver_list::driver(x);
- if (driver == &GAME_NAME(___empty))
- continue;
-
- m_sortedlist.push_back(driver);
- c_mnfct::set(driver->manufacturer);
- c_year::set(driver->year);
- }
-
- // sort manufacturers - years and driver
- std::stable_sort(c_mnfct::ui.begin(), c_mnfct::ui.end());
- std::stable_sort(c_year::ui.begin(), c_year::ui.end());
- std::stable_sort(m_sortedlist.begin(), m_sortedlist.end(), sort_game_list);
-
- int index = 0;
- m_isabios = 0;
- m_issbios = 0;
- m_isarcades = 0;
- m_issystems = 0;
- for (int x = 0; x < driver_list::total(); ++x)
- {
- const game_driver *driver = &driver_list::driver(x);
- if (driver == &GAME_NAME(___empty))
- continue;
-
- if (driver->flags & MACHINE_TYPE_ARCADE)
- {
- if (driver->flags & MACHINE_IS_BIOS_ROOT)
- m_isabios++;
- m_isarcades++;
- }
- else
- {
- if (driver->flags & MACHINE_IS_BIOS_ROOT)
- m_issbios++;
- m_issystems++;
- }
- cache_info infos;
- machine_config config(*driver, machine().options());
-
- samples_device_iterator iter(config.root_device());
- infos.b_samples = (iter.first() != nullptr) ? 1 : 0;
-
- const screen_device *screen = config.first_screen();
- infos.b_screen = (screen != nullptr) ? screen->screen_type() : 0;
-
- speaker_device_iterator siter(config.root_device());
- sound_interface_iterator snditer(config.root_device());
- infos.b_stereo = (snditer.first() != nullptr && siter.count() > 1) ? 1 : 0;
- infos.b_chd = 0;
- for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom)
- if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom))
- {
- infos.b_chd = 1;
- break;
- }
- driver_cache[x].b_screen = infos.b_screen;
- driver_cache[x].b_samples = infos.b_samples;
- driver_cache[x].b_stereo = infos.b_stereo;
- driver_cache[x].b_chd = infos.b_chd;
- int find = driver_list::find(m_sortedlist[index++]->name);
- strcatprintf(buffer, "%d,%d,%d,%d,%d\n", infos.b_screen, infos.b_samples, infos.b_stereo, infos.b_chd, find);
- }
-
- strcatprintf(buffer, "%d,%d,%d,%d\n", m_isabios, m_issbios, m_isarcades, m_issystems);
- file.puts(buffer.c_str());
- file.close();
- }
-}
-
-//-------------------------------------------------
-// load drivers infos from file
-//-------------------------------------------------
-
-void ui_menu_select_game::load_cache_info()
-{
- driver_cache.resize(driver_list::total() + 1);
-
- // try to load driver cache
- emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ);
- if (file.open("info_", emulator_info::get_configname(), ".ini") != FILERR_NONE)
- {
- save_cache_info();
- return;
- }
-
- std::string readbuf;
- char rbuf[MAX_CHAR_INFO];
- file.gets(rbuf, MAX_CHAR_INFO);
- file.gets(rbuf, MAX_CHAR_INFO);
- readbuf = chartrimcarriage(rbuf);
- std::string a_rev = std::string(UI_VERSION_TAG).append(bare_build_version);
-
- // version not matching ? save and exit
- if (a_rev != readbuf)
- {
- file.close();
- save_cache_info();
+ if (!m_sortedlist.empty())
return;
- }
- size_t pos = 0, end = 0;
- file.gets(rbuf, MAX_CHAR_INFO);
- file.gets(rbuf, MAX_CHAR_INFO);
+ // generate full list
for (int x = 0; x < driver_list::total(); ++x)
{
const game_driver *driver = &driver_list::driver(x);
if (driver == &GAME_NAME(___empty))
continue;
+ if (driver->flags & MACHINE_IS_BIOS_ROOT)
+ m_isabios++;
+ m_sortedlist.push_back(driver);
c_mnfct::set(driver->manufacturer);
c_year::set(driver->year);
- file.gets(rbuf, MAX_CHAR_INFO);
- readbuf = chartrimcarriage(rbuf);
- pos = readbuf.find_first_of(',');
- driver_cache[x].b_screen = std::stoi(readbuf.substr(0, pos));
- end = readbuf.find_first_of(',', ++pos);
- driver_cache[x].b_samples = std::stoi(readbuf.substr(pos, end));
- pos = end;
- end = readbuf.find_first_of(',', ++pos);
- driver_cache[x].b_stereo = std::stoi(readbuf.substr(pos, end));
- pos = end;
- end = readbuf.find_first_of(',', ++pos);
- driver_cache[x].b_chd = std::stoi(readbuf.substr(pos, end));
- pos = end;
- int find = std::stoi(readbuf.substr(++pos));
- m_sortedlist.push_back(&driver_list::driver(find));
}
- file.gets(rbuf, MAX_CHAR_INFO);
- readbuf = chartrimcarriage(rbuf);
- pos = readbuf.find_first_of(',');
- m_isabios = std::stoi(readbuf.substr(0, pos));
- end = readbuf.find_first_of(',', ++pos);
- m_issbios = std::stoi(readbuf.substr(pos, end));
- pos = end;
- end = readbuf.find_first_of(',', ++pos);
- m_isarcades = std::stoi(readbuf.substr(pos, end));
- pos = end;
- m_issystems = std::stoi(readbuf.substr(++pos));
- file.close();
+
+ // sort manufacturers - years and driver
std::stable_sort(c_mnfct::ui.begin(), c_mnfct::ui.end());
std::stable_sort(c_year::ui.begin(), c_year::ui.end());
+ std::stable_sort(m_sortedlist.begin(), m_sortedlist.end(), sort_game_list);
}
//-------------------------------------------------
@@ -1944,14 +1664,6 @@ void ui_menu_select_game::load_custom_filters()
if (!strncmp(db, c_year::ui[z].c_str(), c_year::ui[z].length()))
custfltr::year[x] = z;
}
- else if (y == FILTER_SCREEN)
- {
- file.gets(buffer, MAX_CHAR_INFO);
- char *db = strchr(buffer, '=') + 2;
- for (size_t z = 0; z < screen_filters::length; ++z)
- if (!strncmp(db, screen_filters::text[z], strlen(screen_filters::text[z])))
- custfltr::screen[x] = z;
- }
}
}
file.close();
@@ -2004,7 +1716,6 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
}
x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// take off the borders
@@ -2077,7 +1788,6 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
@@ -2100,7 +1810,6 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y
float ar_x1 = ar_x0 + lr_arrow_width;
float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height;
- //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B));
if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y)
@@ -2396,6 +2105,10 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
}
}
+//-------------------------------------------------
+// draw right panel
+//-------------------------------------------------
+
void ui_menu_select_game::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2)
{
ui_manager &mui = machine().ui();
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h
index d09c9789ee0..4c1cf548d60 100644
--- a/src/emu/ui/selgame.h
+++ b/src/emu/ui/selgame.h
@@ -37,19 +37,12 @@ public:
virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override;
private:
- struct cache_info
- {
- UINT8 b_screen, b_stereo, b_samples, b_chd;
- };
-
- std::vector<cache_info> driver_cache;
-
enum { VISIBLE_GAMES_IN_SEARCH = 200 };
char m_search[40];
int m_prev_selected;
- int m_isabios, m_issbios, m_isarcades, m_issystems;
+ static int m_isabios;
- std::vector<const game_driver *> m_sortedlist;
+ static std::vector<const game_driver *> m_sortedlist;
std::vector<const game_driver *> m_availsortedlist;
std::vector<const game_driver *> m_unavailsortedlist;
std::vector<const game_driver *> m_displaylist;
@@ -62,12 +55,10 @@ private:
void build_category();
void build_available_list();
void build_list(std::vector<const game_driver *> &vec, const char *filter_text = nullptr, int filter = 0, bool bioscheck = false);
- void build_from_cache(std::vector<const game_driver *> &vec, int screens = 0, int filter = 0, bool bioscheck = false);
- bool no_active_search();
+ bool isfavorite();
void populate_search();
- void load_cache_info();
- void save_cache_info();
+ void init_sorted_list();
bool load_available_machines();
void load_custom_filters();
diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp
index 5d1acb27c34..d5697c3ba03 100644
--- a/src/emu/ui/selsoft.cpp
+++ b/src/emu/ui/selsoft.cpp
@@ -211,13 +211,18 @@ void ui_menu_select_software::handle()
}
}
- // handle UI_HISTORY
- else if (m_event->iptkey == IPT_UI_HISTORY && machine().ui().options().enabled_dats())
+ // handle UI_DATS
+ else if (m_event->iptkey == IPT_UI_DATS && machine().ui().options().enabled_dats())
{
ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref;
- if ((FPTR)ui_swinfo > 1)
- ui_menu::stack_push(global_alloc_clear<ui_menu_history_sw>(machine(), container, ui_swinfo, m_driver));
+ if ((FPTR)ui_swinfo > 1 && machine().datfile().has_data(ui_swinfo->driver))
+ {
+ if (ui_swinfo->startempty == 1)
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo->driver));
+ else
+ ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo));
+ }
}
// handle UI_UP_FILTER
diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp
index 8f5ada60071..0c0705e8414 100644
--- a/src/emu/ui/simpleselgame.cpp
+++ b/src/emu/ui/simpleselgame.cpp
@@ -181,8 +181,8 @@ void ui_simple_menu_select_game::inkey_cancel(const ui_menu_event *menu_event)
// escape pressed with non-empty text clears the text
if (m_search[0] != 0)
{
- // since we have already been popped, we must recreate ourself from scratch
- ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr));
+ m_search[0] = '\0';
+ reset(UI_MENU_RESET_SELECT_FIRST);
}
}
diff --git a/src/emu/ui/simpleselgame.h b/src/emu/ui/simpleselgame.h
index 50fcf10a432..316e3747b2f 100644
--- a/src/emu/ui/simpleselgame.h
+++ b/src/emu/ui/simpleselgame.h
@@ -27,6 +27,7 @@ public:
// force game select menu
static void force_game_select(running_machine &machine, render_container *container);
+ virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
private:
// internal state
enum { VISIBLE_GAMES_IN_LIST = 15 };
diff --git a/src/emu/ui/toolbar.h b/src/emu/ui/toolbar.h
index f15f4499229..095aa0e3cdd 100644
--- a/src/emu/ui/toolbar.h
+++ b/src/emu/ui/toolbar.h
@@ -106,75 +106,6 @@ static const UINT32 toolbar_bitmap_bmp[][1024] = {
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
},
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 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, 0xFFCACACA, 0xFFCACACA, 0xFFDBDBDB, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFBAC5A7, 0xFFB5C29F, 0xFFD6D8D1, 0xFF9AB077, 0xFFD1D5CA, 0xFFC9C9C9, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDCDDDA, 0xFFB2C09C, 0xFFB9C3A7, 0xFF95B06E, 0xFF99BE65, 0xFF94AE6B, 0xFF91B959, 0xFFB3C09D, 0xFF9EAD84, 0x5C778B57, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDADBD8, 0xFFC9CEBF, 0xFF90AE62, 0xFF93BE57, 0xFF8EB853, 0xFF97C060, 0xFFA2C86F, 0xFF94BE5D, 0xFF89B24D, 0xFF8DB852, 0x6B678E2C, 0x0E446804, 0x03466A06,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDDDEDC, 0xFFA5B68A, 0xFF92B263, 0xFF86AD4F, 0xFF8FB957, 0xFF8BB551, 0xFFB8D295, 0xFFEAF2E1, 0xFFB4D08F, 0xFF8DB754, 0xFF89B350, 0xCE76A038, 0xA16E962E, 0x27517612,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFFB2BC9F, 0xFF81AA47, 0xFF87B14F, 0xFF84AE4C, 0xFF80AB46, 0xFFC7DAAE, 0xFFFFFFFF, 0xFFC3D8A8, 0xFF84AE4B, 0xFF85AF4D, 0xFF8AB552, 0xBE6F9633, 0x1A466B07,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFB4BFA1, 0xFF8FAA64, 0xFF7BA53F, 0xFF7FA845, 0xFF7EA745, 0xFF7BA53F, 0xFFC0D4A4, 0xFFFFFFFF, 0xFFBAD09D, 0xFF7DA743, 0xFF7EA745, 0xFF80A946, 0xD9709931, 0x815C831C,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFAAB893, 0xFF7C9F48, 0xFF779F3C, 0xFF769F3B, 0xFF769F3B, 0xFF739C37, 0xFFB4CA93, 0xFFFEFEFD, 0xFFA9C284, 0xFF739D38, 0xFF769F3B, 0xFF769E3B, 0xFB769E3B, 0xBE628925,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFCBCFC5, 0xFF7D9A4F, 0xFF729935, 0xFF709834, 0xFF709734, 0xFF6E9631, 0xFFA7BF82, 0xFFFDFDFC, 0xFF9BB670, 0xFF6D9530, 0xFF709734, 0xFF709835, 0xF268902A, 0x5E517611,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF98A979, 0xFF6A8F2F, 0xFF678E2A, 0xFF688F2A, 0xFF688F2A, 0xFF678E29, 0xFF90AC63, 0xFFE7EDDE, 0xFF7FA04C, 0xFF668D27, 0xFF688F2A, 0xFF678E2A, 0xFB688F2A, 0xDC5A801A,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFCACEC4, 0xFFA3B28B, 0xFF5E8420, 0xFF618824, 0xFF618823, 0xFF618823, 0xFF678C2B, 0xFF83A153, 0xFF618824, 0xFF608723, 0xFF618823, 0xFF628924, 0xBC557A16, 0x434E730F,
- 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D8D7, 0xFF93A575, 0xFF5A811C, 0xFF597F1A, 0xFF597F1A, 0xFF567D15, 0xFFA1B77D, 0xFFF3F6EF, 0xFF98B072, 0xFF587E18, 0xFF597F1A, 0xFD59801A, 0xCF547A14, 0x27476B07,
- 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D8D7, 0xFFB3BDA3, 0xFF9BAC80, 0xFF658430, 0xFF557B16, 0xFF517810, 0xFF91A968, 0xFFDAE2CC, 0xFF8BA560, 0xFF527913, 0xFA537914, 0x9B4D720D, 0x5C4C710D, 0x15476C08,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFB8BBB3, 0xFF6E8744, 0xFF5E7A2D, 0xFF54761A, 0xFD4C720C, 0xF64C720C, 0xFB4C720B, 0xC54B700B, 0xD94C720D, 0x53496E0A, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55969793, 0x55728354, 0x557E8A69, 0xAB52731A, 0xBC4A6E0A, 0x70486C0A, 0xE0496D08, 0x41466B06, 0x2F476B07, 0x16476B07, 0x00000000, 0x00000000
-},
-
-{
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 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, 0xFFC6B7B1, 0xFFC6B5B0, 0xFFDBDBDA, 0xFFDAB9AF, 0xFFE1DBD9, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE1DFDE, 0xFFDEC9C0, 0xFFDDCDC7, 0xFFDB9673, 0xFFE49259, 0xFFDAA68E, 0xFFE4803C, 0xFFDCBAAC, 0xFFCAB2A9, 0x59A68679, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDED6D3, 0xFFDD8F62, 0xFFE78F50, 0xFFE8813C, 0xFFF0852D, 0xFFEB7D2A, 0xFFF0832C, 0xFFE2884F, 0xFFE38341, 0x63CF612D, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0DFDE, 0xFFDAB7AA, 0xFFDC9D7E, 0xFFDE7B42, 0xFFEB7F2A, 0xFFEA7C27, 0xFFED9D5F, 0xFFF6CFB1, 0xFFEE9A5B, 0xFFEB7E28, 0xFFE67729, 0xA4D76225, 0x66D55A22, 0x18C5461C,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDFDEDE, 0xFFD59F8C, 0xFFE77426, 0xFFE87627, 0xFFE47426, 0xFFE46F1E, 0xFFF3C09C, 0xFFFFFFFF, 0xFFF2B992, 0xFFE37324, 0xFFE67426, 0xFDE87727, 0xD1DC6523, 0x28C3441C,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDBC8C1, 0xFFD9A08A, 0xFFDE6521, 0xFFE06B21, 0xFFE06B21, 0xFFDF661A, 0xFFF0B794, 0xFFFFFFFF, 0xFFEEB28D, 0xFFE0691F, 0xFFDF6B21, 0xFFE06B21, 0xBED85A1F, 0x46CF4F1D,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFD3947C, 0xFFDC6527, 0xFFDE631D, 0xFFDB621D, 0xFFDC621D, 0xFFDB5E17, 0xFFECAD89, 0xFFFFFEFE, 0xFFEAA37A, 0xFFDB5F1A, 0xFFDC621D, 0xFFDC621D, 0xFBE1641E, 0xDED2541C,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFD9CFCD, 0xFFD17857, 0xFFD75819, 0xFFD65719, 0xFFD65719, 0xFFD55414, 0xFFE69A75, 0xFFFEFDFC, 0xFFE38C61, 0xFFD55313, 0xFFD65719, 0xFFD65719, 0xF2D45319, 0x5EC6451A,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD39B89, 0xFFD85925, 0xFFD35015, 0xFFD24F15, 0xFFD24F15, 0xFFD14D12, 0xFFE18B65, 0xFFFEFBF9, 0xFFDC784C, 0xFFD14B11, 0xFFD24F15, 0xFFD24E15, 0xFBD85015, 0xC0D04917,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD5B9B1, 0xFFCC7D64, 0xFFCC4513, 0xFFCD4410, 0xFFCD4410, 0xFFCD440F, 0xFFD15425, 0xFFE08F71, 0xFFCE4917, 0xFFCD430F, 0xFFCD4410, 0xFFCE4410, 0xD7C84315, 0x7CC34118,
- 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD1A598, 0xFFCD3E0E, 0xFFC93C0C, 0xFFC93C0D, 0xFFC83A0A, 0xFFD66B47, 0xFFEAB4A0, 0xFFD4633C, 0xFFC93B0B, 0xFFC93C0D, 0xFFCB3D0B, 0xBDCB3E12, 0x19BF3E19,
- 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D7D6, 0xFFCE9383, 0xFFC96A4E, 0xFFC4451F, 0xFFC53408, 0xFFC32E03, 0xFFDF907A, 0xFFF8E9E4, 0xFFDD8B72, 0xFFC43206, 0xFCC5350A, 0xCAC23911, 0x99C23B13, 0x24C03D18,
- 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD8D5D4, 0xFFD5C6C1, 0xFFC55A3D, 0xFFC1320B, 0xFFC13109, 0xFFC53D18, 0xFFCE5A3C, 0xFFC43B17, 0xF9C1310B, 0xFCC13109, 0x62BF3812, 0x0ABD3E1B, 0x02BE3E1A,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC2BEBD, 0xFFBA9185, 0xFFBDA19A, 0xFFBC5F46, 0xF2BB3D1C, 0xCBB84A2B, 0xE9BE2E09, 0x52BE3915, 0x5FBE3B17, 0x2BBE3A16, 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, 0x72B05D46, 0x66B74B2D, 0x22AE644F, 0x80BE3814, 0x1ABE3C18, 0x00000000, 0x00000000, 0x00000000, 0x00000000
-},
{
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp
index eb8078a4ab1..608b6b16a88 100644
--- a/src/emu/ui/utils.cpp
+++ b/src/emu/ui/utils.cpp
@@ -25,23 +25,17 @@ std::vector<std::string> c_mnfct::ui;
// Main filters
UINT16 main_filters::actual = 0;
-const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Mechanical", "Category", "Favorites", "BIOS",
- "Originals", "Clones", "Not Working", "Mechanical", "Manufacturers", "Years", "Support Save",
- "Not Support Save", "CHD", "No CHD", "Use Samples", "Not Use Samples", "Stereo", "Vertical",
- "Horizontal", "Screen Type", "Custom" };
+const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical",
+ "Category", "Favorites", "BIOS", "Originals", "Clones", "Manufacturers", "Years", "Support Save",
+ "Not Support Save", "CHD", "No CHD", "Vertical", "Horizontal", "Custom" };
size_t main_filters::length = ARRAY_LENGTH(main_filters::text);
// Software filters
UINT16 sw_filters::actual = 0;
const char *sw_filters::text[] = { "All", "Available", "Unavailable", "Originals", "Clones", "Years", "Publishers", "Supported",
- "Partial Supported", "Unsupported", "Region", "Device Type", "Software List", "Custom" };
+ "Partial Supported", "Unsupported", "Region", "Device Type", "Software List", "Custom" };
size_t sw_filters::length = ARRAY_LENGTH(sw_filters::text);
-// Screens
-UINT16 screen_filters::actual = 0;
-const char *screen_filters::text[] = { "<none>", "Raster", "Vector", "LCD" };
-size_t screen_filters::length = ARRAY_LENGTH(screen_filters::text);
-
// Globals
UINT8 ui_globals::rpanel = 0;
UINT8 ui_globals::curimage_view = 0;
diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h
index f89b27d88e8..232fb3ccb41 100644
--- a/src/emu/ui/utils.h
+++ b/src/emu/ui/utils.h
@@ -28,26 +28,22 @@ enum
FILTER_AVAILABLE,
FILTER_UNAVAILABLE,
FILTER_WORKING,
+ FILTER_NOT_WORKING,
+ FILTER_MECHANICAL,
FILTER_NOT_MECHANICAL,
FILTER_CATEGORY,
- FILTER_FAVORITE_GAME,
+ FILTER_FAVORITE,
FILTER_BIOS,
FILTER_PARENT,
FILTER_CLONES,
- FILTER_NOT_WORKING,
- FILTER_MECHANICAL,
FILTER_MANUFACTURER,
FILTER_YEAR,
FILTER_SAVE,
FILTER_NOSAVE,
FILTER_CHD,
FILTER_NOCHD,
- FILTER_SAMPLES,
- FILTER_NOSAMPLES,
- FILTER_STEREO,
FILTER_VERTICAL,
FILTER_HORIZONTAL,
- FILTER_SCREEN,
FILTER_CUSTOM,
FILTER_LAST = FILTER_CUSTOM
};
@@ -133,9 +129,7 @@ enum
HOVER_ARROW_DOWN,
HOVER_B_FAV,
HOVER_B_EXPORT,
- HOVER_B_HISTORY,
- HOVER_B_MAMEINFO,
- HOVER_B_COMMAND,
+ HOVER_B_DATS,
HOVER_B_FOLDERS,
HOVER_B_SETTINGS,
HOVER_RPANEL_ARROW,
@@ -226,8 +220,6 @@ struct name##_filters \
main_struct(main);
main_struct(sw);
-main_struct(ume);
-main_struct(screen);
// Custom filter
struct custfltr
diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp
index 3b8edc8ac84..4df6811dddc 100644
--- a/src/lib/netlist/devices/net_lib.cpp
+++ b/src/lib/netlist/devices/net_lib.cpp
@@ -41,8 +41,9 @@ NETLIST_START(bjt_models)
NET_MODEL("2N5190 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NET_MODEL("2SC945 NPN(IS=3.577E-14 BF=2.382E+02 NF=1.01 VAF=1.206E+02 IKF=3.332E-01 ISE=3.038E-16 NE=1.205 BR=1.289E+01 NR=1.015 VAR=1.533E+01 IKR=2.037E-01 ISC=3.972E-14 NC=1.115 RB=3.680E+01 IRB=1.004E-04 RBM=1 RE=8.338E-01 RC=1.557E+00 CJE=1.877E-11 VJE=7.211E-01 MJE=3.486E-01 TF=4.149E-10 XTF=1.000E+02 VTF=9.956 ITF=5.118E-01 PTF=0 CJC=6.876p VJC=3.645E-01 MJC=3.074E-01 TR=5.145E-08 XTB=1.5 EG=1.11 XTI=3 FC=0.5 Vceo=50 Icrating=100m MFG=NEC)")
- NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)")
+ NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45 ICRATING=100M MFG=ZETEX)")
NET_MODEL("BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)")
+ NET_MODEL("BC548C NPN(IS=1.95E-14 ISE=1.31E-15 ISC=1.0E-13 XTI=3 BF=466 BR=2.42 IKF=0.18 IKR=1 XTB=1.5 VAF=91.7 VAR=24.7 VJE=0.632 VJC=0.339 RE=1 RC=1.73 RB=26.5 RBM=10 IRB=10 CJE=1.33E-11 CJC=5.17E-12 XCJC=1 FC=0.9 NF=0.993 NR=1.2 NE=1.32 NC=2.00 MJE=0.326 MJC=0.319 TF=6.52E-10 TR=0 PTF=0 ITF=1.03 VTF=1.65 XTF=100 EG=1.11 KF=1E-9 AF=1 VCEO=40 ICrating=800M MFG=Siemens)")
NET_MODEL("BC817-25 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NETLIST_END()
diff --git a/src/mame/arcade.lst b/src/mame/arcade.lst
index b7e3c2ad46b..e3e49058ee2 100644
--- a/src/mame/arcade.lst
+++ b/src/mame/arcade.lst
@@ -2107,6 +2107,7 @@ sboblbobl // bootleg
sboblbobla // bootleg
sboblboblb // bootleg
sboblboblc // bootleg
+sboblbobld // bootleg
bublboblb // bootleg
bub68705 // bootleg
dland // bootleg
@@ -3091,6 +3092,7 @@ supduck // (c) Comad
1943j // 6/1987 (c) 1987 (Japan) Rev B
1943ja // 6/1987 (c) 1987 (Japan)
1943b // bootleg
+1943bj // bootleg
blktiger // 8/1987 (c) 1987 (US)
blktigera // 8/1987 (c) 1987 (US)
blktigerb1 // bootleg
@@ -5922,8 +5924,8 @@ mj2c // 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev C)
// 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev D)
ghostsqu // 2004.12.09 Ghost Squad (Rev A)
// 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev E)
-mj2 // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F)
-mj2g // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G)
+mj2f // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F)
+mj2 // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G)
// 2005.03 Sangokushi Taisen
gundamos // 2005.03 Gundam Battle Operating Simulator
// 2005.04 Quest of D Ver.1.20
@@ -7224,6 +7226,7 @@ asteroid // 035127-035145 (c) 1979
asteroid2 // 035127-035145 (c) 1979
asteroid1 // 035127-035145 no copyright notice
asteroidb // (bootleg)
+spcrocks // J.Estevez (c) 1981
aerolitos // Rodmar Elec. bootleg
asterock // Sidam bootleg (c) 1979
asterockv // Videotron bootleg(c) 1979
@@ -10075,9 +10078,12 @@ haekaka // (c) 2001 Sammy
goldstar // (c) 198? IGS
goldstbl // (c) 198? IGS
moonlght // bootleg
+moonlghta // bootleg
moonlghtb // bootleg
+moonlghtc // bootleg
chry10 // bootleg
chrygld // bootleg
+chryglda // bootleg
goldfrui // bootleg
wcherry // bootleg
super9 // (c) 2001 Playmark
@@ -10556,6 +10562,7 @@ fastdraw_130 // (c) 1995
aplatoon // (c) 199? Nova?
zortonbr // (c) 1993 Web Picmatic
+crospuzl //
// Crystal System
crysbios
crysking // 2001 Brezzasoft. Crystal of the kings
@@ -12281,6 +12288,8 @@ cmasterbv // (c) 1991 Dyna Electronics / Gerald Duhamel?
cmasterd // (c) 1991 Dyna Electronics
cmastere // (c) 1991 Dyna Electronics
cmasterf // (c) 1991 Dyna Electronics
+cmasterg // (c) 1991 Dyna Electronics
+cmasterh // (c) 1991 Dyna Electronics
cmast91 // (c) 1991 Dyna Electronics
cmast92 // (c) 1992 Dyna Electronics
cmast97 // (c) 1996 Dyna Electronics
diff --git a/src/mame/audio/laserbat.cpp b/src/mame/audio/laserbat.cpp
index b16c4d73388..963f3aa7f76 100644
--- a/src/mame/audio/laserbat.cpp
+++ b/src/mame/audio/laserbat.cpp
@@ -230,7 +230,9 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
The Cat and Mouse sound board has a 6802 processor with three ROMs,
a 6821 PIA, two AY-3-8910 PSGs, and some other logic and analog
circuitry. Unfortunately we lack a schematic, so all knowledge of
- this board is based on tracing the sound program.
+ this board is based on tracing the sound program, examining PCB
+ photos and cross-referencing with the schematic for the 1B11142
+ schematic.
The 6821 PIA is mapped at addresses $005C..$005F. The known PIA
signal assignments are as follows:
@@ -306,7 +308,8 @@ WRITE8_MEMBER(laserbat_state::csound2_w)
WRITE8_MEMBER(catnmous_state::csound1_w)
{
- m_pia->ca1_w((data & 0x20) ? 1 : 0);
+ m_audiopcb->sound_w(space, offset, data);
+
m_csound1 = data;
}
@@ -315,82 +318,8 @@ WRITE8_MEMBER(catnmous_state::csound2_w)
// the bottom bit is used for sprite banking, of all things
m_gfx2 = memregion("gfx2")->base() + ((data & 0x01) ? 0x0800 : 0x0000);
- // the top bit is called RESET on the wiring diagram - assume it resets the sound CPU
- m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
+ // the top bit is called RESET on the wiring diagram
+ m_audiopcb->reset_w((data & 0x80) ? 1 : 0);
m_csound2 = data;
}
-
-READ8_MEMBER(catnmous_state::pia_porta_r)
-{
- UINT8 const control = m_pia->b_output();
- UINT8 data = 0xff;
-
- if (0x01 == (control & 0x03))
- data &= m_psg1->data_r(space, 0);
-
- if (0x04 == (control & 0x0c))
- data &= m_psg2->data_r(space, 0);
-
- return data;
-}
-
-WRITE8_MEMBER(catnmous_state::pia_porta_w)
-{
- UINT8 const control = m_pia->b_output();
-
- if (control & 0x02)
- m_psg1->data_address_w(space, (control >> 0) & 0x01, data);
-
- if (control & 0x08)
- m_psg2->data_address_w(space, (control >> 2) & 0x01, data);
-}
-
-WRITE8_MEMBER(catnmous_state::pia_portb_w)
-{
- if (data & 0x02)
- m_psg1->data_address_w(space, (data >> 0) & 0x01, m_pia->a_output());
-
- if (data & 0x08)
- m_psg2->data_address_w(space, (data >> 2) & 0x01, m_pia->a_output());
-}
-
-WRITE_LINE_MEMBER(catnmous_state::pia_irqa)
-{
- m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE);
-}
-
-WRITE_LINE_MEMBER(catnmous_state::pia_irqb)
-{
- m_audiocpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
-}
-
-WRITE8_MEMBER(catnmous_state::psg1_porta_w)
-{
- // similar to zaccaria.c since we have no clue how this board really works
- // this code could be completely wrong/inappropriate for this game for all we know
- static double const table[8] = {
- RES_K(8.2),
- RES_R(820),
- RES_K(3.3),
- RES_R(150),
- RES_K(5.6),
- RES_R(390),
- RES_K(1.5),
- RES_R(47) };
- RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]);
- m_psg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]));
-}
-
-READ8_MEMBER(catnmous_state::psg1_portb_r)
-{
- // the sound program masks out the three most significant bits
- // assume they're not connected and read high from the internal pull-ups
- return m_csound1 | 0xe0;
-}
-
-INTERRUPT_GEN_MEMBER(catnmous_state::cb1_toggle)
-{
- m_cb1 = !m_cb1;
- m_pia->cb1_w(m_cb1 ? 1 : 0);
-}
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
new file mode 100644
index 00000000000..0df34d1d626
--- /dev/null
+++ b/src/mame/audio/zaccaria.cpp
@@ -0,0 +1,466 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+#include "emu.h"
+#include "audio/zaccaria.h"
+
+#include "cpu/m6800/m6800.h"
+#include "machine/clock.h"
+#include "machine/rescap.h"
+#include "sound/dac.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+device_type const ZACCARIA_1B11107 = &device_creator<zac1b11107_audio_device>;
+device_type const ZACCARIA_1B11142 = &device_creator<zac1b11142_audio_device>;
+
+
+
+//**************************************************************************
+// MEMORY MAPS
+//**************************************************************************
+
+/*
+ base melody/SFX generator CPU map
+ 1B11107 and 1B11142 both have a 6802 with internal RAM and a PIA accessed at 0x500c
+*/
+static ADDRESS_MAP_START(zac1b111xx_melody_base_map, AS_PROGRAM, 8, zac1b111xx_melody_base)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
+ AM_RANGE(0x400c, 0x400f) AM_MIRROR(0x1ff0) AM_DEVREADWRITE("melodypia", pia6821_device, read, write)
+ADDRESS_MAP_END
+
+
+/*
+ 1B11107 sound CPU, produces music and sound effects
+ mapping (from tracing sound program and cross-referencing 1B1142 schematic):
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+ 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM)
+ 0 0 1 x x x x x x x x x x x x x Open bus
+ 0 1 0 x x x x x x x x x 0 0 x x Open bus
+ 0 1 0 x x x x x x x x x 0 1 x x Open bus
+ 0 1 0 x x x x x x x x x 1 0 x x Open bus
+ 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 1G
+ 0 1 1 x x x x x x x x x x x x x Open bus
+ 1 0 x x x x x x x x x x x x x x Open bus
+ 1 1 0 0 * * * * * * * * * * * * R Enable ROM @ 1F
+ 1 1 0 1 * * * * * * * * * * * * Open bus
+ 1 1 1 0 * * * * * * * * * * * * R Enable ROM @ 1D
+ 1 1 1 1 * * * * * * * * * * * * R Enable ROM @ 1E
+
+ 6821 PIA:
+ * CA1 comes from the SOUND 5 line on the input (which may also be connected to an input on the AY chip at 1H)
+ * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz)
+ * PA0-7 connect to the data busses of the AY-3-8910 chips
+ * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 1H
+ * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 1I
+*/
+static ADDRESS_MAP_START(zac1b11107_melody_map, AS_PROGRAM, 8, zac1b11107_audio_device)
+ AM_IMPORT_FROM(zac1b111xx_melody_base_map)
+ AM_RANGE(0xc000, 0xcfff) AM_ROM // ROM @ 1F
+ AM_RANGE(0xe000, 0xffff) AM_ROM // ROM @ 1D, 1E
+ADDRESS_MAP_END
+
+
+/*
+ 1B11142 slave sound CPU, produces music and sound effects
+ mapping:
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+ 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM)
+ 0 0 1 x x x x x x x x x x x x x Open bus
+ 0 1 0 x x x x x x x x x 0 0 x x Open bus
+ 0 1 0 x x x x x x x x x 0 1 x x Open bus
+ 0 1 0 x x x x x x x x x 1 0 x x Open bus
+ 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
+ 0 1 1 x x x x x x x x x x x x x Open bus
+ 1 0 % % * * * * * * * * * * * * R /CS4A: Enable ROM 13
+ 1 1 % % * * * * * * * * * * * * R /CS5A: Enable ROM 9
+ note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
+ monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
+ hence for actual chips used, the mem map is:
+ 1 0 x * * * * * * * * * * * * * R /CS4A: Enable ROM 13
+ 1 1 x * * * * * * * * * * * * * R /CS5A: Enable ROM 9
+
+ 6821 PIA:
+ * CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1)
+ * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz)
+ * CA2 and CB2 are not connected
+ * PA0-7 connect to the data busses of the AY-3-8910 chips
+ * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G
+ * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H
+*/
+static ADDRESS_MAP_START(zac1b11142_melody_map, AS_PROGRAM, 8, zac1b11142_audio_device)
+ AM_IMPORT_FROM(zac1b111xx_melody_base_map)
+ AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x2000) AM_ROM // ROM 13
+ AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM // ROM 9
+ADDRESS_MAP_END
+
+
+/*
+ 1B11142 master sound CPU, controls DAC and speech directly
+ mapping:
+ A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
+ 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
+ x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
+ x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
+ x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
+ x x 0 1 0 1 x x x x x x x x x x W Command to slave melody cpu
+ x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
+ x x 0 1 1 1 x x x x x x x x x x Open bus
+ % % 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
+ % % 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
+ note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
+ monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
+ hence for actual chips used, the mem map is:
+ x * 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8
+ x * 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7
+
+ 6821 PIA:
+ PA0-7, PB0-1, CA2 and CB1 connect to the TMS5200
+ CA1 and CB2 are not connected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4)
+ PB3 connects to 'ACS' which goes to the Z80
+*/
+static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_device)
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
+ AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write)
+ AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408
+ AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w)
+ AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r)
+ AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low
+ AM_RANGE(0x3000, 0x3fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 low
+ AM_RANGE(0x6000, 0x6fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 high
+ AM_RANGE(0x7000, 0x7fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 high
+ADDRESS_MAP_END
+
+
+
+//**************************************************************************
+// MACHINE FRAGMENTS
+//**************************************************************************
+
+MACHINE_CONFIG_FRAGMENT(zac1b111xx_base_config)
+ MCFG_CPU_ADD("melodycpu", M6802, XTAL_3_579545MHz) // verified on pcb
+ MCFG_CPU_PROGRAM_MAP(zac1b111xx_melody_base_map)
+
+ MCFG_DEVICE_ADD("timebase", CLOCK, XTAL_3_579545MHz/4096/2) // CPU clock divided using 4040 and half of 74LS74
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("melodypia", pia6821_device, cb1_w))
+
+ MCFG_DEVICE_ADD("melodypia", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(READ8(zac1b111xx_melody_base, melodypia_porta_r))
+ MCFG_PIA_WRITEPA_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_porta_w))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_portb_w))
+ MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, nmi_line))
+ MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, irq_line))
+
+ MCFG_SOUND_ADD("melodypsg1", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
+ MCFG_AY8910_PORT_B_READ_CB(READ8(zac1b111xx_melody_base, melodypsg1_portb_r))
+
+ MCFG_SOUND_ADD("melodypsg2", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040
+MACHINE_CONFIG_END
+
+
+MACHINE_CONFIG_DERIVED(zac1b11107_config, zac1b111xx_base_config)
+ MCFG_CPU_MODIFY("melodycpu")
+ MCFG_CPU_PROGRAM_MAP(zac1b11107_melody_map)
+
+ MCFG_DEVICE_MODIFY("melodypsg1")
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg1_porta_w))
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0)
+
+ MCFG_DEVICE_MODIFY("melodypsg2")
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg2_porta_w))
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0)
+MACHINE_CONFIG_END
+
+
+MACHINE_CONFIG_DERIVED(zac1b11142_config, zac1b111xx_base_config)
+ MCFG_CPU_MODIFY("melodycpu")
+ MCFG_CPU_PROGRAM_MAP(zac1b11142_melody_map)
+
+ MCFG_DEVICE_MODIFY("melodypsg1")
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4g_porta_w))
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0)
+
+ MCFG_DEVICE_MODIFY("melodypsg2")
+ MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_porta_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_portb_w))
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0)
+
+ MCFG_CPU_ADD("audiocpu", M6802, XTAL_3_579545MHz) // verified on pcb
+ MCFG_CPU_PROGRAM_MAP(zac1b11142_audio_map)
+ MCFG_CPU_PERIODIC_INT_DRIVER(zac1b11142_audio_device, input_poll, 60)
+
+ MCFG_DEVICE_ADD("pia_1i", PIA6821, 0)
+ MCFG_PIA_READPA_HANDLER(DEVREAD8("speech", tms5220_device, status_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w))
+
+ MCFG_DAC_ADD("dac_1f")
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
+
+ // There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF)
+ // 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz
+ MCFG_SOUND_ADD("speech", TMS5200, 649200) // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that)
+ MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, cb1_w))
+ MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, ca2_w))
+ MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
+MACHINE_CONFIG_END
+
+
+
+//**************************************************************************
+// I/O PORT DEFINITIONS
+//**************************************************************************
+
+INPUT_PORTS_START(zac1b11142_ioports)
+ PORT_START("1B11142")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("P1") // test button? generates NMI on master CPU
+INPUT_PORTS_END
+
+
+
+//**************************************************************************
+// BASE MELODY GENERATOR DEVICE CLASS
+//**************************************************************************
+
+zac1b111xx_melody_base::zac1b111xx_melody_base(
+ machine_config const &mconfig,
+ device_type devtype,
+ char const *name,
+ char const *tag,
+ device_t *owner,
+ UINT32 clock,
+ char const *shortname,
+ char const *source)
+ : device_t(mconfig, devtype, name, tag, owner, clock, shortname, source)
+ , device_mixer_interface(mconfig, *this, 1)
+ , m_melodycpu(*this, "melodycpu")
+ , m_melodypia(*this, "melodypia")
+ , m_melodypsg1(*this, "melodypsg1")
+ , m_melodypsg2(*this, "melodypsg2")
+ , m_melody_command(0)
+{
+}
+
+READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r)
+{
+ UINT8 const control = m_melodypia->b_output();
+ UINT8 data = 0xff;
+
+ if (0x01 == (control & 0x03))
+ data &= m_melodypsg1->data_r(space, 0);
+
+ if (0x04 == (control & 0x0c))
+ data &= m_melodypsg2->data_r(space, 0);
+
+ return data;
+}
+
+WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_porta_w)
+{
+ UINT8 const control = m_melodypia->b_output();
+
+ if (control & 0x02)
+ m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data);
+
+ if (control & 0x08)
+ m_melodypsg2->data_address_w(space, (control >> 2) & 0x01, data);
+}
+
+WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_portb_w)
+{
+ if (data & 0x02)
+ m_melodypsg1->data_address_w(space, (data >> 0) & 0x01, m_melodypia->a_output());
+
+ if (data & 0x08)
+ m_melodypsg2->data_address_w(space, (data >> 2) & 0x01, m_melodypia->a_output());
+}
+
+READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r)
+{
+ return m_melody_command;
+}
+
+void zac1b111xx_melody_base::device_start()
+{
+ save_item(NAME(m_melody_command));
+}
+
+void zac1b111xx_melody_base::device_reset()
+{
+ m_melody_command = 0;
+}
+
+
+
+//**************************************************************************
+// 1B11107-SPECIFIC IMPLEMENTATION
+//**************************************************************************
+
+zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
+ : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11107, "Zaccaria 1B11107 Sound Board", tag, owner, clock, "zac1b11107", __FILE__)
+{
+}
+
+WRITE8_MEMBER(zac1b11107_audio_device::sound_w)
+{
+ // the sound program masks out the three most significant bits
+ // assume the top two bits are not connected and read high from the internal pull-ups
+ m_melodypia->ca1_w((data >> 5) & 0x01);
+ m_melody_command = data | 0xc0;
+}
+
+WRITE_LINE_MEMBER(zac1b11107_audio_device::reset_w)
+{
+ // TODO: there is a pulse-stretching network attached that should be simulated
+ m_melodycpu->set_input_line(INPUT_LINE_RESET, state);
+ // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time
+ // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time
+ // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time
+}
+
+WRITE8_MEMBER(zac1b11107_audio_device::melodypsg1_porta_w)
+{
+ // similar to 1B11142
+ // TODO: move this to netlist audio where it belongs, along with the rest of the filtering
+ static double const table[8] = {
+ RES_K(8.2),
+ RES_R(820),
+ RES_K(3.3),
+ RES_R(150),
+ RES_K(5.6),
+ RES_R(390),
+ RES_K(1.5),
+ RES_R(47) };
+ m_melodypsg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]));
+}
+
+WRITE8_MEMBER(zac1b11107_audio_device::melodypsg2_porta_w)
+{
+ // TODO: assume LEVELT is controlled here as is the case for 1B11142?
+}
+
+machine_config_constructor zac1b11107_audio_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(zac1b11107_config);
+}
+
+
+
+//**************************************************************************
+// 1B11142-SPECIFIC IMPLEMENTATION
+//**************************************************************************
+
+zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock)
+ : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11142, "Zaccaria 1B11142 Sound Board", tag, owner, clock, "zac1b11142", __FILE__)
+ , m_acs_cb(*this)
+ , m_audiocpu(*this, "audiocpu")
+ , m_pia_1i(*this, "pia_1i")
+ , m_speech(*this, "speech")
+ , m_inputs(*this, "1B11142")
+ , m_host_command(0)
+{
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::hs_w)
+{
+ m_host_command = data;
+ m_audiocpu->set_input_line(INPUT_LINE_IRQ0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+}
+
+READ_LINE_MEMBER(zac1b11142_audio_device::acs_r)
+{
+ return (~m_pia_1i->b_output() >> 3) & 0x01;
+}
+
+WRITE_LINE_MEMBER(zac1b11142_audio_device::ressound_w)
+{
+ // TODO: there is a pulse-stretching network attached that should be simulated
+ m_melodycpu->set_input_line(INPUT_LINE_RESET, state);
+ // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time
+ // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time
+ // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, state);
+ // TODO: holds the reset line of m_pia_1i - can't implement this in MAME at this time
+ // TODO: does some funky stuff with the VDD and VSS lines on the speech chip
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::ay_4g_porta_w)
+{
+ // TODO: (data & 0x07) controls tromba mix volume
+ // TODO: (data & 0x08) controls cassa gate
+ // TODO: (data & 0x10) controls rullante gate
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_porta_w)
+{
+ // TODO: data & 0x01 controls LEVEL
+ // TODO: data & 0x02 controls LEVELT
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_portb_w)
+{
+ // TODO: data & 0x01 controls ANAL3 filter
+}
+
+READ8_MEMBER(zac1b11142_audio_device::host_command_r)
+{
+ return m_host_command;
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::melody_command_w)
+{
+ m_melodypia->ca1_w((data >> 7) & 0x01);
+ m_melody_command = data;
+}
+
+WRITE8_MEMBER(zac1b11142_audio_device::pia_1i_portb_w)
+{
+ m_speech->rsq_w((data >> 0) & 0x01);
+ m_speech->wsq_w((data >> 1) & 0x01);
+ m_acs_cb((~data >> 3) & 0x01);
+ // TODO: a LED output().set_led_value(0, (data >> 4) & 0x01);
+}
+
+INTERRUPT_GEN_MEMBER(zac1b11142_audio_device::input_poll)
+{
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_inputs->read() & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+}
+
+machine_config_constructor zac1b11142_audio_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(zac1b11142_config);
+}
+
+ioport_constructor zac1b11142_audio_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(zac1b11142_ioports);
+}
+
+void zac1b11142_audio_device::device_start()
+{
+ zac1b111xx_melody_base::device_start();
+
+ m_acs_cb.resolve_safe();
+
+ save_item(NAME(m_host_command));
+}
+
+void zac1b11142_audio_device::device_reset()
+{
+ zac1b111xx_melody_base::device_reset();
+
+ m_host_command = 0;
+}
diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h
new file mode 100644
index 00000000000..1414b9d2959
--- /dev/null
+++ b/src/mame/audio/zaccaria.h
@@ -0,0 +1,135 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+#pragma once
+
+#ifndef __AUDIO_ZACCARIA_H__
+#define __AUDIO_ZACCARIA_H__
+
+#include "emu.h"
+#include "machine/6821pia.h"
+#include "machine/netlist.h"
+#include "sound/ay8910.h"
+#include "sound/tms5220.h"
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+extern device_type const ZACCARIA_1B11107;
+extern device_type const ZACCARIA_1B11142;
+
+
+
+//**************************************************************************
+// DEVICE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ZACCARIA_1B11107(_tag) \
+ MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11107, 0)
+
+#define MCFG_ZACCARIA_1B11142(_tag) \
+ MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0)
+
+#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
+ devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb);
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class zac1b111xx_melody_base : public device_t, public device_mixer_interface
+{
+public:
+ zac1b111xx_melody_base(
+ machine_config const &mconfig,
+ device_type devtype,
+ char const *name,
+ char const *tag,
+ device_t *owner,
+ UINT32 clock,
+ char const *shortname,
+ char const *source);
+
+ DECLARE_READ8_MEMBER(melodypia_porta_r);
+ DECLARE_WRITE8_MEMBER(melodypia_porta_w);
+ DECLARE_WRITE8_MEMBER(melodypia_portb_w);
+ DECLARE_READ8_MEMBER(melodypsg1_portb_r);
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ required_device<cpu_device> m_melodycpu;
+ required_device<pia6821_device> m_melodypia;
+ required_device<ay8910_device> m_melodypsg1;
+ required_device<ay8910_device> m_melodypsg2;
+
+ UINT8 m_melody_command;
+};
+
+
+class zac1b11107_audio_device : public zac1b111xx_melody_base
+{
+public:
+ zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
+
+ // host interface
+ DECLARE_WRITE8_MEMBER(sound_w);
+ DECLARE_WRITE_LINE_MEMBER(reset_w);
+
+ // PSG output handlers
+ DECLARE_WRITE8_MEMBER(melodypsg1_porta_w);
+ DECLARE_WRITE8_MEMBER(melodypsg2_porta_w);
+
+protected:
+ virtual machine_config_constructor device_mconfig_additions() const override;
+};
+
+
+class zac1b11142_audio_device : public zac1b111xx_melody_base
+{
+public:
+ template<class _Object> static devcb_base &static_set_acs_cb(device_t &device, _Object object)
+ { return downcast<zac1b11142_audio_device &>(device).m_acs_cb.set_callback(object); }
+
+ zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock);
+
+ // host interface
+ DECLARE_WRITE8_MEMBER(hs_w);
+ DECLARE_READ_LINE_MEMBER(acs_r);
+ DECLARE_WRITE_LINE_MEMBER(ressound_w);
+
+ // melody section handlers
+ DECLARE_WRITE8_MEMBER(ay_4g_porta_w);
+ DECLARE_WRITE8_MEMBER(ay_4h_porta_w);
+ DECLARE_WRITE8_MEMBER(ay_4h_portb_w);
+
+ // master audio section handlers
+ DECLARE_READ8_MEMBER(host_command_r);
+ DECLARE_WRITE8_MEMBER(melody_command_w);
+ DECLARE_WRITE8_MEMBER(pia_1i_portb_w);
+
+ // input ports don't push
+ INTERRUPT_GEN_MEMBER(input_poll);
+
+protected:
+ virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ devcb_write_line m_acs_cb;
+
+ required_device<cpu_device> m_audiocpu;
+ required_device<pia6821_device> m_pia_1i;
+ required_device<tms5220_device> m_speech;
+
+ required_ioport m_inputs;
+
+ UINT8 m_host_command;
+};
+
+#endif // __AUDIO_ZACCARIA_H__ \ No newline at end of file
diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp
index c91260a9b63..3dc4c5aa98c 100644
--- a/src/mame/drivers/1943.cpp
+++ b/src/mame/drivers/1943.cpp
@@ -694,7 +694,6 @@ ROM_START( 1943kai )
ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
ROM_END
-
ROM_START( 1943b )
ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */
ROM_LOAD( "1.12d", 0x00000, 0x08000, CRC(9a2d70ab) SHA1(6f84e906656f132ffcb63022f6d067580d261431) ) // protection patched out, disclaimer patched out
@@ -746,6 +745,64 @@ ROM_START( 1943b )
ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
ROM_END
+ROM_START( 1943bj )
+ ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */
+ ROM_LOAD( "mkb03.12d", 0x00000, 0x08000, CRC(b3b7c7cd) SHA1(6197023f4384fd2ac72b686c26a6ff2877345b61) ) // protection patched out
+ ROM_LOAD( "bm02.13d", 0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) )
+ ROM_LOAD( "bm03.14d", 0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "bm04.5h", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
+
+ ROM_REGION( 0x8000, "gfx1", 0 )
+ ROM_LOAD( "bm05.4k", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) ) /* characters */
+
+ ROM_REGION( 0x40000, "gfx2", 0 )
+ /* double size roms - same gfx different layout */
+ ROM_LOAD( "mkb12.12f", 0x00000, 0x8000, CRC(075e9a7f) SHA1(2b826d6d202d37cff1aeb58f225e70be7ba9a206) ) /* bg tiles */
+ ROM_CONTINUE( 0x10000, 0x08000 )
+ ROM_LOAD( "mkb11.14f", 0x08000, 0x8000, CRC(05aca09a) SHA1(21cc251e61343be27e969885b013fa6e8b5aa210) )
+ ROM_CONTINUE( 0x18000, 0x08000 )
+ ROM_LOAD( "mkb09.12j", 0x20000, 0x8000, CRC(0f4b7e0e) SHA1(1dd2a4a78ab45bb122895e5a0961e527f77713d1) )
+ ROM_CONTINUE( 0x30000, 0x08000 )
+ ROM_LOAD( "mkb10.14j", 0x28000, 0x8000, CRC(61a90c0a) SHA1(8aae483e51d645d9e4d2604dbca432c13a3e8d0d) )
+ ROM_CONTINUE( 0x38000, 0x08000 )
+
+ ROM_REGION( 0x10000, "gfx3", 0 )
+ ROM_LOAD( "mkb08.14k", 0x00000, 0x8000, CRC(798215e3) SHA1(1c732b60cd430aa0acd1698b4fe1984385223b28) ) /* fg tiles */
+ ROM_LOAD( "bm25.14l", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
+
+ ROM_REGION( 0x40000, "gfx4", 0 )
+ ROM_LOAD( "bm06.10a", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) ) /* sprites */
+ ROM_LOAD( "bm07.11a", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
+ ROM_LOAD( "bm08.12a", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
+ ROM_LOAD( "bm09.14a", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
+ ROM_LOAD( "bm10.10c", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
+ ROM_LOAD( "bm11.11c", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
+ ROM_LOAD( "bm12.12c", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
+ ROM_LOAD( "bm13.14c", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
+
+ ROM_REGION( 0x10000, "gfx5", 0 ) /* tilemaps */
+ /* front background */
+ ROM_LOAD( "bm14.5f", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )
+ /* back background probably same gfx different layout */
+ ROM_LOAD( "mkb07.8k", 0xc000, 0x4000, CRC(ae1b317f) SHA1(d311c198d77ec932d776427e2ebfffe90e5330c3) )
+ ROM_CONTINUE( 0x8000, 0x4000 )
+
+ ROM_REGION( 0x0c00, "proms", 0 )
+ ROM_LOAD( "bm1.12a", 0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) ) /* red component */
+ ROM_LOAD( "bm2.13a", 0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) ) /* green component */
+ ROM_LOAD( "bm3.14a", 0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) ) /* blue component */
+ ROM_LOAD( "bm5.7f", 0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) ) /* char lookup table */
+ ROM_LOAD( "bm10.7l", 0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) ) /* foreground lookup table */
+ ROM_LOAD( "bm9.6l", 0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) ) /* foreground palette bank */
+ ROM_LOAD( "bm12.12m", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) ) /* background lookup table */
+ ROM_LOAD( "bm11.12l", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) ) /* background palette bank */
+ ROM_LOAD( "bm8.8c", 0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) ) /* sprite lookup table */
+ ROM_LOAD( "bm7.7c", 0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) ) /* sprite palette bank */
+ ROM_LOAD( "bm4.12c", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */
+ ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */
+ROM_END
DRIVER_INIT_MEMBER(_1943_state,1943)
{
@@ -767,4 +824,5 @@ GAME( 1987, 1943ua, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom"
GAME( 1987, 1943j, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan, Rev B)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, 1943ja, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1987, 1943b, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Battle of Midway (bootleg, hack of Japan set)", MACHINE_SUPPORTS_SAVE )
-GAME( 1987, 1943kai, 0, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943 Kai: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, 1943bj, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Midway Kaisen (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1987, 1943kai, 0, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943 Kai: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE ) \ No newline at end of file
diff --git a/src/mame/drivers/1945kiii.cpp b/src/mame/drivers/1945kiii.cpp
index 55b4b8c6ee3..93b649814e9 100644
--- a/src/mame/drivers/1945kiii.cpp
+++ b/src/mame/drivers/1945kiii.cpp
@@ -2,6 +2,8 @@
// copyright-holders:David Haywood
/*
+what is this HW cloned from? I doubt it's an original design
+
1945 K-3 driver
---------------
@@ -54,8 +56,8 @@ class k3_state : public driver_device
public:
k3_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_oki1(*this, "oki1"),
- m_oki2(*this, "oki2") ,
+ m_oki2(*this, "oki2"),
+ m_oki1(*this, "oki1") ,
m_spriteram_1(*this, "spritera1"),
m_spriteram_2(*this, "spritera2"),
m_bgram(*this, "bgram"),
@@ -64,8 +66,8 @@ public:
m_palette(*this, "palette") { }
/* devices */
+ optional_device<okim6295_device> m_oki2;
required_device<okim6295_device> m_oki1;
- required_device<okim6295_device> m_oki2;
/* memory pointers */
required_shared_ptr<UINT16> m_spriteram_1;
required_shared_ptr<UINT16> m_spriteram_2;
@@ -78,6 +80,7 @@ public:
DECLARE_WRITE16_MEMBER(k3_scrollx_w);
DECLARE_WRITE16_MEMBER(k3_scrolly_w);
DECLARE_WRITE16_MEMBER(k3_soundbanks_w);
+ DECLARE_WRITE16_MEMBER(flagrall_soundbanks_w);
TILE_GET_INFO_MEMBER(get_k3_bg_tile_info);
virtual void machine_start() override;
virtual void video_start() override;
@@ -103,7 +106,7 @@ TILE_GET_INFO_MEMBER(k3_state::get_k3_bg_tile_info)
void k3_state::video_start()
{
- m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 64);
+ m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32);
}
void k3_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -151,31 +154,71 @@ WRITE16_MEMBER(k3_state::k3_scrolly_w)
WRITE16_MEMBER(k3_state::k3_soundbanks_w)
{
- m_oki1->set_bank_base((data & 4) ? 0x40000 : 0);
- m_oki2->set_bank_base((data & 2) ? 0x40000 : 0);
+ m_oki2->set_bank_base((data & 4) ? 0x40000 : 0);
+ m_oki1->set_bank_base((data & 2) ? 0x40000 : 0);
}
-static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state )
- AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // bug in code? (clean up log)
- AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // bug in code? (clean up log)
+WRITE16_MEMBER(k3_state::flagrall_soundbanks_w)
+{
+
+ data &= mem_mask;
+
+ // 0x0200 on startup
+ // 0x0100 on startup
+
+ // 0x80 - ?
+ // 0x40 - ?
+ // 0x20 - toggles, might trigger vram -> buffer transfer?
+ // 0x10 - unknown, always on?
+ // 0x08 - ?
+ // 0x06 - oki bank
+ // 0x01 - ?
+
+ if (data & 0xfcc9)
+ popmessage("unk control %04x", data & 0xfcc9);
+
+ m_oki1->set_bank_base(0x40000 * ((data & 0x6)>>1) );
+
+}
+
+
+static ADDRESS_MAP_START( k3_base_map, AS_PROGRAM, 16, k3_state )
+ AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // k3 - bug in code? (clean up log)
+ AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // l3 - bug in code? (clean up log)
AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM
AM_RANGE(0x100000, 0x10ffff) AM_RAM // Main Ram
AM_RANGE(0x200000, 0x200fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x240000, 0x240fff) AM_RAM AM_SHARE("spritera1")
AM_RANGE(0x280000, 0x280fff) AM_RAM AM_SHARE("spritera2")
- AM_RANGE(0x2c0000, 0x2c0fff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram")
+ AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram")
+ AM_RANGE(0x2c0800, 0x2c0fff) AM_RAM // or does k3 have a bigger tilemap? (flagrall is definitely 32x32 tiles)
AM_RANGE(0x340000, 0x340001) AM_WRITE(k3_scrollx_w)
AM_RANGE(0x380000, 0x380001) AM_WRITE(k3_scrolly_w)
- AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w)
AM_RANGE(0x400000, 0x400001) AM_READ_PORT("INPUTS")
AM_RANGE(0x440000, 0x440001) AM_READ_PORT("SYSTEM")
AM_RANGE(0x480000, 0x480001) AM_READ_PORT("DSW")
- AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00)
- AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00)
- AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used?
ADDRESS_MAP_END
+static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state )
+ AM_IMPORT_FROM( k3_base_map )
+
+ AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w)
+
+ AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00)
+ AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00)
+ AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used? (bug in code?)
+ADDRESS_MAP_END
+
+
+static ADDRESS_MAP_START( flagrall_map, AS_PROGRAM, 16, k3_state )
+ AM_IMPORT_FROM( k3_base_map )
+
+ AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(flagrall_soundbanks_w)
+ AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0x00ff)
+ADDRESS_MAP_END
+
+
static INPUT_PORTS_START( k3 )
PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
@@ -238,18 +281,81 @@ static INPUT_PORTS_START( k3 )
INPUT_PORTS_END
+static INPUT_PORTS_START( flagrall )
+ PORT_START("INPUTS")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("SYSTEM")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("DSW")
+ PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) )
+ PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" )
+ PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" )
+ PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0020, 0x0020, "Dip Control" ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW1:7" )
+ PORT_DIPNAME( 0x0080, 0x0080, "Picture Test" ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+
+ PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
+ PORT_DIPSETTING( 0x0200, "1" )
+ PORT_DIPSETTING( 0x0100, "2" )
+ PORT_DIPSETTING( 0x0300, "3" )
+ PORT_DIPSETTING( 0x0000, "5" )
+ PORT_DIPNAME( 0x0400, 0x0400, "Bonus Type" ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING ( 0x0400, "0" )
+ PORT_DIPSETTING( 0x0000, "1" )
+ PORT_DIPUNUSED_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" )
+ PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
+ PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
+ PORT_DIPSETTING( 0x1000, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x2000, DEF_STR( Easy ) )
+ PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) )
+ PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW2:7" )
+ PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+INPUT_PORTS_END
+
+
static const gfx_layout k3_layout =
{
16,16,
RGN_FRAC(1,1),
8,
{ 0,1,2,3,4,5,6,7 },
- { 0,8,16,24,32,40,48,56, 64, 72, 80, 88, 96, 104, 112, 120 },
- { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128,
- 8*128, 9*128,10*128,11*128,12*128,13*128,14*128,15*128 },
- 16*128
+ { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
+ { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
+ 16*128,
};
+
static GFXDECODE_START( 1945kiii )
GFXDECODE_ENTRY( "gfx1", 0, k3_layout, 0x0, 2 ) /* bg tiles */
GFXDECODE_ENTRY( "gfx2", 0, k3_layout, 0x0, 2 ) /* bg tiles */
@@ -260,20 +366,19 @@ void k3_state::machine_start()
{
}
-static MACHINE_CONFIG_START( k3, k3_state )
+static MACHINE_CONFIG_START( flagrall, k3_state )
- MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK)
- MCFG_CPU_PROGRAM_MAP(k3_map)
+ MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK ) // ?
+ MCFG_CPU_PROGRAM_MAP(flagrall_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", k3_state, irq4_line_hold)
-
MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1945kiii)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
+ MCFG_SCREEN_SIZE(64*8, 32*8)
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(k3_state, screen_update_k3)
MCFG_SCREEN_PALETTE("palette")
@@ -284,9 +389,19 @@ static MACHINE_CONFIG_START( k3, k3_state )
MCFG_OKIM6295_ADD("oki1", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
+
+
+static MACHINE_CONFIG_DERIVED( k3, flagrall )
+
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_PROGRAM_MAP(k3_map)
MCFG_OKIM6295_ADD("oki2", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MACHINE_CONFIG_END
@@ -296,10 +411,10 @@ ROM_START( 1945kiii )
ROM_LOAD16_BYTE( "prg-1.u51", 0x00001, 0x80000, CRC(6b345f27) SHA1(60867fa0e2ea7ebdd4b8046315ee0c83e5cf0d74) )
ROM_LOAD16_BYTE( "prg-2.u52", 0x00000, 0x80000, CRC(ce09b98c) SHA1(a06bb712b9cf2249cc535de4055b14a21c68e0c5) )
- ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */
+ ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */
ROM_LOAD( "snd-2.su4", 0x00000, 0x80000, CRC(47e3952e) SHA1(d56524621a3f11981e4434e02f5fdb7e89fff0b4) )
- ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */
+ ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */
ROM_LOAD( "snd-1.su7", 0x00000, 0x80000, CRC(bbb7f0ff) SHA1(458cf3a0c2d42110bc2427db675226c6b8d30999) )
ROM_REGION( 0x400000, "gfx1", 0 ) // sprites
@@ -310,4 +425,32 @@ ROM_START( 1945kiii )
ROM_LOAD( "m16m-3.u61", 0x00000, 0x200000, CRC(32fc80dd) SHA1(bee32493a250e9f21997114bba26b9535b1b636c) )
ROM_END
-GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE )
+ROM_START( flagrall )
+ ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
+ ROM_LOAD16_BYTE( "11_u34.bin", 0x00001, 0x40000, CRC(24dd439d) SHA1(88857ad5ed69f29de86702dcc746d35b69b3b93d) )
+ ROM_LOAD16_BYTE( "12_u35.bin", 0x00000, 0x40000, CRC(373b71a5) SHA1(be9ab93129e2ffd9bfe296c341dbdf47f1949ac7) )
+
+ ROM_REGION( 0x100000, "oki1", 0 ) /* Samples */
+ // 3x banks
+ ROM_LOAD( "13_su4.bin", 0x00000, 0x80000, CRC(7b0630b3) SHA1(c615e6630ffd12c122762751c25c249393bf7abd) )
+ ROM_LOAD( "14_su6.bin", 0x80000, 0x40000, CRC(593b038f) SHA1(b00dcf321fe541ee52c34b79e69c44f3d7a9cd7c) )
+
+ ROM_REGION( 0x300000, "gfx1", 0 )
+ ROM_LOAD32_BYTE( "1_u5.bin", 0x000000, 0x080000, CRC(9377704b) SHA1(ac516a8ba6d1a70086469504c2a46d47a1f4560b) )
+ ROM_LOAD32_BYTE( "5_u6.bin", 0x000001, 0x080000, CRC(1ac0bd0c) SHA1(ab71bb84e61f5c7168601695f332a8d4a30d9948) )
+ ROM_LOAD32_BYTE( "2_u7.bin", 0x000002, 0x080000, CRC(5f6db2b3) SHA1(84caa019d3b75be30a14d19ccc2f28e5e94028bd) )
+ ROM_LOAD32_BYTE( "6_u8.bin", 0x000003, 0x080000, CRC(79e4643c) SHA1(274f2741f39c63e32f49c6a1a72ded1263bdcdaa) )
+
+ ROM_LOAD32_BYTE( "3_u58.bin", 0x200000, 0x040000, CRC(c913df7d) SHA1(96e89ecb9e5f4d596d71d7ba35af7b2af4670342) )
+ ROM_LOAD32_BYTE( "4_u59.bin", 0x200001, 0x040000, CRC(cb192384) SHA1(329b4c1a4dc388d9f4ce063f9a54cbf3b967682a) )
+ ROM_LOAD32_BYTE( "7_u60.bin", 0x200002, 0x040000, CRC(f187a7bf) SHA1(f4ce9ac9fe376250fe426de6ee404fc7841ef08a) )
+ ROM_LOAD32_BYTE( "8_u61.bin", 0x200003, 0x040000, CRC(b73fa441) SHA1(a5a3533563070c870276ead5e2f9cb9aaba303cc))
+
+ ROM_REGION( 0x100000, "gfx2", 0 )
+ ROM_LOAD( "10_u102.bin", 0x00000, 0x80000, CRC(b1fd3279) SHA1(4a75581e13d43bef441ce81eae518c2f6bc1d5f8) )
+ ROM_LOAD( "9_u103.bin", 0x80000, 0x80000, CRC(01e6d654) SHA1(821d61a5b16f5cb76e2a805c8504db1ef38c3a48) )
+ROM_END
+
+
+GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE )
+GAME( 1996?,flagrall, 0, flagrall, flagrall, driver_device, 0, ROT0, "<unknown>", "'96 Flag Rally", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/amazonlf.cpp b/src/mame/drivers/amazonlf.cpp
new file mode 100644
index 00000000000..129af7c3631
--- /dev/null
+++ b/src/mame/drivers/amazonlf.cpp
@@ -0,0 +1,91 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/*
+
+ uses ADC 'Amazon-LF' SoC, EISC CPU core - similar to crystal system?
+
+*/
+
+#include "emu.h"
+#include "cpu/se3208/se3208.h"
+
+
+class amazonlf_state : public driver_device
+{
+public:
+ amazonlf_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_screen(*this, "screen")
+ { }
+
+ /* devices */
+ required_device<cpu_device> m_maincpu;
+ required_device<screen_device> m_screen;
+
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ UINT32 screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void screen_eof_amazonlf(screen_device &screen, bool state);
+};
+
+static ADDRESS_MAP_START( amazonlf_mem, AS_PROGRAM, 32, amazonlf_state )
+ AM_RANGE(0x00000000, 0x0007ffff) AM_ROM
+ADDRESS_MAP_END
+
+void amazonlf_state::machine_start()
+{
+}
+
+void amazonlf_state::machine_reset()
+{
+}
+
+UINT32 amazonlf_state::screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+void amazonlf_state::screen_eof_amazonlf(screen_device &screen, bool state)
+{
+}
+
+
+static INPUT_PORTS_START(amazonlf)
+
+INPUT_PORTS_END
+
+
+
+
+
+static MACHINE_CONFIG_START( amazonlf, amazonlf_state )
+
+ MCFG_CPU_ADD("maincpu", SE3208, 25175000) // ?
+ MCFG_CPU_PROGRAM_MAP(amazonlf_mem)
+
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(640, 480)
+ MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
+ MCFG_SCREEN_UPDATE_DRIVER(amazonlf_state, screen_update_amazonlf)
+ MCFG_SCREEN_VBLANK_DRIVER(amazonlf_state, screen_eof_amazonlf)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_PALETTE_ADD_RRRRRGGGGGGBBBBB("palette")
+MACHINE_CONFIG_END
+
+
+ROM_START( crospuzl )
+ ROM_REGION( 0x80010, "maincpu", 0 )
+ ROM_LOAD("en29lv040a.u5", 0x000000, 0x80010, CRC(d50e8500) SHA1(d681cd18cd0e48854c24291d417d2d6d28fe35c1) )
+
+ ROM_REGION32_LE( 0x8400010, "user1", ROMREGION_ERASEFF ) // Flash
+ // mostly empty, but still looks good
+ ROM_LOAD("k9f1g08u0a.riser", 0x000000, 0x8400010, CRC(7f3c88c3) SHA1(db3169a7b4caab754e9d911998a2ece13c65ce5b) )
+ROM_END
+
+
+GAME( 200?, crospuzl, 0, amazonlf, amazonlf, driver_device, 0, ROT0, "<unknown>", "Cross Puzzle", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index edca3b6b9b9..f89e0536569 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -103,6 +103,9 @@ public:
DECLARE_DRIVER_INIT( pal );
DECLARE_DRIVER_INIT( ntsc );
+ DECLARE_WRITE_LINE_MEMBER( side_int2_w );
+ DECLARE_WRITE_LINE_MEMBER( side_int6_w );
+
protected:
virtual void machine_reset() override;
@@ -616,6 +619,18 @@ void a500_state::machine_reset()
m_side->reset();
}
+WRITE_LINE_MEMBER( a500_state::side_int2_w )
+{
+ m_side_int2 = state;
+ update_int2();
+}
+
+WRITE_LINE_MEMBER( a500_state::side_int6_w )
+{
+ m_side_int6 = state;
+ update_int6();
+}
+
bool a500_state::int2_pending()
{
return m_cia_0_irq || m_side_int2;
@@ -1457,6 +1472,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500, amiga_base, a500_state )
// cpu slot
MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr)
+ MCFG_EXPANSION_SLOT_INT2_HANDLER(WRITELINE(a500_state, side_int2_w))
+ MCFG_EXPANSION_SLOT_INT6_HANDLER(WRITELINE(a500_state, side_int6_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( a500n, a500, a500_state )
diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp
index 65e2d0604e1..881209946ff 100644
--- a/src/mame/drivers/apple1.cpp
+++ b/src/mame/drivers/apple1.cpp
@@ -387,6 +387,15 @@ void apple1_state::machine_start()
m_ready_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_start_cb), this));
m_ready_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_end_cb), this));
m_kbd_strobe_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::keyboard_strobe_cb), this));
+
+ // setup save states
+ save_item(NAME(m_vram));
+ save_item(NAME(m_cursx));
+ save_item(NAME(m_cursy));
+ save_item(NAME(m_reset_down));
+ save_item(NAME(m_clear_down));
+ save_item(NAME(m_transchar));
+ save_item(NAME(m_lastports));
}
void apple1_state::machine_reset()
@@ -614,5 +623,5 @@ ROM_START(apple1)
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME */
-COMP( 1976, apple1, 0, 0, apple1, apple1, driver_device, 0, "Apple Computer", "Apple I", MACHINE_NO_SOUND_HW )
+COMP( 1976, apple1, 0, 0, apple1, apple1, driver_device, 0, "Apple Computer", "Apple I", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 99bc10dc341..8cf7052f829 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -2901,6 +2901,128 @@ static INPUT_PORTS_START( apple2euk )
PORT_INCLUDE(apple2_sysconfig)
INPUT_PORTS_END
+static INPUT_PORTS_START( apple2ees )
+ PORT_START("X0")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR(0xa3) // a3 is Unicode for the pound sign
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+
+ PORT_START("X1")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q')
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w')
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e')
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r')
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y')
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u')
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o')
+
+ PORT_START("X2")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a')
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d')
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s')
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h')
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f')
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g')
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k')
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf1) PORT_CHAR(0xf1)
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l')
+
+ PORT_START("X3")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z')
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x')
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c')
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v')
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b')
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n')
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_')
+
+ PORT_START("X4")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('`') PORT_CHAR(0xbf) // inverted question mark
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('\'') PORT_CHAR('?')
+
+ PORT_START("X5")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('<') PORT_CHAR('>')
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p')
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('~') PORT_CHAR('^')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*')
+
+ PORT_START("X6")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP)
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xc7) PORT_CHAR(0xa1) // c with cedilla / inverted exclamation point
+
+ PORT_START("X7")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)PORT_CHAR(8)
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10)
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT)
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT)
+
+ PORT_START("X8")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
+
+ PORT_START("keyb_special")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Open Apple") PORT_CODE(KEYCODE_LALT)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Solid Apple") PORT_CODE(KEYCODE_RALT)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
+
+ PORT_INCLUDE( apple2_gameport )
+ PORT_INCLUDE(apple2_sysconfig)
+INPUT_PORTS_END
+
INPUT_PORTS_START( apple2ep )
PORT_START("X0")
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
@@ -3433,6 +3555,18 @@ ROM_START(apple2euk)
ROM_LOAD( "341-0150-a.e12", 0x000, 0x800, CRC(66ffacd7) SHA1(47bb9608be38ff75429a989b930a93b47099648e) )
ROM_END
+ROM_START(apple2ees)
+ ROM_REGION(0x2000,"gfx1",0)
+ ROM_LOAD( "341-0212-a.e9", 0x000000, 0x002000, CRC(bc5575ef) SHA1(aa20c257255ef552295d32a3f56ccbb52b8716c3) )
+
+ ROM_REGION(0x8000,"maincpu",0)
+ ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e))
+ ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54))
+
+ ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
+ ROM_LOAD( "341-0211-a.f12", 0x000000, 0x000800, CRC(fac15d54) SHA1(abe019de22641b0647e829a1d4745759bdffe86a) )
+ROM_END
+
ROM_START(mprof3)
ROM_REGION(0x2000,"gfx1",0)
ROM_LOAD ( "mpf3.chr", 0x0000, 0x1000,CRC(2597bc19) SHA1(e114dcbb512ec24fb457248c1b53cbd78039ed20))
@@ -3613,6 +3747,7 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
COMP( 1983, apple2e, 0, apple2, apple2e, apple2e, driver_device, 0, "Apple Computer", "Apple //e", MACHINE_SUPPORTS_SAVE )
COMP( 1983, apple2euk,apple2e, 0, apple2e, apple2euk,driver_device, 0, "Apple Computer", "Apple //e (UK)", MACHINE_SUPPORTS_SAVE )
+COMP( 1983, apple2ees,apple2e, 0, apple2e, apple2ees,driver_device, 0, "Apple Computer", "Apple //e (Spain)", MACHINE_SUPPORTS_SAVE )
COMP( 1983, mprof3, apple2e, 0, mprof3, apple2e, driver_device, 0, "Multitech", "Microprofessor III", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
COMP( 1985, apple2ee, apple2e, 0, apple2ee, apple2e, driver_device, 0, "Apple Computer", "Apple //e (enhanced)", MACHINE_SUPPORTS_SAVE )
COMP( 1985, apple2eeuk,apple2e, 0, apple2ee, apple2euk, driver_device,0, "Apple Computer", "Apple //e (enhanced, UK)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index fc1d88c7169..fbaf3ba8be5 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -772,6 +772,23 @@ ROM_START( asteroidb )
ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) )
ROM_END
+/* Space Rocks (J.Estevez, Barcelona).
+ Seems to be a legit spanish set, since there are documented cabs
+ registered in Spain.
+*/
+ROM_START( spcrocks )
+ ROM_REGION( 0x8000, "maincpu", 0 )
+ ROM_LOAD( "1.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) )
+ ROM_LOAD( "2.bin", 0x7000, 0x0800, CRC(096ed35c) SHA1(064d680ded7f30c543f93ae5ca85f90d550f73e5) )
+ ROM_LOAD( "3.bin", 0x7800, 0x0800, CRC(b912754d) SHA1(d4ada3e162ff454a48468f6309947276df0c5331) )
+ /* Vector ROM */
+ ROM_LOAD( "e.bin", 0x5000, 0x0800, CRC(148ef465) SHA1(4b1158112364bc55b8aab4127949f9238c36b238) )
+
+ /* DVG PROM */
+ ROM_REGION( 0x100, "user1", 0 )
+ ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) )
+ROM_END
+
ROM_START( aerolitos )
ROM_REGION( 0x8000, "maincpu", 0 )
ROM_LOAD( "2516_1e.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) )
@@ -1023,6 +1040,7 @@ GAME( 1979, asteroid, 0, asteroid, asteroid, driver_device, 0,
GAME( 1979, asteroid2, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asteroid1, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asteroidb, asteroid, asteroid, asteroidb, asteroid_state, asteroidb, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, spcrocks, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "J.Estevez (Barcelona)", "Space Rocks (Spanish clone of Asteroids)", MACHINE_SUPPORTS_SAVE ) // Space Rocks seems to be a legit set. Cabinet registered to 'J.Estevez (Barcelona).
GAME( 1980, aerolitos, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "bootleg (Rodmar Elec.)","Aerolitos (Spanish bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) // 'Aerolitos' appears on the cabinet, this was distributed in Spain, the Spanish text is different to that contained in the original version (corrected)
GAME( 1979, asterock, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Sidam)", "Asterock (Sidam bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE )
GAME( 1979, asterockv, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Videotron)", "Asterock (Videotron bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp
index f2fba272e1d..f79a6e7c61a 100644
--- a/src/mame/drivers/bublbobl.cpp
+++ b/src/mame/drivers/bublbobl.cpp
@@ -1550,6 +1550,42 @@ ROM_START( sboblboblc )
ROM_END
+
+ROM_START( sboblbobld )
+ ROM_REGION( 0x30000, "maincpu", 0 )
+ ROM_LOAD( "3.bin", 0x00000, 0x08000, CRC(524cdc4f) SHA1(f778e53f664e911a5b992a4f85bcad1097eaa36f) )
+ /* ROMs banked at 8000-bfff */
+ ROM_LOAD( "5.bin", 0x10000, 0x08000, CRC(13118eb1) SHA1(5a5da40c2cc82420f70bc58ffa32de1088c6c82f) )
+ ROM_LOAD( "4.bin", 0x18000, 0x08000, CRC(13fe9baa) SHA1(ca1ca240d755621e533d9bbbdd8d953154670499) )
+ /* 20000-2ffff empty */
+
+ ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */
+ ROM_LOAD( "1.bin", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */
+ ROM_LOAD( "2.bin", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) )
+
+ ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )
+ ROM_LOAD( "12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */
+ ROM_LOAD( "13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) )
+ ROM_LOAD( "14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) )
+ ROM_LOAD( "15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) )
+ ROM_LOAD( "16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) )
+ ROM_LOAD( "17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) )
+ /* 0x30000-0x3ffff empty */
+ ROM_LOAD( "6", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */
+ ROM_LOAD( "7", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) )
+ ROM_LOAD( "8", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) )
+ ROM_LOAD( "9", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) )
+ ROM_LOAD( "10", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) )
+ ROM_LOAD( "11", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) )
+ /* 0x70000-0x7ffff empty */
+
+ ROM_REGION( 0x0100, "proms", 0 )
+ ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */
+
+ROM_END
+
ROM_START( bub68705 )
ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */
ROM_LOAD( "2.bin", 0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) )
@@ -1861,6 +1897,7 @@ GAME( 1986, boblbobl, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl
GAME( 1986, sboblbobl, bublbobl, boblbobl, sboblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
+GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked
GAME( 1986, bub68705, bublbobl, bub68705, bublbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index 366ef73c704..0b81164dd90 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -1015,7 +1015,7 @@ ROM_START( mj2c )
ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) )
ROM_END
-ROM_START( mj2 )
+ROM_START( mj2f )
CHIHIRO_BIOS
DISK_REGION( "gdrom" )
@@ -1041,12 +1041,11 @@ track01.bin 150 599 1058400
track02.raw 750 2101 3179904
track03.bin 45150 549299 1185760800
*/
-ROM_START( mj2g )
+ROM_START( mj2 )
CHIHIRO_BIOS
DISK_REGION( "gdrom" )
- // this is not CHDv4, but a really bad dump, only ~1/3 of disk content is dumped
- DISK_IMAGE_READONLY( "gdx-0006g", 0, BAD_DUMP SHA1(e306837d5c093fdf1e9ff02239a8563535b1c181) )
+ DISK_IMAGE_READONLY( "gdx-0006g", 0, SHA1(b8c8b440d4cd2488be78e3a002058ea5b176a1f2) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) )
@@ -1237,8 +1236,8 @@ ROM_END
/* 0006C */ GAME( 2004, mj2c, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev C) (GDX-0006C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0006D GAME( 2004, mj2d, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev D) (GDX-0006D)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0006E GAME( 2004, mj2e, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev E) (GDX-0006E)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
-/* 0006F */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
-/* 0006G */ GAME( 2004, mj2g, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+/* 0006F */ GAME( 2004, mj2f, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
+/* 0006G */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
/* 0007 */ GAME( 2004, ollie, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Amusement Vision", "Ollie King (GDX-0007)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0008 GAME( 2004, wangmdjo, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (GDX-0008)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
// 0008A GAME( 2004, wangmdja, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (Rev A) (GDX-0008A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index f4f1013eb7b..c331937fab4 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -3,7 +3,260 @@
/******************************************************************************
Fidelity Electronics 6502 based board driver
- See drivers/fidelz80.cpp for hardware description
+
+******************************************************************************
+
+Champion Sensory Chess Challenger (CSC)
+---------------------------------------
+
+Memory map:
+-----------
+0000-07FF: 2K of RAM
+0800-0FFF: 1K of RAM (note: mirrored twice)
+1000-17FF: PIA 0 (display, TSI speech chip)
+1800-1FFF: PIA 1 (keypad, LEDs)
+2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger)
+4000-7FFF: mirror of 0000-3FFF
+8000-9FFF: not used
+A000-BFFF: 101-1025A03 ROM
+C000-DFFF: 101-1025A02 ROM
+E000-FDFF: 101-1025A01 ROM
+FE00-FFFF: 512 byte 74S474 PROM
+
+CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2)
+
+NMI is not used.
+IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64).
+Reset is connected to a power-on reset circuit.
+
+PIA 0:
+------
+PA0 - 7seg segments E, TSI A0
+PA1 - 7seg segments D, TSI A1
+PA2 - 7seg segments C, TSI A2
+PA3 - 7seg segments H, TSI A3
+PA4 - 7seg segments G, TSI A4
+PA5 - 7seg segments F, TSI A5
+PA6 - 7seg segments B
+PA7 - 7seg segments A
+
+PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
+PB1 - START line on TSI
+PB2 - white wire
+PB3 - BUSY line from TSI
+PB4 - hi/lo TSI speaker volume
+PB5 - button row 9
+PB6 - selection jumper (resistor to 5V)
+PB7 - selection jumper (resistor to ground)
+
+CA1 - NC
+CA2 - violet wire
+
+CB1 - NC
+CB2 - NC (connects to pin 14 of soldered connector)
+
+PIA 1:
+------
+PA0 - button row 1
+PA1 - button row 2
+PA2 - button row 3
+PA3 - button row 4
+PA4 - button row 5
+PA5 - button row 6
+PA6 - 7442 selector bit 0
+PA7 - 7442 selector bit 1
+
+PB0 - LED row 1
+PB1 - LED row 2
+PB2 - LED row 3
+PB3 - LED row 4
+PB4 - LED row 5
+PB5 - LED row 6
+PB6 - LED row 7
+PB7 - LED row 8
+
+CA1 - button row 7
+CA2 - selector bit 3
+
+CB1 - button row 8
+CB2 - selector bit 2
+
+Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442)
+---------
+output # (selected turns this column on, and all others off)
+0 - LED column A, button column A, 7seg digit 1
+1 - LED column B, button column B, 7seg digit 2
+2 - LED column C, button column C, 7seg digit 3
+3 - LED column D, button column D, 7seg digit 4
+4 - LED column E, button column E
+5 - LED column F, button column F
+6 - LED column G, button column G
+7 - LED column H, button column H
+8 - button column I
+9 - Tone line (toggle to make a tone in the buzzer)
+
+The rows/columns are indicated on the game board:
+
+ ABCDEFGH I
+--------------
+| | 8
+| | 7
+| | 6
+| | 5
+| | 4
+| | 3
+| | 2
+| | 1
+--------------
+
+The "lone LED" is above the control column.
+column I is the "control column" on the right for starting a new game, etc.
+
+The upper 6 buttons are connected as such:
+
+column A - speak
+column B - RV
+column C - TM
+column D - LV
+column E - DM
+column F - ST
+
+these 6 buttons use row 9 (connects to PIA 0)
+
+LED display:
+------------
+43 21 (digit number)
+-----
+88:88
+
+The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments.
+
+The upper dot is connected to digit 3 common
+The lower dot is connected to digit 4 common
+The lone LED is connected to digit 1 common
+
+All three of the above are called "segment H".
+
+
+******************************************************************************
+
+Sensory Chess Challenger (SC12-B, 6086)
+4 versions are known to exist: A,B,C, and X, with increasing CPU speed.
+---------------------------------
+RE information from netlist by Berger
+
+8*(8+1) buttons, 8+8+2 red LEDs
+DIN 41524C printer port
+36-pin edge connector
+CPU is a R65C02P4, running at 4MHz
+
+NE556 dual-timer IC:
+- timer#1, one-shot at power-on, to CPU _RESET
+- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us
+
+Memory map:
+-----------
+6000-0FFF: 4K RAM (2016 * 2)
+2000-5FFF: cartridge
+6000-7FFF: control(W)
+8000-9FFF: 8K ROM SSS SCM23C65E4
+A000-BFFF: keypad(R)
+C000-DFFF: 4K ROM TI TMS2732AJL-45
+E000-FFFF: 8K ROM Toshiba TMM2764D-2
+
+control: (74LS377)
+--------
+Q0-Q3: 7442 A0-A3
+Q4: enable printer port pin 1 input
+Q5: printer port pin 5 output
+Q6,Q7: LEDs common anode
+
+7442 0-8: input mux and LEDs cathode
+7442 9: buzzer
+
+The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7.
+If control Q4 is set, printer data can be read from I0.
+
+
+******************************************************************************
+
+Voice Excellence (model 6092)
+----------------
+PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards
+CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6)
+2 rows of LEDs on the side: 1*8 green, 1*8 red
+
+PCB 2: 510.1117A01
+Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2)
+Dip Switches set ROM A13 and ROM A14, on the side of the board
+
+ROM A12 is tied to S14001A's A11 (yuck)
+ROM A11 is however tied to the CPU's XYZ
+
+0000_07FF - Spanish 1/4
+0800_0FFF - Spanish 3/4
+1000_17FF - Spanish 2/4
+1800_1FFF - Spanish 4/4
+
+2000_27FF - French 1/4
+2800_2FFF - French 3/4
+3000_3FFF - French 2/4
+3800_3FFF - French 4/4
+
+4000_47FF - German 1/4
+4800_4FFF - German 3/4
+5000_57FF - German 2/4
+5800_5FFF - German 4/4
+
+6000_67FF - English 1/2
+6800_6FFF - Bridge Challenger 1/2
+7000_77FF - English 2/2
+7800_7FFF - Bridge Challenger 2/2
+
+------------------
+RE info by hap, based on PCB photos
+
+Memory map:
+-----------
+0000-3FFF: 8K RAM (SRM2264)
+4000-7FFF: control (R/W)
+8000-FFFF: 32K ROM (M27256 compatible)
+
+control (W):
+------------
+Z80 A0-A2 to 3*74259, Z80 Dx to D (_C unused)
+
+Z80 D0:
+- Q4,Q5: led commons
+- Q6,Q7,Q2,Q1: 7seg panel digit select
+- Q0-Q3: 7442 A0-A3
+ + 0-7: led data
+ + 0-8: keypad mux
+ + 9: buzzer out
+
+Z80 D1: (model 6093)
+- Q0-Q7: 7seg data
+
+Z80 D2: (model 6092)
+- Q0-Q5: TSI C0-C5
+- Q6: TSI START pin
+- Q7: TSI ROM A11
+
+A11 from TSI is tied to TSI ROM A12(!)
+TSI ROM A13,A14 are hardwired to the 2 language switches.
+Sound comes from the Audio out pin, digital out pins are N/C.
+
+control (R):
+------------
+Z80 A0-A2 to 2*74251, Z80 Dx to output
+
+Z80 D7 to Y:
+- D0-D7: keypad row data
+
+Z80 D6 to W: (model 6092, tied to VCC otherwise)
+- D0,D1: language switches
+- D2-D6: VCC
+- D7: TSI BUSY
******************************************************************************/
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
new file mode 100644
index 00000000000..bb2231e78af
--- /dev/null
+++ b/src/mame/drivers/fidel68k.cpp
@@ -0,0 +1,120 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+/******************************************************************************
+
+ Fidelity Electronics 68000 based board driver
+
+******************************************************************************
+
+Elite Avant Garde (EAG)
+-----------------------
+
+- MC68HC000P12F 16MHz CPU, 16MHz XTAL
+- MB1422A DRAM Controller, 25MHz XTAL near, 4 DRAM slots(this model: slot 1 and 2 64KB)
+- 2*27C512 EPROM, 2*KM6264AL-10 SRAM, 2*AT28C64X EEPROM(parallel)
+- OKI M82C51A-2 USART, 4.9152MHz XTAL, assume it's used for factory test/debug
+- other special: Chessboard squares are magnet sensors
+
+
+Memory map:
+-----------
+000000-01FFFF: 128KB ROM
+104000-107FFF: 16KB SRAM
+604000-607FFF: 16KB EEPROM
+
+******************************************************************************/
+
+#include "emu.h"
+#include "cpu/m68000/m68000.h"
+
+#include "includes/fidelz80.h"
+
+// internal artwork
+#include "fidel_eag.lh"
+
+
+class fidel68k_state : public fidelz80base_state
+{
+public:
+ fidel68k_state(const machine_config &mconfig, device_type type, const char *tag)
+ : fidelz80base_state(mconfig, type, tag)
+ { }
+
+ // EAG
+ //..
+};
+
+
+
+// Devices, I/O
+
+/******************************************************************************
+ EAG
+******************************************************************************/
+
+
+
+/******************************************************************************
+ Address Maps
+******************************************************************************/
+
+// EAG
+
+static ADDRESS_MAP_START( eag_map, AS_PROGRAM, 16, fidel68k_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ AM_RANGE(0x000000, 0x01ffff) AM_ROM
+ AM_RANGE(0x104000, 0x107fff) AM_RAM
+ AM_RANGE(0x200000, 0x20ffff) AM_RAM
+ AM_RANGE(0x604000, 0x607fff) AM_RAM
+ADDRESS_MAP_END
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
+static INPUT_PORTS_START( eag )
+
+INPUT_PORTS_END
+
+
+
+/******************************************************************************
+ Machine Drivers
+******************************************************************************/
+
+static MACHINE_CONFIG_START( eag, fidel68k_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
+ MCFG_CPU_PROGRAM_MAP(eag_map)
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_fidel_eag)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
+
+ROM_START( feagv2 )
+ ROM_REGION16_BE( 0x20000, "maincpu", 0 )
+ ROM_LOAD16_BYTE("6114_e5.u18", 0x00000, 0x10000, CRC(f9c7bada) SHA1(60e545f829121b9a4f1100d9e85ac83797715e80) ) // 27c512
+ ROM_LOAD16_BYTE("6114_o5.u19", 0x00001, 0x10000, CRC(04f97b22) SHA1(8b2845dd115498f7b385e8948eca6a5893c223d1) ) // 27c512
+ROM_END
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
+COMP( 1989, feagv2, 0, 0, eag, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde V2", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index 3ebb4f2919e..0b89945fd0a 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -3,7 +3,8 @@
/******************************************************************************
Fidelity Electronics Z80 based board driver
- for 6502 based boards, see drivers/fidel6502.cpp (documentation is in this driver)
+ for 6502 based boards, see drivers/fidel6502.cpp
+ for 68000 based boards, see drivers/fidel68k.cpp
TODO:
- Figure out why it says the first speech line twice; it shouldn't?
@@ -347,140 +348,6 @@ A detailed description of the hardware can be found also in the patent 4,373,719
******************************************************************************
-Champion Sensory Chess Challenger (CSC)
----------------------------------------
-
-Memory map:
------------
-0000-07FF: 2K of RAM
-0800-0FFF: 1K of RAM (note: mirrored twice)
-1000-17FF: PIA 0 (display, TSI speech chip)
-1800-1FFF: PIA 1 (keypad, LEDs)
-2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger)
-4000-7FFF: mirror of 0000-3FFF
-8000-9FFF: not used
-A000-BFFF: 101-1025A03 ROM
-C000-DFFF: 101-1025A02 ROM
-E000-FDFF: 101-1025A01 ROM
-FE00-FFFF: 512 byte 74S474 PROM
-
-CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2)
-
-NMI is not used.
-IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64).
-Reset is connected to a power-on reset circuit.
-
-PIA 0:
-------
-PA0 - 7seg segments E, TSI A0
-PA1 - 7seg segments D, TSI A1
-PA2 - 7seg segments C, TSI A2
-PA3 - 7seg segments H, TSI A3
-PA4 - 7seg segments G, TSI A4
-PA5 - 7seg segments F, TSI A5
-PA6 - 7seg segments B
-PA7 - 7seg segments A
-
-PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
-PB1 - START line on TSI
-PB2 - white wire
-PB3 - BUSY line from TSI
-PB4 - hi/lo TSI speaker volume
-PB5 - button row 9
-PB6 - selection jumper (resistor to 5V)
-PB7 - selection jumper (resistor to ground)
-
-CA1 - NC
-CA2 - violet wire
-
-CB1 - NC
-CB2 - NC (connects to pin 14 of soldered connector)
-
-PIA 1:
-------
-PA0 - button row 1
-PA1 - button row 2
-PA2 - button row 3
-PA3 - button row 4
-PA4 - button row 5
-PA5 - button row 6
-PA6 - 7442 selector bit 0
-PA7 - 7442 selector bit 1
-
-PB0 - LED row 1
-PB1 - LED row 2
-PB2 - LED row 3
-PB3 - LED row 4
-PB4 - LED row 5
-PB5 - LED row 6
-PB6 - LED row 7
-PB7 - LED row 8
-
-CA1 - button row 7
-CA2 - selector bit 3
-
-CB1 - button row 8
-CB2 - selector bit 2
-
-Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442)
----------
-output # (selected turns this column on, and all others off)
-0 - LED column A, button column A, 7seg digit 1
-1 - LED column B, button column B, 7seg digit 2
-2 - LED column C, button column C, 7seg digit 3
-3 - LED column D, button column D, 7seg digit 4
-4 - LED column E, button column E
-5 - LED column F, button column F
-6 - LED column G, button column G
-7 - LED column H, button column H
-8 - button column I
-9 - Tone line (toggle to make a tone in the buzzer)
-
-The rows/columns are indicated on the game board:
-
- ABCDEFGH I
---------------
-| | 8
-| | 7
-| | 6
-| | 5
-| | 4
-| | 3
-| | 2
-| | 1
---------------
-
-The "lone LED" is above the control column.
-column I is the "control column" on the right for starting a new game, etc.
-
-The upper 6 buttons are connected as such:
-
-column A - speak
-column B - RV
-column C - TM
-column D - LV
-column E - DM
-column F - ST
-
-these 6 buttons use row 9 (connects to PIA 0)
-
-LED display:
-------------
-43 21 (digit number)
------
-88:88
-
-The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments.
-
-The upper dot is connected to digit 3 common
-The lower dot is connected to digit 4 common
-The lone LED is connected to digit 1 common
-
-All three of the above are called "segment H".
-
-
-******************************************************************************
-
Voice Sensory Chess Challenger (VSC)
------------------------------------
The display/button/LED/speech technology is identical to the above product.
@@ -550,7 +417,7 @@ This sequence repeats every 16 addresses. So to recap:
10-FF: mirrors of 00-0F.
-Refer to the Sensory Champ. Chess Chall. above for explanations of the below
+Refer to the Sensory Champ. Chess Chall. for explanations of the below
I/O names and labels. It's the same.
8255:
@@ -614,127 +481,6 @@ Anyways, the two jumpers are connected to button columns A and B and the common
connects to Z80A PIO PB.5, which basically makes a 10th button row. I would
expect that the software reads these once on startup only.
-
-******************************************************************************
-
-Sensory Chess Challenger (SC12-B, 6086)
-4 versions are known to exist: A,B,C, and X, with increasing CPU speed.
----------------------------------
-RE information from netlist by Berger
-
-8*(8+1) buttons, 8+8+2 red LEDs
-DIN 41524C printer port
-36-pin edge connector
-CPU is a R65C02P4, running at 4MHz
-
-NE556 dual-timer IC:
-- timer#1, one-shot at power-on, to CPU _RESET
-- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us
-
-Memory map:
------------
-6000-0FFF: 4K RAM (2016 * 2)
-2000-5FFF: cartridge
-6000-7FFF: control(W)
-8000-9FFF: 8K ROM SSS SCM23C65E4
-A000-BFFF: keypad(R)
-C000-DFFF: 4K ROM TI TMS2732AJL-45
-E000-FFFF: 8K ROM Toshiba TMM2764D-2
-
-control: (74LS377)
---------
-Q0-Q3: 7442 A0-A3
-Q4: enable printer port pin 1 input
-Q5: printer port pin 5 output
-Q6,Q7: LEDs common anode
-
-7442 0-8: input mux and LEDs cathode
-7442 9: buzzer
-
-The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7.
-If control Q4 is set, printer data can be read from I0.
-
-
-******************************************************************************
-
-Voice Excellence (model 6092)
-----------------
-PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards
-CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6)
-2 rows of LEDs on the side: 1*8 green, 1*8 red
-
-PCB 2: 510.1117A01
-Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2)
-Dip Switches set ROM A13 and ROM A14, on the side of the board
-
-ROM A12 is tied to S14001A's A11 (yuck)
-ROM A11 is however tied to the CPU's XYZ
-
-0000_07FF - Spanish 1/4
-0800_0FFF - Spanish 3/4
-1000_17FF - Spanish 2/4
-1800_1FFF - Spanish 4/4
-
-2000_27FF - French 1/4
-2800_2FFF - French 3/4
-3000_3FFF - French 2/4
-3800_3FFF - French 4/4
-
-4000_47FF - German 1/4
-4800_4FFF - German 3/4
-5000_57FF - German 2/4
-5800_5FFF - German 4/4
-
-6000_67FF - English 1/2
-6800_6FFF - Bridge Challenger 1/2
-7000_77FF - English 2/2
-7800_7FFF - Bridge Challenger 2/2
-
-------------------
-RE info by hap, based on PCB photos
-
-Memory map:
------------
-0000-3FFF: 8K RAM (SRM2264)
-4000-7FFF: control (R/W)
-8000-FFFF: 32K ROM (M27256 compatible)
-
-control (W):
-------------
-Z80 A0-A2 to 3*74259, Z80 Dx to D (_C unused)
-
-Z80 D0:
-- Q4,Q5: led commons
-- Q6,Q7,Q2,Q1: 7seg panel digit select
-- Q0-Q3: 7442 A0-A3
- + 0-7: led data
- + 0-8: keypad mux
- + 9: buzzer out
-
-Z80 D1: (model 6093)
-- Q0-Q7: 7seg data
-
-Z80 D2: (model 6092)
-- Q0-Q5: TSI C0-C5
-- Q6: TSI START pin
-- Q7: TSI ROM A11
-
-A11 from TSI is tied to TSI ROM A12(!)
-TSI ROM A13,A14 are hardwired to the 2 language switches.
-Sound comes from the Audio out pin, digital out pins are N/C.
-
-control (R):
-------------
-Z80 A0-A2 to 2*74251, Z80 Dx to output
-
-Z80 D7 to Y:
-- D0-D7: keypad row data
-
-Z80 D6 to W: (model 6092, tied to VCC otherwise)
-- D0,D1: language switches
-- D2-D6: VCC
-- D7: TSI BUSY
-
******************************************************************************/
#include "emu.h"
diff --git a/src/mame/drivers/flagrall.cpp b/src/mame/drivers/flagrall.cpp
deleted file mode 100644
index 2ac6bc7cab9..00000000000
--- a/src/mame/drivers/flagrall.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Haywood
-
-#include "emu.h"
-#include "cpu/m68000/m68000.h"
-#include "sound/okim6295.h"
-
-class flagrall_state : public driver_device
-{
-public:
- flagrall_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- // m_bg_videoram(*this, "bg_videoram"),
- // m_fg_videoram(*this, "fg_videoram"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode") { }
-
- /* memory pointers */
-// required_shared_ptr<UINT16> m_bg_videoram;
-// required_shared_ptr<UINT16> m_fg_videoram;
-
- /* video-related */
-// tilemap_t *m_bg_tilemap;
-// tilemap_t *m_fg_tilemap;
-// DECLARE_WRITE16_MEMBER(flagrall_bg_videoram_w);
-// DECLARE_WRITE16_MEMBER(flagrall_fg_videoram_w);
-// TILE_GET_INFO_MEMBER(get_flagrall_bg_tile_info);
-// TILE_GET_INFO_MEMBER(get_flagrall_fg_tile_info);
- virtual void video_start() override;
- UINT32 screen_update_flagrall(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
-};
-
-
-/*
-WRITE16_MEMBER(flagrall_state::flagrall_bg_videoram_w)
-{
- COMBINE_DATA(&m_bg_videoram[offset]);
- m_bg_tilemap->mark_tile_dirty(offset);
-}
-
-TILE_GET_INFO_MEMBER(flagrall_state::get_flagrall_bg_tile_info)
-{
- int tileno = m_bg_videoram[tile_index];
- SET_TILE_INFO_MEMBER(0, tileno, 0, 0);
-}
-
-
-WRITE16_MEMBER(flagrall_state::flagrall_fg_videoram_w)
-{
- COMBINE_DATA(&m_fg_videoram[offset]);
- m_fg_tilemap->mark_tile_dirty(offset);
-}
-
-TILE_GET_INFO_MEMBER(flagrall_state::get_flagrall_fg_tile_info)
-{
- int tileno = m_fg_videoram[tile_index];
- SET_TILE_INFO_MEMBER(1, tileno, 1, 0);
-}
-*/
-
-void flagrall_state::video_start()
-{
-// m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flagrall_state::get_flagrall_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
-// m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(flagrall_state::get_flagrall_fg_tile_info),this), TILEMAP_SCAN_ROWS, 4, 4, 128, 64);
-// m_fg_tilemap->set_transparent_pen(0xff);
-}
-
-UINT32 flagrall_state::screen_update_flagrall(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);
- return 0;
-}
-
-
-static ADDRESS_MAP_START( flagrall_map, AS_PROGRAM, 16, flagrall_state )
- AM_RANGE(0x000000, 0x07ffff) AM_ROM
- AM_RANGE(0x100000, 0x10ffff) AM_RAM // main ram
-
-// AM_RANGE(0x200000, 0x2003ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") // clears 0x200 - 0x3ff on startup, but writes 00 values to the other half at times?
- AM_RANGE(0x240000, 0x240fff) AM_RAM // ??
- AM_RANGE(0x280000, 0x280fff) AM_RAM // ??
- AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM // ??
-
- AM_RANGE(0x340000, 0x340001) AM_WRITENOP // ??
- AM_RANGE(0x380000, 0x380001) AM_WRITENOP // ??
- AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP // ??
-
- AM_RANGE(0x400000, 0x400001) AM_READ_PORT("DSW")
- AM_RANGE(0x440000, 0x440001) AM_READ_PORT("DSW")
- AM_RANGE(0x4c0000, 0x4c0001) AM_READ_PORT("DSW")
-
- AM_RANGE(0x4c0000, 0x4c0001) AM_WRITENOP // ?? oki?
-ADDRESS_MAP_END
-
-
-static INPUT_PORTS_START( flagrall )
- PORT_START("DSW")
- PORT_DIPNAME( 0x0001, 0x0001, "0" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-INPUT_PORTS_END
-
-static const gfx_layout flagrall_layout =
-{
- 16,16,
- RGN_FRAC(1,1),
- 8,
- { 0,1,2,3,4,5,6,7 },
- { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
- { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
- 16*128,
-};
-
-
-
-static GFXDECODE_START( flagrall )
- GFXDECODE_ENTRY( "gfx1", 0, flagrall_layout, 0x0, 2 ) /* bg tiles */
- GFXDECODE_ENTRY( "gfx2", 0, flagrall_layout, 0x0, 2 ) /* fg tiles */
-GFXDECODE_END
-
-
-static MACHINE_CONFIG_START( flagrall, flagrall_state )
-
- MCFG_CPU_ADD("maincpu", M68000, 16000000 ) // ?
- MCFG_CPU_PROGRAM_MAP(flagrall_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", flagrall_state, irq4_line_hold)
-
- MCFG_GFXDECODE_ADD("gfxdecode", "palette", flagrall)
-
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(flagrall_state, screen_update_flagrall)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
-
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
-
- MCFG_OKIM6295_ADD("oki", 16000000/16, OKIM6295_PIN7_HIGH) // not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.47)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47)
-MACHINE_CONFIG_END
-
-
-ROM_START( flagrall )
- ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 Code */
- ROM_LOAD16_BYTE( "11_u34.bin", 0x00001, 0x40000, CRC(24dd439d) SHA1(88857ad5ed69f29de86702dcc746d35b69b3b93d) )
- ROM_LOAD16_BYTE( "12_u35.bin", 0x00000, 0x40000, CRC(373b71a5) SHA1(be9ab93129e2ffd9bfe296c341dbdf47f1949ac7) )
-
- ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- // only one OKI, both roms have sample tables, presumably banked
- ROM_LOAD( "13_su4.bin", 0x00000, 0x80000, CRC(7b0630b3) SHA1(c615e6630ffd12c122762751c25c249393bf7abd) )
- ROM_LOAD( "14_su6.bin", 0x80000, 0x40000, CRC(593b038f) SHA1(b00dcf321fe541ee52c34b79e69c44f3d7a9cd7c) )
-
- ROM_REGION( 0x300000, "gfx1", 0 )
- ROM_LOAD32_BYTE( "1_u5.bin", 0x000000, 0x080000, CRC(9377704b) SHA1(ac516a8ba6d1a70086469504c2a46d47a1f4560b) )
- ROM_LOAD32_BYTE( "5_u6.bin", 0x000001, 0x080000, CRC(1ac0bd0c) SHA1(ab71bb84e61f5c7168601695f332a8d4a30d9948) )
- ROM_LOAD32_BYTE( "2_u7.bin", 0x000002, 0x080000, CRC(5f6db2b3) SHA1(84caa019d3b75be30a14d19ccc2f28e5e94028bd) )
- ROM_LOAD32_BYTE( "6_u8.bin", 0x000003, 0x080000, CRC(79e4643c) SHA1(274f2741f39c63e32f49c6a1a72ded1263bdcdaa) )
-
- ROM_LOAD32_BYTE( "3_u58.bin", 0x200000, 0x040000, CRC(c913df7d) SHA1(96e89ecb9e5f4d596d71d7ba35af7b2af4670342) )
- ROM_LOAD32_BYTE( "4_u59.bin", 0x200001, 0x040000, CRC(cb192384) SHA1(329b4c1a4dc388d9f4ce063f9a54cbf3b967682a) )
- ROM_LOAD32_BYTE( "7_u60.bin", 0x200002, 0x040000, CRC(f187a7bf) SHA1(f4ce9ac9fe376250fe426de6ee404fc7841ef08a) )
- ROM_LOAD32_BYTE( "8_u61.bin", 0x200003, 0x040000, CRC(b73fa441) SHA1(a5a3533563070c870276ead5e2f9cb9aaba303cc))
-
- ROM_REGION( 0x100000, "gfx2", 0 )
- ROM_LOAD( "9_u103.bin", 0x00000, 0x80000, CRC(01e6d654) SHA1(821d61a5b16f5cb76e2a805c8504db1ef38c3a48) )
- ROM_LOAD( "10_u102.bin", 0x80000, 0x80000, CRC(b1fd3279) SHA1(4a75581e13d43bef441ce81eae518c2f6bc1d5f8) )
-ROM_END
-
-
-GAME( 199?, flagrall, 0, flagrall, flagrall, driver_device, 0, ROT0, "<unknown>", "Flag Rally '96", MACHINE_SUPPORTS_SAVE ) // or '96 Flag Rally?
-
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index 06a068e372c..44739b59053 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -1046,9 +1046,6 @@ ROM_START( snowboara )
ROM_LOAD( "sb44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */
ROM_LOAD( "sb45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) /* Sound only */
ROM_LOAD( "sb46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) /* GFX only */
-
- DISK_REGION( "decrypt" )
- DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
ROM_START( snowboar )
@@ -1086,9 +1083,6 @@ ROM_START( snowboar )
ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */
ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */
ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */
-
- DISK_REGION( "decrypt" )
- DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index b47226747c1..1f9c349de33 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -74,7 +74,12 @@ Stephh's additional notes :
#include "includes/galpanic.h"
#include "includes/galpnipt.h"
-void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state)
+void galpanic_state::machine_start()
+{
+ membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000);
+}
+
+void galpanic_state::screen_eof(screen_device &screen, bool state)
{
// rising edge
if (state)
@@ -83,7 +88,7 @@ void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state)
}
}
-TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline)
+TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::scanline)
{
int scanline = param;
@@ -98,13 +103,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline)
-WRITE16_MEMBER(galpanic_state::galpanic_6295_bankswitch_w)
+WRITE16_MEMBER(galpanic_state::m6295_bankswitch_w)
{
if (ACCESSING_BITS_8_15)
{
- UINT8 *rom = memregion("oki")->base();
-
- memcpy(&rom[0x30000],&rom[0x40000 + ((data >> 8) & 0x0f) * 0x10000],0x10000);
+ membank("okibank")->set_entry((data >> 8) & 0x0f);
// used before title screen
m_pandora->set_clear_bitmap((data & 0x8000)>>15);
@@ -113,7 +116,7 @@ WRITE16_MEMBER(galpanic_state::galpanic_6295_bankswitch_w)
-WRITE16_MEMBER(galpanic_state::galpanic_coin_w)
+WRITE16_MEMBER(galpanic_state::coin_w)
{
if (ACCESSING_BITS_8_15)
{
@@ -131,15 +134,15 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0x000000, 0x3fffff) AM_ROM
AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
- AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */
+ AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */
AM_RANGE(0x600000, 0x6007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") /* 1024 colors, but only 512 seem to be used */
AM_RANGE(0x700000, 0x701fff) AM_DEVREADWRITE("pandora", kaneko_pandora_device, spriteram_LSB_r, spriteram_LSB_w)
AM_RANGE(0x702000, 0x704fff) AM_RAM
AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1")
AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2")
AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM")
- AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanic_6295_bankswitch_w)
- AM_RANGE(0xa00000, 0xa00001) AM_WRITE(galpanic_coin_w) /* coin counters */
+ AM_RANGE(0x900000, 0x900001) AM_WRITE(m6295_bankswitch_w)
+ AM_RANGE(0xa00000, 0xa00001) AM_WRITE(coin_w) /* coin counters */
AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP /* ??? */
AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP /* ??? */
AM_RANGE(0xd00000, 0xd00001) AM_WRITENOP /* ??? */
@@ -147,6 +150,10 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state )
ADDRESS_MAP_END
+static ADDRESS_MAP_START( galpanic_oki_map, AS_0, 8, galpanic_state )
+ AM_RANGE(0x00000, 0x2ffff) AM_ROM
+ AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
+ADDRESS_MAP_END
static INPUT_PORTS_START( galpanic )
@@ -221,7 +228,7 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(galpanic_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, scanline, "screen", 0, 1)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -229,8 +236,8 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* frames per second, vblank duration */)
MCFG_SCREEN_SIZE(256, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 224-1)
- MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update_galpanic)
- MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof_galpanic)
+ MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update)
+ MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", galpanic)
@@ -246,12 +253,11 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state )
MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0)
kaneko_hit_device::set_type(*device, 0);
- MCFG_VIDEO_START_OVERRIDE(galpanic_state,galpanic)
-
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, OKIM6295_PIN7_LOW) /* verified on pcb */
+ MCFG_DEVICE_ADDRESS_MAP(AS_0, galpanic_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -287,11 +293,10 @@ ROM_START( galpanic ) /* PAMERA-04 PCB with the PAMERA-SUB daughter card and unp
ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */
ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) )
- ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */
+ ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */
/* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) )
- ROM_RELOAD( 0x40000, 0x80000 )
- ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
+ ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
ROM_END
ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */
@@ -308,12 +313,11 @@ ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */
ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */
ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) )
- ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */
+ ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */
/* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) )
- ROM_RELOAD( 0x40000, 0x80000 )
- ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
+ ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) )
ROM_END
-GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL )
-GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL )
+GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index 360127875b7..a5b49c515b0 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -1668,6 +1668,7 @@ static INPUT_PORTS_START( cmasterb )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
+
static INPUT_PORTS_START( cmezspin )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1738,6 +1739,7 @@ static INPUT_PORTS_START( cmezspin )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
+
static INPUT_PORTS_START( cmasterc )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1796,6 +1798,66 @@ static INPUT_PORTS_START( cmasterc )
/* Test Mode For Disp. Of Doll not checked */
INPUT_PORTS_END
+
+static INPUT_PORTS_START( cmasterg )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Stop All")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Info")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start")
+
+ PORT_INCLUDE( cmv4_coins )
+
+ PORT_INCLUDE( cmv4_service )
+
+ PORT_INCLUDE( cmv4_dsw1 )
+ PORT_MODIFY("DSW1")
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ /* Hopper Out Switch not checked */
+ /* Payout Mode not checked */
+ /* '7' In Double Up Game OK */
+ PORT_DIPNAME( 0x10, 0x00, "Double Up Game Pay Rate" ) PORT_DIPLOCATION("DSW1:5") /* OK */
+ PORT_DIPSETTING( 0x00, "60%" )
+ PORT_DIPSETTING( 0x10, "70%" )
+ /* Double Up Game OK */
+ /* Bet Max OK */
+
+ PORT_INCLUDE( cmv4_dsw2 )
+ PORT_MODIFY("DSW2")
+ PORT_DIPNAME( 0x07, 0x00, "Main Game Pay Rate" ) PORT_DIPLOCATION("DSW2:1,2,3") /* OK */
+ PORT_DIPSETTING( 0x07, "45%" )
+ PORT_DIPSETTING( 0x06, "50%" )
+ PORT_DIPSETTING( 0x05, "55%" )
+ PORT_DIPSETTING( 0x04, "60%" )
+ PORT_DIPSETTING( 0x03, "65%" )
+ PORT_DIPSETTING( 0x02, "70%" )
+ PORT_DIPSETTING( 0x01, "75%" )
+ PORT_DIPSETTING( 0x00, "80%" )
+ /* Hopper Limit OK */
+ /* 100+ Odds Sound not checked */
+ /* Key In Type OK */
+ /* Center Super 7 Bet Limit related with Min. Bet For Bonus Play (DSW4-6) */
+
+ PORT_INCLUDE( cmv4_dsw3 ) /* all OK */
+
+ PORT_INCLUDE( cmv4_dsw4 ) /* all OK */
+
+ PORT_INCLUDE( cmv4_dsw5 )
+ /* Display of Doll On Demo only affects payout table screen */
+ /* Coin In Limit OK */
+ /* Condition For 3 Kind Of Bonus not checked */
+ /* Display Of Doll At All Fr. Bonus not checked */
+ /* DSW5-7 listed as unused */
+ /* Test Mode For Disp. Of Doll not checked */
+INPUT_PORTS_END
+
+
static INPUT_PORTS_START( cmast91 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -8211,11 +8273,17 @@ ROM_START( chrygld )
ROM_END
-/* Moon Light (set 1)
+/* Moon Light (V.0629)
+ Rip off / clone of Gold Star.
+
+ The program ROM is double size and stores two different programs.
+ Whilst we have not idea about the real addressing, we can support
+ both sets separately.
+
*/
ROM_START( moonlght )
- ROM_REGION( 0x20000, "maincpu", 0 )
- ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) )
+ ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM.
+ ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // low program, normal gfx
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) )
@@ -8227,7 +8295,27 @@ ROM_START( moonlght )
ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
ROM_END
-/* Moon Light (set 2)
+ROM_START( moonlghta )
+ ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM.
+ ROM_LOAD( "4.bin", 0x10000, 0x10000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // high program, normal gfx
+ ROM_CONTINUE( 0x00000, 0x10000)
+
+ ROM_REGION( 0x20000, "gfx1", 0 )
+ ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) )
+
+ ROM_REGION( 0x20000, "gfx2", 0 )
+ ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) )
+
+ ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
+ ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
+ROM_END
+
+/* Moon Light (V.02L0A)
+ Rip off / clone of Gold Star.
+
+ The program ROM is double size and stores two different programs.
+ Whilst we have not idea about the real addressing, we can support
+ both sets separately.
GFX devices are 4 times bigger and contains 4 times the same data.
Maybe the manufacturers run out of proper devices...
@@ -8239,8 +8327,8 @@ ROM_END
effect that shouldn't be there. Maybe is product of a bad dump. Need to be checked with
the real board.
- The hardware uses only the second half of the program ROM (double sized), that replaces
- the double-up's cards graphics with 'drakkars' (scandinavian / viking ships).
+ The hardware currently uses only the second half of the program ROM (high program), that
+ replaces the double-up's cards graphics with 'drakkars' (scandinavian / viking ships).
----------------------------------------------------------------------------------------
28.bin FIXED BITS (00xxxxxx)
@@ -8262,15 +8350,29 @@ ROM_END
28.bin moon-gfx2.bin [4/4] 94.188690%
*/
ROM_START( moonlghtb )
+ ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM.
+ ROM_LOAD( "moon-main.bin", 0x00000, 0x20000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // low program, normal gfx
+
+ ROM_REGION( 0x20000, "gfx1", 0 )
+ ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) ) // Normal GFX, from the other PCB
+
+ ROM_REGION( 0x20000, "gfx2", 0 )
+ ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) ) // Normal GFX, from the other PCB
+
+ ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
+ ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
+ROM_END
+
+ROM_START( moonlghtc )
ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM.
- ROM_LOAD( "moon-main.bin", 0x10000, 0x10000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) )
+ ROM_LOAD( "moon-main.bin", 0x10000, 0x10000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // high program, alt gfx
ROM_CONTINUE( 0x00000, 0x10000)
ROM_REGION( 0x80000, "gfx1", 0 )
- ROM_LOAD( "moon-gfx2.bin", 0x00000, 0x80000, CRC(2ce5b722) SHA1(feb87fbf3b8d875842df80cd1edfef5071ed60c7) )
+ ROM_LOAD( "moon-gfx2.bin", 0x00000, 0x80000, CRC(2ce5b722) SHA1(feb87fbf3b8d875842df80cd1edfef5071ed60c7) ) // Alt GFX set. Ships instead of cards
ROM_REGION( 0x80000, "gfx2", 0 )
- ROM_LOAD( "moon-gfx1.bin", 0x00000, 0x80000, CRC(ea7d4234) SHA1(4016227aabf176c6e0fd822ebc59cade811f4ce8) )
+ ROM_LOAD( "moon-gfx1.bin", 0x00000, 0x80000, CRC(ea7d4234) SHA1(4016227aabf176c6e0fd822ebc59cade811f4ce8) ) // Alt GFX set. Ships instead of cards
ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */
ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) )
@@ -8498,6 +8600,58 @@ ROM_START( cb3e )
ROM_END
+/* Cherry Gold I (bootleg)
+ It runs in CB3e similar hardware...
+
+1x TMPZ84C00AP-6 u15 8-bit Microprocessor
+3x D71055C u30, u39, u40 Programmable Peripheral Interface
+1x WF19054 u27 Programmable Sound Generator
+1x SN76489AN u28 Digital Complex Sound Generator
+1x oscillator unmarked Y1
+
+ROMs
+1x D27256 1.u3
+1x AM27512 3.u22
+1x D27C010 2u6
+1x N82S147AF u1
+
+RAMs
+4x HM6116LP-4 u9, u10, u11, u12
+1x D4016C-1 u23
+
+PLDs
+1x unknowun Cl-001 (QFP144) CY144A read protected
+4x GAL20V8A-15LNC pl1, pl4, pl5, pl6 read protected
+2x PALCE20V8H-25PC/4 u2,u? read protected
+1x PALCE22V10H-25PC/4 u? read protected
+
+Others
+1x 36x2 edge connector
+1x 10x2 edge connector
+1x pushbutton (TS)
+2x trimmer (volume)(VR1,VR2)
+5x 8x2 switches DIP(SW1-5)
+1x battery 5,5V
+
+Notes
+PCB is marked "REV.3"
+*/
+ROM_START( chryglda )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "3.u22", 0x00000, 0x10000, CRC(059857c5) SHA1(f4becfda1e25ab347f55f35dc9f5818ef9344e2c) )
+
+ ROM_REGION( 0x20000, "gfx1", 0 )
+ ROM_LOAD( "2.u6", 0x00000, 0x20000, CRC(1359dfac) SHA1(78eb934055cda9e10d8e939c79bfa62262ecad7d) )
+
+ ROM_REGION( 0x08000, "gfx2", 0 )
+ ROM_LOAD( "1.u3", 0x00000, 0x08000, CRC(919bd692) SHA1(1aeb66f1e4555b731858833445000593e613f74d) )
+
+ ROM_REGION( 0x0200, "proms", 0 )
+ ROM_LOAD( "n82s147af.u1", 0x00000, 0x0100, CRC(d4eaa276) SHA1(b6598ee64ac3d41ca979c8667de8576cfb304451) )
+ ROM_CONTINUE( 0x00000, 0x0100) // 2nd half has the data.
+ROM_END
+
+
ROM_START( cmv801 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "prg512", 0x0000, 0x10000, CRC(2f6e3fe9) SHA1(c5ffa51478a0dc2d8ff6a0f286cfb461011bb55d) )
@@ -9087,6 +9241,115 @@ ROM_START( cmasterf )
ROM_END
+/* Cherry Master I (CM1-1.01)
+ Sticker with "Cherry Master V4 -B-" on the PCB.
+ Similar to cmasterb. Different program.
+
+1x TMPZ84C00AP-6 u80 8-bit Microprocessor
+1x D8255AC-5 u36 Programmable Peripheral Interface
+1x D71055C u54 Parallel Interface Unit
+1x YM2149F u13 Programmable Sound Generator
+1x oscillator 12.000MHz Y1
+
+ROMs
+4x 2764 1,2,3,4
+4x 27256 5,6,7,9
+1x 27512 8
+3x N82S129AN u46, u79, u84
+
+RAMs
+1x LC3517AL-10 u82
+4x D4016CX-15-10 u22, u26, u28, u38
+
+PLDs
+4x PALCE16V8H-25pc/4 u51, u66, u73, u74
+
+Others
+1x 36x2 edge connector
+1x 10x2 edge connector
+1x pushbutton (SW6)
+1x trimmer (volume)(VR1)
+5x 8x2 switches DIP(SW1-SW5)
+1x battery 5.5V(BT1)
+*/
+ROM_START( cmasterg )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "9.u81", 0x0000, 0x1000, CRC(10979629) SHA1(a7342e37c75c85aef8a86ab5366a9e27f2c4bab8) )
+ ROM_CONTINUE(0x4000,0x1000)
+ ROM_CONTINUE(0x3000,0x1000)
+ ROM_CONTINUE(0x7000,0x1000)
+ ROM_CONTINUE(0x1000,0x1000)
+ ROM_CONTINUE(0x6000,0x1000)
+ ROM_CONTINUE(0x2000,0x1000)
+ ROM_CONTINUE(0x5000,0x1000)
+
+ ROM_REGION( 0x18000, "gfx1", 0 )
+ ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) )
+ ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) )
+ ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 )
+ ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) )
+ ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) )
+ ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) )
+ ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) )
+
+ ROM_REGION( 0x10000, "user1", 0 )
+ ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) )
+
+ ROM_REGION( 0x200, "proms", 0 )
+ ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) )
+ ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) )
+
+ ROM_REGION( 0x100, "proms2", 0 )
+ ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) )
+ROM_END
+
+
+/* Cherry Master I (V1.10)
+ Original Dyna upgrade for Cherry Master boards.
+ The game runs in an original Dyna D9001 PCB.
+ It laks of STOP ALL button.
+
+ From the owner (sic):
+ - The reels cannot be stop, not exist all stop button or cannot be stop from small, big, double-up button.
+ - The odds still be "high" (on the version 4.x be "low" odds).
+ - Not hold a pair option to, and the min bet to start is fixed x1.
+ */
+ROM_START( cmasterh )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "cm_v1.10_dyna.bin", 0x0000, 0x1000, CRC(872f2ef0) SHA1(ec68a03a1e8ab793d4a5eae1ce25f91608351c55) )
+ ROM_CONTINUE(0x4000,0x1000)
+ ROM_CONTINUE(0x3000,0x1000)
+ ROM_CONTINUE(0x7000,0x1000)
+ ROM_CONTINUE(0x1000,0x1000)
+ ROM_CONTINUE(0x6000,0x1000)
+ ROM_CONTINUE(0x2000,0x1000)
+ ROM_CONTINUE(0x5000,0x1000)
+
+ ROM_REGION( 0x18000, "gfx1", 0 )
+ ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) )
+ ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) )
+ ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 )
+ ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) )
+ ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) )
+ ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) )
+ ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) )
+
+ ROM_REGION( 0x10000, "user1", 0 )
+ ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) )
+
+ ROM_REGION( 0x200, "proms", 0 )
+ ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) )
+ ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) )
+
+ ROM_REGION( 0x100, "proms2", 0 )
+ ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) )
+ROM_END
+
+
ROM_START( cmast99 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "cm99-041-8.u81", 0x0000, 0x1000, CRC(e0872d9f) SHA1(6d8f5e09e5c9daf834d5c74434eae86e5dd7e194) )
@@ -13325,9 +13588,11 @@ DRIVER_INIT_MEMBER(goldstar_state, wcherry)
YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
GAMEL( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0, layout_goldstar )
GAMEL( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0, layout_goldstar )
-GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star, set 1)", 0 )
-GAME( 199?, moonlghtb, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star, set 2)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black.
-GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0, layout_chrygld )
+GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, low program)", 0 )
+GAME( 199?, moonlghta, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, high program)", 0 )
+GAME( 199?, moonlghtb, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, low program)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black.
+GAME( 199?, moonlghtc, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, high program, alt gfx)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black.
+GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I (set 1)", 0, layout_chrygld )
GAMEL( 199?, chry10, 0, chrygld, chry10, cb3_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0, layout_chrygld )
GAME( 199?, goldfrui, goldstar, goldfrui, goldstar, driver_device, 0, ROT0, "bootleg", "Gold Fruit", 0 ) // maybe fullname should be 'Gold Fruit (main 40%)'
GAME( 2001, super9, goldstar, super9, goldstar, goldstar_state, super9, ROT0, "Playmark", "Super Nove (Playmark)", MACHINE_NOT_WORKING ) // need to decode gfx and see the program loops/reset...
@@ -13343,6 +13608,7 @@ GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, cb3_state, cherrys,
GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", MACHINE_NOT_WORKING)
GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, driver_device, 0, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 )
GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld )
+GAMEL( 199?, chryglda, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Gold I (set 2, encrypted bootleg)", 0, layout_chrygld ) // Runs in CB3e hardware.
GAME( 1996, cmast97, ncb3, cm97, chrygld, driver_device, 0, ROT0, "Dyna", "Cherry Master '97", MACHINE_NOT_WORKING) // fix prom decode
@@ -13355,7 +13621,6 @@ GAMEL( 198?, cmv801, 0, cm, cmv801, cmaster_state, cm,
-
// most of these are almost certainly bootlegs, with added features, hacked payouts etc. identifying which are
// the original, unmodified dyna versions is almost impossible due to lack of documentation from back in the day,
// even original boards almost always run modified sets
@@ -13371,6 +13636,8 @@ GAMEL( 1991, cmasterbv, cmaster, cm, cmasterb, cmaster_state, cmv4,
GAMEL( 1991, cmasterd, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 5)", 0, layout_cmasterb )
GAMEL( 1991, cmastere, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 6)", 0, layout_cmasterb )
GAMEL( 1991, cmasterf, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 7)", 0, layout_cmasterb )
+GAMEL( 1991, cmasterg, cmaster, cm, cmasterg, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 8, V4-B-)", 0, layout_cmasterb )
+GAMEL( 1991, cmasterh, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.10)", 0, layout_cmasterb )
GAME( 199?, cmast99, 0, cm, cmv4, cmaster_state, cmv4, ROT0, "????", "Cherry Master '99", MACHINE_NOT_WORKING )
@@ -13474,7 +13741,7 @@ GAMEL( 198?, cmpacman, 0, cm, cmpacman, cmaster_state, cm, RO
GAMEL( 198?, cmtetris, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 1)", 0, layout_cmpacman ) // need to press K/L to switch between games...
GAMEL( 198?, cmtetrsa, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 2)", MACHINE_NOT_WORKING, layout_cmpacman ) // seems banked...
GAMEL( 198?, cmtetrsb, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (+K, Canada Version, encrypted)", MACHINE_NOT_WORKING, layout_cmpacman ) // different Tetris game. press insert to throttle and see the attract running.
-GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon )
+GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon ) // Windows ME desktop... but not found the way to switch it.
/* other possible stealth sets:
- cmv4a ---> see the 1fxx zone. put a bp in 1f9f to see the loop.
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index 1c54ff21e37..b410de7cf55 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -2520,7 +2520,7 @@ ROM_END
ROM_START( mcompgin )
ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "d650c-060", 0x0000, 0x0800, BAD_DUMP CRC(92a4d8be) SHA1(d67f14a2eb53b79a7d9eb08103325299bc643781) )
+ ROM_LOAD( "d650c-060", 0x0000, 0x0800, BAD_DUMP CRC(92a4d8be) SHA1(d67f14a2eb53b79a7d9eb08103325299bc643781) ) // d5 stuck: xx1x xxxx
ROM_END
diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp
index 9d158c2bf3c..d8dd8401ba7 100644
--- a/src/mame/drivers/jangou.cpp
+++ b/src/mame/drivers/jangou.cpp
@@ -100,6 +100,8 @@ public:
UINT32 screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(cvsd_bit_timer_callback);
DECLARE_WRITE_LINE_MEMBER(jngolady_vclk_cb);
+
+ std::unique_ptr<bitmap_ind16> m_tmp_bitmap;
};
@@ -152,6 +154,7 @@ PALETTE_INIT_MEMBER(jangou_state, jangou)
void jangou_state::video_start()
{
+ m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256);
}
UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -161,7 +164,7 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x];
- UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
+ UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
@@ -170,6 +173,9 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b
*dst++ = m_palette->pen((srcpix >> 4) & 0xf);
}
}
+ //void copybitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect)
+
+ copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect);
return 0;
}
@@ -194,7 +200,7 @@ WRITE8_MEMBER(jangou_state::output_w)
*/
// printf("%02x\n", data);
machine().bookkeeping().coin_counter_w(0, data & 0x01);
-// flip_screen_set(data & 0x04);
+ flip_screen_set(data & 0x04);
// machine().bookkeeping().coin_lockout_w(0, ~data & 0x20);
}
@@ -318,11 +324,10 @@ static ADDRESS_MAP_START( cpu0_io, AS_IO, 8, jangou_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
- AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
- AM_RANGE(0x10,0x10) AM_WRITE(output_w)
+ AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") AM_WRITE(output_w) //dsw + blitter busy flag
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_vregs_w)
+ AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
+ AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously
AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w)
ADDRESS_MAP_END
@@ -392,8 +397,8 @@ static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8, jangou_state )
AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag
AM_RANGE(0x10,0x10) AM_WRITE(output_w)
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_vregs_w)
+ AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
+ AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously
// AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w)
ADDRESS_MAP_END
@@ -417,8 +422,8 @@ static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8, jangou_state )
AM_RANGE(0x10,0x10) AM_WRITENOP /* Writes continuosly 0's in attract mode, and 1's in game */
AM_RANGE(0x11,0x11) AM_WRITE(mux_w)
AM_RANGE(0x13,0x13) AM_READNOP /* Often reads bit7 with unknown purposes */
- AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_process_w)
- AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, blitter_vregs_w)
+ AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w)
+ AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w)
AM_RANGE(0x30,0x30) AM_WRITENOP /* Seems to write 0x10 on each sound event */
ADDRESS_MAP_END
@@ -517,7 +522,7 @@ static INPUT_PORTS_START( jangou )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
INPUT_PORTS_END
static INPUT_PORTS_START( macha )
@@ -578,7 +583,7 @@ static INPUT_PORTS_START( macha )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
INPUT_PORTS_END
@@ -663,7 +668,7 @@ static INPUT_PORTS_START( cntrygrl )
PORT_DIPNAME( 0x40, 0x40, "Coin B setting" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin / 10 Credits" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
PORT_START("IN_NOMUX")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -704,7 +709,7 @@ static INPUT_PORTS_START( jngolady )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //blitter busy flag
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
INPUT_PORTS_END
static INPUT_PORTS_START( roylcrdn )
@@ -762,29 +767,9 @@ static INPUT_PORTS_START( roylcrdn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Credit Clear") /* Credit Clear */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* Spare 1 */
- PORT_START("DSW") /* Not a real DSW on PCB */
- 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_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* blitter busy flag */
+ PORT_START("DSW")
+ PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
PORT_START("IN_NOMUX")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1273,13 +1258,13 @@ DRIVER_INIT_MEMBER(jangou_state,luckygrl)
*
*************************************/
-GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
+GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_SUPPORTS_SAVE )
+GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_SUPPORTS_SAVE )
/* The following might not run there... */
GAME( 1984?, luckygrl, 0, cntrygrl, cntrygrl, jangou_state, luckygrl, ROT0, "Wing Co., Ltd.", "Lucky Girl? (Wing)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/kchamp.cpp b/src/mame/drivers/kchamp.cpp
index 49b65cf2f19..913b14a16f7 100644
--- a/src/mame/drivers/kchamp.cpp
+++ b/src/mame/drivers/kchamp.cpp
@@ -481,10 +481,10 @@ static MACHINE_CONFIG_START( kchamp, kchamp_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8)
+ MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
- MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8)
+ MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
MCFG_DAC_ADD("dac")
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index 58d0fd3f464..3f3342c3ed0 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -83,6 +83,8 @@
#include "cpu/m6800/m6800.h"
#include "cpu/s2650/s2650.h"
+#include "machine/clock.h"
+
WRITE8_MEMBER(laserbat_state_base::ct_io_w)
{
@@ -195,14 +197,6 @@ static ADDRESS_MAP_START( laserbat_io_map, AS_IO, 8, laserbat_state_base )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( catnmous_sound_map, AS_PROGRAM, 8, catnmous_state )
- AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia", pia6821_device, read, write)
- AM_RANGE(0xc000, 0xcfff) AM_ROM
- AM_RANGE(0xe000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-
static INPUT_PORTS_START( laserbat_base )
PORT_START("ROW0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@@ -459,13 +453,6 @@ void laserbat_state::machine_start()
save_item(NAME(m_keys));
}
-void catnmous_state::machine_start()
-{
- laserbat_state_base::machine_start();
-
- save_item(NAME(m_cb1));
-}
-
void laserbat_state_base::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
@@ -550,25 +537,9 @@ static MACHINE_CONFIG_DERIVED_CLASS( catnmous, laserbat_base, catnmous_state )
MCFG_PALETTE_INIT_OWNER(catnmous_state, catnmous)
// sound board devices
- MCFG_CPU_ADD("audiocpu", M6802, 3580000) // ?
- MCFG_CPU_PROGRAM_MAP(catnmous_sound_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(catnmous_state, cb1_toggle, (double)3580000/4096)
-
- MCFG_DEVICE_ADD("pia", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(catnmous_state, pia_porta_r))
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(catnmous_state, pia_porta_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(catnmous_state, pia_portb_w))
- MCFG_PIA_IRQA_HANDLER(WRITELINE(catnmous_state, pia_irqa))
- MCFG_PIA_IRQB_HANDLER(WRITELINE(catnmous_state, pia_irqb))
-
MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("psg1", AY8910, 3580000/2) // ?
- MCFG_AY8910_PORT_B_READ_CB(READ8(catnmous_state, psg1_portb_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_SOUND_ADD("psg2", AY8910, 3580000/2) // ?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_ZACCARIA_1B11107("audiopcb")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -708,7 +679,7 @@ ROM_START( catnmous )
ROM_REGION( 0x0100, "gfxmix", 0 )
ROM_LOAD( "82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 )
ROM_LOAD( "sound01.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) )
ROM_LOAD( "sound01.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) )
ROM_LOAD( "sound01.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) )
@@ -750,7 +721,7 @@ ROM_START( catnmousa )
// copied from parent set to give working graphics, need dump to confirm
ROM_LOAD( "catnmousa_82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) BAD_DUMP )
- ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 )
ROM_LOAD( "snd.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) )
ROM_LOAD( "snd.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) )
ROM_LOAD( "snd.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) )
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index f075e7b1957..df82f162383 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -2091,6 +2091,8 @@ ROM_START( blockjoy )
ROM_REGION( 0x50000, "maincpu", 0 )
ROM_LOAD( "ble_05.bin", 0x00000, 0x08000, CRC(fa2a4536) SHA1(8f584745116bd0ced4d66719cd80c0372b797134) )
ROM_LOAD( "blf_06.bin", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) )
+// a ble_06a labeled rom has been dumped and verified identical to blf_06.bin.
+
// this seems to be a bad version of the above rom, although the rom code is different it is 99% the same, and level 6
// is impossible to finish due to a missing block. Probably bitrot
// ROM_LOAD( "ble_06.bin", 0x10000, 0x20000, BAD_DUMP CRC(58a77402) SHA1(cb24b1edd53a0965c3a9a34fe764b5c1f8dd9733) )
diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp
index d11900aa822..38a3a3953f9 100644
--- a/src/mame/drivers/nightgal.cpp
+++ b/src/mame/drivers/nightgal.cpp
@@ -10,9 +10,9 @@ driver by David Haywood & Angelo Salese
many thanks to Charles MacDonald for the schematics / documentation of this HW.
TODO:
- - is opcode $bb right for Night Gal Summer?
- - extra protection for Night Gal Summer (ports 0x6000-3 for z80 and 0x8000-0x8020-1 for MCU);
+ - extra protection for Night Gal Summer (ports 0x6000-3 for z80);
- Fix Sweet Gal/Sexy Gal layer clearances;
+ - NMI origin for Sexy Gal / Night Gal Summer
- unemulated WAIT pin for Z80, MCU asserts it when accessing communication RAM
*******************************************************************************************/
@@ -72,7 +72,6 @@ public:
required_device<cpu_device> m_subcpu;
/* memory */
- DECLARE_READ8_MEMBER(blitter_status_r);
//DECLARE_WRITE8_MEMBER(sexygal_nsc_true_blitter_w);
DECLARE_WRITE8_MEMBER(royalqn_blitter_0_w);
DECLARE_WRITE8_MEMBER(royalqn_blitter_1_w);
@@ -87,7 +86,6 @@ public:
DECLARE_DRIVER_INIT(ngalsumr);
DECLARE_DRIVER_INIT(royalqn);
DECLARE_WRITE8_MEMBER(ngalsumr_unk_w);
- DECLARE_READ8_MEMBER(ngalsumr_color_r);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
@@ -119,17 +117,12 @@ protected:
void z80_wait_assert_cb();
TIMER_CALLBACK_MEMBER( z80_wait_ack_cb );
+ std::unique_ptr<bitmap_ind16> m_tmp_bitmap;
};
-
-
-READ8_MEMBER(nightgal_state::blitter_status_r)
-{
- return 0x80;
-}
-
void nightgal_state::video_start()
{
+ m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256);
}
UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -139,7 +132,7 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x];
- UINT16 *dst = &bitmap.pix16(y, cliprect.min_x);
+ UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x);
for (x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
@@ -149,68 +142,11 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1
}
}
+ copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect);
return 0;
}
-/* different register writes (probably a PAL line swapping).*/
-#ifdef UNUSED_FUNCTION
-WRITE8_MEMBER(nightgal_state::sexygal_nsc_true_blitter_w)
-{
- int src, x, y, h, w, flipx;
- m_true_blit[offset] = data;
-
- /*trigger blitter write to ram,might not be correct...*/
- if (offset == 6)
- {
- //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_true_blit[0], m_true_blit[1], m_true_blit[2], m_true_blit[3], m_true_blit[4], m_true_blit[5], m_true_blit[6]);
- w = (m_true_blit[5] & 0xff) + 1;
- h = (m_true_blit[6] & 0xff) + 1;
- src = ((m_true_blit[1] << 8) | (m_true_blit[0] << 0));
- src |= (m_true_blit[2] & 3) << 16;
-
-
- x = (m_true_blit[3] & 0xff);
- y = (m_true_blit[4] & 0xff);
-
- // lowest bit of src controls flipping / draw direction?
- flipx = (m_true_blit[0] & 1);
-
- if (!flipx)
- src += (w * h) - 1;
- else
- src -= (w * h) - 1;
-
- {
- int count = 0;
- int xcount, ycount;
- for (ycount = 0; ycount < h; ycount++)
- {
- for (xcount = 0; xcount < w; xcount++)
- {
- int drawx = (x + xcount) & 0xff;
- int drawy = (y + ycount) & 0xff;
- UINT8 dat = nightgal_gfx_nibble(src + count);
- UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4];
- UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0];
-
- dat = cur_pen_lo | cur_pen_hi << 4;
-
- if ((dat & 0xff) != 0)
- plot_nightgal_gfx_pixel(dat, drawx, drawy);
-
- if (!flipx)
- count--;
- else
- count++;
- }
- }
- //m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
- }
- }
-}
-#endif
-
/* guess: use the same resistor values as Crazy Climber (needs checking on the real HW) */
PALETTE_INIT_MEMBER(nightgal_state, nightgal)
{
@@ -259,23 +195,9 @@ PALETTE_INIT_MEMBER(nightgal_state, nightgal)
********************************************/
/*
-(note:when I say "0x80" I just mean a negative result)
-master-slave algorithm
--z80 writes the data for the mcu;
--z80 writes 0 to c200;
--it waits with the bit 0x80 on c100 clears (i.e. the z80 halts),when this happens the z80 continues his logic algorithm (so stop it until we are done!!!)
-
--nsc takes an irq
--puts ff to [1100]
--it waits that the bit 0x80 on [1100] clears
--(puts default clut data,only the first time around)
--reads params from z80 and puts them on the blitter chip
--expects that bit [80] is equal to 0x80;
--clears [1100] and expects that [1100] is 0
--executes a wai (i.e. halt) opcode then expects to receive another irq...
-*/
-
-/* TODO: simplify this (error in the document) */
+ There are three unidirectional latches that also sends an irq from z80 to MCU.
+ */
+// TODO: simplify this (error in the document)
WRITE8_MEMBER(nightgal_state::royalqn_blitter_0_w)
{
m_blit_raw_data[0] = data;
@@ -296,7 +218,7 @@ READ8_MEMBER(nightgal_state::royalqn_nsc_blit_r)
{
if(offset == 2)
m_subcpu->set_input_line(0, CLEAR_LINE );
-
+
return m_blit_raw_data[offset];
}
@@ -386,6 +308,7 @@ WRITE8_MEMBER(nightgal_state::output_w)
---- ---x out counter
*/
machine().bookkeeping().coin_counter_w(0, data & 0x02);
+ flip_screen_set((data & 0x04) == 0);
}
/********************************************
@@ -417,11 +340,11 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sexygal_nsc_map, AS_PROGRAM, 8, nightgal_state )
AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r)
+ AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT")
AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
- AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, blitter_alt_process_w)
- AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, blitter_vregs_w)
- AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register
+ AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, alt_process_w)
+ AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
+ AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r, royalqn_comm_w) AM_SHARE("comms_ram")
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0)
@@ -454,14 +377,13 @@ static ADDRESS_MAP_START( royalqn_io, AS_IO, 8, nightgal_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( royalqn_nsc_map, AS_PROGRAM, 8, nightgal_state )
- AM_RANGE(0x0000, 0x007f) AM_RAM AM_SHARE("xx")
- AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r)
+ AM_RANGE(0x0000, 0x007f) AM_RAM
+ AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT")
AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r)
- AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, blitter_process_w)
- AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, blitter_vregs_w)
- AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register
+ AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, process_w)
+ AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w)
+ AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w)
- AM_RANGE(0x1000, 0x1007) AM_RAM AM_SHARE("xx")
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r,royalqn_comm_w)
AM_RANGE(0x4000, 0x4000) AM_NOP
AM_RANGE(0x8000, 0x8000) AM_NOP //open bus or protection check
@@ -704,6 +626,31 @@ static INPUT_PORTS_START( sexygal )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
+ PORT_START("BLIT_PORT")
+ PORT_DIPNAME( 0x01, 0x01, "BLIT_PORT" )
+ 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_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r)
+
INPUT_PORTS_END
void nightgal_state::machine_start()
@@ -763,7 +710,7 @@ static MACHINE_CONFIG_DERIVED( sexygal, royalqn )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(sexygal_map)
MCFG_CPU_IO_MAP(sexygal_io)
- MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//???
+ MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//???
MCFG_CPU_MODIFY("sub")
MCFG_CPU_PROGRAM_MAP(sexygal_nsc_map)
@@ -781,7 +728,7 @@ static MACHINE_CONFIG_DERIVED( ngalsumr, royalqn )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(royalqn_map)
MCFG_CPU_IO_MAP(royalqn_io)
- MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//???
+ MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//???
MACHINE_CONFIG_END
/*
@@ -1099,17 +1046,10 @@ WRITE8_MEMBER(nightgal_state::ngalsumr_unk_w)
//m_z80_latch = data;
}
-// check with the unknown opcode, maybe it actually just masks with first parameter and second one is displacement byte offset?
-READ8_MEMBER(nightgal_state::ngalsumr_color_r)
-{
- return (m_comms_ram[offset] & 0x80);
-}
-
DRIVER_INIT_MEMBER(nightgal_state,ngalsumr)
{
m_maincpu->space(AS_PROGRAM).install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(nightgal_state::ngalsumr_unk_w), this) );
// 0x6003 some kind of f/f state
- m_subcpu->space(AS_PROGRAM).install_read_handler(0x9000, 0x903f, read8_delegate(FUNC(nightgal_state::ngalsumr_color_r),this) );
}
/* Type 1 HW */
@@ -1118,7 +1058,7 @@ GAME( 1984, ngtbunny, 0, royalqn, sexygal, driver_device, 0, ROT0,
GAME( 1984, royalngt, ngtbunny, royalqn, sexygal, driver_device, 0, ROT0, "Royal Denshi", "Royal Night [BET] (Japan 840220 RN 2-00)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1984, royalqn, 0, royalqn, sexygal, nightgal_state, royalqn, ROT0, "Royal Denshi", "Royal Queen [BET] (Japan 841010 RQ 0-07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
/* Type 2 HW */
-GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
-GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
/* Type 3 HW */
-GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer (Japan 850702 NGS 0-01)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer (Japan 850702 NGS 0-01)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index dd2e07217c3..ca36c069361 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -1,23 +1,56 @@
// license:BSD-3-Clause
// copyright-holders:Jonathan Gevaryahu
-/* Xerox Notetaker, 1978
+/* Xerox NoteTaker, 1978
* Driver by Jonathan Gevaryahu
- * prototype only, three? units manufactured (one at CHM, not sure where the other two are)
- * This device was the origin of Smalltalk-78
- * NO MEDIA for this device has survived, only a ram dump
- * see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker
- *
- * MISSING DUMP for 8741? I/O MCU which does mouse-related stuff
+
+ * Notetaker Team At Xerox PARC 1976-1980:
+ Alan Kay - Team Lead
+ Bruce Horn - BIOS code and more
+ Ted Kaehler - SmallTalk-76 code porting[2] and more ( http://tedkaehler.weather-dimensions.com/us/ted/index.html )
+ Dan Ingalls - BitBlt engine and SmallTalk kernel and more[3]
+ Doug Fairbairn - NoteTaker Hardware/Electronics Design ( http://www.computerhistory.org/atchm/author/dfairbairn/ )
+ James Leung - NoteTaker Hardware/Electronics Design
+ Ron Freeman - NoteTaker Hardware/Electronics Design
+ <there are probably others I've missed>
+
+ * History of the machine can be found at http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf
+
+ * Prototypes only, 10 units[2] manufactured 1978-1980
+ Known surviving units:
+ * One at CHM (missing? mouse, no media)
+ * One at Xerox Museum at PARC (with mouse and 2 floppies, floppies were not imaged to the best of my knowledge)
+
+ * The NoteTaker used the BitBlt graphical operation (from SmallTalk-76) to do most graphical functions, in order to fit the SmallTalk code and programs within 256K of RAM[2]. The actual BitBlt code lives in ROM[3].
+
+ * As far as I am aware, no media (world disks/boot disks) for the NoteTaker have survived (except maybe the two disks at Xerox Museum at PARC), but an incomplete dump of the Smalltalk-76 'world' which was used to bootstrap Smalltalk-78 originally did survive on the Alto disks at CHM
+
+ * see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker for additional information
+ * see http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/ for the smalltalk-76 dump
+ * see http://xeroxalto.computerhistory.org/Indigo/BasicDisks/Smalltalk14.bfs!1_/ for more notetaker/smalltalk related files, including SmallTalk-80 files based on the notetaker smalltalk-78
+
+ References:
+ * [1] http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf
+ * [2] "Smalltalk and Object Orientation: An Introduction" By John Hunt, pages 45-46 [ISBN 978-3-540-76115-0]
+ * [3] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf
+ * [4] http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/
+ * [5] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790118_NoteTaker_System_Manual.pdf
+ * MISSING DUMP for 8741? Keyboard MCU which does row-column scanning and mouse-related stuff
TODO: everything below.
-* Get the running machine smalltalk-78 memory dump loaded as a rom and forced into ram on startup, since no boot disks have survived
+* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer
+* figure out how the emulation-cpu boots and where its 4k of local ram maps to
+* Get smalltalk-78 loaded as a rom and forced into ram on startup, since no boot disks have survived (or if any survived, they are not dumped)
* floppy controller wd1791
-* crt5027 video controller
-* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet.
-* i8251? serial/EIA controller
-* 6402 keyboard UART
-* HLE for the missing MCU which reads the mouse quadratures and buttons
+ According to [3] and [5] the format is double density/MFM, 128 bytes per sector, 16 sectors per track, 1 or 2 sided, for 170K or 340K per disk.
+ According to the schematics, we're missing an 82s147 DISKSEP.PROM used as a data separator
+* crt5027 video controller; we're missing a PROM used to handle memory arbitration between the crtc and the rest of the system, but the equations are on the schematic
+* Harris 6402 serial/EIA UART
+* Harris 6402 keyboard UART
+* HLE for the missing i8748[5] MCU in the keyboard which reads the mouse quadratures and buttons and talks serially to the Keyboard UART
+WIP:
+* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet.
+* i/o cpu i/o area needs the memory map worked out per the schematics - mostly done
*/
#include "cpu/i86/i86.h"
@@ -56,13 +89,14 @@ public:
WRITE16_MEMBER(notetaker_state::IPConReg_w)
{
m_BootSeqDone = (data&0x80)?1:0;
- //m_ProcLock = (data&0x40)?1:0;
- //m_CharCtr = (data&0x20)?1:0;
- m_DisableROM = (data&0x10)?1:0;
+ //m_ProcLock = (data&0x40)?1:0; // processor lock
+ //m_CharCtr = (data&0x20)?1:0; // battery charge control
+ m_DisableROM = (data&0x10)?1:0; // disable rom at 0000-0fff
//m_CorrOn = (data&0x08)?1:0; // also LedInd5
//m_LedInd6 = (data&0x04)?1:0;
//m_LedInd7 = (data&0x02)?1:0;
//m_LedInd8 = (data&0x01)?1:0;
+ popmessage("LEDS: CR1: %d, CR2: %d, CR3: %d, CR4: %d", (data&0x04)>>2, (data&0x08)>>3, (data&0x02)>>1, (data&0x01)); // cr1 and 2 are in the reverse order as expected, according to the schematic
}
READ16_MEMBER(notetaker_state::maincpu_r)
@@ -103,37 +137,61 @@ BootSeqDone is 1, DisableROM is 0, mem map is 0x00000-0x00fff reading is t
BootSeqDone is 1, DisableROM is 1, mem map is entirely RAM or open bus for both reading and writing.
*/
static ADDRESS_MAP_START(notetaker_mem, AS_PROGRAM, 16, notetaker_state)
- /*AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 0xFF000) // I think this copy of rom is actually banked via io reg 0x20, there is RAM which lives behind here?
- AM_RANGE(0x01000, 0x3ffff) AM_RAM // ram lives here, 256KB
- AM_RANGE(0xff000, 0xfffff) AM_ROM // is this banked too? Don't think so...*/
+ /*
+ AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code implies writes here are ignored
+ AM_RANGE(0x01000, 0x01fff) AM_RAM // 4k of ram, local to the io processor
+ AM_RANGE(0x02000, 0x3ffff) AM_RAM AM_BASE("sharedram") // 256k of ram (less 8k), shared between both processors
+ // note 4000-8fff? is the framebuffer for the screen?
+ AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place
+ */
AM_RANGE(0x00000, 0xfffff) AM_READWRITE(maincpu_r, maincpu_w) // bypass MAME's memory map system as we need finer grained control
ADDRESS_MAP_END
/* io memory map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf
and from the schematic at http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf
a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0
-? ? ? ? 0 x x x x x x 0 0 0 0 x x x * . RW IntCon (PIC8259)
-? ? ? ? 0 x x x x x x 0 0 0 1 x x x x . W IPConReg
-? ? ? ? 0 x x x x x x 0 0 1 0 x x x x . W KbdInt
-? ? ? ? 0 x x x x x x 0 0 1 1 x x x x . W FIFOReg
-? ? ? ? 0 x x x x x x 0 1 0 0 x x x x . . Open Bus
-? ? ? ? 0 x x x x x x 0 1 0 1 x x x x . . Open Bus
-? ? ? ? 0 x x x x x x 0 1 1 0 x x x x . W FIFOBus
-? ? ? ? 0 x x x x x x 0 1 1 1 x x x x . . Open Bus
-0 0 0 0 0 0 0 0 * * * * * * * * * * * . R ROM, but ONLY if BootSegDone is TRUE, and /DisableROM is FALSE
-
+x x x x 0 x x x x x x 0 0 0 0 x x x * . RW IntCon (PIC8259)
+x x x x 0 x x x x x x 0 0 0 1 x x x x . W IPConReg
+x x x x 0 x x x x x x 0 0 1 0 x 0 0 0 . . KbdInt:Open Bus
+x x x x 0 x x x x x x 0 0 1 0 x 0 0 1 . R KbdInt:ReadKeyData
+x x x x 0 x x x x x x 0 0 1 0 x 0 1 0 . R KbdInt:ReadOPStatus
+x x x x 0 x x x x x x 0 0 1 0 x 0 1 1 . . KbdInt:Open Bus
+x x x x 0 x x x x x x 0 0 1 0 x 1 0 0 . W KbdInt:LoadKeyCtlReg
+x x x x 0 x x x x x x 0 0 1 0 x 1 0 1 . W KbdInt:LoadKeyData
+x x x x 0 x x x x x x 0 0 1 0 x 1 1 0 . W KbdInt:KeyDataReset
+x x x x 0 x x x x x x 0 0 1 0 x 1 1 1 . W KbdInt:KeyChipReset
+x x x x 0 x x x x x x 0 0 1 1 x x x x . W FIFOReg
+x x x x 0 x x x x x x 0 1 0 0 x x x x . . Open Bus
+x x x x 0 x x x x x x 0 1 0 1 x x x x . . Open Bus
+x x x x 0 x x x x x x 0 1 1 0 x x x x . W FIFOBus
+x x x x 0 x x x x x x 0 1 1 1 x x x x . . Open Bus
+x x x x 0 x x x x x x 1 0 0 0 x x x x . RW SelDiskReg
+x x x x 0 x x x x x x 1 0 0 1 x x * * . RW SelDiskInt
+x x x x 0 x x x x x x 1 0 1 0 * * * * . W SelCrtInt
+x x x x 0 x x x x x x 1 0 1 1 x x x x . W LoadDispAddr
+x x x x 0 x x x x x x 1 1 0 0 x x x x . . Open Bus
+x x x x 0 x x x x x x 0 1 0 1 x 0 0 0 . R SelEIA:ReadEIAStatus
+x x x x 0 x x x x x x 0 1 0 1 x 0 0 1 . R SelEIA:ReadEIAData
+x x x x 0 x x x x x x 0 1 0 1 x 0 1 0 . . SelEIA:Open Bus
+x x x x 0 x x x x x x 0 1 0 1 x 0 1 1 . . SelEIA:Open Bus
+x x x x 0 x x x x x x 0 1 0 1 x 1 0 0 . W SelEIA:LoadEIACtlReg
+x x x x 0 x x x x x x 0 1 0 1 x 1 0 1 . W SelEIA:LoadEIAData
+x x x x 0 x x x x x x 0 1 0 1 x 1 1 0 . W SelEIA:EIADataReset
+x x x x 0 x x x x x x 0 1 0 1 x 1 1 1 . W SelEIA:EIAChipReset
+x x x x 0 x x x x x x 1 1 1 0 x x x x . R SelADCHi
+x x x x 0 x x x x x x 1 1 1 1 x x x x . W CRTSwitch
*/
static ADDRESS_MAP_START(notetaker_io, AS_IO, 16, notetaker_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00, 0x03) AM_MIRROR(0x7E1C) AM_DEVREADWRITE8("pic8259", pic8259_device, read, write, 0x00ff)
AM_RANGE(0x20, 0x21) AM_MIRROR(0x7E1E) AM_WRITE(IPConReg_w) // processor (rom mapping, etc) control register
- //AM_RANGE(0x42, 0x43) AM_READ read keyboard data (high byte only) [from mcu?]
- //AM_RANGE(0x44, 0x45) AM_READ read keyboard fifo state (high byte only) [from mcu?]
- //AM_RANGE(0x48, 0x49) AM_WRITE kbd->uart control register [to mcu?]
- //AM_RANGE(0x4a, 0x4b) AM_WRITE kbd->uart data register [to mcu?]
- //AM_RANGE(0x4c, 0x4d) AM_WRITE kbd data reset [to mcu?]
- //AM_RANGE(0x4e, 0x4f) AM_WRITE kbd chip [mcu?] reset [to mcu?]
- //AM_RANGE(0x60, 0x61) AM_WRITE DAC sample and hold and frequency setup
+ //AM_RANGE(0x42, 0x43) AM_MIRROR(0x7E10) AM_READ(ReadKeyData_r) // read keyboard data (high byte only) [from mcu?]
+ //AM_RANGE(0x44, 0x45) AM_MIRROR(0x7E10) AM_READ(ReadOPStatus_r) // read keyboard fifo state (high byte only) [from mcu?]
+ //AM_RANGE(0x48, 0x49) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyCtlReg_w) // kbd uart control register
+ //AM_RANGE(0x4a, 0x4b) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyData_w) // kbd uart data register
+ //AM_RANGE(0x4c, 0x4d) AM_MIRROR(0x7E10) AM_WRITE(KeyDataReset_w) // kbd uart ddr switch (data reset)
+ //AM_RANGE(0x4e, 0x4f) AM_MIRROR(0x7E10) AM_WRITE(KeyChipReset_w) // kbd uart reset
+ //AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup
//AM_RANGE(0x100, 0x101) AM_WRITE I/O register (adc speed, crtc pixel clock enable, etc)
//AM_RANGE(0x140, 0x15f) AM_DEVREADWRITE("crt5027", crt5027_device, read, write)
ADDRESS_MAP_END
@@ -143,7 +201,7 @@ ADDRESS_MAP_END
0x02 to port 0x100 (IOR write: enable 5v only relay control for powering up 4116 dram enabled)
0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control for powering up 4116 dram enabled)
<dram memory 0x00000-0x3ffff is zeroed here>
-0x13 to port 0x000 (?????)
+0x13 to port 0x000 PIC (?????)
0x08 to port 0x002 PIC (UART int enabled)
0x0D to port 0x002 PIC (UART, wd1791, and parity error int enabled)
0xff to port 0x002 PIC (all ints enabled)
@@ -181,13 +239,13 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( notetakr, notetaker_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", I8086, XTAL_24MHz/3) /* 24Mhz crystal divided down by i8284 clock generator */
+ MCFG_CPU_ADD("maincpu", I8086, XTAL_24MHz/3) /* iD8086-2 @ E4A; 24Mhz crystal divided down to 8Mhz by i8284 clock generator */
MCFG_CPU_PROGRAM_MAP(notetaker_mem)
MCFG_CPU_IO_MAP(notetaker_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
- MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL)
+ MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL) // iP8259A-2 @ E6
- //Note there is a second i8086 cpu on the 'emulator board', which is probably loaded with code once smalltalk boots
+ //Note there is a second i8086 cpu on the 'emulator board', which is probably loaded with code once smalltalk-78 loads
/* video hardware */
/*MCFG_SCREEN_ADD("screen", RASTER)
@@ -209,7 +267,7 @@ MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(notetaker_state,notetakr)
{
- // descramble the rom; the whole thing is a gigantic scrambled mess probably to ease
+ // descramble the rom; the whole thing is a gigantic scrambled mess either to ease
// interfacing with older xerox technologies which used A0 and D0 as the MSB bits
// or maybe because someone screwed up somewhere along the line. we may never know.
// see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf pages 12 and onward
@@ -233,10 +291,17 @@ DRIVER_INIT_MEMBER(notetaker_state,notetakr)
/* ROM definition */
ROM_START( notetakr )
ROM_REGION( 0x1000, "maincpuload", ROMREGION_ERASEFF ) // load roms here before descrambling
- ROMX_LOAD( "biop__2.00_hi.b2716.h1", 0x0000, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1))
- ROMX_LOAD( "biop__2.00_lo.b2716.g1", 0x0001, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1))
+ ROM_SYSTEM_BIOS( 0, "v2.00", "IO Monitor v2.00" ) // dumped from Notetaker
+ ROMX_LOAD( "biop__2.00_hi.b2716.h1", 0x0000, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1) | ROM_BIOS(1))
+ ROMX_LOAD( "biop__2.00_lo.b2716.g1", 0x0001, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1) | ROM_BIOS(1))
+ ROM_SYSTEM_BIOS( 1, "v1.50", "IO Monitor v1.50" ) // typed from the source listing at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf and scrambled
+ ROMX_LOAD( "z-iop_1.50_hi.h1", 0x0000, 0x0800, CRC(2994656e) SHA1(ca2bb38eb9075c5c2f3cc5439b209e7e216084da), ROM_SKIP(1) | ROM_BIOS(2))
+ ROMX_LOAD( "z-iop_1.50_lo.g1", 0x0001, 0x0800, CRC(2cb79a67) SHA1(692aafd2aeea27533f6288dbb1cb8678ea08fade), ROM_SKIP(1) | ROM_BIOS(2))
ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // area for descrambled roms
ROM_REGION( 0x100000, "ram", ROMREGION_ERASEFF ) // ram cards
+ ROM_REGION( 0x1000, "proms", ROMREGION_ERASEFF )
+ ROM_LOAD( "disksep.prom.82s147.a4", 0x000, 0x200, NO_DUMP ) // disk data separator prom from the disk/display module board
+ ROM_LOAD( "setmemrq.prom.82s126.d9", 0x200, 0x100, NO_DUMP ) // SETMEMRQ memory timing prom from the disk/display module board; The equations for this one are actually listed on the schematic, so it should be pretty easy to recreate.
ROM_END
/* Driver */
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index 66670fe7c9a..7185014c285 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -734,6 +734,7 @@ public:
UINT8 freq_index;
}m_mouse;
TIMER_DEVICE_CALLBACK_MEMBER( mouse_irq_cb );
+ DECLARE_READ8_MEMBER(unk_r);
DECLARE_DRIVER_INIT(pc9801_kanji);
inline void set_dma_channel(int channel, int state);
@@ -2485,6 +2486,7 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state )
AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff)
AM_RANGE(0x005c, 0x005f) AM_READ16(pc9821_timestamp_r,0xffffffff) AM_WRITENOP // artic
AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("upd7220_chr", upd7220_device, read, write, 0x00ff00ff) //upd7220 character ports / <undefined>
+ AM_RANGE(0x0060, 0x0063) AM_READ8(unk_r, 0xff00ff00) // mouse related (unmapped checking for AT keyb controller\PS/2 mouse?)
AM_RANGE(0x0064, 0x0067) AM_WRITE8(vrtc_clear_w, 0x000000ff)
AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9821_video_ff_w, 0x00ff00ff) //mode FF / <undefined>
AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00)
@@ -2969,6 +2971,11 @@ WRITE8_MEMBER(pc9801_state::ppi_mouse_portc_w)
m_mouse.control = data;
}
+READ8_MEMBER(pc9801_state::unk_r)
+{
+ return 0xff;
+}
+
/****************************************
*
* UPD765 interface
diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp
index d7d54a6a2c4..9355d7f7726 100644
--- a/src/mame/drivers/punchout.cpp
+++ b/src/mame/drivers/punchout.cpp
@@ -12,7 +12,6 @@ the bottom screen.
driver by Nicola Salmoria
TODO:
-- finish spunchout protection, currently using a hacky workaround
- add useless driver config to choose between pink and white color proms
- video raw params - pixel clock is derived from 20.16mhz xtal
- money bag placement might not be 100% correct in Arm Wrestling
@@ -148,10 +147,7 @@ WRITE8_MEMBER(punchout_state::punchout_speech_vcu_w)
WRITE8_MEMBER(punchout_state::punchout_2a03_reset_w)
{
- if (data & 1)
- m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
- else
- m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
}
WRITE8_MEMBER(punchout_state::nmi_mask_w)
@@ -192,20 +188,19 @@ static ADDRESS_MAP_START( punchout_io_map, AS_IO, 8, punchout_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
- AM_RANGE(0x00, 0x01) AM_WRITENOP /* the 2A03 #1 is not present */
+ AM_RANGE(0x00, 0x01) AM_WRITENOP // the 2A03 #1 is not present
AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_byte_w)
AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_byte_w)
- AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w) /* VLM5030 */
-// AM_RANGE(0x05, 0x05) AM_WRITENOP /* unused */
-// AM_RANGE(0x06, 0x06) AM_WRITENOP
+ AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w)
+ AM_RANGE(0x05, 0x07) AM_WRITENOP // spunchout protection
AM_RANGE(0x08, 0x08) AM_WRITE(nmi_mask_w)
- AM_RANGE(0x09, 0x09) AM_WRITENOP /* watchdog reset, seldom used because 08 clears the watchdog as well */
- AM_RANGE(0x0a, 0x0a) AM_WRITENOP /* ?? */
+ AM_RANGE(0x09, 0x09) AM_WRITENOP // watchdog reset, seldom used because 08 clears the watchdog as well
+ AM_RANGE(0x0a, 0x0a) AM_WRITENOP // ?
AM_RANGE(0x0b, 0x0b) AM_WRITE(punchout_2a03_reset_w)
- AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w) /* VLM5030 */
- AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w) /* VLM5030 */
- AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w) /* VLM5030 */
- AM_RANGE(0x0f, 0x0f) AM_WRITENOP /* enable NVRAM ? */
+ AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w)
+ AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w)
+ AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w)
+ AM_RANGE(0x0f, 0x0f) AM_WRITENOP // enable NVRAM?
ADDRESS_MAP_END
@@ -229,15 +224,6 @@ READ8_MEMBER(punchout_state::spunchout_exp_r)
ret |= m_rp5h01->counter_r() ? 0x00 : 0x40;
ret |= m_rp5h01->data_r() ? 0x00 : 0x80;
- // FIXME - hack d6/d7 state until we figure out why the game resets
- /* PC = 0x0313 */
- /* (ret or 0x10) -> (D7DF),(D7A0) - (D7DF),(D7A0) = 0d0h(ret nc) */
- ret &= 0x3f;
- if (space.device().safe_pcbase() == 0x0313)
- {
- ret |= 0xc0;
- }
-
return ret;
}
@@ -245,22 +231,30 @@ WRITE8_MEMBER(punchout_state::spunchout_exp_w)
{
// d0-d3: D0-D3 to RP5C01
m_rtc->write(space, offset >> 4 & 0xf, data & 0xf);
+}
- // d0: 74LS74 1D + 74LS74 2D
- // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST
+WRITE8_MEMBER(punchout_state::spunchout_rp5h01_reset_w)
+{
+ // d0: 74LS74 2D
// 74LS74 2Q -> RP5H01 RESET
// 74LS74 _2Q -> 74LS74 _1 RESET
- m_rp5h01->clock_w(data & 1);
- m_rp5h01->test_w(data & 1);
m_rp5h01->reset_w(data & 1);
- m_rp5h01->clock_w(0);
- m_rp5h01->test_w(0);
+ if (data & 1)
+ spunchout_rp5h01_clock_w(space, 0, 0);
+}
- // d4-d7: unused?
+WRITE8_MEMBER(punchout_state::spunchout_rp5h01_clock_w)
+{
+ // d0: 74LS74 1D
+ // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST
+ m_rp5h01->clock_w(data & 1);
+ m_rp5h01->test_w(data & 1);
}
static ADDRESS_MAP_START( spnchout_io_map, AS_IO, 8, punchout_state )
- AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) /* protection ports */
+ AM_RANGE(0x05, 0x05) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_reset_w)
+ AM_RANGE(0x06, 0x06) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_clock_w)
+ AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) // protection ports
AM_IMPORT_FROM( punchout_io_map )
ADDRESS_MAP_END
diff --git a/src/mame/drivers/zaccaria.cpp b/src/mame/drivers/zaccaria.cpp
index a002b46b6d0..328c9614af7 100644
--- a/src/mame/drivers/zaccaria.cpp
+++ b/src/mame/drivers/zaccaria.cpp
@@ -41,31 +41,19 @@ Notes:
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "cpu/m6800/m6800.h"
#include "machine/i8255.h"
-#include "sound/dac.h"
#include "includes/zaccaria.h"
void zaccaria_state::machine_start()
{
save_item(NAME(m_dsw_sel));
- save_item(NAME(m_active_8910));
- save_item(NAME(m_port0a));
- save_item(NAME(m_acs));
- save_item(NAME(m_last_port0b));
- save_item(NAME(m_toggle));
save_item(NAME(m_nmi_mask));
}
void zaccaria_state::machine_reset()
{
m_dsw_sel = 0;
- m_active_8910 = 0;
- m_port0a = 0;
- m_acs = 0;
- m_last_port0b = 0;
- m_toggle = 0;
m_nmi_mask = 0;
}
@@ -73,21 +61,21 @@ WRITE8_MEMBER(zaccaria_state::dsw_sel_w)
{
switch (data & 0xf0)
{
- case 0xe0:
- m_dsw_sel = 0;
- break;
+ case 0xe0:
+ m_dsw_sel = 0;
+ break;
- case 0xd0:
- m_dsw_sel = 1;
- break;
+ case 0xd0:
+ m_dsw_sel = 1;
+ break;
- case 0xb0:
- m_dsw_sel = 2;
- break;
+ case 0xb0:
+ m_dsw_sel = 2;
+ break;
- default:
- logerror("%s: portsel = %02x\n", machine().describe_context(), data);
- break;
+ default:
+ logerror("%s: portsel = %02x\n", machine().describe_context(), data);
+ break;
}
}
@@ -97,100 +85,6 @@ READ8_MEMBER(zaccaria_state::dsw_r)
}
-WRITE8_MEMBER(zaccaria_state::ay8910_port0a_w)
-{
- /* bits 0-2 go to a 74LS156 with open collector outputs
- * one out of 8 Resitors is than used to form a resistor
- * divider with Analog input 5 (tromba)
- */
-
- // bits 3-4 control the analog drum emulation on 8910 #0 ch. A
-
- static const int table[8] = { 8200, 5600, 3300, 1500, 820, 390, 150, 47 };
- int b0, b1, b2, ba, v;
- b0 = data & 0x01;
- b1 = (data & 0x02) >> 1;
- b2 = (data & 0x04) >> 2;
- ba = (b0<<2) | (b1<<1) | b2;
- /* 150 below to scale to volume 100 */
- v = (150 * table[ba]) / (4700 + table[ba]);
- //printf("dac1w %02d %04d\n", ba, v);
- m_ay2->set_volume(1, v);
-}
-
-READ8_MEMBER(zaccaria_state::port0a_r)
-{
- return (m_active_8910 == 0) ? m_ay1->data_r(space, 0) : m_ay2->data_r(space, 0);
-}
-
-WRITE8_MEMBER(zaccaria_state::port0a_w)
-{
- m_port0a = data;
-}
-
-WRITE8_MEMBER(zaccaria_state::port0b_w)
-{
- /* bit 1 goes to 8910 #0 BDIR pin */
- if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00)
- {
- /* bit 0 goes to the 8910 #0 BC1 pin */
- m_ay1->data_address_w(space, m_last_port0b, m_port0a);
- }
- else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02)
- {
- /* bit 0 goes to the 8910 #0 BC1 pin */
- if (m_last_port0b & 0x01)
- m_active_8910 = 0;
- }
- /* bit 3 goes to 8910 #1 BDIR pin */
- if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00)
- {
- /* bit 2 goes to the 8910 #1 BC1 pin */
- m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a);
- }
- else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08)
- {
- /* bit 2 goes to the 8910 #1 BC1 pin */
- if (m_last_port0b & 0x04)
- m_active_8910 = 1;
- }
-
- m_last_port0b = data;
-}
-
-INTERRUPT_GEN_MEMBER(zaccaria_state::cb1_toggle)
-{
- m_pia0->cb1_w(m_toggle & 1);
- m_toggle ^= 1;
-}
-
-WRITE8_MEMBER(zaccaria_state::port1b_w)
-{
- // bit 0 = /RS
- m_tms->rsq_w((data >> 0) & 0x01);
- // bit 1 = /WS
- m_tms->wsq_w((data >> 1) & 0x01);
-
- // bit 3 = "ACS" (goes, inverted, to input port 6 bit 3)
- m_acs = ~data & 0x08;
-
- // bit 4 = led (for testing?)
- output().set_led_value(0,~data & 0x10);
-}
-
-
-WRITE8_MEMBER(zaccaria_state::sound_command_w)
-{
- soundlatch_byte_w(space, 0, data);
- m_audio2->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
-}
-
-WRITE8_MEMBER(zaccaria_state::sound1_command_w)
-{
- m_pia0->ca1_w(data & 0x80);
- soundlatch2_byte_w(space, 0, data);
-}
-
GAME_EXTERN(monymony);
READ8_MEMBER(zaccaria_state::prot1_r)
@@ -253,83 +147,23 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zaccaria_state )
AM_RANGE(0x6800, 0x683f) AM_WRITE(attributes_w) AM_SHARE("attributesram")
AM_RANGE(0x6840, 0x685f) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x6881, 0x68c0) AM_RAM AM_SHARE("spriteram2")
- AM_RANGE(0x6c00, 0x6c00) AM_WRITE(flip_screen_x_w)
- AM_RANGE(0x6c01, 0x6c01) AM_WRITE(flip_screen_y_w)
- AM_RANGE(0x6c02, 0x6c02) AM_WRITENOP /* sound reset */
- AM_RANGE(0x6c06, 0x6c06) AM_WRITE(coin_w)
- AM_RANGE(0x6c07, 0x6c07) AM_WRITE(nmi_mask_w)
- AM_RANGE(0x6c00, 0x6c07) AM_READ(prot2_r)
- AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(dsw_r, sound_command_w)
+ AM_RANGE(0x6c00, 0x6c00) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_x_w)
+ AM_RANGE(0x6c01, 0x6c01) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_y_w)
+ AM_RANGE(0x6c02, 0x6c02) AM_MIRROR(0x81f8) AM_WRITE(ressound_w)
+ AM_RANGE(0x6c06, 0x6c06) AM_MIRROR(0x81f8) AM_WRITE(coin_w)
+ AM_RANGE(0x6c07, 0x6c07) AM_MIRROR(0x81f8) AM_WRITE(nmi_mask_w)
+ AM_RANGE(0x6c00, 0x6c07) AM_MIRROR(0x81f8) AM_READ(prot2_r)
+ AM_RANGE(0x6e00, 0x6e00) AM_MIRROR(0x81f8) AM_READ(dsw_r) AM_DEVWRITE("audiopcb", zac1b11142_audio_device, hs_w)
AM_RANGE(0x7000, 0x77ff) AM_RAM
AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r)
AM_RANGE(0x8000, 0xdfff) AM_ROM
ADDRESS_MAP_END
-/* slave sound cpu, produces music and sound effects */
-/* mapping:
- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
- 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
- 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram)
- 0 0 1 x x x x x x x x x x x x x Open bus
- 0 1 0 x x x x x x x x x 0 0 x x Open bus
- 0 1 0 x x x x x x x x x 0 1 x x Open bus
- 0 1 0 x x x x x x x x x 1 0 x x Open bus
- 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I
- 0 1 1 x x x x x x x x x x x x x Open bus
- 1 0 % % * * * * * * * * * * * * R /CS4A: Enable Rom 13
- 1 1 % % * * * * * * * * * * * * R /CS5A: Enable Rom 9
- note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms
- monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
- hence for actual chips used, the mem map is:
- 1 0 x * * * * * * * * * * * * * R /CS4A: Enable Rom 13
- 1 1 x * * * * * * * * * * * * * R /CS5A: Enable Rom 9
-
- 6821 PIA: CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1); CB1 comes from a periodic counter clocked by the 6802's clock, divided by 4096. CA2 and CB2 are disconnected. PA0-7 connect to the data busses of the AY-3-8910 chips; PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G; PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H.
-*/
-static ADDRESS_MAP_START( sound_map_1, AS_PROGRAM, 8, zaccaria_state )
- AM_RANGE(0x0000, 0x007f) AM_RAM
- AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x1ff0)
- AM_RANGE(0x8000, 0x9fff) AM_ROM AM_MIRROR(0x2000) // rom 13
- AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) // rom 9
-ADDRESS_MAP_END
-/* master sound cpu, controls speech directly */
-/* mapping:
- A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00
- 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram
-**** x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here)
- x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I
- x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC
- x x 0 1 0 1 x x x x x x x x x x W Command to slave sound1 cpu
- x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80
- x x 0 1 1 1 x x x x x x x x x x Open bus
- % % 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
- % % 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
- note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms
- monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care
- hence for actual chips used, the mem map is:
- x * 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8
- x * 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7
-
- 6821 PIA: PA0-7, CA2 and CB1 connect to the TMS5200; CA1 and CB2 are disconnected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4); PB3 connects to 'ACS' which goes to the z80.
-*/
-static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state )
- AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */
- AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C)
- AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("mc1408", dac_device, write_unsigned8) AM_MIRROR(0x83FF) /* MC1408 */
- AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF)
- AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF)
- AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low
- AM_RANGE(0x3000, 0x3fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 low
- AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 high
- AM_RANGE(0x7000, 0x7fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 high
-ADDRESS_MAP_END
-
-
-CUSTOM_INPUT_MEMBER(zaccaria_state::acs_r)
+WRITE8_MEMBER(zaccaria_state::ressound_w)
{
- return (m_acs & 0x08) ? 1 : 0;
+ m_audiopcb->ressound_w(data & 0x01);
}
static INPUT_PORTS_START( monymony )
@@ -437,7 +271,7 @@ static INPUT_PORTS_START( monymony )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaccaria_state,acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("audiopcb", zac1b11142_audio_device, acs_r)
/* other bits come from a protection device */
INPUT_PORTS_END
@@ -508,33 +342,12 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", zaccaria_state, vblank_irq)
// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
- MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */
- MCFG_CPU_PROGRAM_MAP(sound_map_1)
- MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, cb1_toggle, (double)XTAL_3_579545MHz/4096)
-// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
-
- MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */
- MCFG_CPU_PROGRAM_MAP(sound_map_2)
-// MCFG_QUANTUM_TIME(attotime::from_hz(1000000))
-
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
MCFG_I8255_IN_PORTC_CB(IOPORT("SYSTEM"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, dsw_sel_w))
- MCFG_DEVICE_ADD( "pia0", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, port0a_r))
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, port0a_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, port0b_w))
- MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line))
- MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line))
-
- MCFG_DEVICE_ADD( "pia1", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(DEVREAD8("tms", tms5220_device, status_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("tms", tms5220_device, data_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,port1b_w))
-
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60.57) /* verified on pcb */
@@ -551,24 +364,8 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
- MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r))
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zaccaria_state, ay8910_port0a_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
-
- MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
-
- MCFG_DAC_ADD("mc1408")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-
- /* There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) */
- /* 162kHz measured on pin 3 20 minutesa fter power on. Clock would then be 162*4=648kHz. */
- MCFG_SOUND_ADD("tms", TMS5200, 649200) /* ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) */
- MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, cb1_w))
- MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, ca2_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_ZACCARIA_1B11142("audiopcb")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -594,11 +391,11 @@ ROM_START( monymony )
ROM_LOAD( "cpu6.2c", 0x5000, 0x1000, CRC(31da62b1) SHA1(486f07087244f8537510afacb64ddd59eb512a4d) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "snd13.2g", 0x8000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) )
ROM_LOAD( "snd9.1i", 0xc000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) )
- ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "snd8.1h", 0x2000, 0x1000, CRC(aad76193) SHA1(e08fc184efced392ee902c4cc9daaaf3310cdfe2) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "snd7.1g", 0x3000, 0x1000, CRC(1e8ffe3e) SHA1(858ee7abe88d5801237e519cae2b50ae4bf33a58) )
@@ -629,11 +426,11 @@ ROM_START( jackrabt )
ROM_LOAD( "cpu-01.5h", 0xc000, 0x1000, CRC(785e1a01) SHA1(a748d300be9455cad4f912e01c2279bb8465edfe) )
ROM_LOAD( "cpu-01.6h", 0xd000, 0x1000, CRC(dd5979cf) SHA1(e9afe7002b2258a1c3132bdd951c6e20d473fb6a) )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@@ -668,11 +465,11 @@ ROM_START( jackrabt2 )
ROM_LOAD( "6cpu2.2c", 0x5000, 0x1000, CRC(404496eb) SHA1(44381e27e540fe9d8cacab4c3b1fe9a4f20d26a8) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
@@ -709,11 +506,11 @@ ROM_START( jackrabts )
ROM_LOAD( "6cpu.2c", 0x5000, 0x1000, CRC(f53d6356) SHA1(9b167edca59cf81a2468368a372bab132f15e2ea) )
ROM_CONTINUE( 0xd000, 0x1000 )
- ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */
+ ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */
ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) )
ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) )
- ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */
+ ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */
ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) )
ROM_CONTINUE( 0x6000, 0x1000 )
ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) )
diff --git a/src/mame/includes/galpanic.h b/src/mame/includes/galpanic.h
index 788ca087540..0ab503e6742 100644
--- a/src/mame/includes/galpanic.h
+++ b/src/mame/includes/galpanic.h
@@ -10,7 +10,6 @@ public:
m_maincpu(*this, "maincpu"),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram"),
- m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
@@ -20,23 +19,23 @@ public:
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT16> m_bgvideoram;
required_shared_ptr<UINT16> m_fgvideoram;
- bitmap_ind16 m_bitmap;
- bitmap_ind16 m_sprites_bitmap;
- optional_shared_ptr<UINT16> m_spriteram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<kaneko_pandora_device> m_pandora;
- DECLARE_WRITE16_MEMBER(galpanic_6295_bankswitch_w);
- DECLARE_WRITE16_MEMBER(galpanic_coin_w);
+ bitmap_ind16 m_bitmap;
+
+ DECLARE_WRITE16_MEMBER(m6295_bankswitch_w);
+ DECLARE_WRITE16_MEMBER(coin_w);
+ DECLARE_WRITE16_MEMBER(bgvideoram_w);
- DECLARE_VIDEO_START(galpanic);
+ virtual void machine_start() override;
+ virtual void video_start() override;
DECLARE_PALETTE_INIT(galpanic);
- UINT32 screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void screen_eof_galpanic(screen_device &screen, bool state);
- TIMER_DEVICE_CALLBACK_MEMBER(galpanic_scanline);
+
+ UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ void screen_eof(screen_device &screen, bool state);
+ TIMER_DEVICE_CALLBACK_MEMBER(scanline);
void draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
- /*----------- defined in video/galpanic.c -----------*/
- DECLARE_WRITE16_MEMBER( galpanic_bgvideoram_w );
};
diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h
index f6d35ca93d6..e3b130a109d 100644
--- a/src/mame/includes/laserbat.h
+++ b/src/mame/includes/laserbat.h
@@ -6,6 +6,8 @@
*************************************************************************/
+#include "audio/zaccaria.h"
+
#include "machine/6821pia.h"
#include "machine/pla.h"
#include "machine/s2636.h"
@@ -185,11 +187,7 @@ class catnmous_state : public laserbat_state_base
public:
catnmous_state(const machine_config &mconfig, device_type type, const char *tag)
: laserbat_state_base(mconfig, type, tag)
- , m_audiocpu(*this, "audiocpu")
- , m_pia(*this, "pia")
- , m_psg1(*this, "psg1")
- , m_psg2(*this, "psg2")
- , m_cb1(false)
+ , m_audiopcb(*this, "audiopcb")
{
}
@@ -200,31 +198,6 @@ public:
virtual DECLARE_WRITE8_MEMBER(csound1_w) override;
virtual DECLARE_WRITE8_MEMBER(csound2_w) override;
- // PIA handlers
- DECLARE_READ8_MEMBER(pia_porta_r);
- DECLARE_WRITE8_MEMBER(pia_porta_w);
- DECLARE_WRITE8_MEMBER(pia_portb_w);
- DECLARE_WRITE_LINE_MEMBER(pia_irqa);
- DECLARE_WRITE_LINE_MEMBER(pia_irqb);
-
- // PSG handlers
- DECLARE_WRITE8_MEMBER(psg1_porta_w);
- DECLARE_READ8_MEMBER(psg1_portb_r);
-
- // periodic signal generators
- INTERRUPT_GEN_MEMBER(cb1_toggle);
-
protected:
-
- // initialisation/startup
- virtual void machine_start() override;
-
- // sound board devices
- required_device<cpu_device> m_audiocpu;
- required_device<pia6821_device> m_pia;
- required_device<ay8910_device> m_psg1;
- required_device<ay8910_device> m_psg2;
-
- // control line states
- bool m_cb1;
+ required_device<zac1b11107_audio_device> m_audiopcb;
};
diff --git a/src/mame/includes/punchout.h b/src/mame/includes/punchout.h
index b8e3bf4cd43..874b31678d1 100644
--- a/src/mame/includes/punchout.h
+++ b/src/mame/includes/punchout.h
@@ -60,6 +60,8 @@ public:
DECLARE_WRITE8_MEMBER(punchout_2a03_reset_w);
DECLARE_READ8_MEMBER(spunchout_exp_r);
DECLARE_WRITE8_MEMBER(spunchout_exp_w);
+ DECLARE_WRITE8_MEMBER(spunchout_rp5h01_reset_w);
+ DECLARE_WRITE8_MEMBER(spunchout_rp5h01_clock_w);
DECLARE_WRITE8_MEMBER(nmi_mask_w);
DECLARE_WRITE8_MEMBER(punchout_bg_top_videoram_w);
DECLARE_WRITE8_MEMBER(punchout_bg_bot_videoram_w);
diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h
index ea4db5c7db4..58d7588fc62 100644
--- a/src/mame/includes/xbox.h
+++ b/src/mame/includes/xbox.h
@@ -111,7 +111,7 @@ struct USBSetupPacket {
UINT16 wLength;
};
-struct USBStandardDeviceDscriptor {
+struct USBStandardDeviceDescriptor {
UINT8 bLength;
UINT8 bDescriptorType;
UINT16 bcdUSB;
@@ -190,10 +190,14 @@ enum USBDescriptorType {
class ohci_function_device {
public:
- ohci_function_device();
+ ohci_function_device(running_machine &machine);
void execute_reset();
int execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size);
private:
+ void add_device_descriptor(USBStandardDeviceDescriptor &descriptor);
+ void add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor);
+ void add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor);
+ void add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor);
int address;
int newaddress;
int controldirection;
@@ -202,6 +206,8 @@ private:
bool settingaddress;
int remain;
UINT8 *position;
+ UINT8 *descriptors;
+ int descriptors_pos;
};
class xbox_base_state : public driver_device
diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h
index 8371e6b6fb0..6bcfa72798d 100644
--- a/src/mame/includes/zaccaria.h
+++ b/src/mame/includes/zaccaria.h
@@ -1,60 +1,25 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
-#include "machine/6821pia.h"
-#include "sound/ay8910.h"
-#include "sound/tms5220.h"
+#include "emu.h"
+#include "audio/zaccaria.h"
class zaccaria_state : public driver_device
{
public:
zaccaria_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_audio2(*this, "audio2"),
- m_pia0(*this, "pia0"),
- m_ay1(*this, "ay1"),
- m_ay2(*this, "ay2"),
- m_tms(*this, "tms"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_videoram(*this, "videoram"),
- m_attributesram(*this, "attributesram"),
- m_spriteram(*this, "spriteram"),
- m_spriteram2(*this, "spriteram2"),
- m_dsw_port(*this, "DSW") { }
-
-
-
- /* devices */
- required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audio2;
- required_device<pia6821_device> m_pia0;
- required_device<ay8910_device> m_ay1;
- required_device<ay8910_device> m_ay2;
- required_device<tms5220_device> m_tms;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
-
- /* memory pointers */
- required_shared_ptr<UINT8> m_videoram;
- required_shared_ptr<UINT8> m_attributesram;
- required_shared_ptr<UINT8> m_spriteram;
- required_shared_ptr<UINT8> m_spriteram2;
-
- required_ioport_array<3> m_dsw_port;
-
- int m_dsw_sel;
- int m_active_8910;
- int m_port0a;
- int m_acs;
- int m_last_port0b;
- int m_toggle;
- tilemap_t *m_bg_tilemap;
- UINT8 m_nmi_mask;
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_audiopcb(*this, "audiopcb")
+ , m_videoram(*this, "videoram")
+ , m_attributesram(*this, "attributesram")
+ , m_spriteram(*this, "spriteram")
+ , m_spriteram2(*this, "spriteram2")
+ , m_dsw_port(*this, "DSW")
+ { }
DECLARE_READ8_MEMBER(dsw_r);
- DECLARE_WRITE8_MEMBER(sound_command_w);
- DECLARE_WRITE8_MEMBER(sound1_command_w);
DECLARE_READ8_MEMBER(prot1_r);
DECLARE_READ8_MEMBER(prot2_r);
DECLARE_WRITE8_MEMBER(coin_w);
@@ -63,20 +28,31 @@ public:
DECLARE_WRITE8_MEMBER(attributes_w);
DECLARE_WRITE8_MEMBER(flip_screen_x_w);
DECLARE_WRITE8_MEMBER(flip_screen_y_w);
- DECLARE_CUSTOM_INPUT_MEMBER(acs_r);
+ DECLARE_WRITE8_MEMBER(ressound_w);
DECLARE_WRITE8_MEMBER(dsw_sel_w);
- DECLARE_WRITE8_MEMBER(ay8910_port0a_w);
- DECLARE_READ8_MEMBER(port0a_r);
- DECLARE_WRITE8_MEMBER(port0a_w);
- DECLARE_WRITE8_MEMBER(port0b_w);
- DECLARE_WRITE8_MEMBER(port1b_w);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(zaccaria);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(cb1_toggle);
INTERRUPT_GEN_MEMBER(vblank_irq);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section);
+
+protected:
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+ required_device<zac1b11142_audio_device> m_audiopcb;
+
+ required_shared_ptr<UINT8> m_videoram;
+ required_shared_ptr<UINT8> m_attributesram;
+ required_shared_ptr<UINT8> m_spriteram;
+ required_shared_ptr<UINT8> m_spriteram2;
+
+ required_ioport_array<3> m_dsw_port;
+
+ int m_dsw_sel;
+ tilemap_t *m_bg_tilemap;
+ UINT8 m_nmi_mask;
};
diff --git a/src/mame/layout/fidel_eag.lay b/src/mame/layout/fidel_eag.lay
new file mode 100644
index 00000000000..9d3e4d2766a
--- /dev/null
+++ b/src/mame/layout/fidel_eag.lay
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="led" defstate="0">
+ <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
+ <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="100" top="0" bottom="100" />
+
+ <bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp
index 6d39cdd0962..0ac284242d7 100644
--- a/src/mame/machine/gaelco2.cpp
+++ b/src/mame/machine/gaelco2.cpp
@@ -287,19 +287,75 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_data_w)
***************************************************************************/
-READ16_MEMBER(gaelco2_state::snowboar_protection_r)
+static UINT32 rol(UINT32 x, unsigned int c)
{
- chd_file * table = machine().rom_load().get_disk_handle(":decrypt");
- UINT8 temp[1024];
- table->read_hunk(snowboard_latch>>9, &temp[0]);
- UINT16 data = (temp[(snowboard_latch & 0x1ff)*2]<<8) | temp[((snowboard_latch & 0x1ff)*2)+1];
-
- // TODO: replace above lookup (8GB table) with emulation of device
-
- logerror("%06x: protection read (input %08x output %04x)\n", space.device().safe_pc(), snowboard_latch, data);
-
+ return (x << c) | (x >> (32 - c));
+}
+
+static UINT16 get_lo(UINT32 x)
+{
+ return ((x & 0x00000010) << 1) |
+ ((x & 0x00000800) << 3) |
+ ((x & 0x40000000) >> 27) |
+ ((x & 0x00000005) << 6) |
+ ((x & 0x00000008) << 8) |
+ rol(x & 0x00800040, 9) |
+ ((x & 0x04000000) >> 16) |
+ ((x & 0x00008000) >> 14) |
+ ((x & 0x00002000) >> 11) |
+ ((x & 0x00020000) >> 10) |
+ ((x & 0x00100000) >> 8) |
+ ((x & 0x00044000) >> 5) |
+ ((x & 0x00000020) >> 1);
+}
+
+static UINT16 get_hi(UINT32 x)
+{
+ return ((x & 0x00001400) >> 0) |
+ ((x & 0x10000000) >> 26) |
+ ((x & 0x02000000) >> 24) |
+ ((x & 0x08000000) >> 21) |
+ ((x & 0x00000002) << 12) |
+ ((x & 0x01000000) >> 19) |
+ ((x & 0x20000000) >> 18) |
+ ((x & 0x80000000) >> 16) |
+ ((x & 0x00200000) >> 13) |
+ ((x & 0x00010000) >> 12) |
+ ((x & 0x00080000) >> 10) |
+ ((x & 0x00000200) >> 9) |
+ ((x & 0x00400000) >> 8) |
+ ((x & 0x00000080) >> 4) |
+ ((x & 0x00000100) >> 1);
+}
+
+static UINT16 get_out(UINT16 x)
+{
+ return ((x & 0xc840) << 0) |
+ ((x & 0x0080) << 2) |
+ ((x & 0x0004) << 3) |
+ ((x & 0x0008) << 5) |
+ ((x & 0x0010) << 8) |
+ ((x & 0x0002) << 9) |
+ ((x & 0x0001) << 13) |
+ ((x & 0x0200) >> 9) |
+ ((x & 0x1400) >> 8) |
+ ((x & 0x0100) >> 7) |
+ ((x & 0x2000) >> 6) |
+ ((x & 0x0020) >> 2);
+}
+
+UINT16 mangle(UINT32 x)
+{
+ UINT16 a = get_lo(x);
+ UINT16 b = get_hi(x);
+ return get_out(((a ^ 0x0010) - (b ^ 0x0024)) ^ 0x5496);
+}
- return data;
+READ16_MEMBER(gaelco2_state::snowboar_protection_r)
+{
+ UINT16 ret = mangle(snowboard_latch);
+ ret = ((ret & 0xff00) >> 8) | ((ret & 0x00ff) << 8);
+ return ret;
}
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index d341d9804d5..bed1f2b01d9 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -633,7 +633,8 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
int changed = 0;
int list = 1;
bool cont = false;
- int pid, remain, mps;
+ bool retire = false;
+ int pid, remain, mps, done;
hcca = ohcist.hc_regs[HcHCCA];
if (ohcist.state == UsbOperational) {
@@ -709,21 +710,20 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
if ((ohcist.transfer_descriptor.be ^ ohcist.transfer_descriptor.cbp) & 0xfffff000)
a |= 0x1000;
remain = a - b + 1;
- if (pid == InPid) {
- mps = ohcist.endpoint_descriptor.mps;
+ mps = ohcist.endpoint_descriptor.mps;
+ if ((pid == InPid) || (pid == OutPid)) {
if (remain < mps)
mps = remain;
}
- else {
- mps = ohcist.endpoint_descriptor.mps;
- }
- if (ohcist.transfer_descriptor.cbp == 0)
+ if (ohcist.transfer_descriptor.cbp == 0) {
+ remain = 0;
mps = 0;
+ }
b = ohcist.transfer_descriptor.cbp;
// if sending ...
if (pid != InPid) {
// ... get mps bytes
- for (int c = 0; c < mps; c++) {
+ for (int c = 0; c < remain; c++) {
ohcist.buffer[c] = ohcist.space->read_byte(b);
b++;
if ((b & 0xfff) == 0)
@@ -732,11 +732,11 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
}
// should check for time available
// execute transaction
- mps=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
+ done=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps);
// if receiving ...
if (pid == InPid) {
- // ... store mps bytes
- for (int c = 0; c < mps; c++) {
+ // ... store done bytes
+ for (int c = 0; c < done; c++) {
ohcist.space->write_byte(b,ohcist.buffer[c]);
b++;
if ((b & 0xfff) == 0)
@@ -746,9 +746,20 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer)
// status writeback (CompletionCode field, DataToggleControl field, CurrentBufferPointer field, ErrorCount field)
ohcist.transfer_descriptor.cc = NoError;
ohcist.transfer_descriptor.t = (ohcist.transfer_descriptor.t ^ 1) | 2;
+ // if all data is transferred (or there was no data to transfer) cbp must be 0 ?
+ if ((done == remain) || (pid == SetupPid))
+ b = 0;
ohcist.transfer_descriptor.cbp = b;
ohcist.transfer_descriptor.ec = 0;
- if ((remain == mps) || (mps == 0)) {
+ retire = false;
+ if ((done == mps) && (done == remain)) {
+ retire = true;
+ }
+ if ((done != mps) && (done <= remain))
+ retire = true;
+ if (done == 0)
+ retire = true;
+ if (retire == true) {
// retire transfer descriptor
a = ohcist.endpoint_descriptor.headp;
ohcist.endpoint_descriptor.headp = ohcist.transfer_descriptor.nexttd;
@@ -822,16 +833,53 @@ void xbox_base_state::usb_ohci_plug(int port, ohci_function_device *function)
}
}
-static USBStandardDeviceDscriptor devdesc = {18,1,0x201,0xff,0x34,0x56,64,0x100,0x101,0x301,0,0,0,1};
+static USBStandardDeviceDescriptor devdesc = {18,1,0x110,0x00,0x00,0x00,64,0x45e,0x202,0x100,0,0,0,1};
+static USBStandardConfigurationDescriptor condesc = {9,2,0x20,1,1,0,0x80,50};
+static USBStandardInterfaceDescriptor intdesc = {9,4,0,0,2,0x58,0x42,0,0};
+static USBStandardEndpointDescriptor enddesc82 = {7,5,0x82,3,0x20,4};
+static USBStandardEndpointDescriptor enddesc02 = {7,5,0x02,3,0x20,4};
-ohci_function_device::ohci_function_device()
+ohci_function_device::ohci_function_device(running_machine &machine)
{
+ descriptors = auto_alloc_array(machine, UINT8, 1024);
+ descriptors_pos = 0;
address = 0;
newaddress = 0;
controldirection = 0;
+ controltype = 0;
+ controlrecipient = 0;
remain = 0;
position = nullptr;
settingaddress = false;
+ add_device_descriptor(devdesc);
+ add_configuration_descriptor(condesc);
+ add_interface_descriptor(intdesc);
+ add_endpoint_descriptor(enddesc82);
+ add_endpoint_descriptor(enddesc02);
+}
+
+void ohci_function_device::add_device_descriptor(USBStandardDeviceDescriptor &descriptor)
+{
+ memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
+ descriptors_pos += sizeof(descriptor);
+}
+
+void ohci_function_device::add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor)
+{
+ memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
+ descriptors_pos += sizeof(descriptor);
+}
+
+void ohci_function_device::add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor)
+{
+ memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
+ descriptors_pos += sizeof(descriptor);
+}
+
+void ohci_function_device::add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor)
+{
+ memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor));
+ descriptors_pos += sizeof(descriptor);
}
void ohci_function_device::execute_reset()
@@ -868,11 +916,20 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
case GET_DESCRIPTOR:
if ((p->wValue >> 8) == DEVICE) { // device descriptor
//p->wValue & 255;
- position = (UINT8 *)&devdesc;
- remain = sizeof(devdesc);
+ position = descriptors;
+ remain = descriptors[0];
}
else if ((p->wValue >> 8) == CONFIGURATION) { // configuration descriptor
- remain = 0;
+ position = descriptors + 18;
+ remain = descriptors[18+2];
+ }
+ else if ((p->wValue >> 8) == INTERFACE) { // interface descriptor
+ position = descriptors + 18 + 9;
+ remain = descriptors[18 + 9];
+ }
+ else if ((p->wValue >> 8) == ENDPOINT) { // endpoint descriptor
+ position = descriptors + 18 + 9 + 9;
+ remain = descriptors[18 + 9 + 9];
}
if (remain > p->wLength)
remain = p->wLength;
@@ -887,6 +944,7 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
break;
}
}
+ size = 0;
}
else if (pid == InPid) {
// if no data has been transferred (except for the setup stage)
@@ -1588,6 +1646,10 @@ ADDRESS_MAP_END
void xbox_base_state::machine_start()
{
+#ifdef USB_ENABLED
+ ohci_function_device *usb_device;
+#endif
+
nvidia_nv2a = std::make_unique<nv2a_renderer>(machine());
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
pic16lc_buffer[0] = 'B';
@@ -1626,7 +1688,8 @@ void xbox_base_state::machine_start()
ohcist.space = &m_maincpu->space();
ohcist.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(xbox_base_state::usb_ohci_timer), this), (void *)"USB OHCI Timer");
ohcist.timer->enable(false);
- usb_ohci_plug(1, new ohci_function_device()); // test connect
+ usb_device = new ohci_function_device(machine());
+ usb_ohci_plug(1, usb_device); // test connect
#endif
memset(&superiost, 0, sizeof(superiost));
superiost.configuration_mode = false;
diff --git a/src/mame/mess.lst b/src/mame/mess.lst
index 5d885ff4781..fca9f76e047 100644
--- a/src/mame/mess.lst
+++ b/src/mame/mess.lst
@@ -2167,6 +2167,8 @@ fscc12
fexcel
fexcelv
+feagv2
+
// Hegener & Glaser Munich
//mephisto // Mephisto 1 - roms needed - not in driver
mm2 // Mephisto 2
diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp
index 845110e59b4..d1fab8ff46d 100644
--- a/src/mame/video/chihiro.cpp
+++ b/src/mame/video/chihiro.cpp
@@ -2552,6 +2552,7 @@ void nv2a_renderer::clear_depth_buffer(int what, UINT32 value)
UINT32 nv2a_renderer::render_triangle_culling(const rectangle &cliprect, render_delegate callback, int paramcount, const vertex_t &_v1, const vertex_t &_v2, const vertex_t &_v3)
{
float areax2;
+ NV2A_GL_CULL_FACE face = NV2A_GL_CULL_FACE::FRONT;
if (backface_culling_enabled == false)
return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
@@ -2559,13 +2560,25 @@ UINT32 nv2a_renderer::render_triangle_culling(const rectangle &cliprect, render_
return 0;
areax2 = _v1.x*(_v2.y - _v3.y) + _v2.x*(_v3.y - _v1.y) + _v3.x*(_v1.y - _v2.y);
if (backface_culling_winding == NV2A_GL_FRONT_FACE::CCW)
- areax2 = -areax2;
- // if areax2 >= 0 then front faced else back faced
- if ((backface_culling_culled == NV2A_GL_CULL_FACE::FRONT) && (areax2 >= 0))
- return 0;
- if ((backface_culling_culled == NV2A_GL_CULL_FACE::BACK) && (areax2 < 0))
- return 0;
- return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
+ {
+ if (-areax2 <= 0)
+ face = NV2A_GL_CULL_FACE::BACK;
+ else
+ face = NV2A_GL_CULL_FACE::FRONT;
+ } else
+ {
+ if (areax2 <= 0)
+ face = NV2A_GL_CULL_FACE::BACK;
+ else
+ face = NV2A_GL_CULL_FACE::FRONT;
+ }
+ if (face == NV2A_GL_CULL_FACE::FRONT)
+ if (backface_culling_culled == NV2A_GL_CULL_FACE::BACK)
+ return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
+ if (face == NV2A_GL_CULL_FACE::BACK)
+ if (backface_culling_culled == NV2A_GL_CULL_FACE::FRONT)
+ return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3);
+ return 0;
}
int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen)
@@ -2580,6 +2593,16 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN
printf("A:%08X MTHD:%08X D:%08X\n\r",address,maddress,data);
#endif
if (maddress == 0x17fc) {
+#if 1 // useful while debugging to see what coordinates have been used
+ static int debugvc = 0;
+ if (debugvc)
+ if (data == 0)
+ {
+ //printf("%d %d\n\r", primitive_type, vertex_first);
+ for (int n = 0; n < vertex_first; n++)
+ printf("%d X:%f Y:%f Z:%f W:%f x:%f y:%f\n\r", n, vertex_software[n].attribute[0].fv[0], vertex_software[n].attribute[0].fv[1], vertex_software[n].attribute[0].fv[2], vertex_software[n].attribute[0].fv[3], vertex_xy[n].x, vertex_xy[n].y);
+ }
+#endif
vertex_count = 0;
vertex_first = 0;
indexesleft_count = 0;
diff --git a/src/mame/video/galpanic.cpp b/src/mame/video/galpanic.cpp
index 487a22aeefb..cf33cb88bdd 100644
--- a/src/mame/video/galpanic.cpp
+++ b/src/mame/video/galpanic.cpp
@@ -5,52 +5,45 @@
#include "includes/galpanic.h"
-VIDEO_START_MEMBER(galpanic_state,galpanic)
+void galpanic_state::video_start()
{
m_screen->register_screen_bitmap(m_bitmap);
+
+ save_item(NAME(m_bitmap));
}
PALETTE_INIT_MEMBER(galpanic_state,galpanic)
{
- int i;
-
/* first 1024 colors are dynamic */
/* initialize 555 RGB lookup */
- for (i = 0;i < 32768;i++)
+ for (int i = 0;i < 32768;i++)
palette.set_pen_color(i+1024,pal5bit(i >> 5),pal5bit(i >> 10),pal5bit(i >> 0));
}
-WRITE16_MEMBER(galpanic_state::galpanic_bgvideoram_w)
+WRITE16_MEMBER(galpanic_state::bgvideoram_w)
{
- int sx,sy;
-
-
data = COMBINE_DATA(&m_bgvideoram[offset]);
- sy = offset / 256;
- sx = offset % 256;
+ int sy = offset / 256;
+ int sx = offset % 256;
m_bitmap.pix16(sy, sx) = 1024 + (data >> 1);
}
void galpanic_state::draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- int offs;
-
- for (offs = 0;offs < m_fgvideoram.bytes()/2;offs++)
+ for (int offs = 0;offs < m_fgvideoram.bytes()/2;offs++)
{
- int sx,sy,color;
-
- sx = offs % 256;
- sy = offs / 256;
- color = m_fgvideoram[offs];
+ int sx = offs % 256;
+ int sy = offs / 256;
+ int color = m_fgvideoram[offs];
if (color)
bitmap.pix16(sy, sx) = color;
}
}
-UINT32 galpanic_state::screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+UINT32 galpanic_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* copy the temporary bitmap to the screen */
copybitmap(bitmap,m_bitmap,0,0,0,0,cliprect);
diff --git a/src/mame/video/x68k.cpp b/src/mame/video/x68k.cpp
index 13f6288b642..7a11c89175b 100644
--- a/src/mame/video/x68k.cpp
+++ b/src/mame/video/x68k.cpp
@@ -867,7 +867,7 @@ bool x68k_state::x68k_draw_gfx_scanline( bitmap_ind16 &bitmap, rectangle cliprec
else
bitmap.pix16(scanline, pixel) = (pal[colour] & 0xfffe) + blend;
}
- if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1))
+ else if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1))
m_special.pix16(scanline, pixel) = colour;
else
bitmap.pix16(scanline, pixel) = colour;
diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h
index be4f016f0f9..3145a784c42 100644
--- a/src/osd/modules/osdwindow.h
+++ b/src/osd/modules/osdwindow.h
@@ -37,7 +37,9 @@ public:
#else
m_hwnd(0), m_dc(0), m_focus_hwnd(0), m_resize_state(0),
#endif
- m_primlist(NULL),
+ m_primlist(nullptr),
+ m_index(0),
+ m_main(nullptr),
m_prescale(1)
{}
virtual ~osd_window() { }
@@ -78,6 +80,8 @@ public:
render_primitive_list *m_primlist;
osd_window_config m_win_config;
+ int m_index;
+ osd_window *m_main;
protected:
int m_prescale;
};
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 8f0bc447d6e..35a50609cf4 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -60,10 +60,8 @@ class renderer_bgfx : public osd_renderer
{
public:
renderer_bgfx(osd_window *w)
- : osd_renderer(w, FLAG_NONE), m_blittimer(0),
- m_blit_dim(0, 0),
- m_last_hofs(0), m_last_vofs(0),
- m_last_blit_time(0), m_last_blit_pixels(0)
+ : osd_renderer(w, FLAG_NONE),
+ m_dimensions(0,0)
{}
virtual int create() override;
@@ -78,41 +76,18 @@ public:
virtual void destroy() override;
virtual render_primitive_list *get_primitives() override
{
-#ifdef OSD_WINDOWS
- RECT client;
- GetClientRect(window().m_hwnd, &client);
- window().target()->set_bounds(rect_width(&client), rect_height(&client), window().aspect());
- return &window().target()->get_primitives();
-#else
osd_dim wdim = window().get_size();
window().target()->set_bounds(wdim.width(), wdim.height(), window().aspect());
return &window().target()->get_primitives();
-#endif
}
- // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
-
- //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
- //texture_info *texture_update(const render_primitive &prim);
-
- INT32 m_blittimer;
-
- //simple_list<texture_info> m_texlist; // list of active textures
-
- osd_dim m_blit_dim;
- float m_last_hofs;
- float m_last_vofs;
-
- // Stats
- INT64 m_last_blit_time;
- INT64 m_last_blit_pixels;
-
bgfx::ProgramHandle m_progQuad;
bgfx::ProgramHandle m_progQuadTexture;
bgfx::ProgramHandle m_progLine;
bgfx::UniformHandle m_s_texColor;
-
+ bgfx::FrameBufferHandle fbh;
// Original display_mode
+ osd_dim m_dimensions;
};
@@ -152,39 +127,68 @@ int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks)
static void drawbgfx_exit(void)
{
+ // Shutdown bgfx.
+ bgfx::shutdown();
}
//============================================================
// renderer_bgfx::create
//============================================================
bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName);
+
+
+#ifdef OSD_SDL
+static void* sdlNativeWindowHandle(SDL_Window* _window)
+{
+ SDL_SysWMinfo wmi;
+ SDL_VERSION(&wmi.version);
+ if (!SDL_GetWindowWMInfo(_window, &wmi))
+ {
+ return NULL;
+ }
+
+# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
+ return (void*)wmi.info.x11.window;
+# elif BX_PLATFORM_OSX
+ return wmi.info.cocoa.window;
+# elif BX_PLATFORM_WINDOWS
+ return wmi.info.win.window;
+# endif // BX_PLATFORM_
+}
+#endif
+
int renderer_bgfx::create()
{
// create renderer
+ osd_dim wdim = window().get_size();
+ if (window().m_index == 0)
+ {
#ifdef OSD_WINDOWS
- RECT client;
- GetClientRect(window().m_hwnd, &client);
-
- bgfx::winSetHwnd(window().m_hwnd);
- bgfx::init();
- bgfx::reset(rect_width(&client), rect_height(&client), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ bgfx::winSetHwnd(window().m_hwnd);
#else
- osd_dim wdim = window().get_size();
- bgfx::sdlSetWindow(window().sdl_window());
- bgfx::init();
- bgfx::reset(wdim.width(), wdim.height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ bgfx::sdlSetWindow(window().sdl_window());
#endif
-
- // Enable debug text.
- bgfx::setDebug(BGFX_DEBUG_TEXT); //BGFX_DEBUG_STATS
+ bgfx::init();
+ bgfx::reset(wdim.width(), wdim.height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ // Enable debug text.
+ bgfx::setDebug(BGFX_DEBUG_TEXT); //BGFX_DEBUG_STATS
+ m_dimensions = osd_dim(wdim.width(), wdim.height());
+ }
+ else {
+#ifdef OSD_WINDOWS
+ fbh = bgfx::createFrameBuffer(window().m_hwnd, wdim.width(), wdim.height());
+#else
+ fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), wdim.width(), wdim.height());
+#endif
+ bgfx::touch(window().m_index);
+ }
// Create program from shaders.
m_progQuad = loadProgram("vs_quad", "fs_quad");
m_progQuadTexture = loadProgram("vs_quad_texture", "fs_quad_texture");
m_progLine = loadProgram("vs_line", "fs_line");
m_s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
- osd_printf_verbose("Leave drawsdl2_window_create\n");
return 0;
}
@@ -194,18 +198,15 @@ int renderer_bgfx::create()
void renderer_bgfx::destroy()
{
- // free the memory in the window
-
- // destroy_all_textures();
- //
+ if (window().m_index > 0)
+ {
+ bgfx::destroyFrameBuffer(fbh);
+ }
bgfx::destroyUniform(m_s_texColor);
// Cleanup.
bgfx::destroyProgram(m_progQuad);
bgfx::destroyProgram(m_progQuadTexture);
bgfx::destroyProgram(m_progLine);
-
- // Shutdown bgfx.
- bgfx::shutdown();
}
@@ -216,11 +217,11 @@ void renderer_bgfx::destroy()
#ifdef OSD_SDL
int renderer_bgfx::xy_to_render_target(int x, int y, int *xt, int *yt)
{
- *xt = x - m_last_hofs;
- *yt = y - m_last_vofs;
- if (*xt<0 || *xt >= m_blit_dim.width())
+ *xt = x;
+ *yt = y;
+ if (*xt<0 || *xt >= m_dimensions.width())
return 0;
- if (*yt<0 || *yt >= m_blit_dim.height())
+ if (*yt<0 || *yt >= m_dimensions.height())
return 0;
return 1;
}
@@ -738,23 +739,48 @@ static inline void copyline_yuy16_to_argb(UINT32 *dst, const UINT16 *src, int wi
}
int renderer_bgfx::draw(int update)
{
- initVertexDecls();
-
+ initVertexDecls();
+ int index = window().m_index;
// Set view 0 default viewport.
- int width, height;
+ osd_dim wdim = window().get_size();
+ int width = wdim.width();
+ int height = wdim.height();
+ if (index == 0)
+ {
+ if ((m_dimensions != osd_dim(width, height))) {
+ bgfx::reset(width, height, video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ m_dimensions = osd_dim(width, height);
+ }
+ }
+ else {
+ if ((m_dimensions != osd_dim(width, height))) {
+ bgfx::reset(window().m_main->get_size().width(), window().m_main->get_size().height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ if (bgfx::isValid(fbh))
+ {
+ bgfx::destroyFrameBuffer(fbh);
+ }
#ifdef OSD_WINDOWS
- RECT client;
- GetClientRect(window().m_hwnd, &client);
- width = rect_width(&client);
- height = rect_height(&client);
+ fbh = bgfx::createFrameBuffer(window().m_hwnd, width, height);
#else
- osd_dim wdim = window().get_size();
- width = wdim.width();
- height = wdim.height();
+ fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), width, height);
#endif
- bgfx::setViewSeq(0, true);
- bgfx::setViewRect(0, 0, 0, width, height);
- bgfx::reset(width, height, video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
+ bgfx::setViewFrameBuffer(index, fbh);
+ m_dimensions = osd_dim(width, height);
+ bgfx::setViewClear(index
+ , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH
+ , 0x000000ff
+ , 1.0f
+ , 0
+ );
+ bgfx::touch(index);
+ bgfx::frame();
+ return 0;
+ }
+ }
+ if (index != 0) bgfx::setViewFrameBuffer(index, fbh);
+ bgfx::setViewSeq(index, true);
+ bgfx::setViewRect(index, 0, 0, width, height);
+
// Setup view transform.
{
float view[16];
@@ -766,9 +792,9 @@ int renderer_bgfx::draw(int update)
float bottom = height;
float proj[16];
bx::mtxOrtho(proj, left, right, bottom, top, 0.0f, 100.0f);
- bgfx::setViewTransform(0, view, proj);
+ bgfx::setViewTransform(index, view, proj);
}
- bgfx::setViewClear(0
+ bgfx::setViewClear(index
, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH
, 0x000000ff
, 1.0f
@@ -777,7 +803,7 @@ int renderer_bgfx::draw(int update)
// This dummy draw call is here to make sure that view 0 is cleared
// if no other draw calls are submitted to view 0.
- bgfx::touch(0);
+ bgfx::touch(index);
window().m_primlist->acquire_lock();
// Draw quad.
@@ -815,7 +841,7 @@ int renderer_bgfx::draw(int update)
u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255),
1.0f);
bgfx::setState(flags);
- bgfx::submit(0, m_progLine);
+ bgfx::submit(index, m_progLine);
break;
case render_primitive::QUAD:
@@ -826,7 +852,7 @@ int renderer_bgfx::draw(int update)
screenQuad(prim->bounds.x0, prim->bounds.y0, prim->bounds.x1, prim->bounds.y1,
u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255), uv);
bgfx::setState(flags);
- bgfx::submit(0, m_progQuad);
+ bgfx::submit(index, m_progQuad);
}
else {
screenQuad(prim->bounds.x0, prim->bounds.y0, prim->bounds.x1, prim->bounds.y1,
@@ -926,7 +952,7 @@ int renderer_bgfx::draw(int update)
}
bgfx::setTexture(0, m_s_texColor, m_texture);
bgfx::setState(flags);
- bgfx::submit(0, m_progQuadTexture);
+ bgfx::submit(index, m_progQuadTexture);
bgfx::destroyTexture(m_texture);
}
break;
@@ -939,7 +965,7 @@ int renderer_bgfx::draw(int update)
window().m_primlist->release_lock();
// Advance to next frame. Rendering thread will be kicked to
// process submitted rendering primitives.
- bgfx::frame();
+ if (index==0) bgfx::frame();
return 0;
}
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 47ab3cdd162..85f945874d9 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -1269,6 +1269,18 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt )
SDL_WM_SetCaption(window->m_title, "SDLMAME");
#endif
+ // set main window
+ if (window->m_index > 0)
+ {
+ for (auto w = sdl_window_list; w != NULL; w = w->m_next)
+ {
+ if (w->m_index == 0)
+ {
+ window->m_main = w;
+ break;
+ }
+ }
+ }
window->monitor()->refresh();
// initialize the drawing backend
if (window->renderer().create())
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index 3de110fe536..c890b6c0ff2 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -52,7 +52,7 @@ public:
#else
m_sdlsurf(NULL),
#endif
- m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0), m_index(0)
+ m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0)
{
m_win_config = *config;
m_index = index;
@@ -165,7 +165,6 @@ private:
// monitor info
osd_monitor_info * m_monitor;
int m_fullscreen;
- int m_index;
osd_renderer * m_renderer;
// static callbacks ...
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index dd219949534..f39199d7b50 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -659,7 +659,20 @@ void win_window_info::create(running_machine &machine, int index, osd_monitor_in
window->m_win_config = *config;
window->m_monitor = monitor;
window->m_fullscreen = !video_config.windowed;
+ window->m_index = index;
+ // set main window
+ if (index > 0)
+ {
+ for (auto w = win_window_list; w != NULL; w = w->m_next)
+ {
+ if (w->m_index == 0)
+ {
+ window->m_main = w;
+ break;
+ }
+ }
+ }
// see if we are safe for fullscreen
window->m_fullscreen_safe = TRUE;
for (win = win_window_list; win != NULL; win = win->m_next)