Strange IRQ code in Namco 163 games

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Strange IRQ code in Namco 163 games

Post 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.
User avatar
za909
Posts: 248
Joined: Fri Jan 24, 2014 9:05 am
Location: Mijn hart woont al in Nederland

Re: Strange IRQ code in Namco 163 games

Post by za909 »

My first guess would be an odd protection method against possible bad pirate copies of the mapper, or hardware failure?
Post Reply