English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 01 October 2019, 02:41   #1
catphish
Registered User

 
Join Date: May 2019
Location: Dorset, UK
Posts: 3
Amiga floppy checksums

I'm working on a tool to read and write Amiga disks with a PC. All is going well, but I one thing about the disk format is confusing me - the sector checksums.


Checksums appear to be calculated by xor'ing the MFM encoded data, ignoring the clock bits. The result appears to be a checksum where all odd bits are zero.


This checksum is then encoded into 2 longs (one for odd bits and one for even bits). The result of this therefore seems to be that the "checksum odd" fields of the header are *always* zero. Is this actually correct? It seems like a bafflingly odd design if so.


This does appear to be the case with the disk I'm testing with, but I wanted some input on whether this is correct!


Thanks! I will likely have more questions and weird and wonderful disk formats soon.
catphish is offline  
Old 01 October 2019, 02:50   #2
lesta_smsc
Registered User

lesta_smsc's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 1,831
Just to clarify. Are you using a hardware interface to help as floppy disk controller? As far as I was aware, the PC cannot natively support Amiga disk format?

Sent from my SM-G925F using Tapatalk
lesta_smsc is offline  
Old 01 October 2019, 02:58   #3
catphish
Registered User

 
Join Date: May 2019
Location: Dorset, UK
Posts: 3
Yes. I have designed an STM32 based USB floppy controller and I'm now working on the software.

https://i.imgur.com/TEDFmct.jpg
catphish is offline  
Old 01 October 2019, 03:21   #4
lesta_smsc
Registered User

lesta_smsc's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 1,831
Fantastic! I'm not sure if it will help, but take a look at this project which uses Arduino for the same purpose. It is open source so you may be able to get some ideas for your situation in the code / concept?

http://amiga.robsmithdev.co.uk/

Sent from my SM-G925F using Tapatalk
lesta_smsc is offline  
Old 01 October 2019, 09:26   #5
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,164
Quote:
Originally Posted by catphish View Post
This checksum is then encoded into 2 longs (one for odd bits and one for even bits). The result of this therefore seems to be that the "checksum odd" fields of the header are *always* zero. Is this actually correct? It seems like a bafflingly odd design if so.
Yes, and this is the reason why I deliberately decided to ignore it in my loader.
This increases the decoding speed and does not affect the correctness of the data.
(well, actually you could check if that value is actually zero ).
Could it be a legacy of encoding and decoding done with blitter in 1.x systems? (to align data)
ross is offline  
Old 01 October 2019, 21:15   #6
catphish
Registered User

 
Join Date: May 2019
Location: Dorset, UK
Posts: 3
Thanks for confirming. I will ignore the odd checksum field. It doesn't even matter if the field is corrupt
catphish 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
Original Workbench (and related) disks preservation - Checksums required MrDolby project.TOSEC (amiga only) 40 29 August 2019 01:13
ORIGINAL WorkBench checksums Supamax request.Other 185 31 August 2018 03:50
Web page with kickstart list & checksums Gabriel Hardware mods 4 24 January 2010 03:53
Kickstart ROM Checksums vimfuego support.Hardware 1 18 September 2009 08:41
Unknown floppies: how to identify them using their checksums/CRC32? Supamax request.Other 5 13 May 2009 20:08

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 10:09.


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