branches/kale/src/mame/drivers/mosaic.c
| r244617 | r244618 | |
| 88 | 88 | static ADDRESS_MAP_START( mosaic_map, AS_PROGRAM, 8, mosaic_state ) |
| 89 | 89 | AM_RANGE(0x00000, 0x0ffff) AM_ROM |
| 90 | 90 | AM_RANGE(0x20000, 0x21fff) AM_RAM |
| 91 | | AM_RANGE(0x22000, 0x22fff) AM_RAM_WRITE(mosaic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 92 | | AM_RANGE(0x23000, 0x23fff) AM_RAM_WRITE(mosaic_fgvideoram_w) AM_SHARE("fgvideoram") |
| 91 | AM_RANGE(0x22000, 0x22fff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") |
| 92 | AM_RANGE(0x23000, 0x23fff) AM_RAM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram") |
| 93 | 93 | AM_RANGE(0x24000, 0x241ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 94 | 94 | ADDRESS_MAP_END |
| 95 | 95 | |
| 96 | 96 | static ADDRESS_MAP_START( gfire2_map, AS_PROGRAM, 8, mosaic_state ) |
| 97 | 97 | AM_RANGE(0x00000, 0x0ffff) AM_ROM |
| 98 | 98 | AM_RANGE(0x10000, 0x17fff) AM_RAM |
| 99 | | AM_RANGE(0x22000, 0x22fff) AM_RAM_WRITE(mosaic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 100 | | AM_RANGE(0x23000, 0x23fff) AM_RAM_WRITE(mosaic_fgvideoram_w) AM_SHARE("fgvideoram") |
| 99 | AM_RANGE(0x22000, 0x22fff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") |
| 100 | AM_RANGE(0x23000, 0x23fff) AM_RAM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram") |
| 101 | 101 | AM_RANGE(0x24000, 0x241ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 102 | 102 | ADDRESS_MAP_END |
| 103 | 103 | |
| r244617 | r244618 | |
| 255 | 255 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 256 | 256 | MCFG_SCREEN_SIZE(64*8, 32*8) |
| 257 | 257 | MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1) |
| 258 | | MCFG_SCREEN_UPDATE_DRIVER(mosaic_state, screen_update_mosaic) |
| 258 | MCFG_SCREEN_UPDATE_DRIVER(mosaic_state, screen_update) |
| 259 | 259 | MCFG_SCREEN_PALETTE("palette") |
| 260 | 260 | |
| 261 | 261 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", mosaic) |
| r244617 | r244618 | |
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | |
| 341 | | GAME( 1990, mosaic, 0, mosaic, mosaic, driver_device, 0, ROT0, "Space", "Mosaic", 0 ) |
| 342 | | GAME( 1990, mosaica, mosaic, mosaic, mosaic, driver_device, 0, ROT0, "Space (Fuuki license)", "Mosaic (Fuuki)", 0 ) |
| 343 | | GAME( 1992, gfire2, 0, gfire2, gfire2, driver_device, 0, ROT0, "Topis Corp", "Golden Fire II", 0 ) |
| 341 | GAME( 1990, mosaic, 0, mosaic, mosaic, driver_device, 0, ROT0, "Space", "Mosaic", GAME_SUPPORTS_SAVE ) |
| 342 | GAME( 1990, mosaica, mosaic, mosaic, mosaic, driver_device, 0, ROT0, "Space (Fuuki license)", "Mosaic (Fuuki)", GAME_SUPPORTS_SAVE ) |
| 343 | GAME( 1992, gfire2, 0, gfire2, gfire2, driver_device, 0, ROT0, "Topis Corp", "Golden Fire II", GAME_SUPPORTS_SAVE ) |
branches/kale/src/mame/drivers/tagteam.c
| r244617 | r244618 | |
| 30 | 30 | #include "sound/dac.h" |
| 31 | 31 | #include "includes/tagteam.h" |
| 32 | 32 | |
| 33 | |
| 34 | void tagteam_state::machine_start() |
| 35 | { |
| 36 | save_item(NAME(m_sound_nmi_mask)); |
| 37 | } |
| 38 | |
| 33 | 39 | WRITE8_MEMBER(tagteam_state::sound_command_w) |
| 34 | 40 | { |
| 35 | 41 | soundlatch_byte_w(space, offset, data); |
| r244617 | r244618 | |
| 43 | 49 | |
| 44 | 50 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tagteam_state ) |
| 45 | 51 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 46 | | AM_RANGE(0x2000, 0x2000) AM_READ_PORT("P2") AM_WRITE(tagteam_flipscreen_w) |
| 47 | | AM_RANGE(0x2001, 0x2001) AM_READ_PORT("P1") AM_WRITE(tagteam_control_w) |
| 52 | AM_RANGE(0x2000, 0x2000) AM_READ_PORT("P2") AM_WRITE(flipscreen_w) |
| 53 | AM_RANGE(0x2001, 0x2001) AM_READ_PORT("P1") AM_WRITE(control_w) |
| 48 | 54 | AM_RANGE(0x2002, 0x2002) AM_READ_PORT("DSW1") AM_WRITE(sound_command_w) |
| 49 | 55 | AM_RANGE(0x2003, 0x2003) AM_READ_PORT("DSW2") AM_WRITE(irq_clear_w) |
| 50 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(tagteam_mirrorvideoram_r, tagteam_mirrorvideoram_w) |
| 51 | | AM_RANGE(0x4400, 0x47ff) AM_READWRITE(tagteam_mirrorcolorram_r, tagteam_mirrorcolorram_w) |
| 56 | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(mirrorvideoram_r, mirrorvideoram_w) |
| 57 | AM_RANGE(0x4400, 0x47ff) AM_READWRITE(mirrorcolorram_r, mirrorcolorram_w) |
| 52 | 58 | AM_RANGE(0x4800, 0x4fff) AM_READONLY |
| 53 | | AM_RANGE(0x4800, 0x4bff) AM_WRITE(tagteam_videoram_w) AM_SHARE("videoram") |
| 54 | | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(tagteam_colorram_w) AM_SHARE("colorram") |
| 59 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(videoram_w) AM_SHARE("videoram") |
| 60 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(colorram_w) AM_SHARE("colorram") |
| 55 | 61 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 56 | 62 | ADDRESS_MAP_END |
| 57 | 63 | |
| r244617 | r244618 | |
| 218 | 224 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(3072)) |
| 219 | 225 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 220 | 226 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 221 | | MCFG_SCREEN_UPDATE_DRIVER(tagteam_state, screen_update_tagteam) |
| 227 | MCFG_SCREEN_UPDATE_DRIVER(tagteam_state, screen_update) |
| 222 | 228 | MCFG_SCREEN_PALETTE("palette") |
| 223 | 229 | |
| 224 | 230 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", tagteam) |
| r244617 | r244618 | |
| 304 | 310 | |
| 305 | 311 | |
| 306 | 312 | |
| 307 | | GAME( 1983, bigprowr, 0, tagteam, bigprowr, driver_device, 0, ROT270, "Technos Japan", "The Big Pro Wrestling!", 0 ) |
| 308 | | GAME( 1983, tagteam, bigprowr, tagteam, tagteam, driver_device, 0, ROT270, "Technos Japan (Data East license)", "Tag Team Wrestling", 0 ) |
| 313 | GAME( 1983, bigprowr, 0, tagteam, bigprowr, driver_device, 0, ROT270, "Technos Japan", "The Big Pro Wrestling!", GAME_SUPPORTS_SAVE ) |
| 314 | GAME( 1983, tagteam, bigprowr, tagteam, tagteam, driver_device, 0, ROT270, "Technos Japan (Data East license)", "Tag Team Wrestling", GAME_SUPPORTS_SAVE ) |
branches/kale/src/mame/drivers/taotaido.c
| r244617 | r244618 | |
| 73 | 73 | #define TAOTAIDO_SHOW_ALL_INPUTS 0 |
| 74 | 74 | |
| 75 | 75 | |
| 76 | void taotaido_state::machine_start() |
| 77 | { |
| 78 | save_item(NAME(m_pending_command)); |
| 79 | } |
| 80 | |
| 81 | |
| 76 | 82 | READ16_MEMBER(taotaido_state::pending_command_r) |
| 77 | 83 | { |
| 78 | 84 | /* Only bit 0 is tested */ |
| r244617 | r244618 | |
| 90 | 96 | } |
| 91 | 97 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, taotaido_state ) |
| 92 | 98 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 93 | | AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE(taotaido_bgvideoram_w) AM_SHARE("bgram") // bg ram? |
| 99 | AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgram") // bg ram? |
| 94 | 100 | AM_RANGE(0xa00000, 0xa01fff) AM_RAM AM_SHARE("spriteram") // sprite ram |
| 95 | 101 | AM_RANGE(0xc00000, 0xc0ffff) AM_RAM AM_SHARE("spriteram2") // sprite tile lookup ram |
| 96 | 102 | AM_RANGE(0xfe0000, 0xfeffff) AM_RAM // main ram |
| r244617 | r244618 | |
| 106 | 112 | AM_RANGE(0xffff8e, 0xffff8f) AM_READ_PORT("JP") |
| 107 | 113 | AM_RANGE(0xffffa0, 0xffffa1) AM_READ_PORT("P3") // used only by taotaida |
| 108 | 114 | AM_RANGE(0xffffa2, 0xffffa3) AM_READ_PORT("P4") // used only by taotaida |
| 109 | | AM_RANGE(0xffff00, 0xffff0f) AM_WRITE(taotaido_tileregs_w) |
| 115 | AM_RANGE(0xffff00, 0xffff0f) AM_WRITE(tileregs_w) |
| 110 | 116 | AM_RANGE(0xffff10, 0xffff11) AM_WRITENOP // unknown |
| 111 | 117 | AM_RANGE(0xffff20, 0xffff21) AM_WRITENOP // unknown - flip screen related |
| 112 | | AM_RANGE(0xffff40, 0xffff47) AM_WRITE(taotaido_sprite_character_bank_select_w) |
| 118 | AM_RANGE(0xffff40, 0xffff47) AM_WRITE(sprite_character_bank_select_w) |
| 113 | 119 | AM_RANGE(0xffffc0, 0xffffc1) AM_WRITE(sound_command_w) // seems right |
| 114 | 120 | AM_RANGE(0xffffe0, 0xffffe1) AM_READ(pending_command_r) // guess - seems to be needed for all the sounds to work |
| 115 | 121 | ADDRESS_MAP_END |
| r244617 | r244618 | |
| 122 | 128 | m_pending_command = 0; |
| 123 | 129 | } |
| 124 | 130 | |
| 125 | | WRITE8_MEMBER(taotaido_state::taotaido_sh_bankswitch_w) |
| 131 | WRITE8_MEMBER(taotaido_state::sh_bankswitch_w) |
| 126 | 132 | { |
| 127 | 133 | UINT8 *rom = memregion("audiocpu")->base() + 0x10000; |
| 128 | 134 | |
| r244617 | r244618 | |
| 138 | 144 | static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, taotaido_state ) |
| 139 | 145 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 140 | 146 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write) |
| 141 | | AM_RANGE(0x04, 0x04) AM_WRITE(taotaido_sh_bankswitch_w) |
| 147 | AM_RANGE(0x04, 0x04) AM_WRITE(sh_bankswitch_w) |
| 142 | 148 | AM_RANGE(0x08, 0x08) AM_WRITE(pending_command_clear_w) |
| 143 | 149 | AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_byte_r) |
| 144 | 150 | ADDRESS_MAP_END |
| r244617 | r244618 | |
| 331 | 337 | INPUT_PORTS_END |
| 332 | 338 | |
| 333 | 339 | |
| 334 | | static const gfx_layout taotaido_layout = |
| 340 | static const gfx_layout layout = |
| 335 | 341 | { |
| 336 | 342 | 16,16, |
| 337 | 343 | RGN_FRAC(1,1), |
| r244617 | r244618 | |
| 345 | 351 | }; |
| 346 | 352 | |
| 347 | 353 | static GFXDECODE_START( taotaido ) |
| 348 | | GFXDECODE_ENTRY( "gfx1", 0, taotaido_layout, 0x000, 256 ) /* sprites */ |
| 349 | | GFXDECODE_ENTRY( "gfx2", 0, taotaido_layout, 0x300, 256 ) /* bg tiles */ |
| 354 | GFXDECODE_ENTRY( "gfx1", 0, layout, 0x000, 256 ) /* sprites */ |
| 355 | GFXDECODE_ENTRY( "gfx2", 0, layout, 0x300, 256 ) /* bg tiles */ |
| 350 | 356 | GFXDECODE_END |
| 351 | 357 | |
| 352 | | WRITE_LINE_MEMBER(taotaido_state::irqhandler) |
| 353 | | { |
| 354 | | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 355 | | } |
| 356 | 358 | |
| 357 | 359 | |
| 358 | | |
| 359 | 360 | static MACHINE_CONFIG_START( taotaido, taotaido_state ) |
| 360 | 361 | MCFG_CPU_ADD("maincpu", M68000, 32000000/2) |
| 361 | 362 | MCFG_CPU_PROGRAM_MAP(main_map) |
| r244617 | r244618 | |
| 373 | 374 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 374 | 375 | MCFG_SCREEN_SIZE(40*8, 32*8) |
| 375 | 376 | MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) |
| 376 | | MCFG_SCREEN_UPDATE_DRIVER(taotaido_state, screen_update_taotaido) |
| 377 | | MCFG_SCREEN_VBLANK_DRIVER(taotaido_state, screen_eof_taotaido) |
| 377 | MCFG_SCREEN_UPDATE_DRIVER(taotaido_state, screen_update) |
| 378 | MCFG_SCREEN_VBLANK_DRIVER(taotaido_state, screen_eof) |
| 378 | 379 | MCFG_SCREEN_PALETTE("palette") |
| 379 | 380 | |
| 380 | 381 | MCFG_PALETTE_ADD("palette", 0x800) |
| 381 | 382 | MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) |
| 382 | 383 | |
| 383 | 384 | MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0) |
| 384 | | MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( taotaido_state, taotaido_tile_callback ) |
| 385 | MCFG_VSYSTEM_SPR_SET_TILE_INDIRECT( taotaido_state, tile_callback ) |
| 385 | 386 | MCFG_VSYSTEM_SPR_SET_GFXREGION(0) |
| 386 | 387 | MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode") |
| 387 | 388 | MCFG_VSYSTEM_SPR_PALETTE("palette") |
| r244617 | r244618 | |
| 390 | 391 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 391 | 392 | |
| 392 | 393 | MCFG_SOUND_ADD("ymsnd", YM2610, 8000000) |
| 393 | | MCFG_YM2610_IRQ_HANDLER(WRITELINE(taotaido_state, irqhandler)) |
| 394 | MCFG_YM2610_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) |
| 394 | 395 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.25) |
| 395 | 396 | MCFG_SOUND_ROUTE(0, "rspeaker", 0.25) |
| 396 | 397 | MCFG_SOUND_ROUTE(1, "lspeaker", 1.0) |
| r244617 | r244618 | |
| 470 | 471 | ROM_LOAD( "u15.bin", 0x000000, 0x200000, CRC(e95823e9) SHA1(362583944ad4fdde4f9e29928cf34376c7ad931f) ) |
| 471 | 472 | ROM_END |
| 472 | 473 | |
| 473 | | GAME( 1993, taotaido, 0, taotaido, taotaido, driver_device, 0, ROT0, "Video System Co.", "Tao Taido (2 button version)", GAME_NO_COCKTAIL ) |
| 474 | | GAME( 1993, taotaidoa,taotaido, taotaido, taotaido6,driver_device, 0, ROT0, "Video System Co.", "Tao Taido (6 button version)", GAME_NO_COCKTAIL ) // maybe a prototype? has various debug features |
| 475 | | GAME( 1993, taotaido3,taotaido, taotaido, taotaido3,driver_device, 0, ROT0, "Video System Co.", "Tao Taido (2/3 button version)", GAME_NO_COCKTAIL ) |
| 474 | GAME( 1993, taotaido, 0, taotaido, taotaido, driver_device, 0, ROT0, "Video System Co.", "Tao Taido (2 button version)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 475 | GAME( 1993, taotaidoa,taotaido, taotaido, taotaido6,driver_device, 0, ROT0, "Video System Co.", "Tao Taido (6 button version)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) // maybe a prototype? has various debug features |
| 476 | GAME( 1993, taotaido3,taotaido, taotaido, taotaido3,driver_device, 0, ROT0, "Video System Co.", "Tao Taido (2/3 button version)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
branches/kale/src/mame/includes/mosaic.h
| r244617 | r244618 | |
| 9 | 9 | public: |
| 10 | 10 | mosaic_state(const machine_config &mconfig, device_type type, const char *tag) |
| 11 | 11 | : driver_device(mconfig, type, tag), |
| 12 | m_maincpu(*this, "maincpu"), |
| 13 | m_gfxdecode(*this, "gfxdecode"), |
| 12 | 14 | m_fgvideoram(*this, "fgvideoram"), |
| 13 | | m_bgvideoram(*this, "bgvideoram"), |
| 14 | | m_maincpu(*this, "maincpu"), |
| 15 | | m_gfxdecode(*this, "gfxdecode") { } |
| 15 | m_bgvideoram(*this, "bgvideoram") { } |
| 16 | 16 | |
| 17 | /* devices */ |
| 18 | required_device<cpu_device> m_maincpu; |
| 19 | required_device<gfxdecode_device> m_gfxdecode; |
| 20 | |
| 17 | 21 | /* memory pointers */ |
| 18 | 22 | required_shared_ptr<UINT8> m_fgvideoram; |
| 19 | 23 | required_shared_ptr<UINT8> m_bgvideoram; |
| 20 | | // UINT8 * m_paletteram; // currently this uses generic palette handling |
| 21 | 24 | |
| 22 | 25 | /* video-related */ |
| 23 | 26 | tilemap_t *m_bg_tilemap; |
| r244617 | r244618 | |
| 25 | 28 | |
| 26 | 29 | /* misc */ |
| 27 | 30 | int m_prot_val; |
| 31 | |
| 28 | 32 | DECLARE_WRITE8_MEMBER(protection_w); |
| 29 | 33 | DECLARE_READ8_MEMBER(protection_r); |
| 30 | 34 | DECLARE_WRITE8_MEMBER(gfire2_protection_w); |
| 31 | 35 | DECLARE_READ8_MEMBER(gfire2_protection_r); |
| 32 | | DECLARE_WRITE8_MEMBER(mosaic_fgvideoram_w); |
| 33 | | DECLARE_WRITE8_MEMBER(mosaic_bgvideoram_w); |
| 36 | DECLARE_WRITE8_MEMBER(fgvideoram_w); |
| 37 | DECLARE_WRITE8_MEMBER(bgvideoram_w); |
| 38 | |
| 34 | 39 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 35 | 40 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 41 | |
| 36 | 42 | virtual void machine_start(); |
| 37 | 43 | virtual void machine_reset(); |
| 38 | 44 | virtual void video_start(); |
| 39 | | UINT32 screen_update_mosaic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 40 | | required_device<cpu_device> m_maincpu; |
| 41 | | required_device<gfxdecode_device> m_gfxdecode; |
| 45 | |
| 46 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | 47 | }; |
branches/kale/src/mame/includes/tagteam.h
| r244617 | r244618 | |
| 3 | 3 | public: |
| 4 | 4 | tagteam_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | | m_videoram(*this, "videoram"), |
| 7 | | m_colorram(*this, "colorram"), |
| 8 | 6 | m_maincpu(*this, "maincpu"), |
| 9 | 7 | m_audiocpu(*this, "audiocpu"), |
| 10 | 8 | m_gfxdecode(*this, "gfxdecode"), |
| 11 | | m_palette(*this, "palette") { } |
| 9 | m_palette(*this, "palette"), |
| 10 | m_videoram(*this, "videoram"), |
| 11 | m_colorram(*this, "colorram") { } |
| 12 | 12 | |
| 13 | required_device<cpu_device> m_maincpu; |
| 14 | required_device<cpu_device> m_audiocpu; |
| 15 | required_device<gfxdecode_device> m_gfxdecode; |
| 16 | required_device<palette_device> m_palette; |
| 17 | |
| 13 | 18 | required_shared_ptr<UINT8> m_videoram; |
| 14 | 19 | required_shared_ptr<UINT8> m_colorram; |
| 20 | |
| 15 | 21 | int m_palettebank; |
| 16 | 22 | tilemap_t *m_bg_tilemap; |
| 23 | UINT8 m_sound_nmi_mask; |
| 17 | 24 | |
| 18 | | UINT8 m_sound_nmi_mask; |
| 19 | 25 | DECLARE_WRITE8_MEMBER(sound_command_w); |
| 20 | 26 | DECLARE_WRITE8_MEMBER(irq_clear_w); |
| 21 | 27 | DECLARE_WRITE8_MEMBER(sound_nmi_mask_w); |
| 22 | | DECLARE_WRITE8_MEMBER(tagteam_videoram_w); |
| 23 | | DECLARE_WRITE8_MEMBER(tagteam_colorram_w); |
| 24 | | DECLARE_READ8_MEMBER(tagteam_mirrorvideoram_r); |
| 25 | | DECLARE_READ8_MEMBER(tagteam_mirrorcolorram_r); |
| 26 | | DECLARE_WRITE8_MEMBER(tagteam_mirrorvideoram_w); |
| 27 | | DECLARE_WRITE8_MEMBER(tagteam_mirrorcolorram_w); |
| 28 | | DECLARE_WRITE8_MEMBER(tagteam_control_w); |
| 29 | | DECLARE_WRITE8_MEMBER(tagteam_flipscreen_w); |
| 28 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 29 | DECLARE_WRITE8_MEMBER(colorram_w); |
| 30 | DECLARE_READ8_MEMBER(mirrorvideoram_r); |
| 31 | DECLARE_READ8_MEMBER(mirrorcolorram_r); |
| 32 | DECLARE_WRITE8_MEMBER(mirrorvideoram_w); |
| 33 | DECLARE_WRITE8_MEMBER(mirrorcolorram_w); |
| 34 | DECLARE_WRITE8_MEMBER(control_w); |
| 35 | DECLARE_WRITE8_MEMBER(flipscreen_w); |
| 36 | |
| 30 | 37 | DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); |
| 38 | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 39 | |
| 31 | 40 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 41 | |
| 42 | virtual void machine_start(); |
| 32 | 43 | virtual void video_start(); |
| 33 | 44 | DECLARE_PALETTE_INIT(tagteam); |
| 34 | | UINT32 screen_update_tagteam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 35 | | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 45 | |
| 46 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 36 | 47 | 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<palette_device> m_palette; |
| 41 | 48 | }; |
branches/kale/src/mame/includes/taotaido.h
| r244617 | r244618 | |
| 3 | 3 | public: |
| 4 | 4 | taotaido_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_audiocpu(*this, "audiocpu"), |
| 8 | m_gfxdecode(*this, "gfxdecode"), |
| 9 | m_spr(*this, "vsystem_spr"), |
| 6 | 10 | m_spriteram(*this, "spriteram"), |
| 7 | 11 | m_spriteram2(*this, "spriteram2"), |
| 8 | 12 | m_scrollram(*this, "scrollram"), |
| 9 | | m_bgram(*this, "bgram"), |
| 10 | | m_spr(*this, "vsystem_spr"), |
| 11 | | m_maincpu(*this, "maincpu"), |
| 12 | | m_audiocpu(*this, "audiocpu"), |
| 13 | | m_gfxdecode(*this, "gfxdecode") { } |
| 13 | m_bgram(*this, "bgram") { } |
| 14 | 14 | |
| 15 | | int m_pending_command; |
| 15 | required_device<cpu_device> m_maincpu; |
| 16 | required_device<cpu_device> m_audiocpu; |
| 17 | required_device<gfxdecode_device> m_gfxdecode; |
| 18 | required_device<vsystem_spr_device> m_spr; |
| 19 | |
| 16 | 20 | required_shared_ptr<UINT16> m_spriteram; |
| 17 | 21 | required_shared_ptr<UINT16> m_spriteram2; |
| 18 | 22 | required_shared_ptr<UINT16> m_scrollram; |
| 19 | 23 | required_shared_ptr<UINT16> m_bgram; |
| 20 | | required_device<vsystem_spr_device> m_spr; |
| 21 | | |
| 22 | | UINT32 taotaido_tile_callback( UINT32 code ); |
| 24 | |
| 25 | int m_pending_command; |
| 23 | 26 | UINT16 m_sprite_character_bank_select[8]; |
| 24 | 27 | UINT16 m_video_bank_select[8]; |
| 25 | 28 | tilemap_t *m_bg_tilemap; |
| r244617 | r244618 | |
| 27 | 30 | UINT16 *m_spriteram_older; |
| 28 | 31 | UINT16 *m_spriteram2_old; |
| 29 | 32 | UINT16 *m_spriteram2_older; |
| 33 | |
| 30 | 34 | DECLARE_READ16_MEMBER(pending_command_r); |
| 31 | 35 | DECLARE_WRITE16_MEMBER(sound_command_w); |
| 32 | 36 | DECLARE_WRITE8_MEMBER(pending_command_clear_w); |
| 33 | | DECLARE_WRITE8_MEMBER(taotaido_sh_bankswitch_w); |
| 34 | | DECLARE_WRITE16_MEMBER(taotaido_sprite_character_bank_select_w); |
| 35 | | DECLARE_WRITE16_MEMBER(taotaido_tileregs_w); |
| 36 | | DECLARE_WRITE16_MEMBER(taotaido_bgvideoram_w); |
| 37 | | TILE_GET_INFO_MEMBER(taotaido_bg_tile_info); |
| 38 | | TILEMAP_MAPPER_MEMBER(taotaido_tilemap_scan_rows); |
| 37 | DECLARE_WRITE8_MEMBER(sh_bankswitch_w); |
| 38 | DECLARE_WRITE16_MEMBER(sprite_character_bank_select_w); |
| 39 | DECLARE_WRITE16_MEMBER(tileregs_w); |
| 40 | DECLARE_WRITE16_MEMBER(bgvideoram_w); |
| 41 | |
| 42 | TILE_GET_INFO_MEMBER(bg_tile_info); |
| 43 | TILEMAP_MAPPER_MEMBER(tilemap_scan_rows); |
| 44 | |
| 45 | virtual void machine_start(); |
| 39 | 46 | virtual void video_start(); |
| 40 | | UINT32 screen_update_taotaido(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 41 | | void screen_eof_taotaido(screen_device &screen, bool state); |
| 42 | | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 43 | | required_device<cpu_device> m_maincpu; |
| 44 | | required_device<cpu_device> m_audiocpu; |
| 45 | | required_device<gfxdecode_device> m_gfxdecode; |
| 47 | |
| 48 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 49 | void screen_eof(screen_device &screen, bool state); |
| 50 | UINT32 tile_callback( UINT32 code ); |
| 46 | 51 | }; |
branches/kale/src/mame/video/tagteam.c
| r244617 | r244618 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | video.c |
| 3 | tagteam.c |
| 4 | 4 | |
| 5 | 5 | Functions to emulate the video hardware of the machine. |
| 6 | 6 | |
| r244617 | r244618 | |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | |
| 45 | | WRITE8_MEMBER(tagteam_state::tagteam_videoram_w) |
| 45 | WRITE8_MEMBER(tagteam_state::videoram_w) |
| 46 | 46 | { |
| 47 | 47 | m_videoram[offset] = data; |
| 48 | 48 | m_bg_tilemap->mark_tile_dirty(offset); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | | WRITE8_MEMBER(tagteam_state::tagteam_colorram_w) |
| 51 | WRITE8_MEMBER(tagteam_state::colorram_w) |
| 52 | 52 | { |
| 53 | 53 | m_colorram[offset] = data; |
| 54 | 54 | m_bg_tilemap->mark_tile_dirty(offset); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | | READ8_MEMBER(tagteam_state::tagteam_mirrorvideoram_r) |
| 57 | READ8_MEMBER(tagteam_state::mirrorvideoram_r) |
| 58 | 58 | { |
| 59 | 59 | int x,y; |
| 60 | 60 | |
| r244617 | r244618 | |
| 66 | 66 | return m_videoram[offset]; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | | READ8_MEMBER(tagteam_state::tagteam_mirrorcolorram_r) |
| 69 | READ8_MEMBER(tagteam_state::mirrorcolorram_r) |
| 70 | 70 | { |
| 71 | 71 | int x,y; |
| 72 | 72 | |
| r244617 | r244618 | |
| 78 | 78 | return m_colorram[offset]; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | | WRITE8_MEMBER(tagteam_state::tagteam_mirrorvideoram_w) |
| 81 | WRITE8_MEMBER(tagteam_state::mirrorvideoram_w) |
| 82 | 82 | { |
| 83 | 83 | int x,y; |
| 84 | 84 | |
| r244617 | r244618 | |
| 87 | 87 | y = offset % 32; |
| 88 | 88 | offset = 32 * y + x; |
| 89 | 89 | |
| 90 | | tagteam_videoram_w(space,offset,data); |
| 90 | videoram_w(space,offset,data); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | | WRITE8_MEMBER(tagteam_state::tagteam_mirrorcolorram_w) |
| 93 | WRITE8_MEMBER(tagteam_state::mirrorcolorram_w) |
| 94 | 94 | { |
| 95 | 95 | int x,y; |
| 96 | 96 | |
| r244617 | r244618 | |
| 99 | 99 | y = offset % 32; |
| 100 | 100 | offset = 32 * y + x; |
| 101 | 101 | |
| 102 | | tagteam_colorram_w(space,offset,data); |
| 102 | colorram_w(space,offset,data); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | | WRITE8_MEMBER(tagteam_state::tagteam_control_w) |
| 105 | WRITE8_MEMBER(tagteam_state::control_w) |
| 106 | 106 | { |
| 107 | 107 | // d0-3: color for blank screen, applies to h/v borders too |
| 108 | 108 | // (not implemented yet, and tagteam doesn't have a global screen on/off bit) |
| r244617 | r244618 | |
| 111 | 111 | m_palettebank = (data & 0x80) >> 7; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | | WRITE8_MEMBER(tagteam_state::tagteam_flipscreen_w) |
| 114 | WRITE8_MEMBER(tagteam_state::flipscreen_w) |
| 115 | 115 | { |
| 116 | 116 | // d0: flip screen |
| 117 | 117 | if (flip_screen() != (data &0x01)) |
| r244617 | r244618 | |
| 137 | 137 | { |
| 138 | 138 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(tagteam_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS_FLIP_X, |
| 139 | 139 | 8, 8, 32, 32); |
| 140 | |
| 141 | save_item(NAME(m_palettebank)); |
| 140 | 142 | } |
| 141 | 143 | |
| 142 | 144 | void tagteam_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) |
| r244617 | r244618 | |
| 183 | 185 | } |
| 184 | 186 | } |
| 185 | 187 | |
| 186 | | UINT32 tagteam_state::screen_update_tagteam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 188 | UINT32 tagteam_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 187 | 189 | { |
| 188 | 190 | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 189 | 191 | draw_sprites(bitmap, cliprect); |
branches/kale/src/mame/video/taotaido.c
| r244617 | r244618 | |
| 13 | 13 | #include "includes/taotaido.h" |
| 14 | 14 | |
| 15 | 15 | /* sprite tile codes 0x4000 - 0x7fff get remapped according to the content of these registers */ |
| 16 | | WRITE16_MEMBER(taotaido_state::taotaido_sprite_character_bank_select_w) |
| 16 | WRITE16_MEMBER(taotaido_state::sprite_character_bank_select_w) |
| 17 | 17 | { |
| 18 | 18 | if(ACCESSING_BITS_8_15) |
| 19 | 19 | m_sprite_character_bank_select[offset*2] = data >> 8; |
| r244617 | r244618 | |
| 27 | 27 | |
| 28 | 28 | /* the tilemap */ |
| 29 | 29 | |
| 30 | | WRITE16_MEMBER(taotaido_state::taotaido_tileregs_w) |
| 30 | WRITE16_MEMBER(taotaido_state::tileregs_w) |
| 31 | 31 | { |
| 32 | 32 | switch (offset) |
| 33 | 33 | { |
| r244617 | r244618 | |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | | WRITE16_MEMBER(taotaido_state::taotaido_bgvideoram_w) |
| 55 | WRITE16_MEMBER(taotaido_state::bgvideoram_w) |
| 56 | 56 | { |
| 57 | 57 | COMBINE_DATA(&m_bgram[offset]); |
| 58 | 58 | m_bg_tilemap->mark_tile_dirty(offset); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | | TILE_GET_INFO_MEMBER(taotaido_state::taotaido_bg_tile_info) |
| 61 | TILE_GET_INFO_MEMBER(taotaido_state::bg_tile_info) |
| 62 | 62 | { |
| 63 | 63 | int code = m_bgram[tile_index]&0x01ff; |
| 64 | 64 | int bank = (m_bgram[tile_index]&0x0e00)>>9; |
| r244617 | r244618 | |
| 72 | 72 | 0); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | | TILEMAP_MAPPER_MEMBER(taotaido_state::taotaido_tilemap_scan_rows) |
| 75 | TILEMAP_MAPPER_MEMBER(taotaido_state::tilemap_scan_rows) |
| 76 | 76 | { |
| 77 | 77 | /* logical (col,row) -> memory offset */ |
| 78 | 78 | return row*0x40 + (col&0x3f) + ((col&0x40)<<6); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | |
| 82 | | UINT32 taotaido_state::taotaido_tile_callback( UINT32 code ) |
| 82 | UINT32 taotaido_state::tile_callback( UINT32 code ) |
| 83 | 83 | { |
| 84 | 84 | code = m_spriteram2_older[code&0x7fff]; |
| 85 | 85 | |
| r244617 | r244618 | |
| 96 | 96 | |
| 97 | 97 | void taotaido_state::video_start() |
| 98 | 98 | { |
| 99 | | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(taotaido_state::taotaido_bg_tile_info),this),tilemap_mapper_delegate(FUNC(taotaido_state::taotaido_tilemap_scan_rows),this),16,16,128,64); |
| 99 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(taotaido_state::bg_tile_info),this),tilemap_mapper_delegate(FUNC(taotaido_state::tilemap_scan_rows),this),16,16,128,64); |
| 100 | 100 | |
| 101 | 101 | m_spriteram_old = auto_alloc_array(machine(), UINT16, 0x2000/2); |
| 102 | 102 | m_spriteram_older = auto_alloc_array(machine(), UINT16, 0x2000/2); |
| r244617 | r244618 | |
| 104 | 104 | m_spriteram2_old = auto_alloc_array(machine(), UINT16, 0x10000/2); |
| 105 | 105 | m_spriteram2_older = auto_alloc_array(machine(), UINT16, 0x10000/2); |
| 106 | 106 | |
| 107 | save_item(NAME(m_sprite_character_bank_select)); |
| 108 | save_item(NAME(m_video_bank_select)); |
| 107 | 109 | } |
| 108 | 110 | |
| 109 | 111 | |
| 110 | | UINT32 taotaido_state::screen_update_taotaido(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 112 | UINT32 taotaido_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 111 | 113 | { |
| 112 | 114 | // m_bg_tilemap->set_scrollx(0,(m_scrollram[0x380/2]>>4)); // the values put here end up being wrong every other frame |
| 113 | 115 | // m_bg_tilemap->set_scrolly(0,(m_scrollram[0x382/2]>>4)); // the values put here end up being wrong every other frame |
| r244617 | r244618 | |
| 133 | 135 | return 0; |
| 134 | 136 | } |
| 135 | 137 | |
| 136 | | void taotaido_state::screen_eof_taotaido(screen_device &screen, bool state) |
| 138 | void taotaido_state::screen_eof(screen_device &screen, bool state) |
| 137 | 139 | { |
| 138 | 140 | // rising edge |
| 139 | 141 | if (state) |