VMS CRC

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Dreamcast
DCEmu Freak
DCEmu Freak
Posts: 81
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Jul 27, 2007 2:23 am
Has thanked: 2 times
Been thanked: 4 times

VMS CRC

Post by Dreamcast »

(Originally posted over at ASSEMbler, but since the thread received nearly 2000 views and no replies, I think it's safe to say no one knows over there.)

The official VMU PDF states the following (emphasis mine):
Page 39 of VMS.PDF from the official SDK wrote:When a file is saved by using the backup utility function "buMakeBackupFileImage()" from the Sega Library, the CRC is calculated automatically, and that value is written in this field. Note that the CRC applies only to the data portion, and not to the information fork.
Everywhere where I've found CRC routines for the 2-byte VMS CRC field, the CRC is calculated over the entirety of the VMS file (see here, for example).

Was the PDF statement about the CRC only applying to the data portion a mistake?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: VMS CRC

Post by BlueCrab »

I think that perhaps what they mean by the "information fork" is the directory entry for the VMS file, not the header that contains the BIOS menu information and all.

Considering that the homebrew code out there that makes the assumption that it includes the BIOS header works and doesn't produce files that are considered corrupt by the BIOS, obviously it is supposed to include the BIOS header in the CRC calculation.
Post Reply