trunk/src/mame/drivers/bestleag.c
| r243606 | r243607 | |
| 30 | 30 | public: |
| 31 | 31 | bestleag_state(const machine_config &mconfig, device_type type, const char *tag) |
| 32 | 32 | : driver_device(mconfig, type, tag), |
| 33 | m_maincpu(*this, "maincpu"), |
| 34 | m_oki(*this, "oki"), |
| 35 | m_gfxdecode(*this, "gfxdecode"), |
| 36 | m_palette(*this, "palette"), |
| 33 | 37 | m_bgram(*this, "bgram"), |
| 34 | 38 | m_fgram(*this, "fgram"), |
| 35 | 39 | m_txram(*this, "txram"), |
| 36 | 40 | m_vregs(*this, "vregs"), |
| 37 | | m_spriteram(*this, "spriteram"), |
| 38 | | m_maincpu(*this, "maincpu"), |
| 39 | | m_oki(*this, "oki"), |
| 40 | | m_gfxdecode(*this, "gfxdecode"), |
| 41 | | m_palette(*this, "palette") { } |
| 41 | m_spriteram(*this, "spriteram") { } |
| 42 | 42 | |
| 43 | required_device<cpu_device> m_maincpu; |
| 44 | required_device<okim6295_device> m_oki; |
| 45 | required_device<gfxdecode_device> m_gfxdecode; |
| 46 | required_device<palette_device> m_palette; |
| 47 | |
| 43 | 48 | required_shared_ptr<UINT16> m_bgram; |
| 44 | 49 | required_shared_ptr<UINT16> m_fgram; |
| 45 | 50 | required_shared_ptr<UINT16> m_txram; |
| 46 | 51 | required_shared_ptr<UINT16> m_vregs; |
| 47 | 52 | required_shared_ptr<UINT16> m_spriteram; |
| 53 | |
| 48 | 54 | tilemap_t *m_tx_tilemap; |
| 49 | 55 | tilemap_t *m_bg_tilemap; |
| 50 | 56 | tilemap_t *m_fg_tilemap; |
| 51 | | DECLARE_WRITE16_MEMBER(bestleag_txram_w); |
| 52 | | DECLARE_WRITE16_MEMBER(bestleag_bgram_w); |
| 53 | | DECLARE_WRITE16_MEMBER(bestleag_fgram_w); |
| 57 | |
| 58 | DECLARE_WRITE16_MEMBER(txram_w); |
| 59 | DECLARE_WRITE16_MEMBER(bgram_w); |
| 60 | DECLARE_WRITE16_MEMBER(fgram_w); |
| 54 | 61 | DECLARE_WRITE16_MEMBER(oki_bank_w); |
| 62 | |
| 55 | 63 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 56 | 64 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 57 | 65 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 58 | 66 | TILEMAP_MAPPER_MEMBER(bsb_bg_scan); |
| 67 | |
| 59 | 68 | virtual void video_start(); |
| 69 | |
| 60 | 70 | UINT32 screen_update_bestleag(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 61 | 71 | UINT32 screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 62 | 72 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 63 | | required_device<cpu_device> m_maincpu; |
| 64 | | required_device<okim6295_device> m_oki; |
| 65 | | required_device<gfxdecode_device> m_gfxdecode; |
| 66 | | required_device<palette_device> m_palette; |
| 67 | 73 | }; |
| 68 | 74 | |
| 69 | 75 | |
| r243606 | r243607 | |
| 213 | 219 | return 0; |
| 214 | 220 | } |
| 215 | 221 | |
| 216 | | WRITE16_MEMBER(bestleag_state::bestleag_txram_w) |
| 222 | WRITE16_MEMBER(bestleag_state::txram_w) |
| 217 | 223 | { |
| 218 | 224 | m_txram[offset] = data; |
| 219 | 225 | m_tx_tilemap->mark_tile_dirty(offset); |
| 220 | 226 | } |
| 221 | 227 | |
| 222 | | WRITE16_MEMBER(bestleag_state::bestleag_bgram_w) |
| 228 | WRITE16_MEMBER(bestleag_state::bgram_w) |
| 223 | 229 | { |
| 224 | 230 | m_bgram[offset] = data; |
| 225 | 231 | m_bg_tilemap->mark_tile_dirty(offset); |
| 226 | 232 | } |
| 227 | 233 | |
| 228 | | WRITE16_MEMBER(bestleag_state::bestleag_fgram_w) |
| 234 | WRITE16_MEMBER(bestleag_state::fgram_w) |
| 229 | 235 | { |
| 230 | 236 | m_fgram[offset] = data; |
| 231 | 237 | m_fg_tilemap->mark_tile_dirty(offset); |
| r243606 | r243607 | |
| 242 | 248 | static ADDRESS_MAP_START( bestleag_map, AS_PROGRAM, 16, bestleag_state ) |
| 243 | 249 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 244 | 250 | AM_RANGE(0x0d2000, 0x0d3fff) AM_NOP // left over from the original game (only read / written in memory test) |
| 245 | | AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM_WRITE(bestleag_bgram_w) AM_SHARE("bgram") |
| 246 | | AM_RANGE(0x0e8000, 0x0ebfff) AM_RAM_WRITE(bestleag_fgram_w) AM_SHARE("fgram") |
| 247 | | AM_RANGE(0x0f0000, 0x0f3fff) AM_RAM_WRITE(bestleag_txram_w) AM_SHARE("txram") |
| 251 | AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM_WRITE(bgram_w) AM_SHARE("bgram") |
| 252 | AM_RANGE(0x0e8000, 0x0ebfff) AM_RAM_WRITE(fgram_w) AM_SHARE("fgram") |
| 253 | AM_RANGE(0x0f0000, 0x0f3fff) AM_RAM_WRITE(txram_w) AM_SHARE("txram") |
| 248 | 254 | AM_RANGE(0x0f8000, 0x0f800b) AM_RAM AM_SHARE("vregs") |
| 249 | 255 | AM_RANGE(0x100000, 0x100fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 250 | 256 | AM_RANGE(0x200000, 0x200fff) AM_RAM AM_SHARE("spriteram") |
| r243606 | r243607 | |
| 466 | 472 | |
| 467 | 473 | /* GAME drivers */ |
| 468 | 474 | |
| 469 | | GAME( 1993, bestleag, bigstrik, bestleag, bestleag, driver_device, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, Italian Serie A)", GAME_NO_COCKTAIL ) |
| 470 | | GAME( 1993, bestleaw, bigstrik, bestleaw, bestleag, driver_device, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, World Cup)", GAME_NO_COCKTAIL ) |
| 475 | GAME( 1993, bestleag, bigstrik, bestleag, bestleag, driver_device, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, Italian Serie A)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 476 | GAME( 1993, bestleaw, bigstrik, bestleaw, bestleag, driver_device, 0, ROT0, "bootleg", "Best League (bootleg of Big Striker, World Cup)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |