diff --git a/platforms/linux/aarch64/external.sh b/platforms/linux/aarch64/external.sh index 98bf3d8..e9ef5bc 100755 --- a/platforms/linux/aarch64/external.sh +++ b/platforms/linux/aarch64/external.sh @@ -6,7 +6,7 @@ LIBCARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251 LIBOPENAL_SHA=d3875f333fb6abe2f39d82caca329414871ae53b LIBPINMAME_SHA=master LIBPPUC_SHA=main -LIBDMDUTIL_SHA=master +LIBDMDUTIL_SHA=3af59032f9fcc0f2ea9462c6d55416cf99ad869e echo "Building libraries..." echo " LIBCARGS_SHA: ${LIBCARGS_SHA}" @@ -24,7 +24,7 @@ cd external # libdmdutil # -curl -sL https://github.com/vpinball/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip +curl -sL https://github.com/ppuc/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip unzip libdmdutil.zip cd libdmdutil-${LIBDMDUTIL_SHA} cp -r include/DMDUtil ../../third-party/include/ diff --git a/platforms/linux/x64/build.sh b/platforms/linux/x64/build.sh index 74f032d..0983d61 100755 --- a/platforms/linux/x64/build.sh +++ b/platforms/linux/x64/build.sh @@ -4,7 +4,7 @@ set -e ./platforms/linux/x64/external.sh -cmake -DPLATFORM=linux -DARCH=x64 -DCMAKE_BUILD_TYPE=Release -B build +cmake -DPLATFORM=linux -DARCH=x64 -DCMAKE_BUILD_TYPE=Debug -B build cmake --build build rm -rf ppuc diff --git a/platforms/linux/x64/external.sh b/platforms/linux/x64/external.sh index c9e8743..7213244 100755 --- a/platforms/linux/x64/external.sh +++ b/platforms/linux/x64/external.sh @@ -6,7 +6,7 @@ LIBCARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251 LIBOPENAL_SHA=d3875f333fb6abe2f39d82caca329414871ae53b LIBPINMAME_SHA=master LIBPPUC_SHA=main -LIBDMDUTIL_SHA=master +LIBDMDUTIL_SHA=3af59032f9fcc0f2ea9462c6d55416cf99ad869e echo "Building libraries..." echo " LIBCARGS_SHA: ${LIBCARGS_SHA}" @@ -24,7 +24,7 @@ cd external # libdmdutil # -curl -sL https://github.com/vpinball/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip +curl -sL https://github.com/ppuc/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip unzip libdmdutil.zip cd libdmdutil-${LIBDMDUTIL_SHA} cp -r include/DMDUtil ../../third-party/include/ diff --git a/platforms/macos/arm64/external.sh b/platforms/macos/arm64/external.sh index 381eb9c..41ed6bc 100755 --- a/platforms/macos/arm64/external.sh +++ b/platforms/macos/arm64/external.sh @@ -6,7 +6,7 @@ LIBCARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251 LIBOPENAL_SHA=d3875f333fb6abe2f39d82caca329414871ae53b LIBPINMAME_SHA=master LIBPPUC_SHA=main -LIBDMDUTIL_SHA=master +LIBDMDUTIL_SHA=3af59032f9fcc0f2ea9462c6d55416cf99ad869e echo "Building libraries..." echo " LIBCARGS_SHA: ${LIBCARGS_SHA}" @@ -24,7 +24,7 @@ cd external # libdmdutil # -curl -sL https://github.com/vpinball/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip +curl -sL https://github.com/ppuc/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip unzip libdmdutil.zip cd libdmdutil-${LIBDMDUTIL_SHA} cp -r include/DMDUtil ../../third-party/include/ diff --git a/platforms/macos/x64/external.sh b/platforms/macos/x64/external.sh index 270bb50..2db3418 100755 --- a/platforms/macos/x64/external.sh +++ b/platforms/macos/x64/external.sh @@ -6,7 +6,7 @@ LIBCARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251 LIBOPENAL_SHA=d3875f333fb6abe2f39d82caca329414871ae53b LIBPINMAME_SHA=master LIBPPUC_SHA=main -LIBDMDUTIL_SHA=master +LIBDMDUTIL_SHA=3af59032f9fcc0f2ea9462c6d55416cf99ad869e echo "Building libraries..." echo " LIBCARGS_SHA: ${LIBCARGS_SHA}" @@ -24,7 +24,7 @@ cd external # libdmdutil # -curl -sL https://github.com/vpinball/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip +curl -sL https://github.com/ppuc/libdmdutil/archive/${LIBDMDUTIL_SHA}.zip -o libdmdutil.zip unzip libdmdutil.zip cd libdmdutil-${LIBDMDUTIL_SHA} cp -r include/DMDUtil ../../third-party/include/ diff --git a/src/ppuc.cpp b/src/ppuc.cpp index ff58be0..20a0340 100644 --- a/src/ppuc.cpp +++ b/src/ppuc.cpp @@ -426,26 +426,6 @@ int main(int argc, char* argv[]) { // So it is important to start that search before the RS485 BUS gets // initialized. DMDUtil::Config* dmdConfig = DMDUtil::Config::GetInstance(); - pDmd = new DMDUtil::DMD(); - if (opt_debug) { - printf("Finding displays...\n"); - dmdConfig->SetZeDMDDebug(opt_debug); - } - pDmd->FindDisplays(); - if (opt_console_display) { - pDmd->CreateConsoleDMD(!opt_debug); - } - if (opt_dump) { - pDmd->DumpDMDTxt(); - } - - while (DMDUtil::DMD::IsFinding()) - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - - if (!opt_no_serial && !ppuc->Connect()) { - printf("Unable to open serial communication to PPUC boards.\n"); - return 1; - } PinmameConfig config = { PINMAME_AUDIO_FORMAT_INT16, @@ -476,10 +456,9 @@ int main(int argc, char* argv[]) { if (opt_serum) { char altcolorPath[PINMAME_MAX_PATH + 10]; #if defined(_WIN32) || defined(_WIN64) - snprintf(altcolorPath, PINMAME_MAX_PATH + 9, "%s\\altcolor", - config.vpmPath); + snprintf(altcolorPath, PINMAME_MAX_PATH + 8, "%saltcolor", config.vpmPath); #else - snprintf(altcolorPath, PINMAME_MAX_PATH + 9, "%s/altcolor", config.vpmPath); + snprintf(altcolorPath, PINMAME_MAX_PATH + 8, "%saltcolor", config.vpmPath); #endif dmdConfig->SetAltColorPath(altcolorPath); @@ -497,6 +476,31 @@ int main(int argc, char* argv[]) { ssf >> serum_skip_frames; dmdConfig->SetMaximumUnknownFramesToSkip(serum_skip_frames); } + } else { + dmdConfig->SetAltColor(false); + } + + if (opt_debug) { + printf("Finding displays...\n"); + dmdConfig->SetZeDMDDebug(opt_debug); + } + + pDmd = new DMDUtil::DMD(); + pDmd->SetRomName(opt_rom); + pDmd->FindDisplays(); + if (opt_console_display) { + pDmd->CreateConsoleDMD(!opt_debug); + } + if (opt_dump) { + pDmd->DumpDMDTxt(); + } + + while (pDmd->IsFinding()) + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + + if (!opt_no_serial && !ppuc->Connect()) { + printf("Unable to open serial communication to PPUC boards.\n"); + return 1; } // Initialize the sound device