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> GDBWaitForConnection("Debug.GDBWaitForConnection");
|
||||||
Option<bool> UseReios("UseReios");
|
Option<bool> UseReios("UseReios");
|
||||||
Option<bool> FastGDRomLoad("FastGDRomLoad", false);
|
Option<bool> FastGDRomLoad("FastGDRomLoad", false);
|
||||||
|
Option<bool> RamMod32MB("Dreamcast.RamMod32MB", false);
|
||||||
|
|
||||||
Option<bool> OpenGlChecks("OpenGlChecks", false, "validate");
|
Option<bool> OpenGlChecks("OpenGlChecks", false, "validate");
|
||||||
|
|
||||||
|
|
|
@ -480,6 +480,7 @@ extern Option<int> GDBPort;
|
||||||
extern Option<bool> GDBWaitForConnection;
|
extern Option<bool> GDBWaitForConnection;
|
||||||
extern Option<bool> UseReios;
|
extern Option<bool> UseReios;
|
||||||
extern Option<bool> FastGDRomLoad;
|
extern Option<bool> FastGDRomLoad;
|
||||||
|
extern Option<bool> RamMod32MB;
|
||||||
|
|
||||||
extern Option<bool> OpenGlChecks;
|
extern Option<bool> OpenGlChecks;
|
||||||
|
|
||||||
|
|
|
@ -420,7 +420,7 @@ static void setPlatform(int platform)
|
||||||
switch (platform)
|
switch (platform)
|
||||||
{
|
{
|
||||||
case DC_PLATFORM_DREAMCAST:
|
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.vram_size = 8_MB;
|
||||||
settings.platform.aram_size = 2_MB;
|
settings.platform.aram_size = 2_MB;
|
||||||
settings.platform.bios_size = 2_MB;
|
settings.platform.bios_size = 2_MB;
|
||||||
|
|
|
@ -2423,6 +2423,11 @@ static void gui_display_settings()
|
||||||
OptionCheckbox("Serial Console", config::SerialConsole,
|
OptionCheckbox("Serial Console", config::SerialConsole,
|
||||||
"Dump the Dreamcast serial console to stdout");
|
"Dump the Dreamcast serial console to stdout");
|
||||||
#endif
|
#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,
|
OptionCheckbox("Dump Textures", config::DumpTextures,
|
||||||
"Dump all textures into data/texdump/<game id>");
|
"Dump all textures into data/texdump/<game id>");
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ public:
|
||||||
V39,
|
V39,
|
||||||
V40,
|
V40,
|
||||||
V41,
|
V41,
|
||||||
Current = V41,
|
V42,
|
||||||
|
Current = V42,
|
||||||
|
|
||||||
Next = Current + 1,
|
Next = Current + 1,
|
||||||
};
|
};
|
||||||
|
@ -101,6 +102,15 @@ public:
|
||||||
throw Exception("Unsupported version");
|
throw Exception("Unsupported version");
|
||||||
if (_version > Current)
|
if (_version > Current)
|
||||||
throw Exception("Version too recent");
|
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>
|
template<typename T>
|
||||||
|
@ -162,6 +172,8 @@ public:
|
||||||
{
|
{
|
||||||
Version v = Current;
|
Version v = Current;
|
||||||
serialize(v);
|
serialize(v);
|
||||||
|
if (settings.platform.isConsole())
|
||||||
|
serialize(settings.platform.ram_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
@ -689,6 +689,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
||||||
"disabled",
|
"disabled",
|
||||||
#endif
|
#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",
|
CORE_OPTION_NAME "_sh4clock",
|
||||||
"SH4 CPU under/overclock",
|
"SH4 CPU under/overclock",
|
||||||
|
|
|
@ -101,6 +101,7 @@ Option<bool> UseReios(CORE_OPTION_NAME "_hle_bios");
|
||||||
|
|
||||||
Option<bool> OpenGlChecks("", false);
|
Option<bool> OpenGlChecks("", false);
|
||||||
Option<bool> FastGDRomLoad(CORE_OPTION_NAME "_gdrom_fast_loading", 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<std::vector<std::string>, false> ContentPath("");
|
||||||
//Option<bool, false> HideLegacyNaomiRoms("", true);
|
//Option<bool, false> HideLegacyNaomiRoms("", true);
|
||||||
|
|
|
@ -32,7 +32,7 @@ TEST_F(SerializeTest, SizeTest)
|
||||||
std::vector<char> data(30000000);
|
std::vector<char> data(30000000);
|
||||||
Serializer ser(data.data(), data.size());
|
Serializer ser(data.data(), data.size());
|
||||||
dc_serialize(ser);
|
dc_serialize(ser);
|
||||||
ASSERT_EQ(28191378u, ser.size());
|
ASSERT_EQ(28191382u, ser.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue