amiga-news DEUTSCHE VERSION
.
Links| Forums| Comments| Report news
.
Chat| Polls| Newsticker| Archive
.

[Login] [Register] [Forgot your password??]

< Next messagePrior message >
12.May 2008



AmigaOS 3.9: scsi.device-patch for LBA48-support (update)
Download: scsi.device.lba48.pch.zip (335 Bytes)

Update: Meanwhile this fix was integrated in Christian Sauer's scsi.device-patch which has been available on Aminet for a while and which fixes another bug.

WinUAE-author Toni Wilen wrote:
"I found something interesting when I was implementing LBA48 support to IDE emulation. OS3.9BB2 scsi.device (v43.43) does have LBA48 support but it has bug that freezes or crashes the Amiga..

I fixed the bug (patch details below) and now (at least in emulation) my A1200 IDE 160G test hard file works perfectly with full capacity.

This may also fix common v43.43 scsi.device boot freeze if drive has LBA48 support. (but older scsi.device versions work). Confirmation needed.

Patch is compatible with all v43.43 scsi.devices (A600/A1200/A4000)

Please test if you have >128G IDE drive and/or you have boot freeze without NOROMUPDATES or SKIPROMUPDATES scsi.device

Patch offsets in OS39BB2 "ROM Updates" file (near "Conner Peripherals 20MB - CP2024" string)
31A2C
358AC
3DACA

Old values:
43FA 000E 3219 B001 66FA E049 3001 4E75
0220 02C4 0430 04C5 02EC 0450 0070 0010
0091 00C6 0040 0090 0000

New values:
43FA 0018 7200 0C11 00FF 6606 5289 1219
6704 B019 66F0 3001 4E75 FF02 C429 2024
ECFF 04C5 3930 3450 FF00

Also spatch-patch file attached if you don't want to do manual patching (patches OS39BB2 "DEVS:AmigaOS ROM Update". Remember backups) WARNING: Patching HD drivers is always dangerous, data loss is always possibility.

Next follows my random notes, no need to understand this

Old code that returns garbage after LBA48 command:
10FEF2A0 43fa 000e LEA.L (PC,$000e) == $10fef2b0,A1
10FEF2A4 3219 MOVE.W (A1)+,D1
10FEF2A6 b001 CMP.B D1,D0
10FEF2A8 66fa BNE.B #$fffffffa == $10FEF2A4
10FEF2AA e049 LSR.W #$00000008,D1
10FEF2AC 3001 MOVE.W D1,D0
10FEF2AE 4e75 RTS.L

10FEF2B0 0220 02C4 0430 04C5 02EC 0450 0070 0010
10FEF2C0 0091 00C6 0040 0090 0000

20 = read sectors
c4 = read multiple
30 = write sectors
c5 = write multiple
ec = identify drive
50 = format
70 = seek
10 = recalibrate
91 = initialize drive parameters
c6 = set multiple mode
40 = read verify sectors
90 = execute drive diagnostics
00 = nop

New code (different because space was really tight..)
43FA 0018 lea data(pc),a1
7200 moveq #0,d1
0C11 00FF l1 cmp.b #$ff,(a1)
6606 bne.s l2
5289 addq.l #1,a1
1219 move.b (a1)+,d1
6704 beq.s l3
B019 l2 cmp.b (a1)+,d0
66F0 bne.s l1
3001 l3 move.w d1,d0
4E75 rts
dat dc.b 0xff,0x02,0xc4,0x29,0x20,0x24,0xec
dc.b 0xff,0x04,0xc5,0x39,0x30,0x34,0x50
dc.b 0xff,0x00

This adds following missing LBA48 commands:
29 = read multiple ext
39 = write multiple ext
24 = read sectors ext
34 = write sectors ext

Meaning of this table is to return 2 (if read command), 4 (if write command) or 0 (no data). Someone simply forgot to add new LBA48 commands to this table when LBA48 support was implemented.." (cg) (Translation: dr)

[News message: 12. May 2008, 19:21] [Comments: 0]
[Send via e-mail]  [Print version]  [ASCII version]
< Next messagePrior message >

.
Masthead | Privacy policy | Netiquette | Advertising | Contact
Copyright © 1998-2021 by amiga-news.de - all rights reserved.
.