Strange IRQ code in Namco 163 games
Posted: Mon Jul 23, 2018 1:50 pm
The IRQ handler of Sangokushi: Chuugen no Hasha and Namco Classic II:
The IRQ handler of Sangokushi II: Haou no Tairiku:
If an IRQ occurs, register $5800 will necessarily be $FF, at least as described in the wiki, so I wonder why check it, and if for some reason it does not have that value, what's the point of executing an extra NOP in the first case, and just freezing in the second case? No other Namco 163 game that I have checked does this.
Code: Select all
LDA $5800 ; IRQ Counter High/Enable
AND #$7F
CMP #$7F
BEQ .L1
NOP
.L1: (...)
Code: Select all
LDA $5800 ; IRQ Counter High/Enable
AND #$7F
CMP #$7F
BEQ .L2
NOP
.L1: JMP .L1
.L2: