Thomas Jentzsch Posted April 6, 2014 Share Posted April 6, 2014 While waiting for my next major project to start, I started writing a little puzzle game, based on the iOS game Threes. You can find the latest ROM in this thread in my blog. 4 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 15, 2014 Author Share Posted April 15, 2014 A nasty bug kept me busy for some hours. For undo, I have to restore the random number generator values (2 bytes). To save one byte here, I decided to optimize my existing code and to count the random number generator (LFSR) calls during a move. Then, on undo, I call a reverse LFSR as often a counted during the move. So I only have to store the count byte, but not the two random number bytes for undo. However, this didn't work, the restored random number byte didn't match. After testing my reverse LFSR, I started debugging the code. But I could not reproduce the bug. Whenever I debugged, the numbers matched. I tried working with save states to identify the differing bytes. Sometimes I found none relevant and sometimes the random number bytes were different. But I could not spot a pattern. Finally, after spending some hours of my time, I realized the problem. The undo is triggered by the fire button. And, as long as the fire button is pressed! Before my optimization, this was no problem as the same values were just written over and over again. But with my optimization the reverse LFSR is called over and over again too and therefore moving backwards far more than it should. After realizing the cause the fix was done within one minute. Quote Link to comment Share on other sites More sharing options...
Gurner Posted April 25, 2014 Share Posted April 25, 2014 Very cool! Any chance of a PAL version? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 25, 2014 Author Share Posted April 25, 2014 It's already there. Left difficulty. Quote Link to comment Share on other sites More sharing options...
Gurner Posted April 25, 2014 Share Posted April 25, 2014 It's already there. Left difficulty. Nice one! Cheers, cool game – loading it into my Harmony cart now! Quote Link to comment Share on other sites More sharing options...
Gurner Posted April 25, 2014 Share Posted April 25, 2014 The PAL setting by the difficulty switches doesn't seem to be working, either on Stella or on the Harmony cart. I've tried all three ROMS. Is there another setting I'm missing? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 25, 2014 Author Share Posted April 25, 2014 Sorry, I have to update my blog entry. Maybe you didn't notice the thread in the Atari 2600 forum. There are the latest ROMs. Quote Link to comment Share on other sites More sharing options...
Gurner Posted April 25, 2014 Share Posted April 25, 2014 Sorry, I have to update my blog entry. Maybe you didn't notice the thread in the Atari 2600 forum. There are the latest ROMs. That's better – liking the Mondrian theme and sounds! Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.