mirror of
https://github.com/holub/mame
synced 2025-05-23 22:20:01 +03:00
snes.c - Fixed problem with OAM address reset at start of vblank.
New games added or promoted from NOT_WORKING status --------------------------------------------------- Sonic Blast Man 2 Special Turbo (SNES bootleg) [Andreas Naive, Tomasz Slanina]
This commit is contained in:
parent
b02332f875
commit
3df44083f8
@ -7,7 +7,7 @@
|
||||
Supported games:
|
||||
- Killer Instinct
|
||||
- Final Fight 2
|
||||
- Sonic Blast Man 2 - not working due to bugs in SNES ppu emulation
|
||||
- Sonic Blast Man 2
|
||||
|
||||
Not dumped:
|
||||
- Final Fight 3
|
||||
@ -775,4 +775,4 @@ ROM_END
|
||||
|
||||
GAME( 199?, kinstb, 0, kinstb, kinstb, kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, ffight2b, 0, kinstb, ffight2b, ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1997, sblast2b, 0, kinstb, sblast2b, sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING)
|
||||
GAME( 1997, sblast2b, 0, kinstb, sblast2b, sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS)
|
||||
|
@ -414,6 +414,8 @@ struct SNES_PPU_STRUCT
|
||||
{
|
||||
UINT8 address_low;
|
||||
UINT8 address_high;
|
||||
UINT8 saved_address_low;
|
||||
UINT8 saved_address_high;
|
||||
UINT16 address;
|
||||
UINT16 priority_rotation;
|
||||
UINT8 size[2];
|
||||
|
@ -156,8 +156,11 @@ static TIMER_CALLBACK( snes_scanline_tick )
|
||||
/* Start of VBlank */
|
||||
if( snes_ppu.beam.current_vert == snes_ppu.beam.last_visible_line )
|
||||
{
|
||||
program_write_byte(OAMADDL, snes_ppu.oam.address_low ); /* Reset oam address */
|
||||
program_write_byte(OAMADDH, snes_ppu.oam.address_high );
|
||||
if(!(snes_ram[INIDISP]&0x80))
|
||||
{
|
||||
program_write_byte(OAMADDL, snes_ppu.oam.saved_address_low ); /* Reset oam address */
|
||||
program_write_byte(OAMADDH, snes_ppu.oam.saved_address_high );
|
||||
}
|
||||
snes_ram[HVBJOY] |= 0x81; /* Set vblank bit to on & indicate controllers being read */
|
||||
snes_ram[RDNMI] |= 0x80; /* Set NMI occured bit */
|
||||
|
||||
@ -639,11 +642,13 @@ WRITE8_HANDLER( snes_w_io )
|
||||
break;
|
||||
case OAMADDL: /* Address for accessing OAM (low) */
|
||||
snes_ppu.oam.address_low = data;
|
||||
snes_ppu.oam.saved_address_low = data;
|
||||
snes_ppu.oam.address = ((snes_ppu.oam.address_high & 0x1) << 8) + data;
|
||||
snes_ram[OAMDATA] = 0;
|
||||
break;
|
||||
case OAMADDH: /* Address for accessing OAM (high) */
|
||||
snes_ppu.oam.address_high = data & 0x1;
|
||||
snes_ppu.oam.saved_address_high = data;
|
||||
snes_ppu.oam.address = ((data & 0x1) << 8) + snes_ppu.oam.address_low;
|
||||
snes_ppu.oam.priority_rotation = (data & 0x80) ? 1 : 0;
|
||||
snes_ram[OAMDATA] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user