View Single Post
Old 09 July 2017, 19:09   #84
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
Quote:
Originally Posted by mark_k View Post
[I'll try to get around to creating an HDF with manually-edited BABE sector which will hopefully show >512-bytes/sector FFS partition with BufMemType specified working on A2090 with Kickstart 2.0+]
HDF and config:
Code:
https://www.media!fire.com/?hb251tqcmn3hml8
https://www.media!fire.com/?xzvsd2o35vxlgh6
The HDF is 40MB, single FFS partition boots to WB with Kickstart 3.1. Points to note:
- BABE info is in sector 60. Drive geometry C/H/S is 1280/4/16
- There are no BAD1/BAD2 sectors.
- The partition is FFS with 2KB block size. Fake geometry in the DosEnvec for block size 2KB is lowcyl 1, highcyl 1279 surfaces 1, blocks per track 16.
- I extended the DosEnvec structure to specify BufMemType (=MEMF_24BITDMA), Mask 0xFFFFFE. I tried varying MaxTransfer values, see below.

While the HDF seems to boot successfully to WB, something does go wrong. You can see that if you open a CLI and do e.g.
Copy Tools/BRU RAM: BUF=131072
The emulated machine doesn't hang or crash, but the command doesn't complete. As if hddisk.device got confused waiting for something.

Also, instead of booting from HD boot from a WB 3.1 floppy disk. The HD partition shows up on WB as it should. Open a CLI and do
Format DRIVE DH2: NAME whatever FFS
The format proceeds, until it says formatting cylinder 1000 at which point it doesn't get any further (as if hddisk is waiting for something that never happens).

I tried decreasing MaxTransfer (not below 32KB though), that didn't seem to improve things.


Edit to add: Possible explanation for the Format problem? Does Format issue TD_FORMAT commands, or just TD_WRITE? Due to the fake geometry values I used, LBA 65536 falls on a track/cylinder boundary. hddisk.device has a bug in the way it handles FORMAT TRACK commands to SCSI drives. It's supposed to check if the LBA in the command block is 0, if not it's basically a no-op (I think). [If LBA=0 then it issues MODE SELECT and FORMAT UNIT commands as mentioned before in this thread.] The bug is that it just tests the word at offset 2 in the command block, which is the low 16 bits of LBA. Hence things go awry when LBA=65536.

That doesn't explain the problem I had with Copy hanging though.

Last edited by mark_k; 09 July 2017 at 21:37.
mark_k is online now  
 
Page generated in 0.04590 seconds with 11 queries