demo: rename and optimize

This commit is contained in:
Vince Weaver 2022-11-13 01:07:13 -05:00
parent 485822d8d8
commit 123d684970
8 changed files with 60 additions and 52 deletions

View File

@ -6,14 +6,14 @@ EMPTYDISK = ../../empty_disk/empty.dsk
PICTUREDSK = ~/research/picturedsk.git/picturedsk PICTUREDSK = ~/research/picturedsk.git/picturedsk
LINKER_SCRIPTS = ../../linker_scripts/ LINKER_SCRIPTS = ../../linker_scripts/
all: hgr_escape.dsk all: apple_desire.dsk
### ###
hgr_escape.dsk: HELLO ESCAPE apple_desire.dsk: HELLO APPLE_DESIRE
cp $(EMPTYDISK) hgr_escape.dsk cp $(EMPTYDISK) apple_desire.dsk
$(DOS33) -y hgr_escape.dsk SAVE A HELLO $(DOS33) -y apple_desire.dsk SAVE A HELLO
$(DOS33) -y hgr_escape.dsk BSAVE -a 0xc00 ESCAPE $(DOS33) -y apple_desire.dsk BSAVE -a 0xc00 APPLE_DESIRE
### ###
@ -21,31 +21,31 @@ HELLO: hello.bas
$(TOKENIZE) < hello.bas > HELLO $(TOKENIZE) < hello.bas > HELLO
#submit: escape512.zip #submit: apple_desire512.zip
#escape512.zip: ESCAPE escape.s file_id.diz escape_512.dsk #apple_desire512.zip: APPLE_DESIRE apple_desire.s file_id.diz apple_desire_512.dsk
# mkdir -p lovebyte2021_escape_512 # mkdir -p lovebyte2021_apple_desire_512
# cp ESCAPE ./lovebyte2021_escape_512 # cp APPLE_DESIRE ./lovebyte2021_apple_desire_512
# cp *.s ./lovebyte2021_escape_512 # cp *.s ./lovebyte2021_apple_desire_512
# cp file_id.diz ./lovebyte2021_escape_512 # cp file_id.diz ./lovebyte2021_apple_desire_512
# cp escape_512.dsk ./lovebyte2021_escape_512 # cp apple_desire_512.dsk ./lovebyte2021_apple_desire_512
# cp escape_512.woz ./lovebyte2021_escape_512 # cp apple_desire_512.woz ./lovebyte2021_apple_desire_512
# cp escape_720p.mp4 ./lovebyte2021_escape_512 # cp apple_desire_720p.mp4 ./lovebyte2021_apple_desire_512
# cp desire2.png ./lovebyte2021_escape_512 # cp desire2.png ./lovebyte2021_apple_desire_512
# zip -r escape512.zip lovebyte2021_escape_512 # zip -r apple_desire512.zip lovebyte2021_apple_desire_512
#### ####
ESCAPE: escape.o APPLE_DESIRE: apple_desire.o
ld65 -o ESCAPE escape.o -C $(LINKER_SCRIPTS)/apple2_c00.inc ld65 -o APPLE_DESIRE apple_desire.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
escape.o: escape.s \ apple_desire.o: apple_desire.s \
logo_intro.s zp.inc \ logo_intro.s zp.inc \
ay3_write_regs.s escape.s interrupt_handler.s \ ay3_write_regs.s apple_desire.s interrupt_handler.s \
play_frame.s draw_letter.s freq.s freq_h.s bamps.s \ play_frame.s draw_letter.s freq.s freq_h.s bamps.s \
apple_logo.s \ apple_logo.s \
mA2E_4.s mockingboard_constants.s mockingboard_init.s tracker_init.s mA2E_4.s mockingboard_constants.s mockingboard_init.s tracker_init.s
ca65 -o escape.o escape.s -l escape.lst ca65 -o apple_desire.o apple_desire.s -l apple_desire.lst
#### ####
@ -58,5 +58,5 @@ make_points.o: make_points.c
#### ####
clean: clean:
rm -f *~ *.o *.lst ESCAPE *.zip make_points rm -f *~ *.o *.lst APPLE_DESIRE *.zip make_points

View File

@ -10,13 +10,12 @@ draw_apple:
sta HGR_SCALE sta HGR_SCALE
ldy #0 ldy #0
ldx #70 ldx #60
lda #60 txa
; lda #60
jsr HPOSN ; set screen position to X= (y,x) Y=(a) jsr HPOSN ; set screen position to X= (y,x) Y=(a)
ldx #<apple_table ; point to bottom byte of shape address ldx #<apple_table ; point to bottom byte of shape address
ldy #>apple_table ; point to top byte of shape address ldy #>apple_table ; point to top byte of shape address

View File

@ -4,7 +4,9 @@
; X has color ; X has color
draw_logo: draw_logo:
jsr HCOLOR1 pha
jsr HCOLOR1 ; set color to X
ldx #5 ; draw 5 letters ldx #5 ; draw 5 letters
letter_time: letter_time:
@ -26,7 +28,9 @@ letter_time:
dex dex
bpl letter_time bpl letter_time
rts
pla
jmp draw_apple
@ -42,6 +46,10 @@ letter_time:
draw_letter: draw_letter:
sty LETTER_X ; store X-coord sty LETTER_X ; store X-coord
lda LETTER_Y ; alternate up/down
eor #$8
sta LETTER_Y
ldy #$FF ; iterator ldy #$FF ; iterator
letter_loop: letter_loop:

View File

@ -1,9 +1,9 @@
5 HOME 5 HOME
10 PRINT " HGR ESCAPE -- A 1K BYTE APPLE II INTRO" 10 PRINT "APPLE_DESIRE -- A 1K BYTE APPLE II INTRO"
15 PRINT " BY DEATER / DSR" 15 PRINT " BY DEATER & MA2E / DSR"
20 PRINT CHR$(4)"CATALOG" 20 PRINT CHR$(4)"CATALOG"
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN ESCAPE'" 25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN APPLE_DESIRE'"
30 GET A$ 30 GET A$
35 PRINT 35 PRINT
40 PRINT CHR$(4)"BRUN ESCAPE" 40 PRINT CHR$(4)"BRUN APPLE_DESIRE"

View File

@ -20,7 +20,7 @@
interrupt_handler: interrupt_handler:
php ; save status flags php ; save status flags
cld ; clear decimal mode cld ; clear decimal mode
pha ; save A ; 3 ; pha ; save A ; 3
; A is saved in $45 by firmware ; A is saved in $45 by firmware
txa txa
pha ; save X pha ; save X
@ -47,7 +47,7 @@ done_ay3_irq_handler:
tay ; restore Y tay ; restore Y
pla pla
tax ; restore X tax ; restore X
pla ; restore a ; 4 ; pla ; restore a ; 4
; on II+/IIe (but not IIc) we need to do this? ; on II+/IIe (but not IIc) we need to do this?
interrupt_smc: interrupt_smc:

View File

@ -11,20 +11,20 @@
show_logo: show_logo:
; 101 0000
lda #80 lda #80
sta LETTER_Y sta LETTER_Y
ldx #$7 ; color white ldx #$7 ; color white
lda #1 ; apple rotation
jsr draw_logo jsr draw_logo
lda #1
jsr draw_apple
lda #$20 lda #$20 ; switch HGR draw page
sta HGR_PAGE sta HGR_PAGE
lda #72 lda #88
sta LETTER_Y sta LETTER_Y
ldx #$0 ; color black ldx #$0 ; color black
lda #63 ; apple rotation
jsr draw_logo jsr draw_logo
lda #63
jsr draw_apple

View File

@ -85,19 +85,8 @@ mockingboard_init:
; NOTE: we don't support IIc as it's a hack ; NOTE: we don't support IIc as it's a hack
; traditionally Mockingboard on IIc was rare ; traditionally Mockingboard on IIc was rare
;========================
; set up interrupt
; Vector address goes to 0x3fe/0x3ff
; can save 10 bytes if we load in memory so this
; is in the right place automatically
lda #<interrupt_handler ; 2
sta $03fe ; 3
lda #>interrupt_handler ; 2
sta $03ff ; 3
;=========
; 10
;========================= ;=========================
; Initialize the 6522s ; Initialize the 6522s
; Reset Left AY-3-8910 ; Reset Left AY-3-8910
@ -108,7 +97,7 @@ mockingboard_init:
; assume Y=0 on entry? ; assume Y=0 on entry?
ldy #0 ; 2 ; ldy #0 ; 2
init_it_loop: init_it_loop:
lda init_values,Y ; 3 lda init_values,Y ; 3
ldx init_addresses,Y ; 3 ldx init_addresses,Y ; 3
@ -117,3 +106,15 @@ init_it_loop:
sta $c400,X ; 3 sta $c400,X ; 3
bne init_it_loop ; 2 bne init_it_loop ; 2
doneit: doneit:
;========================
; set up interrupt
; Vector address goes to 0x3fe/0x3ff
lda #<interrupt_handler ; 2
sta $03fe ; 3
lda #>interrupt_handler ; 2
sta $03ff ; 3
;=========
; 10