diff --git a/linker_scripts/apple2_1700.inc b/linker_scripts/apple2_1700.inc new file mode 100644 index 00000000..04ca6098 --- /dev/null +++ b/linker_scripts/apple2_1700.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $1700, size = $A900, 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/ootw/Makefile b/ootw/Makefile index 2fd30271..3085b813 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -10,16 +10,16 @@ all: ootw.dsk ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2 COMPRESS-TEST $(DOS33) -y ootw.dsk SAVE A HELLO $(DOS33) -y ootw.dsk BSAVE -a 0x1400 LOADER - $(DOS33) -y ootw.dsk BSAVE -a 0x1800 INTRO - $(DOS33) -y ootw.dsk BSAVE -a 0x1800 OOTW - $(DOS33) -y ootw.dsk BSAVE -a 0x1800 OOTW_C2 + $(DOS33) -y ootw.dsk BSAVE -a 0x1700 INTRO + $(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW + $(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW_C2 $(DOS33) -y ootw.dsk BSAVE -a 0x2000 COMPRESS-TEST #### OOTW: ootw.o - ld65 -o OOTW ootw.o -C ../linker_scripts/apple2_1800.inc + ld65 -o OOTW ootw.o -C ../linker_scripts/apple2_1700.inc ootw.o: ootw.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ @@ -38,7 +38,7 @@ ootw.o: ootw.s \ #### OOTW_C2: ootw_c2.o - ld65 -o OOTW_C2 ootw_c2.o -C ../linker_scripts/apple2_1800.inc + ld65 -o OOTW_C2 ootw_c2.o -C ../linker_scripts/apple2_1700.inc ootw_c2.o: ootw_c2.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ @@ -52,7 +52,7 @@ ootw_c2.o: ootw_c2.s \ #### INTRO: intro.o - ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1800.inc + ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700.inc intro.o: intro.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ diff --git a/ootw/README b/ootw/README index 3d5fdf3d..7cef4cce 100644 --- a/ootw/README +++ b/ootw/README @@ -28,8 +28,8 @@ Memory map: 08-0b GR page1 0c-0f offscreen data ($c00 = disk load buffer) 10-13 offscreen data2 - 14-17 loader - 18-bf program/data (42k) + 14-16 loader + 17-bf program/data (42.25k) c0-cf I/O d0-ff ROM @@ -44,3 +44,5 @@ Memory squeeze! 5,469 over allow changing bg on fly in sequence 4,122 over modify cyan frames to be on fly 2,749 over do same for zappo routines + 2,493 over squish disk loader vars to page 3 + diff --git a/ootw/loader.s b/ootw/loader.s index 6956f92a..7e4a3e0a 100644 --- a/ootw/loader.s +++ b/ootw/loader.s @@ -3,7 +3,9 @@ ; the BASIC program sets $05 with which thing to load - +nibtbl = $300 ; nothing uses the bottom 128 bytes of $300, do they? +bit2tbl = $380 ; bit2tbl: .res 86 ; = nibtbl+128 +filbuf = $3D6 ; filbuf: .res 4 ; = bit2tbl+86 ; read any file slot 6 version ; based on FASTLD6 and RTS copyright (c) Peter Ferrie 2011-2013,2018 @@ -84,7 +86,7 @@ load_done: jsr opendir ; open and read entire file into memory - jsr $1800 ; jump to common entry point + jsr $1700 ; jump to common entry point ; hope they updated the WHICH_LOAD value @@ -748,7 +750,7 @@ sectbl: .byte $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f ; From $BA96 of DOS33 -nibtbl: .res 128 ; = * +;nibtbl: .res 128 ; = * ; .byte $00,$01,$98,$99,$02,$03,$9C,$04 ; $BA96 ; 00 ; .byte $05,$06,$A0,$A1,$A2,$A4,$A4,$A5 ; $BA9E ; 08 ; .byte $07,$08,$A8,$A9,$AA,$09,$0A,$0B ; $BAA6 ; 10 @@ -767,7 +769,7 @@ nibtbl: .res 128 ; = * ; .byte $00,$00,$00,$00,$00,$00,$00,$00 -bit2tbl: .res 86 ; = nibtbl+128 -filbuf: .res 4 ; = bit2tbl+86 +;bit2tbl: .res 86 ; = nibtbl+128 +;filbuf: .res 4 ; = bit2tbl+86 ;dataend = filbuf+4