Views: 31,785,894 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 06-15-26 08:36 AM
Guest:

Main - Posts by Nicknine


Nicknine
Posted on 02-19-21 05:49 PM, in Firmware factory reset Link | #3321
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.

Nicknine
Posted on 02-19-21 06:38 PM, in Firmware factory reset (rev. 2 of 02-19-21 08:35 PM) Link | #3323
Posted by Arisotura
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)


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.

Nicknine
Posted on 02-19-21 09:36 PM, in Firmware factory reset (rev. 5 of 02-19-21 09:44 PM) Link | #3327
That was it! I've set bit 7 on status register 1 in the code and it brought up that screen.

[image]

Now I wonder if there's a nice way to implement this on user side in some way...

Nicknine
Posted on 02-19-21 10:51 PM, in Firmware factory reset (rev. 4 of 02-20-21 12:20 AM) Link | #3329
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 - Posts by Nicknine

Page rendered in 0.049 seconds. (2048KB of memory used)
MySQL - queries: 22, rows: 73/73, time: 0.041 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.