HVC Controller Test

From The Cutting Room Floor
Jump to: navigation, search

Title Screen

HVC Controller Test

Platform: NES


SourceIcon.png This game has uncompiled source code.


The HVC Controller Test is a sample cartridge (kensa cassette) for maintenance use, more specifically for testing Famicom controllers (including internal MIC).


Hmmm...
To do:
There's some unused graphics.


Ura Asobi

Surprisingly, this small program contains a hidden mini-game, similar to the American toy game Simon. To start it, hold B + Down on Controller II, then reset the console. After a while, both controllers on the screen will automatically pass all the checks and the mini-game will begin. The program will flash a button for you to press on Controller I, and you must press it as quickly as possible. If you press the correct button just in time, a sound will play; if you miss, a different sound will play. The game will then move to the next button. Your goal is to correctly press as many buttons as possible.

Even more interesting, the source code to this mini-game is present at the end of the program itself. In the sources, this game is called "Ura Asobi", which means something like "End Game".

$E5,$03,$44,$55,$55
	.BYTE	00
	RTS      
;
;
NOWTE1
	LDA	TIME
	CMP	#$18
	BCC	BRTES
	JMP	APR1  
BRTES
	JMP	BLK1
;
NOWTE2
	LDA	TIME
	CMP	#$18
	BCC	BRTES2
	JMP	APR2
BRTES2
	JMP	BLK2
;
;************************************
;*                                  *
;*    URA	ASOBI               *
;*                                  *
;************************************
GAME
	LDA	#00
	STA	TIME2
WAIT1
	JSR	WNMI
	LDA	TIME2
	CMP	#$50
	BNE	WAIT1
;
	LDA	$500
	STA	$30
	LDA	#$F0
	STA	$31
	LDA	#$FF
	STA	CONM1
	STA	CONM2
GAMELO
	LDA	#$FF
	LDX	#00
CLRLO
	STA	$2E1,X
	INX
	INX
	INX
	INX
	CPX	#$20
	BNE	CLRLO
;
	LDX	#00
LOMAKE
	LDA	COMCON
	STA	MEMORY
AGAIN
	JSR	RUNDOM
	LDA	COMCON
	CMP	MEMORY
	BEQ	AGAIN
	STA	$600,X
	INX
	BNE	LOMAKE
;
	LDA	#01
	STA	COUNT
NEXTG
	LDA	COUNT
	AND	#$0F
	STA	$2F5
	LSR	A
	LSR	A
	LSR	A
	LSR	A
	STA	$2ED
;
	LDY	COUNT
	LDX	#00
LODISP
	LDA	#00
	STA	CONT2
	STA	EDGE2
;
	LDA	$600,X
	STA	CONT1
	STA	EDGE1
	STA	$F0   
	TYA
	PHA
	TXA
	PHA
	LDA	#00
	STA	TIME2
WAIT2
	LDA	$F0
	STA	CONT1
	JSR	CONCH
	JSR	WNMI
	LDA	TIME2
	CMP	#$10
	BNE	WAIT2
	LDA	#00
	STA	TIME2
	STA	EDGE1
	JSR	CONCH
WAIT
	JSR	WNMI
	LDA	TIME2
	CMP	#$1A
	BNE	WAIT
	PLA
	TAX
	PLA	
	TAY
	INX
	DEY
	BNE	LODISP
;
;--------------------------------
	LDY	COUNT
	LDX	#00
WEDGE
	JSR	WNMI
	TYA
	PHA
	TXA
	PHA
;
	JSR	CONCH
;
	PLA
	TAX
	PLA
	TAY
	LDA	EDGE1
	BEQ	WEDGE
;
	CMP	$600,X
	BEQ	OK
	JMP	NG
OK
	INX
	DEY
	BNE	WEDGE
	JSR	OKSOU
	INC	COUNT
	JMP	NEXTG
NG
	JSR	NGSOU
	JMP	GAMELO
;---------------------------
; GAME	SUBLOUTINES
;---------------------------
RUNDOM
	LDA	$30
	AND	#02
	STA	$40
	LDA	$31
	AND	#02
	EOR	$40
	CLC
	BEQ	BRRUN
	SEC
BRRUN
	ROR	$30
	ROR	$31
;
	LDA	$30
	AND	#$07
;
	SEC
	ADC	#00
	TAY
	LDA	#00
	STA	COMCON
	SEC
SHIFT
	ROL	COMCON
	DEY
	BNE	SHIFT
	RTS
;
NGSOU
	LDA	#$C4
	JMP	BRSOU
OKSOU
	LDA	#$CC
BRSOU
	STA	$4001
	LDA	#$9F
	STA	$4000
	LDA	#$FF
	STA	$4002
	LDA	#$01
	STA	$4015
	LDA	#$08
	STA	$4003
;
	JSR	WSOU
;
	RTS
;
WSOU
	JSR	WNMI
	LDA	$4015
	AND	#01
	BNE	WSOU
;
	RTS