Seta update from Haze, nw

This commit is contained in:
Angelo Salese 2011-05-03 18:45:34 +00:00
parent 72d617faeb
commit 17e361c008
14 changed files with 206 additions and 144 deletions

View File

@ -76,7 +76,8 @@ static WRITE8_HANDLER( output_1_w )
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_MEMBER(cchance_state, m_objram)
AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
AM_RANGE(0xc000, 0xdfff) AM_RAM

View File

@ -199,7 +199,8 @@ static ADDRESS_MAP_START( champbwl_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("maincpu", 0x10000)
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_MEMBER(champbwl_state, m_objram)
AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
AM_RANGE(0xc000, 0xdfff) AM_DEVREADWRITE("x1snd", seta_sound_r, seta_sound_w)
AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xe300, 0xe303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", spritectrl_w8_champbwl) /* control registers (0x80 mirror used by Arkanoid 2) */

View File

@ -1547,8 +1547,8 @@ static READ8_DEVICE_HANDLER( dsw2_r )
*/
static SCREEN_EOF( seta_buffer_sprites )
{
seta_state *state = machine.driver_data<seta_state>();
machine.device<seta001_device>("spritegen")->setac_eof( state->m_spriteram2);
//seta_state *state = machine.driver_data<seta_state>();
machine.device<seta001_device>("spritegen")->setac_eof();
}
@ -1590,7 +1590,7 @@ static ADDRESS_MAP_START( tndrcade_map, AS_PROGRAM, 16 )
AM_RANGE(0x800000, 0x800007) AM_WRITE(sub_ctrl_w) // Sub CPU Control?
AM_RANGE(0xa00000, 0xa00fff) AM_READWRITE(sharedram_68000_r,sharedram_68000_w) // Shared RAM
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_SHARE("share1") // RAM (Mirrored?)
AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("share1") // RAM (Mirrored?)
ADDRESS_MAP_END
@ -1617,7 +1617,7 @@ static ADDRESS_MAP_START( downtown_map, AS_PROGRAM, 16 )
AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP // ? $4000
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xf00000, 0xffffff) AM_RAM // RAM
ADDRESS_MAP_END
@ -1677,7 +1677,7 @@ static ADDRESS_MAP_START( calibr50_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00000, 0xa00019) AM_READ(calibr50_ip_r) // Input Ports
/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb00001) AM_READWRITE(soundlatch2_word_r,calibr50_soundlatch_w) // From Sub CPU
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? $4000
ADDRESS_MAP_END
@ -1761,7 +1761,7 @@ static ADDRESS_MAP_START( usclssic_map, AS_PROGRAM, 16 )
AM_RANGE(0xb40018, 0xb4001f) AM_READ(usclssic_dsw_r) // 2 DSWs
AM_RANGE(0xb40018, 0xb40019) AM_WRITE(watchdog_reset16_w) // Watchdog
AM_RANGE(0xb80000, 0xb80001) AM_READNOP // Watchdog (value is discarded)?
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xd00000, 0xd03fff) AM_RAM_WRITE(seta_vram_0_w) AM_BASE_MEMBER(seta_state, m_vram_0) // VRAM
AM_RANGE(0xd04000, 0xd04fff) AM_RAM //
AM_RANGE(0xe00000, 0xe00fff) AM_RAM // NVRAM? (odd bytes)
@ -1787,7 +1787,7 @@ static ADDRESS_MAP_START( atehate_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2") // P2
AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
ADDRESS_MAP_END
@ -1811,7 +1811,7 @@ static ADDRESS_MAP_START( blandia_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0x880000, 0x880001) AM_RAM // ? 0xc000
AM_RANGE(0x900000, 0x903fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0xa00000, 0xa00005) AM_RAM AM_BASE_MEMBER(seta_state, m_vctrl_0) // VRAM 0&1 Ctrl
/**/AM_RANGE(0xa80000, 0xa80005) AM_RAM AM_BASE_MEMBER(seta_state, m_vctrl_2) // VRAM 2&3 Ctrl
AM_RANGE(0xb00000, 0xb03fff) AM_RAM_WRITE(seta_vram_0_w) AM_BASE_MEMBER(seta_state, m_vram_0) // VRAM 0&1
@ -1852,7 +1852,7 @@ static ADDRESS_MAP_START( blandiap_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xd00000, 0xd00007) AM_WRITENOP // ?
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? VBlank IRQ Ack
@ -1935,7 +1935,7 @@ static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
#if __uPD71054_TIMER
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
@ -1978,7 +1978,7 @@ static ADDRESS_MAP_START( zingzipbl_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM // soundram on original
#if __uPD71054_TIMER
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
@ -2011,7 +2011,7 @@ static ADDRESS_MAP_START( jjsquawb_map, AS_PROGRAM, 16 )
AM_RANGE(0xa0a000, 0xa0a5ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // RZ: Sprites Y
AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
// AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // RZ: Sprites Code + X + Attr
AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // RZ: Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
#if __uPD71054_TIMER
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
@ -2041,7 +2041,7 @@ static ADDRESS_MAP_START( orbs_map, AS_PROGRAM, 16 )
AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2127,7 +2127,7 @@ static ADDRESS_MAP_START( keroppi_map, AS_PROGRAM, 16 )
AM_RANGE(0x900002, 0x900003) AM_WRITE(keroppi_prize_w) //
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2159,7 +2159,7 @@ static ADDRESS_MAP_START( blockcar_map, AS_PROGRAM, 16 )
AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2192,7 +2192,7 @@ static ADDRESS_MAP_START( daioh_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xb04000, 0xb13fff) AM_RAM
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP //
@ -2223,7 +2223,7 @@ static ADDRESS_MAP_START( drgnunit_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? $4000
/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
ADDRESS_MAP_END
/***************************************************************************
@ -2290,7 +2290,7 @@ static WRITE16_HANDLER( setaroul_spr_w )
static ADDRESS_MAP_START( setaroul_map, AS_PROGRAM, 16 )
AM_RANGE(0x000000, 0x01ffff) AM_ROM // ROM
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr (maybe not)
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr (maybe not)
AM_RANGE(0xc40000, 0xc40001) AM_RAM //AM_BASE_MEMBER(seta_state, m_vregs)
AM_RANGE(0xc80000, 0xc80001) AM_NOP
@ -2343,7 +2343,7 @@ static ADDRESS_MAP_START( extdwnhl_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xb04000, 0xb13fff) AM_RAM //
AM_RANGE(0xe00000, 0xe03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
ADDRESS_MAP_END
@ -2375,7 +2375,7 @@ static ADDRESS_MAP_START( kamenrid_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? $4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xb04000, 0xb07fff) AM_RAM // tested
#if __uPD71054_TIMER
AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w) // ?
@ -2405,7 +2405,7 @@ static ADDRESS_MAP_START( madshark_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? $4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
#if __uPD71054_TIMER
AM_RANGE(0xc00000, 0xc00007) AM_WRITE(timer_regs_w) // ?
#else
@ -2458,7 +2458,7 @@ static ADDRESS_MAP_START( krzybowl_map, AS_PROGRAM, 16 )
AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2497,7 +2497,7 @@ static ADDRESS_MAP_START( msgundam_map, AS_PROGRAM, 16 )
AM_RANGE(0x800000, 0x8005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0x800600, 0x800607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0x880000, 0x880001) AM_RAM // ? 0x4000
AM_RANGE(0x900000, 0x903fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0x900000, 0x903fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xa00000, 0xa03fff) AM_RAM_WRITE(seta_vram_0_w) AM_BASE_MEMBER(seta_state, m_vram_0) // VRAM 0&1
AM_RANGE(0xa80000, 0xa83fff) AM_RAM_WRITE(seta_vram_2_w) AM_BASE_MEMBER(seta_state, m_vram_2) // VRAM 2&3
AM_RANGE(0xb00000, 0xb00005) AM_RAM AM_BASE_MEMBER(seta_state, m_vctrl_0) // VRAM 0&1 Ctrl
@ -2534,7 +2534,7 @@ static ADDRESS_MAP_START( oisipuzl_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
ADDRESS_MAP_END
@ -2563,7 +2563,7 @@ static ADDRESS_MAP_START( triplfun_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00400, 0xc00fff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
ADDRESS_MAP_END
@ -2614,7 +2614,7 @@ static ADDRESS_MAP_START( kiwame_map, AS_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
AM_RANGE(0x200000, 0x20ffff) AM_RAM // RAM
AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE(kiwame_nvram_r, kiwame_nvram_w) AM_BASE_MEMBER(seta_state, m_kiwame_nvram) // NVRAM + Regs ?
AM_RANGE(0x800000, 0x803fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0x800000, 0x803fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
/**/AM_RANGE(0x900000, 0x900001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2660,7 +2660,7 @@ static ADDRESS_MAP_START( thunderl_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits)
ADDRESS_MAP_END
@ -2684,7 +2684,7 @@ static ADDRESS_MAP_START( thunderlbl_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits)
ADDRESS_MAP_END
@ -2726,7 +2726,7 @@ static ADDRESS_MAP_START( wiggie_map, AS_PROGRAM, 16 )
/**/AM_RANGE(0xc00000, 0xc00001) AM_RAM // ? 0x4000
/**/AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xe04000, 0xe07fff) AM_RAM // (wits)
ADDRESS_MAP_END
@ -2757,7 +2757,7 @@ static ADDRESS_MAP_START( umanclub_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
ADDRESS_MAP_END
@ -2790,7 +2790,7 @@ static ADDRESS_MAP_START( utoukond_map, AS_PROGRAM, 16 )
AM_RANGE(0x980000, 0x980005) AM_WRITEONLY AM_BASE_MEMBER(seta_state, m_vctrl_2)// VRAM 2&3 Ctrl
AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc00001) AM_WRITE(utoukond_soundlatch_w) // To Sound CPU (cause an IRQ)
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? ack
ADDRESS_MAP_END
@ -2830,7 +2830,7 @@ static ADDRESS_MAP_START( pairlove_map, AS_PROGRAM, 16 )
AM_RANGE(0x900000, 0x9001ff) AM_READWRITE(pairlove_prot_r,pairlove_prot_w)
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
AM_RANGE(0xb00000, 0xb00fff) AM_RAM AM_BASE_SIZE_MEMBER(seta_state, m_paletteram, m_paletteram_size) // Palette
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
AM_RANGE(0xe00000, 0xe005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xe00600, 0xe00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
@ -2862,7 +2862,7 @@ static ADDRESS_MAP_START( crazyfgt_map, AS_PROGRAM, 16 )
AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xa80000, 0xa80001) AM_WRITENOP // ? 0x4000
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
ADDRESS_MAP_END
@ -2932,7 +2932,7 @@ static ADDRESS_MAP_START( inttoote_map, AS_PROGRAM, 16 )
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
ADDRESS_MAP_END
@ -2999,7 +2999,7 @@ static ADDRESS_MAP_START( jockeyc_map, AS_PROGRAM, 16 )
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(seta_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
ADDRESS_MAP_END

View File

@ -394,7 +394,7 @@ static WRITE8_HANDLER( srmp2_irq4_ack_w )
static ADDRESS_MAP_START( srmp2_map, AS_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x0c0000, 0x0c3fff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0x140000, 0x143fff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram2.u16) /* Sprites Code + X + Attr */
AM_RANGE(0x140000, 0x143fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) /* Sprites Code + X + Attr */
AM_RANGE(0x180000, 0x1805ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) /* Sprites Y */
AM_RANGE(0x180600, 0x180607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0x1c0000, 0x1c0001) AM_WRITENOP /* ??? */
@ -447,7 +447,7 @@ static ADDRESS_MAP_START( mjyuugi_map, AS_PROGRAM, 16 )
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xd02000, 0xd023ff) AM_RAM /* ??? only writes $00fa */
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram2.u16) /* Sprites Code + X + Attr */
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) /* Sprites Code + X + Attr */
AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("nvram")
ADDRESS_MAP_END
@ -479,8 +479,8 @@ static ADDRESS_MAP_START( srmp3_map, AS_PROGRAM, 8 )
AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r8, spritectrl_w8)
AM_RANGE(0xb800, 0xb800) AM_WRITENOP /* flag ? */
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram2.u8) /* Sprites Code + X + Attr */
AM_RANGE(0xe000, 0xffff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram3.u8)
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
ADDRESS_MAP_END
static ADDRESS_MAP_START( srmp3_io_map, AS_IO, 8 )
@ -503,8 +503,8 @@ static ADDRESS_MAP_START( rmgoldyh_map, AS_PROGRAM, 8 )
AM_RANGE(0xb000, 0xb2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xb300, 0xb303) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r8, spritectrl_w8)
AM_RANGE(0xb800, 0xb800) AM_WRITENOP /* flag ? */
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram2.u8) /* Sprites Code + X + Attr */
AM_RANGE(0xe000, 0xffff) AM_RAM AM_BASE_MEMBER(srmp2_state,m_spriteram3.u8)
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8) /* Sprites Code + X + Attr */
AM_RANGE(0xe000, 0xffff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
ADDRESS_MAP_END
static WRITE8_HANDLER( rmgoldyh_rombank_w )

View File

@ -435,7 +435,7 @@ static ADDRESS_MAP_START( superman_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
@ -450,7 +450,7 @@ static ADDRESS_MAP_START( daisenpu_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
@ -465,7 +465,7 @@ static ADDRESS_MAP_START( gigandes_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
@ -480,7 +480,7 @@ static ADDRESS_MAP_START( ballbros_map, AS_PROGRAM, 16 )
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE("spritegen", spritectrl_r16, spritectrl_w16)
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_BASE_MEMBER(taitox_state, m_spriteram2) // Sprites Code + X + Attr
AM_RANGE(0xe00000, 0xe03fff) AM_RAM AM_DEVREADWRITE("spritegen", spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
AM_RANGE(0xf00000, 0xf03fff) AM_RAM /* Main RAM */
ADDRESS_MAP_END

View File

@ -750,7 +750,8 @@ static WRITE8_DEVICE_HANDLER( kabukiz_sample_w )
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") /* ROM + RAM */
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_MEMBER(tnzs_state, m_objram)
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
@ -765,7 +766,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cpu0_type2, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") /* ROM + RAM */
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_MEMBER(tnzs_state, m_objram)
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1")
AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
@ -883,10 +885,13 @@ static WRITE8_HANDLER( jpopnics_palette_w )
palette_set_color_rgb(space->machine(), offset, r << 4, g << 4, b << 4);
}
static ADDRESS_MAP_START( jpopnics_main_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_MEMBER(tnzs_state, m_objram)
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
AM_RANGE(0xd000, 0xdfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("share1") /* WORK RAM (shared by the 2 z80's) */
AM_RANGE(0xf000, 0xf2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */

View File

@ -37,7 +37,6 @@ public:
UINT16 *m_vctrl_0;
UINT16 *m_vram_2;
UINT16 *m_vctrl_2;
UINT16 *m_spriteram2;
UINT16 *m_paletteram;
size_t m_paletteram_size;
UINT16 *m_paletteram2;

View File

@ -22,12 +22,6 @@ public:
int m_port_select;
union
{
UINT8 *u8;
UINT16 *u16;
} m_spriteram2, m_spriteram3;
iox_t m_iox;
};

View File

@ -22,7 +22,6 @@ public:
: driver_device(mconfig, type, tag) { }
/* memory pointers */
UINT8 * m_objram;
UINT8 * m_bg_flag;
// UINT8 * m_paletteram; // currently this uses generic palette handling

View File

@ -815,7 +815,7 @@ SCREEN_UPDATE( seta_no_layers )
seta_state *state = screen->machine().driver_data<seta_state>();
set_pens(screen->machine());
bitmap_fill(bitmap,cliprect,0x1f0);
screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(),bitmap,cliprect, state->m_spriteram2, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(),bitmap,cliprect, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
return 0;
}
@ -828,7 +828,7 @@ static SCREEN_UPDATE( seta_layers )
int enab_0, enab_1, x_0, x_1=0, y_0, y_1=0;
int order = 0;
int flip = 0;//reenable (state->m_spriteram[ 0x600/2 ] & 0x40) >> 6;
int flip = screen->machine().device<seta001_device>("spritegen")->is_flipped();
const rectangle &visarea = screen->visible_area();
int vis_dimy = visarea.max_y - visarea.min_y + 1;
@ -938,7 +938,7 @@ if (input_code_pressed(screen->machine(), KEYCODE_Z))
if (order & 2) // layer-sprite priority?
{
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(),bitmap,cliprect, state->m_spriteram2, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(),bitmap,cliprect, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if(order & 4)
{
@ -958,7 +958,7 @@ if (input_code_pressed(screen->machine(), KEYCODE_Z))
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_tilemap_0, 0, 0);
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_tilemap_1, 0, 0);
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_spriteram2, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
}
}
else
@ -968,7 +968,7 @@ if (input_code_pressed(screen->machine(), KEYCODE_Z))
if (order & 2) // layer-sprite priority?
{
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_spriteram2, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if((order & 4) && state->m_paletteram2 != NULL)
{
@ -1022,7 +1022,7 @@ if (input_code_pressed(screen->machine(), KEYCODE_Z))
}
}
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_spriteram2, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
if (layers_ctrl & 8) screen->machine().device<seta001_device>("spritegen")->setac_draw_sprites(screen->machine(), bitmap,cliprect, state->m_global_offsets->sprite_offs[1], state->m_global_offsets->sprite_offs[0]);
}
}
return 0;

View File

@ -76,6 +76,7 @@ WRITE8_DEVICE_HANDLER( spritectrl_w8 )
dev->m_spritectrl[offset] = data;
}
// why is this needed? bug in the rendering?
WRITE8_DEVICE_HANDLER( spritectrl_w8_champbwl )
{
seta001_device *dev = (seta001_device *)device;
@ -115,6 +116,45 @@ WRITE8_DEVICE_HANDLER( spriteylow_w8 )
}
READ8_DEVICE_HANDLER( spritecodelow_r8 )
{
seta001_device *dev = (seta001_device *)device;
return dev->m_spritecodelow[offset];
}
WRITE8_DEVICE_HANDLER( spritecodelow_w8 )
{
seta001_device *dev = (seta001_device *)device;
dev->m_spritecodelow[offset] = data;
}
READ8_DEVICE_HANDLER( spritecodehigh_r8 )
{
seta001_device *dev = (seta001_device *)device;
return dev->m_spritecodehigh[offset];
}
WRITE8_DEVICE_HANDLER( spritecodehigh_w8 )
{
seta001_device *dev = (seta001_device *)device;
dev->m_spritecodehigh[offset] = data;
}
READ16_DEVICE_HANDLER( spritecode_r16 )
{
seta001_device *dev = (seta001_device *)device;
UINT16 ret = dev->m_spritecodelow[offset];
ret |= dev->m_spritecodehigh[offset] << 8;
return ret;
}
WRITE16_DEVICE_HANDLER( spritecode_w16 )
{
seta001_device *dev = (seta001_device *)device;
dev->m_spritecodelow[offset] = data & 0x00ff;
dev->m_spritecodehigh[offset] = (data & 0xff00)>>8;
}
/***************************************************************************
@ -124,7 +164,7 @@ WRITE8_DEVICE_HANDLER( spriteylow_w8 )
***************************************************************************/
void seta001_device::setac_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2)
void seta001_device::setac_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
{
int offs, col;
int xoffs, yoffs;
@ -138,7 +178,7 @@ void seta001_device::setac_draw_sprites_map(running_machine &machine, bitmap_t *
int numcol = ctrl2 & 0x000f;
/* Sprites Banking and/or Sprites Buffering */
UINT16 *src = spriteram16_2 + ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x2000/2 : 0 );
UINT16 bank = ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x1000 : 0 );
int upper = ( m_spritectrl[2] ) +
( m_spritectrl[3] ) * 256;
@ -175,13 +215,13 @@ void seta001_device::setac_draw_sprites_map(running_machine &machine, bitmap_t *
/* draw this column */
for ( offs = 0 ; offs < 0x40/2; offs += 2/2 )
{
int code = src[((col+col0)&0xf) * 0x40/2 + offs + 0x800/2];
int color = src[((col+col0)&0xf) * 0x40/2 + offs + 0xc00/2];
int code = (m_spritecodehigh[((col+col0)&0xf) * 0x40/2 + offs + bank + 0x800/2]<<8) | (m_spritecodelow[((col+col0)&0xf) * 0x40/2 + offs + bank + 0x800/2]);
int color = (m_spritecodehigh[((col+col0)&0xf) * 0x40/2 + offs + bank + 0xc00/2]<<8) | (m_spritecodelow[((col+col0)&0xf) * 0x40/2 + offs + bank + 0xc00/2]);
int flipx = code & 0x8000;
int flipy = code & 0x4000;
int bank = (color & 0x0600) >> 9;
int gfx_bank = (color & 0x0600) >> 9;
/*
twineagl: 010 02d 0f 10 (ship)
@ -212,7 +252,7 @@ twineagl: 000 027 00 0f (test mode)
}
color = ( color >> (16-5) ) % total_color_codes;
code = (code & 0x3fff) + (bank * 0x4000);
code = (code & 0x3fff) + (gfx_bank * 0x4000);
drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
code,
@ -227,7 +267,7 @@ twineagl: 000 027 00 0f (test mode)
void seta001_device::setac_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int flipxoffs, int noflipxoffs)
void seta001_device::setac_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int flipxoffs, int noflipxoffs)
{
int offs;
int xoffs, yoffs;
@ -240,22 +280,22 @@ void seta001_device::setac_draw_sprites(running_machine &machine, bitmap_t *bitm
int flip = ctrl & 0x40;
/* Sprites Banking and/or Sprites Buffering */
UINT16 *src = spriteram16_2 + ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x2000/2 : 0 );
UINT16 bank = ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x1000 : 0 );
int max_y = 0xf0;
setac_draw_sprites_map(machine,bitmap,cliprect, spriteram16_2);
setac_draw_sprites_map(machine,bitmap,cliprect);
xoffs = flip ? flipxoffs:noflipxoffs;
yoffs = -2;
for ( offs = (0x400-2)/2 ; offs >= 0/2; offs -= 2/2 )
for ( offs = 0x1ff ; offs >= 0; offs -= 1 )
{
int code = src[offs + 0x000/2];
int x = src[offs + 0x400/2];
int code = (m_spritecodehigh[offs + 0x000 + bank]<<8) | (m_spritecodelow[offs + 0x000 + bank]);
int x = (m_spritecodehigh[offs + 0x200 + bank]<<8) | (m_spritecodelow[offs + 0x200 + bank]);
int y = m_spriteylow[offs + 0x000/2] & 0xff;
int y = m_spriteylow[offs] & 0xff;
int flipx = code & 0x8000;
int flipy = code & 0x4000;
@ -286,7 +326,7 @@ void seta001_device::setac_draw_sprites(running_machine &machine, bitmap_t *bitm
void seta001_device::tnzs_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *m, UINT8* scrollram, UINT8* bg_flag, int screenflip)
void seta001_device::tnzs_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *m, UINT8 *m2, UINT8* scrollram, UINT8* bg_flag, int screenflip)
{
int x, y, column, tot, transpen;
int scrollx, scrolly;
@ -333,12 +373,14 @@ void seta001_device::tnzs_draw_background( running_machine &machine, bitmap_t *b
int code, color, flipx, flipy, sx, sy;
int i = 32 * (column ^ 8) + 2 * y + x;
code = m[i] + ((m[i + 0x1000] & 0x3f) << 8);
color = (m[i + 0x1200] & 0xf8) >> 3; /* colours at d600-d7ff */
code = m[i];
code +=(m2[i] & 0x3f) << 8;
flipx = m2[i] & 0x80;
flipy = m2[i] & 0x40;
color = (m2[i + 0x200] & 0xf8) >> 3; /* colours at d600-d7ff */
sx = x * 16;
sy = y * 16;
flipx = m[i + 0x1000] & 0x80;
flipy = m[i + 0x1000] & 0x40;
if (screenflip)
{
sy = 240 - sy;
@ -367,16 +409,25 @@ void seta001_device::tnzs_draw_background( running_machine &machine, bitmap_t *b
}
}
void seta001_device::setac_eof( UINT16* spriteram2)
void seta001_device::setac_eof()
{
// is this handling right?
// it differs to tnzs, and thundercade has sprite flickering issues (not related to the devicification)
int ctrl2 = m_spritectrl[1];
if (~ctrl2 & 0x20)
{
if (ctrl2 & 0x40)
memcpy(&spriteram2[0x0000/2],&spriteram2[0x2000/2],0x2000/2);
{
memcpy( &m_spritecodelow[0x0000], &m_spritecodelow[0x1000],0x800);
memcpy(&m_spritecodehigh[0x0000],&m_spritecodehigh[0x1000],0x800);
}
else
memcpy(&spriteram2[0x2000/2],&spriteram2[0x0000/2],0x2000/2);
{
memcpy( &m_spritecodelow[0x1000], &m_spritecodelow[0x0000],0x800);
memcpy(&m_spritecodehigh[0x1000],&m_spritecodehigh[0x0000],0x800);
}
}
}
@ -431,7 +482,7 @@ void seta001_device::tnzs_draw_foreground( running_machine &machine, bitmap_t *b
}
}
void seta001_device::tnzs_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* objram, UINT8* bg_flag )
void seta001_device::tnzs_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* bg_flag )
{
/* Fill the background */
bitmap_fill(bitmap, cliprect, 0x1f0);
@ -441,19 +492,19 @@ void seta001_device::tnzs_draw_sprites(running_machine &machine, bitmap_t *bitma
int screenflip = (m_spritectrl[0] & 0x40) >> 6;
/* Redraw the background tiles (c400-c5ff) */
tnzs_draw_background(machine, bitmap, cliprect, objram + 0x400, m_spriteylow+0x200, bg_flag, screenflip);
tnzs_draw_background(machine, bitmap, cliprect, m_spritecodelow + 0x400, m_spritecodehigh + 0x400, m_spriteylow+0x200, bg_flag, screenflip);
/* Draw the sprites on top */
tnzs_draw_foreground(machine, bitmap, cliprect,
objram + 0x0000, /* chars : c000 */
objram + 0x0200, /* x : c200 */
m_spritecodelow + 0x0000, /* chars : c000 */
m_spritecodelow + 0x0200, /* x : c200 */
m_spriteylow, /* y : f000 */
objram + 0x1000, /* ctrl : d000 */
objram + 0x1200, /* color : d200 */
m_spritecodehigh + 0x0000, /* ctrl : d000 */
m_spritecodehigh + 0x0200, /* color : d200 */
screenflip);
}
void seta001_device::tnzs_eof( UINT8* objram)
void seta001_device::tnzs_eof( void )
{
int ctrl2 = m_spritectrl[1];
if (~ctrl2 & 0x20)
@ -461,18 +512,18 @@ void seta001_device::tnzs_eof( UINT8* objram)
// note I copy sprites only. setac implementation also copies the "floating tilemap"
if (ctrl2 & 0x40)
{
memcpy(&objram[0x0000], &objram[0x0800], 0x0400);
memcpy(&objram[0x1000], &objram[0x1800], 0x0400);
memcpy( &m_spritecodelow[0x0000], &m_spritecodelow[0x0800], 0x0400);
memcpy(&m_spritecodehigh[0x0000], &m_spritecodehigh[0x0800], 0x0400);
}
else
{
memcpy(&objram[0x0800], &objram[0x0000], 0x0400);
memcpy(&objram[0x1800], &objram[0x1000], 0x0400);
memcpy( &m_spritecodelow[0x0800], &m_spritecodelow[0x0000], 0x0400);
memcpy(&m_spritecodehigh[0x0800], &m_spritecodehigh[0x0000], 0x0400);
}
// and I copy the "floating tilemap" BACKWARDS - this fixes kabukiz
memcpy(&objram[0x0400], &objram[0x0c00], 0x0400);
memcpy(&objram[0x1400], &objram[0x1c00], 0x0400);
memcpy( &m_spritecodelow[0x0400], &m_spritecodelow[0x0c00], 0x0400);
memcpy(&m_spritecodehigh[0x0400], &m_spritecodehigh[0x0c00], 0x0400);
}
}
@ -480,7 +531,7 @@ void seta001_device::tnzs_eof( UINT8* objram)
// no bgmap stuff?
void seta001_device::srmp2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int color_bank)
void seta001_device::srmp2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int color_bank)
{
/*
Sprite RAM A: spriteram16_2
@ -512,25 +563,25 @@ void seta001_device::srmp2_draw_sprites(running_machine &machine, bitmap_t *bitm
int flip = ctrl & 0x40;
/* Sprites Banking and/or Sprites Buffering */
UINT16 *src = spriteram16_2 + ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x2000/2 : 0 );
UINT16 bank = ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x1000 : 0 );
int max_y = machine.primary_screen->height();
xoffs = flip ? 0x10 : 0x10;
yoffs = flip ? 0x05 : 0x07;
for (offs = (0x400-2)/2; offs >= 0/2; offs -= 2/2)
for (offs = 0x1ff; offs >= 0; offs -= 1)
{
int code = src[offs + 0x000/2];
int code = (((m_spritecodehigh[offs + 0x000 + bank] & 0xff) << 8) + (m_spritecodelow[offs + 0x000 + bank] & 0xff));
int x = src[offs + 0x400/2];
int y = m_spriteylow[offs + 0x000/2] & 0xff;
int color = ((m_spritecodehigh[offs + 0x200 + bank] & 0xf8) >> 3);
int x = (((m_spritecodehigh[offs + 0x200 + bank] & 0x01) << 8) + (m_spritecodelow[offs + 0x200 + bank] & 0xff));
int y = (m_spriteylow[offs + 0x000] & 0xff);
int flipx = code & 0x8000;
int flipy = code & 0x4000;
int color = (x >> 11) & 0x1f;
if (flip)
{
y = max_y - y;
@ -552,7 +603,7 @@ void seta001_device::srmp2_draw_sprites(running_machine &machine, bitmap_t *bitm
}
void seta001_device::srmp3_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* spriteram_2, UINT8* spriteram_3)
void seta001_device::srmp3_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
{
int offs, col;
int xoffs, yoffs;
@ -584,9 +635,9 @@ void seta001_device::srmp3_draw_sprites_map(running_machine &machine, bitmap_t *
/* draw this column */
for (offs = 0; offs < 0x40/2; offs += 2/2)
{
int code = (((spriteram_3[((col)&0x0f) * 0x40/2 + offs + 0x800/2] & 0xff) << 8) + (spriteram_2[((col)&0xf) * 0x40/2 + offs + 0x800/2] & 0xff));
int code = (((m_spritecodehigh[((col)&0x0f) * 0x40/2 + offs + 0x800/2] & 0xff) << 8) + (m_spritecodelow[((col)&0xf) * 0x40/2 + offs + 0x800/2] & 0xff));
int color = ((spriteram_3[((col)&0x0f) * 0x40/2 + offs + 0xc00/2] & 0xf8) >> 3);
int color = ((m_spritecodehigh[((col)&0x0f) * 0x40/2 + offs + 0xc00/2] & 0xf8) >> 3);
int flipx = code & 0x8000;
int flipy = code & 0x4000;
@ -625,7 +676,7 @@ void seta001_device::srmp3_draw_sprites_map(running_machine &machine, bitmap_t *
}
void seta001_device::srmp3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* spriteram_2, UINT8* spriteram_3, int gfx_bank)
void seta001_device::srmp3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int gfx_bank)
{
/*
Sprite RAM A: spriteram_2
@ -669,19 +720,19 @@ void seta001_device::srmp3_draw_sprites(running_machine &machine, bitmap_t *bitm
int flip = ctrl & 0x40;
srmp3_draw_sprites_map(machine, bitmap, cliprect, spriteram_2, spriteram_3);
srmp3_draw_sprites_map(machine, bitmap, cliprect);
xoffs = flip ? 0x10 : 0x10;
yoffs = flip ? 0x06 : 0x06;
for (offs = 0x200 - 1; offs >= 0; offs--)
{
int code = (((spriteram_3[offs + 0x000] & 0xff) << 8) + (spriteram_2[offs + 0x000] & 0xff));
int gfxbank = (spriteram_3[offs + 0x000] & 0x20);
int code = (((m_spritecodehigh[offs + 0x000] & 0xff) << 8) + (m_spritecodelow[offs + 0x000] & 0xff));
int gfxbank = (m_spritecodehigh[offs + 0x000] & 0x20);
int color = ((spriteram_3[offs + 0x200] & 0xf8) >> 3);
int color = ((m_spritecodehigh[offs + 0x200] & 0xf8) >> 3);
int x = (((spriteram_3[offs + 0x200] & 0x01) << 8) + (spriteram_2[offs + 0x200] & 0xff));
int x = (((m_spritecodehigh[offs + 0x200] & 0x01) << 8) + (m_spritecodelow[offs + 0x200] & 0xff));
int y = (m_spriteylow[offs + 0x000] & 0xff);
int flipx = code & 0x8000;
@ -707,7 +758,7 @@ void seta001_device::srmp3_draw_sprites(running_machine &machine, bitmap_t *bitm
}
void seta001_device::mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2)
void seta001_device::mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect)
{
int offs, col;
int xoffs, yoffs;
@ -721,7 +772,7 @@ void seta001_device::mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t
int numcol = ctrl2 & 0x000f;
/* Sprites Banking and/or Sprites Buffering */
UINT16 *src = spriteram16_2 + ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x2000/2 : 0 );
UINT16 bank = ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x1000 : 0 );
int upper = ( m_spritectrl[2] ) +
( m_spritectrl[3] ) * 256;
@ -744,8 +795,8 @@ void seta001_device::mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t
/* draw this column */
for (offs = 0; offs < 0x40/2; offs += 2/2)
{
int code = src[((col)&0xf) * 0x40/2 + offs + 0x800/2];
int color = src[((col)&0xf) * 0x40/2 + offs + 0xc00/2];
int code = (m_spritecodehigh[((col)&0xf) * 0x40/2 + offs + bank + 0x800/2]<<8) | (m_spritecodelow[((col)&0xf) * 0x40/2 + offs + bank + 0x800/2]);
int color = (m_spritecodehigh[((col)&0xf) * 0x40/2 + offs + bank + 0xc00/2]<<8) | (m_spritecodelow[((col)&0xf) * 0x40/2 + offs + bank + 0x800/2]);
int gfxbank = color & 0x0200;
@ -787,7 +838,7 @@ void seta001_device::mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t
}
void seta001_device::mjyuugi_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int gfx_bank)
void seta001_device::mjyuugi_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int gfx_bank)
{
/*
Sprite RAM A: spriteram16_2
@ -820,24 +871,24 @@ void seta001_device::mjyuugi_draw_sprites(running_machine &machine, bitmap_t *bi
int flip = ctrl & 0x40;
/* Sprites Banking and/or Sprites Buffering */
UINT16 *src = spriteram16_2 + ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x2000/2 : 0 );
UINT16 bank = ( ((ctrl2 ^ (~ctrl2<<1)) & 0x40) ? 0x1000 : 0 );
int max_y = machine.primary_screen->height();
mjyuugi_draw_sprites_map(machine, bitmap, cliprect, spriteram16_2);
mjyuugi_draw_sprites_map(machine, bitmap, cliprect);
xoffs = flip ? 0x10 : 0x10;
yoffs = flip ? 0x06 : 0x06;
for (offs = (0x400 - 6) / 2; offs >= 0 / 2; offs -= 2 / 2)
{
int code = src[offs + 0x000 / 2];
int gfxbank = code & 0x2000;
int code = (((m_spritecodehigh[offs + 0x000 + bank] & 0xff) << 8) + (m_spritecodelow[offs + 0x000 + bank] & 0xff));
int gfxbank = (m_spritecodehigh[offs + 0x000 + bank] & 0x20);
int color = ((src[offs + 0x400 / 2] >> 11) & 0x1f);
int color = ((m_spritecodehigh[offs + 0x200 + bank] & 0xf8) >> 3);
int x = (src[offs + 0x400 / 2] & 0x1ff);
int y = (m_spriteylow[offs + 0x000 / 2] & 0xff);
int x = (((m_spritecodehigh[offs + 0x200 + bank] & 0x01) << 8) + (m_spritecodelow[offs + 0x200 + bank] & 0xff));
int y = (m_spriteylow[offs + 0x000] & 0xff);
int flipx = code & 0x8000;
int flipy = code & 0x4000;

View File

@ -5,21 +5,26 @@ class seta001_device : public device_t
public:
seta001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void setac_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int flipxoffs, int noflipxoffs);
void setac_eof( UINT16* spriteram2);
void setac_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int flipxoffs, int noflipxoffs);
void setac_eof( void );
void tnzs_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* objram, UINT8* bg_flag );
void tnzs_eof( UINT8* objram);
void tnzs_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* bg_flag );
void tnzs_eof( void );
void srmp2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int color_bank);
void srmp2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int color_bank);
void srmp3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* spriteram_2, UINT8* spriteram_3, int gfx_bank);
void srmp3_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int gfx_bank);
void mjyuugi_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2, int gfx_bank);
void mjyuugi_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int gfx_bank);
UINT8 m_spritectrl[4];
UINT8 m_spriteylow[0x300]; // 0x200 low y + 0x100 bg stuff
UINT8 m_spritecodelow[0x2000]; // tnzs.c stuff only uses half?
UINT8 m_spritecodehigh[0x2000]; // ^
int is_flipped() { return ((m_spritectrl[ 0 ] & 0x40) >> 6); };
protected:
virtual void device_start();
virtual void device_reset();
@ -27,14 +32,14 @@ protected:
private:
void setac_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2);
void setac_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect );
void tnzs_draw_foreground( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *char_pointer, UINT8 *x_pointer, UINT8 *y_pointer, UINT8 *ctrl_pointer, UINT8 *color_pointer, int screenflip);
void tnzs_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *m, UINT8* scrollram, UINT8* bg_flag, int screenflip);
void tnzs_draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *m, UINT8 *m2, UINT8* scrollram, UINT8* bg_flag, int screenflip);
void srmp3_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8* spriteram_2, UINT8* spriteram_3);
void srmp3_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect);
void mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, UINT16* spriteram16_2);
void mjyuugi_draw_sprites_map(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect);
};
READ16_DEVICE_HANDLER( spritectrl_r16 );
@ -48,6 +53,13 @@ WRITE16_DEVICE_HANDLER( spriteylow_w16 );
READ8_DEVICE_HANDLER( spriteylow_r8 );
WRITE8_DEVICE_HANDLER( spriteylow_w8 );
READ8_DEVICE_HANDLER( spritecodelow_r8 );
WRITE8_DEVICE_HANDLER( spritecodelow_w8 );
READ8_DEVICE_HANDLER( spritecodehigh_r8 );
WRITE8_DEVICE_HANDLER( spritecodehigh_w8 );
READ16_DEVICE_HANDLER( spritecode_r16 );
WRITE16_DEVICE_HANDLER( spritecode_w16 );
extern const device_type SETA001_SPRITE;

View File

@ -41,7 +41,7 @@ SCREEN_UPDATE( srmp2 )
{
srmp2_state *state = screen->machine().driver_data<srmp2_state>();
bitmap_fill(bitmap, cliprect, 0x1ff);
screen->machine().device<seta001_device>("spritegen")->srmp2_draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram2.u16, state->m_color_bank);
screen->machine().device<seta001_device>("spritegen")->srmp2_draw_sprites(screen->machine(), bitmap, cliprect, state->m_color_bank);
return 0;
}
@ -49,7 +49,7 @@ SCREEN_UPDATE( srmp3 )
{
srmp2_state *state = screen->machine().driver_data<srmp2_state>();
bitmap_fill(bitmap, cliprect, 0x1f0);
screen->machine().device<seta001_device>("spritegen")->srmp3_draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram2.u8, state->m_spriteram3.u8, state->m_gfx_bank);
screen->machine().device<seta001_device>("spritegen")->srmp3_draw_sprites(screen->machine(), bitmap, cliprect, state->m_gfx_bank);
return 0;
}
@ -57,6 +57,6 @@ SCREEN_UPDATE( mjyuugi )
{
srmp2_state *state = screen->machine().driver_data<srmp2_state>();
bitmap_fill(bitmap, cliprect, 0x1f0);
screen->machine().device<seta001_device>("spritegen")->mjyuugi_draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram2.u16, state->m_gfx_bank);
screen->machine().device<seta001_device>("spritegen")->mjyuugi_draw_sprites(screen->machine(), bitmap, cliprect, state->m_gfx_bank);
return 0;
}

View File

@ -45,12 +45,12 @@ PALETTE_INIT( arknoid2 )
SCREEN_UPDATE( tnzs )
{
tnzs_state *state = screen->machine().driver_data<tnzs_state>();
screen->machine().device<seta001_device>("spritegen")->tnzs_draw_sprites(screen->machine(), bitmap, cliprect, state->m_objram, state->m_bg_flag );
screen->machine().device<seta001_device>("spritegen")->tnzs_draw_sprites(screen->machine(), bitmap, cliprect, state->m_bg_flag );
return 0;
}
SCREEN_EOF( tnzs )
{
tnzs_state *state = machine.driver_data<tnzs_state>();
machine.device<seta001_device>("spritegen")->tnzs_eof( state->m_objram);
// tnzs_state *state = machine.driver_data<tnzs_state>();
machine.device<seta001_device>("spritegen")->tnzs_eof();
}