aboutsummaryrefslogtreecommitdiff
path: root/src/ARM.cpp
diff options
context:
space:
mode:
authorJesse Talavera <jesse@jesse.tg>2023-12-05 10:47:16 -0500
committerGitHub <noreply@github.com>2023-12-05 16:47:16 +0100
commit090627b3c19488e36677113e2f1ac16bdb4e2d05 (patch)
treed731b7b302801c9317c34584cdebb811b93739d0 /src/ARM.cpp
parentae91d89f7c18f6b4153deeef7e3ebe14a1d849fe (diff)
Remove the last `ConfigEntry` state (#1902)
* Get rid of `ConfigEntry::ExternalBIOSEnable` - Now the BIOS files themselves are checked - The frontend's `Config::ExternalBIOSEnable` is not affected * Add `JITArgs` * Pass the JIT status to the `ARM` constructors * Encapsulate `NDS::EnableJIT` * Pass `JITArgs` to `ARMJIT`'s constructor * Remove the `JIT_*` `ConfigEntry`s in favor of members - Allow all the JIT args to be set with `NDS::SetJITArgs` - Encapsulate the JIT-related parameters in `ARMJIT` so they can reset the block cache if changed - Update the active (or newly-created) console in the frontend with adjusted JIT args * Make audio bit depth and interpolation configurable in `NDSArgs` - Define enums for both - Give those settings default values in `NDSArgs` - Remove `ConfigEntry::AudioBitDepth` - Initialize these settings in the relevant SPU constructors * Move the last DSi-specific logic in `Reset` to its own subclass * Remove `ConfigEntry::DSi_FullBIOSBoot` - Add members to `DSi` instead for getting and setting this - Update the frontend to accommodate these changes * Oops, missed a spot * Remove `ConfigEntry::Firm_MAC` and `Platform::GetConfigArray` - Also move the MAC parsing code to `ROMManager` * Remove the last `ConfigEntry` state - Make GDB support configurable via members * Add some `#ifdef`s that I'd almost forgotten
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r--src/ARM.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index 659d303..2c19fa3 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -106,17 +106,17 @@ const u32 ARM::ConditionTable[16] =
0x0000 // NE
};
-ARM::ARM(u32 num, melonDS::NDS& nds) :
+ARM::ARM(u32 num, bool jit, std::optional<GDBArgs> gdb, melonDS::NDS& nds) :
#ifdef GDBSTUB_ENABLED
- GdbStub(this, Platform::GetConfigInt(num ? Platform::GdbPortARM7 : Platform::GdbPortARM9)),
+ GdbStub(this, gdb ? (num ? gdb->PortARM7 : gdb->PortARM9) : 0),
#endif
Num(num), // well uh
NDS(nds)
{
#ifdef GDBSTUB_ENABLED
- if (Platform::GetConfigBool(Platform::GdbEnabled)
+ if (gdb
#ifdef JIT_ENABLED
- && !Platform::GetConfigBool(Platform::JIT_Enable)
+ && !jit // TODO: Should we support toggling the GdbStub without destroying the ARM?
#endif
)
GdbStub.Init();
@@ -129,14 +129,14 @@ ARM::~ARM()
// dorp
}
-ARMv5::ARMv5(melonDS::NDS& nds) : ARM(0, nds)
+ARMv5::ARMv5(melonDS::NDS& nds, std::optional<GDBArgs> gdb, bool jit) : ARM(0, jit, gdb, nds)
{
DTCM = NDS.JIT.Memory.GetARM9DTCM();
PU_Map = PU_PrivMap;
}
-ARMv4::ARMv4(melonDS::NDS& nds) : ARM(1, nds)
+ARMv4::ARMv4(melonDS::NDS& nds, std::optional<GDBArgs> gdb, bool jit) : ARM(1, jit, gdb, nds)
{
//
}
@@ -187,8 +187,6 @@ void ARM::Reset()
#ifdef GDBSTUB_ENABLED
IsSingleStep = false;
BreakReq = false;
- BreakOnStartup = Platform::GetConfigBool(
- Num ? Platform::GdbARM7BreakOnStartup : Platform::GdbARM9BreakOnStartup);
#endif
// zorp
@@ -224,7 +222,7 @@ void ARM::DoSavestate(Savestate* file)
file->VarArray(R_UND, 3*sizeof(u32));
file->Var32(&CurInstr);
#ifdef JIT_ENABLED
- if (file->Saving && NDS.EnableJIT)
+ if (file->Saving && NDS.IsJITEnabled())
{
// hack, the JIT doesn't really pipeline
// but we still want JIT save states to be