diff --git a/linker_scripts/apple2_1700_8000.inc b/linker_scripts/apple2_1700_8000.inc new file mode 100644 index 00000000..7ccf05a4 --- /dev/null +++ b/linker_scripts/apple2_1700_8000.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $1700, size = $6900, 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/linker_scripts/apple2_8000.inc b/linker_scripts/apple2_8000.inc new file mode 100644 index 00000000..f644ca27 --- /dev/null +++ b/linker_scripts/apple2_8000.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $8000, size = $4000, 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 15f329c1..8acc09cf 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -59,7 +59,7 @@ ootw_c2.o: ootw_c2.s \ #### INTRO: intro.o - ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700.inc + ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700_8000.inc intro.o: intro.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ @@ -103,7 +103,7 @@ intro_data_01.lz4: intro_data_01 truncate -s-8 intro_data_01.lz4 intro_data_01: intro_data_01.o - ld65 -o intro_data_01 intro_data_01.o -C ../linker_scripts/apple2_9000.inc + ld65 -o intro_data_01 intro_data_01.o -C ../linker_scripts/apple2_8000.inc intro_data_01.o: intro_data_01.s ca65 -o intro_data_01.o intro_data_01.s -l intro_data_01.lst @@ -114,7 +114,7 @@ intro_data_04.lz4: intro_data_04 truncate -s-8 intro_data_04.lz4 intro_data_04: intro_data_04.o - ld65 -o intro_data_04 intro_data_04.o -C ../linker_scripts/apple2_9000.inc + ld65 -o intro_data_04 intro_data_04.o -C ../linker_scripts/apple2_8000.inc intro_data_04.o: intro_data_04.s ca65 -o intro_data_04.o intro_data_04.s -l intro_data_04.lst diff --git a/ootw/README b/ootw/README index 361851dd..0570ee5f 100644 --- a/ootw/README +++ b/ootw/README @@ -66,18 +66,18 @@ Memory squeeze! Let's take a 10k region of memory = $3000 - $C000 - $3000 = starting at $9000 + $C000 - $4000 = starting at $8000 ID1 = 1461 2143\ -ID2 = 1759 2687| -ID3 = 1195 1879/ -ID4 = 2514 8280 | -ID5 = 1947 3492\ -ID6 = 2584 3610| +ID2 = 1759 2687|--- togeter in 01 +ID3 = 1195 1879/ +ID4 = 2514 8280\--- in 04 +ID5 = 1947 3492/ +ID6 = 2584 3610\ --- in 06 ID7 = 2834 3606/ -ID8 = 3705 4918 | -ID9 = 4494 5901\ +ID8 = 3705 4918 | -- in 08 +ID9 = 4494 5901\ -- in 09 ID10 = 3397 5558/ ===== ====== 25890 12k diff --git a/ootw/intro.s b/ootw/intro.s index 009a166e..9c98810d 100644 --- a/ootw/intro.s +++ b/ootw/intro.s @@ -38,7 +38,7 @@ intro: lda #>intro1_data_lz4 sta LZ4_SRC+1 - lda #$90 ; load to $9000 + lda #$80 ; load to $8000 jsr lz4_decode @@ -500,8 +500,11 @@ elevator_inner_loop: jsr clear_all jsr page_flip - ldx #80 - jsr long_wait + ; no need to pause as uncompressing LZ4 below + ; takes a bit + +; ldx #80 +; jsr long_wait ;=============================== ;=============================== @@ -518,7 +521,7 @@ keypad: lda #>intro4_data_lz4 sta LZ4_SRC+1 - lda #$90 ; load to $9000 + lda #$80 ; load to $8000 jsr lz4_decode @@ -579,7 +582,7 @@ keypad: jsr run_sequence -.if 0 + ;=============================== ;=============================== ; Scanner @@ -690,10 +693,8 @@ spin_on_key: dex bne spin_on_key -;uz_loop: -; lda KEYPRESS -; bpl uz_loop -; bit KEYRESET + +.if 0 ;=============================== ; Sitting at Desk @@ -1680,8 +1681,6 @@ run_sequence_done: rts -.if 0 - ;==================================== ; Display a sequence of images 40x40 @@ -1912,7 +1911,7 @@ no_good_message: no_ferrari_message: rts - +.if 0 ;====================== ; Plot particle @@ -1943,7 +1942,7 @@ plot_particle: ;.include "intro_data.s" -DATA_LOCATION = $9000 +DATA_LOCATION = $8000 ; intro1,intro2,intro3 building_sequence = (DATA_LOCATION+$0840) @@ -1959,7 +1958,7 @@ intro1_data_lz4: .incbin "intro_data_01.lz4",11 intro1_data_lz4_end: -; intro4 +; intro4,intro5 opening_sequence = (DATA_LOCATION+$2051) keypad_sequence = (DATA_LOCATION+$1FF6) @@ -1967,6 +1966,17 @@ keypad_rle = (DATA_LOCATION+$0496) approach_sequence = (DATA_LOCATION+$1FE9) scanner_door_rle = (DATA_LOCATION+$0000) +ferrari = (DATA_LOCATION+$2D4A) +good_evening = (DATA_LOCATION+$2D30) +dna_list = (DATA_LOCATION+$2D7A) +static_pattern = (DATA_LOCATION+$2D24) +ai_sequence = (DATA_LOCATION+$2D0E) +ai_bg_rle = (DATA_LOCATION+$2747) +scanning_sequence = (DATA_LOCATION+$2CF5) +scanner_rle = (DATA_LOCATION+$2066) + + + intro4_data_lz4: .word (intro4_data_lz4_end-intro4_data_lz4) .incbin "intro_data_04.lz4",11 diff --git a/ootw/intro_data_04.s b/ootw/intro_data_04.s index f08a7f96..44d6482d 100644 --- a/ootw/intro_data_04.s +++ b/ootw/intro_data_04.s @@ -1,6 +1,6 @@ ;================================= ;================================= -; Intro Segment 01 Data (Building) +; Intro Segment 04 Data (Keypad) ;================================= ;================================= @@ -114,3 +114,134 @@ opening_sequence: .byte 100 .word nothing_rle .byte 0 + + +;================================= +;================================= +; Intro Segment 05 Data (Scanner) +;================================= +;================================= + +.include "intro_graphics/05_scanner/intro_scanner.inc" +.include "intro_graphics/05_scanner/intro_scanning.inc" +.include "intro_graphics/05_scanner/intro_ai_bg.inc" +.include "intro_graphics/05_scanner/intro_ai.inc" + + +; Scanning sequence + +scanning_sequence: + .byte 15 + .word scan01_rle + .byte 128+15 ; .word scan02_rle + .byte 128+15 ; .word scan03_rle + .byte 128+15 ; .word scan04_rle + .byte 128+15 ; .word scan05_rle + .byte 128+15 ; .word scan06_rle + .byte 128+15 ; .word scan07_rle + .byte 128+15 ; .word scan08_rle + .byte 128+15 ; .word scan09_rle + .byte 128+15 ; .word scan10_rle + .byte 128+20 ; .word scan11_rle + .byte 128+20 ; .word scan12_rle + .byte 128+20 ; .word scan13_rle + .byte 128+20 ; .word scan14_rle + .byte 128+20 ; .word scan15_rle + .byte 128+20 ; .word scan16_rle + .byte 128+40 ; .word scan17_rle + .byte 128+40 ; .word scan18_rle + .byte 128+40 ; .word scan19_rle + .byte 40 + .word scan19_rle + .byte 0 + + +; AI sequence + +ai_sequence: + .byte 0,50 ; pause at start, no dna + .word ai01_rle ; slices + + .byte 0,50 ; pause at start, no dna + .word ai02_rle ; slices_zoom + + .byte 0,50 ; pasue as start, no dna + .word ai03_rle ; little circle + + .byte 0,50 ; pause at start, no dna + .word ai04_rle ; big circle + + .byte 1,20 ; pause longer, yes dna + .word ai05_rle ; key + + .byte 0,0 +; .word ai05_rle ; key +; .byte 0 + +static_pattern: + .word nothing_rle ; 0 + .word nothing_rle ; 2 + .word static01_rle ; 4 + .word static03_rle ; 6 + .word static02_rle ; 8 + .word static01_rle ; 10 + + ; Scanning text + +good_evening: + .byte 2,21,"GOOD EVENING PROFESSOR.",0 +ferrari: + .byte 2,21,"I SEE YOU HAVE DRIVEN HERE IN YOUR",0 + .byte 2,22,"FERRARI.",0 + + +dna_list: + .word dna0_sprite + .word dna1_sprite + .word dna2_sprite + .word dna3_sprite + .word dna4_sprite + .word dna5_sprite + .word dna6_sprite + .word dna7_sprite + +dna0_sprite: + .byte $7,$2 + .byte $66,$40,$40,$40,$40,$40,$cc + .byte $06,$00,$00,$00,$00,$00,$0c + +dna1_sprite: + .byte $7,$2 + .byte $00,$66,$40,$40,$40,$cc,$00 + .byte $00,$06,$00,$00,$00,$0c,$00 + +dna2_sprite: + .byte $7,$2 + .byte $00,$00,$66,$40,$cc,$00,$00 + .byte $00,$00,$06,$00,$0c,$00,$00 + +dna3_sprite: + .byte $7,$2 + .byte $00,$00,$00,$66,$00,$00,$00 + .byte $00,$00,$00,$06,$00,$00,$00 + +dna4_sprite: + .byte $7,$2 + .byte $00,$00,$CC,$40,$66,$00,$00 + .byte $00,$00,$0C,$00,$06,$00,$00 + +dna5_sprite: + .byte $7,$2 + .byte $00,$CC,$40,$40,$40,$66,$00 + .byte $00,$0C,$00,$00,$00,$06,$00 + +dna6_sprite: + .byte $7,$2 + .byte $CC,$40,$40,$40,$40,$40,$66 + .byte $0C,$00,$00,$00,$00,$00,$06 + +dna7_sprite: + .byte $7,$2 + .byte $66,$40,$40,$40,$40,$40,$cc + .byte $06,$00,$00,$00,$00,$00,$0c +