mist: fix it to load properly

need to disable some sound temporarily as out of room if we
leave LOADER in memory
This commit is contained in:
Vince Weaver 2020-03-08 14:11:11 -04:00
parent 0bbdd0d80d
commit 4010a84b9f
8 changed files with 67 additions and 16 deletions

View File

@ -1,6 +1,6 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $1400, size = $8E00, file = %O;
RAM: start = $1400, size = $AC00, file = %O;
}
SEGMENTS {

View File

@ -11,15 +11,15 @@ all: mist.dsk
mist.dsk: HELLO LOADER MIST_TITLE MIST MECHE
cp empty.dsk mist.dsk
$(DOS33) -y mist.dsk SAVE A HELLO
$(DOS33) -y mist.dsk BSAVE -a 0x800 LOADER
$(DOS33) -y mist.dsk BSAVE -a 0x1000 LOADER
$(DOS33) -y mist.dsk BSAVE -a 0x4000 MIST_TITLE
$(DOS33) -y mist.dsk BSAVE -a 0x1000 MIST
$(DOS33) -y mist.dsk BSAVE -a 0x1000 MECHE
$(DOS33) -y mist.dsk BSAVE -a 0x1400 MIST
$(DOS33) -y mist.dsk BSAVE -a 0x1400 MECHE
###
LOADER: loader.o
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_800.inc
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_1000.inc
loader.o: loader.s
ca65 -o loader.o loader.s -l loader.lst
@ -42,7 +42,7 @@ mist_title.o: mist_title.s zp.inc hardware.inc \
####
MIST: mist.o
ld65 -o MIST mist.o -C ../linker_scripts/apple2_1000.inc
ld65 -o MIST mist.o -C ../linker_scripts/apple2_1400.inc
mist.o: mist.s zp.inc hardware.inc \
graphics_island/mist_graphics.inc \
@ -55,13 +55,14 @@ mist.o: mist.s zp.inc hardware.inc \
brother_books.s \
keyboard.s \
draw_pointer.s \
end_level.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o mist.o mist.s -l mist.lst
####
MECHE: meche.o
ld65 -o MECHE meche.o -C ../linker_scripts/apple2_1000.inc
ld65 -o MECHE meche.o -C ../linker_scripts/apple2_1400.inc
meche.o: meche.s zp.inc hardware.inc \
graphics_meche/meche_graphics.inc \

View File

@ -58,13 +58,15 @@ red_book_loop:
jsr page_flip
; FIXME
.if 0
lda #<audio_red_page
sta BTC_L
lda #>audio_red_page
sta BTC_H
ldx #21 ; 21 pages long???
jsr play_audio
.endif
; lda #100
; jsr WAIT

24
mist/end_level.s Normal file
View File

@ -0,0 +1,24 @@
end_level:
; set WHICH_LOAD first
bit TEXTGR
jsr clear_bottom
lda #<loading_message
sta OUTL
lda #>loading_message
sta OUTH
jsr move_and_print
jsr page_flip
; exit back to loader
rts
loading_message:
.byte 0,20,"LOADING...",0

View File

@ -241,8 +241,6 @@ done_turning:
rts
exit_level:
rts

View File

@ -85,9 +85,9 @@ load_intro:
jmp actual_load
load_other:
lda #<$1000
lda #<$1400
sta entry_smc+1
lda #>$1000
lda #>$1400
sta entry_smc+2
actual_load:

View File

@ -24,6 +24,7 @@ mist_start:
lda #0
sta DRAW_PAGE
sta LEVEL_OVER
; init cursor
@ -51,9 +52,12 @@ mist_start:
sta CLOCK_HOUR
jsr clock_inside_reset
lda #0
sta GEAR_OPEN
; lda #0
; sta GEAR_OPEN
lda #1
sta GEAR_OPEN
jsr open_the_gear
not_first_time:
@ -138,8 +142,28 @@ nothing_special:
inc FRAMEH
room_frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop
really_exit:
jmp end_level
exit_level:
lda #2
sta WHICH_LOAD
lda #$ff
sta LEVEL_OVER
rts
;==========================
; includes
@ -159,6 +183,7 @@ room_frame_no_oflo:
.include "graphics_island/mist_graphics.inc"
.include "end_level.s"
; puzzles
@ -184,8 +209,8 @@ room_frame_no_oflo:
;.align $100
audio_red_page:
.incbin "audio/red_page.btc"
;audio_red_page:
;.incbin "audio/red_page.btc"
audio_link_noise:
.incbin "audio/link_noise.btc"

View File

@ -70,6 +70,7 @@ CLOCK_MIDDLE = $90
CLOCK_BOTTOM = $91
CLOCK_LAST = $92
ANIMATE_FRAME = $93
LEVEL_OVER = $94
DISP_PAGE = $ED ; ALL
DRAW_PAGE = $EE ; ALL