From c84fbdded6db53323f44a1257e97a9a750d7580e Mon Sep 17 00:00:00 2001 From: Kaz <> Date: Mon, 6 Feb 2017 15:52:38 -0500 Subject: Corrected the main crystal in marineb.cpp to 12MHz as seen in PCB photos. Cleaned up clock definitions in galaxian driver. Moved ladybugg from galaxold to galaxian drivers. --- src/mame/audio/galaxian.cpp | 7 ++- src/mame/drivers/1942.cpp | 14 +++--- src/mame/drivers/galaxian.cpp | 65 +++++++++++++++++++++++- src/mame/drivers/galaxold.cpp | 114 ++++++++++-------------------------------- src/mame/drivers/marineb.cpp | 8 +-- src/mame/includes/galaxian.h | 2 +- src/mame/includes/galaxold.h | 2 - src/mame/includes/marineb.h | 5 ++ src/mame/machine/galaxold.cpp | 6 --- src/mame/video/galaxold.cpp | 18 ------- 10 files changed, 112 insertions(+), 129 deletions(-) diff --git a/src/mame/audio/galaxian.cpp b/src/mame/audio/galaxian.cpp index 7425c98e712..412e4f15183 100644 --- a/src/mame/audio/galaxian.cpp +++ b/src/mame/audio/galaxian.cpp @@ -24,6 +24,7 @@ TODO: #include "emu.h" #include "audio/galaxian.h" +#include "includes/galaxian.h" /************************************* * @@ -31,10 +32,8 @@ TODO: * *************************************/ -#define XTAL 18432000 - -#define SOUND_CLOCK (XTAL/6/2) /* 1.536 MHz */ -#define RNG_RATE (XTAL/3*2) /* RNG clock is XTAL/3*2 see Aaron's note in video/galaxian.c */ +#define SOUND_CLOCK (GALAXIAN_MASTER_CLOCK/6/2) /* 1.536 MHz */ +#define RNG_RATE (GALAXIAN_MASTER_CLOCK/3*2) /* RNG clock is XTAL/3*2 see Aaron's note in video/galaxian.c */ /* 74LS259 */ #define GAL_INP_BG_DAC NODE_10 /* at 9M Q4 to Q7 in schematics */ diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp index 0d991fd1e1f..95d49796004 100644 --- a/src/mame/drivers/1942.cpp +++ b/src/mame/drivers/1942.cpp @@ -62,13 +62,15 @@ correctly. ***************************************************************************/ /* 12mhz OSC */ -#define MAIN_CPU_CLOCK (XTAL_12MHz/3) -#define SOUND_CPU_CLOCK (XTAL_12MHz/4) -#define AUDIO_CLOCK (XTAL_12MHz/8) +#define MASTER_CLOCK (XTAL_12MHz) +#define MAIN_CPU_CLOCK (MASTER_CLOCK/3) +#define SOUND_CPU_CLOCK (MASTER_CLOCK/4) +#define AUDIO_CLOCK (MASTER_CLOCK/8) /* 20mhz OSC - both Z80s are 4 MHz */ -#define MAIN_CPU_CLOCK_1942P (XTAL_20MHz/5) -#define SOUND_CPU_CLOCK_1942P (XTAL_20MHz/5) -#define AUDIO_CLOCK_1942P (XTAL_20MHz/16) +#define MASTER_CLOCK_1942P (XTAL_20MHz) +#define MAIN_CPU_CLOCK_1942P (MASTER_CLOCK_1942P/5) +#define SOUND_CPU_CLOCK_1942P (MASTER_CLOCK_1942P/5) +#define AUDIO_CLOCK_1942P (MASTER_CLOCK_1942P/16) #include "emu.h" #include "cpu/z80/z80.h" diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 02c29f8e765..6d7bfac7a13 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -666,7 +666,7 @@ TODO: #include "sound/volt_reg.h" -#define KONAMI_SOUND_CLOCK 14318000 +#define KONAMI_SOUND_CLOCK XTAL_14_31818MHz @@ -2789,6 +2789,47 @@ static INPUT_PORTS_START( batman2 ) INPUT_PORTS_END +/* verified from Z80 code */ +static INPUT_PORTS_START( ladybugg ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL + PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) + + PORT_START("IN2") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Medium ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x04, "5" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + + static INPUT_PORTS_START( streakng ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -8681,6 +8722,27 @@ ROM_START( batman2 ) /* wasn't marked as artic multi-system, but it's basically ROM_LOAD( "l06_prom.bin", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END +ROM_START( ladybugg ) /* Arctic Multi-System? */ + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "lbuggx.1", 0x0000, 0x0800, CRC(e67e241d) SHA1(42b8eaca71c6b346ab54bc722850d6e6d169c517) ) + ROM_LOAD( "lbuggx.2", 0x0800, 0x0800, CRC(3cb1fb9a) SHA1(ee76758c94329dfcc740571195a74d9242aaf49f) ) + ROM_LOAD( "lbuggx.3", 0x1000, 0x0800, CRC(0937009e) SHA1(ef57ebf3d6ab3d6ac0e1faa10c3109d2c80a1248) ) + ROM_LOAD( "lbuggx.4", 0x1800, 0x0800, CRC(3e773f62) SHA1(6348e61f48e5d1f04289098c4c0395335ea5e2a5) ) + ROM_LOAD( "lbuggx.5", 0x2000, 0x0800, CRC(2b0d42e5) SHA1(1547b8127f964eb10862b566f5779f8011c3441d) ) + ROM_LOAD( "lbuggx.6", 0x2800, 0x0800, CRC(159f9433) SHA1(93341a4de1e1e4a3fb004019fc1edba73db6a4c8) ) + ROM_LOAD( "lbuggx.7", 0x3000, 0x0800, CRC(f2be06d5) SHA1(1354332d2d107ad810aa2e261b595285394dfb49) ) + ROM_LOAD( "lbuggx.8", 0x3800, 0x0800, CRC(646fe79f) SHA1(03223d6c4f9050fd6c1c313f0e366ab4989feca4) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "lbuggx.a", 0x0800, 0x0800, CRC(7efb9dc5) SHA1(5e02ea8cd1a1c8efa6708a8615cc2dc9da65a455) ) + ROM_CONTINUE ( 0x0000, 0x0800) + ROM_LOAD( "lbuggx.b", 0x1800, 0x0800, CRC(351d4ddc) SHA1(048e8a60e57c6eb0a4d7c2175ddd46c4273756c5) ) + ROM_CONTINUE ( 0x1000, 0x0800) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "lbuggx.clr", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) +ROM_END + ROM_START( atlantisb ) /* Artic Multi-System */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1", 0x0000, 0x0800, CRC(2b612351) SHA1(cfd244946190c062146716c0417c35be216943e4) ) /* aka "subfury" */ @@ -11661,6 +11723,7 @@ GAME( 1981, pacmanblb, puckman, pacmanbl, pacmanblb, galaxian_state, pacma GAME( 1981, ghostmun, puckman, pacmanbl, streakng, galaxian_state, ghostmun, ROT90, "bootleg (Leisure and Allied)", "Ghost Muncher", MACHINE_SUPPORTS_SAVE ) GAME( 1981, phoenxp2, phoenix, galaxian, phoenxp2, galaxian_state, batman2, ROT270, "bootleg", "Phoenix Part 2", MACHINE_SUPPORTS_SAVE ) GAME( 1981, batman2, phoenix, galaxian, batman2, galaxian_state, batman2, ROT270, "bootleg", "Batman Part 2", MACHINE_SUPPORTS_SAVE ) /* similar to pisces, but with different video banking characteristics */ +GAME( 1983, ladybugg, ladybug, galaxian, ladybugg, galaxian_state, batman2, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, atlantisb, atlantis, galaxian, atlantib, galaxian_state, galaxian, ROT270, "bootleg", "Battle of Atlantis (bootleg)", MACHINE_SUPPORTS_SAVE ) // I don't know if this should have a starfield... GAME( 1982, tenspot, 0, tenspot, tenspot, galaxian_state, tenspot, ROT270, "Thomas Automatics", "Ten Spot", MACHINE_NOT_WORKING ) // work out how menu works diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp index 24c10ab71cc..7711f5e446b 100644 --- a/src/mame/drivers/galaxold.cpp +++ b/src/mame/drivers/galaxold.cpp @@ -637,7 +637,7 @@ static ADDRESS_MAP_START( hunchbkg, AS_PROGRAM, 8, galaxold_state ) AM_RANGE(0x6000, 0x6fff) AM_ROM ADDRESS_MAP_END -/* majorly shifted, hunchbkg style */ +/* hunchbkg style */ static ADDRESS_MAP_START( spcwarp, AS_PROGRAM, 8, galaxold_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x1480, 0x14bf) AM_MIRROR(0x6000) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram") @@ -1761,48 +1761,6 @@ static INPUT_PORTS_START( ozon1 ) PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END - -/* verified from Z80 code */ -static INPUT_PORTS_START( ladybugg ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) - - PORT_START("IN2") - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Medium ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x04, "5" ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) - PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) -INPUT_PORTS_END - - static INPUT_PORTS_START( hunchbkg ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -2251,16 +2209,7 @@ static MACHINE_CONFIG_DERIVED( galaxian, galaxold_base ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( batman2, galaxian ) - - /* basic machine hardware */ - - /* video hardware */ - MCFG_VIDEO_START_OVERRIDE(galaxold_state,batman2) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( mooncrst, galaxian ) +static MACHINE_CONFIG_DERIVED( mooncrst, galaxold_base ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") @@ -2268,6 +2217,9 @@ static MACHINE_CONFIG_DERIVED( mooncrst, galaxian ) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(galaxold_state,mooncrst) + + /* sound hardware */ + MCFG_FRAGMENT_ADD(mooncrst_audio) MACHINE_CONFIG_END // 'Videotron' @@ -2368,7 +2320,7 @@ static MACHINE_CONFIG_DERIVED( 4in1, galaxian ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( bagmanmc, galaxian ) +static MACHINE_CONFIG_DERIVED( bagmanmc, mooncrst ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") @@ -2381,7 +2333,7 @@ static MACHINE_CONFIG_DERIVED( bagmanmc, galaxian ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( dkongjrm, galaxian ) +static MACHINE_CONFIG_DERIVED( dkongjrm, mooncrst ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") @@ -2501,7 +2453,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( spcwarp, hunchbkg ) - /* hunchbkg but with different banking */ + /* hunchbkg, but with a different memory map */ /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(spcwarp) @@ -2581,7 +2533,7 @@ static MACHINE_CONFIG_DERIVED( ckongg, galaxian ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( ckongmc, galaxian ) +static MACHINE_CONFIG_DERIVED( ckongmc, mooncrst ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") @@ -3176,27 +3128,6 @@ ROM_START( ozon1 ) ROM_LOAD( "ozon1.clr", 0x0000, 0x0020, CRC(605ea6e9) SHA1(d3471e6ef756059c2f7feb32fb8e41181cc1718e) ) ROM_END -ROM_START( ladybugg ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "lbuggx.1", 0x0000, 0x0800, CRC(e67e241d) SHA1(42b8eaca71c6b346ab54bc722850d6e6d169c517) ) - ROM_LOAD( "lbuggx.2", 0x0800, 0x0800, CRC(3cb1fb9a) SHA1(ee76758c94329dfcc740571195a74d9242aaf49f) ) - ROM_LOAD( "lbuggx.3", 0x1000, 0x0800, CRC(0937009e) SHA1(ef57ebf3d6ab3d6ac0e1faa10c3109d2c80a1248) ) - ROM_LOAD( "lbuggx.4", 0x1800, 0x0800, CRC(3e773f62) SHA1(6348e61f48e5d1f04289098c4c0395335ea5e2a5) ) - ROM_LOAD( "lbuggx.5", 0x2000, 0x0800, CRC(2b0d42e5) SHA1(1547b8127f964eb10862b566f5779f8011c3441d) ) - ROM_LOAD( "lbuggx.6", 0x2800, 0x0800, CRC(159f9433) SHA1(93341a4de1e1e4a3fb004019fc1edba73db6a4c8) ) - ROM_LOAD( "lbuggx.7", 0x3000, 0x0800, CRC(f2be06d5) SHA1(1354332d2d107ad810aa2e261b595285394dfb49) ) - ROM_LOAD( "lbuggx.8", 0x3800, 0x0800, CRC(646fe79f) SHA1(03223d6c4f9050fd6c1c313f0e366ab4989feca4) ) - - ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "lbuggx.a", 0x0800, 0x0800, CRC(7efb9dc5) SHA1(5e02ea8cd1a1c8efa6708a8615cc2dc9da65a455) ) - ROM_CONTINUE ( 0x0000, 0x0800) - ROM_LOAD( "lbuggx.b", 0x1800, 0x0800, CRC(351d4ddc) SHA1(048e8a60e57c6eb0a4d7c2175ddd46c4273756c5) ) - ROM_CONTINUE ( 0x1000, 0x0800) - - ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "lbuggx.clr", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) -ROM_END - ROM_START( hunchbkg ) ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "gal_hb_1", 0x0000, 0x0800, CRC(46590e9b) SHA1(5d26578c91adec20d8d8a17d5dade9ef2febcbe5) ) @@ -3216,25 +3147,35 @@ ROM_START( hunchbkg ) ROM_LOAD( "gal_hb_cp", 0x0000, 0x0020, CRC(cbff6762) SHA1(4515a6e12a0a5c485a55291feee17a571120a549) ) ROM_END +/* +For all we know, this could be anything, but the text in ROM confirms the +copyright (swarpt7f.bin): + +"COPYRIGHT 1983" +"CENTURY ELECTRONICS LTD" + +...and the GFX ROMs contain graphics similar to Cosmos, so it could be +Space Warp after all. + +Due to how incomplete this dump is (missing ROM, one corrupted), there is +very little to be worked on, but so far, using a variation of hunchbkg's +memory map and inputs work, atleast until it crashes on the title screen. +*/ + ROM_START( spcwarp ) - // conversion of 'cosmos' (cvs.c) to Galaxian hardware - // notes: - // -came out of an unemulated games collection - may or may not be actually spcwarp but it's unique - // -uses hunchbkg hardware with a different map - // -the game likely calls a checksum check every 10 frames, causes game to freeze (probably because of bad ROM) - // -so far using hunchbkg inputs work - // -text in ROM confirms year of release and company; ASCII shows "COPYRIGHT 1983", "CENTURY ELECTRONICS UK LTD" in swarpt7f.bin ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "swarpt7f.bin", 0x0000, 0x1000, CRC(04d744e3) SHA1(db8218510052a05670cb0b722b73d3f10464788c) ) ROM_LOAD( "swarpt7h.bin", 0x2000, 0x1000, CRC(34a36536) SHA1(bc438515618683b2a7c29637871ee00ed95ad7f8) ) + /* missing ROM at $4000 */ ROM_LOAD( "swarpt7m.bin", 0x6000, 0x1000, BAD_DUMP CRC(a2dff6c8) SHA1(d1c72848450dc5ff386dc94a26e4bf704ccc7121) ) /* ROMCMP reports "BADADDR xxxxxx-xxxxx". Observed data sequence repeated every 32 bytes */ ROM_REGION( 0x1000, "gfx1", 0 ) ROM_LOAD( "swarpb1h.bin", 0x0000, 0x0800, CRC(6ee3b5f7) SHA1(8150f2ecd59d3a165c0541b550664c56d049edd5) ) ROM_LOAD( "swarpb1k.bin", 0x0800, 0x0800, CRC(da4cee6b) SHA1(28b91381658f598fa62049489beee443232825c6) ) + /* using hunchbkg proms for now */ ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "clr", 0x0000, 0x0020, NO_DUMP ) + ROM_LOAD( "gal_hb_cp", 0x0000, 0x0020, BAD_DUMP CRC(cbff6762) SHA1(4515a6e12a0a5c485a55291feee17a571120a549) ) ROM_END @@ -3511,7 +3452,6 @@ GAME( 1982, tazzmang, tazmania, tazzmang, tazzmang, driver_device, 0, GAME( 1982, tazzmang2, tazmania, tazzmang, tazzmang, driver_device, 0, ROT90, "bootleg", "Tazz-Mania (bootleg on Galaxian hardware with Starfield)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1983, bongo, 0, bongo, bongo, driver_device, 0, ROT90, "Jetsoft", "Bongo", MACHINE_SUPPORTS_SAVE ) GAME( 1983, ozon1, 0, ozon1, ozon1, driver_device, 0, ROT90, "Proma", "Ozon I", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, ladybugg, ladybug, batman2, ladybugg, galaxold_state, ladybugg, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1982, guttangt, locomotn, guttang, guttangt, galaxold_state, guttangt, ROT270, "bootleg (Recreativos Franco?)", "Guttang Gottong (bootleg on Galaxian type hardware)", MACHINE_NOT_WORKING | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // or by 'Tren' ? // Videotron cartridge system diff --git a/src/mame/drivers/marineb.cpp b/src/mame/drivers/marineb.cpp index f6b2133a475..fdea6da16c5 100644 --- a/src/mame/drivers/marineb.cpp +++ b/src/mame/drivers/marineb.cpp @@ -534,7 +534,7 @@ INTERRUPT_GEN_MEMBER(marineb_state::wanted_vblank_irq) static MACHINE_CONFIG_START( marineb, marineb_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz */ + MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) /* 3 MHz? */ MCFG_CPU_PROGRAM_MAP(marineb_map) MCFG_CPU_IO_MAP(marineb_io_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", marineb_state, marineb_vblank_irq) @@ -555,7 +555,7 @@ static MACHINE_CONFIG_START( marineb, marineb_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("ay1", AY8910, 1500000) + MCFG_SOUND_ADD("ay1", AY8910, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END @@ -606,10 +606,10 @@ static MACHINE_CONFIG_DERIVED( wanted, marineb ) MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_springer) // sound hardware (PSG type verified only for bcruzm12) - MCFG_SOUND_REPLACE("ay1", AY8912, 1500000) + MCFG_SOUND_REPLACE("ay1", AY8912, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_SOUND_ADD("ay2", AY8912, 1500000) + MCFG_SOUND_ADD("ay2", AY8912, SOUND_CLOCK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 4dfdc1ded65..95688846596 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -16,7 +16,7 @@ #define GALAXIAN_XSCALE 3 /* master clocks */ -#define GALAXIAN_MASTER_CLOCK (18432000) +#define GALAXIAN_MASTER_CLOCK (XTAL_18_432MHz) #define GALAXIAN_PIXEL_CLOCK (GALAXIAN_XSCALE*GALAXIAN_MASTER_CLOCK/3) /* H counts from 128->511, HBLANK starts at 130 and ends at 250 */ diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index 392125396f4..2443de6202b 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -186,7 +186,6 @@ public: DECLARE_VIDEO_START(galaxold); DECLARE_VIDEO_START(drivfrcg); DECLARE_VIDEO_START(racknrol); - DECLARE_VIDEO_START(batman2); DECLARE_VIDEO_START(mooncrst); DECLARE_VIDEO_START(scrambold); DECLARE_VIDEO_START(newsin7); @@ -222,7 +221,6 @@ public: void video_start_common(); void pisces_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); void mooncrst_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); - void batman2_modify_charcode(uint16_t *code, uint8_t x); void rockclim_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void rockclim_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); void harem_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 60324a8ec75..e9319c9bb1d 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -1,5 +1,10 @@ // license:BSD-3-Clause // copyright-holders:Zsolt Vasvari + +#define MASTER_CLOCK (XTAL_12MHz) +#define CPU_CLOCK (MASTER_CLOCK/4) +#define SOUND_CLOCK (MASTER_CLOCK/8) + class marineb_state : public driver_device { public: diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp index 801eb956e6b..9b40b213a0d 100644 --- a/src/mame/machine/galaxold.cpp +++ b/src/mame/machine/galaxold.cpp @@ -174,12 +174,6 @@ INTERRUPT_GEN_MEMBER(galaxold_state::hunchbks_vh_interrupt) generic_pulse_irq_line_and_vector(device.execute(),0,0x03,1); } -DRIVER_INIT_MEMBER(galaxold_state,ladybugg) -{ - /* Doesn't actually use the bank, but it mustn't have a coin lock! */ - m_maincpu->space(AS_PROGRAM).install_write_handler(0x6002, 0x6002, write8_delegate(FUNC(galaxold_state::galaxold_gfxbank_w),this)); -} - DRIVER_INIT_MEMBER(galaxold_state,bullsdrtg) { int i; diff --git a/src/mame/video/galaxold.cpp b/src/mame/video/galaxold.cpp index 25513ff6890..17973e04170 100644 --- a/src/mame/video/galaxold.cpp +++ b/src/mame/video/galaxold.cpp @@ -600,24 +600,6 @@ VIDEO_START_MEMBER(galaxold_state,mooncrst) m_modify_spritecode = &galaxold_state::mooncrst_modify_spritecode; } -void galaxold_state::batman2_modify_charcode(uint16_t *code, uint8_t x) -{ - if (*code & 0x80) - { - *code |= (m_gfxbank[0] << 8); - } -} - -VIDEO_START_MEMBER(galaxold_state,batman2) -{ - VIDEO_START_CALL_MEMBER(galaxold); - - m_modify_charcode = &galaxold_state::batman2_modify_charcode; - m_modify_spritecode = &galaxold_state::batman2_modify_spritecode; -} - - - void galaxold_state::rockclim_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_rockclim_tilemap->draw(screen, bitmap, cliprect, 0,0); -- cgit v1.2.3 From b9209aadbfc759a0102b935e082796c96af63c8d Mon Sep 17 00:00:00 2001 From: Kaz <> Date: Thu, 23 Feb 2017 23:56:59 -0500 Subject: nes: Add Magic Kid Googoo board. --- scripts/src/bus.lua | 2 + src/devices/bus/nes/nes_carts.cpp | 1 + src/devices/bus/nes/nes_carts.h | 1 + src/devices/bus/nes/nes_ines.hxx | 2 +- src/devices/bus/nes/nes_pcb.hxx | 1 + src/devices/bus/nes/nes_slot.h | 2 +- src/devices/bus/nes/zemina.cpp | 85 +++++++++++++++++++++++++++++++++++++++ src/devices/bus/nes/zemina.h | 26 ++++++++++++ 8 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 src/devices/bus/nes/zemina.cpp create mode 100644 src/devices/bus/nes/zemina.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index c7a03a45d26..5782c9e27f5 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1921,6 +1921,8 @@ if (BUSES["NES"]~=null) then MAME_DIR .. "src/devices/bus/nes/txc.h", MAME_DIR .. "src/devices/bus/nes/waixing.cpp", MAME_DIR .. "src/devices/bus/nes/waixing.h", + MAME_DIR .. "src/devices/bus/nes/zemina.cpp", + MAME_DIR .. "src/devices/bus/nes/zemina.h", } end diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index 5ff59c73339..c3c561c9f90 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -224,6 +224,7 @@ SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("unl_43272", NES_43272) // used in Gaau Hok Gwong Cheung SLOT_INTERFACE_INTERNAL("tf1201", NES_TF1201) SLOT_INTERFACE_INTERNAL("unl_cfight", NES_CITYFIGHT) // used by City Fighter IV + SLOT_INTERFACE_INTERNAL("zemina", NES_ZEMINA) // mapper 190 - Magic Kid Googoo, etc. // misc bootleg boards SLOT_INTERFACE_INTERNAL("ax5705", NES_AX5705) SLOT_INTERFACE_INTERNAL("sc127", NES_SC127) diff --git a/src/devices/bus/nes/nes_carts.h b/src/devices/bus/nes/nes_carts.h index 144d7aa0a8e..f99d18bd688 100644 --- a/src/devices/bus/nes/nes_carts.h +++ b/src/devices/bus/nes/nes_carts.h @@ -59,6 +59,7 @@ #include "tengen.h" #include "txc.h" #include "waixing.h" +#include "zemina.h" // misc unlicensed/bootleg/pirate PCBs #include "bootleg.h" #include "multigame.h" diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index 0d053cd9e12..760fa9b130e 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -221,7 +221,7 @@ static const nes_mmc mmc_list[] = { 187, UNL_KOF96 }, { 188, BANDAI_KARAOKE }, { 189, TXC_TW }, - // 190 Unused + { 190, ZEMINA_BOARD }, { 191, WAIXING_TYPE_B }, { 192, WAIXING_TYPE_C }, { 193, NTDEC_FIGHTINGHERO }, diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index 49a2e234b81..5496c7e2e0f 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -190,6 +190,7 @@ static const nes_pcb pcb_list[] = { "edu2k", UNL_EDU2K }, { "t230", UNL_T230 }, { "mk2", UNL_MK2 }, + { "zemina", ZEMINA_BOARD }, // misc bootleg boards { "ax5705", UNL_AX5705 }, { "sc127", UNL_SC127 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 94b54c9542b..a3e493d381f 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -125,7 +125,7 @@ enum WAIXING_SGZLZ, WAIXING_SGZ, WAIXING_WXZS, WAIXING_SECURITY, WAIXING_SH2, WAIXING_DQ8, WAIXING_FFV, WAIXING_WXZS2, SUPERGAME_LIONKING, SUPERGAME_BOOGERMAN, KAY_BOARD, HOSENKAN_BOARD, NITRA_TDA, GOUDER_37017, NANJING_BOARD, - WHIRLWIND_2706, + WHIRLWIND_2706, ZEMINA_BOARD, NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM BTL_ACTION53, // homebrew PCB for homebrew multicarts BTL_2A03_PURITANS, // homebrew PCB diff --git a/src/devices/bus/nes/zemina.cpp b/src/devices/bus/nes/zemina.cpp new file mode 100644 index 00000000000..e6b42f88dbe --- /dev/null +++ b/src/devices/bus/nes/zemina.cpp @@ -0,0 +1,85 @@ +// license:BSD-3-Clause +// copyright-holders:Kaz +/*********************************************************************************************************** + + NES/Famicom cartridge emulation for Zemina PCBs + + ***********************************************************************************************************/ + +#include "emu.h" +#include "zemina.h" + +#ifdef NES_PCB_DEBUG +#define VERBOSE 1 +#else +#define VERBOSE 0 +#endif + +#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0) + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +const device_type NES_ZEMINA = &device_creator; + +nes_zemina_device::nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : nes_nrom_device(mconfig, NES_ZEMINA, "NES Cart Zemina PCB", tag, owner, clock, "nes_zemina", __FILE__) +{ +} + +void nes_zemina_device::device_start() +{ + common_start(); +} + +void nes_zemina_device::pcb_reset() +{ + set_nt_mirroring(PPU_MIRROR_VERT); + chr2_0(0, CHRROM); + chr2_2(0, CHRROM); + chr2_4(0, CHRROM); + chr2_6(0, CHRROM); + prg16_89ab(0); + prg16_cdef(0); +} + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +/*------------------------------------------------- + + Zemina board emulation + + Currently, this board is only known to be used + by one game: Magic Kid Googoo. + + Info from kevtris at NESDev, who dumped the game: + https://wiki.nesdev.com/w/index.php/INES_Mapper_190 + + -------------------------------------------------*/ + +WRITE8_MEMBER(nes_zemina_device::write_h) +{ + LOG_MMC(("zemina write_h, offset: %04x, data: %02x\n", offset, data)); + + if (offset >= 0x0000 && offset <= 0x1FFF) + { + prg16_89ab(data & 0x07); + } + else if (offset >= 0x4000 && offset <= 0x5FFF) + { + prg16_89ab((data & 0x07) | 0x08); + } + else if ((offset & 0x2000) == 0x2000) // 2K CHR banks + { + switch (offset & 0x03) // only A0, A1, A13, A14, and A15 are used to select the CHR bank + { + case 0x00: chr2_0(data, CHRROM); break; + case 0x01: chr2_2(data, CHRROM); break; + case 0x02: chr2_4(data, CHRROM); break; + case 0x03: chr2_6(data, CHRROM); break; + } + } +} \ No newline at end of file diff --git a/src/devices/bus/nes/zemina.h b/src/devices/bus/nes/zemina.h new file mode 100644 index 00000000000..f217183058a --- /dev/null +++ b/src/devices/bus/nes/zemina.h @@ -0,0 +1,26 @@ +// license:BSD-3-Clause +// copyright-holders:Kaz +#ifndef __NES_ZEMINA_H +#define __NES_ZEMINA_H + +#include "nxrom.h" + +// ======================> nes_zemina_device + +class nes_zemina_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // device-level overrides + virtual void device_start() override; + virtual DECLARE_WRITE8_MEMBER(write_h) override; + + virtual void pcb_reset() override; +}; + +// device type definition +extern const device_type NES_ZEMINA; + +#endif \ No newline at end of file -- cgit v1.2.3