Views: 6,907,232 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 04-24-24 11:53 AM |
Guest: |
0 users reading Firmware factory reset | 1 bot |
Main - General - Firmware factory reset | Hide post layouts | New reply |
Nicknine |
| ||
Newcomer Normal user Level: 4 Posts: 1/4 EXP: 272 Next: 7 Since: 02-19-21 Last post: 1159 days ago Last view: 938 days ago |
On a real DS, it is possible to reset firmware to factory default and bring up the initial setup screen ("Before you begin...") again by removing the battery for a minute and putting it back in. Is there a way to simulate this on an emulator with a firmware ROM?
I've tried zeroing out the last 0x600 bytes in firmware ROM (that's where user settings are stored) but that's not quite it, it brings up "System settings have been lost" screen. |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 663/885 EXP: 1338423 Next: 59753 Since: 03-28-17 From: France Last post: 3 days ago Last view: 2 hours ago |
dunno how that works. I doubt the user settings actually get lost (they're stored in the same memory as the firmware code, so that'd suck big time)
I think it's a flag in the RTC or something in the like. (as far as removing the battery to reset settings is concerned. dunno about the factory-reset part) ____________________ Kuribo64 |
Nicknine |
| ||
Newcomer Normal user Level: 4 Posts: 2/4 EXP: 272 Next: 7 Since: 02-19-21 Last post: 1159 days ago Last view: 938 days ago |
Posted by Arisotura Hmm, RTC, that's what Desmume dev suggested as well. How does DS store clock? Unix timestamp or something else? Where does melonDS handle it? I can try playing with the code to make it return 0 or other possible sentinel values to see if it triggers initial setup. EDIT: Here it is: https://github.com/Arisotura/melonDS/blob/master/src/RTC.cpp. From the looks of it, DS returns time in the same structure as GC, counting from Jan 1 2000. |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 664/885 EXP: 1338423 Next: 59753 Since: 03-28-17 From: France Last post: 3 days ago Last view: 2 hours ago |
yup, that's it -- there might be some 'time lost' bit in the status regs.
edit- yeah that's bit7 in status register 1, probably ____________________ Kuribo64 |
Nicknine |
| ||
Newcomer Normal user Level: 4 Posts: 3/4 EXP: 272 Next: 7 Since: 02-19-21 Last post: 1159 days ago Last view: 938 days ago |
That was it! I've set bit 7 on status register 1 in the code and it brought up that screen.
Now I wonder if there's a nice way to implement this on user side in some way... |
Nicknine |
| ||
Newcomer Normal user Level: 4 Posts: 4/4 EXP: 272 Next: 7 Since: 02-19-21 Last post: 1159 days ago Last view: 938 days ago |
Do we know what clean, fresh from the store firmware ROM looks like? I'm guessing the last 0x600 bytes are filled with 0x00 or 0xFF.
EDIT: Doesn't seem like it, filling user area with 0xFF brings up "System settings have been lost" screen even with RTC power lost flag. It probably contains default settings for the region then? |
Main - General - Firmware factory reset | Hide post layouts | New reply |
Page rendered in 0.076 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 88/88, time: 0.044 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |