Modify Saturn BIOS to skip Set Language / Set Clock screens?
Sept 16, 2019 18:58:44 GMT
Post by Link83 on Sept 16, 2019 18:58:44 GMT
I'm new here so hello everyone Hopefully this is the right section for this, and forgive if the start of this thread is covering common knowledge.
I'm sure everyone here is aware of the CR2032 battery needed for the Saturn. It serves two important functions:-
1) It provides power to the SRAM chip to store game save data when the systems powered off.
2) It provides power to the SMPC (System Manager & Peripheral Control) chip to allow it to store and update the RTC (Real Time Clock) In other words it allows the system to keep track of the date and time even when the power is off.
Using a CR2032 battery to power an SRAM chip to store save data is a very common arrangment - many Nintendo game cartridges store save data in exactly the same way and can often hold data for 20 years or more. The problem is the SMPC consumes a rather large amount of power, and this drains the CR2032 battery very quickly (Often within just a few months) This also leads to the loss of all internal save data.
There have been mods for a few years now that replace the consoles SRAM with FRAM. Since FRAM doesn't require any power to store save data this mod prevents any save data being lost when the battery dies:-
db-electronics.ca/2017/02/10/sega-saturn-internal-memory-mod-with-fram-no-battery-required/
However this still leaves one other slightly irritating feature of the Saturn - which is that when the CR2032 clock battery dies the system will repeatedly prompt you to set the language and clock date/time on bootup
This is controlled by the system BIOS (AKA Boot ROM) The actual boot process looks like this:-
As you can see, if the SMPC chip registers a "cold reset" (Battery is dead/removed/exchanged) the BIOS proceeds to display the Set Date/Time screens (There is also a blue button hidden inside the VCD slot on development and early retail models that also issues an SMPC reset when pressed)
I am hoping there might be somebody here with SH2-Assembler experience who might be able to edit the Saturn BIOS to skip these two screens. In other words the system would automatically default to English and 01/01/1994 12:00am settings and continue on with the normal boot sequence. This should make the system always default to the same settings after every power cycle. However if necessary the date/time could still be manually changed by accessing the system settings later (e.g. for Christmas Nights)
This alteration wouldn't prevent people from using a battery to store the language and date/time as normal if they wanted to, the only difference would be that if your battery dies, you wont immediately know about it by the set language/clock screens appearing on bootup. Also, if you typically use a language other than english then the system would revert to english (Although I guess if this mod is possible someone could create different BIOS versions with different default languages configured if required)
Other information which could aid in the BIOS modification
I'm no expert, but from reading the Boot ROM and SMPC User Manuals here:-
segaretro.org/images/a/ae/ST-079B-R3-011895.pdf
segaretro.org/images/9/9b/ST-169-R1-072694.pdf
It states that "The SMPC has a 4-byte battery backupable memory (SMEM)" and that "the SMEM contents are cleared to 0 when the SMPC is cold reset."
The SMEM is where the date and time is stored (Not sure where exactly the language setting is stored, but its probably in the same area?) Also the docs say:-
"The time is initialized to "12/31/93 Friday 23:59:59" and the count is started during SMPC cold reset."
So it seems the date and time are already automatically initialised on power up after a cold reset (and perhaps even the language is automatically set to English)
You may be wondering why does the system ask to set the time and date if they have already been automatically initialised? Well there is a setting called "STE" which seems to denote weather the time and date has been set or not:-
•STE = 0: Not SETTIME after SMPC cold reset
•STE = 1: SETTIME is done after SMPC cold reset
So perhaps if this bit was changed to 1 instead of 0 whilst the SMEM is being initialized with the default values by the BIOS, this might be enough to make the system skip the time and date settings screen? Just a thought (Although there are likely multiple ways the BIOS could be modified to skip these screens)
TL:DR - Hoping someone can modify the Sega Saturn BIOS to skip the Set Language / Set Clock screens.
Thanks in advance for any help
I'm sure everyone here is aware of the CR2032 battery needed for the Saturn. It serves two important functions:-
1) It provides power to the SRAM chip to store game save data when the systems powered off.
2) It provides power to the SMPC (System Manager & Peripheral Control) chip to allow it to store and update the RTC (Real Time Clock) In other words it allows the system to keep track of the date and time even when the power is off.
Using a CR2032 battery to power an SRAM chip to store save data is a very common arrangment - many Nintendo game cartridges store save data in exactly the same way and can often hold data for 20 years or more. The problem is the SMPC consumes a rather large amount of power, and this drains the CR2032 battery very quickly (Often within just a few months) This also leads to the loss of all internal save data.
There have been mods for a few years now that replace the consoles SRAM with FRAM. Since FRAM doesn't require any power to store save data this mod prevents any save data being lost when the battery dies:-
db-electronics.ca/2017/02/10/sega-saturn-internal-memory-mod-with-fram-no-battery-required/
However this still leaves one other slightly irritating feature of the Saturn - which is that when the CR2032 clock battery dies the system will repeatedly prompt you to set the language and clock date/time on bootup
This is controlled by the system BIOS (AKA Boot ROM) The actual boot process looks like this:-
As you can see, if the SMPC chip registers a "cold reset" (Battery is dead/removed/exchanged) the BIOS proceeds to display the Set Date/Time screens (There is also a blue button hidden inside the VCD slot on development and early retail models that also issues an SMPC reset when pressed)
I am hoping there might be somebody here with SH2-Assembler experience who might be able to edit the Saturn BIOS to skip these two screens. In other words the system would automatically default to English and 01/01/1994 12:00am settings and continue on with the normal boot sequence. This should make the system always default to the same settings after every power cycle. However if necessary the date/time could still be manually changed by accessing the system settings later (e.g. for Christmas Nights)
This alteration wouldn't prevent people from using a battery to store the language and date/time as normal if they wanted to, the only difference would be that if your battery dies, you wont immediately know about it by the set language/clock screens appearing on bootup. Also, if you typically use a language other than english then the system would revert to english (Although I guess if this mod is possible someone could create different BIOS versions with different default languages configured if required)
Other information which could aid in the BIOS modification
I'm no expert, but from reading the Boot ROM and SMPC User Manuals here:-
segaretro.org/images/a/ae/ST-079B-R3-011895.pdf
segaretro.org/images/9/9b/ST-169-R1-072694.pdf
It states that "The SMPC has a 4-byte battery backupable memory (SMEM)" and that "the SMEM contents are cleared to 0 when the SMPC is cold reset."
The SMEM is where the date and time is stored (Not sure where exactly the language setting is stored, but its probably in the same area?) Also the docs say:-
"The time is initialized to "12/31/93 Friday 23:59:59" and the count is started during SMPC cold reset."
So it seems the date and time are already automatically initialised on power up after a cold reset (and perhaps even the language is automatically set to English)
You may be wondering why does the system ask to set the time and date if they have already been automatically initialised? Well there is a setting called "STE" which seems to denote weather the time and date has been set or not:-
•STE = 0: Not SETTIME after SMPC cold reset
•STE = 1: SETTIME is done after SMPC cold reset
So perhaps if this bit was changed to 1 instead of 0 whilst the SMEM is being initialized with the default values by the BIOS, this might be enough to make the system skip the time and date settings screen? Just a thought (Although there are likely multiple ways the BIOS could be modified to skip these screens)
TL:DR - Hoping someone can modify the Sega Saturn BIOS to skip the Set Language / Set Clock screens.
Thanks in advance for any help