mirror of
https://github.com/a2-4am/passport.git
synced 2024-08-21 21:29:01 +00:00
Merge pull request #14 from peterferrie/master
important bug fixes to Optimum patcher
This commit is contained in:
commit
100b8c00d0
@ -1,6 +1,7 @@
|
||||
;-------------------------------
|
||||
; YE OLDE GRAND UNIFIED MEMORY MAP
|
||||
;
|
||||
; 02D8..038D - clobbered by Optimum reader
|
||||
; 0800..08FF - clobbered by all boot tracers
|
||||
; 0900..09FF - clobbered by Special Delivery tracer
|
||||
; 0A00..0AFF - backup of zero page during Special Delivery tracer
|
||||
|
@ -96,6 +96,7 @@ flag = $FF ; byte
|
||||
; Application constants (not zero addresses)
|
||||
RELBASE = $6800 ; address to move Passport code
|
||||
; so that it's out of the way
|
||||
LOWPOINT = $4300 ; lowest available address for code
|
||||
BASEPAGE = $10 ; Special Delivery tracer assumes
|
||||
; this is $10, so don't change it!
|
||||
TRUE = $00 ; Lots of code assumes this is $00
|
||||
@ -798,3 +799,6 @@ LastMover
|
||||
!if ($B500 - ((255 + LastMover - FirstMover) & $FF00)) != RELBASE {
|
||||
!serious "RELBASE requires adjustment to ", ($B500 - ((255 + LastMover - FirstMover) & $FF00))
|
||||
}
|
||||
!if ($B500 - ((255 + LastMover - FirstMover) & $FF00)) < LOWPOINT {
|
||||
!serious "code is too large to fit in available space!"
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ _optimum
|
||||
lda #$2C
|
||||
sta $BE40
|
||||
|
||||
;read T01S0F
|
||||
;read T01S0F, remains encoded at $BB00-BC55
|
||||
|
||||
lda gTrack
|
||||
pha
|
||||
@ -109,7 +109,7 @@ _optimum
|
||||
ora ($D110-$96)-$16,x
|
||||
sty $2C
|
||||
ldy $26
|
||||
sta $B600,y
|
||||
sta $300,y
|
||||
ldy $2C
|
||||
bne +
|
||||
dec .tblsel1+2
|
||||
@ -138,8 +138,6 @@ _optimum
|
||||
;track 0, find the region with replaced page
|
||||
|
||||
.reread1
|
||||
lda #s_construct
|
||||
jsr PrintByID
|
||||
ldy #8
|
||||
jsr SearchTrack
|
||||
!byte $20,$5D,$B6 ;JSR $B65D
|
||||
@ -149,6 +147,8 @@ _optimum
|
||||
adc #BASEPAGE
|
||||
sta .patch1+2
|
||||
sta .patch2+2
|
||||
lda #s_construct
|
||||
jsr PrintByID
|
||||
|
||||
;convert address to track/sector
|
||||
|
||||
@ -180,6 +180,8 @@ _optimum
|
||||
|
||||
;read replaced page
|
||||
|
||||
lda #9 ; $900-9FF
|
||||
sta gAddress+1
|
||||
ldy #<gRWTSParams
|
||||
lda #>gRWTSParams
|
||||
jsr $BD00
|
||||
@ -187,8 +189,8 @@ _optimum
|
||||
;merge content
|
||||
|
||||
ldy #$86
|
||||
- lda $B600,y
|
||||
sta (BASEPAGE+$0F)*256,y
|
||||
- lda $300,y
|
||||
sta $900,y
|
||||
dey
|
||||
cpy #$FF
|
||||
bne -
|
||||
@ -198,14 +200,14 @@ _optimum
|
||||
lda #1
|
||||
sta gTrack
|
||||
sta gSector
|
||||
dec gAddress+1
|
||||
dec gAddress+1 ; and $800-8FF
|
||||
ldy #<gRWTSParams
|
||||
lda #>gRWTSParams
|
||||
jsr $BD00
|
||||
|
||||
;write replaced block
|
||||
|
||||
lda #(BASEPAGE+$0E)
|
||||
lda #8 ; $800-9FF
|
||||
sta mliparam+3 ; hi byte of data buffer
|
||||
dec mliparam+4 ; lo byte of block number
|
||||
jsr SwapProDOS
|
||||
@ -214,18 +216,11 @@ _optimum
|
||||
jsr mli
|
||||
jsr SwapProDOS
|
||||
|
||||
;restore original pages
|
||||
;restore original disk location
|
||||
|
||||
dec gTrack
|
||||
inc gSector
|
||||
ldy #<gRWTSParams
|
||||
lda #>gRWTSParams
|
||||
jsr $BD00
|
||||
inc gSector
|
||||
inc gAddress+1
|
||||
ldy #<gRWTSParams
|
||||
lda #>gRWTSParams
|
||||
jsr $BD00
|
||||
dec gTrack ; #0
|
||||
lda #$0F
|
||||
sta gSector
|
||||
|
||||
.exit
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ StringTable
|
||||
; can be set directly before calling PrintByID.
|
||||
;
|
||||
.header
|
||||
!text "Passport by 4am 2017-02-12",00
|
||||
!text "Passport by 4am 2017-02-14",00
|
||||
.mainmenu
|
||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||
!text " "
|
||||
|
Loading…
Reference in New Issue
Block a user