Talk:RAMBO-1: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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. --[[User:Drag|Drag]] 03:05, 9 November 2011 (UTC)
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. --[[User:Drag|Drag]] 03:05, 9 November 2011 (UTC)


== IRQ related - Hard Drivin' ==
== Alternate IRQ timing  ==


Suggested changes for the Mapper64 IRQ. It makes Hard Drivin' to work fine. No other games are affected with this change.
This is how to get 4 games working: Klax, Skull&Crossbones, Rolling Thunder and Hard Drivin'.
Every cycle on 6502 is either a read or a write cycle. So, you update the IRQ counter in the next CPU cycle:
*Address mask: $E001.
 
* '''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. --[[User:Zepper|Zepper]] ([[User talk:Zepper|talk]]) 17:57, 14 January 2014 (MST)
writes to $C000: irq_latch=data;
writes to $C001: irq_reload=true; irq_mode=data&1;
writes to $E000: irq_enable=false; IRQ acknowledge by CPU.
writes to $E001: irq_enable=true; IRQ acknowledge by CPU.


== Alternate IRQ timing  ==
* When the IRQ is clocked by CPU or scanline modes:


This is an hack to get 3 games working: Klax, Skull&Crossbones and Hard Drivin'.
If irq_reload == true:
*Address mask: $E001.
    irq_counter = irq_latch;
*Writing to the registers $E000 '''or''' $E001 acknowledges the IRQ.
    if irq_latch != 0
*Register $C001 sets the ''IRQ clear flag'' to '''true''' (it's cleared at the next IRQ clock).
      irq_counter |= 1;
    irq_reload=false;
Else if irq_counter == 0:
    irq_counter = irq_latch;
Else
    irq_counter--;
If irq_counter == 0 and irq_enable == true
    irq_delay=4 (IRQ will be fired 4 CPU cycles later)


'''When the IRQ is clocked by CPU or scanline modes:'''
== Alternate Method for RAMBO-1 IRQ ==
*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!''
Nintendulator-NRS's source file /mappers/src/iNES/mapper064.cpp has an alternative implementation of the IRQ which allows it to work properly with all known games to use it: Klax, Skull & Crossbones and Hard Drivin'.
*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.
--[[User:Zepper|Zepper]] ([[User talk:Zepper|talk]]) 17:12, 3 July 2017 (MDT)

Latest revision as of 14:43, 9 July 2019

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)

Alternate IRQ timing

This is how to get 4 games working: Klax, Skull&Crossbones, Rolling Thunder and Hard Drivin'.

  • Address mask: $E001.
writes to $C000: irq_latch=data;
writes to $C001: irq_reload=true; irq_mode=data&1;
writes to $E000: irq_enable=false; IRQ acknowledge by CPU.
writes to $E001: irq_enable=true; IRQ acknowledge by CPU.
  • When the IRQ is clocked by CPU or scanline modes:
If irq_reload == true:
   irq_counter = irq_latch;
   if irq_latch != 0
      irq_counter |= 1;
   irq_reload=false;
Else if irq_counter == 0:
   irq_counter = irq_latch;
Else
   irq_counter--;
If irq_counter == 0 and irq_enable == true
   irq_delay=4 (IRQ will be fired 4 CPU cycles later)

Alternate Method for RAMBO-1 IRQ

Nintendulator-NRS's source file /mappers/src/iNES/mapper064.cpp has an alternative implementation of the IRQ which allows it to work properly with all known games to use it: Klax, Skull & Crossbones and Hard Drivin'.