Page 1 of 1

Gameboy/GBC Real-Time Clock Support

Posted: Mon Jan 18, 2021 5:56 pm
by Moondandy
Following on from a discussion on the discord, I thought I would make a post here and raise a ticket so it's not forgotten about again.

Currently the GB/GBC core does not have RTC support, although the work was done in branch awhile back (but it may no longer be compatible) the work need to be done to save RTC bytes to the SD card.

The following games would benefit from the RTC:

Real-Time Clock: Games using the MBC3 mapper and a crystal oscillator to keep an accurate clock even with the game boy off.

Barcode Taisen Bardigun
Bokujo Monogatari GB / Harvest Moon GB
Cardcaptor Sakura - Itsumo Sakura-chan to Issho
E.T. - The Extra-Terrestrial - Digital Companion
The Great Battle Pocket
Itsudemo! Nyan to Wonderful
Kandzume Monsters
Keitai Denjuu Telefang - Power/Speed Version
Mary-Kate and Ashley - Pocket Planner
Nikkan Berutomo Club
Pokemon Gold/Silver/Crystal (All regions, all versions)
Tottoko Hamtaro - Tomodachi Daisakusen Dechu
Trade & Battle Card Hero

https://github.com/MiSTer-devel/Gameboy ... issues/131

Re: Gameboy/GBC Real-Time Clock Support

Posted: Tue Jan 19, 2021 6:18 am
by FPGAzumSpass
I made the RTC implementation last year.
Here are the changes:

https://github.com/RobertPeip/Gameboy_M ... 4b21d65ec0

Testroms(with code) i used to verify it is attached.


Completing it is probably not that hard, it just needs to save some additional bytes to sdcard, together with the savegame, like the GBA version does.(Rysha did the saving part for GBA)
Still understanding how the framework works and a lot of testing is required, so existing saves don't get corrupted.
If someone wants to dig into, i can support.

Re: Gameboy/GBC Real-Time Clock Support

Posted: Wed Jan 20, 2021 4:57 pm
by FPGAzumSpass
I implemented this one now with saving to sdcard.
You can try with this testversion attached.

In case you are worried about bugs, please backup the savegames of the games you try.

Will do a pull request the next days in case noone reports problems.

Re: Gameboy/GBC Real-Time Clock Support

Posted: Sun Jan 24, 2021 1:01 am
by Moondandy
Live in the core now, thanks for adding this!