English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 06 July 2017, 18:27   #81
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
Quote:
Originally Posted by Toni Wilen View Post
Partition table support added, bad blocks are currently ignored. (Which means in other words: need example image with bad blocks that replaces in use blocks )
Code:
https://www.media!fire.com/?3z65mt8ie5irqn3
HDF with some bad block entries and freshly formatted OFS partition. I only added four bad block entries. HighCyl of the OFS partition is 99. Installing A-Max and Mac OS in the rest is left as an exercise for the reader. There are a couple of bad block entries in the rest-of-disk region, which in theory the A-Max AMHD should handle.

If you load the HDF into a hex editor, BAD1 data in sector 1:
BAD1 0004 00000002 00000102 00000003 00000984 00000006 00001464 00000005 000028DA 00000004 7FFFFFFF 7FFFFFFF

0004 --> 4 bad block entries
00000002 --> LBA of BAD2 sector
Then four bad block entries: original/"bad" LBA followed by replacement LBA. For some reason Prep didn't use spare sectors in increasing order (3 then 6 then 5 then 4)???
Prep puts two $7FFFFFFF to terminate the list, but (from memory) hddisk.device doesn't require that.

hddisk expects the list to be sorted by original LBA. I don't think hddisk supports multiple/chained bad blocks, or marking blocks as bad automatically if it encounters a read or write error.

End of BAD2 sector:
00000007 00C5 BAD2

00000007 --> Next replacement sector LBA
00C5 --> Number of remaining spare sectors

Last edited by mark_k; 06 July 2017 at 19:01.
mark_k is offline  
Old 07 July 2017, 16:50   #82
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
In the pt_babe() function you do
Code:
// blocksize != 128?
if (bufrdb[0x20] != 0 || bufrdb[0x21] != 0 || bufrdb[0x22] != 0 || bufrdb[0x23] != 0x80)
	return 0;
You shouldn't require de_SizeBlock be 128, because it is possible to have an OFS/FFS partition with block size >512 bytes (on Kickstart 2.0+).

Also:
Code:
for (int i = 0; i < 12 * 4; i++)
	trap_put_byte(ctx, parmpacket + 16 + i, bufrdb[0x1c + i]);
...
// A2090 Environment Table Size is only 11
int ts = trap_get_long(ctx, parmpacket + 16 + 0 * 4);
while (ts < 16) {
	ts++;
	if (ts == 12) // BufMem Type
		trap_put_long(ctx, parmpacket + 16 + 12 * 4, 1);
	if (ts == 13) // Max Transfer
		trap_put_long(ctx, parmpacket + 16 + 13 * 4, 0x7fffffff);
	if (ts == 14) // Mask
		trap_put_long(ctx, parmpacket + 16 + 14 * 4, 0xfffffffe);
	if (ts == 15) // BootPri
		trap_put_long(ctx, parmpacket + 16 + 15 * 4, uip->bootpri);
	if (ts == 16) // DosType
		trap_put_long(ctx, parmpacket + 16 + 16 * 4, dostype);
}
trap_put_long(ctx, parmpacket + 16 + 0 * 4, ts)
Don't assume de_TableSize is 11 in the BABE sector. It should be possible (with real/emulated A2090) to manually edit it to add fields for BufMemType etc. And I don't think the current code will work if de_TableSize happens to be >16. I assume for uaehf.device that you always want to override any BufMemType & MaxTransfer specified in the BABE sector?

[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+]

Last edited by mark_k; 07 July 2017 at 17:02.
mark_k is offline  
Old 09 July 2017, 02:08   #83
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 127
After spending many hours in my cellar, i finally found the A2000 with that mysterious Combitec-Clone from MacroSystem (it isn't in the Amiga Hardware Database)

It has a different Boot-Logo:

The hddisk.device has a different date: 15-Sep-1990 (Combitec: 31-Jan-1990)
and the FastFilesystem ist Version 36.8 (Combitec: 36.03).

I have uploaded the two splittet ROM-files plus the combined ROM in the Zone for inclusion in the ROM-Scanner

TIA
Attached Thumbnails
Click image for larger version

Name:	A2090B_MacroSystem.jpg
Views:	56
Size:	29.3 KB
ID:	53685  
sigma63 is online now  
Old 09 July 2017, 20:09   #84
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
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 22:37.
mark_k is offline  
Old 12 July 2017, 21:50   #85
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,017
Whats the point of this HDF? If it is not created by prep, it becomes undefined and anything is possible and probably it works as "designed".
Toni Wilen is offline  
Old 12 July 2017, 22:08   #86
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
What's defined is how hddisk.device handles it.

Apart from the powers-of-2 geometry in my example/test HDF (which you wouldn't use with a real drive & A2090 anyway), that technique could be useful with real hardware:
- Can boot from FFS partition with Kickstart 2.0+. (Using Prep, having an FFS first/boot partition won't work well since it doesn't set Mask or BufMemType. Even an OFS boot partition might fail with 32-bit RAM?)
- Can use >512-byte filesystem block size for better performance.


Maybe a separate thread should be created for A2090 ROM/driver bugs and patches. Are there any other fixes that would help?

For the above seemingly-broken TD_FORMAT, just patching it to act like CMD_WRITE (at least for SCSI drives) should fix it.

Someone looking to build a working real-Amiga setup with HD (and who picks up an A2090 cheaply) could burn replacement EPROMs and have a better experience (than with no HD at all ).
mark_k is offline  
Old 11 December 2017, 07:07   #87
B14ck W01f
m68k all the way
 
Join Date: Aug 2011
Location: Koalaland
Posts: 495
Nope, Mark's method of setting up the A2092 Miniscribe did not work for me. All I got was Error -1 on OpenDevice of hddisk.device (triggered after typing PREP RES0 Ironically, it did work in the A2094 Rodime. Tested using 3.6.0b10.
Attached Files
File Type: txt winuaelog.txt (13.6 KB, 22 views)
File Type: uae Amiga 2000 - MC68000 + 2MB + KS 1.3 + A2092.uae (11.0 KB, 23 views)

Last edited by B14ck W01f; 11 December 2017 at 07:14.
B14ck W01f is offline  
Old 11 December 2017, 14:36   #88
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
Can you describe how you set up your HDF and what you want to achieve? For example, you won't be able to boot from an FFS partition unless FFS is in ROM, and it isn't in Kickstart 1.3.

Your HDF seems to be too small for the geometry specified. It needs to be at least 615×4×17×512 = 21,411,840 byes long.

Prep might not like a manually-edited BABE sector depending on which changes were made.
mark_k is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide to setting up A2090a with SCSI2SD RobTurbo support.Hardware 33 03 February 2017 21:17
D3D point/bilinear setting trouble Ami_GFX support.WinUAE 4 10 December 2014 21:23
Trouble Setting up Transcend 4GB IDE Flash Disk mfletcher support.Hardware 15 07 January 2014 12:22
For Sale: A2090a SCSI HD and ST 506 Controller (Zorro2) Zetr0 MarketPlace 5 02 September 2009 11:43
Trouble setting up SCSI CD RW with CSMK3 CU_AMiGA support.Hardware 3 05 August 2008 17:51

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.07346 seconds with 15 queries