mirror of
https://github.com/a2-4am/passport.git
synced 2024-05-28 21:41:27 +00:00
shave some bytes
This commit is contained in:
parent
cefbc184a1
commit
9a10d3c006
|
@ -13,7 +13,11 @@ RAMFileName_e
|
|||
; all registers and flags clobbered
|
||||
;-------------------------------
|
||||
ScanForDiskII
|
||||
ldx #$06
|
||||
lda #$00
|
||||
- sta DiskIIArray, x
|
||||
dex
|
||||
bpl -
|
||||
sta cmp1
|
||||
ldx #$07
|
||||
- txa
|
||||
|
@ -49,7 +53,11 @@ ScanForDiskII
|
|||
; all registers and flags clobbered
|
||||
;-------------------------------
|
||||
ScanForRAMAndHardDisks
|
||||
ldy #14
|
||||
lda #$00
|
||||
- sta HardDiskArray, y
|
||||
dey
|
||||
bpl -
|
||||
sta iunit
|
||||
@nextunit
|
||||
lda iunit
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
; YE OLDE GRAND UNIFIED MEMORY MAP
|
||||
;
|
||||
; 02D8..038D - clobbered by Optimum reader
|
||||
; 038E..0394 - DiskIIArray
|
||||
; 0395..03A3 - HardDiskArray
|
||||
; 0800..08FF - clobbered by all boot tracers and RAM disk
|
||||
; 0900..09FF - clobbered by Special Delivery tracer and RAM disk
|
||||
; 0A00..0AFF - backup of zero page during Special Delivery tracer, used by RAM disk
|
||||
|
|
|
@ -446,9 +446,9 @@ _byte_skip_hi:
|
|||
!source "id/panglosdos.a"
|
||||
!source "id/davidson.a"
|
||||
!source "id/holle.a"
|
||||
!source "id/bootfailure.a"
|
||||
!source "id/phoenix.a"
|
||||
!source "id/555.a"
|
||||
!source "id/bootfailure.a"
|
||||
!source "print.a"
|
||||
!source "compare.a"
|
||||
!source "modify.a"
|
||||
|
|
27
src/slots.a
27
src/slots.a
|
@ -1,7 +1,5 @@
|
|||
DiskIIArray
|
||||
!fill 7
|
||||
HardDiskArray
|
||||
!fill 15
|
||||
DiskIIArray = $038E
|
||||
HardDiskArray = $0395
|
||||
|
||||
;-------------------------------
|
||||
; NextSlot
|
||||
|
@ -11,26 +9,22 @@ HardDiskArray
|
|||
; @gTargetType set based on type of target (see apidefs.a for values)
|
||||
;-------------------------------
|
||||
NextSlot
|
||||
lda DRIVE
|
||||
cmp #$31
|
||||
ldy #$31
|
||||
cpy DRIVE
|
||||
bne NextSlotLoop
|
||||
lda #$32 ; cycle from drive 1 to drive 2 of the same slot
|
||||
sta DRIVE
|
||||
inc DRIVE ; cycle from drive 1 to drive 2 of the same slot
|
||||
bne ThisSlot ; always branches
|
||||
NextSlotLoop
|
||||
lda #$31 ; cycle to drive 1 of the next slot
|
||||
sta DRIVE
|
||||
sty DRIVE ; cycle to drive 1 of the next slot
|
||||
inc SLOT
|
||||
ThisSlot
|
||||
lda SLOT
|
||||
cmp #$38
|
||||
bne +
|
||||
lda #$31 ; cycle from slot 7 back to slot 1
|
||||
sta SLOT
|
||||
+ sec
|
||||
sbc #$30
|
||||
tax
|
||||
lda DiskIIArray-1, x
|
||||
sty SLOT ; cycle from slot 7 back to slot 1
|
||||
tya
|
||||
+ tax
|
||||
lda DiskIIArray-$31, x
|
||||
beq @maybeHardDisk
|
||||
|
||||
lda SLOT
|
||||
|
@ -71,6 +65,7 @@ LookupUnitNumberOfSelectedHardDisk
|
|||
; then A=ProDOS unit number, Z=0
|
||||
; otherwise A=0, Z=1
|
||||
; X clobbered
|
||||
; Y preserved
|
||||
lda SLOT
|
||||
sec
|
||||
sbc #$30
|
||||
|
|
Loading…
Reference in New Issue
Block a user