NML32 Posted March 27, 2010 Share Posted March 27, 2010 Hello, I just got my Harmony cart the other day and I am enjoying it very much. Best money I have spent in a while. I was just wondering would it ever be possible for games to be modified or written to save and retrieve high scores on the harmony cart cf card? Quote Link to comment Share on other sites More sharing options...
+batari Posted March 27, 2010 Share Posted March 27, 2010 Sort of. I have looked into savestates, which basically just take a snapshot of RAM. Doing so would save the current or last score or high scores on a game that uses them. I did a proof of concept test last year that could save the game's state to Harmony's RAM and restore it, but it did not commit it to non-volatile storage. Quote Link to comment Share on other sites More sharing options...
SekOner Posted June 17, 2010 Share Posted June 17, 2010 Sort of. I have looked into savestates, which basically just take a snapshot of RAM. Doing so would save the current or last score or high scores on a game that uses them. I did a proof of concept test last year that could save the game's state to Harmony's RAM and restore it, but it did not commit it to non-volatile storage. Are there any recent developments regarding this? To the OP'er: Someone Correct me if I'm wrong but, I believe that you can get an AtariVox from the AA store that does just that (save Highscores), It also hads better voice synth to games that are specifically use it(homebrews/Hacks) it can also save game progress and configuration settings. Does anyone know anymore information on the AtariVox as well? EDIT: Its still currently Unavailable at the AA store....sorry Quote Link to comment Share on other sites More sharing options...
+batari Posted June 17, 2010 Share Posted June 17, 2010 AtariVOX/Savekey will only record high scores for games that are specifically written to support them. If I get Harmony savestates going, it will work for games where this functionality was never intended. It will not work for all games, however. Quote Link to comment Share on other sites More sharing options...
SekOner Posted June 18, 2010 Share Posted June 18, 2010 AtariVOX/Savekey will only record high scores for games that are specifically written to support them. If I get Harmony savestates going, it will work for games where this functionality was never intended. It will not work for all games, however. Wow that would be awesome! I assume that would be in a firmware update. Man if my harmony could do savestates as well. that just blows my mind. Its awesome that the harmony just keeps getting better and better. (assuming that this can be done) One cool thing to add to the harmony would be the ability to enter "cheat codes". Quote Link to comment Share on other sites More sharing options...
maiki Posted June 29, 2011 Share Posted June 29, 2011 I have 2 questions regarding Juno First and saving high scores: 1. Does Harmony Cartridge emulate that Savekey / Atarivox saving feature? 2. Is it possible to enable highscore saving in Stella emulator for this game? Quote Link to comment Share on other sites More sharing options...
dwane413 Posted June 29, 2011 Share Posted June 29, 2011 2. Is it possible to enable highscore saving in Stella emulator for this game? Yes. -Highlight the game's name on the menu. -Click "Options" -Click "Game Properties" -Click "Controller" tab -Change P1 Controller to AtariVox or SaveKey Quote Link to comment Share on other sites More sharing options...
cd-w Posted June 29, 2011 Share Posted June 29, 2011 1. Does Harmony Cartridge emulate that Savekey / Atarivox saving feature? No - the AtariVox/SaveKey connects to the second Joystick port, so it cannot be directly emulated by the Harmony cart. Chris Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 29, 2011 Share Posted June 29, 2011 (edited) If I get Harmony savestates going, it will work for games where this functionality was never intended. It will not work for all games, however. I am really interested, what's your plan here? Trying to dump the zeropage RAM? Or all RAM areas? Plus PC and flags? But how do you get access to all of these? How to you get access to the contents of e.g the TIA registers? A lot of registers are only defaulted during initialization and never touched again (e.g. REFPx) and many games set certain registers (e.g. CTRLPF or COLUBK) only once. And how do you trigger this dump? Edited June 29, 2011 by Thomas Jentzsch Quote Link to comment Share on other sites More sharing options...
+batari Posted June 29, 2011 Share Posted June 29, 2011 If I get Harmony savestates going, it will work for games where this functionality was never intended. It will not work for all games, however. I am really interested, what's your plan here? Trying to dump the zeropage RAM? Or all RAM areas? Plus PC and flags? But how do you get access to all of these? How to you get access to the contents of e.g the TIA registers? A lot of registers are only defaulted during initialization and never touched again (e.g. REFPx) and many games set certain registers (e.g. CTRLPF or COLUBK) only once. And how do you trigger this dump? My thought was that when savestates are enabled, Harmony would detect a write to VSYNC, and inject a few extra instructions and restore the PC (most games will simply have a STA WSYNC after this.) The instructions would look for the save or restore triggers (not sure yet what this could be, but maybe a combination of things.) Once the trigger hits, it either reads or writes RIOT RAM in a loop by feeding instructions, and once done it returns to the game. Reading just does a series of NOP ZP and Harmony captures the values, so registers and flags are unaffected. Writing must do a series of LDA #/STA ZP so only the accumulator must be restored. I tested this on a number of games and it worked. Since it always runs at the same place (write to VSYNC) there's usually no need to restore registers, PC or flags, but due to the issues you described above, it wouldn't work on everything. You may need to do certain things like start a game before you attempt a restore to increase the chance of success. If anyone's interested, I could create a special BIOS that had save states for 4k games. It currently just does a single save slot and the contents are lost upon a reboot, but it would be adequate to test this method on a number of games to see how feasible it is. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 29, 2011 Share Posted June 29, 2011 My thought was that when savestates are enabled, Harmony would detect a write to VSYNC, and inject a few extra instructions and restore the PC (most games will simply have a STA WSYNC after this.) But what should trigger the injection? Also, if you are able to inject instructions, couldn't you then also just insert code which pauses the game? Or makes it run at a slower speed (e.g. by skipping every other frame)? Quote Link to comment Share on other sites More sharing options...
+batari Posted June 29, 2011 Share Posted June 29, 2011 (edited) My thought was that when savestates are enabled, Harmony would detect a write to VSYNC, and inject a few extra instructions and restore the PC (most games will simply have a STA WSYNC after this.) But what should trigger the injection? Also, if you are able to inject instructions, couldn't you then also just insert code which pauses the game? Or makes it run at a slower speed (e.g. by skipping every other frame)? The injecting of instructions would happen every frame. Basically I am assuming the code will look like this: sta VSYNC STA WSYNC ... The 6507 would see the following four instructions every frame, in order (assuming trigger the color/BW switch, and PC is where STA WSYNC is): sta VSYNC NOP SWCHB JMP PC sta WSYNC Harmony will capture the value from SWCHB. On most games, the overhead will not matter. If in BW, save/restore mode is enabled, and if the right joystick is not pressed, it will insert the following before the JMP PC: NOP INPT5 NOP $80 NOP $81 ... NOP $FF The screen will probably roll during this time but the game should still run. If the player wishes to restore, the right joystick button should be pressed before switching to BW. Then, the 6507 will see this: NOP INPT5 STA T1024T LDA #$xx STA $80 LDA #$xx STA $81 ... LDA #$xx STA $FF LDA INTIM When you release the BW switch, the game should (usually) be restored. Edited June 29, 2011 by batari Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 29, 2011 Share Posted June 29, 2011 So basically you can inject any kind of code you want to, right? Which means, you could inject an endless loop or an extra frame too, right? So slow mode(s) or pause functions might become possible? And by also checking the joystick position, you could allow different code injections? Quote Link to comment Share on other sites More sharing options...
+batari Posted June 29, 2011 Share Posted June 29, 2011 So basically you can inject any kind of code you want to, right? Which means, you could inject an endless loop or an extra frame too, right? So slow mode(s) or pause functions might become possible? And by also checking the joystick position, you could allow different code injections? Yes, you could do a true pause, i.e. without blanking the screen (provided your television could handle the long sync pulse) if you just recorded the RAM on the first frame and wrote the values back on every successive frame where the switch was still set. And yes, you could do those other things as well. Quote Link to comment Share on other sites More sharing options...
+batari Posted July 1, 2011 Share Posted July 1, 2011 I spent a bit of time preparing a test version. This also uses bus-stuffing so this serves as a test of that as well. Bus stuffing should be safe on any 2600/7800 but if you have an FB2 with a cart mod, don't use this until I've had a chance to do that. How it works: Color/BW switch set to BW will both pause and save the game, usually without messing up the screen. To restore the saved game after unpausing, hold down the right joystick button while switching to BW, and switch back to color to play from the save point. For now, this is just an ARM file to replace the one that comes with the Harmony software, so you must load individual images using the development tab in the software, and it's only 2k or 4k games. Please try this with some different games and let me know of any issues. How it's done: it detects the first read from INTIM after the kernel and injects instructions there. Provided there are a few scanlines free, it should be transparent. 2K4K.zip 1 Quote Link to comment Share on other sites More sharing options...
dwane413 Posted July 2, 2011 Share Posted July 2, 2011 (edited) I tried this with Bob Montgomery's Elevators Amiss and it worked great. If you pause at the wrong time, sometimes the sound will keep playing, but this didn't happen enough to be a problem. The screen display worked fine. I noticed that the joystick could still control her a tiny bit while paused. I thought that was kind of neat. Also I once paused it at the moment the timer was about to decrease and it looked like it was going back and forth between the two numbers. None of that is meant to be a complaint. It worked fine. I'm just giving feedback. I suppose you know this, but just in case.... When I turned the Atari off and back on and tried to do a restore, it would not restore the game. Instead, the screen went black. Anyway, I like what you've done with this and it was the first thing to motivate me to hook my Harmony up to the computer and install the software. Thanks. EDIT: I tried it with Omegamatrix's Panda Chase (NTSC) conversion and the screen kind of rolled when paused (I'm not sure "rolled" is the right term). Due to how buggy the original Panda Chase is, this doesn't really surprise my. Otherwise it worked good. I could restore the saved game if I didn't turn off the power. Restoring after cycling the power didn't work right, but behaved differently than Elevators Amiss. The screen would roll even after un-pausing and it didn't restore to where I saved it. Pressing the left fire button would stop the rolling, but the high score had incorrect data. Edited July 2, 2011 by dwane413 Quote Link to comment Share on other sites More sharing options...
+batari Posted July 2, 2011 Share Posted July 2, 2011 Some games may roll, and it's because the injected instructions exceed the time in the overscan period. I have an idea to minimize this effect. You are right that the saves are not committed to flash yet. That will require much more time, so it can't be done transparently. Either it would require a different method (such as a right joystick direction to select a save slot.) Quote Link to comment Share on other sites More sharing options...
dashv Posted December 21, 2014 Share Posted December 21, 2014 Some games may roll, and it's because the injected instructions exceed the time in the overscan period. I have an idea to minimize this effect. You are right that the saves are not committed to flash yet. That will require much more time, so it can't be done transparently. Either it would require a different method (such as a right joystick direction to select a save slot.) sorry for resurrecting an old thread. But I know you are still active here. Was there any further progress on save states? Does my current Encore perhaps already support this? I checked the manual but saw no mention of save states. 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.