diff options
Diffstat (limited to 'src/mame/drivers/boogwing.cpp')
-rw-r--r-- | src/mame/drivers/boogwing.cpp | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp index 6aa6059e59a..6f148c43135 100644 --- a/src/mame/drivers/boogwing.cpp +++ b/src/mame/drivers/boogwing.cpp @@ -53,12 +53,15 @@ Driver by Bryan McPhail and David Haywood. + DECO 99 "ACE" Chip hooked up by cam900. + Todo: * Sprite priorities aren't verified to be 100% accurate. (Addendum - all known issues seem to be correct - see Sprite Priority Notes below). * There may be some kind of fullscreen palette effect (controlled by bit 3 in priority word - used at end of each level, and on final boss). * A shadow effect (used in level 1) is not implemented. + * ACE Chip aren't fully emulated. Sprite Priority Notes: * On the Imperial Science Museum level at the beginning, you fly behind a wall, but your @@ -93,6 +96,8 @@ #include "screen.h" #include "speaker.h" +#define MAIN_XTAL XTAL(28'000'000) +#define SOUND_XTAL XTAL(32'220'000) READ16_MEMBER( boogwing_state::boogwing_protection_region_0_104_r ) { @@ -111,12 +116,18 @@ WRITE16_MEMBER( boogwing_state::boogwing_protection_region_0_104_w ) m_deco104->write_data( space, deco146_addr, data, mem_mask, cs ); } +WRITE16_MEMBER( boogwing_state::priority_w ) +{ + COMBINE_DATA(&m_priority); + m_deco_ace->set_palette_effect_max((m_priority & 0x8) ? 0x6ff : 0xfff); +} + static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM AM_RANGE(0x200000, 0x20ffff) AM_RAM - AM_RANGE(0x220000, 0x220001) AM_DEVWRITE("deco_common", decocomn_device, priority_w) + AM_RANGE(0x220000, 0x220001) AM_WRITE(priority_w) AM_RANGE(0x220002, 0x22000f) AM_NOP AM_RANGE(0x240000, 0x240001) AM_DEVWRITE("spriteram", buffered_spriteram16_device, write) @@ -143,10 +154,10 @@ static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state ) AM_RANGE(0x280000, 0x28000f) AM_NOP // ? AM_RANGE(0x282000, 0x282001) AM_NOP // Palette setup? - AM_RANGE(0x282008, 0x282009) AM_DEVWRITE("deco_common", decocomn_device, palette_dma_w) - AM_RANGE(0x284000, 0x285fff) AM_DEVWRITE("deco_common", decocomn_device, buffered_palette_w) AM_SHARE("paletteram") + AM_RANGE(0x282008, 0x282009) AM_DEVWRITE("deco_ace", deco_ace_device, palette_dma_w) + AM_RANGE(0x284000, 0x285fff) AM_DEVREADWRITE("deco_ace", deco_ace_device, buffered_palette16_r, buffered_palette16_w) - AM_RANGE(0x3c0000, 0x3c004f) AM_RAM // ? + AM_RANGE(0x3c0000, 0x3c004f) AM_DEVREADWRITE("deco_ace", deco_ace_device, ace_r, ace_w) ADDRESS_MAP_END static ADDRESS_MAP_START( decrypted_opcodes_map, AS_OPCODES, 16, boogwing_state ) @@ -300,6 +311,11 @@ GFXDECODE_END /**********************************************************************************/ +void boogwing_state::machine_reset() +{ + m_priority = 0; +} + WRITE8_MEMBER(boogwing_state::sound_bankswitch_w) { m_oki2->set_rom_bank((data & 2) >> 1); @@ -324,31 +340,27 @@ DECO16IC_BANK_CB_MEMBER(boogwing_state::bank_callback2) MACHINE_CONFIG_START(boogwing_state::boogwing) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M68000, 14000000) /* DE102 */ + MCFG_CPU_ADD("maincpu", M68000, MAIN_XTAL/2) /* DE102 */ MCFG_CPU_PROGRAM_MAP(boogwing_map) MCFG_CPU_DECRYPTED_OPCODES_MAP(decrypted_opcodes_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", boogwing_state, irq6_line_hold) - MCFG_CPU_ADD("audiocpu", H6280, 32220000/4) + MCFG_CPU_ADD("audiocpu", H6280, SOUND_XTAL/4) MCFG_CPU_PROGRAM_MAP(audio_map) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(58) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(40*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) + MCFG_SCREEN_RAW_PARAMS(MAIN_XTAL / 4, 442, 0, 320, 274, 8, 248) // same as robocop2(cninja.cpp)? verify this from real pcb. MCFG_SCREEN_UPDATE_DRIVER(boogwing_state, screen_update_boogwing) MCFG_PALETTE_ADD("palette", 2048) MCFG_GFXDECODE_ADD("gfxdecode", "palette", boogwing) - MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2") - MCFG_DECOCOMN_ADD("deco_common") - MCFG_DECOCOMN_PALETTE("palette") + MCFG_DECO_ACE_ADD("deco_ace") + MCFG_DECO_ACE_PALETTE("palette") MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0) MCFG_DECO16IC_SPLIT(0) @@ -399,17 +411,17 @@ MACHINE_CONFIG_START(boogwing_state::boogwing) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") - MCFG_YM2151_ADD("ymsnd", 32220000/9) + MCFG_YM2151_ADD("ymsnd", SOUND_XTAL/9) MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 1)) /* IRQ2 */ MCFG_YM2151_PORT_WRITE_HANDLER(WRITE8(boogwing_state, sound_bankswitch_w)) MCFG_SOUND_ROUTE(0, "lspeaker", 0.80) MCFG_SOUND_ROUTE(1, "rspeaker", 0.80) - MCFG_OKIM6295_ADD("oki1", 32220000/32, PIN7_HIGH) + MCFG_OKIM6295_ADD("oki1", SOUND_XTAL/32, PIN7_HIGH) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.40) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.40) - MCFG_OKIM6295_ADD("oki2", 32220000/16, PIN7_HIGH) + MCFG_OKIM6295_ADD("oki2", SOUND_XTAL/16, PIN7_HIGH) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30) MACHINE_CONFIG_END @@ -649,8 +661,8 @@ DRIVER_INIT_MEMBER(boogwing_state,boogwing) memcpy(dst, src, 0x100000); } -GAME( 1992, boogwing, 0, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Euro v1.5, 92.12.07)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, boogwingu,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (USA v1.7, 92.12.14)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, boogwinga,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Asia v1.5, 92.12.07)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, ragtime, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.5, 92.12.07)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, ragtimea, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.3, 92.11.26)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, boogwing, 0, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Euro v1.5, 92.12.07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1992, boogwingu,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (USA v1.7, 92.12.14)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1992, boogwinga,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Asia v1.5, 92.12.07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1992, ragtime, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.5, 92.12.07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1992, ragtimea, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.3, 92.11.26)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) |