AtariVox EEPROM file format

Subject: AtariVox EEPROM file format
From: Paul Slocum <paul@xxxxxxxxxxxx>
Date: Sat, 27 Nov 2004 13:37:54 -0600
So the specs for the AtariVox have a static area where programs can use designated blocks for saving high score data, etc. And also a separate file area where programs can store multiple blocks of data. I'm about to start using this area for the music sequencer program I'm writing and I've been discussing the file format with Alex Herbert.

Specs are included with the driver pack if you wanna look at em:

The original format just specified 8 bytes for a filename with the 7th bit in the first byte as an indicator to whether the 128 byte block is used or not. We've been debating changing this format a bit.

My preference is for the block to start with one byte that indicates the file type (and if it's free or not), followed by the 8 byte filename. So each program would be designated a unique number from a master list. Since probably 90% of homebrews will use the static area instead of the file area, I don't think there's any chance that 255 unique file types will be used up. And as Alex suggested, there could also be a "general" file type number for some unusual cases.

The advantage of my method is that the code to search for a file type is fast and simple. The disadvantage is that it uses one extra byte of NVRAM and there's not any clear indicator of what the file type is unless you know the list of file types (unlike a system where the unique file indicator is, say, a 3 byte ascii sequence like DOS filenames).

Other systems that Alex suggested are: a DOS-like filename with the extra 3 byte ascii sequence that indicates the file type.

Or using just an 8 byte filename, but using the high 1 or 2 bits as a file type indicator. This saves a byte of NVRAM, but complicates and lengthens the search.

The other issue is: should programs be able to delete other program's file types? Alex thinks they should, but I think they shouldn't. I think that there should be a 4k program (that can run on the Supercharger) that can maintain the memory and delete/move/etc files. But not everyone may have a supercharger. Yet I don't really want to have to use extra space in my program to include the ability to delete other program's files.

So if anyone's got any thoughts, post away.


Current Thread