Conrad
Registered: Nov 2006 Posts: 849 |
Here's a very badly coded raster-splitter routine I found in an old demo:
*=$0801
!byte $0c,$08,$00,$00,$9e,$34,$30,$39,$36
*=$1000
sei
lda #$1b
sta $d011
lda #$3b
cmp $d012
bne *-3
jsr rastersplitter
jmp *-10
rastersplitter
ldy #$00
badline ldx #$08
newline lda tbl_raster1,y
sta $d020
sta $d020
iny
dex
beq badline
lda tbl_raster2,y
sta $d021
lda tbl_raster3,y
sta $d021
lda tbl_raster4,y
sta $d021
lda $0000,y
sta $dddd
lda $0000,y
sta $dddd
cpy #$80
bcc newline
rts
*=$1100
tbl_raster1
!byte $06,$00,$06,$06,$0e,$06,$0e,$0e,$03,$0e,$03,$03,$01,$03,$01,$01
!byte $03,$01,$03,$03,$0e,$03,$0e,$0e,$06,$0e,$06,$06,$00,$06,$00,$00
!byte $06,$00,$06,$06,$0e,$06,$0e,$0e,$03,$0e,$03,$03,$01,$03,$01,$01
!byte $03,$01,$03,$03,$0e,$03,$0e,$0e,$06,$0e,$06,$06,$00,$06,$00,$00
!byte $06,$00,$06,$06,$0e,$06,$0e,$0e,$03,$0e,$03,$03,$01,$03,$01,$01
!byte $03,$01,$03,$03,$0e,$03,$0e,$0e,$06,$0e,$06,$06,$00,$06,$00,$00
!byte $06,$00,$06,$06,$0e,$06,$0e,$0e,$03,$0e,$03,$03,$01,$03,$01,$01
!byte $03,$01,$03,$03,$0e,$03,$0e,$0e,$06,$0e,$06,$06,$00,$06,$00,$00
*=$1200
tbl_raster2
!byte $00
!byte $09,$00,$09,$09,$02,$09,$02,$02,$0a,$02,$0a,$0a,$0f,$0a,$0f,$0f
!byte $07,$0f,$07,$07,$01,$07,$01,$01,$0d,$01,$0d,$0d,$03,$0e,$06,$00
!byte $09,$00,$09,$09,$02,$09,$02,$02,$0a,$02,$0a,$0a,$0f,$0a,$0f,$0f
!byte $07,$0f,$07,$07,$01,$07,$01,$01,$0d,$01,$0d,$0d,$03,$0e,$06,$00
!byte $09,$00,$09,$09,$02,$09,$02,$02,$0a,$02,$0a,$0a,$0f,$0a,$0f,$0f
!byte $07,$0f,$07,$07,$01,$07,$01,$01,$0d,$01,$0d,$0d,$03,$0e,$06,$00
!byte $09,$00,$09,$09,$02,$09,$02,$02,$0a,$02,$0a,$0a,$0f,$0a,$0f,$0f
!byte $07,$0f,$07,$07,$01,$07,$01,$01,$0d,$01,$0d,$0d,$03,$0e,$06,$00
*=$1300
tbl_raster3
!byte $00
!byte $05,$00,$05,$05,$0d,$05,$0d,$0d,$01,$0d,$01,$01,$07,$0f,$0a,$08
!byte $02,$09,$02,$08,$0a,$0f,$07,$01,$01,$01,$0d,$05,$0b,$00,$0b,$00
!byte $05,$00,$05,$05,$0d,$05,$0d,$0d,$01,$0d,$01,$01,$07,$0f,$0a,$08
!byte $02,$09,$02,$08,$0a,$0f,$07,$01,$01,$01,$0d,$05,$0b,$00,$0b,$00
!byte $05,$00,$05,$05,$0d,$05,$0d,$0d,$01,$0d,$01,$01,$07,$0f,$0a,$08
!byte $02,$09,$02,$08,$0a,$0f,$07,$01,$01,$01,$0d,$05,$0b,$00,$0b,$00
!byte $05,$00,$05,$05,$0d,$05,$0d,$0d,$01,$0d,$01,$01,$07,$0f,$0a,$08
!byte $02,$09,$02,$08,$0a,$0f,$07,$01,$01,$01,$0d,$05,$0b,$00,$0b,$00
*=$1400
tbl_raster4
!byte $00
!byte $0b,$00,$0b,$0b,$0c,$0b,$0c,$0c,$0f,$0c,$0f,$0f,$07,$0f,$07,$07
!byte $0f,$07,$0f,$0f,$0c,$0f,$0c,$0c,$0b,$0c,$0b,$0b,$00,$0b,$00,$00
!byte $0b,$00,$0b,$0b,$0c,$0b,$0c,$0c,$0f,$0c,$0f,$0f,$07,$0f,$07,$07
!byte $0f,$07,$0f,$0f,$0c,$0f,$0c,$0c,$0b,$0c,$0b,$0b,$00,$0b,$00,$00
!byte $0b,$00,$0b,$0b,$0c,$0b,$0c,$0c,$0f,$0c,$0f,$0f,$07,$0f,$07,$07
!byte $0f,$07,$0f,$0f,$0c,$0f,$0c,$0c,$0b,$0c,$0b,$0b,$00,$0b,$00,$00
!byte $0b,$00,$0b,$0b,$0c,$0b,$0c,$0c,$0f,$0c,$0f,$0f,$07,$0f,$07,$07
!byte $0f,$07,$0f,$0f,$0c,$0f,$0c,$0c,$0b,$0c,$0b,$0b,$00,$0b,$00,$00
Because of the bad lines, every 8th line is corrupted, and the splits are out of line at the top most of the screen.
BTW, the LDA$0000,y STA$dddd can be used for extra splits. But who cares? It's a crap routine :-) |