Strange IRQ code in Namco 163 games

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

Moderators: B00daW, Moderators

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

Strange IRQ code in Namco 163 games

Post by NewRisingSun » Mon Jul 23, 2018 1:50 pm

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: 226
Joined: Fri Jan 24, 2014 9:05 am
Location: Hungary

Re: Strange IRQ code in Namco 163 games

Post by za909 » Thu Aug 09, 2018 10:58 am

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

Post Reply