mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-10 16:03:15 -04:00
Saturn: Now runs a tiny bit before crashing due to out of memory
This commit is contained in:
parent
ce7d07944a
commit
88046b4467
@ -34,13 +34,14 @@ const char* Platform_AppNameSuffix = " Saturn";
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
|
#define WRITE_ADDRESS CS0(0x00100001)
|
||||||
|
// in Medafen, patch DummyWrite in src/ss/Cart.cpp to instead log the value
|
||||||
|
|
||||||
void Platform_Log(const char* msg, int len) {
|
void Platform_Log(const char* msg, int len) {
|
||||||
char tmp[2048 + 1];
|
for (int i = 0; i < len; i++) {
|
||||||
len = min(len, 2048);
|
MEMORY_WRITE(8, WRITE_ADDRESS, msg[i]);
|
||||||
Mem_Copy(tmp, msg, len); tmp[len] = '\0';
|
}
|
||||||
|
MEMORY_WRITE(8, WRITE_ADDRESS, '\n');
|
||||||
dbgio_printf("%s\n", tmp);
|
|
||||||
dbgio_flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeMS DateTime_CurrentUTC(void) {
|
TimeMS DateTime_CurrentUTC(void) {
|
||||||
@ -211,9 +212,6 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
|
|||||||
*--------------------------------------------------------Platform---------------------------------------------------------*
|
*--------------------------------------------------------Platform---------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
void Platform_Init(void) {
|
void Platform_Init(void) {
|
||||||
dbgio_init();
|
|
||||||
dbgio_dev_default_init(DBGIO_DEV_VDP2_ASYNC);
|
|
||||||
dbgio_dev_font_load();
|
|
||||||
Stopwatch_Init();
|
Stopwatch_Init();
|
||||||
|
|
||||||
Options_SetBool(OPT_USE_CHAT_FONT, true);
|
Options_SetBool(OPT_USE_CHAT_FONT, true);
|
||||||
|
@ -69,7 +69,7 @@ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, cc_string* arg
|
|||||||
// (e.g. when running via some emulators)
|
// (e.g. when running via some emulators)
|
||||||
if (!argc) return 0;
|
if (!argc) return 0;
|
||||||
|
|
||||||
#ifdef CC_BUILD_PS1
|
#if defined CC_BUILD_PS1 || defined CC_BUILD_SATURN
|
||||||
// When running in DuckStation at least, argv was a five element array of empty strings ???
|
// When running in DuckStation at least, argv was a five element array of empty strings ???
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user