While I haven't worked on this further, I did have some thoughts on how someone else might pick up the baton and run with it, should anyone so desire.
The byte code interpreter is <6Kb. If this is run from SWRAW/SWROM, what about the other 10Kb therein? One idea I had was to extract the first 10Kb from the swappable part of the game and append this to the interpreter (with suitable padding to align things) to make a 16Kb ROM. Then patch the virtual memory paging code so that instead of loading pages from disk if they are in the first 10Kb, just set the page number to be the page in ROM. This would work because during game play, the SWROM would always be paged in. Obviously this would have a direct performance improvement as more of the game code would be in memory at any give time, reducing the need for swapping. This is something Infocom could have done in the day, selling the game as a ROM+disk package, although I suspect it would not have been economically viable.
Because of the way the interpreter works, swappable memory is loaded on demand, so even if the game would fit in memory, that part of the game isn't preloaded. Again, that's a possible exercise for the reader. If this was done, another step could be to preload this, then, along with a ROM you could go further and perhaps preload the whole game from tape. I think that would be more of an exercise than having any point.
In terms of game size, using the latest version of Inform (6.42) and a modern abbreviation generator, a converted version of Ultimate Nightmare 2092 comes in at 31Kb which should work well in the scenario described above.
Jeremy
The byte code interpreter is <6Kb. If this is run from SWRAW/SWROM, what about the other 10Kb therein? One idea I had was to extract the first 10Kb from the swappable part of the game and append this to the interpreter (with suitable padding to align things) to make a 16Kb ROM. Then patch the virtual memory paging code so that instead of loading pages from disk if they are in the first 10Kb, just set the page number to be the page in ROM. This would work because during game play, the SWROM would always be paged in. Obviously this would have a direct performance improvement as more of the game code would be in memory at any give time, reducing the need for swapping. This is something Infocom could have done in the day, selling the game as a ROM+disk package, although I suspect it would not have been economically viable.
Because of the way the interpreter works, swappable memory is loaded on demand, so even if the game would fit in memory, that part of the game isn't preloaded. Again, that's a possible exercise for the reader. If this was done, another step could be to preload this, then, along with a ROM you could go further and perhaps preload the whole game from tape. I think that would be more of an exercise than having any point.
In terms of game size, using the latest version of Inform (6.42) and a modern abbreviation generator, a converted version of Ultimate Nightmare 2092 comes in at 31Kb which should work well in the scenario described above.
Jeremy
Statistics: Posted by EdwardianDuck — Sun Feb 25, 2024 10:42 am