68k interrupts: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:


Interrupts need to be acknowledged by writing to register $3C000C (REG_IRQACK).
Interrupts need to be acknowledged by writing to register $3C000C (REG_IRQACK).
bit2: Ack VBlank
*bit2: Ack VBlank
bit1: Ack RLI
*bit1: Ack RLI
bit0: Ack level 3
*bit0: Ack level 3
 
<pre>
move #$0007,REG_IRQACK    ; Acknowledges all interrupts
</pre>


Bits 8~10 of the SR register are used to mask them. $2000 enables them all, $2700 disables them.
Bits 8~10 of the SR register are used to mask them. $2000 enables them all, $2700 disables them.
Line 14: Line 18:
== Raster Line Interrupt ==
== Raster Line Interrupt ==


The RLI interrupt's behavior can be programmed through memory mapped registers. It's made to occur at (the start/end ? of) specific horizontal lines of the video output. See the Sammy logo at the start of [[Viewpoint]] for an example of its use. [[Sangoku]] uses it a lot to do [[Scanline stretch|stretches]] too.
The RLI interrupt's behavior can be programmed through memory mapped registers. It's made to occur at (the start/end ? of) specific horizontal lines of the video output. See the Sammy logo at the start of [[Viewpoint]] for an example of its use. [[Sengoku 3]] and [[Neo Turf Masters]] are also known to rely on them to do [[scanline effets]].


== AES/MVS interrupts ==
== AES/MVS interrupts ==


VBlank: 0
*VBlank: 0
RLI: 1
*RLI: 1
???: 2
*Pending at startup ?: 2


== CD interrupts ==
== CD interrupts ==


VBlank: 1
*VBlank: 1
RLI: 0
*RLI: 0


[[Category:CPUs]]
[[Category:CPUs]]
[[Category:Code]]
[[Category:Code]]

Revision as of 08:29, 23 February 2011

There are 3 interrupt levels on the AES and MVS. Only 2 on the CD hardware.

Interrupts need to be acknowledged by writing to register $3C000C (REG_IRQACK).

  • bit2: Ack VBlank
  • bit1: Ack RLI
  • bit0: Ack level 3
move	#$0007,REG_IRQACK     ; Acknowledges all interrupts

Bits 8~10 of the SR register are used to mask them. $2000 enables them all, $2700 disables them.

Vertical Blank Interrupt

VBlank interrupt is almost always used. It occurs everytime a new frame is traced (~60Hz).

Raster Line Interrupt

The RLI interrupt's behavior can be programmed through memory mapped registers. It's made to occur at (the start/end ? of) specific horizontal lines of the video output. See the Sammy logo at the start of Viewpoint for an example of its use. Sengoku 3 and Neo Turf Masters are also known to rely on them to do scanline effets.

AES/MVS interrupts

  • VBlank: 0
  • RLI: 1
  • Pending at startup ?: 2

CD interrupts

  • VBlank: 1
  • RLI: 0