[stella] bankswitching duh

Subject: [stella] bankswitching duh
From: Aaron Bergstrom <Aaron.Bergstrom@xxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2003 05:04:22 -0600
duh, forgot to attach the file
	processor 6502
	include vcs.h

SC = $80

	org $1000
	rorg $d000

MainLoop2
VSyncSetup2
	LDA #2
	STA VSYNC
	STA WSYNC
	STA WSYNC
	STA WSYNC
	LDA #43
	STA TIM64T
	LDA #0
	STA VSYNC
VBlankWait2
	LDA INTIM
	BNE VBlankWait2
	LDA #1
	LDY #191
	STA WSYNC
	STA VBLANK
BurnToEnd2
	STA WSYNC
	DEY
	BNE BurnToEnd2

	LDA #2
	STA WSYNC
	STA VBLANK

	LDY #30
OverScan2
	STA WSYNC
	DEY
	BNE OverScan2

	LDA #240
	DEC SC
	BIT SC
	BEQ Next2
	JMP MainLoop2
Next2
	JMP ChangeColor2

	org $1100
	rorg $d100
ChangeColor2
	STA SC
	LDA $1ff9
	nop
	nop
	nop
	nop
	nop
	nop
	LDX #$72
	STX COLUBK
	JMP MainLoop2

	org $1fea
	rorg $dfea
Start2
	LDX $1ff9
	
	org $1ffc
	rorg $dffc
	.word Start2
	.word Start2

;---------------------
;Bank 2
;---------------------

	org $2000
	rorg $f000

Start
	SEI
	CLD
	LDX  #$FF
	TXS
	LDA  #0

ClearMem
	STA 0,X 
	DEX    
	BNE ClearMem
	LDA #240
	STA SC
	LDA #$FE
	STA COLUBK

MainLoop
VSyncSetup
	LDA #2
	STA VSYNC
	STA WSYNC
	STA WSYNC
	STA WSYNC
	LDA #43
	STA TIM64T
	LDA #0
	STA VSYNC
VBlankWait
	LDA INTIM
	BNE VBlankWait
	LDA #1
	LDY #191
	STA WSYNC
	STA VBLANK
BurnToEnd
	STA WSYNC
	DEY
	BNE BurnToEnd 

	LDA #2
	STA WSYNC
	STA VBLANK

	LDY #30
OverScan
	STA WSYNC
	DEY
	BNE OverScan

	LDA #240
	DEC SC
	BIT SC
	BEQ Next
	JMP MainLoop
Next
	JMP ChangeColor

	org $2100
	rorg $f100
ChangeColor
	STA SC
	LDA $1ff8
	nop
	nop
	nop
	nop
	nop
	nop
	LDX #$FE
	STX COLUBK
	JMP MainLoop
	
	org $2ff0   ;other bank start
	rorg $fff0  ;
	jmp Start

	org $2ffc
	rorg $fffc
	.word Start
	.word Start

	

Current Thread