Page 1 of 1

Strange IRQ code in Namco 163 games

Posted: Mon Jul 23, 2018 1:50 pm
by NewRisingSun
The IRQ handler of Sangokushi: Chuugen no Hasha and Namco Classic II:

Code: Select all

	LDA	$5800	; IRQ Counter High/Enable
	AND	#$7F
	CMP	#$7F
	BEQ	.L1
	NOP
.L1:	(...)
The IRQ handler of Sangokushi II: Haou no Tairiku:

Code: Select all

	LDA	$5800	; IRQ Counter High/Enable
	AND	#$7F
	CMP	#$7F
	BEQ	.L2
	NOP
.L1:	JMP	.L1
.L2:	
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.

Re: Strange IRQ code in Namco 163 games

Posted: Thu Aug 09, 2018 10:58 am
by za909
My first guess would be an odd protection method against possible bad pirate copies of the mapper, or hardware failure?