a bit smaller again
This commit is contained in:
parent
aba91066db
commit
7aa5f52b5d
|
@ -40,7 +40,7 @@ inputfilebuffer
|
|||
Start
|
||||
ldx #(CodeEnd-CodeStart)-1; copy code to lower memory so we can load graphic at $2000
|
||||
- lda CodeStart,x
|
||||
sta $00fe,x
|
||||
sta $00f8,x
|
||||
dex
|
||||
bpl -
|
||||
txs
|
||||
|
@ -53,59 +53,59 @@ Start
|
|||
+ jmp MLI ; exit via MLI (stack is arranged to execute Open MLI call)
|
||||
|
||||
CodeStart
|
||||
!pseudopc $fe {
|
||||
!word $2000 ; used by main->aux copy loop
|
||||
!pseudopc $f8 {
|
||||
softswitches
|
||||
!byte $50,$52,$54,$57,$0d
|
||||
|
||||
mliParamForClose
|
||||
!byte kMLICloseCount
|
||||
!byte 0 ; close all files, also low part of pointer
|
||||
|
||||
!byte $20 ; used by main->aux copy loop
|
||||
!word Open-1 ; on stack for first MLI call
|
||||
Open
|
||||
!byte kMLIOpen ; stack-based params for Open MLI call
|
||||
!word mliParamForOpen
|
||||
jsr Read1 ; read first half of graphic (belongs in auxmem)
|
||||
bcs Close ; error during open or read? close & quit
|
||||
ldx #kMLIReadOrQuitCount ; they just happen to be the same number
|
||||
stx mliparam
|
||||
jsr Read ; read first half of graphic (belongs in auxmem)
|
||||
; does not return if error
|
||||
;DHGRCopy
|
||||
sta $C00A
|
||||
sta $C000
|
||||
sta $C005 ; read from mainmem, write to auxmem
|
||||
- lda ($ff,x) ; ($fe) because X is #$FF
|
||||
sta ($ff,x)
|
||||
- lda ($fe-kMLIReadOrQuitCount,x)
|
||||
sta ($fe-kMLIReadOrQuitCount,x)
|
||||
inc $fe
|
||||
bne -
|
||||
inc $ff
|
||||
bit $ff ; copy until $4000
|
||||
bvc -
|
||||
sta $C004 ; read/write from mainmem
|
||||
jsr Read2 ; read second half of graphic (stays in main memory)
|
||||
Close
|
||||
php ; save MLI result
|
||||
jsr MLI ; close all files
|
||||
!byte kMLIClose
|
||||
!word mliParamForClose
|
||||
plp ; restore MLI result
|
||||
bcs Quit ; any error? quit without displaying
|
||||
jsr Read ; read second half of graphic (stays in main memory)
|
||||
; does not return if error
|
||||
;DHGRShow
|
||||
lda $C05E ; DHGR mode
|
||||
sta $C00D
|
||||
bit $C050
|
||||
bit $C054
|
||||
bit $C052
|
||||
bit $C057
|
||||
- ldy softswitches,x
|
||||
sta $c000,y ; enable graphics display
|
||||
dex
|
||||
bpl -
|
||||
;WaitForKey
|
||||
- lda $C000
|
||||
bpl -
|
||||
Close
|
||||
jsr MLI ; close all files
|
||||
!byte kMLIClose
|
||||
!word mliParamForClose
|
||||
Quit
|
||||
lsr mlicmd ; MLI_QUIT ($65) is half of MLI_READ ($CA) so that's great
|
||||
Read1
|
||||
ldy #kMLIReadOrQuitCount
|
||||
sty mliparam
|
||||
Read2
|
||||
Read
|
||||
jsr MLI
|
||||
mlicmd !byte kMLIRead
|
||||
!word mliparam
|
||||
bcs Close ; error during open or read? close & quit
|
||||
rts
|
||||
|
||||
mliParamForClose
|
||||
!byte kMLICloseCount
|
||||
!byte 0 ; close all files
|
||||
|
||||
mliParamForOpen
|
||||
!byte kMLIOpenCount
|
||||
!word inputfilebuffer
|
||||
|
|
Loading…
Reference in New Issue