From 306347d6c2bb751bcc768edb41da9231d3a350cf Mon Sep 17 00:00:00 2001 From: InvisibleUp Date: Mon, 25 May 2020 13:17:12 -0400 Subject: [PATCH] Fix CMake build for SONY.bin, Windows resource file --- CMakeLists.txt | 15 ++++++--------- cfg/CNFGGLOB.h | 2 +- src/PATCHES/ROMEMDEV.c | 2 +- src/PROGMAIN.c | 12 ++++++------ src/UI/CONTROLM.c | 4 ---- src/UI/WIN32/main.rc | 2 +- 6 files changed, 15 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c015eaa..269b481 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,18 +170,14 @@ add_library( src/UI/WIN32/OSGLUWIN.c src/UI/WIN32/SOUND.c src/UI/WIN32/TIMEDATE.c -# src/UI/WIN32/main.rc -# src/UI/WIN32/ICONAPPW.ico -# src/UI/WIN32/ICONDSKW.ico -# src/UI/WIN32/ICONROMW.ico + src/UI/WIN32/main.rc ) target_include_directories(ui_win32 PRIVATE cfg/ src/) target_include_directories(ui_win32 PRIVATE src/UI/ src/UI/WIN32/) +configure_file(src/UI/WIN32/ICONAPPW.ico ICONAPPW.ico COPYONLY) +configure_file(src/UI/WIN32/ICONDSKW.ico ICONDSKW.ico COPYONLY) +configure_file(src/UI/WIN32/ICONROMW.ico ICONROMW.ico COPYONLY) target_link_libraries(ui_win32 PUBLIC winmm ole32 uuid) -#set_source_files_properties(src/UI/WIN32/main.rc PROPERTIES LANGUAGE RC) -#set_source_files_properties(src/UI/WIN32/ICONAPPW.ico PROPERTIES EXTERNAL_OBJECT True) -#set_source_files_properties(src/UI/WIN32/ICONDSKW.ico PROPERTIES EXTERNAL_OBJECT True) -#set_source_files_properties(src/UI/WIN32/ICONROMW.ico PROPERTIES EXTERNAL_OBJECT True) #add_library( # ui_sdl2 OBJECT @@ -194,7 +190,7 @@ target_link_libraries(ui_win32 PUBLIC winmm ole32 uuid) ## Final compiled program definition add_executable( - microvmac + microvmac WIN32 src/PROGMAIN.c src/GLOBGLUE.c src/PATCHES/ROMEMDEV.c @@ -204,6 +200,7 @@ target_include_directories(microvmac PRIVATE cfg/ src/) set_target_properties(microvmac PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED True) #target_link_libraries(microvmac INTERFACE tgt_macplus) # temporary target_link_libraries(microvmac PRIVATE incbin ui_win32) +configure_file(src/PATCHES/SONY.bin SONY.bin COPYONLY) # temporary, because "INTERFACE" isn't working how I expect it to target_link_libraries( diff --git a/cfg/CNFGGLOB.h b/cfg/CNFGGLOB.h index 061a3ec..30565ce 100644 --- a/cfg/CNFGGLOB.h +++ b/cfg/CNFGGLOB.h @@ -10,7 +10,7 @@ #include -#define MayInline inline __attribute__((always_inline)) +#define MayInline inline #define SmallGlobals 0 #define cIncludeUnused 0 #define UnusedParam(p) (void) p diff --git a/src/PATCHES/ROMEMDEV.c b/src/PATCHES/ROMEMDEV.c index ab9f26d..ccfabe8 100644 --- a/src/PATCHES/ROMEMDEV.c +++ b/src/PATCHES/ROMEMDEV.c @@ -50,7 +50,7 @@ Replacement for .Sony driver 68k machine code, compiled from mydriver.a */ -INCBIN(SonyDriver, "src/PATCHES/SONY.bin"); +INCBIN(SonyDriver, "SONY.bin"); #endif #if UseSonyPatch diff --git a/src/PROGMAIN.c b/src/PROGMAIN.c index dc3f302..590fc44 100644 --- a/src/PROGMAIN.c +++ b/src/PROGMAIN.c @@ -216,7 +216,7 @@ const DevMethods_t DEVICES[] = { .timeend = NULL, }, // ADB - { + /*{ .init = NULL, .reset = NULL, .starttick = EmADB ? ADB_Update : NULL, @@ -224,7 +224,7 @@ const DevMethods_t DEVICES[] = { .subtick = NULL, .timebegin = NULL, .timeend = NULL, - }, + },*/ // LocalTalk /*{ .init = NULL, @@ -235,7 +235,7 @@ const DevMethods_t DEVICES[] = { .timeend = NULL, },*/ // Video card - { + /*{ .init = EmVidCard ? Vid_Init : NULL, .reset = NULL, .starttick = EmVidCard ? Vid_Update : NULL, @@ -243,7 +243,7 @@ const DevMethods_t DEVICES[] = { .subtick = NULL, .timebegin = NULL, .timeend = NULL, - }, + },*/ // ASC { .init = NULL, @@ -347,7 +347,7 @@ LOCALPROC SixtiethSecondNotify(void) Mouse_Update(); InterruptReset_Update(); if (EmClassicKbrd) { KeyBoard_Update(); } - if (EmADB) { ADB_Update(); } + //if (EmADB) { ADB_Update(); } Sixtieth_PulseNtfy(); /* Vertical Blanking Interrupt */ Sony_Update(); @@ -356,7 +356,7 @@ LOCALPROC SixtiethSecondNotify(void) LocalTalkTick(); #endif if (EmRTC) { RTC_Interrupt(); } - if (EmVidCard) { Vid_Update(); } + //if (EmVidCard) { Vid_Update(); } SubTickTaskStart(); } diff --git a/src/UI/CONTROLM.c b/src/UI/CONTROLM.c index b8c0024..fdaec13 100644 --- a/src/UI/CONTROLM.c +++ b/src/UI/CONTROLM.c @@ -490,10 +490,6 @@ LOCALPROC SetSpeedValue(uint8_t i) ControlMessage = kCntrlMsgNewSpeed; } -#if 1 -FORWARDPROC ToggleWantFullScreen(void); -#endif - #if IncludeHostTextClipExchange LOCALPROC HTCEexportSubstCStr(char *s) { diff --git a/src/UI/WIN32/main.rc b/src/UI/WIN32/main.rc index 40fe227..bf95788 100644 --- a/src/UI/WIN32/main.rc +++ b/src/UI/WIN32/main.rc @@ -1 +1 @@ -256 ICON DISCARDABLE "src/UI/WIN32/ICONAPPW.ico" +256 ICON DISCARDABLE "ICONAPPW.ico"