Zufolek Posted October 16, 2009 Share Posted October 16, 2009 (edited) I have somehow created this optimizer. You can use it to squeeze more stuff into your games. Let me know if you encounter any problem. [updated to v0.3] Squeeze.zip Edited October 19, 2009 by Zufolek Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 16, 2009 Share Posted October 16, 2009 How about describing what code sequences are optimized. I know the source is supplied in the zip package but not everybody is familiar with C/C++. Quote Link to comment Share on other sites More sharing options...
cd-w Posted October 16, 2009 Share Posted October 16, 2009 Interesting - it looks like a generic 6502 peephole optimiser, rather than being bBasic specific. From the comments in the code, it does the following: Merges multiple loads of the same value into a single load Removes unnecessary compares with zero Removes store followed immediately by load Removes unnecessary consecutive loads and stores Removes unused code (between a jmp and a label) Removes unnecessary zero initialisation Removes unused loads Converts subroutines into jmps Converts load/tax into lax Converts and/tax into lxa Converts sequences of short jumps into a single jump I'm not sure all of these operations are completely safe, but it looks like a useful set. Chris Quote Link to comment Share on other sites More sharing options...
Zufolek Posted October 17, 2009 Author Share Posted October 17, 2009 I couldn't find an optimizer for 6507 assembly after a little searching, so I made this. It does many of the same assembly optimizations that I was doing to squeeze more stuff in my 4k bB games. Does anyone know of another program that works better? Regardless, I've fixed some problems in Squeeze so it should work with more games, and I've added a simple uninstaller. I've fixed a syntax error when calling the modified 2600bas.bat with only -O option. (My bad.) I've disabled the LXA optimization since that apparently fails (at least in emus) for whatever reason. The updated version (0.2) is on the first post. Quote Link to comment Share on other sites More sharing options...
Zufolek Posted October 19, 2009 Author Share Posted October 19, 2009 Uploaded version 0.3, which is probably about as good as it will get without a lot more work. I suppose I should mention it is free, works with every game I've tested, and requires no knowledge of assembly to use. Enjoy! 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.