diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2010-06-03 15:27:27 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2010-06-03 15:27:27 +0000 |
commit | 00d405a975936aba2b811c64127796fc51eee1ca (patch) | |
tree | 45c1c5ffa09309641c6ab19072da76ed4f51e5da /src/mame/drivers/homedata.c | |
parent | 6d1884e511d74797444a26b43a9d488124ec947b (diff) |
Basic M6502 hook-up in Royal Gum [David Haywood]
Moved Miracle Derby inside homedata.c driver [David Haywood]
Diffstat (limited to 'src/mame/drivers/homedata.c')
-rw-r--r-- | src/mame/drivers/homedata.c | 185 |
1 files changed, 184 insertions, 1 deletions
diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index 4879a1917a3..93002927fed 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -611,7 +611,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pteacher_map, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(pteacher_videoram_w) AM_BASE_MEMBER(homedata_state, videoram) + AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(mrokumei_videoram_w) AM_BASE_MEMBER(homedata_state, videoram) AM_RANGE(0x4000, 0x5eff) AM_RAM AM_RANGE(0x5f00, 0x5fff) AM_RAM AM_RANGE(0x6000, 0x6fff) AM_RAM /* work ram */ @@ -1440,8 +1440,159 @@ static MACHINE_DRIVER_START( lemnangl ) MDRV_VIDEO_START(lemnangl) MACHINE_DRIVER_END +static INPUT_PORTS_START( mirderby ) +INPUT_PORTS_END + + +static ADDRESS_MAP_START( cpu0_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x7fff) AM_ROM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_RAM // videoram + AM_RANGE(0x4000, 0x5fff) AM_RAM + AM_RANGE(0x6000, 0x6fff) AM_RAM /* work ram */ + AM_RANGE(0x7000, 0x77ff) AM_RAM + //0x7ff0 onward is the blitter + AM_RANGE(0x7ffe, 0x7ffe) AM_READNOP //watchdog + AM_RANGE(0x8000, 0xffff) AM_ROM +ADDRESS_MAP_END + +static UINT8 prot_data; + +static READ8_HANDLER( mirderby_prot_r ) +{ + prot_data&=0x7f; + return prot_data++; +} + +static WRITE8_HANDLER( mirderby_prot_w ) +{ + prot_data = data; +} + + +static ADDRESS_MAP_START( cpu2_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(mrokumei_videoram_w) AM_BASE_MEMBER(homedata_state, videoram) + AM_RANGE(0x4000, 0x5fff) AM_RAM + AM_RANGE(0x6000, 0x6fff) AM_RAM /* work ram */ + AM_RANGE(0x7000, 0x77ff) AM_RAM + AM_RANGE(0x7800, 0x7800) AM_READWRITE(mirderby_prot_r, mirderby_prot_w) // protection check? (or sound comms?) + AM_RANGE(0x7ffe, 0x7ffe) AM_READNOP //watchdog + AM_RANGE(0x8000, 0xffff) AM_ROM +ADDRESS_MAP_END + + + + + +static const gfx_layout mirderbychar_layout = +{ + 8,8, + RGN_FRAC(1,1), + 4, + { 0, 1, 2, 3 }, + { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 }, + { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, + 32*8 +}; + +static GFXDECODE_START( mirderby ) + GFXDECODE_ENTRY( "gfx1", 0, mirderbychar_layout, 0x0000, 0x10 ) + GFXDECODE_ENTRY( "gfx2", 0, mirderbychar_layout, 0x0000, 0x10 ) +GFXDECODE_END + +/* Miracle Derby - Ascot + + - has the same GX61A01 custom (blitter?) as homedata.c and a 'similar' CPU setup (this has more CPUs) + and similar board / rom numbering (X**-) + + The drivers can probably be merged later, although the current per-game handling of the blitter in + homedata.c should be looked at. + + + + Notes from Stefan Lindberg: + + Eprom "x70_a04.5g" had wires attached to it, pin 2 and 16 was joined and pin 1,32,31,30 was joined, i + removed them and read the eprom as the type it was (D27c1000D). + + Measured frequencies: + MBL68B09E = 2mhz + MBL68B09E = 2mhz + z80 = 4mhz + YM2203 = 2mhz + + See included PCB pics. + + Roms: + + Name Size CRC32 Chip Type + --------------------------------------------------------------------------------- + x70a07.8l 256 0x7d4c9712 82s129 + x70a08.7l 256 0xc4e77174 82s129 + x70a09.6l 256 0xd0187957 82s129 + x70_a03.8g 32768 0x4e298b2d 27c256 + x70_a04.5g 131072 0x14392fdb D27c1000D + x70_a11.1g 32768 0xb394eef7 27c256 + x70_b02.12e 32768 0x76c9bb6f 27c256 + x70_c01.14e 65536 0xd79d072d 27c512 + + + +*/ + +/* clocks are 16mhz and 9mhz */ + +static MACHINE_DRIVER_START( mirderby ) + + /* driver data */ + MDRV_DRIVER_DATA(homedata_state) + + MDRV_CPU_ADD("maincpu", M6809, 16000000/8) /* 2 Mhz */ + MDRV_CPU_PROGRAM_MAP(cpu2_map) + + + /* basic machine hardware */ + MDRV_CPU_ADD("cpu0", Z80, 16000000/4) /* 4 Mhz */ + MDRV_CPU_FLAGS(CPU_DISABLE) + MDRV_CPU_PROGRAM_MAP(cpu0_map) + + MDRV_CPU_ADD("cpu1", M6809, 16000000/8) /* 2 Mhz */ + MDRV_CPU_PROGRAM_MAP(cpu1_map) + MDRV_CPU_FLAGS(CPU_DISABLE) + //MDRV_CPU_VBLANK_INT("screen", mirderby_irq) + + + MDRV_QUANTUM_TIME(HZ(6000)) + + /* video hardware */ + MDRV_SCREEN_ADD("screen", RASTER) + MDRV_SCREEN_REFRESH_RATE(59) + MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) + MDRV_SCREEN_SIZE(64*8, 32*8) + MDRV_SCREEN_VISIBLE_AREA(0*8, 54*8-1, 2*8, 30*8-1) + + MDRV_GFXDECODE(mirderby) + MDRV_PALETTE_LENGTH(0x8000) + + MDRV_PALETTE_INIT(mirderby) + MDRV_VIDEO_START(mirderby) + MDRV_VIDEO_UPDATE(mirderby) + + /* sound hardware */ + MDRV_SPEAKER_STANDARD_MONO("mono") + + MDRV_SOUND_ADD("ymsnd", YM2203, 2000000) + MDRV_SOUND_ROUTE(0, "mono", 0.25) + MDRV_SOUND_ROUTE(1, "mono", 0.25) + MDRV_SOUND_ROUTE(2, "mono", 0.25) + MDRV_SOUND_ROUTE(3, "mono", 1.0) +MACHINE_DRIVER_END + /**************************************************************************/ @@ -1865,6 +2016,30 @@ ROM_START( mjprivat ) ROM_LOAD( "311b03.12e", 0x0000, 0x40000, CRC(5722c341) SHA1(694e63261d91da48c0ed14a44fbc6c9c74b055d9) ) ROM_END +ROM_START( mirderby ) + ROM_REGION( 0x8000, "cpu0", 0 ) /* Z80 Code */ + ROM_LOAD( "x70_a11.1g", 0x2000, 0x6000, CRC(b394eef7) SHA1(a646596d09b90eda44aaf8ccbf8f3fccfd3d5dad) ) // first 0x6000 bytes are blank! + ROM_CONTINUE(0x0000, 0x2000) // main z80 code is here + + ROM_REGION( 0x10000, "cpu1", 0 ) /* M6809 code */ + ROM_LOAD( "x70_c01.14e", 0x00000, 0x10000, CRC(d79d072d) SHA1(8e189931de9c4eb520c1ec2d0898d8eaba0f01b5) ) + + ROM_REGION( 0x10000, "maincpu", 0 ) /* M6809 code */ + ROM_LOAD( "x70_b02.12e", 0x8000, 0x8000, CRC(76c9bb6f) SHA1(dd8893f3082d33d366247295e9531f8879c219c5) ) + + ROM_REGION( 0x8000, "gfx1", 0 ) // horse gfx + ROM_LOAD( "x70_a03.8g", 0x0000, 0x8000, CRC(4e298b2d) SHA1(ae78327d1f30c8d19ef772b82803dab4d6b7b919)) + + ROM_REGION( 0x20000, "gfx2", 0 ) // fonts etc. + ROM_LOAD( "x70_a04.5g", 0x0000, 0x20000, CRC(14392fdb) SHA1(dafdce473b2d2ebbdbf49fbd12f85c1ad69b2877) ) + + ROM_REGION( 0x300, "proms", 0 ) /* colours */ + ROM_LOAD( "x70a07.8l", 0x000, 0x100, CRC(7d4c9712) SHA1(fe2a89841fdf5e4fd6cd41478ad2f29d28bed54d) ) + ROM_LOAD( "x70a08.7l", 0x100, 0x100, CRC(c4e77174) SHA1(ada238ded69f01b4daeb0159a2c5c422977bb95e) ) + ROM_LOAD( "x70a09.6l", 0x200, 0x100, CRC(d0187957) SHA1(6b36c1bccad24708cfa2fc78da08313f9bcfdbc0) ) +ROM_END + + static DRIVER_INIT( jogakuen ) { @@ -1894,6 +2069,12 @@ static DRIVER_INIT( battlcry ) state->priority = 1; /* priority and initial value for bank write */ } +static DRIVER_INIT( mirderby ) +{ + +} + + GAME( 1987, hourouki, 0, mrokumei, mjhokite, 0, ROT0, "Home Data", "Mahjong Hourouki Part 1 - Seisyun Hen (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) GAME( 1987, mhgaiden, 0, mrokumei, mjhokite, 0, ROT0, "Home Data", "Mahjong Hourouki Gaiden (Japan)", GAME_SUPPORTS_SAVE ) GAME( 1988, mjhokite, 0, mrokumei, mjhokite, 0, ROT0, "Home Data", "Mahjong Hourouki Okite (Japan)", GAME_SUPPORTS_SAVE ) @@ -1912,3 +2093,5 @@ GAME( 1990, lemnangl, 0, lemnangl, pteacher, 0, ROT0, "Home Data", "Mah GAME( 1991, mjprivat, 0, lemnangl, pteacher, 0, ROT0, "Matoba", "Mahjong Private (Japan)", GAME_SUPPORTS_SAVE ) GAME( 1991?,mjikaga, 0, lemnangl, mjikaga, mjikaga, ROT0, "Mitchell", "Mahjong Ikaga Desu ka (Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) + +GAME( 1988, mirderby, 0, mirderby, mirderby, mirderby, ROT0, "Home Data?", "Miracle Derby - Ascot", GAME_NO_SOUND|GAME_NOT_WORKING ) |