gerbil Posted December 16, 2019 Share Posted December 16, 2019 FYI, I managed to add a feature to jzintv to enable videogame cheats. I have the code working on my machine (mac). I can post the source if anyone is interested. Here's how it works: You need to enable the debugger (-d). You then provide a cheatcode using a new cmdline parameter (--cheat). The format of the cheat codes is a sequence of poke or enter debugger commands, separated by either a space or a '|' character. For example to give yourself six lives in qbert the code would be: --cheat='p $173 06'. For 255 lives on demon attack you can use: --cheat='p $181 ff' (NOTE: either use single quotes or escape the $ sign if you prefer double quotes.) You then need to map a key or controller button to a new type of event in the kbd hack file. In this case the mapping I used looks like this: TAB CHEAT1 which maps the first cheat provided on the cmdline to the TAB key. If you provide more cheat codes on the cmdline, then they will be mapped to CHEAT2, CHEAT3 ... CHEAT8. (A max of eight codes can be entered.) You then start the game as usual, and type r at the debugger prompt to get it going. Once you get low on lives, you can then just the button you mapped during gameplay and the lives will be added. (The display will not typically update the count till you die, or a full screen refresh is issued by the game.) Like I said, I have this all working and debugged on my machine, and will post the code wherever it's appropriate if people are interested. I'd appreciate someone letting me know what the official way to contribute code back to jzintv should be. Also, I added the required cmake files to get the project to build in the CLion IDE. In this screenshot you can see that I have five lives in QBert before even getting a single point. (I had to kill myself to get the screen to redraw.) Let me know what you guys think. 1 Quote Link to comment Share on other sites More sharing options...
mr_me Posted December 16, 2019 Share Posted December 16, 2019 I know you can poke the rom with commands in the rom cfg file. Just contact Joe with your contributions. His email address is in the readme file. 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.