From 4274c481d7d9af03bf5103d711e93092ec002a76 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 24 May 2020 22:04:47 -0400 Subject: [PATCH] GB: Added missing variables in save states --- Core/GbCpu.cpp | 3 ++- Core/GbPpu.cpp | 2 +- Core/GbTimer.cpp | 2 +- Libretro/Makefile.common | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/GbCpu.cpp b/Core/GbCpu.cpp index 8b1f886..fbc97bf 100644 --- a/Core/GbCpu.cpp +++ b/Core/GbCpu.cpp @@ -1376,6 +1376,7 @@ void GbCpu::Serialize(Serializer& s) { s.Stream( _state.CycleCount, _state.PC, _state.SP, _state.A, _state.Flags, _state.B, - _state.C, _state.D, _state.E, _state.H, _state.L, _state.IME, _state.Halted + _state.C, _state.D, _state.E, _state.H, _state.L, _state.IME, _state.Halted, + _state.EiPending ); } diff --git a/Core/GbPpu.cpp b/Core/GbPpu.cpp index 94e6612..9559837 100644 --- a/Core/GbPpu.cpp +++ b/Core/GbPpu.cpp @@ -701,7 +701,7 @@ void GbPpu::Serialize(Serializer& s) _state.Scanline, _state.Cycle, _state.Mode, _state.LyCompare, _state.BgPalette, _state.ObjPalette0, _state.ObjPalette1, _state.ScrollX, _state.ScrollY, _state.WindowX, _state.WindowY, _state.Control, _state.LcdEnabled, _state.WindowTilemapSelect, _state.WindowEnabled, _state.BgTileSelect, _state.BgTilemapSelect, _state.LargeSprites, _state.SpritesEnabled, _state.BgEnabled, - _state.Status, _state.FrameCount, _lastFrameTime, + _state.Status, _state.FrameCount, _lastFrameTime, _state.LyCoincidenceFlag, _state.CgbBgPalAutoInc, _state.CgbBgPalPosition, _state.CgbObjPalAutoInc, _state.CgbObjPalPosition, _state.CgbVramBank ); diff --git a/Core/GbTimer.cpp b/Core/GbTimer.cpp index 9b39486..2849504 100644 --- a/Core/GbTimer.cpp +++ b/Core/GbTimer.cpp @@ -131,5 +131,5 @@ void GbTimer::Write(uint16_t addr, uint8_t value) void GbTimer::Serialize(Serializer& s) { - s.Stream(_divider, _counter, _modulo, _control, _timerEnabled, _timerDivider); + s.Stream(_divider, _counter, _modulo, _control, _timerEnabled, _timerDivider, _needReload, _reloaded); } diff --git a/Libretro/Makefile.common b/Libretro/Makefile.common index aa0a52d..c471002 100644 --- a/Libretro/Makefile.common +++ b/Libretro/Makefile.common @@ -64,6 +64,7 @@ SOURCES_CXX := $(LIBRETRO_DIR)/libretro.cpp \ $(CORE_DIR)/GameServerConnection.cpp \ $(CORE_DIR)/Gameboy.cpp \ $(CORE_DIR)/GbCpu.cpp \ + $(CORE_DIR)/GbDmaController.cpp \ $(CORE_DIR)/GbPpu.cpp \ $(CORE_DIR)/GbApu.cpp \ $(CORE_DIR)/GbTimer.cpp \