git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 345e51647f2a7ce1ea39f21497f5a6dc75a587c8
parent 8068ff41fb3ce24829e44925c59fb32d597b4094
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Thu, 30 Sep 2021 21:23:52 +0300

API issue – RTC data should not be wiped after GB_reset

Diffstat:
MCore/gb.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/Core/gb.c b/Core/gb.c @@ -1603,7 +1603,10 @@ void GB_reset(GB_gameboy_t *gb) { uint32_t mbc_ram_size = gb->mbc_ram_size; GB_model_t model = gb->model; + uint8_t rtc_section[GB_SECTION_SIZE(rtc)]; + memcpy(rtc_section, GB_GET_SECTION(gb, rtc), sizeof(rtc_section)); memset(gb, 0, (size_t)GB_GET_SECTION((GB_gameboy_t *) 0, unsaved)); + memcpy(GB_GET_SECTION(gb, rtc), rtc_section, sizeof(rtc_section)); gb->model = model; gb->version = GB_STRUCT_VERSION;

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.