During the last weeks I tried porting the Sierra Adventure Game Interpreter (AGI) to the VTech platform! At first it seemed impossible, since each displayed screen consists of two bitmaps of 160x168 pixels, which by itself would be more than the 32KB RAM we have on board the GL6006SL/GL7007SL.
But after some brainstorming, I came up with a two-step approach: First, render one bitmap in full res at 4bit (which fits into 16 KB), then convert it down to 160x100 which fits into the remaining 8KB page. Then, do the same for the other bitmap (and overwrite parts of the 16KB region in the process)
Well, that worked! 🥰
…and "Space Quest II" looked so cute on the LCD using a bit of dithering, that I tried to port the rest of the engine as well...
Thanks to the previous work of ScummVM and GBAGI, I ported module by module to VGLDK, alsways keeping a close watch on RAM and ROM usage.
But finally, after some twiddling (splitting the 64KB engine into two 32KB segments and bank-switching back and forth), it was possible to have the engine residing in lower system ROM, while the game files (~700KB) are put into a big external cartridge ROM.
The result: Hello, VAGI!
Okay, I must admit, there are a lot of shortcuts and little bugs remaining, and the performance is really bad at times. But you CAN indeed play SQ1 / SQ2 / KQ1 and KQ2 for a few minutes and it's fun! There's still a little bug that doesn't let you enter the castle in "King's Quest I", but that seems fixable.
You can find the code in the VGLDK Github repo inside the "examples/agi" directory, but I might fork a separate project.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.