Add Dreamcast 32MB RAM Mod (#1198)
This commit is contained in:
parent
2445739c0e
commit
a7dbbbe578
|
@ -121,6 +121,7 @@ Option<int> GDBPort("Debug.GDBPort", debugger::DEFAULT_PORT);
|
|||
Option<bool> GDBWaitForConnection("Debug.GDBWaitForConnection");
|
||||
Option<bool> UseReios("UseReios");
|
||||
Option<bool> FastGDRomLoad("FastGDRomLoad", false);
|
||||
Option<bool> RamMod32MB("Dreamcast.RamMod32MB", false);
|
||||
|
||||
Option<bool> OpenGlChecks("OpenGlChecks", false, "validate");
|
||||
|
||||
|
|
|
@ -480,6 +480,7 @@ extern Option<int> GDBPort;
|
|||
extern Option<bool> GDBWaitForConnection;
|
||||
extern Option<bool> UseReios;
|
||||
extern Option<bool> FastGDRomLoad;
|
||||
extern Option<bool> RamMod32MB;
|
||||
|
||||
extern Option<bool> OpenGlChecks;
|
||||
|
||||
|
|
|
@ -420,7 +420,7 @@ static void setPlatform(int platform)
|
|||
switch (platform)
|
||||
{
|
||||
case DC_PLATFORM_DREAMCAST:
|
||||
settings.platform.ram_size = 16_MB;
|
||||
settings.platform.ram_size = config::RamMod32MB ? 32_MB : 16_MB;
|
||||
settings.platform.vram_size = 8_MB;
|
||||
settings.platform.aram_size = 2_MB;
|
||||
settings.platform.bios_size = 2_MB;
|
||||
|
|
|
@ -2423,6 +2423,11 @@ static void gui_display_settings()
|
|||
OptionCheckbox("Serial Console", config::SerialConsole,
|
||||
"Dump the Dreamcast serial console to stdout");
|
||||
#endif
|
||||
{
|
||||
DisabledScope scope(game_started);
|
||||
OptionCheckbox("Dreamcast 32MB RAM Mod", config::RamMod32MB,
|
||||
"Enables 32MB RAM Mod for Dreamcast. May affect compatibility");
|
||||
}
|
||||
OptionCheckbox("Dump Textures", config::DumpTextures,
|
||||
"Dump all textures into data/texdump/<game id>");
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ public:
|
|||
V39,
|
||||
V40,
|
||||
V41,
|
||||
Current = V41,
|
||||
V42,
|
||||
Current = V42,
|
||||
|
||||
Next = Current + 1,
|
||||
};
|
||||
|
@ -101,6 +102,15 @@ public:
|
|||
throw Exception("Unsupported version");
|
||||
if (_version > Current)
|
||||
throw Exception("Version too recent");
|
||||
|
||||
if(_version >= V42 && settings.platform.isConsole())
|
||||
{
|
||||
u32 ramSize;
|
||||
deserialize(ramSize);
|
||||
if (ramSize != settings.platform.ram_size) {
|
||||
throw Exception("Selected RAM Size doesn't match Save State");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -162,6 +172,8 @@ public:
|
|||
{
|
||||
Version v = Current;
|
||||
serialize(v);
|
||||
if (settings.platform.isConsole())
|
||||
serialize(settings.platform.ram_size);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -689,6 +689,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
|||
"disabled",
|
||||
#endif
|
||||
},
|
||||
{
|
||||
CORE_OPTION_NAME "_dc_32mb_mod",
|
||||
"Dreamcast 32MB RAM Mod",
|
||||
NULL,
|
||||
"Enables 32MB RAM Mod for Dreamcast. May affect compatibility",
|
||||
NULL,
|
||||
"hacks",
|
||||
{
|
||||
{ "disabled", NULL },
|
||||
{ "enabled", NULL },
|
||||
{ NULL, NULL },
|
||||
},
|
||||
"disabled",
|
||||
},
|
||||
{
|
||||
CORE_OPTION_NAME "_sh4clock",
|
||||
"SH4 CPU under/overclock",
|
||||
|
|
|
@ -101,6 +101,7 @@ Option<bool> UseReios(CORE_OPTION_NAME "_hle_bios");
|
|||
|
||||
Option<bool> OpenGlChecks("", false);
|
||||
Option<bool> FastGDRomLoad(CORE_OPTION_NAME "_gdrom_fast_loading", false);
|
||||
Option<bool> RamMod32MB(CORE_OPTION_NAME "_dc_32mb_mod", false);
|
||||
|
||||
//Option<std::vector<std::string>, false> ContentPath("");
|
||||
//Option<bool, false> HideLegacyNaomiRoms("", true);
|
||||
|
|
|
@ -32,7 +32,7 @@ TEST_F(SerializeTest, SizeTest)
|
|||
std::vector<char> data(30000000);
|
||||
Serializer ser(data.data(), data.size());
|
||||
dc_serialize(ser);
|
||||
ASSERT_EQ(28191378u, ser.size());
|
||||
ASSERT_EQ(28191382u, ser.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue