From 76d64114794ed7370e843ba74ec069a1f28913d5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 18 Sep 2018 20:12:42 -0700 Subject: [PATCH] GB Serialize: Fix IRQ pending/EI pending confusion --- CHANGES | 1 + include/mgba/internal/gb/serialize.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 57090240b..df61c3760 100644 --- a/CHANGES +++ b/CHANGES @@ -56,6 +56,7 @@ Bugfixes: - GB, GBA Savedata: Fix unmasking savedata crash - GBA DMA: Fix temporal sorting of DMAs of different priorities - FFmpeg: Fix encoding audio/video queue issues + - GB Serialize: Fix IRQ pending/EI pending confusion Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/include/mgba/internal/gb/serialize.h b/include/mgba/internal/gb/serialize.h index f4f36c640..14cfd12d4 100644 --- a/include/mgba/internal/gb/serialize.h +++ b/include/mgba/internal/gb/serialize.h @@ -47,7 +47,7 @@ mLOG_DECLARE_CATEGORY(GB_STATE); * | 0x00040 - 0x00043: Reserved (DI pending cycles) * | 0x00044 - 0x00047: Flags * | bit 0: Is condition met? - * | bit 1: Is condition IRQ pending? + * | bit 1: Is IRQ pending? * | bit 2: Double speed * | bit 3: Is EI pending? * | bits 4 - 31: Reserved @@ -232,7 +232,7 @@ DECL_BITFIELD(GBSerializedCpuFlags, uint32_t); DECL_BIT(GBSerializedCpuFlags, Condition, 0); DECL_BIT(GBSerializedCpuFlags, IrqPending, 1); DECL_BIT(GBSerializedCpuFlags, DoubleSpeed, 2); -DECL_BIT(GBSerializedCpuFlags, EiPending, 1); +DECL_BIT(GBSerializedCpuFlags, EiPending, 3); DECL_BITFIELD(GBSerializedTimerFlags, uint8_t); DECL_BIT(GBSerializedTimerFlags, IrqPending, 0);