Skip to content

Conversation

@btb
Copy link
Contributor

@btb btb commented Oct 14, 2023

Uses all 16 sectors, and with ProDOS sector ordering.

Thought this would have been messy to get working, but was surprisingly simple in the end.
I'm not really sure if it the correct thing would be for this to be its own format or just melded in with the existing one like I did, as everything else seems exactly the same.

Uses 16 sectors, with ProDOS sector ordering.
@btb
Copy link
Contributor Author

btb commented Oct 14, 2023

fixes #109

Copy link
Contributor

@a2geek a2geek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good start! Thanks for the sample disk as well.

A few items:

  1. I noticed that the title is crazy characters. Can that either be made sensible or just be blank (maybe even just an empty string if there's nothing useful hidden in the disk)? This is what I was seeing with ac:
$ java -jar app/cli-ac/build/libs/AppleCommander-ac-1.9.0-SNAPSHOT.jar -ll lib/ac-api/src/test/resources/disks/RDOS_33_boot.dsk 
lib/ac-api/src/test/resources/disks/RDOS_33_boot.dsk `abcd)*+h,-./012pq345678x9:;<=>?
B 032 RDOS 3.3 COPYRIGHT 1986 8,192 000 $1000 
T 001 SYSTEMBOOT 256 032 $B100 
A 005 START 98 033 $0801 
RDOS 2.1 format; 106,752 bytes free; 9,728 bytes used.
  1. Notice that the format type is RDOS 2.1 in the output, that should be corrected as well (this is getFormat).

  2. Any idea if that START program is genuinely messed up or not? I get an index error when I try to list it.

$ java -jar app/cli-ac/build/libs/AppleCommander-ac-1.9.0-SNAPSHOT.jar -e lib/ac-api/src/test/resources/disks/RDOS_33_boot.dsk START
Error: Index 98 out of bounds for length 98
java.lang.ArrayIndexOutOfBoundsException: Index 98 out of bounds for length 98
        at com.webcodepro.applecommander.util.AppleUtil.getWordValue(AppleUtil.java:66)
        at com.webcodepro.applecommander.util.ApplesoftTokenizer.getNextToken(ApplesoftTokenizer.java:101)
        at com.webcodepro.applecommander.util.ApplesoftTokenizer.getNextToken(ApplesoftTokenizer.java:108)
        at com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter.filter(ApplesoftFileFilter.java:54)
        at com.webcodepro.applecommander.ui.ac.getFile(ac.java:447)
        at com.webcodepro.applecommander.ui.ac.main(ac.java:140)

Thanks!

@btb
Copy link
Contributor Author

btb commented Oct 20, 2023

Oh, I didn't realize that about the title. I saw in the source that "RDOS really does not have a disk name" so I ignored it, but I see it does actually return something for the older format.
It returns the same string that is checked by the isRdosFormat() function, but I'm not even really sure what that data is, this string doesn't appear to be used by Diskm8 or CiderPress.

The version numbers are confusing - I suspect, but I'm really not sure, that RDOS 2.1 is the version of the "OS", and not the disk format. Diskm8 and Ciderpress call the older version "3.2" and the newer version "3.3"

FWIW, the developer of CiderPress was also heavily involved in hacking RDOS back in the day.

I'll look for some solutions.

@btb
Copy link
Contributor Author

btb commented Oct 20, 2023

I don't know what's going on with the START file. If you do a raw (-g) extract, the result is identical to that given by ciderpress. Something about the conversion from AppleSoft to text is failing.

@a2geek
Copy link
Contributor

a2geek commented Oct 20, 2023

Ah, that could be. I did just try RDOS_3.3_1986___RDOS.dsk and everything there seems to be working fine.

@a2geek
Copy link
Contributor

a2geek commented Oct 20, 2023

As far as versioning, yeah, it definitely is confusing. I want to say that RDOS was originally 13 sector but when games got cracked, they were converted to a 16 sector format. Note the Phantasie disk (Krakowicz called it RDOS 3.3 but the RDOS file says RDOS 2.1).

image

@btb
Copy link
Contributor Author

btb commented Oct 21, 2023

After doing some tests, it really seems like that file is just messed up, or maybe contains some weird RDOS-specific thing at the end of it.

@btb
Copy link
Contributor Author

btb commented Oct 21, 2023

Yeah, there are three disk formats supported by the other tools:

Original 13 sector. I have no experience with images of these.
Ciderpress calls it "3.2" because DOS 3.2 was also 13 sector

16 sector, only 13 used. Mostly cracked software.
Krackowicz called it 3.3, Ciderpress calls it just "3"

Actual 16 sector with ProDOS ordering.
called "3.3" because DOS 3.3 and up used 16 sectors, and that was the version of the RDOS OS that came with it as well.

LIttle more direct may be to just call them something like "RDOS (13 Sector)", "RDOS (13/16 Sector)" and "RDOS (16 Sector)"

A lot of my info I got from https://fenarinarsa.com/boutillon/Underground/Outils/Rdos/Rdos.html (and google translate)

@btb
Copy link
Contributor Author

btb commented Oct 21, 2023

I just noticed that RDOS_33_boot.dsk (which I got from here: https://gswv.apple2.org.za/a2zine/Sel/RDOSstuff.html) is actually based on a copy of Phantasie III.
I think I'll replace the test with an actual copy of Phantasie III, since the existing one has that messed up START file, and it would also keep with the established theme!

@a2geek
Copy link
Contributor

a2geek commented Oct 21, 2023

Sounds like a plan!

@btb
Copy link
Contributor Author

btb commented Oct 21, 2023

Testing with more complete disk images reveals there is still more work to do to read the catalog and higher blocks correctly. Working on a more generalized fix.

@btb
Copy link
Contributor Author

btb commented Oct 21, 2023

I'm not seeing any other issues now

Copy link
Contributor

@a2geek a2geek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Looks good! I did find a bug in the Applesoft decoder that probably was responsible for the other issues -- if the basic program bumps right up to the end of the file buffer, that could cause an array index out of range exception. I'll patch that in the main branch after the merge. Thank you!

@a2geek a2geek merged commit ee98155 into AppleCommander:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants