trunk/src/mame/drivers/wrally.c
| r243453 | r243454 | |
| 103 | 103 | |
| 104 | 104 | static ADDRESS_MAP_START( wrally_map, AS_PROGRAM, 16, wrally_state ) |
| 105 | 105 | AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */ |
| 106 | | AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(wrally_vram_w) AM_SHARE("videoram") /* encrypted Video RAM */ |
| 106 | AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(vram_w) AM_SHARE("videoram") /* encrypted Video RAM */ |
| 107 | 107 | AM_RANGE(0x108000, 0x108007) AM_RAM AM_SHARE("vregs") /* Video Registers */ |
| 108 | 108 | AM_RANGE(0x10800c, 0x10800d) AM_WRITENOP /* CLR INT Video */ |
| 109 | 109 | AM_RANGE(0x200000, 0x203fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") /* Palette */ |
| r243453 | r243454 | |
| 112 | 112 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2") |
| 113 | 113 | AM_RANGE(0x700004, 0x700005) AM_READ_PORT("WHEEL") |
| 114 | 114 | AM_RANGE(0x700008, 0x700009) AM_READ_PORT("SYSTEM") |
| 115 | | AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w) /* OKI6295 bankswitch */ |
| 115 | AM_RANGE(0x70000c, 0x70000d) AM_WRITE(okim6295_bankswitch_w) /* OKI6295 bankswitch */ |
| 116 | 116 | AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) /* OKI6295 status/data register */ |
| 117 | 117 | AM_RANGE(0x70000a, 0x70001b) AM_WRITE(wrally_coin_lockout_w) /* Coin lockouts */ |
| 118 | 118 | AM_RANGE(0x70002a, 0x70003b) AM_WRITE(wrally_coin_counter_w) /* Coin counters */ |
| 119 | 119 | AM_RANGE(0x70004a, 0x70004b) AM_WRITENOP /* Sound muting */ |
| 120 | | AM_RANGE(0x70005a, 0x70005b) AM_WRITE(wrally_flipscreen_w) /* Flip screen */ |
| 120 | AM_RANGE(0x70005a, 0x70005b) AM_WRITE(flipscreen_w) /* Flip screen */ |
| 121 | 121 | AM_RANGE(0x70006a, 0x70007b) AM_WRITENOP /* ??? */ |
| 122 | 122 | AM_RANGE(0xfec000, 0xfeffff) AM_RAM AM_SHARE("shareram") /* Work RAM (shared with DS5002FP) */ |
| 123 | 123 | ADDRESS_MAP_END |
| r243453 | r243454 | |
| 255 | 255 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 256 | 256 | MCFG_SCREEN_SIZE(64*16, 32*16) |
| 257 | 257 | MCFG_SCREEN_VISIBLE_AREA(8, 24*16-8-1, 16, 16*16-8-1) |
| 258 | | MCFG_SCREEN_UPDATE_DRIVER(wrally_state, screen_update_wrally) |
| 258 | MCFG_SCREEN_UPDATE_DRIVER(wrally_state, screen_update) |
| 259 | 259 | MCFG_SCREEN_PALETTE("palette") |
| 260 | 260 | |
| 261 | 261 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", wrally) |
| r243453 | r243454 | |
| 352 | 352 | ROM_END |
| 353 | 353 | |
| 354 | 354 | |
| 355 | | GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", 0 ) /* Dallas DS5002FP power failure shows as: "Tension baja " */ |
| 356 | | GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", 0 ) /* Dallas DS5002FP power failure shows as: "Power Failure" */ |
| 357 | | GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", 0 ) |
| 355 | GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", GAME_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension baja " */ |
| 356 | GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", GAME_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power Failure" */ |
| 357 | GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/wrally.h
| r243453 | r243454 | |
| 3 | 3 | public: |
| 4 | 4 | wrally_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | m_maincpu(*this, "maincpu"), |
| 7 | m_gfxdecode(*this, "gfxdecode"), |
| 8 | m_palette(*this, "palette"), |
| 6 | 9 | m_videoram(*this, "videoram"), |
| 7 | 10 | m_vregs(*this, "vregs"), |
| 8 | 11 | m_spriteram(*this, "spriteram"), |
| 9 | | m_shareram(*this, "shareram"), |
| 10 | | m_maincpu(*this, "maincpu"), |
| 11 | | m_gfxdecode(*this, "gfxdecode"), |
| 12 | | m_palette(*this, "palette") { } |
| 12 | m_shareram(*this, "shareram") { } |
| 13 | 13 | |
| 14 | | tilemap_t *m_pant[2]; |
| 14 | required_device<cpu_device> m_maincpu; |
| 15 | required_device<gfxdecode_device> m_gfxdecode; |
| 16 | required_device<palette_device> m_palette; |
| 17 | |
| 15 | 18 | required_shared_ptr<UINT16> m_videoram; |
| 16 | 19 | required_shared_ptr<UINT16> m_vregs; |
| 17 | 20 | required_shared_ptr<UINT16> m_spriteram; |
| 18 | 21 | required_shared_ptr<UINT16> m_shareram; |
| 22 | |
| 23 | tilemap_t *m_pant[2]; |
| 19 | 24 | |
| 20 | 25 | DECLARE_READ8_MEMBER(dallas_share_r); |
| 21 | 26 | DECLARE_WRITE8_MEMBER(dallas_share_w); |
| 22 | | DECLARE_WRITE16_MEMBER(wrally_vram_w); |
| 23 | | DECLARE_WRITE16_MEMBER(wrally_flipscreen_w); |
| 24 | | DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); |
| 27 | DECLARE_WRITE16_MEMBER(vram_w); |
| 28 | DECLARE_WRITE16_MEMBER(flipscreen_w); |
| 29 | DECLARE_WRITE16_MEMBER(okim6295_bankswitch_w); |
| 25 | 30 | DECLARE_WRITE16_MEMBER(wrally_coin_counter_w); |
| 26 | 31 | DECLARE_WRITE16_MEMBER(wrally_coin_lockout_w); |
| 27 | | TILE_GET_INFO_MEMBER(get_tile_info_wrally_screen0); |
| 28 | | TILE_GET_INFO_MEMBER(get_tile_info_wrally_screen1); |
| 32 | |
| 33 | TILE_GET_INFO_MEMBER(get_tile_info_screen0); |
| 34 | TILE_GET_INFO_MEMBER(get_tile_info_screen1); |
| 35 | |
| 29 | 36 | virtual void video_start(); |
| 30 | | UINT32 screen_update_wrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 37 | |
| 38 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 31 | 39 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); |
| 32 | | required_device<cpu_device> m_maincpu; |
| 33 | | required_device<gfxdecode_device> m_gfxdecode; |
| 34 | | required_device<palette_device> m_palette; |
| 35 | 40 | }; |
trunk/src/mame/video/wrally.c
| r243453 | r243454 | |
| 34 | 34 | 1 | xxx----- -------- | not used? |
| 35 | 35 | */ |
| 36 | 36 | |
| 37 | | TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_wrally_screen0) |
| 37 | TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_screen0) |
| 38 | 38 | { |
| 39 | 39 | int data = m_videoram[tile_index << 1]; |
| 40 | 40 | int data2 = m_videoram[(tile_index << 1) + 1]; |
| r243453 | r243454 | |
| 45 | 45 | SET_TILE_INFO_MEMBER(0, code, data2 & 0x1f, TILE_FLIPYX((data2 >> 6) & 0x03)); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | | TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_wrally_screen1) |
| 48 | TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_screen1) |
| 49 | 49 | { |
| 50 | 50 | int data = m_videoram[(0x2000/2) + (tile_index << 1)]; |
| 51 | 51 | int data2 = m_videoram[(0x2000/2) + (tile_index << 1) + 1]; |
| r243453 | r243454 | |
| 64 | 64 | |
| 65 | 65 | void wrally_state::video_start() |
| 66 | 66 | { |
| 67 | | m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_wrally_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32); |
| 68 | | m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_wrally_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32); |
| 67 | m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32); |
| 68 | m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32); |
| 69 | 69 | |
| 70 | 70 | m_pant[0]->set_transmask(0,0xff01,0x00ff); /* this layer is split in two (pens 1..7, pens 8-15) */ |
| 71 | 71 | m_pant[1]->set_transparent_pen(0); |
| r243453 | r243454 | |
| 172 | 172 | |
| 173 | 173 | ***************************************************************************/ |
| 174 | 174 | |
| 175 | | UINT32 wrally_state::screen_update_wrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 175 | UINT32 wrally_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 176 | 176 | { |
| 177 | 177 | /* set scroll registers */ |
| 178 | 178 | if (!flip_screen()) { |