mirror of
https://github.com/a2-4am/4cade.git
synced 2024-06-14 03:29:38 +00:00
print title earlier
This commit is contained in:
parent
c85fc4c1dd
commit
acd3cf62dc
BIN
res/proboothd
BIN
res/proboothd
Binary file not shown.
|
@ -18,6 +18,24 @@
|
|||
jsr ROM_NORMAL
|
||||
jsr ROM_IN0
|
||||
jsr ROM_PR0
|
||||
; print text title in same place as graphical title will appear
|
||||
ldy #9
|
||||
- lda TOTAL-1,y
|
||||
ora #$80
|
||||
sta $04B7-1,y
|
||||
dey
|
||||
bne -
|
||||
ldy #11
|
||||
- lda REPLAY-1,y
|
||||
ora #$80
|
||||
sta $0536-1,y
|
||||
dey
|
||||
bne -
|
||||
|
||||
; proboothd duplicates the above code and jumps here,
|
||||
; so if you make any changes before this comment, you
|
||||
; MUST adjust the final JMP in src/proboothd/proboothd.a
|
||||
|
||||
jsr Has64K ; check for 64K (required)
|
||||
bcc +
|
||||
|
||||
|
@ -68,20 +86,6 @@
|
|||
+ lda #$FF
|
||||
sta zpCharMask
|
||||
|
||||
; print text title in same place as graphical title will appear
|
||||
ldy #8
|
||||
- lda TOTAL,y
|
||||
ora #$80
|
||||
sta $04B7,y
|
||||
dey
|
||||
bpl -
|
||||
ldy #10
|
||||
- lda REPLAY,y
|
||||
ora #$80
|
||||
sta $0536,y
|
||||
dey
|
||||
bpl -
|
||||
|
||||
; increase text window width so we can print to the edge of the screen without scrolling
|
||||
inc $21
|
||||
; print version or build number in lower right corner
|
||||
|
|
194
src/proboothd/proboothd.a
Normal file
194
src/proboothd/proboothd.a
Normal file
|
@ -0,0 +1,194 @@
|
|||
;license:BSD-3-Clause
|
||||
;minimal open/read binary file in ProDOS filesystem
|
||||
;copyright (c) Peter Ferrie 2016-2019
|
||||
!cpu 6502
|
||||
!to "proboothd",plain
|
||||
*=$800
|
||||
|
||||
;zpage usage, arbitrary selection except for the "ProDOS constant" ones
|
||||
command = $42 ;ProDOS constant
|
||||
unit = $43 ;ProDOS constant
|
||||
adrlo = $44 ;ProDOS constant
|
||||
adrhi = $45 ;ProDOS constant
|
||||
bloklo = $46 ;ProDOS constant
|
||||
blokhi = $47 ;ProDOS constant
|
||||
|
||||
A2L = $3e
|
||||
A2H = $3f
|
||||
sizehi = $53
|
||||
|
||||
;constants
|
||||
scrn2p2 = $f87b
|
||||
dirbuf = $1e00 ;for size-optimisation
|
||||
|
||||
!byte 1
|
||||
txa
|
||||
pha
|
||||
|
||||
; put machine in a known state, clear screen
|
||||
|
||||
cld
|
||||
bit $c082
|
||||
sta $c00e
|
||||
sta $c00c
|
||||
sta $c000
|
||||
sta $c002
|
||||
sta $c004
|
||||
jsr $fb2f
|
||||
jsr $fc58
|
||||
jsr $fe84
|
||||
jsr $fe89
|
||||
jsr $fe93
|
||||
|
||||
; print title
|
||||
|
||||
ldy #9
|
||||
- lda TOTAL-1,y
|
||||
ora #$80
|
||||
sta $04B7-1,y
|
||||
dey
|
||||
bne -
|
||||
ldy #11
|
||||
- lda REPLAY-1,y
|
||||
ora #$80
|
||||
sta $0536-1,y
|
||||
dey
|
||||
bne -
|
||||
pla
|
||||
tax
|
||||
; X = boot slot x16
|
||||
; Y = 0
|
||||
|
||||
; set up ProDOS shim
|
||||
|
||||
- txa
|
||||
jsr scrn2p2
|
||||
and #7
|
||||
ora #$c0
|
||||
sta $be30, y
|
||||
sta slot+2
|
||||
sta entry+2
|
||||
slot lda $cfff
|
||||
sta entry+1
|
||||
lda fakeMLI_e-$100, y
|
||||
sta $be00+fakeMLI_e-fakeMLI, y
|
||||
iny
|
||||
bne -
|
||||
sty adrlo
|
||||
stx $bf30
|
||||
sty $200
|
||||
|
||||
opendir ;read volume directory key block
|
||||
ldx #2
|
||||
|
||||
;include volume directory header in count
|
||||
|
||||
firstent lda #>dirbuf
|
||||
sta adrhi
|
||||
sta A2H
|
||||
jsr seekread
|
||||
lda #4
|
||||
sta A2L
|
||||
nextent ldy #0
|
||||
|
||||
;match name lengths before attempting to match names
|
||||
|
||||
lda (A2L), y
|
||||
and #$0f
|
||||
tax
|
||||
inx
|
||||
- cmp filename, y
|
||||
beq foundname
|
||||
|
||||
;move to next directory in this block
|
||||
|
||||
clc
|
||||
lda A2L
|
||||
adc #$27
|
||||
sta A2L
|
||||
bcc +
|
||||
|
||||
;there can be only one page crossed, so we can increment instead of adc
|
||||
|
||||
inc A2H
|
||||
+ cmp #$ff ;4+($27*$0d)
|
||||
bne nextent
|
||||
|
||||
;read next directory block when we reach the end of this block
|
||||
|
||||
ldx dirbuf+2
|
||||
ldy dirbuf+3
|
||||
bcs firstent
|
||||
|
||||
foundname
|
||||
iny
|
||||
lda (A2L), y
|
||||
dex
|
||||
bne -
|
||||
stx $ff
|
||||
|
||||
;cache KEY_POINTER
|
||||
|
||||
ldy #$11
|
||||
lda (A2L), y
|
||||
tax
|
||||
iny
|
||||
lda (A2L), y
|
||||
tay
|
||||
|
||||
readfile jsr seekread
|
||||
inc adrhi
|
||||
inc adrhi
|
||||
|
||||
;fetch data block and read it
|
||||
|
||||
blockind ldy $ff
|
||||
inc $ff
|
||||
ldx dirbuf, y
|
||||
lda dirbuf+256, y
|
||||
tay
|
||||
bne readfile
|
||||
txa
|
||||
bne readfile
|
||||
|
||||
readdone jmp $203b
|
||||
|
||||
seekread stx bloklo
|
||||
sty blokhi
|
||||
lda #1
|
||||
sta command
|
||||
lda adrhi
|
||||
pha
|
||||
entry jsr $d1d1
|
||||
pla
|
||||
sta adrhi
|
||||
rts
|
||||
|
||||
fakeMLI bne retcall
|
||||
readblk dey
|
||||
dey
|
||||
sty adrhi
|
||||
tay
|
||||
jsr $bf00+seekread-fakeMLI
|
||||
retcall pla
|
||||
tax
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
txa
|
||||
pha
|
||||
rts
|
||||
fakeMLI_e
|
||||
|
||||
filename
|
||||
!byte filename_e - filename_b
|
||||
filename_b
|
||||
!text "LAUNCHER.SYSTEM" ;your start-up file, file is max 40kb
|
||||
filename_e
|
||||
TOTAL
|
||||
!text "T O T A L"
|
||||
REPLAY
|
||||
!text "R E P L A Y"
|
||||
|
||||
*=$9f8
|
||||
!byte $D3,$C1,$CE,$A0,$C9,$CE,$C3,$AE
|
|
@ -1,150 +0,0 @@
|
|||
;license:BSD-3-Clause
|
||||
;minimal open/read binary file in ProDOS filesystem
|
||||
;copyright (c) Peter Ferrie 2016-2019
|
||||
!cpu 6502
|
||||
!to "proboothd",plain
|
||||
*=$800
|
||||
|
||||
;zpage usage, arbitrary selection except for the "ProDOS constant" ones
|
||||
command = $42 ;ProDOS constant
|
||||
unit = $43 ;ProDOS constant
|
||||
adrlo = $44 ;ProDOS constant
|
||||
adrhi = $45 ;ProDOS constant
|
||||
bloklo = $46 ;ProDOS constant
|
||||
blokhi = $47 ;ProDOS constant
|
||||
|
||||
A2L = $3e
|
||||
A2H = $3f
|
||||
sizehi = $53
|
||||
|
||||
;constants
|
||||
scrn2p2 = $f87b
|
||||
dirbuf = $1e00 ;for size-optimisation
|
||||
|
||||
!byte 1
|
||||
tay
|
||||
- txa
|
||||
jsr scrn2p2
|
||||
and #7
|
||||
ora #$c0
|
||||
sta $be30, y
|
||||
sta slot+2
|
||||
sta entry+2
|
||||
slot lda $cfff
|
||||
sta entry+1
|
||||
|
||||
lda fakeMLI_e-$100, y
|
||||
sta $be00+fakeMLI_e-fakeMLI, y
|
||||
iny
|
||||
bne -
|
||||
sty adrlo
|
||||
stx $bf30
|
||||
sty $200
|
||||
|
||||
opendir ;read volume directory key block
|
||||
ldx #2
|
||||
|
||||
;include volume directory header in count
|
||||
|
||||
firstent lda #>dirbuf
|
||||
sta adrhi
|
||||
sta A2H
|
||||
jsr seekread
|
||||
lda #4
|
||||
sta A2L
|
||||
nextent ldy #0
|
||||
|
||||
;match name lengths before attempting to match names
|
||||
|
||||
lda (A2L), y
|
||||
and #$0f
|
||||
tax
|
||||
inx
|
||||
- cmp filename, y
|
||||
beq foundname
|
||||
|
||||
;move to next directory in this block
|
||||
|
||||
clc
|
||||
lda A2L
|
||||
adc #$27
|
||||
sta A2L
|
||||
bcc +
|
||||
|
||||
;there can be only one page crossed, so we can increment instead of adc
|
||||
|
||||
inc A2H
|
||||
+ cmp #$ff ;4+($27*$0d)
|
||||
bne nextent
|
||||
|
||||
;read next directory block when we reach the end of this block
|
||||
|
||||
ldx dirbuf+2
|
||||
ldy dirbuf+3
|
||||
bcs firstent
|
||||
|
||||
foundname iny
|
||||
lda (A2L), y
|
||||
dex
|
||||
bne -
|
||||
stx $ff
|
||||
|
||||
;cache KEY_POINTER
|
||||
|
||||
ldy #$11
|
||||
lda (A2L), y
|
||||
tax
|
||||
iny
|
||||
lda (A2L), y
|
||||
tay
|
||||
|
||||
readfile jsr seekread
|
||||
inc adrhi
|
||||
inc adrhi
|
||||
|
||||
;fetch data block and read it
|
||||
|
||||
blockind ldy $ff
|
||||
inc $ff
|
||||
ldx dirbuf, y
|
||||
lda dirbuf+256, y
|
||||
tay
|
||||
bne readfile
|
||||
txa
|
||||
bne readfile
|
||||
|
||||
readdone jmp $2000
|
||||
|
||||
seekread stx bloklo
|
||||
sty blokhi
|
||||
lda #1
|
||||
sta command
|
||||
lda adrhi
|
||||
pha
|
||||
entry jsr $d1d1
|
||||
pla
|
||||
sta adrhi
|
||||
rts
|
||||
|
||||
fakeMLI bne retcall
|
||||
readblk dey
|
||||
dey
|
||||
sty adrhi
|
||||
tay
|
||||
jsr $bf00+seekread-fakeMLI
|
||||
retcall pla
|
||||
tax
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
txa
|
||||
pha
|
||||
rts
|
||||
fakeMLI_e
|
||||
|
||||
filename !byte filename_e - filename_b
|
||||
filename_b !text "LAUNCHER.SYSTEM" ;your start-up file, file is max 40kb
|
||||
filename_e
|
||||
|
||||
*=$9f8
|
||||
!byte $D3,$C1,$CE,$A0,$C9,$CE,$C3,$AE
|
Loading…
Reference in New Issue
Block a user