diff --git a/firmware/HDD/HDDRVR.BIN b/firmware/HDD/HDDRVR.BIN index b579e843..e5c8b10c 100644 Binary files a/firmware/HDD/HDDRVR.BIN and b/firmware/HDD/HDDRVR.BIN differ diff --git a/firmware/HDD/hddrvr.a65 b/firmware/HDD/hddrvr.a65 index fc750587..3cc089f7 100644 --- a/firmware/HDD/hddrvr.a65 +++ b/firmware/HDD/hddrvr.a65 @@ -34,6 +34,7 @@ ; . GH#370 (Robert Hoem, 27 Oct 2016): ; . Added a check against open-apple during boot to route boot to slot 6 ; . This happens after the first two blocks are loaded from the HD. +; . GH#319: smartport return address wrong when crossing page ; TODO: ; . Make code relocatable (so HDD controller card can go into any slot) ; . Remove support for Entrypoint_C746 (old AppleWin) & Entrypoint_C761 (Apple Oasis) @@ -108,14 +109,7 @@ Bootstrap ; error capturing code. Applewin is picky ; about code assigning data to registers and ; memory. The safest method is via I/O port - pha - lda hd_error - clc - cmp #1 - bne noerr0 - sec -noerr0 - pla + ror hd_error ; Post: C=0 or 1 bcc hdboot ; no image ready, boot diskette image instead @@ -129,12 +123,14 @@ BootSlot6 SmartPort pla sta $46 + adc #3 ; Pre: C=0, Post: C=0 or 1 + tay pla - sta $47 ; ($47) = &cmd_hdr + sta $47 ; ($46) = &cmd_hdr + adc #0 pha - lda $46 - adc #3 ; Pre: C=0, Post: assume C=0 - pha ; (sp).w += 3 + tya + pha ; (sp).w += 3 ldy #1 lda ($46),y ; cmd @@ -143,7 +139,7 @@ SmartPort bne SmartPort2 ;====================================== -; 2 unused bytes +; 8 unused bytes *= $c746 ; org $c746 @@ -237,12 +233,7 @@ cmdproc bne skipSread jsr sread skipSread - lda hd_error - clc - cmp #1 - bne noerr2 - sec -noerr2 + ror hd_error ; Post: C=0 or 1 pla rts @@ -253,7 +244,7 @@ noerr2 ; the emulated code increments the buffer by 1 on each read) to (memblock),y ; increment memblock+1 and read the second 256 bytes via hd_nextbyte. ; -; if I could figure out how to consistantly get applewin to update it's memory regions all +; if I could figure out how to consistently get applewin to update it's memory regions all ; this code can be moved into the emulation code (although, this is how I'd build the hardware ; anyway...) @@ -299,7 +290,7 @@ SmartPort3 bne cmdproc ;====================================== -; 12 unused bytes +; 18 unused bytes !zone data diff --git a/resource/Hddrvr.bin b/resource/Hddrvr.bin index b579e843..e5c8b10c 100644 Binary files a/resource/Hddrvr.bin and b/resource/Hddrvr.bin differ