Difference between revisions of "Talk:RAMBO-1"

From Nesdev wiki
Jump to: navigation, search
m (Alternate IRQ timing: $E001 also acknowledges the IRQ.)
m (Alternate IRQ timing: Tweaks.)
Line 21: Line 21:
  
 
This is an hack to get 3 games working: Klax, Skull&Crossbones and Hard Drivin'.
 
This is an hack to get 3 games working: Klax, Skull&Crossbones and Hard Drivin'.
 +
*Address mask: $E001.
 +
*Writing to the registers $E000 '''or''' $E001 acknowledges the IRQ.
 +
*Register $C001 sets the ''IRQ clear flag'' to '''true''' (it's cleared at the next IRQ clock).
  
Address mask: $E001.
+
'''When the IRQ is clocked by CPU or scanline modes:'''
Writing to the registers $E000 '''or''' $E001 acknowledges the IRQ.
+
 
+
'''When the IRQ is clocked by CPU or scanline modes'''
+
 
*If the IRQ counter++ == IRQ latch:
 
*If the IRQ counter++ == IRQ latch:
 
**If IRQs are enabled, trigger an IRQ 2 CPU cycles later.
 
**If IRQs are enabled, trigger an IRQ 2 CPU cycles later.
**Set IRQ reset flag.
+
**Set ''IRQ clear flag'' to '''true'''.
*If the IRQ flag is set (including previous $C001 write):
+
*If the ''IRQ clear flag'' is '''true''':
**IRQ counter is set to zero.
+
**''IRQ counter'' is set to zero.
**IRQ reset flag is cleared.
+
**''IRQ clear flag'' is set to '''false'''.
  
 
''Notice!''
 
''Notice!''

Revision as of 16:22, 3 July 2017

As for the 2mb PRG, I'm not sure if the cart actually supports that much ROM, but the PRG registers apparently are 8 bits, and 8kb * $100 = 2048kb = 2mb. --Drag 03:05, 9 November 2011 (UTC)

IRQ related - Hard Drivin'

Suggested changes for the Mapper64 IRQ. It makes Hard Drivin' to work fine. No other games are affected with this change. Every cycle on 6502 is either a read or a write cycle. So, you update the IRQ counter in the next CPU cycle:

  • IF $C001 was written to after previous clock
    • reload IRQ counter with IRQ Reload value PLUS ONE
  • ELSE IF IRQ counter is 0
    • reload IRQ counter with IRQ Reload value

When the IRQ is clocked by the mapper (in scanline or cycle mode):

    • Decrement IRQ counter by 1
    • IF IRQ counter is now 0 AND IRQs are enabled
      • wait one M2 cycle, then trigger IRQ

Hard Drivin' works. --Zepper (talk) 17:57, 14 January 2014 (MST)

Alternate IRQ timing

This is an hack to get 3 games working: Klax, Skull&Crossbones and Hard Drivin'.

  • Address mask: $E001.
  • Writing to the registers $E000 or $E001 acknowledges the IRQ.
  • Register $C001 sets the IRQ clear flag to true (it's cleared at the next IRQ clock).

When the IRQ is clocked by CPU or scanline modes:

  • If the IRQ counter++ == IRQ latch:
    • If IRQs are enabled, trigger an IRQ 2 CPU cycles later.
    • Set IRQ clear flag to true.
  • If the IRQ clear flag is true:
    • IRQ counter is set to zero.
    • IRQ clear flag is set to false.

Notice!

  • Skull&Crossbones has a glitched scanlined at the top of the scorebar, but NOT on the continue screen. Plus, the bottom line of the scorebar is NOT missing.
  • Hard Drivin' works, but the title screen has 2 glitched scanlines.
  • Klax is perfect, no problems.

--Zepper (talk) 17:12, 3 July 2017 (MDT)