trunk/src/mame/drivers/wwfsstar.c
| r243576 | r243577 | |
| 121 | 121 | 04 Mar 2002 | Fixed Dip Switches and Inputs (Steph) |
| 122 | 122 | | Fixed screen flipping by using similar routine to the one |
| 123 | 123 | | in src/video/wwfwfest.c (Steph) |
| 124 | | 18 Jun 2001 | Changed Interrupt Function .. its not fully understood whats |
| 124 | 18 Jun 2001 | Changed Interrupt Function .. it's not fully understood what |
| 125 | 125 | | is meant to be going on .. |
| 126 | 126 | 15 Jun 2001 | Cleaned up Sprite Drawing a bit, correcting some clipping probs, |
| 127 | 127 | | mapped DSW's |
| r243576 | r243577 | |
| 170 | 170 | |
| 171 | 171 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, wwfsstar_state ) |
| 172 | 172 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 173 | | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(wwfsstar_fg0_videoram_w) AM_SHARE("fg0_videoram") /* FG0 Ram */ |
| 174 | | AM_RANGE(0x0c0000, 0x0c0fff) AM_RAM_WRITE(wwfsstar_bg0_videoram_w) AM_SHARE("bg0_videoram") /* BG0 Ram */ |
| 173 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(fg0_videoram_w) AM_SHARE("fg0_videoram") /* FG0 Ram */ |
| 174 | AM_RANGE(0x0c0000, 0x0c0fff) AM_RAM_WRITE(bg0_videoram_w) AM_SHARE("bg0_videoram") /* BG0 Ram */ |
| 175 | 175 | AM_RANGE(0x100000, 0x1003ff) AM_RAM AM_SHARE("spriteram") /* SPR Ram */ |
| 176 | 176 | AM_RANGE(0x140000, 0x140fff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 177 | | AM_RANGE(0x180000, 0x180003) AM_WRITE(wwfsstar_irqack_w) |
| 177 | AM_RANGE(0x180000, 0x180003) AM_WRITE(irqack_w) |
| 178 | 178 | AM_RANGE(0x180000, 0x180001) AM_READ_PORT("DSW1") |
| 179 | 179 | AM_RANGE(0x180002, 0x180003) AM_READ_PORT("DSW2") |
| 180 | 180 | AM_RANGE(0x180004, 0x180005) AM_READ_PORT("P1") |
| 181 | | AM_RANGE(0x180004, 0x180007) AM_WRITE(wwfsstar_scrollwrite) |
| 181 | AM_RANGE(0x180004, 0x180007) AM_WRITE(scroll_w) |
| 182 | 182 | AM_RANGE(0x180006, 0x180007) AM_READ_PORT("P2") |
| 183 | 183 | AM_RANGE(0x180008, 0x180009) AM_READ_PORT("SYSTEM") |
| 184 | | AM_RANGE(0x180008, 0x180009) AM_WRITE(wwfsstar_soundwrite) |
| 185 | | AM_RANGE(0x18000a, 0x18000b) AM_WRITE(wwfsstar_flipscreen_w) |
| 184 | AM_RANGE(0x180008, 0x180009) AM_WRITE(sound_w) |
| 185 | AM_RANGE(0x18000a, 0x18000b) AM_WRITE(flipscreen_w) |
| 186 | 186 | AM_RANGE(0x1c0000, 0x1c3fff) AM_RAM /* Work Ram */ |
| 187 | 187 | ADDRESS_MAP_END |
| 188 | 188 | |
| r243576 | r243577 | |
| 201 | 201 | as used by the above memory map |
| 202 | 202 | *******************************************************************************/ |
| 203 | 203 | |
| 204 | | WRITE16_MEMBER(wwfsstar_state::wwfsstar_scrollwrite) |
| 204 | WRITE16_MEMBER(wwfsstar_state::scroll_w) |
| 205 | 205 | { |
| 206 | 206 | switch (offset) |
| 207 | 207 | { |
| r243576 | r243577 | |
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | | WRITE16_MEMBER(wwfsstar_state::wwfsstar_soundwrite) |
| 217 | WRITE16_MEMBER(wwfsstar_state::sound_w) |
| 218 | 218 | { |
| 219 | 219 | soundlatch_byte_w(space, 1, data & 0xff); |
| 220 | 220 | m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | | WRITE16_MEMBER(wwfsstar_state::wwfsstar_flipscreen_w) |
| 223 | WRITE16_MEMBER(wwfsstar_state::flipscreen_w) |
| 224 | 224 | { |
| 225 | 225 | flip_screen_set(data & 1); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | | WRITE16_MEMBER(wwfsstar_state::wwfsstar_irqack_w) |
| 228 | WRITE16_MEMBER(wwfsstar_state::irqack_w) |
| 229 | 229 | { |
| 230 | 230 | if (offset == 0) |
| 231 | 231 | m_maincpu->set_input_line(6, CLEAR_LINE); |
| r243576 | r243577 | |
| 247 | 247 | A hack is required: raise the vblank bit a scanline early. |
| 248 | 248 | */ |
| 249 | 249 | |
| 250 | | TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_state::wwfsstar_scanline) |
| 250 | TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_state::scanline) |
| 251 | 251 | { |
| 252 | 252 | int scanline = param; |
| 253 | 253 | |
| r243576 | r243577 | |
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | | CUSTOM_INPUT_MEMBER(wwfsstar_state::wwfsstar_vblank_r) |
| 281 | CUSTOM_INPUT_MEMBER(wwfsstar_state::vblank_r) |
| 282 | 282 | { |
| 283 | 283 | return m_vblank; |
| 284 | 284 | } |
| r243576 | r243577 | |
| 313 | 313 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Button B (1P VS 2P - Buy-in)") |
| 314 | 314 | |
| 315 | 315 | PORT_START("SYSTEM") |
| 316 | | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state,wwfsstar_vblank_r, NULL) /* VBlank */ |
| 316 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state, vblank_r, NULL) /* VBlank */ |
| 317 | 317 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 318 | 318 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 319 | 319 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r243576 | r243577 | |
| 416 | 416 | /* basic machine hardware */ |
| 417 | 417 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) |
| 418 | 418 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 419 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wwfsstar_state, wwfsstar_scanline, "screen", 0, 1) |
| 419 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wwfsstar_state, scanline, "screen", 0, 1) |
| 420 | 420 | |
| 421 | 421 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) |
| 422 | 422 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r243576 | r243577 | |
| 424 | 424 | /* video hardware */ |
| 425 | 425 | MCFG_SCREEN_ADD("screen", RASTER) |
| 426 | 426 | MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 320, 0, 256, 272, 8, 248) /* HTOTAL and VTOTAL are guessed */ |
| 427 | | MCFG_SCREEN_UPDATE_DRIVER(wwfsstar_state, screen_update_wwfsstar) |
| 427 | MCFG_SCREEN_UPDATE_DRIVER(wwfsstar_state, screen_update) |
| 428 | 428 | MCFG_SCREEN_PALETTE("palette") |
| 429 | 429 | |
| 430 | 430 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", wwfsstar) |
| r243576 | r243577 | |
| 627 | 627 | |
| 628 | 628 | |
| 629 | 629 | |
| 630 | | GAME( 1989, wwfsstar, 0, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (Europe)", 0 ) |
| 631 | | GAME( 1989, wwfsstaru, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (US, Newer)", 0 ) |
| 632 | | GAME( 1989, wwfsstarua, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (US)", 0 ) |
| 633 | | GAME( 1989, wwfsstarj, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (Japan)", 0 ) |
| 634 | | GAME( 1989, wwfsstarb, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "bootleg", "WWF Superstars (bootleg)", 0 ) |
| 630 | GAME( 1989, wwfsstar, 0, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (Europe)", GAME_SUPPORTS_SAVE ) |
| 631 | GAME( 1989, wwfsstaru, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (US, Newer)", GAME_SUPPORTS_SAVE ) |
| 632 | GAME( 1989, wwfsstarua, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (US)", GAME_SUPPORTS_SAVE ) |
| 633 | GAME( 1989, wwfsstarj, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "Technos Japan", "WWF Superstars (Japan)", GAME_SUPPORTS_SAVE ) |
| 634 | GAME( 1989, wwfsstarb, wwfsstar, wwfsstar, wwfsstar, driver_device, 0, ROT0, "bootleg", "WWF Superstars (bootleg)", GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/wwfsstar.h
| r243576 | r243577 | |
| 3 | 3 | public: |
| 4 | 4 | wwfsstar_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | | m_spriteram(*this, "spriteram"), |
| 7 | | m_fg0_videoram(*this, "fg0_videoram"), |
| 8 | | m_bg0_videoram(*this, "bg0_videoram"), |
| 9 | 6 | m_maincpu(*this, "maincpu"), |
| 10 | 7 | m_audiocpu(*this, "audiocpu"), |
| 11 | 8 | m_gfxdecode(*this, "gfxdecode"), |
| 12 | 9 | m_screen(*this, "screen"), |
| 13 | | m_palette(*this, "palette") { } |
| 10 | m_palette(*this, "palette"), |
| 11 | m_spriteram(*this, "spriteram"), |
| 12 | m_fg0_videoram(*this, "fg0_videoram"), |
| 13 | m_bg0_videoram(*this, "bg0_videoram") { } |
| 14 | 14 | |
| 15 | required_device<cpu_device> m_maincpu; |
| 16 | required_device<cpu_device> m_audiocpu; |
| 17 | required_device<gfxdecode_device> m_gfxdecode; |
| 18 | required_device<screen_device> m_screen; |
| 19 | required_device<palette_device> m_palette; |
| 20 | |
| 21 | required_shared_ptr<UINT16> m_spriteram; |
| 22 | required_shared_ptr<UINT16> m_fg0_videoram; |
| 23 | required_shared_ptr<UINT16> m_bg0_videoram; |
| 24 | |
| 15 | 25 | int m_vblank; |
| 16 | 26 | int m_scrollx; |
| 17 | 27 | int m_scrolly; |
| 18 | | required_shared_ptr<UINT16> m_spriteram; |
| 19 | | required_shared_ptr<UINT16> m_fg0_videoram; |
| 20 | | required_shared_ptr<UINT16> m_bg0_videoram; |
| 21 | 28 | tilemap_t *m_fg0_tilemap; |
| 22 | 29 | tilemap_t *m_bg0_tilemap; |
| 23 | | DECLARE_WRITE16_MEMBER(wwfsstar_scrollwrite); |
| 24 | | DECLARE_WRITE16_MEMBER(wwfsstar_soundwrite); |
| 25 | | DECLARE_WRITE16_MEMBER(wwfsstar_flipscreen_w); |
| 26 | | DECLARE_WRITE16_MEMBER(wwfsstar_irqack_w); |
| 27 | | DECLARE_WRITE16_MEMBER(wwfsstar_fg0_videoram_w); |
| 28 | | DECLARE_WRITE16_MEMBER(wwfsstar_bg0_videoram_w); |
| 29 | | DECLARE_CUSTOM_INPUT_MEMBER(wwfsstar_vblank_r); |
| 30 | |
| 31 | DECLARE_WRITE16_MEMBER(scroll_w); |
| 32 | DECLARE_WRITE16_MEMBER(sound_w); |
| 33 | DECLARE_WRITE16_MEMBER(flipscreen_w); |
| 34 | DECLARE_WRITE16_MEMBER(irqack_w); |
| 35 | DECLARE_WRITE16_MEMBER(fg0_videoram_w); |
| 36 | DECLARE_WRITE16_MEMBER(bg0_videoram_w); |
| 37 | |
| 38 | DECLARE_CUSTOM_INPUT_MEMBER(vblank_r); |
| 39 | |
| 40 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 41 | |
| 30 | 42 | TILE_GET_INFO_MEMBER(get_fg0_tile_info); |
| 31 | 43 | TILEMAP_MAPPER_MEMBER(bg0_scan); |
| 32 | 44 | TILE_GET_INFO_MEMBER(get_bg0_tile_info); |
| 45 | |
| 33 | 46 | virtual void video_start(); |
| 34 | | UINT32 screen_update_wwfsstar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 35 | | TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_scanline); |
| 47 | |
| 48 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 36 | 49 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 37 | | required_device<cpu_device> m_maincpu; |
| 38 | | required_device<cpu_device> m_audiocpu; |
| 39 | | required_device<gfxdecode_device> m_gfxdecode; |
| 40 | | required_device<screen_device> m_screen; |
| 41 | | required_device<palette_device> m_palette; |
| 42 | 50 | }; |