From 3c9876aec682ea2933b7da8df9128b4e79e53300 Mon Sep 17 00:00:00 2001 From: mzdmommy Date: Sun, 22 Feb 2015 17:18:43 -0500 Subject: updated opwolf dipswitches added unknown dipswitch description from manual --- src/mame/drivers/opwolf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 40bdbeebdcb..909186505e7 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -568,7 +568,9 @@ static INPUT_PORTS_START( opwolf ) PORT_DIPSETTING( 0x08, "7" ) PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) - PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x40, 0x00, "Discount When Continuing" ) + PORT_DIPSETTING( 0x40, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) ) PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) PORT_DIPSETTING( 0x00, DEF_STR( English ) ) -- cgit v1.2.3 From 86e4280b38554a98dc7e18dddf3443efee7eabc7 Mon Sep 17 00:00:00 2001 From: Guru Date: Mon, 23 Feb 2015 16:37:26 +0800 Subject: opwolf.c: added some DIP locations --- src/mame/drivers/opwolf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 909186505e7..3ba1b3088ca 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -551,8 +551,8 @@ ADDRESS_MAP_END static INPUT_PORTS_START( opwolf ) /* 0x380000 -> 0x0ff028 (-$fd8,A5) (C-chip) */ PORT_START("DSWA") - PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) ) + PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x02, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) TAITO_DSWA_BITS_2_TO_3 @@ -561,17 +561,17 @@ static INPUT_PORTS_START( opwolf ) /* 0x380002 -> 0x0ff02a (-$fd6,A5) (C-chip) */ PORT_START("DSWB") TAITO_DIFFICULTY - PORT_DIPNAME( 0x0c, 0x0c, "Ammo Magazines at Start" ) + PORT_DIPNAME( 0x0c, 0x0c, "Ammo Magazines at Start" ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x04, "5" ) PORT_DIPSETTING( 0x0c, "6" ) PORT_DIPSETTING( 0x08, "7" ) - PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) - PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x40, 0x00, "Discount When Continuing" ) + PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) + PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW2:6" ) + PORT_DIPNAME( 0x40, 0x00, "Discount When Continuing" ) PORT_DIPLOCATION("SW2:7") PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) PORT_DIPSETTING( 0x00, DEF_STR( English ) ) -- cgit v1.2.3 From d8b55c32ac743200cf64079ba92ca23a041ac624 Mon Sep 17 00:00:00 2001 From: Guru Date: Mon, 23 Feb 2015 16:43:36 +0800 Subject: oops ;-) --- src/mame/drivers/opwolf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 3ba1b3088ca..195f129922a 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -567,7 +567,7 @@ static INPUT_PORTS_START( opwolf ) PORT_DIPSETTING( 0x0c, "6" ) PORT_DIPSETTING( 0x08, "7" ) PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:5" ) - PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW2:6" ) + PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:6" ) PORT_DIPNAME( 0x40, 0x00, "Discount When Continuing" ) PORT_DIPLOCATION("SW2:7") PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) -- cgit v1.2.3 From 9af1c4c43626db2b7696c6a882fac8fa6677e508 Mon Sep 17 00:00:00 2001 From: Guru Date: Mon, 23 Feb 2015 17:49:15 +0800 Subject: opwolf.c: added the remaining DIP locations to Operation Wolf --- src/mame/drivers/opwolf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 195f129922a..3d969d47038 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -555,12 +555,15 @@ static INPUT_PORTS_START( opwolf ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x02, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - TAITO_DSWA_BITS_2_TO_3 - TAITO_COINAGE_WORLD + PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SW1:3") + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + TAITO_COINAGE_WORLD_LOC(SW1) /* 0x380002 -> 0x0ff02a (-$fd6,A5) (C-chip) */ PORT_START("DSWB") - TAITO_DIFFICULTY + TAITO_DIFFICULTY_LOC(SW2) PORT_DIPNAME( 0x0c, 0x0c, "Ammo Magazines at Start" ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x04, "5" ) -- cgit v1.2.3 From 74cf9b2261ecdf249f7fbe7c03a1ac5a8e3a8505 Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Mon, 23 Feb 2015 12:37:18 +0200 Subject: notes (nw) --- src/mame/drivers/triforce.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/triforce.c b/src/mame/drivers/triforce.c index 23f77b52533..0e92df4fdc8 100644 --- a/src/mame/drivers/triforce.c +++ b/src/mame/drivers/triforce.c @@ -58,12 +58,14 @@ Games on this system include.... | | 2004 | The Key Of Avalon 1.??: ??? (client) (Rev B) | Sega / Hitmaker | GDROM | GDT-0010B | | | |*| 2004 | The Key Of Avalon 1.30: Chaotic Sabbat (client) (Rev C) | Sega / Hitmaker | GDROM | GDT-0010C | | | |*| 2004 | Firmware Update | Sega | GDROM | GDT-0011 | 317-0371-JPN | | +| | 2004 | Virtua Striker 2002 (Export) | Sega | GDROM | GDT-0012 | | | | | 2004 | Virtua Striker 4 (Japan) | Sega | GDROM | GDT-0013 | 317-0391-JPN | | | | 2004 | Virtua Striker 4 (Japan) (Rev A) | Sega | GDROM | GDT-0013A | 317-0391-JPN | | | | 2004 | Virtua Striker 4 (Japan) (Rev B) | Sega | GDROM | GDT-0013B | 317-0391-JPN | | | | 2004 | Virtua Striker 4 (Japan) (Rev C) | Sega | GDROM | GDT-0013C | 317-0391-JPN | | | | 2004 | Virtua Striker 4 (Japan) (Rev D) | Sega | GDROM | GDT-0013D | 317-0391-JPN | | |*| 2004 | Virtua Striker 4 (Japan) (Rev E) | Sega | GDROM | GDT-0013E | 317-0391-JPN | | +| | 2004 | Virtua Striker 4 (Export) | Sega | GDROM | GDT-0014 | | | |*| 2004 | Virtua Striker 4 (Export) | Sega | GDROM | GDT-0015 | 317-0393-EXP | | | | 2004 | The Key Of Avalon 2: Eutaxy Commandment (server) | Sega / Hitmaker | GDROM | GDT-0016 | | | | | 2004 | The Key Of Avalon 2: Eutaxy Commandment (client) | Sega / Hitmaker | GDROM | GDT-0017 | | | @@ -73,7 +75,8 @@ Games on this system include.... | | 2005 | Donkey Kong Jungle Fever | Namco / Nintendo | Cart | | | | |*| 2005 | Mario Kart Arcade GP (MKA1 Ver.A1) | Namco / Nintendo | Cart | 837-14343-4T1 | 317-5109-COM | 253-5509-5109 | |*| 2005 | Mario Kart Arcade GP (MKA2 Ver.B) | Namco / Nintendo | Cart | 837-14343-R4S0 | 317-5109-COM | 253-5509-5109 | -| | 2005 | The Key Of Avalon 2.5: War of the Key | Sega / Hitmaker | GDROM | | | | +| | 2005 | The Key Of Avalon 2.5: War of the Key (server) | Sega / Hitmaker | GDROM | GDT-0019B | | | +| | 2005 | The Key Of Avalon 2.5: War of the Key (client) | Sega / Hitmaker | GDROM | | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) | Sega | GDROM | GDT-0020 | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) (Rev A) | Sega | GDROM | GDT-0020A | | | | | 2006 | Virtua Striker 4 Ver.2006 (Japan) (Rev B) | Sega | GDROM | GDT-0020B | | | -- cgit v1.2.3 From 528faa2524560d9f41a864c03435db0ffdc06f09 Mon Sep 17 00:00:00 2001 From: MetalliC <0vetal0@gmail.com> Date: Mon, 23 Feb 2015 12:42:06 +0200 Subject: chihiro.c update New clone added Ghost Squad (GDX-0012) [Ripper006] redumped outr2/gdx-0004a, wangmid/gdx-0009b [Ripper006] --- src/mame/drivers/chihiro.c | 46 +++++++++++++++++++++++++++++++--------------- src/mame/mame.lst | 4 ++-- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c index a95c47ff57e..089edc972f5 100644 --- a/src/mame/drivers/chihiro.c +++ b/src/mame/drivers/chihiro.c @@ -21,7 +21,7 @@ Games on this system include.... |*| 2004 | Sega Network Taisen Mahjong MJ 2 (Rev C) | Sega | GDROM | GDX-0006C | | | | 2004 | Sega Network Taisen Mahjong MJ 2 (Rev D) | Sega | GDROM | GDX-0006D | | | | 2005 | Sega Network Taisen Mahjong MJ 2 (Rev E) | Sega | GDROM | GDX-0006E | | -| | 2005 | Sega Network Taisen Mahjong MJ 2 (Rev F) | Sega | GDROM | GDX-0006F | | +|*| 2005 | Sega Network Taisen Mahjong MJ 2 (Rev F) | Sega | GDROM | GDX-0006F | | |*| 2005 | Sega Network Taisen Mahjong MJ 2 (Rev G) | Sega | GDROM | GDX-0006G | 317-0374-JPN | |*| 2004 | Ollie King | Sega / Amusement Vision | GDROM | GDX-0007 | 317-0377-COM | | | 2004 | Wangan Midnight Maximum Tune (Japan) | Namco | GDROM | GDX-0008 | 317-5101-JPN | @@ -31,7 +31,7 @@ Games on this system include.... | | 2004 | Wangan Midnight Maximum Tune (Export) (Rev A) | Namco | GDROM | GDX-0009A | 317-5101-COM | |*| 2004 | Wangan Midnight Maximum Tune (Export) (Rev B) | Namco | GDROM | GDX-0009B | 317-5101-COM | | | 2004 | Outrun 2 SP (Japan) | Sega | GDROM | GDX-0011 | | -| | 2004 | Ghost Squad | Sega | GDROM | GDX-0012 | 317-0398-COM | +|*| 2004 | Ghost Squad | Sega | GDROM | GDX-0012 | 317-0398-COM | |*| 2004 | Ghost Squad (Rev A) | Sega | GDROM | GDX-0012A | 317-0398-COM | |*| 2005 | Gundam Battle Operating Simulator | Banpresto | GDROM | GDX-0013 | 317-0400-JPN | | | 2004 | Outrun 2 Special Tours | Sega | GDROM | GDX-0014 | 317-0xxx-COM | @@ -1906,8 +1906,6 @@ track03.bin 45150 549299 1185760800 PIC 253-5508-0348 317-0348-com -BFN.BIN -a8 0b f8 f2 b9 20 b9 97 */ ROM_START( hotd3 ) CHIHIRO_BIOS @@ -1967,7 +1965,7 @@ track03.bin 45150 549299 1185760800 PIC 255-5508-354 -317-054-COM +317-0354-COM */ ROM_START( vcop3 ) CHIHIRO_BIOS @@ -1983,7 +1981,7 @@ ROM_START( outr2 ) CHIHIRO_BIOS DISK_REGION( "gdrom" ) - DISK_IMAGE_READONLY( "gdx-0004a", 0, BAD_DUMP SHA1(27acd2d0680e6bafa0d052f60b4372adc37224fd) ) + DISK_IMAGE_READONLY( "gdx-0004a", 0, SHA1(055a13a5dc4f54e6b6bdf5ce29dbda14cc9741d7) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) ROM_LOAD("317-0372-com.data", 0x00, 0x50, CRC(a15c9666) SHA1(fd36c524744acb33e579ccb257c71375a5d3af67) ) @@ -1999,6 +1997,16 @@ ROM_START( mj2c ) ROM_LOAD("317-0374-jpn.data", 0x00, 0x50, NO_DUMP ) ROM_END +ROM_START( mj2f ) + CHIHIRO_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdx-0006f", 0, SHA1(d3900ca5135f9001e642c78b4d323d353880b41b) ) + + ROM_REGION( 0x50, "pic", ROMREGION_ERASE) // key was missing + ROM_LOAD("317-0374-jpn.data", 0x00, 0x50, NO_DUMP ) +ROM_END + /* Title MJ2 Media ID 3580 @@ -2039,12 +2047,22 @@ ROM_START( wangmid ) CHIHIRO_BIOS DISK_REGION( "gdrom" ) - DISK_IMAGE_READONLY( "gdx-0009b", 0, BAD_DUMP SHA1(e032b9fd8d5d09255592f02f7531a608e8179c9c) ) + DISK_IMAGE_READONLY( "gdx-0009b", 0, SHA1(6fcbebb95b53eaabbc5da6ee08fbe15c2922b8d4) ) ROM_REGION( 0x50, "pic", ROMREGION_ERASE) ROM_LOAD("317-5101-com.data", 0x00, 0x50, CRC(3af801f3) SHA1(e9a2558930f3f1f55d5b3c2cadad69329d931f26) ) ROM_END +ROM_START( ghostsqo ) + CHIHIRO_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdx-0012", 0, SHA1(ad5d08cc3b8cfd0890feb152670b429c28659512) ) + + ROM_REGION( 0x50, "pic", ROMREGION_ERASE) + ROM_LOAD("317-0398-com.data", 0x00, 0x50, CRC(8c5391a2) SHA1(e64cadeb30c94c3cd4002630cd79cc76c7bde2ed) ) +ROM_END + /* Title GHOST SQUAD Media ID 004F @@ -2156,10 +2174,6 @@ Track Start Sector End Sector Track Size track01.bin 150 8740 20206032 track02.raw 8891 10242 3179904 track03.bin 45150 549299 1185760800 - -PIC16C621A () -Sticker: 235-5508-0567 -VER0001, TEST_OK, BRN.BIN, '70 1F 71 1F' D96446469BDCE9C1 */ ROM_START( ccfboxa ) CHIHIRO_BIOS @@ -2167,8 +2181,10 @@ ROM_START( ccfboxa ) DISK_REGION( "gdrom" ) DISK_IMAGE_READONLY( "gdx-0024a", 0, SHA1(79d8c0faeec7cf6882f014760b8af938800b7e52) ) - ROM_REGION( 0x50, "pic", ROMREGION_ERASE) - ROM_LOAD("317-0567-exp.data", 0x00, 0x50, NO_DUMP ) + ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) + //PIC16C621A (317-0567-EXP) + //(sticker 253-5508-0567) + ROM_LOAD("317-0567-exp.pic", 0x00, 0x4000, CRC(cd1d2b2d) SHA1(78203ee0339f76eb76da08d7de43e7e44e4b7d32) ) ROM_END @@ -2191,7 +2207,7 @@ ROM_END /* 0006C */ GAME( 2004, mj2c, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev C) (GDX-0006C)", GAME_NO_SOUND|GAME_NOT_WORKING ) // 0006D GAME( 2004, mj2d, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev D) (GDX-0006D)", GAME_NO_SOUND|GAME_NOT_WORKING ) // 0006E GAME( 2004, mj2e, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev E) (GDX-0006E)", GAME_NO_SOUND|GAME_NOT_WORKING ) -// 0006F GAME( 2004, mj2f, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", GAME_NO_SOUND|GAME_NOT_WORKING ) +/* 0006F */ GAME( 2004, mj2f, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", GAME_NO_SOUND|GAME_NOT_WORKING ) /* 0006G */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", GAME_NO_SOUND|GAME_NOT_WORKING ) /* 0007 */ GAME( 2004, ollie, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Amusement Vision", "Ollie King (GDX-0007)", GAME_NO_SOUND|GAME_NOT_WORKING ) // 0008 GAME( 2004, wangmdjo, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (GDX-0008)", GAME_NO_SOUND|GAME_NOT_WORKING ) @@ -2202,7 +2218,7 @@ ROM_END /* 0009B */ GAME( 2004, wangmid, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Export) (Rev B) (GDX-0009B)", GAME_NO_SOUND|GAME_NOT_WORKING ) // 0010 // 0011 GAME( 2004, outr2sp, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Out Run 2 SP (Japan) (GDX-0011)", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_SUPPORTS_SAVE ) -// 0012 GAME( 2004, ghostsqo, ghostsqu, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Ghost Squad (GDX-0012)", GAME_NO_SOUND|GAME_NOT_WORKING ) +/* 0012 */ GAME( 2004, ghostsqo, ghostsqu, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Ghost Squad (GDX-0012)", GAME_NO_SOUND|GAME_NOT_WORKING ) /* 0012A */ GAME( 2004, ghostsqu, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Ghost Squad (Rev A) (GDX-0012A)", GAME_NO_SOUND|GAME_NOT_WORKING ) /* 0013 */ GAME( 2005, gundamos, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Banpresto", "Gundam Battle Operating Simulator (GDX-0013)", GAME_NO_SOUND|GAME_NOT_WORKING ) // 0014 GAME( 2004, outr2sto, outr2st, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Out Run 2 Special Tours (GDX-0014)", GAME_NO_SOUND|GAME_NOT_WORKING ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 25d2a3ed98f..16cf9c6727a 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -5680,7 +5680,7 @@ ollie // 2004.03 Ollie King wangmid // 2004.07 Wangan Midnight Maximum Tune (export) (Rev B) // 2004.09 Quest of D // 2004.11 Sega Golf Club Network Pro Tour - // 2004.12 Ghost Squad +ghostsqo // 2004.12 Ghost Squad // 2004.12 Quest of D Ver.1.01C // 2004.12 Quest of D Ver.1.02 // 2004.12 Quest of D Ver.1.10 @@ -5692,7 +5692,7 @@ 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) - // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F) +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 -- cgit v1.2.3 From f9f4fac2029550599b4557156f09405d0b9939c0 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Feb 2015 13:38:20 +0100 Subject: added GAME_REQUIRES_ARTWORK flag --- src/mame/drivers/namcos2.c | 6 +++--- src/mess/drivers/alnchase.c | 2 +- src/mess/drivers/edracula.c | 2 +- src/mess/drivers/tmtennis.c | 2 +- src/mess/drivers/wildfire.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/namcos2.c b/src/mame/drivers/namcos2.c index a5e0469fa03..c7ef21134d1 100644 --- a/src/mame/drivers/namcos2.c +++ b/src/mame/drivers/namcos2.c @@ -5565,7 +5565,7 @@ GAME( 1990, dsaberj, dsaber, default3, default, namcos2_state, dsaberj, R GAMEL(1990, finalap2, 0, finallap, finallap, namcos2_state, finalap2, ROT0, "Namco", "Final Lap 2", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND, layout_finallap ) GAMEL(1990, finalap2j, finalap2, finallap, finallap, namcos2_state, finalap2, ROT0, "Namco", "Final Lap 2 (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND, layout_finallap ) -GAME( 1990, gollygho, 0, gollygho, gollygho, namcos2_state, gollygho, ROT180, "Namco", "Golly! Ghost!", 0 ) +GAME( 1990, gollygho, 0, gollygho, gollygho, namcos2_state, gollygho, ROT180, "Namco", "Golly! Ghost!", GAME_REQUIRES_ARTWORK ) GAME( 1990, rthun2, 0, default3, default, namcos2_state, rthun2, ROT0, "Namco", "Rolling Thunder 2", 0 ) GAME( 1990, rthun2j, rthun2, default3, default, namcos2_state, rthun2j, ROT0, "Namco", "Rolling Thunder 2 (Japan)", 0 ) @@ -5579,7 +5579,7 @@ GAME( 1991, sgunner2j, sgunner2, sgunner2, sgunner2, namcos2_state, sgunner2, R GAME( 1991, cosmogng, 0, default, default, namcos2_state, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (US)", 0 ) GAME( 1991, cosmogngj, cosmogng, default, default, namcos2_state, cosmogng, ROT90, "Namco", "Cosmo Gang the Video (Japan)", 0 ) -GAME( 1992, bubbletr, 0, gollygho, bubbletr, namcos2_state, bubbletr, ROT180, "Namco", "Bubble Trouble (Japan, Rev C)", GAME_IMPERFECT_GRAPHICS ) /* missing external artwork */ +GAME( 1992, bubbletr, 0, gollygho, bubbletr, namcos2_state, bubbletr, ROT180, "Namco", "Bubble Trouble (Japan, Rev C)", GAME_REQUIRES_ARTWORK ) GAMEL(1992, finalap3, 0, finallap, finalap3, namcos2_state, finalap3, ROT0, "Namco", "Final Lap 3 (World, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND, layout_finallap ) GAMEL(1992, finalap3a, finalap3, finallap, finalap3, namcos2_state, finalap3, ROT0, "Namco", "Final Lap 3 (World, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND, layout_finallap ) @@ -5590,7 +5590,7 @@ GAMEL(1992, finalap3bl, finalap3, finallap, finalap3, namcos2_state, finalap3, R GAME( 1992, luckywld, 0, luckywld, luckywld, namcos2_state, luckywld, ROT0, "Namco", "Lucky & Wild", 0 ) GAME( 1992, luckywldj, luckywld, luckywld, luckywld, namcos2_state, luckywld, ROT0, "Namco", "Lucky & Wild (Japan)", 0 ) -GAME( 1992, suzuka8h, 0, luckywld, suzuka, namcos2_state, suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (World, Rev C)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND) +GAME( 1992, suzuka8h, 0, luckywld, suzuka, namcos2_state, suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (World, Rev C)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1992, suzuka8hj, suzuka8h, luckywld, suzuka, namcos2_state, suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (Japan, Rev B)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1992, sws, 0, default, default, namcos2_state, sws, ROT0, "Namco", "Super World Stadium (Japan)", 0 ) diff --git a/src/mess/drivers/alnchase.c b/src/mess/drivers/alnchase.c index 389a6669632..28cd542e2d7 100644 --- a/src/mess/drivers/alnchase.c +++ b/src/mess/drivers/alnchase.c @@ -238,4 +238,4 @@ ROM_START( alnchase ) ROM_END -CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING ) +CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) diff --git a/src/mess/drivers/edracula.c b/src/mess/drivers/edracula.c index 7eafa9ac868..b6e0eb8da48 100644 --- a/src/mess/drivers/edracula.c +++ b/src/mess/drivers/edracula.c @@ -188,4 +188,4 @@ ROM_START( edracula ) ROM_END -CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_SUPPORTS_SAVE ) +CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) diff --git a/src/mess/drivers/tmtennis.c b/src/mess/drivers/tmtennis.c index 13ed07bfce0..ffece57a31b 100644 --- a/src/mess/drivers/tmtennis.c +++ b/src/mess/drivers/tmtennis.c @@ -257,4 +257,4 @@ ROM_START( tmtennis ) ROM_END -CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomytronic)", GAME_SUPPORTS_SAVE ) +CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) diff --git a/src/mess/drivers/wildfire.c b/src/mess/drivers/wildfire.c index e3b18d5e2d2..84d2e80be93 100644 --- a/src/mess/drivers/wildfire.c +++ b/src/mess/drivers/wildfire.c @@ -316,4 +316,4 @@ ROM_START( wildfire ) ROM_END -CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) // note: pretty sure that it matches the commercial release -- cgit v1.2.3 From 9c9a42e21a477c72cc5f081363b885f88a93c06d Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Feb 2015 13:42:37 +0100 Subject: this one is also barely playable without ext. artwork (also removed old obsolete note) --- src/mame/drivers/triplhnt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mame/drivers/triplhnt.c b/src/mame/drivers/triplhnt.c index 794500cc465..e903f0c4dbe 100644 --- a/src/mame/drivers/triplhnt.c +++ b/src/mame/drivers/triplhnt.c @@ -4,10 +4,6 @@ Atari Triple Hunt Driver Calibrate controls in service mode the first time you run this game. -To Do: - The 3 different overlays need to be found, scanned and added as artwork - to really make the game complete. - ***************************************************************************/ #include "emu.h" @@ -358,4 +354,4 @@ ROM_START( triplhnt ) ROM_END -GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, triplhnt, 0, "Atari", "Triple Hunt", 0 ) +GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, triplhnt, 0, "Atari", "Triple Hunt", GAME_REQUIRES_ARTWORK ) -- cgit v1.2.3 From 97d6571cfcd3815844f581db40f9634e81f0a8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 23 Feb 2015 13:55:28 +0100 Subject: disabled another Visual Studio warning (nw) --- src/osd/windows/vconv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c index db58268618e..01d6d8307b3 100644 --- a/src/osd/windows/vconv.c +++ b/src/osd/windows/vconv.c @@ -88,6 +88,7 @@ static const translation_info gcc_translate[] = // warning C4296: 'x' : expression is always false // warning C4306: 'xxx': conversion from 'type1' to 'type2' of greater size // 64-bit only // warning C4310: cast truncates constant value + // warning C4312: 'type cast' : conversion from 'xxx' to 'xxx' of greater size // warning C4324: 'xxx' : structure was padded due to __declspec(align()) // warning C4347: behavior change: 'xxx' is called instead of 'xxx' // obsolete VS2005 - VS2010 only // warning C4435: 'xxx' : Object layout under /vd2 will change due to virtual base 'xxx' @@ -109,7 +110,7 @@ static const translation_info gcc_translate[] = // warning C4805: 'x' : unsafe mix of type 'xxx' and type 'xxx' in operation // warning C4820: 'xxx' : 'x' bytes padding added after data member 'xxx' // warning C4826: Conversion from 'type1 ' to 'type_2' is sign-extended. This may cause unexpected runtime behavior. // 32-bit only - { VS7, "-Wall", "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4191 /wd4201 /wd4232 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4306 /wd4310 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4611 /wd4619 /wd4625 /wd4626 /wd4640 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" }, + { VS7, "-Wall", "/Wall /W4 /wd4003 /wd4018 /wd4061 /wd4100 /wd4127 /wd4131 /wd4141 /wd4146 /wd4150 /wd4189 /wd4191 /wd4201 /wd4232 /wd4242 /wd4244 /wd4250 /wd4255 /wd4296 /wd4306 /wd4310 /wd4312 /wd4324 /wd4347 /wd4435 /wd4510 /wd4512 /wd4514 /wd4571 /wd4610 /wd4611 /wd4619 /wd4625 /wd4626 /wd4640 /wd4668 /wd4702 /wd4706 /wd4710 /wd4711 /wd4805 /wd4820 /wd4826" }, { 0, "-Wall", "/W0" }, { VS7, "-Wno-unused", "/wd4100 /wd4101 /wd4102 /wd4505" }, { 0, "-Wno-sign-compare", "/wd4365 /wd4389 /wd4245 /wd4388" }, -- cgit v1.2.3 From f0847c500f120f1b96352f3568899a3f43a674c6 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Mon, 23 Feb 2015 15:57:39 +0100 Subject: added a few new dumps from Team Europe. credits will follow in a moment. nw. --- hash/pico.xml | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- hash/tutor.xml | 18 +++++++-- 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hash/pico.xml b/hash/pico.xml index 0968d286fe0..189bb62d198 100644 --- a/hash/pico.xml +++ b/hash/pico.xml @@ -14,7 +14,6 @@ with a lot of tweaks) Published by Sega/Sega Toys (HPC-6*** serial codes) * 超光戦士 シャンゼリオン - Chou Hikari Senshi Shanzerion (Sega - 1996xxxx - HPC-6038) -* パケット2 ゆかいな仲間とゲームで数遊び - Paketto 2 Yukai na Nakama to Game de Kazu Asobi (Sega - ???? - HPC-6048) * さわってみよう! よいこのはじめてキーボード - Sawattemiyou! Yoiko no Hajimete Keyboard (Sega - 199712xx - HPC-6053) * プーさんとたのしいなかまたち - Pooh-san to Tanoshii na Kamatachi (Sega - ???? - HPC-6054) * はじめまシリーズ5 けろけろけろっぴのハリキリうんどうかい - Hajimema Series 5 - Kerokero Keroppi no Harikiri Undoukai (Sega - 1998xxxx - HPC-6059) [reprint HPC-6006] @@ -45,7 +44,6 @@ Published by Sega/Sega Toys (HPC-6*** serial codes) * ディズニープリンセス 白雪姫 ~しらゆきひめ~ - Disney Princesses - Shirayukihime Best Selection (Sega Toys - 20040426 - HPC-6139) * 七田 眞 監修 右脳イメージトレーニング さんすう・えいごでモジャーズに挑戦 THE ARITHMETIC & ABC FIGHT VS MOJARS - Shichida Makoto Kanshuu Unou Image Training Sansuu - Eigo de Mojaazu ni Chousen THE ARITHMETIC & ABC FIGHT VS MOJARS Best Selection (Sega Toys - 2004xxxx - HPC-????) * 七田 眞 監修 右脳イメージトレーニング ひらがな・カタカナ カジノでモジャベガスドリーム - Shichida Makoto Kanshuu Unou Image Training Hiragana - Katakana Kajino de Moja Vegas Dream Best Selection (Sega Toys - 2004xxxx - HPC-????) -* ディズニープリンセス すてきにレッスン! ひらがな・カタカナ - Disney Princess Suteki ni Ressun! Hiragana-Katakana (Sega Toys - 20041018 - HPC-6145) to be verified * アンパンマンのもしもしピコ セット それいけ!アンパンマン アンパンマンとでんわであそぼう!<同梱> - Anpanman no Moshimoshi Pico Set with Soreike! Anpanman - Anpanman to Denwa de Asobou! (Sega - 199712xx - HPC-6050) [is the serial correct, or is it 6051 like reported for the single cart?] @@ -59,8 +57,6 @@ Published by Others (T-yyy*** serial codes, for yyy depending on the publisher) * ウルトラマンピコ ウルトラファイティングベース - Ultraman Pico Ultraman Fighting Best (Bandai - 200009xx - T-133???) * アンパンマンピコ わくわくパン工場 - Anpanman Pico Wakuwaku Pan Koujou (Bandai - 200106xx - T-133350) * おジャ魔女どれみ ドッカ~ン! - Ojamajo Doremi Dokka~n! (Bandai - 200205xx - T-133410) -* それいけ!アンパンマンの メダリンピックワールド2 - Soreike! Anpanman no Medarin Pikku World 2 Best Selection (Bandai - 20040713 - T-133460) [reprint T-133300] -* 特捜戦隊デカレンジャー - Tokusou Sentai Dekaranger (Bandai - 200406xx - T-133470) * いっしょにはしろうきかんしゃトーマス - Issho ni Hashirou Kikansha Thomas Best Selection (Bandai - 20040713 - T-133490) [reprint T-133140] * 学研のおべんきょうソフト たしざん ひきざん - Gakken no Obenkyou Soft - Tashizan Hikizan (Gakken - 1995xxxx - T-169030) * はじめまシリーズ4 学研のおべんきょうソフト たしざん ひきざん - Hajimema Series 4 - Gakken no Obenkyou Soft - Tashizan Hikizan (Gakken - 1998xxxx - T-169070) @@ -790,6 +786,22 @@ Published by Others (T-yyy*** serial codes, for yyy depending on the publisher) + + Disney Princess Suteki ni Lesson! Hiragana-Katakana (Jpn) + 2004 + Sega Toys + + + + + + + + + + + + Disney Princess Ariel (Jpn) 2004 @@ -1190,13 +1202,15 @@ Published by Others (T-yyy*** serial codes, for yyy depending on the publisher) - - Ecco Jr. und die große Schatzsuche im Ozean! (Ger) + + Ecco Jr. - No fundo do mar! (Bra) 19?? Sega + + - + @@ -1215,6 +1229,17 @@ Published by Others (T-yyy*** serial codes, for yyy depending on the publisher) + + Ecco Jr. und die große Schatzsuche im Ozean! (Ger) + 19?? + Sega + + + + + + + Ecco Jr. and the Great Ocean Treasure Hunt! (Jpn) 1995 @@ -2394,6 +2419,19 @@ But how do later protos fit with this theory? Maybe the later protos were from t + + Cores Mágicas (Bra) + 1994 + Sega + + + + + + + + + Crayons Magiques (Fra) 1994 @@ -2616,6 +2654,19 @@ But how do later protos fit with this theory? Maybe the later protos were from t + + Mickey Viajando no Tempo (Bra) + 1994 + Sega + + + + + + + + + Mickey - Fait un Voyage Eclair Dans Le Passé (Fra) 1994 @@ -3107,6 +3158,22 @@ But how do later protos fit with this theory? Maybe the later protos were from t + + Paketto 2 - Yukai na Nakama to Game de Kazu Asobi (Jpn) + 199? + Sega + + + + + + + + + + + + Pecola no Daibouken Maboroshi no Ice Cream wo Sagase! (Jpn) 1998 @@ -4007,6 +4074,22 @@ But how do later protos fit with this theory? Maybe the later protos were from t + Soreike! Anpanman no Medalympic World 2 (Jpn, Best Selection) + 2004 + Bandai + + + + + + + + + + + + + Soreike! Anpanman no Medalympic World 2 (Jpn) 199? Bandai @@ -4210,6 +4293,22 @@ But how do later protos fit with this theory? Maybe the later protos were from t + + Tokusou Sentai Dekaranger (Jpn) + 2004 + Bandai + + + + + + + + + + + + Tokyo Disneyland Toon Town - Mickey no Boku wa Untenshu (Jpn) @@ -4462,7 +4561,7 @@ But how do later protos fit with this theory? Maybe the later protos were from t - Yukai na Mori no Packet (Jpn) + Yukai na Mori no Paketto (Jpn) 1995 Sega diff --git a/hash/tutor.xml b/hash/tutor.xml index d092af95fb3..9d738043150 100644 --- a/hash/tutor.xml +++ b/hash/tutor.xml @@ -15,7 +15,7 @@ Japanese Releases - Pyuuta 005E Frogger ~ フロッガー [dumped] 006E Scramble ~ スクランブル [dumped] 007E NightFlight ~ ナイトフライト [dumped] -008E Marine Adventure ~ マリン アドベンチャー +008E Marine Adventure ~ マリン アドベンチャー [dumped] 009E Mission Attack ~ ミッション アタック [dumped] 010E Traffic Jam ~ トラフィック ジャム 011E Mystery Gold ~ ミステリー ゴールド @@ -131,8 +131,7 @@ Battlefighter (Original) (Unreleased - Prototype Stage) - - + Deep Six (USA) 1983 Tomy @@ -207,6 +206,19 @@ Battlefighter (Original) (Unreleased - Prototype Stage) + + Marine Adventure (Jpn) + 1982 + Tomy + + + + + + + + + Mickey Athletic Land (Jpn) 198? -- cgit v1.2.3 From e7e05efea49c37fc1161fc5483314257942fe381 Mon Sep 17 00:00:00 2001 From: Justin Kerk Date: Mon, 23 Feb 2015 07:26:41 -0800 Subject: Fix tiny build when there are no buses (nw) --- makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makefile b/makefile index bdf3e593e58..0182e22b8b8 100644 --- a/makefile +++ b/makefile @@ -935,6 +935,10 @@ $(sort $(OBJDIRS)): ifndef EXECUTABLE_DEFINED +ifeq ($(BUSES),) +LIBBUS = +endif + EMULATOROBJLIST = $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBBUS) $(LIBOPTIONAL) $(LIBEMU) $(LIBDASM) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(JPEG_LIB) $(FLAC_LIB) $(7Z_LIB) $(FORMATS_LIB) $(LUA_LIB) $(SQLITE3_LIB) $(WEB_LIB) $(BGFX_LIB) $(ZLIB) $(LIBOCORE) $(MIDI_LIB) $(RESFILE) ifeq ($(TARGETOS),emscripten) -- cgit v1.2.3 From 713131be66fe2cdf3130173c0c3313cc92963492 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Feb 2015 16:59:30 +0100 Subject: partypooper to the rescue --- src/mame/drivers/segaorun.c | 76 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index a3bb8127e4e..f3b0efeb2e2 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -2377,59 +2377,59 @@ ROM_END // ROM_START( toutrunj1 ) ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "EPR-12289.IC133", 0x000000, 0x10000, CRC(89380754) SHA1(52b3bf7ed04a58dbf13440f58ae6e71a28fca5f6) ) // Verified correct labels but conflicts with the 317-0109 set - ROM_LOAD16_BYTE( "EPR-12288.IC118", 0x000001, 0x10000, CRC(47b47ef1) SHA1(1af002721ec9bf72c17e3184cf5df82e7b5f45e1) ) // Verified correct labels but conflicts with the 317-0109 set - ROM_LOAD16_BYTE( "EPR-12291.IC132", 0x020000, 0x10000, CRC(1f4ab0c6) SHA1(5c21ad7e3b232d6d3bce325f878659ba9cfda0da) ) // Verified correct labels but conflicts with the 317-0109 set - ROM_LOAD16_BYTE( "EPR-12290.IC117", 0x020001, 0x10000, CRC(67e81543) SHA1(a2844c2bbe139e709aa7679f82e38e93d9494e6d) ) // Verified correct labels but conflicts with the 317-0109 set - ROM_LOAD16_BYTE( "EPR-12293.IC131", 0x040000, 0x10000, CRC(f4321eea) SHA1(64334acc82c14bb58b7d51719f34fd81cfb9fc6b) ) - ROM_LOAD16_BYTE( "EPR-12292.IC116", 0x040001, 0x10000, CRC(51d98af0) SHA1(6e7115706bfafb687faa23d55d4a8c8e498a4df2) ) + ROM_LOAD16_BYTE( "epr-12289.ic133", 0x000000, 0x10000, CRC(89380754) SHA1(52b3bf7ed04a58dbf13440f58ae6e71a28fca5f6) ) // Verified correct labels but conflicts with the 317-0109 set + ROM_LOAD16_BYTE( "epr-12288.ic118", 0x000001, 0x10000, CRC(47b47ef1) SHA1(1af002721ec9bf72c17e3184cf5df82e7b5f45e1) ) // Verified correct labels but conflicts with the 317-0109 set + ROM_LOAD16_BYTE( "epr-12291.ic132", 0x020000, 0x10000, CRC(1f4ab0c6) SHA1(5c21ad7e3b232d6d3bce325f878659ba9cfda0da) ) // Verified correct labels but conflicts with the 317-0109 set + ROM_LOAD16_BYTE( "epr-12290.ic117", 0x020001, 0x10000, CRC(67e81543) SHA1(a2844c2bbe139e709aa7679f82e38e93d9494e6d) ) // Verified correct labels but conflicts with the 317-0109 set + ROM_LOAD16_BYTE( "epr-12293.ic131", 0x040000, 0x10000, CRC(f4321eea) SHA1(64334acc82c14bb58b7d51719f34fd81cfb9fc6b) ) + ROM_LOAD16_BYTE( "epr-12292.ic116", 0x040001, 0x10000, CRC(51d98af0) SHA1(6e7115706bfafb687faa23d55d4a8c8e498a4df2) ) ROM_REGION( 0x2000, "maincpu:key", 0 ) // decryption key ROM_LOAD( "317-0101.key", 0x0000, 0x2000, CRC(eb636314) SHA1(a10e5585a0af2865a9aa640a3b6bd1cf60f47a1e) ) ROM_REGION( 0x60000, "subcpu", 0 ) // second 68000 CPU - ROM_LOAD16_BYTE( "EPR-12295.IC76", 0x000000, 0x10000, CRC(d43a3a84) SHA1(362c98f62c205b6b40b7e8a4ba107745b547b984) ) - ROM_LOAD16_BYTE( "EPR-12294.IC58", 0x000001, 0x10000, CRC(27cdcfd3) SHA1(4fe57db95b109ab1bb1326789e06a3d3aac311cc) ) - ROM_LOAD16_BYTE( "EPR-12297.IC75", 0x020000, 0x10000, CRC(1d9b5677) SHA1(fb6e33acc43fbc7a8d7ac44045439ecdf794fdeb) ) - ROM_LOAD16_BYTE( "EPR-12296.IC57", 0x020001, 0x10000, CRC(0a513671) SHA1(4c13ca3a6f0aa9d06ed80798b466cca0c966a265) ) + ROM_LOAD16_BYTE( "epr-12295.ic76", 0x000000, 0x10000, CRC(d43a3a84) SHA1(362c98f62c205b6b40b7e8a4ba107745b547b984) ) + ROM_LOAD16_BYTE( "epr-12294.ic58", 0x000001, 0x10000, CRC(27cdcfd3) SHA1(4fe57db95b109ab1bb1326789e06a3d3aac311cc) ) + ROM_LOAD16_BYTE( "epr-12297.ic75", 0x020000, 0x10000, CRC(1d9b5677) SHA1(fb6e33acc43fbc7a8d7ac44045439ecdf794fdeb) ) + ROM_LOAD16_BYTE( "epr-12296.ic57", 0x020001, 0x10000, CRC(0a513671) SHA1(4c13ca3a6f0aa9d06ed80798b466cca0c966a265) ) ROM_REGION( 0x30000, "gfx1", 0 ) // tiles - ROM_LOAD( "EPR-12323.IC102", 0x00000, 0x10000, CRC(4de43a6f) SHA1(68909338e1f192ac2699c8a8d24c3f46502dd019) ) - ROM_LOAD( "EPR-12324.IC103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) - ROM_LOAD( "EPR-12325.IC104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) + ROM_LOAD( "epr-12323.ic102", 0x00000, 0x10000, CRC(4de43a6f) SHA1(68909338e1f192ac2699c8a8d24c3f46502dd019) ) + ROM_LOAD( "epr-12324.ic103", 0x10000, 0x10000, CRC(24607a55) SHA1(69033f2281cd42e88233c23d809b73607fe54853) ) + ROM_LOAD( "epr-12325.ic104", 0x20000, 0x10000, CRC(1405137a) SHA1(367db88d36852e35c5e839f692be5ea8c8e072d2) ) ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites - ROM_LOAD32_BYTE( "EPR-12307.IC9", 0x00000, 0x10000, CRC(437dcf09) SHA1(0022ee4d1c3698f77271e570cef98a8a1e5c5d6a) ) - ROM_LOAD32_BYTE( "EPR-12308.IC10", 0x00001, 0x10000, CRC(0de70cc2) SHA1(c03f8f8cda72daf64af2878bf254840ac6dd17eb) ) - ROM_LOAD32_BYTE( "EPR-12309.IC11", 0x00002, 0x10000, CRC(deb8c242) SHA1(c05d8ced4eafae52c4795fb1471cd66f5903d1aa) ) - ROM_LOAD32_BYTE( "EPR-12310.IC12", 0x00003, 0x10000, CRC(45cf157e) SHA1(5d0be2a374a53ea1fe0ba2bf9b2173e96de1eb51) ) - ROM_LOAD32_BYTE( "EPR-12311.IC13", 0x40000, 0x10000, CRC(ae2bd639) SHA1(64bb60ae7e3f87fbbce00106ba65c4e6fc1af0e4) ) - ROM_LOAD32_BYTE( "EPR-12312.IC14", 0x40001, 0x10000, CRC(626000e7) SHA1(4a7f9e76dd76a3dc56b8257149bc94be3f4f2e87) ) - ROM_LOAD32_BYTE( "EPR-12313.IC15", 0x40002, 0x10000, CRC(52870c37) SHA1(3a6836a46d94c0f9115800d206410252a1134c57) ) - ROM_LOAD32_BYTE( "EPR-12314.IC16", 0x40003, 0x10000, CRC(40c461ea) SHA1(7bed8f24112dc3c827fd087138fcf2700092aa59) ) - ROM_LOAD32_BYTE( "EPR-12315.IC17", 0x80000, 0x10000, CRC(3ff9a3a3) SHA1(0d90fe2669d03bd07a0d3b05934201778e28d54c) ) - ROM_LOAD32_BYTE( "EPR-12316.IC18", 0x80001, 0x10000, CRC(8a1e6dc8) SHA1(32f09ec504c2b6772815bad7380a2f738f11746a) ) - ROM_LOAD32_BYTE( "EPR-12317.IC19", 0x80002, 0x10000, CRC(77e382d4) SHA1(5b7912069a46043b7be989d82436add85497d318) ) - ROM_LOAD32_BYTE( "EPR-12318.IC20", 0x80003, 0x10000, CRC(d1afdea9) SHA1(813eccc88d5046992be5b5a0618d32127d16e30b) ) - ROM_LOAD32_BYTE( "EPR-12319.IC21", 0xc0000, 0x10000, CRC(df23baf9) SHA1(f9611391bb3b3b92203fa9f6dd461e3a6e863622) ) - ROM_LOAD32_BYTE( "EPR-12320.IC22", 0xc0001, 0x10000, CRC(7931e446) SHA1(9f2161a689ebad61f6653942e23d9c2bc6170d4a) ) - ROM_LOAD32_BYTE( "EPR-12321.IC23", 0xc0002, 0x10000, CRC(830bacd4) SHA1(5a4816969437ee1edca5845006c0b8e9ba365491) ) - ROM_LOAD32_BYTE( "EPR-12322.IC24", 0xc0003, 0x10000, CRC(8b812492) SHA1(bf1f9e059c093c0991c7caf1b01c739ed54b8357) ) + ROM_LOAD32_BYTE( "epr-12307.ic9", 0x00000, 0x10000, CRC(437dcf09) SHA1(0022ee4d1c3698f77271e570cef98a8a1e5c5d6a) ) + ROM_LOAD32_BYTE( "epr-12308.ic10", 0x00001, 0x10000, CRC(0de70cc2) SHA1(c03f8f8cda72daf64af2878bf254840ac6dd17eb) ) + ROM_LOAD32_BYTE( "epr-12309.ic11", 0x00002, 0x10000, CRC(deb8c242) SHA1(c05d8ced4eafae52c4795fb1471cd66f5903d1aa) ) + ROM_LOAD32_BYTE( "epr-12310.ic12", 0x00003, 0x10000, CRC(45cf157e) SHA1(5d0be2a374a53ea1fe0ba2bf9b2173e96de1eb51) ) + ROM_LOAD32_BYTE( "epr-12311.ic13", 0x40000, 0x10000, CRC(ae2bd639) SHA1(64bb60ae7e3f87fbbce00106ba65c4e6fc1af0e4) ) + ROM_LOAD32_BYTE( "epr-12312.ic14", 0x40001, 0x10000, CRC(626000e7) SHA1(4a7f9e76dd76a3dc56b8257149bc94be3f4f2e87) ) + ROM_LOAD32_BYTE( "epr-12313.ic15", 0x40002, 0x10000, CRC(52870c37) SHA1(3a6836a46d94c0f9115800d206410252a1134c57) ) + ROM_LOAD32_BYTE( "epr-12314.ic16", 0x40003, 0x10000, CRC(40c461ea) SHA1(7bed8f24112dc3c827fd087138fcf2700092aa59) ) + ROM_LOAD32_BYTE( "epr-12315.ic17", 0x80000, 0x10000, CRC(3ff9a3a3) SHA1(0d90fe2669d03bd07a0d3b05934201778e28d54c) ) + ROM_LOAD32_BYTE( "epr-12316.ic18", 0x80001, 0x10000, CRC(8a1e6dc8) SHA1(32f09ec504c2b6772815bad7380a2f738f11746a) ) + ROM_LOAD32_BYTE( "epr-12317.ic19", 0x80002, 0x10000, CRC(77e382d4) SHA1(5b7912069a46043b7be989d82436add85497d318) ) + ROM_LOAD32_BYTE( "epr-12318.ic20", 0x80003, 0x10000, CRC(d1afdea9) SHA1(813eccc88d5046992be5b5a0618d32127d16e30b) ) + ROM_LOAD32_BYTE( "epr-12319.ic21", 0xc0000, 0x10000, CRC(df23baf9) SHA1(f9611391bb3b3b92203fa9f6dd461e3a6e863622) ) + ROM_LOAD32_BYTE( "epr-12320.ic22", 0xc0001, 0x10000, CRC(7931e446) SHA1(9f2161a689ebad61f6653942e23d9c2bc6170d4a) ) + ROM_LOAD32_BYTE( "epr-12321.ic23", 0xc0002, 0x10000, CRC(830bacd4) SHA1(5a4816969437ee1edca5845006c0b8e9ba365491) ) + ROM_LOAD32_BYTE( "epr-12322.ic24", 0xc0003, 0x10000, CRC(8b812492) SHA1(bf1f9e059c093c0991c7caf1b01c739ed54b8357) ) ROM_REGION( 0x10000, "gfx3", 0 ) // road gfx (2 identical roms, 1 for each road) - ROM_LOAD( "EPR-12298.IC47", 0x0000, 0x8000, CRC(fc9bc41b) SHA1(9af73e096253cf2c4f283f227530110a4b37fcee) ) // Both are EPR-12298 - ROM_LOAD( "EPR-12298.IC28", 0x8000, 0x8000, CRC(fc9bc41b) SHA1(9af73e096253cf2c4f283f227530110a4b37fcee) ) + ROM_LOAD( "epr-12298.ic47", 0x0000, 0x8000, CRC(fc9bc41b) SHA1(9af73e096253cf2c4f283f227530110a4b37fcee) ) // Both are EPR-12298 + ROM_LOAD( "epr-12298.ic28", 0x8000, 0x8000, CRC(fc9bc41b) SHA1(9af73e096253cf2c4f283f227530110a4b37fcee) ) ROM_REGION( 0x10000, "soundcpu", 0 ) // sound CPU - ROM_LOAD( "EPR-12300.IC88", 0x00000, 0x10000, CRC(e8ff7011) SHA1(6eaf3aea507007ea31d507ed7825d905f4b8e7ab) ) + ROM_LOAD( "epr-12300.ic88", 0x00000, 0x10000, CRC(e8ff7011) SHA1(6eaf3aea507007ea31d507ed7825d905f4b8e7ab) ) ROM_REGION( 0x80000, "pcm", ROMREGION_ERASEFF ) // sound PCM data - ROM_LOAD( "EPR-12301.IC66", 0x00000, 0x10000, CRC(6e78ad15) SHA1(c31ddf434b459cd1a381d2a028beabddd4ed10d2) ) - ROM_LOAD( "EPR-12302.IC67", 0x10000, 0x10000, CRC(e72928af) SHA1(40e0b178958cfe97c097fe9d82b5de54bc27a29f) ) - ROM_LOAD( "EPR-12303.IC68", 0x20000, 0x10000, CRC(8384205c) SHA1(c1f9d52bc587eab5a97867198e9aa7c19e973429) ) - ROM_LOAD( "EPR-12304.IC69", 0x30000, 0x10000, CRC(e1762ac3) SHA1(855f06c082a17d90857e6efa3cf95b0eda0e634d) ) - ROM_LOAD( "EPR-12305.IC70", 0x40000, 0x10000, CRC(ba9ce677) SHA1(056781f92450c902e1d279a02bda28337815cba9) ) - ROM_LOAD( "EPR-12306.IC71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) + ROM_LOAD( "epr-12301.ic66", 0x00000, 0x10000, CRC(6e78ad15) SHA1(c31ddf434b459cd1a381d2a028beabddd4ed10d2) ) + ROM_LOAD( "epr-12302.ic67", 0x10000, 0x10000, CRC(e72928af) SHA1(40e0b178958cfe97c097fe9d82b5de54bc27a29f) ) + ROM_LOAD( "epr-12303.ic68", 0x20000, 0x10000, CRC(8384205c) SHA1(c1f9d52bc587eab5a97867198e9aa7c19e973429) ) + ROM_LOAD( "epr-12304.ic69", 0x30000, 0x10000, CRC(e1762ac3) SHA1(855f06c082a17d90857e6efa3cf95b0eda0e634d) ) + ROM_LOAD( "epr-12305.ic70", 0x40000, 0x10000, CRC(ba9ce677) SHA1(056781f92450c902e1d279a02bda28337815cba9) ) + ROM_LOAD( "epr-12306.ic71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END //************************************************************************** -- cgit v1.2.3 From 888b26da776c96a56e61f51b565060f7431e395c Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 23 Feb 2015 17:25:40 +0100 Subject: retofinv.c, thedeep.c: added save state support (nw) --- src/mame/drivers/retofinv.c | 59 +++++++++++++++++++++++---------- src/mame/drivers/seicross.c | 1 + src/mame/drivers/thedeep.c | 79 +++++++++++++++++++++++--------------------- src/mame/includes/retofinv.h | 67 ++++++++++++++++++++----------------- src/mame/includes/thedeep.h | 73 +++++++++++++++++++++------------------- src/mame/machine/retofinv.c | 24 +++++++------- src/mame/video/retofinv.c | 11 +++--- src/mame/video/thedeep.c | 6 ++-- 8 files changed, 182 insertions(+), 138 deletions(-) diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c index fef30114219..a0e78b17adc 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -35,6 +35,29 @@ Notes: #include "includes/retofinv.h" +void retofinv_state::machine_start() +{ + save_item(NAME(m_main_irq_mask)); + save_item(NAME(m_sub_irq_mask)); + save_item(NAME(m_cpu2_m6000)); + + if (m_68705 != NULL) // only for the parent (with MCU) + { + save_item(NAME(m_from_main)); + save_item(NAME(m_from_mcu)); + save_item(NAME(m_mcu_sent)); + save_item(NAME(m_main_sent)); + save_item(NAME(m_portA_in)); + save_item(NAME(m_portA_out)); + save_item(NAME(m_ddrA)); + save_item(NAME(m_portB_in)); + save_item(NAME(m_portB_out)); + save_item(NAME(m_ddrB)); + save_item(NAME(m_portC_in)); + save_item(NAME(m_portC_out)); + save_item(NAME(m_ddrC)); + } +} WRITE8_MEMBER(retofinv_state::cpu1_reset_w) { @@ -99,14 +122,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, retofinv_state ) AM_RANGE(0x7fff, 0x7fff) AM_WRITE(coincounter_w) AM_RANGE(0x7b00, 0x7bff) AM_ROM /* space for diagnostic ROM? The code looks */ /* for a string here, and jumps if it's present */ - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(retofinv_fg_videoram_w) AM_SHARE("fg_videoram") + AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(fg_videoram_w) AM_SHARE("fg_videoram") AM_RANGE(0x8800, 0x9fff) AM_RAM AM_SHARE("sharedram") - AM_RANGE(0xa000, 0xa7ff) AM_RAM_WRITE(retofinv_bg_videoram_w) AM_SHARE("bg_videoram") - AM_RANGE(0xb800, 0xb802) AM_WRITE(retofinv_gfx_ctrl_w) + AM_RANGE(0xa000, 0xa7ff) AM_RAM_WRITE(bg_videoram_w) AM_SHARE("bg_videoram") + AM_RANGE(0xb800, 0xb802) AM_WRITE(gfx_ctrl_w) AM_RANGE(0xc000, 0xc000) AM_READ_PORT("P1") AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P2") AM_RANGE(0xc002, 0xc002) AM_READNOP /* bit 7 must be 0, otherwise game resets */ - AM_RANGE(0xc003, 0xc003) AM_READ(retofinv_mcu_status_r) + AM_RANGE(0xc003, 0xc003) AM_READ(mcu_status_r) AM_RANGE(0xc004, 0xc004) AM_READ_PORT("SYSTEM") AM_RANGE(0xc005, 0xc005) AM_READ_PORT("DSW1") AM_RANGE(0xc006, 0xc006) AM_READ_PORT("DSW2") @@ -119,16 +142,16 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, retofinv_state ) AM_RANGE(0xc805, 0xc805) AM_WRITE(cpu1_reset_w) AM_RANGE(0xd000, 0xd000) AM_WRITE(watchdog_reset_w) AM_RANGE(0xd800, 0xd800) AM_WRITE(soundcommand_w) - AM_RANGE(0xe000, 0xe000) AM_READ(retofinv_mcu_r) - AM_RANGE(0xe800, 0xe800) AM_WRITE(retofinv_mcu_w) + AM_RANGE(0xe000, 0xe000) AM_READ(mcu_r) + AM_RANGE(0xe800, 0xe800) AM_WRITE(mcu_w) AM_RANGE(0xf800, 0xf800) AM_READ(cpu0_mf800_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, retofinv_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(retofinv_fg_videoram_w) AM_SHARE("fg_videoram") + AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(fg_videoram_w) AM_SHARE("fg_videoram") AM_RANGE(0x8800, 0x9fff) AM_RAM AM_SHARE("sharedram") - AM_RANGE(0xa000, 0xa7ff) AM_RAM_WRITE(retofinv_bg_videoram_w) AM_SHARE("bg_videoram") + AM_RANGE(0xa000, 0xa7ff) AM_RAM_WRITE(bg_videoram_w) AM_SHARE("bg_videoram") AM_RANGE(0xc804, 0xc804) AM_WRITE(irq1_ack_w) ADDRESS_MAP_END @@ -144,12 +167,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, retofinv_state ) ADDRESS_MAP_GLOBAL_MASK(0x7ff) - AM_RANGE(0x0000, 0x0000) AM_READWRITE(retofinv_68705_portA_r, retofinv_68705_portA_w) - AM_RANGE(0x0001, 0x0001) AM_READWRITE(retofinv_68705_portB_r, retofinv_68705_portB_w) - AM_RANGE(0x0002, 0x0002) AM_READWRITE(retofinv_68705_portC_r, retofinv_68705_portC_w) - AM_RANGE(0x0004, 0x0004) AM_WRITE(retofinv_68705_ddrA_w) - AM_RANGE(0x0005, 0x0005) AM_WRITE(retofinv_68705_ddrB_w) - AM_RANGE(0x0006, 0x0006) AM_WRITE(retofinv_68705_ddrC_w) + AM_RANGE(0x0000, 0x0000) AM_READWRITE(mcu_portA_r, mcu_portA_w) + AM_RANGE(0x0001, 0x0001) AM_READWRITE(mcu_portB_r, mcu_portB_w) + AM_RANGE(0x0002, 0x0002) AM_READWRITE(mcu_portC_r, mcu_portC_w) + AM_RANGE(0x0004, 0x0004) AM_WRITE(mcu_ddrA_w) + AM_RANGE(0x0005, 0x0005) AM_WRITE(mcu_ddrB_w) + AM_RANGE(0x0006, 0x0006) AM_WRITE(mcu_ddrC_w) AM_RANGE(0x0010, 0x007f) AM_RAM AM_RANGE(0x0080, 0x07ff) AM_ROM ADDRESS_MAP_END @@ -367,7 +390,7 @@ static MACHINE_CONFIG_START( retofinv, retofinv_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(36*8, 28*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(retofinv_state, screen_update_retofinv) + MCFG_SCREEN_UPDATE_DRIVER(retofinv_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", retofinv) @@ -501,6 +524,6 @@ ROM_END -GAME( 1985, retofinv, 0, retofinv, retofinv, driver_device, 0, ROT90, "Taito Corporation", "Return of the Invaders", 0 ) -GAME( 1985, retofinv1,retofinv, retofinb, retofinv, driver_device, 0, ROT90, "bootleg", "Return of the Invaders (bootleg set 1)", 0 ) -GAME( 1985, retofinv2,retofinv, retofinb, retofin2, driver_device, 0, ROT90, "bootleg", "Return of the Invaders (bootleg set 2)", 0 ) +GAME( 1985, retofinv, 0, retofinv, retofinv, driver_device, 0, ROT90, "Taito Corporation", "Return of the Invaders", GAME_SUPPORTS_SAVE ) +GAME( 1985, retofinv1,retofinv, retofinb, retofinv, driver_device, 0, ROT90, "bootleg", "Return of the Invaders (bootleg set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1985, retofinv2,retofinv, retofinb, retofin2, driver_device, 0, ROT90, "bootleg", "Return of the Invaders (bootleg set 2)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c index d6e5ac58e21..0a381a64337 100644 --- a/src/mame/drivers/seicross.c +++ b/src/mame/drivers/seicross.c @@ -86,6 +86,7 @@ WRITE8_MEMBER(seicross_state::portB_w) m_irq_mask = data & 1; /* bit 1 flips screen */ + flip_screen_set(data & 2); /* bit 2 resets the microcontroller */ if (((m_portb & 4) == 0) && (data & 4)) diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index 254b7d0b85e..86e04014489 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -38,17 +38,27 @@ Notes: ***************************************************************************/ -WRITE8_MEMBER(thedeep_state::thedeep_nmi_w) +WRITE8_MEMBER(thedeep_state::nmi_w) { m_nmi_enable = data; } -WRITE8_MEMBER(thedeep_state::thedeep_sound_w) +WRITE8_MEMBER(thedeep_state::sound_w) { soundlatch_byte_w(space, 0, data); m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } +void thedeep_state::machine_start() +{ + save_item(NAME(m_nmi_enable)); + save_item(NAME(m_protection_command)); + save_item(NAME(m_protection_data)); + save_item(NAME(m_protection_index)); + save_item(NAME(m_protection_irq)); + save_item(NAME(m_rombank)); + save_item(NAME(m_mcu_p3_reg)); +} void thedeep_state::machine_reset() { @@ -63,7 +73,7 @@ void thedeep_state::machine_reset() m_rombank = -1; } -WRITE8_MEMBER(thedeep_state::thedeep_protection_w) +WRITE8_MEMBER(thedeep_state::protection_w) { m_protection_command = data; switch (m_protection_command) @@ -126,18 +136,18 @@ WRITE8_MEMBER(thedeep_state::thedeep_protection_w) } } -READ8_MEMBER(thedeep_state::thedeep_e004_r) +READ8_MEMBER(thedeep_state::e004_r) { return m_protection_irq ? 1 : 0; } -READ8_MEMBER(thedeep_state::thedeep_protection_r) +READ8_MEMBER(thedeep_state::protection_r) { m_protection_irq = 0; return m_protection_data; } -WRITE8_MEMBER(thedeep_state::thedeep_e100_w) +WRITE8_MEMBER(thedeep_state::e100_w) { if (data != 1) logerror("pc %04x: e100 = %02x\n", space.device().safe_pc(),data); @@ -148,18 +158,18 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, thedeep_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") // ROM (banked) AM_RANGE(0xc000, 0xcfff) AM_RAM AM_RANGE(0xd000, 0xdfff) AM_RAM // RAM (MCU data copied here) - AM_RANGE(0xe000, 0xe000) AM_READWRITE(thedeep_protection_r, thedeep_protection_w) // To MCU - AM_RANGE(0xe004, 0xe004) AM_READWRITE(thedeep_e004_r, thedeep_nmi_w) // + AM_RANGE(0xe000, 0xe000) AM_READWRITE(protection_r, protection_w) // To MCU + AM_RANGE(0xe004, 0xe004) AM_READWRITE(e004_r, nmi_w) // AM_RANGE(0xe008, 0xe008) AM_READ_PORT("e008") // P1 (Inputs) AM_RANGE(0xe009, 0xe009) AM_READ_PORT("e009") // P2 AM_RANGE(0xe00a, 0xe00a) AM_READ_PORT("e00a") // DSW1 AM_RANGE(0xe00b, 0xe00b) AM_READ_PORT("e00b") // DSW2 - AM_RANGE(0xe00c, 0xe00c) AM_WRITE(thedeep_sound_w) // To Sound CPU - AM_RANGE(0xe100, 0xe100) AM_WRITE(thedeep_e100_w) // ? + AM_RANGE(0xe00c, 0xe00c) AM_WRITE(sound_w) // To Sound CPU + AM_RANGE(0xe100, 0xe100) AM_WRITE(e100_w) // ? AM_RANGE(0xe210, 0xe213) AM_WRITEONLY AM_SHARE("scroll") // Scroll AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("spriteram") // Sprites - AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(thedeep_vram_1_w) AM_SHARE("vram_1") // Text Layer - AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(thedeep_vram_0_w) AM_SHARE("vram_0") // Background Layer + AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(vram_1_w) AM_SHARE("vram_1") // Text Layer + AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(vram_0_w) AM_SHARE("vram_0") // Background Layer AM_RANGE(0xf800, 0xf83f) AM_RAM AM_SHARE("scroll2") // Column Scroll AM_RANGE(0xf840, 0xffff) AM_RAM ADDRESS_MAP_END @@ -185,7 +195,7 @@ ADDRESS_MAP_END ***************************************************************************/ -void thedeep_state::thedeep_maincpu_bankswitch(UINT8 bank_trig) +void thedeep_state::maincpu_bankswitch(UINT8 bank_trig) { UINT8 *rom; int new_rombank = bank_trig & 3; @@ -198,14 +208,14 @@ void thedeep_state::thedeep_maincpu_bankswitch(UINT8 bank_trig) } -WRITE8_MEMBER(thedeep_state::thedeep_p1_w) +WRITE8_MEMBER(thedeep_state::p1_w) { flip_screen_set((data & 1) ^ 1); - thedeep_maincpu_bankswitch((data & 6) >> 1); + maincpu_bankswitch((data & 6) >> 1); logerror("P1 %02x\n",data); } -READ8_MEMBER(thedeep_state::thedeep_from_main_r) +READ8_MEMBER(thedeep_state::from_main_r) { static UINT8 res; @@ -215,12 +225,12 @@ READ8_MEMBER(thedeep_state::thedeep_from_main_r) return 0x20; } -WRITE8_MEMBER(thedeep_state::thedeep_to_main_w) +WRITE8_MEMBER(thedeep_state::to_main_w) { // ... } -WRITE8_MEMBER(thedeep_state::thedeep_p3_w) +WRITE8_MEMBER(thedeep_state::p3_w) { /* bit 0 0->1 transition IRQ0 to main */ if((!(m_mcu_p3_reg & 0x01)) && data & 0x01) @@ -238,7 +248,7 @@ WRITE8_MEMBER(thedeep_state::thedeep_p3_w) logerror("P3 %02x\n",data); } -READ8_MEMBER(thedeep_state::thedeep_p0_r) +READ8_MEMBER(thedeep_state::p0_r) { UINT8 coin_mux; @@ -249,10 +259,10 @@ READ8_MEMBER(thedeep_state::thedeep_p0_r) static ADDRESS_MAP_START( mcu_io_map, AS_IO, 8, thedeep_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(MCS51_PORT_P0,MCS51_PORT_P0) AM_READ(thedeep_p0_r) - AM_RANGE(MCS51_PORT_P1,MCS51_PORT_P1) AM_WRITE(thedeep_p1_w) - AM_RANGE(MCS51_PORT_P2,MCS51_PORT_P2) AM_READWRITE(thedeep_from_main_r,thedeep_to_main_w) - AM_RANGE(MCS51_PORT_P3,MCS51_PORT_P3) AM_WRITE(thedeep_p3_w) + AM_RANGE(MCS51_PORT_P0,MCS51_PORT_P0) AM_READ(p0_r) + AM_RANGE(MCS51_PORT_P1,MCS51_PORT_P1) AM_WRITE(p1_w) + AM_RANGE(MCS51_PORT_P2,MCS51_PORT_P2) AM_READWRITE(from_main_r,to_main_w) + AM_RANGE(MCS51_PORT_P3,MCS51_PORT_P3) AM_WRITE(p3_w) ADDRESS_MAP_END @@ -382,12 +392,7 @@ GFXDECODE_END ***************************************************************************/ -WRITE_LINE_MEMBER(thedeep_state::irqhandler) -{ - m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); -} - -TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::thedeep_interrupt) +TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::interrupt) { int scanline = param; @@ -417,7 +422,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::thedeep_interrupt) } } -INTERRUPT_GEN_MEMBER(thedeep_state::thedeep_mcu_irq) +INTERRUPT_GEN_MEMBER(thedeep_state::mcu_irq) { m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE); } @@ -427,7 +432,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", thedeep_state, thedeep_interrupt, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", thedeep_state, interrupt, "screen", 0, 1) MCFG_CPU_ADD("audiocpu", M65C02, XTAL_12MHz/8) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(audio_map) @@ -436,7 +441,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) /* MCU is a i8751 running at 8Mhz (8mhz xtal)*/ MCFG_CPU_ADD("mcu", I8751, XTAL_8MHz) MCFG_CPU_IO_MAP(mcu_io_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", thedeep_state, thedeep_mcu_irq) // unknown source, but presumably vblank + MCFG_CPU_VBLANK_INT_DRIVER("screen", thedeep_state, mcu_irq) // unknown source, but presumably vblank MCFG_DEVICE_DISABLE() @@ -446,7 +451,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(0x100, 0xf8) MCFG_SCREEN_VISIBLE_AREA(0, 0x100-1, 0, 0xf8-1) - MCFG_SCREEN_UPDATE_DRIVER(thedeep_state, screen_update_thedeep) + MCFG_SCREEN_UPDATE_DRIVER(thedeep_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", thedeep) @@ -458,7 +463,7 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */ - MCFG_YM2203_IRQ_HANDLER(WRITELINE(thedeep_state, irqhandler)) + MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -474,7 +479,7 @@ MACHINE_CONFIG_END Here are the proms for The Deep! NOTE: This game is Vertical. -I couldn't test this board so I don't know the manufakturer, sorry. +I couldn't test this board so I don't know the manufacturer, sorry. 1 Z80 1 R6502 1 YM 2203 @@ -553,5 +558,5 @@ ROM_START( rundeep ) ROM_LOAD( "fi-3", 0x400, 0x200, CRC(f61a9686) SHA1(24082f60b72268d240ceca6999bdf18872625cd2) ) ROM_END -GAME( 1987, thedeep, 0, thedeep, thedeep, driver_device, 0, ROT270, "Wood Place Inc.", "The Deep (Japan)", 0 ) -GAME( 1988, rundeep, thedeep,thedeep, thedeep, driver_device, 0, ROT270, "bootleg (Cream)", "Run Deep", 0 ) +GAME( 1987, thedeep, 0, thedeep, thedeep, driver_device, 0, ROT270, "Wood Place Inc.", "The Deep (Japan)", GAME_SUPPORTS_SAVE ) +GAME( 1988, rundeep, thedeep,thedeep, thedeep, driver_device, 0, ROT270, "bootleg (Cream)", "Run Deep", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/retofinv.h b/src/mame/includes/retofinv.h index 66310d14fa2..b4f1f9534a3 100644 --- a/src/mame/includes/retofinv.h +++ b/src/mame/includes/retofinv.h @@ -3,20 +3,30 @@ class retofinv_state : public driver_device public: retofinv_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_fg_videoram(*this, "fg_videoram"), - m_sharedram(*this, "sharedram"), - m_bg_videoram(*this, "bg_videoram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_subcpu(*this, "sub"), m_68705(*this, "68705"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_fg_videoram(*this, "fg_videoram"), + m_sharedram(*this, "sharedram"), + m_bg_videoram(*this, "bg_videoram") { } - UINT8 m_cpu2_m6000; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_subcpu; + optional_device m_68705; + required_device m_gfxdecode; + required_device m_palette; + required_shared_ptr m_fg_videoram; required_shared_ptr m_sharedram; required_shared_ptr m_bg_videoram; + + UINT8 m_main_irq_mask; + UINT8 m_sub_irq_mask; + UINT8 m_cpu2_m6000; UINT8 m_from_main; UINT8 m_from_mcu; int m_mcu_sent; @@ -35,8 +45,6 @@ public: tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - UINT8 m_main_irq_mask; - UINT8 m_sub_irq_mask; DECLARE_WRITE8_MEMBER(cpu1_reset_w); DECLARE_WRITE8_MEMBER(cpu2_reset_w); DECLARE_WRITE8_MEMBER(mcu_reset_w); @@ -47,34 +55,33 @@ public: DECLARE_WRITE8_MEMBER(irq1_ack_w); DECLARE_WRITE8_MEMBER(coincounter_w); DECLARE_WRITE8_MEMBER(coinlockout_w); - DECLARE_READ8_MEMBER(retofinv_68705_portA_r); - DECLARE_WRITE8_MEMBER(retofinv_68705_portA_w); - DECLARE_WRITE8_MEMBER(retofinv_68705_ddrA_w); - DECLARE_READ8_MEMBER(retofinv_68705_portB_r); - DECLARE_WRITE8_MEMBER(retofinv_68705_portB_w); - DECLARE_WRITE8_MEMBER(retofinv_68705_ddrB_w); - DECLARE_READ8_MEMBER(retofinv_68705_portC_r); - DECLARE_WRITE8_MEMBER(retofinv_68705_portC_w); - DECLARE_WRITE8_MEMBER(retofinv_68705_ddrC_w); - DECLARE_WRITE8_MEMBER(retofinv_mcu_w); - DECLARE_READ8_MEMBER(retofinv_mcu_r); - DECLARE_READ8_MEMBER(retofinv_mcu_status_r); - DECLARE_WRITE8_MEMBER(retofinv_bg_videoram_w); - DECLARE_WRITE8_MEMBER(retofinv_fg_videoram_w); - DECLARE_WRITE8_MEMBER(retofinv_gfx_ctrl_w); + DECLARE_READ8_MEMBER(mcu_portA_r); + DECLARE_WRITE8_MEMBER(mcu_portA_w); + DECLARE_WRITE8_MEMBER(mcu_ddrA_w); + DECLARE_READ8_MEMBER(mcu_portB_r); + DECLARE_WRITE8_MEMBER(mcu_portB_w); + DECLARE_WRITE8_MEMBER(mcu_ddrB_w); + DECLARE_READ8_MEMBER(mcu_portC_r); + DECLARE_WRITE8_MEMBER(mcu_portC_w); + DECLARE_WRITE8_MEMBER(mcu_ddrC_w); + DECLARE_WRITE8_MEMBER(mcu_w); + DECLARE_READ8_MEMBER(mcu_r); + DECLARE_READ8_MEMBER(mcu_status_r); + DECLARE_WRITE8_MEMBER(bg_videoram_w); + DECLARE_WRITE8_MEMBER(fg_videoram_w); + DECLARE_WRITE8_MEMBER(gfx_ctrl_w); + TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(bg_get_tile_info); TILE_GET_INFO_MEMBER(fg_get_tile_info); + + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(retofinv); - UINT32 screen_update_retofinv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap); + INTERRUPT_GEN_MEMBER(main_vblank_irq); INTERRUPT_GEN_MEMBER(sub_vblank_irq); - void draw_sprites(bitmap_ind16 &bitmap); - required_device m_maincpu; - required_device m_audiocpu; - required_device m_subcpu; - optional_device m_68705; - required_device m_gfxdecode; - required_device m_palette; }; diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h index 1f77092a4ba..d074b169fdf 100644 --- a/src/mame/includes/thedeep.h +++ b/src/mame/includes/thedeep.h @@ -3,61 +3,66 @@ class thedeep_state : public driver_device public: thedeep_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram"), - m_vram_0(*this, "vram_0"), - m_vram_1(*this, "vram_1"), - m_scroll(*this, "scroll"), - m_scroll2(*this, "scroll2"), m_maincpu(*this,"maincpu"), m_audiocpu(*this, "audiocpu"), m_mcu(*this, "mcu"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_spriteram(*this, "spriteram"), + m_vram_0(*this, "vram_0"), + m_vram_1(*this, "vram_1"), + m_scroll(*this, "scroll"), + m_scroll2(*this, "scroll2") { } + + required_device m_maincpu; + required_device m_audiocpu; + required_device m_mcu; + required_device m_gfxdecode; + required_device m_palette; required_shared_ptr m_spriteram; + required_shared_ptr m_vram_0; + required_shared_ptr m_vram_1; + required_shared_ptr m_scroll; + required_shared_ptr m_scroll2; + int m_nmi_enable; UINT8 m_protection_command; UINT8 m_protection_data; int m_protection_index; int m_protection_irq; int m_rombank; - required_shared_ptr m_vram_0; - required_shared_ptr m_vram_1; - required_shared_ptr m_scroll; - required_shared_ptr m_scroll2; tilemap_t *m_tilemap_0; tilemap_t *m_tilemap_1; UINT8 m_mcu_p3_reg; - required_device m_maincpu; - required_device m_audiocpu; - required_device m_mcu; - required_device m_gfxdecode; - required_device m_palette; - - DECLARE_WRITE8_MEMBER(thedeep_nmi_w); - DECLARE_WRITE8_MEMBER(thedeep_sound_w); - DECLARE_WRITE8_MEMBER(thedeep_protection_w); - DECLARE_READ8_MEMBER(thedeep_e004_r); - DECLARE_READ8_MEMBER(thedeep_protection_r); - DECLARE_WRITE8_MEMBER(thedeep_e100_w); - DECLARE_WRITE8_MEMBER(thedeep_p1_w); - DECLARE_READ8_MEMBER(thedeep_from_main_r); - DECLARE_WRITE8_MEMBER(thedeep_to_main_w); - DECLARE_WRITE8_MEMBER(thedeep_p3_w); - DECLARE_READ8_MEMBER(thedeep_p0_r); - DECLARE_WRITE8_MEMBER(thedeep_vram_0_w); - DECLARE_WRITE8_MEMBER(thedeep_vram_1_w); + DECLARE_WRITE8_MEMBER(nmi_w); + DECLARE_WRITE8_MEMBER(sound_w); + DECLARE_WRITE8_MEMBER(protection_w); + DECLARE_READ8_MEMBER(e004_r); + DECLARE_READ8_MEMBER(protection_r); + DECLARE_WRITE8_MEMBER(e100_w); + DECLARE_WRITE8_MEMBER(p1_w); + DECLARE_READ8_MEMBER(from_main_r); + DECLARE_WRITE8_MEMBER(to_main_w); + DECLARE_WRITE8_MEMBER(p3_w); + DECLARE_READ8_MEMBER(p0_r); + DECLARE_WRITE8_MEMBER(vram_0_w); + DECLARE_WRITE8_MEMBER(vram_1_w); + TILEMAP_MAPPER_MEMBER(tilemap_scan_rows_back); TILE_GET_INFO_MEMBER(get_tile_info_0); TILE_GET_INFO_MEMBER(get_tile_info_1); + + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(thedeep); - UINT32 screen_update_thedeep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(thedeep_mcu_irq); - TIMER_DEVICE_CALLBACK_MEMBER(thedeep_interrupt); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void thedeep_maincpu_bankswitch(UINT8 bank_trig); - DECLARE_WRITE_LINE_MEMBER(irqhandler); + + void maincpu_bankswitch(UINT8 bank_trig); + INTERRUPT_GEN_MEMBER(mcu_irq); + TIMER_DEVICE_CALLBACK_MEMBER(interrupt); }; diff --git a/src/mame/machine/retofinv.c b/src/mame/machine/retofinv.c index 43c6ba1031b..0f67392d177 100644 --- a/src/mame/machine/retofinv.c +++ b/src/mame/machine/retofinv.c @@ -10,19 +10,19 @@ ***************************************************************************/ -READ8_MEMBER(retofinv_state::retofinv_68705_portA_r) +READ8_MEMBER(retofinv_state::mcu_portA_r) { //logerror("%04x: 68705 port A read %02x\n",space.device().safe_pc(),m_portA_in); return (m_portA_out & m_ddrA) | (m_portA_in & ~m_ddrA); } -WRITE8_MEMBER(retofinv_state::retofinv_68705_portA_w) +WRITE8_MEMBER(retofinv_state::mcu_portA_w) { //logerror("%04x: 68705 port A write %02x\n",space.device().safe_pc(),data); m_portA_out = data; } -WRITE8_MEMBER(retofinv_state::retofinv_68705_ddrA_w) +WRITE8_MEMBER(retofinv_state::mcu_ddrA_w) { m_ddrA = data; } @@ -39,12 +39,12 @@ WRITE8_MEMBER(retofinv_state::retofinv_68705_ddrA_w) */ -READ8_MEMBER(retofinv_state::retofinv_68705_portB_r) +READ8_MEMBER(retofinv_state::mcu_portB_r) { return (m_portB_out & m_ddrB) | (m_portB_in & ~m_ddrB); } -WRITE8_MEMBER(retofinv_state::retofinv_68705_portB_w) +WRITE8_MEMBER(retofinv_state::mcu_portB_w) { //logerror("%04x: 68705 port B write %02x\n",space.device().safe_pc(),data); @@ -65,7 +65,7 @@ WRITE8_MEMBER(retofinv_state::retofinv_68705_portB_w) m_portB_out = data; } -WRITE8_MEMBER(retofinv_state::retofinv_68705_ddrB_w) +WRITE8_MEMBER(retofinv_state::mcu_ddrB_w) { m_ddrB = data; } @@ -81,7 +81,7 @@ WRITE8_MEMBER(retofinv_state::retofinv_68705_ddrB_w) */ -READ8_MEMBER(retofinv_state::retofinv_68705_portC_r) +READ8_MEMBER(retofinv_state::mcu_portC_r) { m_portC_in = 0; if (m_main_sent) m_portC_in |= 0x01; @@ -90,19 +90,19 @@ READ8_MEMBER(retofinv_state::retofinv_68705_portC_r) return (m_portC_out & m_ddrC) | (m_portC_in & ~m_ddrC); } -WRITE8_MEMBER(retofinv_state::retofinv_68705_portC_w) +WRITE8_MEMBER(retofinv_state::mcu_portC_w) { logerror("%04x: 68705 port C write %02x\n",space.device().safe_pc(),data); m_portC_out = data; } -WRITE8_MEMBER(retofinv_state::retofinv_68705_ddrC_w) +WRITE8_MEMBER(retofinv_state::mcu_ddrC_w) { m_ddrC = data; } -WRITE8_MEMBER(retofinv_state::retofinv_mcu_w) +WRITE8_MEMBER(retofinv_state::mcu_w) { logerror("%04x: mcu_w %02x\n",space.device().safe_pc(),data); m_from_main = data; @@ -110,14 +110,14 @@ logerror("%04x: mcu_w %02x\n",space.device().safe_pc(),data); m_68705->set_input_line(0, ASSERT_LINE); } -READ8_MEMBER(retofinv_state::retofinv_mcu_r) +READ8_MEMBER(retofinv_state::mcu_r) { logerror("%04x: mcu_r %02x\n",space.device().safe_pc(),m_from_mcu); m_mcu_sent = 0; return m_from_mcu; } -READ8_MEMBER(retofinv_state::retofinv_mcu_status_r) +READ8_MEMBER(retofinv_state::mcu_status_r) { int res = 0; diff --git a/src/mame/video/retofinv.c b/src/mame/video/retofinv.c index ab0dc69c808..9c327ad483a 100644 --- a/src/mame/video/retofinv.c +++ b/src/mame/video/retofinv.c @@ -103,6 +103,9 @@ void retofinv_state::video_start() m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(retofinv_state::fg_get_tile_info),this),tilemap_mapper_delegate(FUNC(retofinv_state::tilemap_scan),this),8,8,36,28); m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0); + + save_item(NAME(m_fg_bank)); + save_item(NAME(m_bg_bank)); } @@ -113,19 +116,19 @@ void retofinv_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(retofinv_state::retofinv_bg_videoram_w) +WRITE8_MEMBER(retofinv_state::bg_videoram_w) { m_bg_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(retofinv_state::retofinv_fg_videoram_w) +WRITE8_MEMBER(retofinv_state::fg_videoram_w) { m_fg_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(retofinv_state::retofinv_gfx_ctrl_w) +WRITE8_MEMBER(retofinv_state::gfx_ctrl_w) { switch (offset) { @@ -214,7 +217,7 @@ void retofinv_state::draw_sprites(bitmap_ind16 &bitmap) -UINT32 retofinv_state::screen_update_retofinv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 retofinv_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); draw_sprites(bitmap); diff --git a/src/mame/video/thedeep.c b/src/mame/video/thedeep.c index 01e6dea8fe9..f810cb7da58 100644 --- a/src/mame/video/thedeep.c +++ b/src/mame/video/thedeep.c @@ -63,13 +63,13 @@ TILE_GET_INFO_MEMBER(thedeep_state::get_tile_info_1) 0); } -WRITE8_MEMBER(thedeep_state::thedeep_vram_0_w) +WRITE8_MEMBER(thedeep_state::vram_0_w) { m_vram_0[offset] = data; m_tilemap_0->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(thedeep_state::thedeep_vram_1_w) +WRITE8_MEMBER(thedeep_state::vram_1_w) { m_vram_1[offset] = data; m_tilemap_1->mark_tile_dirty(offset / 2); @@ -202,7 +202,7 @@ void thedeep_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ***************************************************************************/ -UINT32 thedeep_state::screen_update_thedeep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 thedeep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int scrollx = m_scroll[0] + (m_scroll[1]<<8); int scrolly = m_scroll[2] + (m_scroll[3]<<8); -- cgit v1.2.3 From 660442b985901d6184b5bc14c838f45eb53f6a4c Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Mon, 23 Feb 2015 11:48:04 -0500 Subject: thedeep.c: use configured banking (nw) --- src/mame/drivers/thedeep.c | 30 ++++-------------------------- src/mame/includes/thedeep.h | 2 -- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index 86e04014489..cc3db30a16d 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -51,18 +51,18 @@ WRITE8_MEMBER(thedeep_state::sound_w) void thedeep_state::machine_start() { + membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000); save_item(NAME(m_nmi_enable)); save_item(NAME(m_protection_command)); save_item(NAME(m_protection_data)); save_item(NAME(m_protection_index)); save_item(NAME(m_protection_irq)); - save_item(NAME(m_rombank)); save_item(NAME(m_mcu_p3_reg)); } void thedeep_state::machine_reset() { - membank("bank1")->set_base(memregion("maincpu")->base() + 0x10000 + 0 * 0x4000); + membank("bank1")->set_entry(0); m_scroll[0] = 0; m_scroll[1] = 0; m_scroll[2] = 0; @@ -70,7 +70,6 @@ void thedeep_state::machine_reset() m_protection_command = 0; m_protection_index = -1; m_protection_irq = 0; - m_rombank = -1; } WRITE8_MEMBER(thedeep_state::protection_w) @@ -90,15 +89,7 @@ WRITE8_MEMBER(thedeep_state::protection_w) case 0x31: case 0x32: case 0x33: - { - UINT8 *rom; - int new_rombank = m_protection_command & 3; - if (m_rombank == new_rombank) break; - m_rombank = new_rombank; - rom = memregion("maincpu")->base(); - membank("bank1")->set_base(rom + 0x10000 + m_rombank * 0x4000); - - } + membank("bank1")->set_entry(m_protection_command & 3); break; case 0x59: @@ -195,23 +186,10 @@ ADDRESS_MAP_END ***************************************************************************/ -void thedeep_state::maincpu_bankswitch(UINT8 bank_trig) -{ - UINT8 *rom; - int new_rombank = bank_trig & 3; - - if (m_rombank == new_rombank) - return; - m_rombank = new_rombank; - rom = memregion("maincpu")->base(); - membank("bank1")->set_base(rom + 0x10000 + m_rombank * 0x4000); - -} - WRITE8_MEMBER(thedeep_state::p1_w) { flip_screen_set((data & 1) ^ 1); - maincpu_bankswitch((data & 6) >> 1); + membank("bank1")->set_entry((data & 6) >> 1); logerror("P1 %02x\n",data); } diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h index d074b169fdf..9d645964b23 100644 --- a/src/mame/includes/thedeep.h +++ b/src/mame/includes/thedeep.h @@ -31,7 +31,6 @@ public: UINT8 m_protection_data; int m_protection_index; int m_protection_irq; - int m_rombank; tilemap_t *m_tilemap_0; tilemap_t *m_tilemap_1; UINT8 m_mcu_p3_reg; @@ -62,7 +61,6 @@ public: UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void maincpu_bankswitch(UINT8 bank_trig); INTERRUPT_GEN_MEMBER(mcu_irq); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); }; -- cgit v1.2.3 From 9c92d07fb57bda853f5ef0939197f676c579960f Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 23 Feb 2015 19:15:49 +0100 Subject: speedatk: added save state support (nw) --- src/mame/drivers/speedatk.c | 24 +++++++++++++++--------- src/mame/includes/speedatk.h | 34 ++++++++++++++++++++++------------ src/mame/video/speedatk.c | 22 +++++++--------------- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/src/mame/drivers/speedatk.c b/src/mame/drivers/speedatk.c index a342e3871f3..252ac9990b1 100644 --- a/src/mame/drivers/speedatk.c +++ b/src/mame/drivers/speedatk.c @@ -7,7 +7,6 @@ Speed Attack! (c) 1984 Seta Kikaku Corp. driver by Pierpaolo Prazzoli & Angelo Salese, based on early work by David Haywood TODO: - - Video emulation requires a major conversion to the HD46505SP C.R.T. chip (MC6845 clone) - It's possible that there is only one coin chute and not two,needs a real board to know more about it. @@ -79,11 +78,18 @@ PS / PD : key matrix #include "emu.h" #include "cpu/z80/z80.h" #include "sound/ay8910.h" -#include "video/mc6845.h" #include "includes/speedatk.h" #define MASTER_CLOCK XTAL_12MHz +void speedatk_state::machine_start() +{ + save_item(NAME(m_mux_data)); + save_item(NAME(m_km_status)); + save_item(NAME(m_coin_settings)); + save_item(NAME(m_coin_impulse)); +} + UINT8 speedatk_state::iox_key_matrix_calc(UINT8 p_side) { static const char *const keynames[] = { "P1_ROW0", "P1_ROW1", "P2_ROW0", "P2_ROW1" }; @@ -175,14 +181,14 @@ static ADDRESS_MAP_START( speedatk_mem, AS_PROGRAM, 8, speedatk_state ) AM_RANGE(0x8000, 0x8000) AM_READWRITE(key_matrix_r,key_matrix_w) AM_RANGE(0x8001, 0x8001) AM_READWRITE(key_matrix_status_r,key_matrix_status_w) AM_RANGE(0x8800, 0x8fff) AM_RAM - AM_RANGE(0xa000, 0xa3ff) AM_RAM_WRITE(speedatk_videoram_w) AM_SHARE("videoram") - AM_RANGE(0xb000, 0xb3ff) AM_RAM_WRITE(speedatk_colorram_w) AM_SHARE("colorram") + AM_RANGE(0xa000, 0xa3ff) AM_RAM AM_SHARE("videoram") + AM_RANGE(0xb000, 0xb3ff) AM_RAM AM_SHARE("colorram") ADDRESS_MAP_END static ADDRESS_MAP_START( speedatk_io, AS_IO, 8, speedatk_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x01) AM_WRITE(speedatk_6845_w) //h46505 address / data routing + AM_RANGE(0x00, 0x01) AM_WRITE(m6845_w) //h46505 address / data routing AM_RANGE(0x24, 0x24) AM_WRITE(watchdog_reset_w) AM_RANGE(0x40, 0x40) AM_DEVREAD("aysnd", ay8910_device, data_r) AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) @@ -285,7 +291,7 @@ static GFXDECODE_START( speedatk ) GFXDECODE_ENTRY( "gfx2", 0, charlayout_3bpp, 0, 32 ) GFXDECODE_END -WRITE8_MEMBER(speedatk_state::speedatk_output_w) +WRITE8_MEMBER(speedatk_state::output_w) { m_flip_scr = data & 0x80; @@ -308,7 +314,7 @@ static MACHINE_CONFIG_START( speedatk, speedatk_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(320, 256) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(speedatk_state, screen_update_speedatk) + MCFG_SCREEN_UPDATE_DRIVER(speedatk_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/16) /* hand tuned to get ~60 fps */ @@ -325,7 +331,7 @@ static MACHINE_CONFIG_START( speedatk, speedatk_state ) MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/4) //divider is unknown MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW")) - MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(speedatk_state, speedatk_output_w)) + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(speedatk_state, output_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) MACHINE_CONFIG_END @@ -350,4 +356,4 @@ ROM_START( speedatk ) ROM_LOAD( "cb2.bpr", 0x0020, 0x0100, CRC(a604cf96) SHA1(a4ef6e77dcd3abe4c27e8e636222a5ee711a51f5) ) /* lookup table */ ROM_END -GAME( 1984, speedatk, 0, speedatk, speedatk, driver_device, 0, ROT0, "Seta Kikaku Corp.", "Speed Attack! (Japan)", 0 ) +GAME( 1984, speedatk, 0, speedatk, speedatk, driver_device, 0, ROT0, "Seta Kikaku Corp.", "Speed Attack! (Japan)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/speedatk.h b/src/mame/includes/speedatk.h index 67f3fc2364e..383dc2ed0ef 100644 --- a/src/mame/includes/speedatk.h +++ b/src/mame/includes/speedatk.h @@ -1,37 +1,47 @@ +#include "video/mc6845.h" + class speedatk_state : public driver_device { public: speedatk_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), m_maincpu(*this, "maincpu"), + m_crtc(*this, "crtc"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_videoram(*this, "videoram"), + m_colorram(*this, "colorram") { } + + required_device m_maincpu; + required_device m_crtc; + required_device m_gfxdecode; + required_device m_palette; required_shared_ptr m_videoram; required_shared_ptr m_colorram; + UINT8 m_crtc_vreg[0x100]; UINT8 m_crtc_index; UINT8 m_flip_scr; - UINT8 m_mux_data; UINT8 m_km_status; UINT8 m_coin_settings; UINT8 m_coin_impulse; + DECLARE_READ8_MEMBER(key_matrix_r); DECLARE_WRITE8_MEMBER(key_matrix_w); DECLARE_READ8_MEMBER(key_matrix_status_r); DECLARE_WRITE8_MEMBER(key_matrix_status_w); - DECLARE_WRITE8_MEMBER(speedatk_videoram_w); - DECLARE_WRITE8_MEMBER(speedatk_colorram_w); - DECLARE_WRITE8_MEMBER(speedatk_6845_w); - DECLARE_WRITE8_MEMBER(speedatk_output_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(colorram_w); + DECLARE_WRITE8_MEMBER(m6845_w); + DECLARE_WRITE8_MEMBER(output_w); + + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(speedatk); - UINT32 screen_update_speedatk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + UINT8 iox_key_matrix_calc(UINT8 p_side); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; }; diff --git a/src/mame/video/speedatk.c b/src/mame/video/speedatk.c index bd51334d9e9..5f13d636cac 100644 --- a/src/mame/video/speedatk.c +++ b/src/mame/video/speedatk.c @@ -5,7 +5,6 @@ *****************************************************************************************/ #include "emu.h" #include "includes/speedatk.h" -#include "video/mc6845.h" PALETTE_INIT_MEMBER(speedatk_state, speedatk) @@ -50,35 +49,28 @@ PALETTE_INIT_MEMBER(speedatk_state, speedatk) } } -WRITE8_MEMBER(speedatk_state::speedatk_videoram_w) -{ - m_videoram[offset] = data; -} - -WRITE8_MEMBER(speedatk_state::speedatk_colorram_w) -{ - m_colorram[offset] = data; -} - void speedatk_state::video_start() { + save_item(NAME(m_crtc_vreg)); + save_item(NAME(m_crtc_index)); + save_item(NAME(m_flip_scr)); } -WRITE8_MEMBER(speedatk_state::speedatk_6845_w) +WRITE8_MEMBER(speedatk_state::m6845_w) { if(offset == 0) { m_crtc_index = data; - machine().device("crtc")->address_w(space,0,data); + m_crtc->address_w(space,0,data); } else { m_crtc_vreg[m_crtc_index] = data; - machine().device("crtc")->register_w(space,0,data); + m_crtc->register_w(space,0,data); } } -UINT32 speedatk_state::screen_update_speedatk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 speedatk_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x,y; int count; -- cgit v1.2.3 From afa3796da8fea3b7acff8bcafb7c413db2da23ae Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Mon, 23 Feb 2015 14:51:32 -0500 Subject: render.c: render_containers now always make their own copy of the emulation palette for paletted textures, whether or not there are custom brightness/contrast/gamma settings. Fixes -mt color issues in driftout, raphero, etc. without the additional complexity introduced in fde220f4a7e955343c3b25a562d6884f94c63bdc (which has been reverted) (nw) --- src/emu/render.c | 165 +++++++++++----------------------------------- src/emu/render.h | 43 ++---------- src/emu/rendersw.inc | 22 +++---- src/lib/util/palette.h | 1 - src/osd/sdl/blit13.h | 4 +- src/osd/sdl/draw13.c | 4 +- src/osd/sdl/drawogl.c | 18 ++--- src/osd/windows/drawd3d.c | 14 ++-- 8 files changed, 74 insertions(+), 197 deletions(-) diff --git a/src/emu/render.c b/src/emu/render.c index 1fa8bcb5f16..2eed9176550 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -201,71 +201,6 @@ inline item_layer get_layer_and_blendmode(const layout_view &view, int index, in return item_layer(layer); } -//************************************************************************** -// render_texinfo -//************************************************************************** - -render_texinfo &render_texinfo::operator=(const render_texinfo &src) -{ - free_palette(); - base = src.base; - rowpixels = src.rowpixels; - width = src.width; - height = src.height; - seqid = src.seqid; - osddata = src.osddata; - m_palette = src.m_palette; - if (m_palette != NULL) - { - m_palette->ref_count++; - } - return *this; -} - -render_texinfo::render_texinfo(const render_texinfo &src) -{ - base = src.base; - rowpixels = src.rowpixels; - width = src.width; - height = src.height; - seqid = src.seqid; - osddata = src.osddata; - m_palette = src.m_palette; - if (m_palette != NULL) - { - m_palette->ref_count++; - } -} - -void render_texinfo::set_palette(const dynamic_array *source) -{ - free_palette(); - if (source != NULL) - { - m_palette = global_alloc(render_palette_copy); - m_palette->palette.copyfrom(*source); - m_palette->ref_count = 1; - } - else - { - m_palette = NULL; - } -} - -void render_texinfo::free_palette() -{ - if (m_palette != NULL) - { - m_palette->ref_count--; - if (m_palette->ref_count == 0) - { - global_free(m_palette); - } - } - m_palette = NULL; -} - - //************************************************************************** // RENDER PRIMITIVE //************************************************************************** @@ -277,32 +212,8 @@ void render_texinfo::free_palette() void render_primitive::reset() { - // public state - type = INVALID; - container = NULL; - bounds.x0 = 0; - bounds.y0 = 0; - bounds.x1 = 0; - bounds.y1 = 0; - color.a = 0; - color.r = 0; - color.g = 0; - color.b = 0; - flags = 0; - width = 0.0f; - texture.set_palette(NULL); - texture = render_texinfo(); - texcoords.bl.u = 0.0f; - texcoords.bl.v = 0.0f; - texcoords.br.u = 0.0f; - texcoords.br.v = 0.0f; - texcoords.tl.u = 0.0f; - texcoords.tl.v = 0.0f; - texcoords.tr.u = 0.0f; - texcoords.tr.v = 0.0f; - // do not clear m_next! - // memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type)); + memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type)); } @@ -556,8 +467,7 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t texinfo.rowpixels = m_bitmap->rowpixels(); texinfo.width = swidth; texinfo.height = sheight; - // will be set later - texinfo.set_palette(NULL); + // palette will be set later texinfo.seqid = ++m_curseq; } else @@ -611,8 +521,7 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t texinfo.rowpixels = scaled->bitmap->rowpixels(); texinfo.width = dwidth; texinfo.height = dheight; - // will be set later - texinfo.set_palette(NULL); + // palette will be set later texinfo.seqid = scaled->seqid; } } @@ -623,7 +532,7 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t // palette for a texture //------------------------------------------------- -const dynamic_array *render_texture::get_adjusted_palette(render_container &container) +const rgb_t *render_texture::get_adjusted_palette(render_container &container) { // override the palette with our adjusted palette switch (m_format) @@ -633,11 +542,7 @@ const dynamic_array *render_texture::get_adjusted_palette(render_containe assert(m_bitmap->palette() != NULL); - // if no adjustment necessary, return the raw palette - if (!container.has_brightness_contrast_gamma_changes()) - return m_bitmap->palette()->entry_list_adjusted_darray(); - - // otherwise, return our adjusted palette + // return our adjusted palette return container.bcg_lookup_table(m_format, m_bitmap->palette()); case TEXFORMAT_RGB32: @@ -671,8 +576,7 @@ render_container::render_container(render_manager &manager, screen_device *scree m_manager(manager), m_screen(screen), m_overlaybitmap(NULL), - m_overlaytexture(NULL), - m_bcglookup256(0x400) + m_overlaytexture(NULL) { // make sure it is empty empty(); @@ -685,7 +589,7 @@ render_container::render_container(render_manager &manager, screen_device *scree m_user.m_brightness = manager.machine().options().brightness(); m_user.m_contrast = manager.machine().options().contrast(); m_user.m_gamma = manager.machine().options().gamma(); - // can't allocate palette client yet since palette and screen devices aren't started yet + // palette client will be allocated later } recompute_lookups(); @@ -812,7 +716,7 @@ float render_container::apply_brightness_contrast_gamma_fp(float value) // given texture mode //------------------------------------------------- -const dynamic_array *render_container::bcg_lookup_table(int texformat, palette_t *palette) +const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palette) { switch (texformat) { @@ -820,18 +724,17 @@ const dynamic_array *render_container::bcg_lookup_table(int texformat, pa case TEXFORMAT_PALETTEA16: if (m_palclient == NULL) // if adjusted palette hasn't been created yet, create it { - assert(palette == m_screen->palette()->palette()); m_palclient.reset(global_alloc(palette_client(*palette))); m_bcglookup.resize(palette->max_index()); recompute_lookups(); } assert (palette == &m_palclient->palette()); - return &m_bcglookup; + return m_bcglookup; case TEXFORMAT_RGB32: case TEXFORMAT_ARGB32: case TEXFORMAT_YUY16: - return &m_bcglookup256; + return m_bcglookup256; default: return NULL; @@ -916,14 +819,19 @@ void render_container::recompute_lookups() const rgb_t *adjusted_palette = palette.entry_list_adjusted(); int colors = palette.max_index(); - for (int i = 0; i < colors; i++) + if (has_brightness_contrast_gamma_changes()) { - rgb_t newval = adjusted_palette[i]; - m_bcglookup[i] = (newval & 0xff000000) | + for (int i = 0; i < colors; i++) + { + rgb_t newval = adjusted_palette[i]; + m_bcglookup[i] = (newval & 0xff000000) | m_bcglookup256[0x200 + newval.r()] | m_bcglookup256[0x100 + newval.g()] | m_bcglookup256[0x000 + newval.b()]; + } } + else + memcpy(&m_bcglookup[0], adjusted_palette, colors * sizeof(rgb_t)); } } @@ -949,24 +857,29 @@ void render_container::update_palette() palette_t &palette = m_palclient->palette(); const rgb_t *adjusted_palette = palette.entry_list_adjusted(); - // loop over chunks of 32 entries, since we can quickly examine 32 at a time - for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++) + if (has_brightness_contrast_gamma_changes()) { - UINT32 dirtybits = dirty[entry32]; - if (dirtybits != 0) - - // this chunk of 32 has dirty entries; fix them up - for (UINT32 entry = 0; entry < 32; entry++) - if (dirtybits & (1 << entry)) - { - UINT32 finalentry = entry32 * 32 + entry; - rgb_t newval = adjusted_palette[finalentry]; - m_bcglookup[finalentry] = (newval & 0xff000000) | + // loop over chunks of 32 entries, since we can quickly examine 32 at a time + for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++) + { + UINT32 dirtybits = dirty[entry32]; + if (dirtybits != 0) + + // this chunk of 32 has dirty entries; fix them up + for (UINT32 entry = 0; entry < 32; entry++) + if (dirtybits & (1 << entry)) + { + UINT32 finalentry = entry32 * 32 + entry; + rgb_t newval = adjusted_palette[finalentry]; + m_bcglookup[finalentry] = (newval & 0xff000000) | m_bcglookup256[0x200 + newval.r()] | m_bcglookup256[0x100 + newval.g()] | m_bcglookup256[0x000 + newval.b()]; - } + } + } } + else + memcpy(&m_bcglookup[mindirty], &adjusted_palette[mindirty], (maxdirty - mindirty + 1) * sizeof(rgb_t)); } } @@ -1821,13 +1734,9 @@ void render_target::add_container_primitives(render_primitive_list &list, const height = MIN(height, m_maxtexheight); curitem->texture()->get_scaled(width, height, prim->texture, list); + // set the palette -#if 1 - const dynamic_array *adjusted_pal = curitem->texture()->get_adjusted_palette(container); - prim->texture.set_palette(adjusted_pal); -#else prim->texture.palette = curitem->texture()->get_adjusted_palette(container); -#endif // determine UV coordinates and apply clipping prim->texcoords = oriented_texcoords[finalorient]; diff --git a/src/emu/render.h b/src/emu/render.h index 1e518d99651..b434e0db86b 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -209,46 +209,15 @@ struct render_quad_texuv // render_texinfo - texture information - - -struct render_palette_copy -{ - int ref_count; - dynamic_array palette; -}; - -class render_texinfo +struct render_texinfo { -public: - render_texinfo() - : base(NULL), rowpixels(0), width(0), height(0), - seqid(0), osddata(0), m_palette(NULL) - {} - - render_texinfo(const render_texinfo &src); - - ~render_texinfo() - { - free_palette(); - } - - render_texinfo &operator=(const render_texinfo &src); - void * base; // base of the data UINT32 rowpixels; // pixels per row UINT32 width; // width of the image UINT32 height; // height of the image UINT32 seqid; // sequence ID UINT64 osddata; // aux data to pass to osd - - const rgb_t * palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); } - - void set_palette(const dynamic_array *source); - -private: - void free_palette(); - - render_palette_copy *m_palette; // palette for PALETTE16 textures, LUTs for RGB15/RGB32 + const rgb_t * palette; // palette for PALETTE16 textures, bcg lookup table for RGB32/YUY16 }; @@ -465,7 +434,7 @@ public: private: // internal helpers void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist); - const dynamic_array *get_adjusted_palette(render_container &container); + const rgb_t *get_adjusted_palette(render_container &container); static const int MAX_TEXTURE_SCALES = 8; @@ -555,7 +524,7 @@ public: bool has_brightness_contrast_gamma_changes() const { return (m_user.m_brightness != 1.0f || m_user.m_contrast != 1.0f || m_user.m_gamma != 1.0f); } UINT8 apply_brightness_contrast_gamma(UINT8 value); float apply_brightness_contrast_gamma_fp(float value); - const dynamic_array *bcg_lookup_table(int texformat, palette_t *palette = NULL); + const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = NULL); private: // an item describes a high level primitive that is added to a container @@ -606,8 +575,8 @@ private: bitmap_argb32 * m_overlaybitmap; // overlay bitmap render_texture * m_overlaytexture; // overlay texture auto_pointer m_palclient; // client to the screen palette - dynamic_array m_bcglookup; // full palette lookup with bcg adjustments - dynamic_array m_bcglookup256; // lookup table for brightness/contrast/gamma + dynamic_array m_bcglookup; // copy of screen palette with bcg adjustment + rgb_t m_bcglookup256[0x400]; // lookup table for brightness/contrast/gamma }; diff --git a/src/emu/rendersw.inc b/src/emu/rendersw.inc index 7c03680a1cd..aefe09183a1 100644 --- a/src/emu/rendersw.inc +++ b/src/emu/rendersw.inc @@ -130,7 +130,7 @@ private: static inline UINT32 get_texel_palette16(const render_texinfo &texture, INT32 curu, INT32 curv) { - const rgb_t *palbase = texture.palette(); + const rgb_t *palbase = texture.palette; if (_BilinearFilter) { INT32 u0 = curu >> 16; @@ -166,7 +166,7 @@ private: static inline UINT32 get_texel_palette16a(const render_texinfo &texture, INT32 curu, INT32 curv) { - const rgb_t *palbase = texture.palette(); + const rgb_t *palbase = texture.palette; if (_BilinearFilter) { INT32 u0 = curu >> 16; @@ -622,7 +622,7 @@ private: INT32 endx = setup.endx; // ensure all parameters are valid - assert(prim.texture.palette() != NULL); + assert(prim.texture.palette != NULL); // fast case: no coloring, no alpha if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) @@ -730,7 +730,7 @@ private: INT32 endx = setup.endx; // ensure all parameters are valid - assert(prim.texture.palette() != NULL); + assert(prim.texture.palette != NULL); // fast case: no coloring, no alpha if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) @@ -823,7 +823,7 @@ private: INT32 endx = setup.endx; // ensure all parameters are valid - assert(prim.texture.palette() != NULL); + assert(prim.texture.palette != NULL); // fast case: no coloring, no alpha if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) @@ -914,7 +914,7 @@ private: static void draw_quad_yuy16_none(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -1084,7 +1084,7 @@ private: static void draw_quad_rgb32(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -1254,7 +1254,7 @@ private: static void draw_quad_rgb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -1392,7 +1392,7 @@ private: static void draw_quad_argb32_alpha(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -1538,7 +1538,7 @@ private: static void draw_quad_argb32_multiply(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; @@ -1657,7 +1657,7 @@ private: static void draw_quad_argb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup) { - const rgb_t *palbase = prim.texture.palette(); + const rgb_t *palbase = prim.texture.palette; INT32 dudx = setup.dudx; INT32 dvdx = setup.dvdx; INT32 endx = setup.endx; diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h index 23d11416053..939138e613d 100644 --- a/src/lib/util/palette.h +++ b/src/lib/util/palette.h @@ -170,7 +170,6 @@ public: // entry list getters const rgb_t *entry_list_raw() const { return m_entry_color; } - const dynamic_array *entry_list_adjusted_darray() const { return &m_adjusted_color; } const rgb_t *entry_list_adjusted() const { return m_adjusted_color; } const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; } diff --git a/src/osd/sdl/blit13.h b/src/osd/sdl/blit13.h index 1fe4eb4aeb2..ad935941036 100644 --- a/src/osd/sdl/blit13.h +++ b/src/osd/sdl/blit13.h @@ -139,7 +139,7 @@ struct blit_texcopy : public blit_base blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { } void texop(const texture_info *texture, const render_texinfo *texsource) const { - ATTR_UNUSED const rgb_t *palbase = texsource->palette(); + ATTR_UNUSED const rgb_t *palbase = texsource->palette; int x, y; /* loop over Y */ for (y = 0; y < texsource->height; y++) { @@ -166,7 +166,7 @@ struct blit_texrot : public blit_base blit_texrot() : blit_base(sizeof(_dest_type), true, false) { } void texop(const texture_info *texture, const render_texinfo *texsource) const { - ATTR_UNUSED const rgb_t *palbase = texsource->palette(); + ATTR_UNUSED const rgb_t *palbase = texsource->palette; int x, y; const quad_setup_data *setup = &texture->m_setup; int dudx = setup->dudx; diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index 25579aa57c3..d75e2ca0b2b 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -874,7 +874,7 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour m_format = SDL_TEXFORMAT_ARGB32; break; case TEXFORMAT_RGB32: - m_format = texsource.palette() ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32; + m_format = texsource.palette ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32; break; case TEXFORMAT_PALETTE16: m_format = SDL_TEXFORMAT_PALETTE16; @@ -883,7 +883,7 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour m_format = SDL_TEXFORMAT_PALETTE16A; break; case TEXFORMAT_YUY16: - m_format = texsource.palette() ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16; + m_format = texsource.palette ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16; break; default: diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c index 47dacb01aa9..09bcf9479eb 100644 --- a/src/osd/sdl/drawogl.c +++ b/src/osd/sdl/drawogl.c @@ -1816,7 +1816,7 @@ void sdl_info_ogl::texture_compute_type_subroutine(const render_texinfo *texsour if ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] && !texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_HAS_PALETTE] && texture->xprescale == 1 && texture->yprescale == 1 && - !texture->borderpix && !texsource->palette() && + !texture->borderpix && !texsource->palette && texsource->rowpixels <= m_texture_max_width ) { texture->nocopy = TRUE; @@ -2263,7 +2263,7 @@ texture_info *sdl_info_ogl::texture_create(const render_texinfo *texsource, UINT texture->format = SDL_TEXFORMAT_ARGB32; break; case TEXFORMAT_RGB32: - if (texsource->palette() != NULL) + if (texsource->palette != NULL) texture->format = SDL_TEXFORMAT_RGB32_PALETTED; else texture->format = SDL_TEXFORMAT_RGB32; @@ -2275,7 +2275,7 @@ texture_info *sdl_info_ogl::texture_create(const render_texinfo *texsource, UINT texture->format = SDL_TEXFORMAT_PALETTE16A; break; case TEXFORMAT_YUY16: - if (texsource->palette() != NULL) + if (texsource->palette != NULL) texture->format = SDL_TEXFORMAT_YUY16_PALETTED; else texture->format = SDL_TEXFORMAT_YUY16; @@ -2717,23 +2717,23 @@ static void texture_set_data(texture_info *texture, const render_texinfo *texsou switch (PRIMFLAG_GET_TEXFORMAT(flags)) { case TEXFORMAT_PALETTE16: - copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_PALETTEA16: - copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_RGB32: - copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_ARGB32: - copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; case TEXFORMAT_YUY16: - copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale); + copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale); break; default: @@ -2806,7 +2806,7 @@ static int compare_texture_primitive(const texture_info *texture, const render_p texture->texinfo.width == prim->texture.width && texture->texinfo.height == prim->texture.height && texture->texinfo.rowpixels == prim->texture.rowpixels && - /* texture->texinfo.palette() == prim->texture.palette() && */ + /* texture->texinfo.palette == prim->texture.palette && */ ((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0) return 1; else diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index d1d209a101c..9fe0a65ea17 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -2544,28 +2544,28 @@ void texture_info::set_data(const render_texinfo *texsource, UINT32 flags) switch (PRIMFLAG_GET_TEXFORMAT(flags)) { case TEXFORMAT_PALETTE16: - copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_PALETTEA16: - copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_RGB32: - copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_ARGB32: - copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; case TEXFORMAT_YUY16: if (m_texture_manager->get_yuv_format() == D3DFMT_YUY2) - copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); else if (m_texture_manager->get_yuv_format() == D3DFMT_UYVY) - copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); else - copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix); + copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix); break; default: -- cgit v1.2.3 From c777abab49a4712694e0e23728c42fc22b2df4cc Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Feb 2015 22:04:25 +0100 Subject: add q-sound amp board notes --- src/mame/drivers/cps2.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 6974f32be0f..9b3ef8f5741 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -474,6 +474,32 @@ Notes: and C only. Both FlashROMs are located on the same side of the SIMM. +Q-Sound Amp board + +CAPCOM CPB-001A +|--------------------| +| B Rch Lch | +| | +| IC1 | +| | +| IC2 IC3 | +| | +| | +| | +| | +| |||| | +|--------------------| + +Notes: + 2 RCA cables from A-board CN L/R go in at the top. The audio goes through + Mitsumi MM1326 series "Q Expander" ICs responsible for creating the 3D stereo + effect. The 4-pin connector at the bottom goes to the cabinet speakers. + + IC1 - don't know yet which chip is which + IC2 - " + IC3 - " + + Communication Board TOURNAMENT CAPCOM 93656D-3 -- cgit v1.2.3 From 9a9b7ea3d12eec05f1529e28895239cc36bc6974 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Feb 2015 22:14:09 +0100 Subject: add cps1 video measurements by CharlesM --- src/mame/drivers/cps2.c | 2 +- src/mame/includes/cps1.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 9b3ef8f5741..c785c28c8df 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -482,7 +482,7 @@ CAPCOM CPB-001A | | | IC1 | | | -| IC2 IC3 | +| IC3 IC2 | | | | | | | diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index d8e7bd75f16..437a96799b5 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -17,6 +17,14 @@ // measured clocks: // CPS2(Guru): V = 59.6376Hz, H = 15,4445kHz *H is probably measured too low! // CPS1 GNG: V = 59.61Hz +/* CPS1(Charles MacDonald): + Pixel clock: 8.00 MHz + Total pixel clocks per scanline: 512 clocks + Horizontal sync pulse width : 36 clocks + Horizontal display and blanking period: 476 clocks + Frame size: 262 scanlines + Refresh rate: 59.63 MHz. +*/ #define CPS_PIXEL_CLOCK (XTAL_16MHz/2) #define CPS_HTOTAL (512) -- cgit v1.2.3 From 757335d04813cc85efb3783833d79001b78e461d Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Mon, 23 Feb 2015 16:54:55 -0500 Subject: Whoops, I knew I'd miss something in src/osd/windows (nw) --- src/osd/windows/d3dhlsl.c | 2 +- src/osd/windows/drawd3d.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c index 8a10a105e76..8e2e839db3a 100644 --- a/src/osd/windows/d3dhlsl.c +++ b/src/osd/windows/d3dhlsl.c @@ -927,7 +927,7 @@ int shaders::create_resources(bool reset) texture.rowpixels = shadow_bitmap.rowpixels(); texture.width = shadow_bitmap.width(); texture.height = shadow_bitmap.height(); - texture.set_palette(NULL); + texture.palette = NULL; texture.seqid = 0; // FIXME: should shadow bitmap really use prescale? diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index 9fe0a65ea17..74a0f562440 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -500,7 +500,7 @@ void texture_manager::create_resources() texture.rowpixels = m_default_bitmap.rowpixels(); texture.width = m_default_bitmap.width(); texture.height = m_default_bitmap.height(); - texture.set_palette(NULL); + texture.palette = NULL; texture.seqid = 0; // now create it @@ -517,7 +517,7 @@ void texture_manager::create_resources() texture.rowpixels = m_vector_bitmap.rowpixels(); texture.width = m_vector_bitmap.width(); texture.height = m_vector_bitmap.height(); - texture.set_palette(NULL); + texture.palette = NULL; texture.seqid = 0; // now create it -- cgit v1.2.3 From c1b6c93576e576847a45a41ed34bedce42d23bbb Mon Sep 17 00:00:00 2001 From: mahlemiut Date: Tue, 24 Feb 2015 11:30:48 +1300 Subject: amstrad: added support for the Dobbertin Smart Watch --- src/emu/bus/bus.mak | 1 + src/emu/bus/cpc/smartwatch.c | 89 ++++++++++++++++++++++++++++++++++++++++++++ src/emu/bus/cpc/smartwatch.h | 46 +++++++++++++++++++++++ src/mess/drivers/amstrad.c | 2 + src/mess/includes/amstrad.h | 1 + src/mess/machine/amstrad.c | 6 +-- 6 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 src/emu/bus/cpc/smartwatch.c create mode 100644 src/emu/bus/cpc/smartwatch.h diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index efc2cd80804..152ffa26890 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -1371,6 +1371,7 @@ BUSOBJS += $(BUSOBJ)/cpc/mface2.o BUSOBJS += $(BUSOBJ)/cpc/symbfac2.o BUSOBJS += $(BUSOBJ)/cpc/amdrum.o BUSOBJS += $(BUSOBJ)/cpc/playcity.o +BUSOBJS += $(BUSOBJ)/cpc/smartwatch.o endif #------------------------------------------------- diff --git a/src/emu/bus/cpc/smartwatch.c b/src/emu/bus/cpc/smartwatch.c new file mode 100644 index 00000000000..cb82fba853d --- /dev/null +++ b/src/emu/bus/cpc/smartwatch.c @@ -0,0 +1,89 @@ +/* + Dobbertin Smartwatch + + Created: 23/2/2015 + + TODO: setting the time (requires the DS1315 core to be able to do this, + at the moment it just reads the current time) +*/ + +#include "emu.h" +#include "smartwatch.h" +#include "includes/amstrad.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type CPC_SMARTWATCH = &device_creator; + + +static MACHINE_CONFIG_FRAGMENT( cpc_smartwatch ) + MCFG_DS1315_ADD("rtc") + // no pass-through (?) +MACHINE_CONFIG_END + +machine_config_constructor cpc_smartwatch_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( cpc_smartwatch ); +} + +ROM_START( cpc_smartwatch ) + ROM_REGION( 0x4000, "exp_rom", 0 ) + ROM_LOAD( "timerom+.rom", 0x0000, 0x4000, CRC(ed42a147) SHA1(61750d0535a1fbf2a4addad9def332cbcf8917c3) ) +ROM_END + +const rom_entry *cpc_smartwatch_device::device_rom_region() const +{ + return ROM_NAME( cpc_smartwatch ); +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +cpc_smartwatch_device::cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, CPC_SMARTWATCH, "Dobbertin Smartwatch", tag, owner, clock, "cpc_smartwatch", __FILE__), + device_cpc_expansion_card_interface(mconfig, *this), + m_rtc(*this,"rtc") +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void cpc_smartwatch_device::device_start() +{ + m_slot = dynamic_cast(owner()); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void cpc_smartwatch_device::device_reset() +{ + device_t* cpu = machine().device(":maincpu"); + address_space& space = cpu->memory().space(AS_PROGRAM); + space.install_read_handler(0xc000,0xc001,0,0,read8_delegate(FUNC(cpc_smartwatch_device::rtc_w),this)); + space.install_read_handler(0xc004,0xc004,0,0,read8_delegate(FUNC(cpc_smartwatch_device::rtc_r),this)); + m_bank = membank(":bank7"); +} + +READ8_MEMBER(cpc_smartwatch_device::rtc_w) +{ + UINT8* bank = (UINT8*)m_bank->base(); + if(offset & 1) + m_rtc->read_1(space,0); + else + m_rtc->read_0(space,0); + return bank[offset & 1]; +} + +READ8_MEMBER(cpc_smartwatch_device::rtc_r) +{ + UINT8* bank = (UINT8*)m_bank->base(); + return ((bank[(offset & 1)+4]) & 0xfe) | (m_rtc->read_data(space,0) & 0x01); +} diff --git a/src/emu/bus/cpc/smartwatch.h b/src/emu/bus/cpc/smartwatch.h new file mode 100644 index 00000000000..aacdd085981 --- /dev/null +++ b/src/emu/bus/cpc/smartwatch.h @@ -0,0 +1,46 @@ +/* + Dobbertin Smartwatch + + Dallas DS1216 Smartwatch + DS1315 Phantom Time chip + + Further info at: http://www.cpcwiki.eu/index.php/Dobbertin_Smart_Watch + +*/ + +#ifndef SMARTWATCH_H_ +#define SMARTWATCH_H_ + +#include "emu.h" +#include "cpcexp.h" +#include "machine/ds1315.h" + +class cpc_smartwatch_device : public device_t, + public device_cpc_expansion_card_interface +{ +public: + // construction/destruction + cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual const rom_entry *device_rom_region() const; + + DECLARE_READ8_MEMBER(rtc_w); + DECLARE_READ8_MEMBER(rtc_r); +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + +private: + cpc_expansion_slot_device *m_slot; + + required_device m_rtc; + memory_bank* m_bank; +}; + +// device type definition +extern const device_type CPC_SMARTWATCH; + + +#endif /* SMARTWATCH_H_ */ diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c index 6ee05b85a3c..f7557ede3ba 100644 --- a/src/mess/drivers/amstrad.c +++ b/src/mess/drivers/amstrad.c @@ -804,6 +804,7 @@ SLOT_INTERFACE_START(cpc_exp_cards) SLOT_INTERFACE("sf2", CPC_SYMBIFACE2) SLOT_INTERFACE("amdrum", CPC_AMDRUM) SLOT_INTERFACE("playcity", CPC_PLAYCITY) + SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE_END SLOT_INTERFACE_START(cpcplus_exp_cards) @@ -816,6 +817,7 @@ SLOT_INTERFACE_START(cpcplus_exp_cards) SLOT_INTERFACE("sf2", CPC_SYMBIFACE2) SLOT_INTERFACE("amdrum", CPC_AMDRUM) SLOT_INTERFACE("playcity", CPC_PLAYCITY) + SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH) SLOT_INTERFACE_END SLOT_INTERFACE_START(amstrad_centronics_devices) diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h index 707eb8d157d..f186158df8a 100644 --- a/src/mess/includes/amstrad.h +++ b/src/mess/includes/amstrad.h @@ -23,6 +23,7 @@ #include "bus/cpc/symbfac2.h" #include "bus/cpc/amdrum.h" #include "bus/cpc/playcity.h" +#include "bus/cpc/smartwatch.h" #include "machine/ram.h" #include "imagedev/cassette.h" #include "bus/centronics/ctronics.h" diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 8600075be1d..54997ce7b58 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -2918,7 +2918,7 @@ void amstrad_state::enumerate_roms() void amstrad_state::amstrad_common_init() { - address_space &space = m_maincpu->space(AS_PROGRAM); +// address_space &space = m_maincpu->space(AS_PROGRAM); m_aleste_mode = 0; @@ -2928,7 +2928,7 @@ void amstrad_state::amstrad_common_init() m_GateArray_RamConfiguration = 0; m_gate_array.hsync_counter = 2; - space.install_read_bank(0x0000, 0x1fff, "bank1"); +/* space.install_read_bank(0x0000, 0x1fff, "bank1"); space.install_read_bank(0x2000, 0x3fff, "bank2"); space.install_read_bank(0x4000, 0x5fff, "bank3"); @@ -2951,7 +2951,7 @@ void amstrad_state::amstrad_common_init() space.install_write_bank(0xc000, 0xdfff, "bank15"); space.install_write_bank(0xe000, 0xffff, "bank16"); - +*/ enumerate_roms(); m_maincpu->reset(); -- cgit v1.2.3