mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-05-28 17:41:29 +00:00
tiny_hgr8: didn't think it was possible
This commit is contained in:
parent
fdcbdaeb6a
commit
99e183cc33
45
demos/lovebyte2023/tinyhgr_8/Makefile
Normal file
45
demos/lovebyte2023/tinyhgr_8/Makefile
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
include ../../../Makefile.inc
|
||||||
|
|
||||||
|
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||||
|
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||||
|
|
||||||
|
all: tiny_hgr8.dsk
|
||||||
|
|
||||||
|
tiny_hgr8.dsk: HELLO TINY_HGR
|
||||||
|
cp $(EMPTYDISK) tiny_hgr8.dsk
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk SAVE A HELLO
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk BSAVE -a 0xB8 TINY_HGR
|
||||||
|
###
|
||||||
|
|
||||||
|
submit: tiny_hgr8.zip
|
||||||
|
|
||||||
|
tiny_hgr8.zip: TINY_HGR tiny_hgr.s file_id.diz tiny_hgr8.dsk
|
||||||
|
mkdir -p lovebyte2023_tiny_hgr8
|
||||||
|
cp TINY_HGR ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr.s ./lovebyte2023_tiny_hgr8
|
||||||
|
cp file_id.diz ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr8.dsk ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr8_720p.mp4 ./lovebyte2023_tiny_hgr8
|
||||||
|
zip -r tiny_hgr8.zip lovebyte2023_tiny_hgr8
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
HELLO: hello.bas
|
||||||
|
$(TOKENIZE) < hello.bas > HELLO
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
TINY_HGR: tiny_hgr.o
|
||||||
|
ld65 -o TINY_HGR tiny_hgr.o -C ./apple2_b8.inc
|
||||||
|
|
||||||
|
tiny_hgr.o: tiny_hgr.s
|
||||||
|
ca65 -o tiny_hgr.o tiny_hgr.s -l tiny_hgr.lst
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.o *.lst HELLO TINY_HGR TINY_HGR2 TINY_HGR3 *.zip
|
12
demos/lovebyte2023/tinyhgr_8/apple2_b8.inc
Normal file
12
demos/lovebyte2023/tinyhgr_8/apple2_b8.inc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $b8, size = $8E00, file = %O;
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS {
|
||||||
|
CODE: load = RAM, type = ro;
|
||||||
|
RODATA: load = RAM, type = ro;
|
||||||
|
DATA: load = RAM, type = rw;
|
||||||
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
}
|
11
demos/lovebyte2023/tinyhgr_8/file_id.diz
Normal file
11
demos/lovebyte2023/tinyhgr_8/file_id.diz
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
Tiny HGR 8
|
||||||
|
---------------------------------------
|
||||||
|
8-byte Hi-res Intro for Apple II
|
||||||
|
Lovebyte 2023
|
||||||
|
by Deater / dSr
|
||||||
|
|
||||||
|
Needs Applesoft in ROM (most Apple IIs
|
||||||
|
meet this)
|
||||||
|
|
||||||
|
Loads code into middle of CHRGET routine
|
9
demos/lovebyte2023/tinyhgr_8/hello.bas
Normal file
9
demos/lovebyte2023/tinyhgr_8/hello.bas
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
5 HOME
|
||||||
|
10 PRINT " TINY HGR -- AN 8 BYTE APPLE II INTRO"
|
||||||
|
15 PRINT " BY DEATER / DSR"
|
||||||
|
20 PRINT CHR$(4)"CATALOG"
|
||||||
|
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN TINY_HGR'"
|
||||||
|
30 GET A$
|
||||||
|
35 PRINT
|
||||||
|
40 PRINT "]BRUN TINY_HGR"
|
||||||
|
50 PRINT CHR$(4)"BRUN TINY_HGR"
|
4
demos/lovebyte2023/tinyhgr_8/monitor.txt
Normal file
4
demos/lovebyte2023/tinyhgr_8/monitor.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
CALL -151
|
||||||
|
B8: 2c ea 20 f4 f3 20 d8 f3
|
||||||
|
B8G
|
||||||
|
|
58
demos/lovebyte2023/tinyhgr_8/tiny_hgr.s
Normal file
58
demos/lovebyte2023/tinyhgr_8/tiny_hgr.s
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
; Tiny HGr
|
||||||
|
|
||||||
|
; 8-byte Apple II Hi-res intro
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver, vince@deater.net --- d e s i r e ---
|
||||||
|
|
||||||
|
; drops into the middle of the CHRGET get next token routine
|
||||||
|
; that the Applesoft interpreter copies to $B1 - $C8 on boot
|
||||||
|
|
||||||
|
; Depends on $F3 being executed as a NOP
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
BKGND0 = $F3F4 ; A is color, after A=$40/$60, Y=0
|
||||||
|
; $E6 needs to be $20/$40
|
||||||
|
; alternately can jump slightly further
|
||||||
|
; and have $1B be $20/$40
|
||||||
|
|
||||||
|
tiny_hgr:
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800 txtprtrl/txtptrh
|
||||||
|
; BA: C9 3A cmp #$3A
|
||||||
|
; BC: B0 0A bcs end
|
||||||
|
; BE: C9 20 cmp #$20
|
||||||
|
; C0: F0 EF beq chrget
|
||||||
|
; C2: 38 sec
|
||||||
|
; C3: E9 30 sbc #$30
|
||||||
|
; C5: 38 sec
|
||||||
|
; C6: E9 D0 sbc #$D0
|
||||||
|
; C8: 60 rts
|
||||||
|
|
||||||
|
|
||||||
|
; we drop this at B8
|
||||||
|
|
||||||
|
|
||||||
|
tiny_loop:
|
||||||
|
.byte $2c ; BIT ; skips the BKGND0 first time through
|
||||||
|
; otherwise it rights garbage all over
|
||||||
|
; first 8k of RAM due to HGR_PAGE
|
||||||
|
; not being set
|
||||||
|
|
||||||
|
nop ; $EA ; points to ROM $EA2C as base for random colors
|
||||||
|
|
||||||
|
jsr BKGND0 ; clear screen to value in A
|
||||||
|
; $20 $F3 $F4, depends on f3/f4 being nops
|
||||||
|
; first time through the loop
|
||||||
|
|
||||||
|
jsr HGR2 ; HGR2 -- init full-screen hi-res graphics
|
||||||
|
; zero flag set
|
||||||
|
|
||||||
|
; code already in RAM does a BEQ
|
77
graphics/hgr/tinyhgr/Makefile
Normal file
77
graphics/hgr/tinyhgr/Makefile
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
include ../../../Makefile.inc
|
||||||
|
|
||||||
|
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||||
|
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||||
|
|
||||||
|
all: tiny_hgr8.dsk
|
||||||
|
|
||||||
|
tiny_hgr8.dsk: HELLO TINY_HGR TINY_HGR2 TINY_HGR3 TINY_BLINDS
|
||||||
|
cp $(EMPTYDISK) tiny_hgr8.dsk
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk SAVE A HELLO
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk BSAVE -a 0xB9 TINY_HGR
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk BSAVE -a 0xB9 TINY_HGR2
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk BSAVE -a 0xB9 TINY_BLINDS
|
||||||
|
$(DOS33) -y tiny_hgr8.dsk BSAVE -a 0xB8 TINY_HGR3
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
submit: tiny_hgr8.zip
|
||||||
|
|
||||||
|
tiny_hgr8.zip: TINY_HGR tiny_hgr.s file_id.diz tiny_hgr8.dsk
|
||||||
|
mkdir -p lovebyte2023_tiny_hgr8
|
||||||
|
cp TINY_HGR ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr.s ./lovebyte2023_tiny_hgr8
|
||||||
|
cp file_id.diz ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr8.dsk ./lovebyte2023_tiny_hgr8
|
||||||
|
cp tiny_hgr8_720p.mp4 ./lovebyte2023_tiny_hgr8
|
||||||
|
zip -r tiny_hgr8.zip lovebyte2023_tiny_hgr8
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
HELLO: hello.bas
|
||||||
|
$(TOKENIZE) < hello.bas > HELLO
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
TINY_HGR: tiny_hgr.o
|
||||||
|
ld65 -o TINY_HGR tiny_hgr.o -C ./apple2_b9.inc
|
||||||
|
|
||||||
|
tiny_hgr.o: tiny_hgr.s
|
||||||
|
ca65 -o tiny_hgr.o tiny_hgr.s -l tiny_hgr.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
TINY_HGR2: tiny_hgr2.o
|
||||||
|
ld65 -o TINY_HGR2 tiny_hgr2.o -C ./apple2_b9.inc
|
||||||
|
|
||||||
|
tiny_hgr2.o: tiny_hgr2.s
|
||||||
|
ca65 -o tiny_hgr2.o tiny_hgr2.s -l tiny_hgr2.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
TINY_BLINDS: tiny_blinds.o
|
||||||
|
ld65 -o TINY_BLINDS tiny_blinds.o -C ./apple2_b9.inc
|
||||||
|
|
||||||
|
tiny_blinds.o: tiny_blinds.s
|
||||||
|
ca65 -o tiny_blinds.o tiny_blinds.s -l tiny_blinds.lst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
TINY_HGR3: tiny_hgr3.o
|
||||||
|
ld65 -o TINY_HGR3 tiny_hgr3.o -C ./apple2_b8.inc
|
||||||
|
|
||||||
|
tiny_hgr3.o: tiny_hgr3.s
|
||||||
|
ca65 -o tiny_hgr3.o tiny_hgr3.s -l tiny_hgr3.lst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.o *.lst HELLO TINY_HGR TINY_HGR2 TINY_HGR3 TINY_BLINDS *.zip
|
12
graphics/hgr/tinyhgr/apple2_b8.inc
Normal file
12
graphics/hgr/tinyhgr/apple2_b8.inc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $b8, size = $8E00, file = %O;
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS {
|
||||||
|
CODE: load = RAM, type = ro;
|
||||||
|
RODATA: load = RAM, type = ro;
|
||||||
|
DATA: load = RAM, type = rw;
|
||||||
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
}
|
12
graphics/hgr/tinyhgr/apple2_b9.inc
Normal file
12
graphics/hgr/tinyhgr/apple2_b9.inc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $b9, size = $8E00, file = %O;
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS {
|
||||||
|
CODE: load = RAM, type = ro;
|
||||||
|
RODATA: load = RAM, type = ro;
|
||||||
|
DATA: load = RAM, type = rw;
|
||||||
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
}
|
9
graphics/hgr/tinyhgr/hello.bas
Normal file
9
graphics/hgr/tinyhgr/hello.bas
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
5 HOME
|
||||||
|
10 PRINT " TINY GR -- AN 8 BYTE APPLE II INTRO"
|
||||||
|
15 PRINT " BY DEATER / DSR"
|
||||||
|
20 PRINT CHR$(4)"CATALOG"
|
||||||
|
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN TINY_GR'"
|
||||||
|
30 GET A$
|
||||||
|
35 PRINT
|
||||||
|
40 PRINT "]BRUN TINY_GR"
|
||||||
|
50 PRINT CHR$(4)"BRUN TINY_GR"
|
80
graphics/hgr/tinyhgr/tiny_blinds.s
Normal file
80
graphics/hgr/tinyhgr/tiny_blinds.s
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
; Tiny Gr
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver, vince@deater.net --- d e s i r e ---
|
||||||
|
|
||||||
|
; trying to make small graphics in 8 bytes for Apple II
|
||||||
|
|
||||||
|
; drops into the middle of the CHRGET get next token routine
|
||||||
|
; that the Applesoft interpreter copies to $B1 - $C8 on boot
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
SETGR = $FB40 ; set lo-res graphics code, clear screen
|
||||||
|
PRHEX = $FDE3 ; print hex digit
|
||||||
|
COUT = $FDED ; output A to screen
|
||||||
|
COUT1 = $FDF0 ; output A to screen
|
||||||
|
|
||||||
|
tiny_gr:
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800 txtprtrl/txtptrh
|
||||||
|
; BA: C9 3A cmp #$3A
|
||||||
|
; BC: B0 0A bcs end
|
||||||
|
; BE: C9 20 cmp #$20
|
||||||
|
; C0: F0 EF beq chrget
|
||||||
|
; C2: 38 sec
|
||||||
|
; C3: E9 30 sbc #$30
|
||||||
|
; C5: 38 sec
|
||||||
|
; C6: E9 D0 sbc #$D0
|
||||||
|
; C8: 60 rts
|
||||||
|
|
||||||
|
; we drop this at B9
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800
|
||||||
|
|
||||||
|
|
||||||
|
.if 0
|
||||||
|
tiny_loop:
|
||||||
|
; lda $7800
|
||||||
|
.byte $78 ; sei ; B9
|
||||||
|
bit $C050 ; BA BB BC set LORES
|
||||||
|
jsr COUT1 ; BD BE BF output A to stdout, with scroll
|
||||||
|
.byte $50 ; bvc (bra we hope) ; C0
|
||||||
|
; chrget
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
BKGND0 = $F3F4 ; A is color, after A=$40/$60, Y=0
|
||||||
|
; $E6 needs to be $20/$40
|
||||||
|
; alternately can jump slightly further
|
||||||
|
; and have $1B be $20/$40
|
||||||
|
.pc02
|
||||||
|
|
||||||
|
tiny_loop:
|
||||||
|
;nop
|
||||||
|
.byte $2c
|
||||||
|
|
||||||
|
jsr BKGND0 ; 6
|
||||||
|
|
||||||
|
jsr HGR2 ; HGR2 ; 3
|
||||||
|
.byte $F0 ; original
|
||||||
|
|
||||||
|
; jsr HPOSN ; 3
|
||||||
|
; plx
|
||||||
|
; ply
|
||||||
|
|
||||||
|
;tinier_loop:
|
||||||
|
; jsr XDRAW0 ; 3
|
||||||
|
; ply
|
||||||
|
;.byte $50
|
||||||
|
; jmp tiny_loop
|
||||||
|
; bvc tinier_loop
|
70
graphics/hgr/tinyhgr/tiny_hgr.s
Normal file
70
graphics/hgr/tinyhgr/tiny_hgr.s
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
; Tiny Gr
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver, vince@deater.net --- d e s i r e ---
|
||||||
|
|
||||||
|
; trying to make small graphics in 8 bytes for Apple II
|
||||||
|
|
||||||
|
; drops into the middle of the CHRGET get next token routine
|
||||||
|
; that the Applesoft interpreter copies to $B1 - $C8 on boot
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
SETGR = $FB40 ; set lo-res graphics code, clear screen
|
||||||
|
PRHEX = $FDE3 ; print hex digit
|
||||||
|
COUT = $FDED ; output A to screen
|
||||||
|
COUT1 = $FDF0 ; output A to screen
|
||||||
|
|
||||||
|
tiny_gr:
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800 txtprtrl/txtptrh
|
||||||
|
; BA: C9 3A cmp #$3A
|
||||||
|
; BC: B0 0A bcs end
|
||||||
|
; BE: C9 20 cmp #$20
|
||||||
|
; C0: F0 EF beq chrget
|
||||||
|
; C2: 38 sec
|
||||||
|
; C3: E9 30 sbc #$30
|
||||||
|
; C5: 38 sec
|
||||||
|
; C6: E9 D0 sbc #$D0
|
||||||
|
; C8: 60 rts
|
||||||
|
|
||||||
|
; we drop this at B9
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800
|
||||||
|
|
||||||
|
|
||||||
|
.if 0
|
||||||
|
tiny_loop:
|
||||||
|
; lda $7800
|
||||||
|
.byte $78 ; sei ; B9
|
||||||
|
bit $C050 ; BA BB BC set LORES
|
||||||
|
jsr COUT1 ; BD BE BF output A to stdout, with scroll
|
||||||
|
.byte $50 ; bvc (bra we hope) ; C0
|
||||||
|
; chrget
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
|
||||||
|
.pc02
|
||||||
|
|
||||||
|
tiny_loop:
|
||||||
|
jsr HGR2 ; HGR2 ; 3
|
||||||
|
|
||||||
|
; jsr HPOSN ; 3
|
||||||
|
; plx
|
||||||
|
; ply
|
||||||
|
|
||||||
|
jsr XDRAW0 ; 3
|
||||||
|
nop
|
||||||
|
.byte $50
|
||||||
|
; jmp tiny_loop
|
||||||
|
|
70
graphics/hgr/tinyhgr/tiny_hgr2.s
Normal file
70
graphics/hgr/tinyhgr/tiny_hgr2.s
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
; Tiny Gr
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver, vince@deater.net --- d e s i r e ---
|
||||||
|
|
||||||
|
; trying to make small graphics in 8 bytes for Apple II
|
||||||
|
|
||||||
|
; drops into the middle of the CHRGET get next token routine
|
||||||
|
; that the Applesoft interpreter copies to $B1 - $C8 on boot
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
SETGR = $FB40 ; set lo-res graphics code, clear screen
|
||||||
|
PRHEX = $FDE3 ; print hex digit
|
||||||
|
COUT = $FDED ; output A to screen
|
||||||
|
COUT1 = $FDF0 ; output A to screen
|
||||||
|
|
||||||
|
tiny_gr:
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800 txtprtrl/txtptrh
|
||||||
|
; BA: C9 3A cmp #$3A
|
||||||
|
; BC: B0 0A bcs end
|
||||||
|
; BE: C9 20 cmp #$20
|
||||||
|
; C0: F0 EF beq chrget
|
||||||
|
; C2: 38 sec
|
||||||
|
; C3: E9 30 sbc #$30
|
||||||
|
; C5: 38 sec
|
||||||
|
; C6: E9 D0 sbc #$D0
|
||||||
|
; C8: 60 rts
|
||||||
|
|
||||||
|
; we drop this at B9
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800
|
||||||
|
|
||||||
|
|
||||||
|
.if 0
|
||||||
|
tiny_loop:
|
||||||
|
; lda $7800
|
||||||
|
.byte $78 ; sei ; B9
|
||||||
|
bit $C050 ; BA BB BC set LORES
|
||||||
|
jsr COUT1 ; BD BE BF output A to stdout, with scroll
|
||||||
|
.byte $50 ; bvc (bra we hope) ; C0
|
||||||
|
; chrget
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
|
||||||
|
.pc02
|
||||||
|
|
||||||
|
tiny_loop:
|
||||||
|
jsr HGR2 ; HGR2 ; 3
|
||||||
|
|
||||||
|
; jsr HPOSN ; 3
|
||||||
|
; plx
|
||||||
|
; ply
|
||||||
|
|
||||||
|
jsr XDRAW0 ; 3
|
||||||
|
plx
|
||||||
|
.byte $50
|
||||||
|
; jmp tiny_loop
|
||||||
|
|
58
graphics/hgr/tinyhgr/tiny_hgr3.s
Normal file
58
graphics/hgr/tinyhgr/tiny_hgr3.s
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
; Tiny HGr
|
||||||
|
|
||||||
|
; 8-byte Apple II Hi-res intro
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver, vince@deater.net --- d e s i r e ---
|
||||||
|
|
||||||
|
; drops into the middle of the CHRGET get next token routine
|
||||||
|
; that the Applesoft interpreter copies to $B1 - $C8 on boot
|
||||||
|
|
||||||
|
; Depends on $F3 being executed as a NOP
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
BKGND0 = $F3F4 ; A is color, after A=$40/$60, Y=0
|
||||||
|
; $E6 needs to be $20/$40
|
||||||
|
; alternately can jump slightly further
|
||||||
|
; and have $1B be $20/$40
|
||||||
|
|
||||||
|
tiny_hgr:
|
||||||
|
|
||||||
|
;chrget B1: E6 B8 inc txtptrl
|
||||||
|
; B3: D0 02 bne chrgot
|
||||||
|
; B5: E6 B9 inc txtptrh
|
||||||
|
;chrgot B7: AD 00 08 lda $800 txtprtrl/txtptrh
|
||||||
|
; BA: C9 3A cmp #$3A
|
||||||
|
; BC: B0 0A bcs end
|
||||||
|
; BE: C9 20 cmp #$20
|
||||||
|
; C0: F0 EF beq chrget
|
||||||
|
; C2: 38 sec
|
||||||
|
; C3: E9 30 sbc #$30
|
||||||
|
; C5: 38 sec
|
||||||
|
; C6: E9 D0 sbc #$D0
|
||||||
|
; C8: 60 rts
|
||||||
|
|
||||||
|
|
||||||
|
; we drop this at B8
|
||||||
|
|
||||||
|
|
||||||
|
tiny_loop:
|
||||||
|
.byte $2c ; BIT ; skips the BKGND0 first time through
|
||||||
|
; otherwise it rights garbage all over
|
||||||
|
; first 8k of RAM due to HGR_PAGE
|
||||||
|
; not being set
|
||||||
|
|
||||||
|
nop ; $EA ; points to ROM $EA2C as base for random colors
|
||||||
|
|
||||||
|
jsr BKGND0 ; clear screen to value in A
|
||||||
|
; $20 $F3 $F4, depends on f3/f4 being nops
|
||||||
|
; first time through the loop
|
||||||
|
|
||||||
|
jsr HGR2 ; HGR2 -- init full-screen hi-res graphics
|
||||||
|
; zero flag set
|
||||||
|
|
||||||
|
; code already in RAM does a BEQ
|
Loading…
Reference in New Issue
Block a user