Re: Projects that take Commodore computers to 2021

From: Jim Brain <brain_at_jbrain.com>
Date: Mon, 13 Dec 2021 19:37:17 -0600
Message-ID: <08e52f31-2fa7-6f51-ab79-0dc7b1615fd4_at_jbrain.com>
On 12/13/2021 1:45 PM, Claudio Sánchez wrote:
>
> Would that WAV file be inside a REL file or would it have its own format?
>
> Or I think I'm missing something here... (lack of knowledge arises)

It can be confusing, but the beauty of the Commodore peripherals is the 
"abstraction" they allowed.

The structure of a REL file on a 1541, for example, is truly different 
(side sectors, etc.), but none of that is directly exposed to the 
developer.  Same with SEQ files and PRG files, which have a very 
specific format on disk (254 bytes of data, 2 bytes of T&S linking, etc.)

But, that internal format is hidden from the developer.  The developer 
only needs to know about 2 file formats, an unstructured data storage 
format (PRG and SEQ) and a record based one (REL). USR files special, 
but they are hardly necessary to understand, and almost no one used them 
in practice.

PRG and SEQ were variants of the same thing, with a specialization to 
prevent the user from accidentally trying to execute data files.  The 
internal layout was the same.

So, from KERNAL or via the CBM DOS, you can treat all disk access as 
reading/writing a flat file, with non sequential access, or a random 
access type file (REL) with a "seek" function.  What you dump into those 
containers was up to you.

And, since the unstructured data format did not require any metadata to 
be stored within the file, the actual storage medium could feel free to 
hold the file any way they want.  FOr FAT storage, we just dump the data 
into 512 byte sectors.

Jim


-- 
Jim Brain
brain_at_jbrain.com
www.jbrain.com
Received on 2021-12-14 03:00:03

Archive generated by hypermail 2.3.0.