{"action":"opened","issue":{"url":"https://api.github.com/repos/rdanbrook/nestopia/issues/178","repository_url":"https://api.github.com/repos/rdanbrook/nestopia","labels_url":"https://api.github.com/repos/rdanbrook/nestopia/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/rdanbrook/nestopia/issues/178/comments","events_url":"https://api.github.com/repos/rdanbrook/nestopia/issues/178/events","html_url":"https://github.com/rdanbrook/nestopia/issues/178","id":153900938,"number":178,"title":"SOROM games not loading/saving PRG RAM (WRAM) correctly","user":{"login":"koitsu","id":8430773,"avatar_url":"https://avatars.githubusercontent.com/u/8430773?v=3","gravatar_id":"","url":"https://api.github.com/users/koitsu","html_url":"https://github.com/koitsu","followers_url":"https://api.github.com/users/koitsu/followers","following_url":"https://api.github.com/users/koitsu/following{/other_user}","gists_url":"https://api.github.com/users/koitsu/gists{/gist_id}","starred_url":"https://api.github.com/users/koitsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koitsu/subscriptions","organizations_url":"https://api.github.com/users/koitsu/orgs","repos_url":"https://api.github.com/users/koitsu/repos","events_url":"https://api.github.com/users/koitsu/events{/privacy}","received_events_url":"https://api.github.com/users/koitsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-10T00:44:32Z","updated_at":"2016-05-10T00:44:32Z","closed_at":null,"body":"There are 3 Koei games (Romance of the Three Kingdoms, Nobunaga's Ambition, and Genghis Khan), all of which are SOROM games, whose native save capability (i.e. PRG RAM/WRAM) doesn't appear to work correctly.  After saving, when power-cycling and attempting to load saved data, the games will simply say \"No saved data\".\r\n\r\nIt's suspected that the reason this doesn't work is that Nestopia is either loading or saving the wrong 8KB PRG RAM page.  Specific to SOROM boards, we have this, per the nesdev wiki -- note the last line:\r\n\r\n> SOROM uses a similar method, using the second-highest CHR bank select line to choose between two 8KB PRG RAM chips. Of chip 0 and chip 1, only chip 1 is battery backed.\r\n\r\nI don't have a patch for this because the PRG RAM/WRAM and save file code is very complex, so I'm not even sure where the problem lies.\r\n\r\nSteps to reproduce:\r\n\r\n1. Make sure there's no existing .sav file\r\n2. Run NestopiaUE\r\n3. Load Genghis Khan (Genghis Khan (U).nes -- CRC 2225C20F)\r\n4. Start the game, e.g.: Mongol Conquest, set parameters automatically, view no princes, etc.\r\n5. Choose Pass (to move to the next season)\r\n6. Choose Other, then Save; wait for message \"Data saved\"\r\n7. Power-cycle the emulator via Machine menu (or exit/restart emulator)\r\n8. Choose \"Load daved data\"\r\n\r\nIt's hard to tell from the .sav file if the data stored is correct or not (e.g. character names in ASCII are there, but that could be data from PRG RAM page 0 rather than 1; unsure!), so it's difficult to determine if the issue is with loading, or with saving.\r\n\r\nDiscussion thread: http://forums.nesdev.com/viewtopic.php?f=3&t=14205\r\nSxROM details: http://wiki.nesdev.com/w/index.php/SxROM\r\n"}}