diff --git a/Config/Supermodel.ini b/Config/Supermodel.ini index a6092f9..e6c168d 100644 --- a/Config/Supermodel.ini +++ b/Config/Supermodel.ini @@ -24,7 +24,7 @@ ; MusicVolume = 200 ; ; ... etc. ... ; -; Input settings are an exceptional case: they are only allowed in the global +; Input mappings are an exceptional case: they are only allowed in the global ; section. Per-game input mappings are not supported. ; ; For a list of all valid settings, please consult README.txt. Only default diff --git a/Docs/README.txt b/Docs/README.txt index 611db38..7c0989b 100644 --- a/Docs/README.txt +++ b/Docs/README.txt @@ -491,7 +491,7 @@ Drive board ROMs are required. The sizes and checksums must match those listed above. The file names may be different but will almost certainly contain the same identifying numbers. Ensure that the appropriate drive board ROM files are present in the -corresponding games' ZIP archive, otherwise Supermodel will silently proceed +corresponding games' ZIP archives, otherwise Supermodel will silently proceed without force feedback. Force feedback will only work with the DirectInput (the default on Windows) and @@ -515,7 +515,7 @@ vibration. The strength of each can be tuned with the following settings: DirectInputVibrateMax = 100 They are given as percentages and represent the maximum strength for each -effect. Setting them to 0 disables them entirely. Values above 100% are +effect. A setting of 0 disables them entirely. Values above 100% are accepted but may clip or distort the effect (and possibly damage your hardware). By default, they are set to 100%, as shown above. diff --git a/Src/Games.cpp b/Src/Games.cpp index 11f488e..7054d78 100644 --- a/Src/Games.cpp +++ b/Src/Games.cpp @@ -105,7 +105,7 @@ const struct GameInfo g_Model3GameList[] = // Daytona USA 2 (Revision A) { "daytona2", - "Daytona USA 2: Battle on the Edge", + "Daytona USA 2 Battle on the Edge", "Sega", 1998, 0x21, @@ -2939,13 +2939,13 @@ const struct GameInfo g_Model3GameList[] = 0, 0, 0, - 0, + false, { - { NULL, NULL, 0, 0, 0, 0, false }, - { NULL, NULL, 0, 0, 0, 0, false }, - { NULL, NULL, 0, 0, 0, 0, false }, - { NULL, NULL, 0, 0, 0, 0, false } + { NULL, false, NULL, 0, 0, 0, 0, 0, false }, + { NULL, false, NULL, 0, 0, 0, 0, 0, false }, + { NULL, false, NULL, 0, 0, 0, 0, 0, false }, + { NULL, false, NULL, 0, 0, 0, 0, 0, false } } } }; diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp index dfff595..9ebb2c8 100644 --- a/Src/Model3/Model3.cpp +++ b/Src/Model3/Model3.cpp @@ -2329,7 +2329,7 @@ void CModel3::RunMainBoardFrame(void) { // Compute display and VBlank timings unsigned frameCycles = g_Config.GetPowerPCFrequency()*1000000/60; - unsigned vblCycles = (unsigned) ((float) frameCycles * 20.0f/100.0f); // 20% vblank (just a guess; probably too long) + unsigned vblCycles = (unsigned) ((float) frameCycles * 2.5f/100.0f); // 2.5% vblank (ridiculously short and wrong but bigger values cause flicker in Daytona) unsigned dispCycles = frameCycles - vblCycles; // Run the PowerPC for the active display part of the frame diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 5e9a988..18d2174 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -1,4 +1,5 @@ //TODO before release: +// x VBL to 2.5% // x Change EmulateSCSP -> EmulateSound // x Map neutral gear to individual button // x Re-do cursors, make them larger @@ -354,9 +355,9 @@ static bool ConfigureInputs(CInputs *Inputs, bool configure) Inputs->WriteToINIFile(&INI, "Global"); if (OKAY != INI.Write(CONFIG_FILE_COMMENT)) - ErrorLog("Unable to save configuration to %s.", CONFIG_FILE_PATH); + ErrorLog("Unable to save configuration to '%s'.", CONFIG_FILE_PATH); else - printf("Configuration successfully saved to %s.\n", CONFIG_FILE_PATH); + printf("Configuration successfully saved to '%s'.\n", CONFIG_FILE_PATH); } else puts("Configuration aborted..."); @@ -490,7 +491,7 @@ static void SaveState(CModel3 *Model3) sprintf(filePath, "Saves/%s.st%d", Model3->GetGameInfo()->id, saveSlot); if (OKAY != SaveState.Create(filePath, "Supermodel Save State", "Supermodel Version " SUPERMODEL_VERSION)) { - ErrorLog("Unable to save state to %s.", filePath); + ErrorLog("Unable to save state to '%s'.", filePath); return; } @@ -501,8 +502,8 @@ static void SaveState(CModel3 *Model3) // Save state Model3->SaveState(&SaveState); SaveState.Close(); - printf("Saved state to %s.\n", filePath); - DebugLog("Saved state to %s.\n", filePath); + printf("Saved state to '%s'.\n", filePath); + DebugLog("Saved state to '%s'.\n", filePath); } static void LoadState(CModel3 *Model3) @@ -517,28 +518,28 @@ static void LoadState(CModel3 *Model3) // Open and check to make sure format is correct if (OKAY != SaveState.Load(filePath)) { - ErrorLog("Unable to load state from %s.", filePath); + ErrorLog("Unable to load state from '%s'.", filePath); return; } if (OKAY != SaveState.FindBlock("Supermodel Save State")) { - ErrorLog("%s does not appear to be a valid save state file.", filePath); + ErrorLog("'%s' does not appear to be a valid save state file.", filePath); return; } SaveState.Read(&fileVersion, sizeof(fileVersion)); if (fileVersion != STATE_FILE_VERSION) { - ErrorLog("%s is incompatible with this version of Supermodel.", filePath); + ErrorLog("'%s' is incompatible with this version of Supermodel.", filePath); return; } // Load Model3->LoadState(&SaveState); SaveState.Close(); - printf("Loaded state from %s.\n", filePath); - DebugLog("Loaded state from %s.\n", filePath); + printf("Loaded state from '%s'.\n", filePath); + DebugLog("Loaded state from '%s'.\n", filePath); } static void SaveNVRAM(CModel3 *Model3) @@ -550,7 +551,7 @@ static void SaveNVRAM(CModel3 *Model3) sprintf(filePath, "NVRAM/%s.nv", Model3->GetGameInfo()->id); if (OKAY != NVRAM.Create(filePath, "Supermodel NVRAM State", "Supermodel Version " SUPERMODEL_VERSION)) { - ErrorLog("Unable to save NVRAM to %s. Make sure directory exists!", filePath); + ErrorLog("Unable to save NVRAM to '%s'. Make sure directory exists!", filePath); return; } @@ -561,7 +562,7 @@ static void SaveNVRAM(CModel3 *Model3) // Save NVRAM Model3->SaveNVRAM(&NVRAM); NVRAM.Close(); - DebugLog("Saved NVRAM to %s.\n", filePath); + DebugLog("Saved NVRAM to '%s'.\n", filePath); } static void LoadNVRAM(CModel3 *Model3) @@ -576,27 +577,27 @@ static void LoadNVRAM(CModel3 *Model3) // Open and check to make sure format is correct if (OKAY != NVRAM.Load(filePath)) { - //ErrorLog("Unable to restore NVRAM from %s.", filePath); + //ErrorLog("Unable to restore NVRAM from '%s'.", filePath); return; } if (OKAY != NVRAM.FindBlock("Supermodel NVRAM State")) { - ErrorLog("%s does not appear to be a valid NVRAM file.", filePath); + ErrorLog("'%s' does not appear to be a valid NVRAM file.", filePath); return; } NVRAM.Read(&fileVersion, sizeof(fileVersion)); if (fileVersion != NVRAM_FILE_VERSION) { - ErrorLog("%s is incompatible with this version of Supermodel.", filePath); + ErrorLog("'%s' is incompatible with this version of Supermodel.", filePath); return; } // Load Model3->LoadNVRAM(&NVRAM); NVRAM.Close(); - DebugLog("Loaded NVRAM from %s.\n", filePath); + DebugLog("Loaded NVRAM from '%s'.\n", filePath); } @@ -1179,10 +1180,6 @@ static void Help(void) puts("Core Options:"); printf(" -ppc-frequency= PowerPC frequency in MHz [Default: %d]\n", g_Config.GetPowerPCFrequency()); puts(" -no-threads Disable multi-threading"); -#ifdef SUPERMODEL_DEBUGGER - puts(" -disable-debugger Completely disable debugger functionality"); - puts(" -enter-debugger Enter debugger at start of emulation"); -#endif // SUPERMODEL_DEBUGGER puts(""); puts("Video Options:"); puts(" -res=, Resolution"); @@ -1191,6 +1188,7 @@ static void Help(void) puts(" -show-fps Display frame rate in window title bar"); puts(" -vert-shader= Load 3D vertex shader from external file"); puts(" -frag-shader= Load 3D fragment shader from external file"); + puts(" -print-gl-info Print OpenGL driver information and quit\n"); puts(""); puts("Audio Options:"); puts(" -sound-volume= Volume of sound effects in % [Default: 100]"); @@ -1204,14 +1202,15 @@ static void Help(void) printf(" -input-system= Input system [Default: %s]\n", g_Config.GetInputSystem()); #endif puts(" -force-feedback Enable force feedback (DirectInput, XInput) [EXPERIMENTAL]"); - puts(" -print-inputs Prints current input configuration"); puts(" -config-inputs Configure inputs for keyboards, mice, and joysticks"); + puts(" -print-inputs Prints current input configuration"); +#ifdef SUPERMODEL_DEBUGGER puts(""); puts("Diagnostic Options:"); -#ifdef DEBUG // intended for developers only + puts(" -disable-debugger Completely disable debugger functionality"); + puts(" -enter-debugger Enter debugger at start of emulation"); puts(" -dis=[,n] Disassemble PowerPC code from CROM"); -#endif - puts(" -print-gl-info Print OpenGL driver information and quit\n"); +#endif // SUPERMODEL_DEBUGGER } // Print game list @@ -1433,7 +1432,7 @@ int main(int argc, char **argv) else { if (fileIdx) // already specified a file - ErrorLog("Multiple files specified. Using %s, ignoring %s.", argv[fileIdx], argv[i]); + ErrorLog("Multiple files specified. Using '%s', ignoring '%s'.", argv[fileIdx], argv[i]); else fileIdx = i; } @@ -1469,7 +1468,7 @@ int main(int argc, char **argv) #endif // SUPERMODEL_WIN32 else { - ErrorLog("Unknown input system: '%s'.\n", g_Config.GetInputSystem()); + ErrorLog("Unknown input system: %s.\n", g_Config.GetInputSystem()); exitCode = 1; goto Exit; } diff --git a/Src/ROMLoad.cpp b/Src/ROMLoad.cpp index aef12b9..def9104 100644 --- a/Src/ROMLoad.cpp +++ b/Src/ROMLoad.cpp @@ -138,21 +138,21 @@ static bool LoadROM(UINT8 *buf, unsigned bufSize, const struct ROMMap *Map, cons // Read the file into the buffer err = unzGetCurrentFileInfo(zf, &fileInfo, file, 2048, NULL, 0, NULL, 0); if (err != UNZ_OK) - return ErrorLog("Unable to extract a file name from %s.", zipFile); + return ErrorLog("Unable to extract a file name from '%s'.", zipFile); if (fileInfo.uncompressed_size != ROM->fileSize) - return ErrorLog("%s in %s is not the correct size (must be %d bytes).", file, zipFile, ROM->fileSize); + return ErrorLog("'%s' in '%s' is not the correct size (must be %d bytes).", file, zipFile, ROM->fileSize); err = unzOpenCurrentFile(zf); if (UNZ_OK != err) - return ErrorLog("Unable to read %s from %s.", file, zipFile); + return ErrorLog("Unable to read '%s' from '%s'.", file, zipFile); bytes = unzReadCurrentFile(zf, buf, bufSize); if (bytes != ROM->fileSize) { unzCloseCurrentFile(zf); - return ErrorLog("Unable to read %s from %s.", file, zipFile); + return ErrorLog("Unable to read '%s' from '%s'.", file, zipFile); } err = unzCloseCurrentFile(zf); if (UNZ_CRCERROR == err) - ErrorLog("CRC error reading %s from %s. File may be corrupt.", file, zipFile); + ErrorLog("CRC error reading '%s' from '%s'. File may be corrupt.", file, zipFile); // Byte swap if (ROM->byteSwap) @@ -219,7 +219,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st zf = unzOpen(zipFile); if (NULL == zf) { - ErrorLog("Unable to open %s.", zipFile); + ErrorLog("Could not open '%s'.", zipFile); return NULL; } @@ -227,7 +227,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st err = unzGoToFirstFile(zf); if (UNZ_OK != err) { - ErrorLog("Unable to read the contents of %s (code %X)", zipFile, err); + ErrorLog("Unable to read the contents of '%s' (code %X)", zipFile, err); return NULL; } for (; err != UNZ_END_OF_LIST_OF_FILE; err = unzGoToNextFile(zf)) @@ -256,7 +256,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st DebugLog("%s also contains: %s (%s)\n", zipFile, CurGame->id, CurGame->title); if (multipleGameError == false) // only warn about this once { - ErrorLog("Multiple games were found in %s; loading '%s'.", zipFile, Game->title); + ErrorLog("Multiple games were found in '%s'; loading '%s'.", zipFile, Game->title); multipleGameError = true; } } @@ -267,7 +267,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st err = unzGoToFirstFile(zf); if (UNZ_OK != err) { - ErrorLog("Unable to read the contents of %s (code %X)", zipFile, err); + ErrorLog("Unable to read the contents of '%s' (code %X)", zipFile, err); return NULL; } memset(romsFound, 0, sizeof(romsFound)); // here, romsFound[] indicates which ROMs were found in the ZIP file for the game @@ -295,7 +295,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st for (i = 0; i < numROMs; i++) { if ((0 == romsFound[i]) && !Game->ROM[i].optional) // if not found and also not optional - err |= (int) ErrorLog("%s (CRC=%08X) is missing from %s.", Game->ROM[i].fileName, Game->ROM[i].crc, zipFile); + err |= (int) ErrorLog("'%s' (CRC=%08X) is missing from '%s'.", Game->ROM[i].fileName, Game->ROM[i].crc, zipFile); } if (err != OKAY) { @@ -323,7 +323,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st err = unzGoToFirstFile(zf); if (UNZ_OK != err) { - ErrorLog("Unable to read the contents of %s (code %X).", zipFile, err); + ErrorLog("Unable to read the contents of '%s' (code %X).", zipFile, err); err = FAIL; goto Quit; } @@ -350,7 +350,7 @@ const struct GameInfo * LoadROMSetFromZIPFile(const struct ROMMap *Map, const st for (i = 0; i < numROMs; i++) { if (!(romsFound[i] || Game->ROM[i].optional)) // if ROM not found and also not optional - err = ErrorLog("Could not load %s (CRC=%08X) from %s.", Game->ROM[i].fileName, Game->ROM[i].crc, zipFile); + err = ErrorLog("Could not load '%s' (CRC=%08X) from '%s'.", Game->ROM[i].fileName, Game->ROM[i].crc, zipFile); } } else