Fixed the Moonmist bug that printed out a strange character when putting your favorite color in. This ended up actually being a biggie with the way I was performing the SREAD opcode, which is the standard opcode that reads in text and does all the parsing/lexical table construction.
There are two buffers you have to fill in that the game expects in a certain format – the text buffer and the parse buffer. The text buffer basically contains a copy of what the user typed, and the parse buffer contains an entry for each word and symbol parsed, entries consisting of what index in the dictionary the word is, how long the word was, and where in the text buffer the word appears.
I had actually made two errors in SREAD which kind of canceled each other out, only not canceling each other out in Moonmist during the favorite color question. One, I had read version 5+ of the SREAD specification by accident, and was off by 1 byte in where I was writing to in the buffer. Everything still worked, because I was also off by one byte in my position calculations within the parse buffer. I fixed both those issues, and everything worked, including the Moonmist issue.
I’ve run into a few more infinite loop bugs in Moonmist, but most of the bugs are ironed out now. After I kill the Moonmist bugs, I’m going to try a few more games, and if things go smoothly, I want to start filling out the code for versions 4-8 of the zmachines, then get Gruepal online for some alpha/beta testing.
Leave a Reply