.zp pointer: .ds 2 temp: .ds 1 scroll: .ds 2 .code .bank 0 .org $FFF6 .dw irq2 .dw irq1 .dw timer .dw nmi .dw reset .org $F000 irq2: irq1: timer: nmi: rti reset: sei csh cld ldx #$FF txs ; Map I/O to first page. lda #$FF tam #0 ; ...and RAM to the second page. lda #$F8 tam #1 ; Clear RAM to 0. stz $2000 tii $2000,$2001,$1FFF ; Zero sound master balance. stz $0801 ;; ;; ;; ldx #$0F VCL: stx $0000 stz $0002 stz $0003 dex bpl VCL ; CR st0 #$05 st1 #$C8 ; MWR st0 #$09 st1 #$60 st2 #$00 ; HSR st0 #$0A st1 #$02 st2 #$0B ; HDR st0 #$0B st1 #$3F st2 #$04 ; VSR st0 #$0C st1 #$02 st2 #$0F ; VDR st0 #$0D st1 #$EF ; VCR st0 #$0E st1 #$04 ; Init VCE lda #$06 sta $400 stz $402 stz $403 ldx #$04 DelayLoop0: DelayLoop1: lda $0000 and #$20 beq DelayLoop1 dex bne DelayLoop0 ; Copy palette into RAM stz $402 stz $403 tai $404,$3000,$400 ldx #$00 PaletteLoop: stx $402 stz $403 stx $404 stx $405 inx bne PaletteLoop st0 #$00 st1 #$00 st2 #$00 st0 #$02 ldy #$00 VRAMLoop: ldx #$00 VRAMSubLoop: txa rol a stz $0002 stz $0003 inx bne VRAMSubLoop iny bne VRAMLoop jsr LoadFont ; ; Hexdump palette ; lda #$00 sta