From 119576fe79d82efc45178bf18ce8c3565d0330aa Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 4 Jun 2018 21:43:36 -0400 Subject: [PATCH] sa: update ending --- linker_scripts/apple2_1c00.inc | 12 ++++++++++++ still_alive/Makefile | 4 ++-- still_alive/ending.s | 28 ++++++++++++++++------------ 3 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 linker_scripts/apple2_1c00.inc diff --git a/linker_scripts/apple2_1c00.inc b/linker_scripts/apple2_1c00.inc new file mode 100644 index 00000000..b4738d2d --- /dev/null +++ b/linker_scripts/apple2_1c00.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $1C00, size = $7E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro, align=$100; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/still_alive/Makefile b/still_alive/Makefile index a4b81961..0f5adb47 100644 --- a/still_alive/Makefile +++ b/still_alive/Makefile @@ -7,7 +7,7 @@ all: still_alive.dsk still_alive.dsk: STILL_ALIVE TITLE.BAS ENDING $(DOS33) -y still_alive.dsk BSAVE -a 0x0C00 STILL_ALIVE - $(DOS33) -y still_alive.dsk BSAVE -a 0x2000 ENDING + $(DOS33) -y still_alive.dsk BSAVE -a 0x1C00 ENDING $(DOS33) -y still_alive.dsk SAVE A TITLE.BAS # $(DOS33) -y still_alive.dsk SAVE B GLADOS.HGR @@ -25,7 +25,7 @@ still_alive.o: still_alive.s \ ca65 -o still_alive.o still_alive.s -l still_alive.lst ENDING: ending.o - ld65 -o ENDING ending.o -C ../linker_scripts/apple2_2000.inc + ld65 -o ENDING ending.o -C ../linker_scripts/apple2_1c00.inc ending.o: ending.s \ GLADOS.HGR diff --git a/still_alive/ending.s b/still_alive/ending.s index 12c2c803..f362d438 100644 --- a/still_alive/ending.s +++ b/still_alive/ending.s @@ -23,6 +23,7 @@ X1 EQU $FD X2 EQU $FE Y1 EQU $FF +HGR EQU $F3E2 HCLR EQU $F3F2 HPOSN EQU $F411 HPLOT0 EQU $F457 @@ -30,21 +31,26 @@ HGLIN EQU $F53A XDRAW1 EQU $F661 COLORTBL EQU $F6F6 + +ending: + ;========================== ; Setup Graphics ;========================== - bit SET_GR ; graphics mode - bit HIRES ; hires mode - bit TEXTGR ; mixed text/graphics - bit PAGE0 ; first graphics page +; We can't use HGR as it clears the screen +; jsr HGR + jsr HOME - bit PAGE1 ; first graphics page - lda #$40 + bit PAGE0 ; first graphics page + lda #$20 sta HGR_PAGE + bit TEXTGR ; mixed text/graphics + bit HIRES ; hires mode + bit SET_GR ; graphics mode + -; jsr HCLR lda #0 sta HGR_ROTATION @@ -52,8 +58,6 @@ COLORTBL EQU $F6F6 sta HGR_SCALE -; jsr hgr_clear - ;====================== ; Draw Chell ;====================== @@ -247,8 +251,8 @@ loop4: sbc #5 sta Y1 - cmp #5 - bcs loop4 + cmp #$ff + bne loop4 infinite_loop: jmp infinite_loop @@ -262,7 +266,7 @@ infinite_loop: ; Shape Table .include "objects_shape.inc" -.align 8192 +.align $400 ; Graphics Background .incbin "GLADOS.HGR",4