mist: working?
This commit is contained in:
parent
81e4c994e7
commit
3f5d3b9d30
|
@ -1,6 +1,6 @@
|
|||
MEMORY {
|
||||
ZP: start = $00, size = $1A, type = rw;
|
||||
RAM: start = $1000, size = $8E00, file = %O;
|
||||
RAM: start = $1000, size = $B000, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
|
|
|
@ -8,14 +8,24 @@ B2D = ../bmp2dhr/b2d
|
|||
|
||||
all: mist.dsk
|
||||
|
||||
mist.dsk: HELLO MIST MIST_TITLE MIST_TITLE.LZ4
|
||||
mist.dsk: HELLO LOADER MIST MIST_TITLE MIST_TITLE.LZ4
|
||||
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 MIST
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0x1000 MIST_TITLE
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0x4000 MIST_TITLE
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0xa000 MIST_TITLE.LZ4
|
||||
# $(DOS33) -y mist.dsk BSAVE -a 0x4000 STEPS_HGRC.BIN
|
||||
|
||||
###
|
||||
|
||||
LOADER: loader.o
|
||||
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_800.inc
|
||||
|
||||
loader.o: loader.s
|
||||
ca65 -o loader.o loader.s -l loader.lst
|
||||
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
|
@ -24,7 +34,7 @@ HELLO: hello.bas
|
|||
####
|
||||
|
||||
MIST_TITLE: mist_title.o
|
||||
ld65 -o MIST_TITLE mist_title.o -C ../linker_scripts/apple2_1000.inc
|
||||
ld65 -o MIST_TITLE mist_title.o -C ../linker_scripts/apple2_4000.inc
|
||||
|
||||
mist_title.o: mist_title.s zp.inc hardware.inc
|
||||
#gr_copy.s gr_unrle.s gr_unrle_large.s gr_copy_large.s
|
||||
|
@ -59,7 +69,8 @@ mist_graphics.inc: \
|
|||
red_book_shelf.png \
|
||||
pool_s.png \
|
||||
clock_s.png \
|
||||
spaceship_far_n.png
|
||||
spaceship_far_n.png \
|
||||
red_book_open.png red_book_static.png red_book_static2.png
|
||||
$(PNG2RLE) asm m_link_book.png link_book_rle > mist_graphics.inc
|
||||
$(PNG2RLE) asm dock_n.png dock_n_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm dock_s.png dock_s_rle >> mist_graphics.inc
|
||||
|
@ -95,6 +106,10 @@ mist_graphics.inc: \
|
|||
$(PNG2RLE) asm pool_s.png pool_s_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm clock_s.png clock_s_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm spaceship_far_n.png ss_far_n_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm red_book_open.png red_book_open_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm red_book_static.png red_book_static_rle >> mist_graphics.inc
|
||||
$(PNG2RLE) asm red_book_static2.png red_book_static2_rle >> mist_graphics.inc
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
+ put in placeholder images so you can walk back to the dock
|
||||
+ sound files (warp noise, bring pages)
|
||||
+ red book animations
|
||||
+ add action items for the letter
|
||||
+ add action times for the switches
|
||||
+ Fix colors on linking book
|
||||
+ Make letter white?
|
||||
+ Insert floppy #100 joke?
|
||||
+ Screenshot for webpage
|
||||
+ Fast loader code?
|
||||
+ double link noise (once when leave, once when get there?)
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
100 PRINT" ______"
|
||||
100 PRINT" A \/\/\/ SOFTWARE PRODUCTION"
|
||||
110 PRINT
|
||||
120 PRINT CHR$(4);"BRUN MIST"
|
||||
120 PRINT CHR$(4);"BRUN LOADER"
|
||||
|
|
|
@ -0,0 +1,727 @@
|
|||
; Loader for MIST
|
||||
|
||||
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
|
||||
; the TITLE program sets $05 with which thing to load
|
||||
; this part of the program stays resident, so when a level ends
|
||||
; it changes $05 (WHICH_LOAD) and this code loads the proper executable
|
||||
|
||||
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
|
||||
|
||||
; modified to assembled with ca65 -- vmw
|
||||
; added code to patch it to run from current disk slot -- vmw
|
||||
|
||||
|
||||
; WHICH_LOAD = $05 ; thing to load
|
||||
; adrlo = $26 ; constant from boot prom
|
||||
; adrhi = $27 ; constant from boot prom
|
||||
; tmpsec = $3c ; constant from boot prom
|
||||
; reqsec = $3d ; constant from boot prom
|
||||
; sizelo = $44
|
||||
; sizehi = $45
|
||||
; secsize = $46
|
||||
; namlo = $f8
|
||||
; namhi = $f9
|
||||
; TEMPY = $fa
|
||||
; step = $fd ; state for stepper motor
|
||||
; tmptrk = $fe ; temporary copy of current track
|
||||
; phase = $ff ; current phase for /seek
|
||||
; OUTL = $fe ; for picking filename
|
||||
; OUTH = $ff
|
||||
|
||||
dirbuf = $c00
|
||||
; note, don't put this immediately below
|
||||
; the value being read as destaddr-4
|
||||
; is temporarily overwritten during read
|
||||
; process
|
||||
|
||||
|
||||
FILENAME = $280
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; START / INIT
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
loader_start:
|
||||
lda #0
|
||||
sta WHICH_LOAD
|
||||
|
||||
jsr init ; unhook DOS, init nibble table
|
||||
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; SETUP THE FILENAME
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
which_load_loop:
|
||||
ldx WHICH_LOAD
|
||||
beq load_intro
|
||||
cpx #16
|
||||
beq load_ending
|
||||
|
||||
lda #<ootw_filename
|
||||
sta OUTL
|
||||
lda #>ootw_filename
|
||||
sta OUTH
|
||||
|
||||
ldy #6
|
||||
cpx #10
|
||||
bcc load_less_than_10 ; blt
|
||||
|
||||
txa
|
||||
sec
|
||||
sbc #10
|
||||
tax
|
||||
|
||||
lda #'1' ; assume it's 10-15
|
||||
sta (OUTL),Y
|
||||
iny
|
||||
|
||||
load_less_than_10:
|
||||
txa
|
||||
clc
|
||||
adc #48
|
||||
sta (OUTL),Y
|
||||
iny
|
||||
lda #0
|
||||
sta (OUTL),Y ; be sure NUL terminated
|
||||
; might be issue if load >10 level
|
||||
; then back to lower? that possible?
|
||||
|
||||
jmp opendir_filename
|
||||
|
||||
load_intro:
|
||||
lda #<$4000
|
||||
sta entry_smc+1
|
||||
lda #>$4000
|
||||
sta entry_smc+2
|
||||
|
||||
lda #<intro_filename
|
||||
sta OUTL
|
||||
lda #>intro_filename
|
||||
sta OUTH
|
||||
bne opendir_filename ; branch always
|
||||
|
||||
load_ending:
|
||||
lda #<$1000
|
||||
sta entry_smc+1
|
||||
lda #>$1000
|
||||
sta entry_smc+2
|
||||
|
||||
lda #<ending_filename
|
||||
sta OUTL
|
||||
lda #>ending_filename
|
||||
sta OUTH
|
||||
; fallthrough
|
||||
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; SET UP DOS3.3 FILENAME
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
opendir_filename:
|
||||
|
||||
; clear out the filename with $A0 (space)
|
||||
|
||||
lda #<FILENAME
|
||||
sta namlo
|
||||
lda #>FILENAME
|
||||
sta namhi
|
||||
|
||||
ldy #29
|
||||
wipe_filename_loop:
|
||||
lda #$A0
|
||||
sta (namlo),Y
|
||||
dey
|
||||
bpl wipe_filename_loop
|
||||
|
||||
ldy #0
|
||||
copy_filename_loop:
|
||||
lda (OUTL),Y
|
||||
beq copy_filename_done
|
||||
ora #$80
|
||||
sta (namlo),Y
|
||||
iny
|
||||
bne copy_filename_loop
|
||||
|
||||
copy_filename_done:
|
||||
jsr opendir ; open and read entire file into memory
|
||||
|
||||
entry_smc:
|
||||
jsr $1000 ; jump to common entry point
|
||||
|
||||
; hope they updated the WHICH_LOAD value
|
||||
|
||||
jmp which_load_loop
|
||||
|
||||
; filename to open is 30-character Apple text, must be padded with space ($A0)
|
||||
;filename:
|
||||
; .byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
; .byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
; .byte $A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0,$A0
|
||||
|
||||
intro_filename:
|
||||
.byte "MIST_TITLE",0
|
||||
|
||||
ending_filename:
|
||||
.byte "MIST",0
|
||||
|
||||
ootw_filename:
|
||||
.byte "OOTW_C",0,0,0
|
||||
|
||||
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; INIT (build nibble table)
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
;unhook DOS and build nibble table
|
||||
|
||||
init:
|
||||
; patch to use current drive
|
||||
|
||||
; locate input paramater list
|
||||
jsr $3E3
|
||||
; result is in A:Y
|
||||
sta $FF
|
||||
sty $FE
|
||||
ldy #1
|
||||
lda ($FE),y
|
||||
|
||||
; list+1 should have slot<<8
|
||||
|
||||
|
||||
ora #$80 ; add in $80
|
||||
|
||||
; c0e0
|
||||
sta mlsmc06+1
|
||||
|
||||
; c0e8
|
||||
clc
|
||||
adc #8
|
||||
sta mlsmc02+1
|
||||
sta mlsmc07+1
|
||||
|
||||
; c0e9
|
||||
clc
|
||||
adc #1
|
||||
sta mlsmc01+1
|
||||
|
||||
; c0ec
|
||||
clc
|
||||
adc #3
|
||||
sta mlsmc03+1
|
||||
sta mlsmc04+1
|
||||
sta mlsmc05+1
|
||||
|
||||
jsr $fe93 ; clear COUT
|
||||
jsr $fe89 ; clear KEYIN
|
||||
|
||||
;========================
|
||||
; Create nibble table
|
||||
; Note: the table starts 16 bytes in, and is sparse
|
||||
; so it doesn't entirely look like the DOS33 table at
|
||||
|
||||
ldy #0
|
||||
ldx #3
|
||||
L1: stx $3c ; store tempx (3?)
|
||||
txa ; a=x (a=3)
|
||||
asl ; a*=2 (a=6)
|
||||
bit $3c ; a&tempx, set N/V (a=6)
|
||||
beq L3 ; if 0, skip to L3
|
||||
ora $3c ; a|=tempx (a=7)
|
||||
eor #$ff ; a=~a (a=f8)
|
||||
and #$7e ; a&=0x7e 0111 1110 (a=78)
|
||||
L2: bcs L3 ; this set way back at asl??
|
||||
lsr ; a>>1 a=3c c=0
|
||||
; a=1e c=0
|
||||
; a=0f c=0
|
||||
; a=07 c=1
|
||||
bne L2 ; if a!=0 goto l2
|
||||
tya ; if a==0, a=y
|
||||
sta nibtbl, x ; write out to table
|
||||
iny ; increment y
|
||||
L3: inx ; increment x x=4, a=0f
|
||||
bpl L1 ; loop while high bit not set
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; file not found
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
file_not_found:
|
||||
|
||||
mlsmc07:lda $c0e8 ; turn off drive motor?
|
||||
|
||||
jsr TEXT
|
||||
jsr HOME
|
||||
|
||||
ldy #0
|
||||
|
||||
lda #<disk_string
|
||||
sta OUTL
|
||||
lda #>disk_string
|
||||
sta OUTH
|
||||
|
||||
quick_print:
|
||||
lda (OUTL),Y
|
||||
beq quick_print_done
|
||||
jsr COUT1
|
||||
iny
|
||||
jmp quick_print
|
||||
|
||||
quick_print_done:
|
||||
; rts
|
||||
|
||||
; jsr quick_print
|
||||
|
||||
fnf_keypress:
|
||||
lda KEYPRESS
|
||||
bpl fnf_keypress
|
||||
bit KEYRESET
|
||||
|
||||
jmp which_load_loop
|
||||
|
||||
disk_string:
|
||||
.byte "INSERT OTHER DISK, PRESS RETURN",0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; OPENDIR: actually load the file
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
||||
; turn on drive and read volume table of contents
|
||||
opendir:
|
||||
mlsmc01:lda $c0e9 ; turn slot#6 drive on
|
||||
ldx #0
|
||||
stx adrlo ; zero out adrlo
|
||||
stx secsize ; zero out secsize
|
||||
lda #$11 ; a=$11 (VTOC)
|
||||
jsr readdirsec
|
||||
firstent:
|
||||
|
||||
lda dirbuf+1
|
||||
|
||||
; lock if entry not found
|
||||
entry_not_found:
|
||||
beq file_not_found
|
||||
|
||||
; read directory sector
|
||||
|
||||
ldx dirbuf+2
|
||||
jsr seekread1
|
||||
ldy #7 ;number of directory entries in a sector
|
||||
ldx #$2b ;offset of filename in directory entry
|
||||
nextent:
|
||||
tya
|
||||
pha ; was **phy**
|
||||
txa
|
||||
pha ; was **phx**
|
||||
ldy #$1d
|
||||
|
||||
; match name backwards (slower but smaller)
|
||||
|
||||
L4:
|
||||
lda (namlo), y
|
||||
cmp dirbuf, x
|
||||
beq foundname
|
||||
pla
|
||||
|
||||
; move to next directory in this block, if possible
|
||||
|
||||
clc
|
||||
adc #$23
|
||||
tax
|
||||
pla
|
||||
tay ; was **ply**
|
||||
dey
|
||||
bne nextent
|
||||
beq firstent ; was **bra**
|
||||
|
||||
foundname:
|
||||
dex
|
||||
dey
|
||||
bpl L4
|
||||
pla
|
||||
tay ; was **ply**
|
||||
pla
|
||||
|
||||
; read track/sector list
|
||||
|
||||
lda dirbuf-32, y
|
||||
ldx dirbuf-31, y
|
||||
jsr seekread1
|
||||
|
||||
; read load offset and length info only, initially
|
||||
|
||||
lda #<filbuf
|
||||
sta adrlo
|
||||
lda #4
|
||||
sta secsize
|
||||
lda dirbuf+12
|
||||
ldx dirbuf+13
|
||||
ldy #>filbuf
|
||||
jsr seekread
|
||||
|
||||
; reduce load offset by 4, to account for offset and length
|
||||
|
||||
sec
|
||||
lda filbuf
|
||||
sbc #4
|
||||
sta adrlo
|
||||
|
||||
lda filbuf+1
|
||||
sbc #0
|
||||
sta adrhi
|
||||
|
||||
; save on stack bytes that will be overwritten by extra read
|
||||
|
||||
ldy #3
|
||||
L5:
|
||||
lda (adrlo), y
|
||||
pha
|
||||
dey
|
||||
bpl L5
|
||||
|
||||
lda adrhi
|
||||
pha
|
||||
lda adrlo
|
||||
pha
|
||||
|
||||
; increase load size by 4, to account for offst and length
|
||||
|
||||
lda filbuf+2
|
||||
adc #3
|
||||
sta sizelo
|
||||
sta secsize
|
||||
|
||||
lda filbuf+3
|
||||
adc #0
|
||||
sta sizehi
|
||||
beq readfirst
|
||||
lda #0 ; was **stz secsize**
|
||||
sta secsize
|
||||
|
||||
readfirst:
|
||||
ldy #$0c
|
||||
|
||||
; read a file sector
|
||||
|
||||
readnext:
|
||||
tya
|
||||
pha
|
||||
lda dirbuf, y ; A = track
|
||||
ldx dirbuf+1, y ; x = sector
|
||||
jsr seekread1
|
||||
pla
|
||||
tay
|
||||
|
||||
; if low count is non-zero then we are done
|
||||
; (can happen only for partial last block)
|
||||
|
||||
lda secsize
|
||||
bne readdone
|
||||
|
||||
; continue if more than $100 bytes left
|
||||
|
||||
dec sizehi
|
||||
bne L6
|
||||
|
||||
; set read size to min(length, $100)
|
||||
|
||||
lda sizelo
|
||||
beq readdone
|
||||
sta secsize
|
||||
L6:
|
||||
inc adrhi
|
||||
iny
|
||||
iny
|
||||
bne readnext
|
||||
|
||||
; save current address for after t/s read
|
||||
|
||||
lda adrhi
|
||||
pha
|
||||
lda adrlo
|
||||
pha
|
||||
lda #0
|
||||
sta adrlo ; was **stz adrlo**
|
||||
|
||||
; read next track/sector sector
|
||||
|
||||
lda dirbuf+1
|
||||
ldx dirbuf+2
|
||||
jsr readdirsec
|
||||
clc
|
||||
|
||||
; restore current address
|
||||
readdone:
|
||||
pla
|
||||
sta adrlo ; code originally had this backwards
|
||||
pla
|
||||
sta adrhi
|
||||
bcc readfirst
|
||||
|
||||
mlsmc02:lda $c0e8
|
||||
|
||||
; restore from stack bytes that were overwritten by extra read
|
||||
|
||||
ldx #3
|
||||
ldy #0
|
||||
L7:
|
||||
pla
|
||||
sta (adrlo), y
|
||||
iny
|
||||
dex
|
||||
bpl L7
|
||||
rts
|
||||
|
||||
|
||||
;======================
|
||||
; readdirsec
|
||||
;======================
|
||||
; a = track?
|
||||
; x = sector?
|
||||
readdirsec:
|
||||
ldy #>dirbuf
|
||||
seekread:
|
||||
sty adrhi
|
||||
seekread1:
|
||||
sta phase
|
||||
lda sectbl, x
|
||||
sta reqsec
|
||||
jsr readadr
|
||||
|
||||
; if track does not match, then seek
|
||||
|
||||
cpx phase
|
||||
beq checksec
|
||||
jsr seek
|
||||
|
||||
|
||||
;=========================================
|
||||
; re merge in with qkumba's recent changes
|
||||
; to fix seek problem?
|
||||
;=========================================
|
||||
|
||||
; [re-]read sector
|
||||
|
||||
re_read_addr:
|
||||
jsr readadr
|
||||
checksec:
|
||||
cmp reqsec
|
||||
bne re_read_addr
|
||||
|
||||
;=========================
|
||||
; read sector data
|
||||
;=========================
|
||||
|
||||
readdata:
|
||||
jsr readd5aa
|
||||
eor #$ad ; zero A if match
|
||||
bne re_read_addr
|
||||
|
||||
L12:
|
||||
mlsmc03:ldx $c0ec ; read until valid data (high bit set)
|
||||
bpl L12
|
||||
eor nibtbl-$80, x
|
||||
sta bit2tbl-$aa, y
|
||||
iny
|
||||
bne L12
|
||||
L13:
|
||||
mlsmc04:ldx $c0ec ; read until valid data (high bit set)
|
||||
bpl L13
|
||||
eor nibtbl-$80, x
|
||||
sta (adrlo), y ; the real address
|
||||
iny
|
||||
cpy secsize
|
||||
bne L13
|
||||
ldy #0
|
||||
L14:
|
||||
ldx #$a9
|
||||
L15:
|
||||
inx
|
||||
beq L14
|
||||
lda (adrlo), y
|
||||
lsr bit2tbl-$aa, x
|
||||
rol
|
||||
lsr bit2tbl-$aa, x
|
||||
rol
|
||||
sta (adrlo), y
|
||||
iny
|
||||
cpy secsize
|
||||
bne L15
|
||||
rts
|
||||
|
||||
; no tricks here, just the regular stuff
|
||||
|
||||
;=======================
|
||||
; readaddr -- read the address field
|
||||
;=======================
|
||||
; Find address field, put track in cutrk, sector in tmpsec
|
||||
|
||||
readadr:
|
||||
jsr readd5aa
|
||||
cmp #$96
|
||||
bne readadr
|
||||
ldy #3 ; three?
|
||||
; first read volume/volume
|
||||
; then track/track
|
||||
; then sector/sector?
|
||||
adr_read_two_bytes:
|
||||
tax
|
||||
jsr readnib
|
||||
rol
|
||||
sta tmpsec
|
||||
jsr readnib
|
||||
and tmpsec
|
||||
dey
|
||||
bne adr_read_two_bytes
|
||||
rts
|
||||
|
||||
;========================
|
||||
; make sure we see the $D5 $AA pattern
|
||||
|
||||
readd5aa:
|
||||
L16:
|
||||
jsr readnib
|
||||
L17:
|
||||
cmp #$d5
|
||||
bne L16
|
||||
jsr readnib
|
||||
cmp #$aa
|
||||
bne L17
|
||||
tay ; we need Y=#$AA later
|
||||
|
||||
readnib:
|
||||
mlsmc05:lda $c0ec ; read until valid (high bit set)
|
||||
bpl readnib
|
||||
|
||||
seekret:
|
||||
rts
|
||||
|
||||
;=====================
|
||||
; SEEK
|
||||
;=====================
|
||||
; current track in X?
|
||||
; desired track in phase
|
||||
|
||||
seek:
|
||||
ldy #0
|
||||
sty step
|
||||
asl phase ; multiply by two
|
||||
txa ; current track?
|
||||
asl ; mul by two
|
||||
copy_cur:
|
||||
tax
|
||||
sta tmptrk
|
||||
sec
|
||||
sbc phase
|
||||
beq L22
|
||||
bcs L18
|
||||
eor #$ff
|
||||
inx
|
||||
bcc L19
|
||||
L18:
|
||||
sbc #1
|
||||
dex
|
||||
L19:
|
||||
cmp step
|
||||
bcc L20
|
||||
lda step
|
||||
L20:
|
||||
cmp #8
|
||||
bcs L21
|
||||
tay
|
||||
sec
|
||||
L21:
|
||||
txa
|
||||
pha
|
||||
ldx step1, y
|
||||
L22:
|
||||
php
|
||||
bne L24
|
||||
L23:
|
||||
clc
|
||||
lda tmptrk
|
||||
ldx step2, y
|
||||
L24:
|
||||
stx tmpsec
|
||||
and #3
|
||||
rol
|
||||
tax
|
||||
lsr
|
||||
mlsmc06:lda $c0e0, x
|
||||
L25:
|
||||
ldx #$12
|
||||
L26:
|
||||
dex
|
||||
bpl L26
|
||||
dec tmpsec
|
||||
bne L25
|
||||
bcs L23
|
||||
plp
|
||||
beq seekret
|
||||
pla
|
||||
inc step
|
||||
bne copy_cur
|
||||
|
||||
|
||||
|
||||
step1: .byte $01, $30, $28, $24, $20, $1e, $1d, $1c
|
||||
step2: .byte $70, $2c, $26, $22, $1f, $1e, $1d, $1c
|
||||
|
||||
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 ; = *
|
||||
; .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
|
||||
; .byte $0C,$0D,$B0,$B1,$0E,$0F,$10,$11 ; $BAAE ; 18
|
||||
; .byte $12,$13,$B8,$14,$15,$16,$17,$18 ; $BAB6 ; 20
|
||||
; .byte $19,$1A,$C0,$C1,$C2,$C3,$C4,$C5 ; $BABE ; 28
|
||||
; .byte $C6,$C7,$C8,$C9,$CA,$1B,$CC,$1C ; $BAC6 ; 30
|
||||
; .byte $1D,$1E,$D0,$D1,$D2,$1E,$D4,$D5 ; $BACE ; 38
|
||||
; .byte $20,$21,$D8,$22,$23,$24,$25,$26 ; $BAD6 ; 40
|
||||
; .byte $27,$28,$E0,$E1,$E2,$E3,$E4,$29 ; $BADE ; 48
|
||||
; .byte $2A,$2B,$E8,$2C,$2D,$2E,$2F,$30 ; $BAE6 ; 50
|
||||
; .byte $31,$32,$F0,$F1,$33,$34,$35,$36 ; $BAEE ; 58
|
||||
; .byte $37,$38,$F8,$39,$3A,$3B,$3C,$3D ; $BAF6 ; 60
|
||||
; .byte $3E,$3F,$13,$00,$01,$02,$01,$00 ; $BAFE ; 68
|
||||
; .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
; .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
|
||||
|
||||
;bit2tbl: .res 86 ; = nibtbl+128
|
||||
;filbuf: .res 4 ; = bit2tbl+86
|
||||
;dataend = filbuf+4
|
||||
|
||||
loader_end:
|
||||
|
||||
.assert (<loader_end - <loader_start)>3, error, "loader too big"
|
130
mist/mist.s
130
mist/mist.s
|
@ -19,7 +19,7 @@ mist_start:
|
|||
|
||||
bit SET_GR
|
||||
bit PAGE0
|
||||
; bit HIRES
|
||||
bit LORES
|
||||
bit FULLGR
|
||||
|
||||
lda #0
|
||||
|
@ -392,19 +392,13 @@ myst_link_book:
|
|||
|
||||
; play sound effect?
|
||||
|
||||
; lda #<audio_link_noise
|
||||
; sta BTC_L
|
||||
; lda #>audio_link_noise
|
||||
; sta BTC_H
|
||||
; ldx #43 ; 45 pages long???
|
||||
; jsr play_audio
|
||||
lda #<audio_link_noise
|
||||
sta BTC_L
|
||||
lda #>audio_link_noise
|
||||
sta BTC_H
|
||||
ldx #43 ; 45 pages long???
|
||||
jsr play_audio
|
||||
|
||||
; lda #<audio_red_page
|
||||
; sta BTC_L
|
||||
; lda #>audio_red_page
|
||||
; sta BTC_H
|
||||
; ldx #21 ; 21 pages long???
|
||||
; jsr play_audio
|
||||
|
||||
|
||||
|
||||
|
@ -637,11 +631,105 @@ click_switch:
|
|||
bit $C030
|
||||
bit $C030
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
; open the red book
|
||||
;===========================
|
||||
red_book:
|
||||
|
||||
bit KEYRESET
|
||||
lda #0
|
||||
sta FRAMEL
|
||||
|
||||
red_book_loop:
|
||||
|
||||
lda #<red_book_static_rle
|
||||
sta GBASL
|
||||
lda #>red_book_static_rle
|
||||
sta GBASH
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
jsr page_flip
|
||||
|
||||
lda #120
|
||||
jsr WAIT
|
||||
|
||||
lda #<red_book_static2_rle
|
||||
sta GBASL
|
||||
lda #>red_book_static2_rle
|
||||
sta GBASH
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
jsr page_flip
|
||||
|
||||
lda #120
|
||||
jsr WAIT
|
||||
|
||||
|
||||
inc FRAMEL
|
||||
lda FRAMEL
|
||||
cmp #5
|
||||
bne done_sir
|
||||
|
||||
;; annoying brother
|
||||
|
||||
|
||||
lda #<red_book_open_rle
|
||||
sta GBASL
|
||||
lda #>red_book_open_rle
|
||||
sta GBASH
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
jsr page_flip
|
||||
|
||||
lda #<audio_red_page
|
||||
sta BTC_L
|
||||
lda #>audio_red_page
|
||||
sta BTC_H
|
||||
ldx #21 ; 21 pages long???
|
||||
jsr play_audio
|
||||
|
||||
|
||||
; lda #100
|
||||
; jsr WAIT
|
||||
|
||||
|
||||
done_sir:
|
||||
|
||||
lda KEYPRESS
|
||||
bpl red_book_loop
|
||||
|
||||
red_book_done:
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
; restore bg
|
||||
|
||||
lda #<red_book_shelf_rle
|
||||
sta GBASL
|
||||
lda #>red_book_shelf_rle
|
||||
sta GBASH
|
||||
lda #$c ; load to page $c00
|
||||
jsr load_rle_gr
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
;==========================
|
||||
|
@ -1001,14 +1089,14 @@ location13:
|
|||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte DIRECTION_W ; west exit_dir
|
||||
.byte $ff ; special exit
|
||||
.byte $00 ; special exit
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word red_book_shelf_rle ; west bg
|
||||
.byte $ff,$ff ; special x
|
||||
.byte $ff,$ff ; special y
|
||||
.word $0000 ; special function
|
||||
.byte 16,25 ; special x
|
||||
.byte 16,32 ; special y
|
||||
.word red_book-1 ; special function
|
||||
.byte BG_WEST ; west
|
||||
|
||||
; pool
|
||||
|
@ -1097,8 +1185,8 @@ location16:
|
|||
|
||||
|
||||
;.align $100
|
||||
;audio_red_page:
|
||||
;.incbin "audio/red_page.btc"
|
||||
;audio_link_noise:
|
||||
;.incbin "audio/link_noise.btc"
|
||||
audio_red_page:
|
||||
.incbin "audio/red_page.btc"
|
||||
audio_link_noise:
|
||||
.incbin "audio/link_noise.btc"
|
||||
|
||||
|
|
|
@ -1840,3 +1840,181 @@ ss_far_n_rle: .byte $28 ; ysize=48
|
|||
.byte $A3,$77, $A3,$00, $A6,$88, $AC,$77, $A3,$44, $AA,$55, $A3,$00
|
||||
.byte $77,$77, $57, $A3,$00, $A6,$88
|
||||
.byte $A1
|
||||
red_book_open_rle: .byte $28 ; ysize=48
|
||||
.byte $00,$00, $88,$88, $55, $A4,$88, $55, $A3,$88, $55
|
||||
.byte $AD,$88, $85, $58, $A4,$88, $85, $58, $A3,$88
|
||||
.byte $A4,$00, $88,$88, $55, $00, $70, $55, $A7,$77
|
||||
.byte $A5,$70, $8F, $50, $AB,$70, $00, $85, $58
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $85
|
||||
.byte $58, $88, $A4,$00, $88,$88, $55, $11, $77
|
||||
.byte $55, $AC,$77, $88, $55, $77, $31, $88
|
||||
.byte $A5,$BB, $88, $13, $77, $00, $88,$88, $55
|
||||
.byte $88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $77, $31, $BB,$BB, $B0
|
||||
.byte $BB, $B0, $BB, $11, $13, $77, $00
|
||||
.byte $88,$88, $55, $88, $A4,$00, $88, $58, $85
|
||||
.byte $11, $77, $55, $AC,$77, $88, $55, $77
|
||||
.byte $31, $A3,$BB, $33, $BB,$BB, $11, $13, $77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $77, $55, $AC,$77, $88, $55
|
||||
.byte $77, $31, $11, $BB, $8B, $B8, $8B
|
||||
.byte $BB, $11, $13, $77, $00, $88,$88, $55
|
||||
.byte $88, $A4,$00, $88, $55, $88, $11, $55
|
||||
.byte $AD,$77, $88, $55, $77, $31, $11, $BB,$BB
|
||||
.byte $B3, $BB,$BB, $11, $13, $77, $00, $88,$88
|
||||
.byte $55, $88, $A4,$00, $88, $55, $88, $11
|
||||
.byte $55, $AD,$77, $88, $55, $77, $11, $01,$01
|
||||
.byte $8B, $88, $8B, $01,$01, $13, $77, $00
|
||||
.byte $88,$88, $55, $88, $A4,$00, $88, $55, $88
|
||||
.byte $11, $55, $AD,$77, $88, $55, $77, $A3,$70
|
||||
.byte $A3,$7F, $A3,$70, $77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $00, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $00, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $00, $55, $AD,$77
|
||||
.byte $88, $55, $AB,$77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $00, $A4,$05, $A4,$15
|
||||
.byte $A3,$17, $A3,$07, $08, $05, $AB,$07, $00, $88,$88
|
||||
.byte $55, $88, $A4,$00, $88, $55, $88,$88, $55
|
||||
.byte $A4,$88, $55, $A3,$88, $55, $AE,$88, $55, $A5,$88
|
||||
.byte $55, $88, $00,$00
|
||||
.byte $A1
|
||||
red_book_static_rle: .byte $28 ; ysize=48
|
||||
.byte $00,$00, $88,$88, $55, $A4,$88, $55, $A3,$88, $55
|
||||
.byte $AD,$88, $85, $58, $A4,$88, $85, $58, $A3,$88
|
||||
.byte $A4,$00, $88,$88, $55, $00, $70, $55, $A7,$77
|
||||
.byte $A5,$70, $8F, $50, $AB,$70, $00, $85, $58
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $85
|
||||
.byte $58, $88, $A4,$00, $88,$88, $55, $11, $77
|
||||
.byte $55, $AC,$77, $88, $55, $77, $11, $1B
|
||||
.byte $11, $1F, $1B, $11,$11, $13, $11, $77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88,$88, $55
|
||||
.byte $11, $77, $55, $AC,$77, $88, $55, $77
|
||||
.byte $B1, $13, $11, $1B, $11, $13, $11
|
||||
.byte $1B, $F1, $77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $58, $85, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $77, $31, $11, $B1
|
||||
.byte $13, $11, $1F, $13, $B1, $31, $77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $77, $55, $AC,$77, $88, $55
|
||||
.byte $77, $11, $1F, $11,$11, $13, $11, $1B
|
||||
.byte $F1, $11, $77, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88, $11, $55, $AD,$77
|
||||
.byte $88, $55, $77, $A9,$00, $77, $00, $88,$88
|
||||
.byte $55, $88, $A4,$00, $88, $55, $88, $11
|
||||
.byte $55, $AD,$77, $88, $55, $77, $31, $1B
|
||||
.byte $F1, $11, $F3, $11, $31, $1B, $11
|
||||
.byte $77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $77, $71,$71, $73, $71,$71, $7B, $71,$71, $73
|
||||
.byte $77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $00, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $00, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $00, $55, $AD,$77, $88, $55
|
||||
.byte $AB,$77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $00, $A4,$05, $A4,$15, $A3,$17, $A3,$07
|
||||
.byte $08, $05, $AB,$07, $00, $88,$88, $55, $88
|
||||
.byte $A4,$00, $88, $55, $88,$88, $55, $A4,$88, $55
|
||||
.byte $A3,$88, $55, $AE,$88, $55, $A5,$88, $55, $88
|
||||
.byte $00,$00
|
||||
.byte $A1
|
||||
red_book_static2_rle: .byte $28 ; ysize=48
|
||||
.byte $00,$00, $88,$88, $55, $A4,$88, $55, $A3,$88, $55
|
||||
.byte $AD,$88, $85, $58, $A4,$88, $85, $58, $A3,$88
|
||||
.byte $A4,$00, $88,$88, $55, $00, $70, $55, $A7,$77
|
||||
.byte $A5,$70, $8F, $50, $AB,$70, $00, $85, $58
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $00, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $55
|
||||
.byte $88,$88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $AB,$77, $00, $88, $85
|
||||
.byte $58, $88, $A4,$00, $88,$88, $55, $11, $77
|
||||
.byte $55, $AC,$77, $88, $55, $77, $A3,$01, $0B
|
||||
.byte $A3,$01, $0F, $01, $77, $00, $88,$88, $55
|
||||
.byte $88, $A4,$00, $88,$88, $55, $11, $77, $55
|
||||
.byte $AC,$77, $88, $55, $77, $10, $B0, $10,$10
|
||||
.byte $30, $10,$10, $B0, $10, $77, $00, $88,$88
|
||||
.byte $55, $88, $A4,$00, $88, $58, $85, $11
|
||||
.byte $77, $55, $AC,$77, $88, $55, $77, $13
|
||||
.byte $11, $3F, $11, $1F, $B1, $13, $11
|
||||
.byte $31, $77, $00, $88,$88, $55, $88, $A4,$00
|
||||
.byte $88, $55, $88, $11, $77, $55, $AC,$77
|
||||
.byte $88, $55, $77, $1F, $A3,$11, $13, $11
|
||||
.byte $1B, $11, $F1, $77, $00, $88,$88, $55
|
||||
.byte $88, $A4,$00, $88, $55, $88, $11, $55
|
||||
.byte $AD,$77, $88, $55, $77, $11, $1B, $F1
|
||||
.byte $1F, $1B, $31, $F1, $1B, $11, $77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $77
|
||||
.byte $13, $11, $1B, $A3,$11, $B1, $13, $B1
|
||||
.byte $77, $00, $88,$88, $55, $88, $A4,$00, $88
|
||||
.byte $55, $88, $11, $55, $AD,$77, $88, $55
|
||||
.byte $77, $71, $7F, $71, $73, $A5,$71, $77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $11, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $00, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $00, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $00, $55, $AD,$77, $88, $55, $AB,$77
|
||||
.byte $00, $88,$88, $55, $88, $A4,$00, $88, $55
|
||||
.byte $88, $00, $A4,$05, $A4,$15, $A3,$17, $A3,$07, $08
|
||||
.byte $05, $AB,$07, $00, $88,$88, $55, $88, $A4,$00
|
||||
.byte $88, $55, $88,$88, $55, $A4,$88, $55, $A3,$88
|
||||
.byte $55, $AE,$88, $55, $A5,$88, $55, $88, $00,$00
|
||||
.byte $A1
|
||||
|
|
|
@ -26,7 +26,7 @@ mist_start:
|
|||
; Init RTS disk code
|
||||
;===================
|
||||
|
||||
jsr rts_init
|
||||
; jsr rts_init
|
||||
|
||||
;===================
|
||||
; Load graphics
|
||||
|
@ -35,30 +35,30 @@ reload_everything:
|
|||
; load MIST_TITLE.LZ4 to $a000
|
||||
; then decompress it to $2000 (HGR PAGE0)
|
||||
|
||||
lda #<mist_title_filename
|
||||
sta OUTL
|
||||
lda #>mist_title_filename
|
||||
sta OUTH
|
||||
jsr opendir_filename ; open and read entire file into memory
|
||||
; lda #<mist_title_filename
|
||||
; sta OUTL
|
||||
; lda #>mist_title_filename
|
||||
; sta OUTH
|
||||
; jsr opendir_filename ; open and read entire file into memory
|
||||
|
||||
; size in ldsizeh:ldsizel (f1/f0)
|
||||
|
||||
clc
|
||||
lda #<($a000)
|
||||
; clc
|
||||
lda #<file
|
||||
sta LZ4_SRC
|
||||
adc ldsizel
|
||||
sta LZ4_END
|
||||
|
||||
lda #>($a000)
|
||||
sta LZ4_SRC+1
|
||||
adc ldsizeh
|
||||
sta LZ4_END+1
|
||||
|
||||
; lda #<($a000+4103-8) ; skip checksum at end
|
||||
; adc ldsizel
|
||||
; sta LZ4_END
|
||||
; lda #>($a000+4103-8) ; skip checksum at end
|
||||
|
||||
lda #>file
|
||||
sta LZ4_SRC+1
|
||||
; adc ldsizeh
|
||||
; sta LZ4_END+1
|
||||
|
||||
lda #<file_end
|
||||
sta LZ4_END
|
||||
lda #>file_end
|
||||
sta LZ4_END+1
|
||||
|
||||
lda #<$2000
|
||||
sta LZ4_DST
|
||||
lda #>$2000
|
||||
|
@ -67,16 +67,18 @@ reload_everything:
|
|||
jsr lz4_decode
|
||||
|
||||
|
||||
;===================
|
||||
; set graphics mode
|
||||
;===================
|
||||
jsr HOME
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
bit PAGE0
|
||||
keyloop:
|
||||
lda KEYPRESS
|
||||
bpl keyloop
|
||||
|
||||
blah:
|
||||
jmp blah
|
||||
bit KEYRESET
|
||||
|
||||
lda #16
|
||||
sta 5
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
@ -88,12 +90,14 @@ blah:
|
|||
; .include "gr_hline.s"
|
||||
; .include "wait_keypress.s"
|
||||
.include "lz4_decode.s"
|
||||
.include "rts.s"
|
||||
; .include "rts.s"
|
||||
|
||||
|
||||
; filename to open is 30-character Apple text:
|
||||
mist_title_filename: ; .byte "MIST_TITLE.LZ4",0
|
||||
.byte 'M'|$80,'I'|$80,'S'|$80,'T'|$80,'_'|$80,'T'|$80,'I'|$80,'T'|$80
|
||||
.byte 'L'|$80,'E'|$80,'.'|$80,'L'|$80,'Z'|$80,'4'|$80,$00
|
||||
|
||||
;mist_title_filename: ; .byte "MIST_TITLE.LZ4",0
|
||||
; .byte 'M'|$80,'I'|$80,'S'|$80,'T'|$80,'_'|$80,'T'|$80,'I'|$80,'T'|$80
|
||||
; .byte 'L'|$80,'E'|$80,'.'|$80,'L'|$80,'Z'|$80,'4'|$80,$00
|
||||
|
||||
file:
|
||||
.incbin "MIST_TITLE.LZ4"
|
||||
file_end:
|
||||
|
|
Loading…
Reference in New Issue