Added initial kfest2018 files
This commit is contained in:
parent
159e8aed36
commit
c4b4426f2f
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,58 @@
|
|||
|
||||
all: INSANECLEAR.BIN FASTEST.BIN SETSCRN.BIN NORMAL.BIN NORMALSMC.BIN FASTCLEAR.BIN NORMALINCFONT.BIN NORMALAL31.BIN
|
||||
|
||||
FASTEST.BIN: driver.s fastfont.s
|
||||
rm -f fastest.xex
|
||||
cat driver.s fastfont.s > temp.s
|
||||
atrcopy . assemble -f -s temp.s -r 0x5000 -o FASTEST.BIN
|
||||
atrcopy kfest.dsk add FASTEST.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
SETSCRN.BIN: setscrn.s
|
||||
rm -f setscrn.bin
|
||||
cat setscrn.s > temp.s
|
||||
atrcopy . assemble -f -s temp.s -r 0x5000 -o SETSCRN.BIN
|
||||
atrcopy kfest.dsk add SETSCRN.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
NORMAL.BIN: driver.s normal.s
|
||||
cat driver.s normal.s > temp.s
|
||||
atrcopy . assemble -f -d fatfont128.dat@0x6000 -s temp.s -r 0x5000 -o NORMAL.BIN
|
||||
atrcopy kfest.dsk add NORMAL.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
NORMALINCFONT.BIN: driver.s normalincfont.s
|
||||
cat driver.s normalincfont.s > temp.s
|
||||
atrcopy . assemble -f -d fatfont128.dat@0x6000 -s temp.s -r 0x5000 -o NORMALINCFONT.BIN
|
||||
atrcopy kfest.dsk add NORMALINCFONT.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
NORMALAL31.BIN: driver.s normalal31.s
|
||||
cat driver.s normalal31.s > temp.s
|
||||
atrcopy . assemble -f -d fatfont128.dat@0x6000 -s temp.s -r 0x5000 -o NORMALAL31.BIN
|
||||
atrcopy kfest.dsk add NORMALAL31.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
NORMALSMC.BIN: driver.s normalsmc.s
|
||||
cat driver.s normalsmc.s > temp.s
|
||||
atrcopy . assemble -f -d fatfont128.dat@0x6000 -s temp.s -r 0x5000 -o NORMALSMC.BIN
|
||||
atrcopy kfest.dsk add NORMALSMC.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
FASTCLEAR.BIN: fastclear.s
|
||||
cat fastclear.s > temp.s
|
||||
atrcopy . assemble -f -s fastclear.s -r 0x5000 -o FASTCLEAR.BIN
|
||||
atrcopy kfest.dsk add FASTCLEAR.BIN -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
INSANECLEAR.BIN: insaneclear.s
|
||||
cat insaneclear.s > temp.s
|
||||
atrcopy . assemble -f -s insaneclear.s -r 0x4000 -o INSANECLEAR.BIN
|
||||
atrcopy insaneclear.dsk boot -b INSANECLEAR.BIN --brun 4000 -f
|
||||
rm -f apple2auto.state
|
||||
|
||||
clean:
|
||||
rm -f working.dsk
|
||||
|
||||
reallyclean: clean
|
||||
rm -f player-missile.hgr player-missile-2.hgr kansasfest-hackfest.hgr title.hgr
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,97 @@
|
|||
|
||||
FIRST_CHAR_OF_SCREEN = $06
|
||||
FIRST_CHAR_OF_LINE = $07
|
||||
CURRENT_CHAR = $08
|
||||
FRAME_COUNT = $09
|
||||
|
||||
|
||||
*= $5000
|
||||
|
||||
start_set
|
||||
jsr set_hires
|
||||
jsr clrscr
|
||||
jsr driver
|
||||
jsr set_text
|
||||
rts
|
||||
brk
|
||||
|
||||
driver
|
||||
lda #$00
|
||||
sta FIRST_CHAR_OF_SCREEN
|
||||
lda #64
|
||||
sta FRAME_COUNT
|
||||
page_loop
|
||||
jsr page
|
||||
dec FRAME_COUNT
|
||||
bne page_loop
|
||||
rts
|
||||
|
||||
; os memory map
|
||||
KEYBOARD = $c000
|
||||
KBDSTROBE = $c010
|
||||
CLRTEXT = $c050
|
||||
SETTEXT = $c051
|
||||
CLRMIXED = $c052
|
||||
SETMIXED = $c053
|
||||
TXTPAGE1 = $c054
|
||||
TXTPAGE2 = $c055
|
||||
CLRHIRES = $c056
|
||||
SETHIRES = $c057
|
||||
|
||||
|
||||
set_hires bit CLRTEXT ; start with HGR page 1, full screen
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit SETHIRES
|
||||
rts
|
||||
|
||||
set_text bit SETTEXT
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit CLRHIRES
|
||||
rts
|
||||
|
||||
; clear hires page 1 only
|
||||
clrscr lda #$20
|
||||
sta clrscr_smc+2
|
||||
lda #0
|
||||
ldy #0
|
||||
clrscr_smc sta $ff00,y
|
||||
iny
|
||||
bne clrscr_smc
|
||||
inc clrscr_smc+2
|
||||
ldx clrscr_smc+2
|
||||
cpx #$40
|
||||
bcc clrscr_smc
|
||||
rts
|
||||
|
||||
*= $5074
|
||||
|
||||
page
|
||||
inc FIRST_CHAR_OF_SCREEN
|
||||
lda FIRST_CHAR_OF_SCREEN
|
||||
sta FIRST_CHAR_OF_LINE
|
||||
|
||||
ldy #$00
|
||||
line_loop
|
||||
ldx #$00
|
||||
lda FIRST_CHAR_OF_LINE
|
||||
sta CURRENT_CHAR
|
||||
char_loop
|
||||
lda CURRENT_CHAR
|
||||
jsr font_test
|
||||
inc CURRENT_CHAR
|
||||
inx
|
||||
cpx #40
|
||||
bcc char_loop
|
||||
|
||||
inc FIRST_CHAR_OF_LINE
|
||||
iny
|
||||
cpy #24
|
||||
bcc line_loop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
font_test
|
|
@ -0,0 +1,285 @@
|
|||
; AUTOGENERATED FILE; DO NOT EDIT!
|
||||
;
|
||||
; This file was generated by asmgen.py, a 6502 code generator sponsored by
|
||||
; the Player/Missile Podcast. (The sprite compiler is based on HiSprite by
|
||||
; Quinn Dunki).
|
||||
;
|
||||
; The code produced by asmgen is licensed under the Creative Commons
|
||||
; Attribution 4.0 International (CC BY 4.0), so you are free to use the code in
|
||||
; this file for any purpose. (The code generator itself is licensed under the
|
||||
; GPLv3.)
|
||||
|
||||
FIRST_CHAR_OF_SCREEN = $06
|
||||
FIRST_CHAR_OF_LINE = $07
|
||||
CURRENT_CHAR = $08
|
||||
FRAME_COUNT = $09
|
||||
|
||||
|
||||
*= $5000
|
||||
|
||||
start_set
|
||||
jsr set_hires
|
||||
jsr clrscr
|
||||
jsr driver
|
||||
jsr set_text
|
||||
rts
|
||||
brk
|
||||
|
||||
driver
|
||||
lda #$00
|
||||
sta FIRST_CHAR_OF_SCREEN
|
||||
lda #64
|
||||
sta FRAME_COUNT
|
||||
page_loop
|
||||
jsr page
|
||||
dec FRAME_COUNT
|
||||
bne page_loop
|
||||
rts
|
||||
|
||||
; os memory map
|
||||
KEYBOARD = $c000
|
||||
KBDSTROBE = $c010
|
||||
CLRTEXT = $c050
|
||||
SETTEXT = $c051
|
||||
CLRMIXED = $c052
|
||||
SETMIXED = $c053
|
||||
TXTPAGE1 = $c054
|
||||
TXTPAGE2 = $c055
|
||||
CLRHIRES = $c056
|
||||
SETHIRES = $c057
|
||||
|
||||
|
||||
set_hires bit CLRTEXT ; start with HGR page 1, full screen
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit SETHIRES
|
||||
rts
|
||||
|
||||
set_text bit SETTEXT
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit CLRHIRES
|
||||
rts
|
||||
|
||||
; clear hires page 1 only
|
||||
clrscr lda #$20
|
||||
sta clrscr_smc+2
|
||||
lda #0
|
||||
ldy #0
|
||||
clrscr_smc sta $ff00,y
|
||||
iny
|
||||
bne clrscr_smc
|
||||
inc clrscr_smc+2
|
||||
ldx clrscr_smc+2
|
||||
cpx #$40
|
||||
bcc clrscr_smc
|
||||
rts
|
||||
|
||||
*= $5074
|
||||
|
||||
page
|
||||
|
||||
FASTCLEAR_2000 ; A,X clobbered
|
||||
lda FRAME_COUNT
|
||||
ldx #39
|
||||
FASTCLEAR_2000_INNER
|
||||
sta $2000,x
|
||||
sta $2400,x
|
||||
sta $2800,x
|
||||
sta $2c00,x
|
||||
sta $3000,x
|
||||
sta $3400,x
|
||||
sta $3800,x
|
||||
sta $3c00,x
|
||||
sta $2080,x
|
||||
sta $2480,x
|
||||
sta $2880,x
|
||||
sta $2c80,x
|
||||
sta $3080,x
|
||||
sta $3480,x
|
||||
sta $3880,x
|
||||
sta $3c80,x
|
||||
sta $2100,x
|
||||
sta $2500,x
|
||||
sta $2900,x
|
||||
sta $2d00,x
|
||||
sta $3100,x
|
||||
sta $3500,x
|
||||
sta $3900,x
|
||||
sta $3d00,x
|
||||
sta $2180,x
|
||||
sta $2580,x
|
||||
sta $2980,x
|
||||
sta $2d80,x
|
||||
sta $3180,x
|
||||
sta $3580,x
|
||||
sta $3980,x
|
||||
sta $3d80,x
|
||||
sta $2200,x
|
||||
sta $2600,x
|
||||
sta $2a00,x
|
||||
sta $2e00,x
|
||||
sta $3200,x
|
||||
sta $3600,x
|
||||
sta $3a00,x
|
||||
sta $3e00,x
|
||||
sta $2280,x
|
||||
sta $2680,x
|
||||
sta $2a80,x
|
||||
sta $2e80,x
|
||||
sta $3280,x
|
||||
sta $3680,x
|
||||
sta $3a80,x
|
||||
sta $3e80,x
|
||||
sta $2300,x
|
||||
sta $2700,x
|
||||
sta $2b00,x
|
||||
sta $2f00,x
|
||||
sta $3300,x
|
||||
sta $3700,x
|
||||
sta $3b00,x
|
||||
sta $3f00,x
|
||||
sta $2380,x
|
||||
sta $2780,x
|
||||
sta $2b80,x
|
||||
sta $2f80,x
|
||||
sta $3380,x
|
||||
sta $3780,x
|
||||
sta $3b80,x
|
||||
sta $3f80,x
|
||||
sta $2028,x
|
||||
sta $2428,x
|
||||
sta $2828,x
|
||||
sta $2c28,x
|
||||
sta $3028,x
|
||||
sta $3428,x
|
||||
sta $3828,x
|
||||
sta $3c28,x
|
||||
sta $20a8,x
|
||||
sta $24a8,x
|
||||
sta $28a8,x
|
||||
sta $2ca8,x
|
||||
sta $30a8,x
|
||||
sta $34a8,x
|
||||
sta $38a8,x
|
||||
sta $3ca8,x
|
||||
sta $2128,x
|
||||
sta $2528,x
|
||||
sta $2928,x
|
||||
sta $2d28,x
|
||||
sta $3128,x
|
||||
sta $3528,x
|
||||
sta $3928,x
|
||||
sta $3d28,x
|
||||
sta $21a8,x
|
||||
sta $25a8,x
|
||||
sta $29a8,x
|
||||
sta $2da8,x
|
||||
sta $31a8,x
|
||||
sta $35a8,x
|
||||
sta $39a8,x
|
||||
sta $3da8,x
|
||||
sta $2228,x
|
||||
sta $2628,x
|
||||
sta $2a28,x
|
||||
sta $2e28,x
|
||||
sta $3228,x
|
||||
sta $3628,x
|
||||
sta $3a28,x
|
||||
sta $3e28,x
|
||||
sta $22a8,x
|
||||
sta $26a8,x
|
||||
sta $2aa8,x
|
||||
sta $2ea8,x
|
||||
sta $32a8,x
|
||||
sta $36a8,x
|
||||
sta $3aa8,x
|
||||
sta $3ea8,x
|
||||
sta $2328,x
|
||||
sta $2728,x
|
||||
sta $2b28,x
|
||||
sta $2f28,x
|
||||
sta $3328,x
|
||||
sta $3728,x
|
||||
sta $3b28,x
|
||||
sta $3f28,x
|
||||
sta $23a8,x
|
||||
sta $27a8,x
|
||||
sta $2ba8,x
|
||||
sta $2fa8,x
|
||||
sta $33a8,x
|
||||
sta $37a8,x
|
||||
sta $3ba8,x
|
||||
sta $3fa8,x
|
||||
sta $2050,x
|
||||
sta $2450,x
|
||||
sta $2850,x
|
||||
sta $2c50,x
|
||||
sta $3050,x
|
||||
sta $3450,x
|
||||
sta $3850,x
|
||||
sta $3c50,x
|
||||
sta $20d0,x
|
||||
sta $24d0,x
|
||||
sta $28d0,x
|
||||
sta $2cd0,x
|
||||
sta $30d0,x
|
||||
sta $34d0,x
|
||||
sta $38d0,x
|
||||
sta $3cd0,x
|
||||
sta $2150,x
|
||||
sta $2550,x
|
||||
sta $2950,x
|
||||
sta $2d50,x
|
||||
sta $3150,x
|
||||
sta $3550,x
|
||||
sta $3950,x
|
||||
sta $3d50,x
|
||||
sta $21d0,x
|
||||
sta $25d0,x
|
||||
sta $29d0,x
|
||||
sta $2dd0,x
|
||||
sta $31d0,x
|
||||
sta $35d0,x
|
||||
sta $39d0,x
|
||||
sta $3dd0,x
|
||||
sta $2250,x
|
||||
sta $2650,x
|
||||
sta $2a50,x
|
||||
sta $2e50,x
|
||||
sta $3250,x
|
||||
sta $3650,x
|
||||
sta $3a50,x
|
||||
sta $3e50,x
|
||||
sta $22d0,x
|
||||
sta $26d0,x
|
||||
sta $2ad0,x
|
||||
sta $2ed0,x
|
||||
sta $32d0,x
|
||||
sta $36d0,x
|
||||
sta $3ad0,x
|
||||
sta $3ed0,x
|
||||
sta $2350,x
|
||||
sta $2750,x
|
||||
sta $2b50,x
|
||||
sta $2f50,x
|
||||
sta $3350,x
|
||||
sta $3750,x
|
||||
sta $3b50,x
|
||||
sta $3f50,x
|
||||
sta $23d0,x
|
||||
sta $27d0,x
|
||||
sta $2bd0,x
|
||||
sta $2fd0,x
|
||||
sta $33d0,x
|
||||
sta $37d0,x
|
||||
sta $3bd0,x
|
||||
sta $3fd0,x
|
||||
dex
|
||||
bmi FASTCLEAR_2000_RTS
|
||||
|
||||
jmp FASTCLEAR_2000_INNER
|
||||
FASTCLEAR_2000_RTS
|
||||
rts
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
|
||||
SCRATCH_X = $D0
|
||||
SCRATCH_Y = $D1
|
||||
FONT_PTR = $D2
|
||||
HGR_PTR = $D4
|
||||
|
||||
FATFONT = $6000
|
||||
|
||||
; A = character, X = column, Y = row; A is clobbered, X&Y are not
|
||||
|
||||
stx SCRATCH_X
|
||||
sty SCRATCH_Y
|
||||
|
||||
; find address of glyph
|
||||
sta font_ptr
|
||||
lda #0
|
||||
sta font_ptr + 1
|
||||
asl font_ptr ; multiply by 8
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
|
||||
clc ; add font table address to get pointer inside font table
|
||||
lda #<fatfont ; would be slightly faster if page aligned because you
|
||||
adc font_ptr ; could just store the low byte
|
||||
sta font_ptr
|
||||
lda #>fatfont
|
||||
adc font_ptr+1
|
||||
sta font_ptr+1
|
||||
|
||||
lda hgrtextrow_l,y ; load address of first line of hgr text
|
||||
sta hgr_ptr
|
||||
lda hgrtextrow_h,y
|
||||
sta hgr_ptr+1
|
||||
|
||||
ldx #0
|
||||
slowfont_loop
|
||||
txa
|
||||
tay
|
||||
lda (font_ptr),y
|
||||
ldy SCRATCH_X ; col goes in y
|
||||
sta (hgr_ptr),y
|
||||
clc
|
||||
lda #4
|
||||
adc hgr_ptr+1
|
||||
sta hgr_ptr+1
|
||||
inx
|
||||
cpx #8
|
||||
bcc slowfont_loop
|
||||
|
||||
done
|
||||
ldx SCRATCH_X
|
||||
ldy SCRATCH_Y
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
hgrtextrow_l
|
||||
.byte $00,$80,$00,$80,$00,$80,$00,$80
|
||||
.byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||
.byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||
hgrtextrow_h
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
|
@ -0,0 +1,71 @@
|
|||
|
||||
SCRATCH_X = $D0
|
||||
SCRATCH_Y = $D1
|
||||
FONT_PTR = $D2
|
||||
HGR_PTR = $D4
|
||||
|
||||
FATFONT = $6000
|
||||
|
||||
; A = character, X = column, Y = row; A is clobbered, X&Y are not
|
||||
|
||||
stx SCRATCH_X
|
||||
sty SCRATCH_Y
|
||||
|
||||
; find address of glyph
|
||||
sta font_ptr
|
||||
lda #0
|
||||
sta font_ptr + 1
|
||||
asl font_ptr ; multiply by 8
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
|
||||
clc ; add font table address to get pointer inside font table
|
||||
lda #<fatfont ; would be slightly faster if page aligned because you
|
||||
adc font_ptr ; could just store the low byte
|
||||
sta font_ptr
|
||||
lda #>fatfont
|
||||
adc font_ptr+1
|
||||
sta font_ptr+1
|
||||
|
||||
clc
|
||||
lda hgrtextrow_l,y ; load address of first line of hgr text
|
||||
adc SCRATCH_X
|
||||
sta hgr_ptr
|
||||
lda hgrtextrow_h,y
|
||||
adc #0
|
||||
sta hgr_ptr+1
|
||||
|
||||
ldy #0
|
||||
slowfont_loop
|
||||
lda (font_ptr),y
|
||||
sta (hgr_ptr),y
|
||||
clc
|
||||
lda hgr_ptr
|
||||
adc #$ff
|
||||
sta hgr_ptr
|
||||
lda #3
|
||||
adc hgr_ptr+1
|
||||
sta hgr_ptr+1
|
||||
iny
|
||||
cpy #8
|
||||
bcc slowfont_loop
|
||||
|
||||
done
|
||||
ldx SCRATCH_X
|
||||
ldy SCRATCH_Y
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
hgrtextrow_l
|
||||
.byte $00,$80,$00,$80,$00,$80,$00,$80
|
||||
.byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||
.byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||
hgrtextrow_h
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
|
@ -0,0 +1,71 @@
|
|||
|
||||
SCRATCH_X = $D0
|
||||
SCRATCH_Y = $D1
|
||||
FONT_PTR = $D2
|
||||
HGR_PTR = $D4
|
||||
|
||||
FATFONT = $6000
|
||||
|
||||
; A = character, X = column, Y = row; A is clobbered, X&Y are not
|
||||
|
||||
stx SCRATCH_X
|
||||
sty SCRATCH_Y
|
||||
|
||||
; find address of glyph
|
||||
sta font_ptr
|
||||
lda #0
|
||||
sta font_ptr + 1
|
||||
asl font_ptr ; multiply by 8
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
|
||||
clc ; add font table address to get pointer inside font table
|
||||
lda #<fatfont ; would be slightly faster if page aligned because you
|
||||
adc font_ptr ; could just store the low byte
|
||||
sta font_ptr
|
||||
lda #>fatfont
|
||||
adc font_ptr+1
|
||||
sta font_ptr+1
|
||||
|
||||
lda hgrtextrow_l,y ; load address of first line of hgr text
|
||||
sta hgr_ptr
|
||||
lda hgrtextrow_h,y
|
||||
sta hgr_ptr+1
|
||||
|
||||
ldx #0
|
||||
slowfont_loop
|
||||
ldy #0
|
||||
lda (font_ptr),y
|
||||
ldy SCRATCH_X ; col goes in y
|
||||
sta (hgr_ptr),y
|
||||
clc
|
||||
lda #4
|
||||
adc hgr_ptr+1
|
||||
sta hgr_ptr+1
|
||||
clc
|
||||
inc font_ptr
|
||||
bcc ?1
|
||||
inc font_ptr+1
|
||||
?1 inx
|
||||
cpx #8
|
||||
bcc slowfont_loop
|
||||
|
||||
done
|
||||
ldx SCRATCH_X
|
||||
ldy SCRATCH_Y
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
hgrtextrow_l
|
||||
.byte $00,$80,$00,$80,$00,$80,$00,$80
|
||||
.byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||
.byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||
hgrtextrow_h
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
|
@ -0,0 +1,66 @@
|
|||
|
||||
SCRATCH_X = $D0
|
||||
SCRATCH_Y = $D1
|
||||
FONT_PTR = $D2
|
||||
HGR_PTR = $D4
|
||||
|
||||
FATFONT = $6000
|
||||
|
||||
; A = character, X = column, Y = row; A is clobbered, X&Y are not
|
||||
|
||||
stx SCRATCH_X
|
||||
sty SCRATCH_Y
|
||||
|
||||
; find address of glyph
|
||||
sta font_ptr
|
||||
lda #0
|
||||
sta font_ptr + 1
|
||||
asl font_ptr ; multiply by 8
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
asl font_ptr
|
||||
rol font_ptr + 1
|
||||
|
||||
clc ; add font table address to get pointer inside font table
|
||||
lda #<fatfont ; would be slightly faster if page aligned because you
|
||||
adc font_ptr ; could just store the low byte
|
||||
sta slowfont_loop_smc+1
|
||||
lda #>fatfont
|
||||
adc font_ptr+1
|
||||
sta slowfont_loop_smc+2
|
||||
|
||||
lda hgrtextrow_l,y ; load address of first line of hgr text
|
||||
sta hgr_ptr
|
||||
lda hgrtextrow_h,y
|
||||
sta hgr_ptr+1
|
||||
|
||||
ldx #0
|
||||
ldy SCRATCH_X ; col goes in y
|
||||
slowfont_loop
|
||||
slowfont_loop_smc
|
||||
lda $ffff,x
|
||||
sta (hgr_ptr),y
|
||||
clc
|
||||
lda #4
|
||||
adc hgr_ptr+1
|
||||
sta hgr_ptr+1
|
||||
inx
|
||||
cpx #8
|
||||
bcc slowfont_loop
|
||||
|
||||
ldx SCRATCH_X
|
||||
ldy SCRATCH_Y
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
hgrtextrow_l
|
||||
.byte $00,$80,$00,$80,$00,$80,$00,$80
|
||||
.byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||
.byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||
hgrtextrow_h
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
||||
.byte $20,$20,$21,$21,$22,$22,$23,$23
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
|
||||
*= $5000
|
||||
|
||||
start_set
|
||||
jsr set_hires
|
||||
jsr test
|
||||
jsr set_text
|
||||
jmp forever
|
||||
rts
|
||||
brk
|
||||
|
||||
forever
|
||||
jmp forever
|
||||
|
||||
; os memory map
|
||||
KEYBOARD = $c000
|
||||
KBDSTROBE = $c010
|
||||
CLRTEXT = $c050
|
||||
SETTEXT = $c051
|
||||
CLRMIXED = $c052
|
||||
SETMIXED = $c053
|
||||
TXTPAGE1 = $c054
|
||||
TXTPAGE2 = $c055
|
||||
CLRHIRES = $c056
|
||||
SETHIRES = $c057
|
||||
|
||||
|
||||
set_hires bit CLRTEXT ; start with HGR page 1, full screen
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit SETHIRES
|
||||
rts
|
||||
|
||||
set_text bit SETTEXT
|
||||
bit CLRMIXED
|
||||
bit TXTPAGE1
|
||||
bit CLRHIRES
|
||||
rts
|
||||
|
||||
|
||||
*= $5074
|
||||
test
|
||||
; set hires page 1 only
|
||||
lda #$20
|
||||
sta setscr_smc+2
|
||||
lda #0
|
||||
ldy #0
|
||||
lda #$ff
|
||||
setscr_smc sta $ff00,y ; 4
|
||||
iny ; 2
|
||||
bne setscr_smc ; 4 = 10 * 256
|
||||
inc setscr_smc+2 ; 6
|
||||
ldx setscr_smc+2 ; 6
|
||||
cpx #$40 ; 2
|
||||
bcc setscr_smc ; 4
|
||||
rts ; (18 + 10*256) * 32 = 82496
|
||||
|
||||
brk
|
Loading…
Reference in New Issue