diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 046a4813f19..86dcab92dea 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -296,7 +296,7 @@ Notes: #include "cpu/z80/z80.h" #include "includes/taitoipt.h" #include "cpu/m68000/m68000.h" -#include "video/taitoic.h" +#include "video/taiicdev.h" #include "audio/taitosnd.h" #include "machine/taitoio.h" #include "includes/taito_f2.h" @@ -695,13 +695,13 @@ static WRITE16_HANDLER ( driveout_sound_command_w ) static ADDRESS_MAP_START( finalb_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM - AM_RANGE(0x200000, 0x200007) AM_READWRITE(TC0110PCR_word_r, TC0110PCR_word_w) /* palette */ + AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */ AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0x00ff) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0x00ff) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP /* error in game init code ? */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0xb00002, 0xb00003) AM_WRITENOP /* ?? */ ADDRESS_MAP_END @@ -713,12 +713,12 @@ static ADDRESS_MAP_START( dondokod_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa01fff) AM_READWRITE(TC0280GRD_word_r, TC0280GRD_word_w) /* ROZ tilemap */ - AM_RANGE(0xa02000, 0xa0200f) AM_WRITE(TC0280GRD_ctrl_word_w) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE("tc0280grd", tc0280grd_word_r, tc0280grd_word_w) /* ROZ tilemap */ + AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE("tc0280grd", tc0280grd_ctrl_word_w) + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( megab_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -729,10 +729,10 @@ static ADDRESS_MAP_START( megab_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x180000, 0x180fff) AM_READWRITE(cchip2_word_r, cchip2_word_w) AM_BASE(&cchip2_ram) AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) - AM_RANGE(0x400000, 0x40001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ - AM_RANGE(0x600000, 0x60ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ + AM_RANGE(0x400000, 0x40001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ + AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ AM_RANGE(0x610000, 0x61ffff) AM_RAM /* unused? */ - AM_RANGE(0x620000, 0x62000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) ADDRESS_MAP_END @@ -743,12 +743,12 @@ static ADDRESS_MAP_START( thundfox_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x220000, 0x220001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x220002, 0x220003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0x300000, 0x30ffff) AM_RAM - AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x420000, 0x42000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) - AM_RANGE(0x500000, 0x50ffff) AM_READWRITE(TC0100SCN_word_1_r, TC0100SCN_word_1_w) /* tilemaps */ - AM_RANGE(0x520000, 0x52000f) AM_READWRITE(TC0100SCN_ctrl_word_1_r, TC0100SCN_ctrl_word_1_w) + AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) + AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x800000, 0x80001f) AM_WRITE8(TC0360PRI_w, 0xff00) + AM_RANGE(0x800000, 0x80001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0xff00) ADDRESS_MAP_END static ADDRESS_MAP_START( cameltry_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -759,23 +759,23 @@ static ADDRESS_MAP_START( cameltry_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300018, 0x30001f) AM_READ(cameltry_paddle_r) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x813fff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x813fff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa01fff) AM_READWRITE(TC0280GRD_word_r, TC0280GRD_word_w) /* ROZ tilemap */ - AM_RANGE(0xa02000, 0xa0200f) AM_WRITE(TC0280GRD_ctrl_word_w) - AM_RANGE(0xd00000, 0xd0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE("tc0280grd", tc0280grd_word_r, tc0280grd_word_w) /* ROZ tilemap */ + AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE("tc0280grd", tc0280grd_ctrl_word_w) + AM_RANGE(0xd00000, 0xd0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( qtorimon_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM - AM_RANGE(0x200000, 0x200007) AM_READWRITE(TC0110PCR_word_r, TC0110PCR_word_w) /* palette */ + AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */ AM_RANGE(0x500000, 0x50000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff) AM_RANGE(0x600000, 0x600001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x600002, 0x600003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0x910000, 0x9120ff) AM_WRITENOP /* error in init code ? */ ADDRESS_MAP_END @@ -787,16 +787,16 @@ static ADDRESS_MAP_START( liquidk_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0x00ff) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0x00ff) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( quizhq_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM - AM_RANGE(0x200000, 0x200007) AM_READWRITE(TC0110PCR_word_r, TC0110PCR_word_w) /* palette */ + AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */ AM_RANGE(0x500004, 0x500005) AM_WRITE(growl_coin_word_w) AM_RANGE(0x500000, 0x500001) AM_READ_PORT("DSWB") AM_RANGE(0x500002, 0x500003) AM_READ_PORT("IN0") @@ -808,9 +808,9 @@ static ADDRESS_MAP_START( quizhq_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x600000, 0x600001) AM_WRITE8(taitosound_port_w, 0x00ff) AM_RANGE(0x600002, 0x600003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0x00ff) AM_RANGE(0x680000, 0x680001) AM_WRITENOP /* ??? */ - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP /* error in init code ? */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) ADDRESS_MAP_END @@ -822,8 +822,8 @@ static ADDRESS_MAP_START( ssi_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x400001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x400002, 0x400003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) // AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* ?? */ - AM_RANGE(0x600000, 0x60ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps (not used) */ - AM_RANGE(0x620000, 0x62000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps (not used) */ + AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* sprite ram */ ADDRESS_MAP_END @@ -834,11 +834,11 @@ static ADDRESS_MAP_START( gunfront_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) // AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP /* ?? */ - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( growl_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -858,17 +858,17 @@ static ADDRESS_MAP_START( growl_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x504000, 0x504001) AM_WRITENOP /* unknown... various values */ AM_RANGE(0x508000, 0x50800f) AM_READ_PORT("IN3") AM_RANGE(0x50c000, 0x50c00f) AM_READ_PORT("IN4") - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( mjnquest_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_ROM AM_RANGE(0x110000, 0x11ffff) AM_RAM /* "sram" */ AM_RANGE(0x120000, 0x12ffff) AM_RAM - AM_RANGE(0x200000, 0x200007) AM_READWRITE(TC0110PCR_word_r, TC0110PCR_word_w) /* palette */ + AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */ AM_RANGE(0x300000, 0x30000f) AM_READ(mjnquest_dsw_r) AM_RANGE(0x310000, 0x310001) AM_READ(mjnquest_input_r) AM_RANGE(0x320000, 0x320001) AM_WRITE(mjnquest_inputselect_w) @@ -876,9 +876,9 @@ static ADDRESS_MAP_START( mjnquest_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x350000, 0x350001) AM_WRITENOP /* watchdog ? */ AM_RANGE(0x360000, 0x360001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x360002, 0x360003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x380000, 0x380001) AM_WRITE(TC0100SCN_gfxbank_w) /* scr gfx bank select */ - AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x420000, 0x42000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x380000, 0x380001) AM_DEVWRITE("tc0100scn", tc0100scn_gfxbank_w) /* scr gfx bank select */ + AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x500000, 0x50ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) ADDRESS_MAP_END @@ -887,9 +887,9 @@ static ADDRESS_MAP_START( footchmp_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0x300000, 0x30000f) AM_WRITE(taitof2_spritebank_w) /* updated at $a6e, off irq5 */ - AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(TC0480SCP_word_r, TC0480SCP_word_w) /* tilemaps */ - AM_RANGE(0x430000, 0x43002f) AM_READWRITE(TC0480SCP_ctrl_word_r, TC0480SCP_ctrl_word_w) - AM_RANGE(0x500000, 0x50001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* 500002 written like a watchdog?! */ + AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_word_r, tc0480scp_word_w) /* tilemaps */ + AM_RANGE(0x430000, 0x43002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w) + AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* 500002 written like a watchdog?! */ AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x700006, 0x700007) AM_WRITE(taitof2_4p_coin_word_w) AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSWA") @@ -911,11 +911,11 @@ static ADDRESS_MAP_START( koshien_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) AM_RANGE(0x320000, 0x320001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x320002, 0x320003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0xa20000, 0xa20001) AM_WRITE(koshien_spritebank_w) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0xff00) + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0xff00) ADDRESS_MAP_END static ADDRESS_MAP_START( yuyugogo_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -923,8 +923,8 @@ static ADDRESS_MAP_START( yuyugogo_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) AM_RANGE(0x400000, 0x400001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x400002, 0x400003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0xb00000, 0xb10fff) AM_RAM /* deliberate writes to $b10xxx, I think */ @@ -942,10 +942,10 @@ static ADDRESS_MAP_START( ninjak_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x400001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x400002, 0x400003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0x600000, 0x60000f) AM_WRITE(taitof2_spritebank_w) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* b00002 written like a watchdog?! */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* b00002 written like a watchdog?! */ ADDRESS_MAP_END static ADDRESS_MAP_START( solfigtr_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -963,10 +963,10 @@ static ADDRESS_MAP_START( solfigtr_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400002, 0x400003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0x500000, 0x50000f) AM_WRITE(taitof2_spritebank_w) AM_RANGE(0x504000, 0x504001) AM_WRITENOP /* unknown... various values */ - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( qzquest_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -977,8 +977,8 @@ static ADDRESS_MAP_START( qzquest_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x500000, 0x50ffff) AM_RAM AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x700000, 0x70ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x720000, 0x72000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) ADDRESS_MAP_END static ADDRESS_MAP_START( pulirula_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -986,15 +986,15 @@ static ADDRESS_MAP_START( pulirula_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x200002, 0x200003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0x300000, 0x30ffff) AM_RAM - AM_RANGE(0x400000, 0x401fff) AM_READWRITE(TC0430GRW_word_r, TC0430GRW_word_w) /* ROZ tilemap */ - AM_RANGE(0x402000, 0x40200f) AM_WRITE(TC0430GRW_ctrl_word_w) + AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0430grw_word_r, tc0430grw_word_w) /* ROZ tilemap */ + AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0430grw_ctrl_word_w) // AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* ??? */ AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_BASE(&f2_sprite_extension) AM_SIZE(&f2_spriteext_size) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa0001f) AM_WRITE8(TC0360PRI_w, 0xff00) + AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0xff00) AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) ADDRESS_MAP_END @@ -1003,9 +1003,9 @@ static ADDRESS_MAP_START( metalb_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) // AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP /* zeroed */ - AM_RANGE(0x500000, 0x50ffff) AM_READWRITE(TC0480SCP_word_r, TC0480SCP_word_w) /* tilemaps */ - AM_RANGE(0x530000, 0x53002f) AM_READWRITE(TC0480SCP_ctrl_word_r, TC0480SCP_ctrl_word_w) - AM_RANGE(0x600000, 0x60001f) AM_WRITE8(TC0360PRI_w, 0x00ff) + AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_word_r, tc0480scp_word_w) /* tilemaps */ + AM_RANGE(0x530000, 0x53002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w) + AM_RANGE(0x600000, 0x60001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) AM_RANGE(0x700000, 0x703fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x800000, 0x80000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w) AM_RANGE(0x900000, 0x900001) AM_WRITE8(taitosound_port_w, 0xff00) @@ -1021,16 +1021,16 @@ static ADDRESS_MAP_START( qzchikyu_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x500000, 0x50ffff) AM_RAM AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x700000, 0x70ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x720000, 0x72000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x700000, 0x70ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x720000, 0x72000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) ADDRESS_MAP_END static ADDRESS_MAP_START( yesnoj_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_RANGE(0x400000, 0x40ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x500000, 0x50ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x520000, 0x52000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) // AM_RANGE(0x700000, 0x70000b) AM_READ(yesnoj_unknown_r) /* what's this? */ AM_RANGE(0x800000, 0x800001) AM_WRITE8(taitosound_port_w, 0xff00) @@ -1049,10 +1049,10 @@ static ADDRESS_MAP_START( deadconx_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) AM_RANGE(0x300000, 0x30000f) AM_WRITE(taitof2_spritebank_w) - AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(TC0480SCP_word_r, TC0480SCP_word_w) /* tilemaps */ -// AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP /* zeroed */ - AM_RANGE(0x430000, 0x43002f) AM_READWRITE(TC0480SCP_ctrl_word_r, TC0480SCP_ctrl_word_w) - AM_RANGE(0x500000, 0x50001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* uses 500002 like a watchdog !? */ + AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_word_r, tc0480scp_word_w) /* tilemaps */ +// AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP /* zeroed */ + AM_RANGE(0x430000, 0x43002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w) + AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* uses 500002 like a watchdog !? */ AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSWA") AM_RANGE(0x700002, 0x700003) AM_READ_PORT("DSWB") @@ -1071,10 +1071,10 @@ static ADDRESS_MAP_START( dinorex_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x400000, 0x400fff) AM_WRITE(taitof2_sprite_extension_w) AM_BASE(&f2_sprite_extension) AM_SIZE(&f2_spriteext_size) AM_RANGE(0x500000, 0x501fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x600000, 0x60ffff) AM_RAM - AM_RANGE(0x700000, 0x70001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0x700000, 0x70001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x900000, 0x90ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x920000, 0x92000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0xa00000, 0xa00001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0xa00002, 0xa00003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP /* watchdog? */ @@ -1088,10 +1088,10 @@ static ADDRESS_MAP_START( qjinsei_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* watchdog ? */ AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_BASE(&f2_sprite_extension) AM_SIZE(&f2_spriteext_size) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) ADDRESS_MAP_END @@ -1105,10 +1105,10 @@ static ADDRESS_MAP_START( qcrayon_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_BASE(&f2_sprite_extension) AM_SIZE(&f2_spriteext_size) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x900000, 0x90ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x920000, 0x92000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0xa00000, 0xa0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) - AM_RANGE(0xb00000, 0xb0001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ ADDRESS_MAP_END static ADDRESS_MAP_START( qcrayon2_map, ADDRESS_SPACE_PROGRAM, 16 ) @@ -1116,11 +1116,11 @@ static ADDRESS_MAP_START( qcrayon2_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBxxxx_word_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0x400000, 0x40ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0x500000, 0x50ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x520000, 0x52000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x600000, 0x67ffff) AM_ROM AM_REGION("extra", 0) /* extra data rom */ AM_RANGE(0x700000, 0x70000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) - AM_RANGE(0x900000, 0x90001f) AM_WRITE8(TC0360PRI_w, 0x00ff) /* ?? */ + AM_RANGE(0x900000, 0x90001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */ AM_RANGE(0xa00000, 0xa00001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0xa00002, 0xa00003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0xb00000, 0xb017ff) AM_WRITE(taitof2_sprite_extension_w) AM_BASE(&f2_sprite_extension) AM_SIZE(&f2_spriteext_size) @@ -1131,13 +1131,13 @@ static ADDRESS_MAP_START( driftout_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x200000, 0x200001) AM_WRITE8(taitosound_port_w, 0xff00) AM_RANGE(0x200002, 0x200003) AM_READWRITE8(taitosound_comm_r, taitosound_comm_w, 0xff00) AM_RANGE(0x300000, 0x30ffff) AM_RAM - AM_RANGE(0x400000, 0x401fff) AM_READWRITE(TC0430GRW_word_r, TC0430GRW_word_w) /* ROZ tilemap */ - AM_RANGE(0x402000, 0x40200f) AM_WRITE(TC0430GRW_ctrl_word_w) + AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0430grw_word_r, tc0430grw_word_w) /* ROZ tilemap */ + AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0430grw_ctrl_word_w) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa0001f) AM_WRITE8(TC0360PRI_w, 0xff00) + AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0xff00) AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) AM_RANGE(0xb00018, 0xb00019) AM_READ_PORT("PADDLE1") AM_RANGE(0xb0001a, 0xb0001b) AM_READ_PORT("PADDLE2") @@ -1148,13 +1148,13 @@ static ADDRESS_MAP_START( driveout_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x000000, 0x0fffff) AM_ROM AM_RANGE(0x200000, 0x200003) AM_READNOP AM_WRITE(driveout_sound_command_w) AM_RANGE(0x300000, 0x30ffff) AM_RAM - AM_RANGE(0x400000, 0x401fff) AM_READWRITE(TC0430GRW_word_r, TC0430GRW_word_w) /* ROZ tilemap */ - AM_RANGE(0x402000, 0x40200f) AM_WRITE(TC0430GRW_ctrl_word_w) + AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0430grw_word_r, tc0430grw_word_w) /* ROZ tilemap */ + AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0430grw_ctrl_word_w) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram) - AM_RANGE(0x800000, 0x80ffff) AM_READWRITE(TC0100SCN_word_0_r, TC0100SCN_word_0_w) /* tilemaps */ - AM_RANGE(0x820000, 0x82000f) AM_READWRITE(TC0100SCN_ctrl_word_0_r, TC0100SCN_ctrl_word_0_w) + AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */ + AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w) AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) - AM_RANGE(0xa00000, 0xa0001f) AM_WRITE8(TC0360PRI_w, 0xff00) + AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_w, 0xff00) AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w) AM_RANGE(0xb00018, 0xb00019) AM_READ_PORT("PADDLE1") AM_RANGE(0xb0001a, 0xb0001b) AM_READ_PORT("PADDLE2") @@ -3162,6 +3162,161 @@ static const ym2203_interface ym2203_config = MACHINE DRIVERS ***********************************************************/ +static const tc0100scn_interface taitof2_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 0, 0, /* x_offset, y_offset */ + 0, 0, /* flip_xoff, flip_yoff */ + 0, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface liquidk_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 3, 0, /* x_offset, y_offset */ + 0, 0, /* flip_xoff, flip_yoff */ + 0, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface dondokod_tc0100scn_intf = +{ + "screen", + 1, 3, /* gfxnum, txnum */ + 3, 0, /* x_offset, y_offset */ + 0, 0, /* flip_xoff, flip_yoff */ + 0, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface finalb_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 1, 0, /* x_offset, y_offset */ + 0, 0, /* flip_xoff, flip_yoff */ + 0, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface ninjak_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 0, 0, /* x_offset, y_offset */ + 0, 0, /* flip_xoff, flip_yoff */ + 1, 2, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface qzchikyu_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 0, 0, /* x_offset, y_offset */ + -4, 0, /* flip_xoff, flip_yoff */ + -11, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface solfigtr_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 3, 0, /* x_offset, y_offset */ + 6, 0, /* flip_xoff, flip_yoff */ + 6, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface koshien_tc0100scn_intf = +{ + "screen", + 1, 2, /* gfxnum, txnum */ + 1, 0, /* x_offset, y_offset */ + 2, 0, /* flip_xoff, flip_yoff */ + 0, 0, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface thundfox_tc0100scn_intf_1 = +{ + "screen", + 1, 3, /* gfxnum, txnum */ + 3, 0, /* x_offset, y_offset */ + 5, 0, /* flip_xoff, flip_yoff */ + 4, 1, /* flip_text_xoff, flip_text_yoff */ + 0, 0 +}; + +static const tc0100scn_interface thundfox_tc0100scn_intf_2 = +{ + "screen", + 2, 4, /* gfxnum, txnum */ + 3, 0, /* x_offset, y_offset */ + 5, 0, /* flip_xoff, flip_yoff */ + 4, 1, /* flip_text_xoff, flip_text_yoff */ + TC0100SCN_SINGLE_VDU, 1 +}; + +static const tc0480scp_interface footchmp_tc0480scp_intf = +{ + 1, 2, /* gfxnum, txnum */ + 3, /* pixels */ + 0x1d, 0x08, /* x_offset, y_offset */ + -1, 0, /* text_xoff, text_yoff */ + -1, 0, /* flip_xoff, flip_yoff */ + 0 /* col_base */ +}; + +static const tc0480scp_interface hthero_tc0480scp_intf = +{ + 1, 2, /* gfxnum, txnum */ + 3, /* pixels */ + 0x33, -0x04, /* x_offset, y_offset */ + -1, 0, /* text_xoff, text_yoff */ + -1, 0, /* flip_xoff, flip_yoff */ + 0 /* col_base */ +}; + +static const tc0480scp_interface deadconx_tc0480scp_intf = +{ + 1, 2, /* gfxnum, txnum */ + 3, /* pixels */ + 0x1e, 0x08, /* x_offset, y_offset */ + -1, 0, /* text_xoff, text_yoff */ + -1, 0, /* flip_xoff, flip_yoff */ + 0 /* col_base */ +}; + +static const tc0480scp_interface deadconxj_tc0480scp_intf = +{ + 1, 2, /* gfxnum, txnum */ + 3, /* pixels */ + 0x34, -0x05, /* x_offset, y_offset */ + -1, 0, /* text_xoff, text_yoff */ + -1, 0, /* flip_xoff, flip_yoff */ + 0 /* col_base */ +}; + +static const tc0480scp_interface metalb_tc0480scp_intf = +{ + 1, 2, /* gfxnum, txnum */ + 3, /* pixels */ + 0x32, -0x04, /* x_offset, y_offset */ + 1, 0, /* text_xoff, text_yoff */ + -1, 0, /* flip_xoff, flip_yoff */ + 256 /* col_base */ +}; + +static const tc0110pcr_interface taitof2_tc0110pcr_intf = { 0 }; + +static const tc0280grd_interface taitof2_tc0280grd_intf = { 2 }; +static const tc0280grd_interface taitof2_tc0430grw_intf = { 2 }; + static const tc0220ioc_interface taitof2_io220_intf = { DEVCB_INPUT_PORT("DSWA"), DEVCB_INPUT_PORT("DSWB"), @@ -3246,6 +3401,9 @@ static MACHINE_DRIVER_START( finalb ) MDRV_GFXDECODE(finalb) MDRV_VIDEO_START(taitof2_finalb) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) + + MDRV_TC0100SCN_ADD("tc0100scn", finalb_tc0100scn_intf) + MDRV_TC0110PCR_ADD("tc0110pcr", taitof2_tc0110pcr_intf) MACHINE_DRIVER_END @@ -3261,6 +3419,10 @@ static MACHINE_DRIVER_START( dondokod ) MDRV_VIDEO_START(taitof2_dondokod) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3274,6 +3436,9 @@ static MACHINE_DRIVER_START( megab ) /* video hardware */ MDRV_VIDEO_START(taitof2_megab) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3289,6 +3454,10 @@ static MACHINE_DRIVER_START( thundfox ) MDRV_VIDEO_START(taitof2_thundfox) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed_thundfox) MDRV_VIDEO_UPDATE(taitof2_thundfox) + + MDRV_TC0100SCN_ADD("tc0100scn_1", thundfox_tc0100scn_intf_1) + MDRV_TC0100SCN_ADD("tc0100scn_2", thundfox_tc0100scn_intf_2) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3303,6 +3472,10 @@ static MACHINE_DRIVER_START( cameltry ) MDRV_GFXDECODE(pivot) MDRV_VIDEO_START(taitof2_dondokod) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3316,6 +3489,9 @@ static MACHINE_DRIVER_START( qtorimon ) /* video hardware */ MDRV_GFXDECODE(yuyugogo) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) + + MDRV_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf) + MDRV_TC0110PCR_ADD("tc0110pcr", taitof2_tc0110pcr_intf) MACHINE_DRIVER_END @@ -3330,6 +3506,9 @@ static MACHINE_DRIVER_START( liquidk ) MDRV_VIDEO_START(taitof2_megab) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3343,6 +3522,9 @@ static MACHINE_DRIVER_START( quizhq ) /* video hardware */ MDRV_GFXDECODE(yuyugogo) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) + + MDRV_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf) + MDRV_TC0110PCR_ADD("tc0110pcr", taitof2_tc0110pcr_intf) MACHINE_DRIVER_END @@ -3357,6 +3539,8 @@ static MACHINE_DRIVER_START( ssi ) MDRV_VIDEO_START(taitof2_ssi) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed_thundfox) // buffer_delayed_thundfox instead of buffer_delayed fixes the butterfly powerup MDRV_VIDEO_UPDATE(taitof2_ssi) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) MACHINE_DRIVER_END @@ -3370,6 +3554,9 @@ static MACHINE_DRIVER_START( gunfront ) /* video hardware */ MDRV_VIDEO_START(taitof2_gunfront) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3383,6 +3570,9 @@ static MACHINE_DRIVER_START( growl ) /* video hardware */ MDRV_VIDEO_START(taitof2_growl) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3395,6 +3585,9 @@ static MACHINE_DRIVER_START( mjnquest ) /* video hardware */ MDRV_VIDEO_START(taitof2_mjnquest) + + MDRV_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf) + MDRV_TC0110PCR_ADD("tc0110pcr", taitof2_tc0110pcr_intf) MACHINE_DRIVER_END @@ -3410,6 +3603,9 @@ static MACHINE_DRIVER_START( footchmp ) MDRV_VIDEO_START(taitof2_footchmp) MDRV_VIDEO_EOF(taitof2_full_buffer_delayed) MDRV_VIDEO_UPDATE(taitof2_deadconx) + + MDRV_TC0480SCP_ADD("tc0480scp", footchmp_tc0480scp_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3425,6 +3621,9 @@ static MACHINE_DRIVER_START( hthero ) MDRV_VIDEO_START(taitof2_hthero) MDRV_VIDEO_EOF(taitof2_full_buffer_delayed) MDRV_VIDEO_UPDATE(taitof2_deadconx) + + MDRV_TC0360PRI_ADD("tc0360pri") + MDRV_TC0480SCP_ADD("tc0480scp", hthero_tc0480scp_intf) MACHINE_DRIVER_END @@ -3438,6 +3637,9 @@ static MACHINE_DRIVER_START( koshien ) /* video hardware */ MDRV_VIDEO_START(taitof2_koshien) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", koshien_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3452,6 +3654,8 @@ static MACHINE_DRIVER_START( yuyugogo ) MDRV_GFXDECODE(yuyugogo) MDRV_VIDEO_START(taitof2_yuyugogo) MDRV_VIDEO_UPDATE(taitof2_yesnoj) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) MACHINE_DRIVER_END @@ -3465,6 +3669,9 @@ static MACHINE_DRIVER_START( ninjak ) /* video hardware */ MDRV_VIDEO_START(taitof2_ninjak) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", finalb_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3478,6 +3685,9 @@ static MACHINE_DRIVER_START( solfigtr ) /* video hardware */ MDRV_VIDEO_START(taitof2_solfigtr) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", solfigtr_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3490,6 +3700,8 @@ static MACHINE_DRIVER_START( qzquest ) /* video hardware */ MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed) + + MDRV_TC0100SCN_ADD("tc0100scn", taitof2_tc0100scn_intf) MACHINE_DRIVER_END @@ -3504,6 +3716,10 @@ static MACHINE_DRIVER_START( pulirula ) MDRV_GFXDECODE(pivot) MDRV_VIDEO_START(taitof2_pulirula) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3519,6 +3735,9 @@ static MACHINE_DRIVER_START( metalb ) MDRV_PALETTE_LENGTH(8192) MDRV_VIDEO_START(taitof2_metalb) MDRV_VIDEO_UPDATE(taitof2_metalb) + + MDRV_TC0480SCP_ADD("tc0480scp", metalb_tc0480scp_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3532,6 +3751,8 @@ static MACHINE_DRIVER_START( qzchikyu ) /* video hardware */ MDRV_VIDEO_START(taitof2_qzchikyu) MDRV_VIDEO_EOF(taitof2_partial_buffer_delayed_qzchikyu) + + MDRV_TC0100SCN_ADD("tc0100scn", qzchikyu_tc0100scn_intf) MACHINE_DRIVER_END @@ -3546,6 +3767,8 @@ static MACHINE_DRIVER_START( yesnoj ) MDRV_GFXDECODE(yuyugogo) MDRV_VIDEO_START(taitof2_yesnoj) MDRV_VIDEO_UPDATE(taitof2_yesnoj) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) MACHINE_DRIVER_END @@ -3560,6 +3783,9 @@ static MACHINE_DRIVER_START( deadconx ) MDRV_GFXDECODE(deadconx) MDRV_VIDEO_START(taitof2_deadconx) MDRV_VIDEO_UPDATE(taitof2_deadconx) + + MDRV_TC0480SCP_ADD("tc0480scp", deadconx_tc0480scp_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3574,6 +3800,9 @@ static MACHINE_DRIVER_START( deadconxj ) MDRV_GFXDECODE(deadconx) MDRV_VIDEO_START(taitof2_deadconxj) MDRV_VIDEO_UPDATE(taitof2_deadconx) + + MDRV_TC0480SCP_ADD("tc0480scp", deadconxj_tc0480scp_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3587,6 +3816,9 @@ static MACHINE_DRIVER_START( dinorex ) /* video hardware */ MDRV_VIDEO_START(taitof2_dinorex) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3600,6 +3832,9 @@ static MACHINE_DRIVER_START( qjinsei ) /* video hardware */ MDRV_VIDEO_START(taitof2_quiz) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3613,6 +3848,9 @@ static MACHINE_DRIVER_START( qcrayon ) /* video hardware */ MDRV_VIDEO_START(taitof2_quiz) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3626,6 +3864,9 @@ static MACHINE_DRIVER_START( qcrayon2 ) /* video hardware */ MDRV_VIDEO_START(taitof2_quiz) MDRV_VIDEO_UPDATE(taitof2_pri) + + MDRV_TC0100SCN_ADD("tc0100scn", liquidk_tc0100scn_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3640,6 +3881,10 @@ static MACHINE_DRIVER_START( driftout ) MDRV_GFXDECODE(pivot) MDRV_VIDEO_START(taitof2_driftout) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf) + MDRV_TC0360PRI_ADD("tc0360pri") MACHINE_DRIVER_END @@ -3670,6 +3915,10 @@ static MACHINE_DRIVER_START( cameltrya ) MDRV_VIDEO_EOF(taitof2_no_buffer) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf) + MDRV_TC0360PRI_ADD("tc0360pri") + /* sound hardware */ MDRV_SPEAKER_STANDARD_MONO("mono") @@ -3713,6 +3962,10 @@ static MACHINE_DRIVER_START( driveout ) MDRV_VIDEO_EOF(taitof2_no_buffer) MDRV_VIDEO_UPDATE(taitof2_pri_roz) + MDRV_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf) + MDRV_TC0430GRW_ADD("tc0430grw", taitof2_tc0430grw_intf) + MDRV_TC0360PRI_ADD("tc0360pri") + /* sound hardware */ MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") /* does it ? */ diff --git a/src/mame/video/taiicdev.c b/src/mame/video/taiicdev.c index d6791c472ff..946ba6cfbcd 100644 --- a/src/mame/video/taiicdev.c +++ b/src/mame/video/taiicdev.c @@ -2605,9 +2605,20 @@ WRITE16_DEVICE_HANDLER( tc0280grd_ctrl_word_w ) COMBINE_DATA(&tc0280grd->ctrl[offset]); } -#define tc0430grw_word_r tc0280grd_word_r -#define tc0430grw_word_w tc0280grd_word_w -#define tc0430grw_ctrl_word_w tc0280grd_ctrl_word_w +READ16_DEVICE_HANDLER( tc0430grw_word_r ) +{ + return tc0280grd_word_r(device, offset, mem_mask); +} + +WRITE16_DEVICE_HANDLER( tc0430grw_word_w ) +{ + tc0280grd_word_w(device, offset, data, mem_mask); +} + +WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w ) +{ + tc0280grd_ctrl_word_w(device, offset, data, mem_mask); +} void tc0280grd_tilemap_update( const device_config *device, int base_color ) { @@ -2619,6 +2630,10 @@ void tc0280grd_tilemap_update( const device_config *device, int base_color ) } } +void tc0430grw_tilemap_update( const device_config *device, int base_color ) +{ + tc0280grd_tilemap_update(device, base_color); +} static void zoom_draw( const device_config *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply ) { diff --git a/src/mame/video/taiicdev.h b/src/mame/video/taiicdev.h index 94b0125687e..3160513f655 100644 --- a/src/mame/video/taiicdev.h +++ b/src/mame/video/taiicdev.h @@ -281,8 +281,8 @@ void tc0280grd_zoom_draw(const device_config *device, bitmap_t *bitmap, const re READ16_DEVICE_HANDLER( tc0430grw_word_r ); WRITE16_DEVICE_HANDLER( tc0430grw_word_w ); WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w ); -void TC0430GRW_tilemap_update(const device_config *device, int base_color); -void TC0430GRW_zoom_draw(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); +void tc0430grw_tilemap_update(const device_config *device, int base_color); +void tc0430grw_zoom_draw(const device_config *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); /** TC0360PRI **/ diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index 35ce31811ab..8e327094632 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -1,12 +1,7 @@ #include "driver.h" -#include "video/taitoic.h" +#include "video/taiicdev.h" #include "includes/taito_f2.h" -#define TC0100SCN_GFX_NUM 1 -#define TC0480SCP_GFX_NUM 1 -#define TC0280GRD_GFX_NUM 2 -#define TC0430GRW_GFX_NUM 2 - struct tempsprite { int code,color; @@ -60,12 +55,6 @@ static INT32 f2_flip_hide_pixels; /* Different in some games */ static INT32 f2_pivot_xdisp = 0; /* Needed in games with a pivot layer */ static INT32 f2_pivot_ydisp = 0; -static INT32 f2_tilemap_xoffs = 0; /* Needed in TC0480SCP games */ -static INT32 f2_tilemap_yoffs = 0; -static INT32 f2_text_xoffs = 0; - -static int f2_tilemap_col_base = 0; - static INT32 f2_game = 0; static UINT8 f2_tilepri[6]; // todo - move into taitoic.c @@ -80,10 +69,9 @@ enum /***********************************************************************************/ -static void taitof2_core_vh_start (running_machine *machine, int sprite_type,int hide,int flip_hide,int x_offs,int y_offs, - int flip_xoffs,int flip_yoffs,int flip_text_x_offs,int flip_text_yoffs) +static void taitof2_core_vh_start (running_machine *machine, int sprite_type, int hide, int flip_hide ) { - int i,chips; + int i; f2_sprite_type = sprite_type; f2_hide_pixels = hide; f2_flip_hide_pixels = flip_hide; @@ -92,33 +80,6 @@ static void taitof2_core_vh_start (running_machine *machine, int sprite_type,int spriteram_buffered = auto_alloc_array(machine, UINT16, machine->generic.spriteram_size/2); spritelist = auto_alloc_array(machine, struct tempsprite, 0x400); - chips = TC0100SCN_count(machine); - - assert_always(chips >= 0, "erroneous TC0100SCN configuratiom"); - - if (has_TC0480SCP(machine)) /* it's a tc0480scp game */ - { - TC0480SCP_vh_start(machine,TC0480SCP_GFX_NUM,f2_hide_pixels,f2_tilemap_xoffs, - f2_tilemap_yoffs,f2_text_xoffs,0,-1,0,f2_tilemap_col_base); - } - else /* it's a tc0100scn game */ - { - TC0100SCN_vh_start(machine,chips,TC0100SCN_GFX_NUM,f2_hide_pixels,0, - flip_xoffs,flip_yoffs,flip_text_x_offs,flip_text_yoffs,TC0100SCN_SINGLE_VDU); - } - - if (TC0110PCR_mask(machine) & 1) - TC0110PCR_vh_start(machine); - - if (has_TC0280GRD(machine)) - TC0280GRD_vh_start(machine, TC0280GRD_GFX_NUM); - - if (has_TC0430GRW(machine)) - TC0430GRW_vh_start(machine, TC0430GRW_GFX_NUM); - - if (has_TC0360PRI(machine)) - TC0360PRI_vh_start(machine); /* Purely for save-state purposes */ - for (i = 0; i < 8; i ++) { spritebank_buffered[i] = 0x400 * i; @@ -146,153 +107,135 @@ static void taitof2_core_vh_start (running_machine *machine, int sprite_type,int VIDEO_START( taitof2_default ) { - taitof2_core_vh_start(machine, 0,0,0,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,0,0); } VIDEO_START( taitof2_megab ) /* Megab, Liquidk */ { - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_quiz ) /* Quiz Crayons, Quiz Jinsei */ { - taitof2_core_vh_start(machine, 3,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 3,3,3); } VIDEO_START( taitof2_finalb ) { - taitof2_core_vh_start(machine, 0,1,1,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,1,1); } VIDEO_START( taitof2_ssi ) { - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_growl ) { - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_ninjak ) { - taitof2_core_vh_start(machine, 0,0,0,0,0,0,0,1,2); + taitof2_core_vh_start(machine, 0,0,0); } VIDEO_START( taitof2_qzchikyu ) { - taitof2_core_vh_start(machine, 0,0,4,0,0,-4,0,-11,0); + taitof2_core_vh_start(machine, 0,0,4); } VIDEO_START( taitof2_solfigtr ) { - taitof2_core_vh_start(machine, 0,3,-3,0,0,6,0,6,0); + taitof2_core_vh_start(machine, 0,3,-3); } VIDEO_START( taitof2_koshien ) { - taitof2_core_vh_start(machine, 0,1,-1,0,0,2,0,0,0); + taitof2_core_vh_start(machine, 0,1,-1); } VIDEO_START( taitof2_gunfront ) { - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_thundfox ) { - taitof2_core_vh_start(machine, 0,3,-3,0,0,5,0,4,1); + taitof2_core_vh_start(machine, 0,3,-3); } VIDEO_START( taitof2_mjnquest ) { - taitof2_core_vh_start(machine, 0,0,0,0,0,0,0,0,0); - TC0100SCN_set_bg_tilemask(0x7fff); + const device_config *tc0100scn = devtag_get_device(machine, "tc0100scn"); + taitof2_core_vh_start(machine, 0,0,0); + + tc0100scn_set_bg_tilemask(tc0100scn, 0x7fff); } VIDEO_START( taitof2_footchmp ) { - f2_tilemap_xoffs = 0x1d; - f2_tilemap_yoffs = 0x08; - f2_text_xoffs = -1; - f2_tilemap_col_base = 0; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); f2_game = FOOTCHMP; } VIDEO_START( taitof2_hthero ) { - f2_tilemap_xoffs = 0x33; - f2_tilemap_yoffs = - 0x04; - f2_text_xoffs = -1; - f2_tilemap_col_base = 0; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); f2_game = FOOTCHMP; } VIDEO_START( taitof2_deadconx ) { - f2_tilemap_xoffs = 0x1e; - f2_tilemap_yoffs = 0x08; - f2_text_xoffs = -1; - f2_tilemap_col_base = 0; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_deadconxj ) { - f2_tilemap_xoffs = 0x34; - f2_tilemap_yoffs = - 0x05; - f2_text_xoffs = -1; - f2_tilemap_col_base = 0; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_metalb ) { - f2_tilemap_xoffs = 0x32; - f2_tilemap_yoffs = - 0x04; - f2_text_xoffs = 1; /* not the usual -1 */ - f2_tilemap_col_base = 256; /* separate palette area for tilemaps */ - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_yuyugogo ) { - taitof2_core_vh_start(machine, 1,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 1,3,3); } VIDEO_START( taitof2_yesnoj ) { - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_dinorex ) { - taitof2_core_vh_start(machine, 3,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 3,3,3); } VIDEO_START( taitof2_dondokod ) /* dondokod, cameltry */ { f2_pivot_xdisp = -16; f2_pivot_ydisp = 0; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } VIDEO_START( taitof2_pulirula ) { f2_pivot_xdisp = -10; /* alignment seems correct (see level 2, falling */ f2_pivot_ydisp = 16; /* block of ice after armour man) */ - taitof2_core_vh_start(machine, 2,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 2,3,3); } VIDEO_START( taitof2_driftout ) { f2_pivot_xdisp = -16; f2_pivot_ydisp = 16; - taitof2_core_vh_start(machine, 0,3,3,0,0,0,0,0,0); + taitof2_core_vh_start(machine, 0,3,3); } @@ -1050,66 +993,70 @@ VIDEO_UPDATE( taitof2_ssi ) VIDEO_UPDATE( taitof2_yesnoj ) { + const device_config *tc0100scn = devtag_get_device(screen->machine, "tc0100scn"); taitof2_handle_sprite_buffering(screen->machine); - TC0100SCN_tilemap_update(screen->machine); + tc0100scn_tilemap_update(tc0100scn); - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); /* wrong color? */ - draw_sprites(screen->machine, bitmap,cliprect,NULL, 0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0),0,0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0)^1,0,0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,2,0,0); + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); /* wrong color? */ + draw_sprites(screen->machine, bitmap, cliprect, NULL, 0); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(tc0100scn), 0, 0); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(tc0100scn) ^ 1, 0, 0); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, 2, 0, 0); return 0; } VIDEO_UPDATE( taitof2 ) { + const device_config *tc0100scn = devtag_get_device(screen->machine, "tc0100scn"); taitof2_handle_sprite_buffering(screen->machine); - TC0100SCN_tilemap_update(screen->machine); + tc0100scn_tilemap_update(tc0100scn); - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); /* wrong color? */ - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0),0,0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0)^1,0,0); - draw_sprites(screen->machine, bitmap,cliprect,NULL, 0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,2,0,0); + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); /* wrong color? */ + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(tc0100scn), 0, 0); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, tc0100scn_bottomlayer(tc0100scn) ^ 1, 0, 0); + draw_sprites(screen->machine, bitmap, cliprect, NULL, 0); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, 2, 0, 0); return 0; } VIDEO_UPDATE( taitof2_pri ) { + const device_config *tc0100scn = devtag_get_device(screen->machine, "tc0100scn"); + const device_config *tc0360pri = devtag_get_device(screen->machine, "tc0360pri"); int layer[3]; taitof2_handle_sprite_buffering(screen->machine); - TC0100SCN_tilemap_update(screen->machine); + tc0100scn_tilemap_update(tc0100scn); - layer[0] = TC0100SCN_bottomlayer(0); - layer[1] = layer[0]^1; + layer[0] = tc0100scn_bottomlayer(tc0100scn); + layer[1] = layer[0] ^ 1; layer[2] = 2; - f2_tilepri[layer[0]] = TC0360PRI_regs[5] & 0x0f; - f2_tilepri[layer[1]] = TC0360PRI_regs[5] >> 4; - f2_tilepri[layer[2]] = TC0360PRI_regs[4] >> 4; + f2_tilepri[layer[0]] = tc0360pri_r(tc0360pri, 5) & 0x0f; + f2_tilepri[layer[1]] = tc0360pri_r(tc0360pri, 5) >> 4; + f2_tilepri[layer[2]] = tc0360pri_r(tc0360pri, 4) >> 4; - f2_spritepri[0] = TC0360PRI_regs[6] & 0x0f; - f2_spritepri[1] = TC0360PRI_regs[6] >> 4; - f2_spritepri[2] = TC0360PRI_regs[7] & 0x0f; - f2_spritepri[3] = TC0360PRI_regs[7] >> 4; + f2_spritepri[0] = tc0360pri_r(tc0360pri, 6) & 0x0f; + f2_spritepri[1] = tc0360pri_r(tc0360pri, 6) >> 4; + f2_spritepri[2] = tc0360pri_r(tc0360pri, 7) & 0x0f; + f2_spritepri[3] = tc0360pri_r(tc0360pri, 7) >> 4; - f2_spriteblendmode = TC0360PRI_regs[0]&0xc0; + f2_spriteblendmode = tc0360pri_r(tc0360pri, 0) & 0xc0; - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); bitmap_fill(bitmap,cliprect,0); /* wrong color? */ - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[0],0,1); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[1],0,2); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[2],0,4); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[0], 0, 1); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[1], 0, 2); + tc0100scn_tilemap_draw(tc0100scn, bitmap, cliprect, layer[2], 0, 4); - draw_sprites(screen->machine, bitmap,cliprect,NULL,1); + draw_sprites(screen->machine, bitmap, cliprect, NULL, 1); return 0; } @@ -1117,75 +1064,82 @@ VIDEO_UPDATE( taitof2_pri ) static void draw_roz_layer(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,UINT32 priority) { - if (has_TC0280GRD(machine)) - TC0280GRD_zoom_draw(bitmap,cliprect,f2_pivot_xdisp,f2_pivot_ydisp,priority); + const device_config *tc0280grd = devtag_get_device(machine, "tc0280grd"); + const device_config *tc0430grw = devtag_get_device(machine, "tc0430grw"); - if (has_TC0430GRW(machine)) - TC0430GRW_zoom_draw(bitmap,cliprect,f2_pivot_xdisp,f2_pivot_ydisp,priority); + if (tc0280grd != NULL) + tc0280grd_zoom_draw(tc0280grd, bitmap, cliprect, f2_pivot_xdisp, f2_pivot_ydisp, priority); + + if (tc0430grw != NULL) + tc0430grw_zoom_draw(tc0430grw, bitmap, cliprect, f2_pivot_xdisp, f2_pivot_ydisp, priority); } VIDEO_UPDATE( taitof2_pri_roz ) { + const device_config *tc0100scn = devtag_get_device(screen->machine, "tc0100scn"); + const device_config *tc0360pri = devtag_get_device(screen->machine, "tc0360pri"); + const device_config *tc0280grd = devtag_get_device(screen->machine, "tc0280grd"); + const device_config *tc0430grw = devtag_get_device(screen->machine, "tc0430grw"); int tilepri[3]; int rozpri; int layer[3]; int drawn; int i,j; - int roz_base_color = (TC0360PRI_regs[1] & 0x3f) << 2; + int roz_base_color = (tc0360pri_r(tc0360pri, 1) & 0x3f) << 2; taitof2_handle_sprite_buffering(screen->machine); - if (has_TC0280GRD(screen->machine)) - TC0280GRD_tilemap_update(roz_base_color); + if (tc0280grd != NULL) + tc0280grd_tilemap_update(tc0280grd, roz_base_color); - if (has_TC0430GRW(screen->machine)) - TC0430GRW_tilemap_update(roz_base_color); + if (tc0430grw != NULL) + tc0430grw_tilemap_update(tc0430grw, roz_base_color); - TC0100SCN_tilemap_update(screen->machine); + tc0100scn_tilemap_update(tc0100scn); - rozpri = (TC0360PRI_regs[1] & 0xc0) >> 6; - rozpri = (TC0360PRI_regs[8 + rozpri/2] >> 4*(rozpri & 1)) & 0x0f; + rozpri = (tc0360pri_r(tc0360pri, 1) & 0xc0) >> 6; + rozpri = (tc0360pri_r(tc0360pri, 8 + rozpri / 2) >> 4 * (rozpri & 1)) & 0x0f; - layer[0] = TC0100SCN_bottomlayer(0); - layer[1] = layer[0]^1; + layer[0] = tc0100scn_bottomlayer(tc0100scn); + layer[1] = layer[0] ^ 1; layer[2] = 2; - tilepri[layer[0]] = TC0360PRI_regs[5] & 0x0f; - tilepri[layer[1]] = TC0360PRI_regs[5] >> 4; - tilepri[layer[2]] = TC0360PRI_regs[4] >> 4; + tilepri[layer[0]] = tc0360pri_r(tc0360pri, 5) & 0x0f; + tilepri[layer[1]] = tc0360pri_r(tc0360pri, 5) >> 4; + tilepri[layer[2]] = tc0360pri_r(tc0360pri, 4) >> 4; - f2_spritepri[0] = TC0360PRI_regs[6] & 0x0f; - f2_spritepri[1] = TC0360PRI_regs[6] >> 4; - f2_spritepri[2] = TC0360PRI_regs[7] & 0x0f; - f2_spritepri[3] = TC0360PRI_regs[7] >> 4; + f2_spritepri[0] = tc0360pri_r(tc0360pri, 6) & 0x0f; + f2_spritepri[1] = tc0360pri_r(tc0360pri, 6) >> 4; + f2_spritepri[2] = tc0360pri_r(tc0360pri, 7) & 0x0f; + f2_spritepri[3] = tc0360pri_r(tc0360pri, 7) >> 4; - f2_spriteblendmode = TC0360PRI_regs[0]&0xc0; + f2_spriteblendmode = tc0360pri_r(tc0360pri, 0) & 0xc0; - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); /* wrong color? */ + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); /* wrong color? */ - drawn=0; - for (i=0; i<16; i++) + drawn = 0; + for (i = 0; i < 16; i++) { - if (rozpri==i) + if (rozpri == i) { - draw_roz_layer(screen->machine,bitmap,cliprect,1 << drawn); - f2_tilepri[drawn]=i; + draw_roz_layer(screen->machine, bitmap, cliprect, 1 << drawn); + f2_tilepri[drawn] = i; drawn++; } - for (j=0; j<3; j++) + for (j = 0; j < 3; j++) { - if (tilepri[layer[j]]==i) + if (tilepri[layer[j]] == i) { - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[j],0,1<machine, bitmap,cliprect,NULL,1); + draw_sprites(screen->machine, bitmap, cliprect, NULL, 1); return 0; } @@ -1194,39 +1148,40 @@ VIDEO_UPDATE( taitof2_pri_roz ) /* Thunderfox */ VIDEO_UPDATE( taitof2_thundfox ) { + const device_config *tc0100scn_1 = devtag_get_device(screen->machine, "tc0100scn_1"); + const device_config *tc0100scn_2 = devtag_get_device(screen->machine, "tc0100scn_2"); + const device_config *tc0360pri = devtag_get_device(screen->machine, "tc0360pri"); int tilepri[2][3]; int spritepri[4]; int layer[2][3]; int drawn[2]; - taitof2_handle_sprite_buffering(screen->machine); - TC0100SCN_tilemap_update(screen->machine); + tc0100scn_tilemap_update(tc0100scn_1); + tc0100scn_tilemap_update(tc0100scn_2); - layer[0][0] = TC0100SCN_bottomlayer(0); - layer[0][1] = layer[0][0]^1; + layer[0][0] = tc0100scn_bottomlayer(tc0100scn_1); + layer[0][1] = layer[0][0] ^ 1; layer[0][2] = 2; - tilepri[0][layer[0][0]] = TC0360PRI_regs[5] & 0x0f; - tilepri[0][layer[0][1]] = TC0360PRI_regs[5] >> 4; - tilepri[0][layer[0][2]] = TC0360PRI_regs[4] >> 4; + tilepri[0][layer[0][0]] = tc0360pri_r(tc0360pri, 5) & 0x0f; + tilepri[0][layer[0][1]] = tc0360pri_r(tc0360pri, 5) >> 4; + tilepri[0][layer[0][2]] = tc0360pri_r(tc0360pri, 4) >> 4; - layer[1][0] = TC0100SCN_bottomlayer(1); - layer[1][1] = layer[1][0]^1; + layer[1][0] = tc0100scn_bottomlayer(tc0100scn_2); + layer[1][1] = layer[1][0] ^ 1; layer[1][2] = 2; - tilepri[1][layer[1][0]] = TC0360PRI_regs[9] & 0x0f; - tilepri[1][layer[1][1]] = TC0360PRI_regs[9] >> 4; - tilepri[1][layer[1][2]] = TC0360PRI_regs[8] >> 4; + tilepri[1][layer[1][0]] = tc0360pri_r(tc0360pri, 9) & 0x0f; + tilepri[1][layer[1][1]] = tc0360pri_r(tc0360pri, 9) >> 4; + tilepri[1][layer[1][2]] = tc0360pri_r(tc0360pri, 8) >> 4; - spritepri[0] = TC0360PRI_regs[6] & 0x0f; - spritepri[1] = TC0360PRI_regs[6] >> 4; - spritepri[2] = TC0360PRI_regs[7] & 0x0f; - spritepri[3] = TC0360PRI_regs[7] >> 4; - - - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); /* wrong color? */ + spritepri[0] = tc0360pri_r(tc0360pri, 6) & 0x0f; + spritepri[1] = tc0360pri_r(tc0360pri, 6) >> 4; + spritepri[2] = tc0360pri_r(tc0360pri, 7) & 0x0f; + spritepri[3] = tc0360pri_r(tc0360pri, 7) >> 4; + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); /* wrong color? */ /* TODO: This isn't the correct way to handle the priority. At the moment of @@ -1238,22 +1193,30 @@ VIDEO_UPDATE( taitof2_thundfox ) while (drawn[0] < 2 && drawn[1] < 2) { int pick; + const device_config *tc0100scn; if (tilepri[0][drawn[0]] < tilepri[1][drawn[1]]) + { pick = 0; - else pick = 1; + tc0100scn = tc0100scn_1; + } + else + { + pick = 1; + tc0100scn = tc0100scn_2; + } - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,pick,layer[pick][drawn[pick]],0,1<<(drawn[pick]+2*pick)); + tc0100scn_tilemap_draw(tc0100scn , bitmap, cliprect, layer[pick][drawn[pick]], 0, 1 << (drawn[pick] + 2 * pick)); drawn[pick]++; } while (drawn[0] < 2) { - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[0][drawn[0]],0,1<machine,bitmap,cliprect,1,layer[1][drawn[1]],0,1<<(drawn[1]+2)); + tc0100scn_tilemap_draw(tc0100scn_2, bitmap, cliprect, layer[1][drawn[1]], 0, 1 << (drawn[1] + 2)); drawn[1]++; } @@ -1281,13 +1244,13 @@ VIDEO_UPDATE( taitof2_thundfox ) if (tilepri[0][2] < tilepri[1][2]) { - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[0][2],0,0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,1,layer[1][2],0,0); + tc0100scn_tilemap_draw(tc0100scn_1, bitmap, cliprect, layer[0][2], 0, 0); + tc0100scn_tilemap_draw(tc0100scn_2, bitmap, cliprect, layer[1][2], 0, 0); } else { - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,1,layer[1][2],0,0); - TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,layer[0][2],0,0); + tc0100scn_tilemap_draw(tc0100scn_2, bitmap, cliprect, layer[1][2], 0, 0); + tc0100scn_tilemap_draw(tc0100scn_1, bitmap, cliprect, layer[0][2], 0, 0); } return 0; } @@ -1324,49 +1287,51 @@ and it changes these (and the sprite pri settings) a lot. VIDEO_UPDATE( taitof2_metalb ) { + const device_config *tc0480scp = devtag_get_device(screen->machine, "tc0480scp"); + const device_config *tc0360pri = devtag_get_device(screen->machine, "tc0360pri"); UINT8 layer[5], invlayer[4]; UINT16 priority; taitof2_handle_sprite_buffering(screen->machine); - TC0480SCP_tilemap_update(screen->machine); + tc0480scp_tilemap_update(tc0480scp); - priority = TC0480SCP_get_bg_priority(); + priority = tc0480scp_get_bg_priority(tc0480scp); - layer[0] = (priority &0xf000) >> 12; /* tells us which bg layer is bottom */ - layer[1] = (priority &0x0f00) >> 8; - layer[2] = (priority &0x00f0) >> 4; - layer[3] = (priority &0x000f) >> 0; /* tells us which is top */ + layer[0] = (priority & 0xf000) >> 12; /* tells us which bg layer is bottom */ + layer[1] = (priority & 0x0f00) >> 8; + layer[2] = (priority & 0x00f0) >> 4; + layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ layer[4] = 4; /* text layer always over bg layers */ - invlayer[layer[0]]=0; - invlayer[layer[1]]=1; - invlayer[layer[2]]=2; - invlayer[layer[3]]=3; + invlayer[layer[0]] = 0; + invlayer[layer[1]] = 1; + invlayer[layer[2]] = 2; + invlayer[layer[3]] = 3; - f2_tilepri[invlayer[0]] = TC0360PRI_regs[4] & 0x0f; /* bg0 */ - f2_tilepri[invlayer[1]] = TC0360PRI_regs[4] >> 4; /* bg1 */ - f2_tilepri[invlayer[2]] = TC0360PRI_regs[5] & 0x0f; /* bg2 */ - f2_tilepri[invlayer[3]] = TC0360PRI_regs[5] >> 4; /* bg3 */ - f2_tilepri[4] = TC0360PRI_regs[9] & 0x0f; /* fg (text layer) */ + f2_tilepri[invlayer[0]] = tc0360pri_r(tc0360pri, 4) & 0x0f; /* bg0 */ + f2_tilepri[invlayer[1]] = tc0360pri_r(tc0360pri, 4) >> 4; /* bg1 */ + f2_tilepri[invlayer[2]] = tc0360pri_r(tc0360pri, 5) & 0x0f; /* bg2 */ + f2_tilepri[invlayer[3]] = tc0360pri_r(tc0360pri, 5) >> 4; /* bg3 */ + f2_tilepri[4] = tc0360pri_r(tc0360pri, 9) & 0x0f; /* fg (text layer) */ - f2_spritepri[0] = TC0360PRI_regs[6] & 0x0f; - f2_spritepri[1] = TC0360PRI_regs[6] >> 4; - f2_spritepri[2] = TC0360PRI_regs[7] & 0x0f; - f2_spritepri[3] = TC0360PRI_regs[7] >> 4; + f2_spritepri[0] = tc0360pri_r(tc0360pri, 6) & 0x0f; + f2_spritepri[1] = tc0360pri_r(tc0360pri, 6) >> 4; + f2_spritepri[2] = tc0360pri_r(tc0360pri, 7) & 0x0f; + f2_spritepri[3] = tc0360pri_r(tc0360pri, 7) >> 4; - f2_spriteblendmode = TC0360PRI_regs[0]&0xc0; + f2_spriteblendmode = tc0360pri_r(tc0360pri, 0) & 0xc0; - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[0],0,1); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[1],0,2); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[2],0,4); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[3],0,8); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[4],0,16); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], 0 ,1); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 2); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 4); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 8); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 16); - draw_sprites(screen->machine, bitmap,cliprect,NULL,1); + draw_sprites(screen->machine, bitmap, cliprect, NULL, 1); return 0; } @@ -1374,6 +1339,8 @@ VIDEO_UPDATE( taitof2_metalb ) /* Deadconx, Footchmp */ VIDEO_UPDATE( taitof2_deadconx ) { + const device_config *tc0480scp = devtag_get_device(screen->machine, "tc0480scp"); + const device_config *tc0360pri = devtag_get_device(screen->machine, "tc0360pri"); UINT8 layer[5]; UINT8 tilepri[5]; UINT8 spritepri[4]; @@ -1381,36 +1348,36 @@ VIDEO_UPDATE( taitof2_deadconx ) taitof2_handle_sprite_buffering(screen->machine); - TC0480SCP_tilemap_update(screen->machine); + tc0480scp_tilemap_update(tc0480scp); - priority = TC0480SCP_get_bg_priority(); + priority = tc0480scp_get_bg_priority(tc0480scp); - layer[0] = (priority &0xf000) >> 12; /* tells us which bg layer is bottom */ - layer[1] = (priority &0x0f00) >> 8; - layer[2] = (priority &0x00f0) >> 4; - layer[3] = (priority &0x000f) >> 0; /* tells us which is top */ + layer[0] = (priority & 0xf000) >> 12; /* tells us which bg layer is bottom */ + layer[1] = (priority & 0x0f00) >> 8; + layer[2] = (priority & 0x00f0) >> 4; + layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */ layer[4] = 4; /* text layer always over bg layers */ - tilepri[0] = TC0360PRI_regs[4] >> 4; /* bg0 */ - tilepri[1] = TC0360PRI_regs[5] & 0x0f; /* bg1 */ - tilepri[2] = TC0360PRI_regs[5] >> 4; /* bg2 */ - tilepri[3] = TC0360PRI_regs[4] & 0x0f; /* bg3 */ + tilepri[0] = tc0360pri_r(tc0360pri, 4) >> 4; /* bg0 */ + tilepri[1] = tc0360pri_r(tc0360pri, 5) & 0x0f; /* bg1 */ + tilepri[2] = tc0360pri_r(tc0360pri, 5) >> 4; /* bg2 */ + tilepri[3] = tc0360pri_r(tc0360pri, 4) & 0x0f; /* bg3 */ /* we actually assume text layer is on top of everything anyway, but FWIW... */ - tilepri[layer[4]] = TC0360PRI_regs[7] >> 4; /* fg (text layer) */ + tilepri[layer[4]] = tc0360pri_r(tc0360pri, 7) >> 4; /* fg (text layer) */ - spritepri[0] = TC0360PRI_regs[6] & 0x0f; - spritepri[1] = TC0360PRI_regs[6] >> 4; - spritepri[2] = TC0360PRI_regs[7] & 0x0f; - spritepri[3] = TC0360PRI_regs[7] >> 4; + spritepri[0] = tc0360pri_r(tc0360pri, 6) & 0x0f; + spritepri[1] = tc0360pri_r(tc0360pri, 6) >> 4; + spritepri[2] = tc0360pri_r(tc0360pri, 7) & 0x0f; + spritepri[3] = tc0360pri_r(tc0360pri, 7) >> 4; - bitmap_fill(screen->machine->priority_bitmap,cliprect,0); - bitmap_fill(bitmap,cliprect,0); + bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); + bitmap_fill(bitmap, cliprect, 0); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[0],0,1); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[1],0,2); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[2],0,4); - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[3],0,8); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[0], 0 ,1); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[1], 0, 2); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[2], 0, 4); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[3], 0, 8); { int primasks[4] = {0,0,0,0}; @@ -1424,7 +1391,7 @@ VIDEO_UPDATE( taitof2_deadconx ) if (spritepri[i] < tilepri[(layer[3])]) primasks[i] |= 0xff00; } - draw_sprites(screen->machine, bitmap,cliprect,primasks,0); + draw_sprites(screen->machine, bitmap, cliprect, primasks, 0); } /* @@ -1433,6 +1400,6 @@ VIDEO_UPDATE( taitof2_deadconx ) that the FG layer is always on top of sprites. */ - TC0480SCP_tilemap_draw(screen->machine,bitmap,cliprect,layer[4],0,0); + tc0480scp_tilemap_draw(tc0480scp, bitmap, cliprect, layer[4], 0, 0); return 0; }