Okay, so SmartPort isn’t the panacea I was hoping it would be.
I guess I need to figure out what the biggest V5 stories were that were released on Apple 2.
My plan was to load the first 44k of the story into memory (main 44k), and then the aux 44k would be used as VM backing for the remainder of the story.
If Infocom managed to cram the rest of the V5 story onto a second disk, then they presumably loaded more than 44k of the story in order for that to happen.
18 tracks is 4.5k per track instead of 4k, or 157.5k for a standard 35 track disk. Even if I loaded the first 88k of the story into permanent memory, and used the 4k banked (8k total) as my entire VM backing, I don’t think I could handle a full 256k story file (256k-88k is 168k, and the disk holds 157.5k)
So I’m guessing the practical story limit was smaller than that. But trinity is 261,484 bytes (story length 0x3fd6c) so that blows that theory? They must have figured out how to get more than 157.5k on that second disk, or you had to swap disks occasionally?
Right now my design doesn’t use the aux language card memory, because that’s where my interpreter is running from, so that’s 16k I’m effectively wasting. That 16k could contain more of the static story data, but it’s backed by the VM system since it can’t be read directly.
So I load the first 44k of the story into main memory (1000-BFFF), then the second 44k of the story into aux memory (1000-BFFF), then the next 16k of the story into aux language card memory. That means 104k of memory is filled with static story data. Then I use the 2 x 4k language card banks at 0xD000, and the 2 x 2k at 0x0800-0FFF (both main and aux) as 12k of VM backing store for the remaining 152k of story data on the second disk.
(Or let 156k live on the second disk, and only load 100k of story data, leaving 4k more for backing store)
That 16k of story data in aux language card memory would only be accessible through the VM system (but is still faster than pulling it in from disk).
So… yeah, it’s doable. You’d have to swap disks on a single drive system to save though.
(Looks like a combination of either using 40 tracks instead of 35 tracks, and/or spacing tracks 0.75 tracks apart instead of a full track - given that you won’t ever be rewriting them again - are other options). 35 tracks becomes 46 tracks if you space the tracks closer together, and would let you put 207k on a 140k disk, read-only. Wonder if that actually works on most hardware, or more to the point, works on modern flash-based emulations. Does the WOZ format support more than 35 tracks? Yeah, it looks like it does.)
Just found this… https://www.kansasfest.org/wp-content/uploads/apple_ii_inform_paper.pdf which indicates that the Infocom V5 interpreter would load the first 98.5k of the story, meaning they always left the remainder of the 157.5k on the second disk. Those are pretty close to my numbers above.