diff options
author | MooglyGuy <therealmogminer@gmail.com> | 2019-11-14 00:29:29 +0100 |
---|---|---|
committer | MooglyGuy <therealmogminer@gmail.com> | 2019-11-14 00:30:39 +0100 |
commit | 4c53d5611de42660a0d2232b6c911c7e94b6572f (patch) | |
tree | 5263083c5683b3ea39766a0acc25149f2b2650af /src/mame | |
parent | 6018a48cc2875249b061a4a3e05df0cf18601266 (diff) |
-snes_ppu: Converted OAM code from bsnes ppu-fast, nw
Diffstat (limited to 'src/mame')
-rw-r--r-- | src/mame/drivers/snes.cpp | 4 | ||||
-rw-r--r-- | src/mame/machine/snes.cpp | 11 |
2 files changed, 3 insertions, 12 deletions
diff --git a/src/mame/drivers/snes.cpp b/src/mame/drivers/snes.cpp index c7d7c6b8c4d..f6a3890d3df 100644 --- a/src/mame/drivers/snes.cpp +++ b/src/mame/drivers/snes.cpp @@ -1080,9 +1080,7 @@ static INPUT_PORTS_START( snes ) PORT_CONFSETTING( 0x20, "OAM1 only" ) PORT_CONFSETTING( 0x30, "OAM2 only" ) PORT_CONFSETTING( 0x40, "OAM3 only" ) - PORT_CONFNAME( 0x80, 0x00, "Draw sprite in reverse order" ) - PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) - PORT_CONFSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("DEBUG4") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 0 draw") PORT_TOGGLE diff --git a/src/mame/machine/snes.cpp b/src/mame/machine/snes.cpp index 419cb007816..a0f4281ef4d 100644 --- a/src/mame/machine/snes.cpp +++ b/src/mame/machine/snes.cpp @@ -102,15 +102,8 @@ TIMER_CALLBACK_MEMBER(snes_state::snes_hirq_tick_callback) TIMER_CALLBACK_MEMBER(snes_state::snes_reset_oam_address) { - // make sure we're in the 65816's context since we're messing with the OAM and stuff - address_space &space = m_maincpu->space(AS_PROGRAM); - if (!m_ppu->screen_disabled()) //Reset OAM address, byuu says it happens at H=10 - { - space.write_byte(OAMADDL, m_ppu->saved_oam_address_low()); /* Reset oam address */ - space.write_byte(OAMADDH, m_ppu->saved_oam_address_high()); - m_ppu->set_first_sprite(); - } + m_ppu->oam_address_reset(); } TIMER_CALLBACK_MEMBER(snes_state::snes_reset_hdma) @@ -235,7 +228,7 @@ TIMER_CALLBACK_MEMBER(snes_state::snes_hblank_tick) hdma(cpu0space); if (m_screen->vpos() > 0) - m_screen->update_partial((m_ppu->interlace() == 2) ? (m_ppu->current_vert() * m_ppu->interlace()) : m_ppu->current_vert()); + m_screen->update_partial((m_ppu->interlace() == 2) ? (m_ppu->current_vert() * m_ppu->interlace()) : m_ppu->current_vert() - 1); } // signal hblank |