Page 4 of 14

Re: Trudie - The Next IDE Board

Posted: Tue Aug 06, 2019 5:38 pm
by exxos
PhilC wrote: Tue Aug 06, 2019 5:00 pm Just a shot in the dark as I've not used CUPL yet but if it uses subroutines, is it possible you've missed a return or something?
Cupl is pretty logical and simple so can't really do much wrong. There must be more to it than just swapping data, but I have no idea what. so as it stands, the feature will have to be abandoned :(

Re: Trudie - The Next IDE Board

Posted: Tue Aug 06, 2019 6:30 pm
by PhilC
Nah, not abandoned. available in a future update. It's what I do with my PLC stuff. Get the basics working really well, then work on the problems.

Nothing wrong with having to work on features after you've got the board running. Maybe you need an extra pair if eyes on the problem? (Not volunteering as I haven't learned simple gal stuff yet)

Re: Trudie - The Next IDE Board

Posted: Wed Aug 07, 2019 9:20 am
by exxos
A thought did pop in my head during the night.. I never checked if files would load even though then filenames were wrong..

I have a feeling that things might be right, but, the FAT tables shouldn't be byte swapped. That's OK in theory , it would explain a few things.. But how the heck would hardware work out where FAT tables are stored on the drive ?! :roll:

Edit:

So what I read so far is FAT is fixed at the start of the partition . I guess this theory also explains why HD10 is moaning about issues writing to the boot sector as that shouldn't be swapped either.

Assuming PCs can't use more than 1 partition on a CF card (maybe someone knows ?) Then it may be possible to turn off byte swapping during the first few sectors on then drive, or basically root and FAT sectors.

I think as the filenames on ST & PC both end up the same, I that it proves they are already both in the same format already, and not swapping them is the correct way. But the actual data needs to be swapped... and of course the command registers etc remain not-swapped also.

Re: Trudie - The Next IDE Board

Posted: Wed Aug 07, 2019 11:12 am
by mfro
exxos wrote: Wed Aug 07, 2019 9:20 am Assuming PCs can't use more than 1 partition on a CF card (maybe someone knows ?)
A limitation that (Windows-) PC's only have until Win 7 for hot-swappable media. On earlier versions, there are alternatives/extensions available. Windows 10 removes this limitation as well.

So probably nothing you should rely on.

Re: Trudie - The Next IDE Board

Posted: Wed Aug 07, 2019 11:16 am
by exxos
mfro wrote: Wed Aug 07, 2019 11:12 am A limitation that (Windows-) PC's only have until Win 7 for hot-swappable media. On earlier versions, there are alternatives/extensions available. Windows 10 removes this limitation as well.

So probably nothing you should rely on.
Good to know. Would probably just have to be a limitation on the ST side to 1 partition which is PC compatible. With multiple partitions, I doubt there would be a easy to work out where each partition starts.

I tried to do 2 partitions on win7 and couldn't see any way to do it. Disk manager doesn't even list the options for partitions, pretty much only drive letter and format :shrug:

EDIT:

I guess if fixed partition sizes were used like 256MB each, then that could probably work as long as things remained consistent as the FAT locations would have to be hardwired into the PLD logic. Though that's a problem for another day anyway. Getting 1 working would be a huge success.

Re: Trudie - The Next IDE Board

Posted: Wed Aug 07, 2019 9:20 pm
by exxos
I created a new partition on the ST (no byte swapping) just to see what data I get back. I saved "NEWDESK.INF" which appears in sector 260. So I need to work out at what point it needs to be byteswapped.

I also need to work out where the FAT starts and ends on each sector...

2.JPG
2.JPG (190.91 KiB) Viewed 6033 times
6.JPG
6.JPG (189.52 KiB) Viewed 6033 times
63.JPG
63.JPG (191.38 KiB) Viewed 6033 times
64.JPG
64.JPG (191.88 KiB) Viewed 6033 times
68.JPG
68.JPG (189.82 KiB) Viewed 6033 times
164.JPG
164.JPG (190.61 KiB) Viewed 6033 times
260.JPG
260.JPG (191.14 KiB) Viewed 6033 times

So far it looks like byteswapping appears to start at sector 63....

Next I will do a software byteswapped to see what changes in the data...
(this now works on ST & PC)
s0.JPG
s0.JPG (190.87 KiB) Viewed 6030 times
s1.JPG
s1.JPG (190.94 KiB) Viewed 6030 times
s5.JPG
s5.JPG (189.66 KiB) Viewed 6030 times
s101.JPG
s101.JPG (189.97 KiB) Viewed 6030 times
s197.JPG
s197.JPG (190.26 KiB) Viewed 6030 times

So sector numbers have changed... NEWDESK.INF is now "readable" on sector 197... before it was "unreadable" on sector 260.. odd...


A better side by side comparison...

ST_PC.JPG
ST_PC.JPG (197.69 KiB) Viewed 6028 times
ST_PC2.JPG
ST_PC2.JPG (190.2 KiB) Viewed 6028 times
ST_PC3.JPG
ST_PC3.JPG (195.26 KiB) Viewed 6027 times

So it looks like the first sectors are not swapped, but the later sectors are swapped...


I've dumped the ST and PC partitions here (first 300 sectors) as may need them later on..
dump from sector 0 (300 sectors).zip
(1.84 KiB) Downloaded 162 times

Re: Trudie - The Next IDE Board

Posted: Sun Aug 11, 2019 10:40 am
by exxos
Small update. I have come up with a solution to fix the issue above but I need to route all the datalines to the PLD :roll: Thankfully Icky has already done that , so we are looking at a re-spin of the board. So likely will be a few weeks before there is any more news on the project.

Re: Trudie - The Next IDE Board

Posted: Sun Aug 11, 2019 11:01 am
by PhilC
Good to hear this is still progressing well. :dualthumbup:

Re: Trudie - The Next IDE Board

Posted: Sun Aug 11, 2019 5:35 pm
by exxos
PhilC wrote: Sun Aug 11, 2019 11:01 am Good to hear this is still progressing well. :dualthumbup:
Yeah, doesn't seem to be any issues with the board over the previous IDE board. Though I have noticed a really odd "bug" which even atmel can't currently seems to figure out yet. This "bug" is actually in the previous IDE design as well, just I didn't notice it until recently :roll:

We still need to sort out the slave channel, but with my store things going on now, I'm not going to have much time to work on such things for a bit. But will try and get the slave working this week at some point.

Re: Trudie - The Next IDE Board

Posted: Sat Nov 30, 2019 4:29 pm
by exxos
Just a quick note to say the project isnt dead :) now the H4 and web store is out of the way, I hope to get back to this over Xmas :)