From f276bfec107b7224defa5243ac00130311ba7add Mon Sep 17 00:00:00 2001 From: Alexander Guryanov Date: Wed, 20 Dec 2023 16:42:48 +0300 Subject: [PATCH] Remove LONG DOUBLE support --- .gitignore | 9 ++++++++- CMakeLists.txt | 4 ++-- gulpfile.ts/cmake.ts | 2 +- native/dosbox-x | 2 +- native/jsdos/dosbox-x/jsdos-x-main.cpp | 16 +++++++++++----- native/jsdos/dosbox-x/jsdos-x-mixer.cpp | 11 ++++++++++- native/jsdos/jsdos-log.cpp | 1 + src/build.ts | 14 +++++++------- src/protocol/protocol.ts | 3 ++- targets/dosbox-x-asyncify.txt | 2 +- targets/dosbox-x-sdl2.cmake | 8 ++++++-- 11 files changed, 50 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index be2366f..4f36358 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,11 @@ src/dos/sokol/sokol dist bench -emscripten \ No newline at end of file +emscripten +*.o +CMakeFiles +cmake_install.cmake +CMakeCache* +.ninja* +build.ninja +dosbox-x-sdl2* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 792e6b2..58f214f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,8 @@ set(TARGETS_DIR "${CMAKE_CURRENT_LIST_DIR}/targets") # add_compile_options(-fno-exceptions) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w -Werror=return-type") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -Werror=return-type") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w -Werror=return-type -fsigned-char") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -Werror=return-type -fsigned-char") if ((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "")) message(STATUS "DEBUG BUILD") diff --git a/gulpfile.ts/cmake.ts b/gulpfile.ts/cmake.ts index 9d25741..6a9c855 100644 --- a/gulpfile.ts/cmake.ts +++ b/gulpfile.ts/cmake.ts @@ -22,7 +22,7 @@ export default async function make(listsPath: string, } async function makeBuild(...targets: string[]) { - await execute("ninja", "-j4", ...targets); + await execute("ninja", "-j16", ...targets); } async function emcmake(listsPath: string) { diff --git a/native/dosbox-x b/native/dosbox-x index 4362af1..1fb2551 160000 --- a/native/dosbox-x +++ b/native/dosbox-x @@ -1 +1 @@ -Subproject commit 4362af1aaa5903d88bc8f222de50de00b3dae5e0 +Subproject commit 1fb255179a354d0bada3ae89f40335de5732808a diff --git a/native/jsdos/dosbox-x/jsdos-x-main.cpp b/native/jsdos/dosbox-x/jsdos-x-main.cpp index 6e1f838..59ad268 100644 --- a/native/jsdos/dosbox-x/jsdos-x-main.cpp +++ b/native/jsdos/dosbox-x/jsdos-x-main.cpp @@ -191,7 +191,7 @@ typedef enum PROCESS_DPI_AWARENESS { } PROCESS_DPI_AWARENESS; #endif -#if C_EMSCRIPTEN +#if EMSCRIPTEN # include #endif @@ -3012,10 +3012,12 @@ void GFX_EndUpdate(const uint16_t *changedLines) { if (changedLines) { std::vector lines; - // TODO: @caiiiycuk menu? - lines.push_back(0); - lines.push_back(sdl.clip.y); - lines.push_back(0); + + if (sdl.clip.y > 0) { + lines.push_back(0); + lines.push_back(sdl.clip.y); + lines.push_back(0); + } Bitu y = 0, index = 0; while (y < sdl.draw.height) { @@ -9804,3 +9806,7 @@ int server_run() { jsdos::destroyAsyncify(); return code; } + +void server_mouse_sync(uint64_t syncMs) { + // not supported +} \ No newline at end of file diff --git a/native/jsdos/dosbox-x/jsdos-x-mixer.cpp b/native/jsdos/dosbox-x/jsdos-x-mixer.cpp index 1840061..87b4276 100644 --- a/native/jsdos/dosbox-x/jsdos-x-mixer.cpp +++ b/native/jsdos/dosbox-x/jsdos-x-mixer.cpp @@ -48,6 +48,15 @@ constexpr int PUSH_SIZE = 512; float blockBuffer[BLOCK_SIZE]; static void MIXER_CallBack(float *stream, int len); +bool muted = false; +void server_mute() { + muted = true; +} + +void server_unmute() { + muted = false; +} + static INLINE int16_t MIXER_CLIP(Bits SAMP) { if (SAMP < MAX_AUDIO) { if (SAMP > MIN_AUDIO) @@ -876,7 +885,7 @@ static void MIXER_Mix(void) { samplesCount = BLOCK_SIZE; } MIXER_CallBack(blockBuffer, samplesCount); - if (!mixer.mute) { + if (!mixer.mute && !muted) { client_sound_push(blockBuffer, samplesCount); } pushedAt = now; diff --git a/native/jsdos/jsdos-log.cpp b/native/jsdos/jsdos-log.cpp index 3bccb12..4c36c9e 100644 --- a/native/jsdos/jsdos-log.cpp +++ b/native/jsdos/jsdos-log.cpp @@ -40,6 +40,7 @@ void Logger::operator()(char const* format, ...) { #endif static char buf[1024]; + buf[1023] = 0; va_list msg; va_start(msg, format); diff --git a/src/build.ts b/src/build.ts index 8e439ce..05614dd 100644 --- a/src/build.ts +++ b/src/build.ts @@ -5,26 +5,26 @@ // gulpfile.ts/wasm.ts --> generateBuildInfo export const Build = { - version: "0.80.20 (8e0d4ea40b30b7a6059a80f062f80b7c)", - buildSeed: 1701004064067, + version: "0.80.20 (bd241dfce32911cec7d1f8ddc6ad72cf)", + buildSeed: 1702843822000, "wdosbox-x.wasm": { - "size": 6498396, + "size": 6415326, "gzSize": 0 }, "wdosbox-x.js": { - "size": 251980, + "size": 251608, "gzSize": 0 }, "wdosbox.wasm": { - "size": 1465293, + "size": 1455163, "gzSize": 0 }, "wdosbox.js": { - "size": 128379, + "size": 127892, "gzSize": 0 }, "wlibzip.wasm": { - "size": 111427, + "size": 108831, "gzSize": 0 }, "wlibzip.js": { diff --git a/src/protocol/protocol.ts b/src/protocol/protocol.ts index 3317301..8affec4 100644 --- a/src/protocol/protocol.ts +++ b/src/protocol/protocol.ts @@ -220,6 +220,7 @@ export class CommandInterfaceOverTransportLayer implements CommandInterface { }) .catch((e) => { this.onErr("panic", "Can't send bundles to backend: " + e.message); + console.error(e); }) .finally(() => { delete this.init; @@ -359,7 +360,7 @@ export class CommandInterfaceOverTransportLayer implements CommandInterface { private onFrameLines(lines: FrameLine[], rgbaPtr: number) { for (const line of (lines as FrameLine[])) { - (this.rgb as Uint8Array).set(line.heapu8, line.start * this.frameWidth * 3); + this.rgb!.set(line.heapu8, line.start * this.frameWidth * 3); } this.eventsImpl.fireFrame(this.rgb, this.rgba); diff --git a/targets/dosbox-x-asyncify.txt b/targets/dosbox-x-asyncify.txt index 60a5a99..3d0eaa9 100644 --- a/targets/dosbox-x-asyncify.txt +++ b/targets/dosbox-x-asyncify.txt @@ -1 +1 @@ -["BIOS::cb_bios_boot__func","BIOS::cb_bios_post__func","BIOS::cb_bios_startup_screen__func","BIOS_Int10RightJustifiedPrint","BOOT::Run","BOOT::printError","CALLBACK_Idle","CALLBACK_RunRealFar","CALLBACK_RunRealInt","CHOICE::Run","CPU_ForceV86FakeIO_In","CPU_ForceV86FakeIO_Out","ConnectToServer","DOSBOX_RunMachine","DOS_21Handler","DOS_CheckExtDevice","DOS_CloseFile","DOS_CreateFile","DOS_Device::GetInformation","DOS_Device::Read","DOS_Device::Write","DOS_FindDevice","DOS_FlushSTDIN","DOS_GetSTDINStatus","DOS_MakeDir","DOS_OpenFile","DOS_ReadFile","DOS_Shell::BuildCompletions","DOS_Shell::CMD_CHDIR","DOS_Shell::CMD_CLS","DOS_Shell::CMD_COPY","DOS_Shell::CMD_DELETE","DOS_Shell::CMD_DIR","DOS_Shell::CMD_ECHO","DOS_Shell::CMD_PAUSE","DOS_Shell::CMD_TYPE","DOS_Shell::CMD_VOL","DOS_Shell::DoCommand","DOS_Shell::Execute","DOS_Shell::ParseLine","DOS_Shell::Prepare","DOS_Shell::Run","DOS_Shell::ShowPrompt","DOS_Shell::execute_shell_cmd","DOS_WriteFile","EGA16_FillRow","ExceptionPageHandler::Exception","ExceptionPageHandler::writeb","ExceptionPageHandler::writed","ExceptionPageHandler::writew","FinishSetMode","IDE_DelayedCommand","IDE_SelfIO_In","IDE_SelfIO_Out","IMGMAKE::Run","IMGMAKE::printHelp","IMGMOUNT::DetectGeometry","IMGMOUNT::MountFat","IMGMOUNT::MountImageNone","IMGMOUNT::Run","INT10_Handler","INT10_LoadFont","INT10_PutPixel","INT10_ReloadFont","INT10_ScrollWindow","INT10_SetActivePage","INT10_SetCursorPos","INT10_SetCursorShape","INT10_SetSingleDACRegister","INT10_SetVideoMode","INT10_TeletypeOutput","INT10_TeletypeOutputAttr","INT10_ToggleBlinkingBit","INT10_WriteChar","INT13_DiskHandler","INT15_Handler","INT8_Handler","IO_ReadB","IO_WriteB","IPXNET::Run","MEM_BlockCopy","MOUNT::Run","NewInitPageHandler::InitPage","NewInitPageHandler::readb","NewInitPageHandler::writeb","NewInitPageHandler::writew","Normal_Loop","PAGING_NewPageFault","PROGRAMS_Handler","Program::WriteOut","Program::WriteOut_NoParsing","SDLNet_TCP_Send","SHELL_Init","SHELL_Run","VGA_ROM_BIOS_ENTRY_callback_func","WriteChar","asyncify_sleep","backone","byn$mgfn-shared$IO_ReadB","byn$mgfn-shared$IO_WriteB","device_CON::AdjustCursorPosition","device_CON::GetInformation","device_CON::Output","device_CON::Read","device_CON::Real_INT10_SetCursorPos","device_CON::Real_INT10_TeletypeOutput","device_CON::Real_INT10_TeletypeOutputAttr","device_CON::Write","fatDrive::FileCreate","fatDrive::MakeDir","fatFile::Close","fatFile::Flush","fatFromDOSDrive::GetUnmodifiedSector","fatFromDOSDrive::ReadSector","imageDisk::Read_AbsoluteSector","imageDisk::Read_Sector","imageDisk::Write_Sector","initcodepagefont","jsdos::SockDrive::Read_AbsoluteSector","jsdos::SockDrive::create","jsdos_main","localFile::Close","localFile::Flush","localFile::Read","localFile::UpdateLocalDateTime","mem_memcpy","mem_readb","mem_writeb","mem_writed","mem_writew","outc","runRuntime","server_network_connect","server_run","showWelcome","time_t_to_DOS_DateTime","BIOS::cb_bios_boot__func(*)*","BIOS::cb_bios_post__func(*)*","BIOS::cb_bios_startup_screen__func(*)*","BIOS_Int10RightJustifiedPrint(*)*","BOOT::Run(*)*","BOOT::printError(*)*","CALLBACK_Idle(*)*","CALLBACK_RunRealFar(*)*","CALLBACK_RunRealInt(*)*","CHOICE::Run(*)*","CPU_ForceV86FakeIO_In(*)*","CPU_ForceV86FakeIO_Out(*)*","ConnectToServer(*)*","DOSBOX_RunMachine(*)*","DOS_21Handler(*)*","DOS_CheckExtDevice(*)*","DOS_CloseFile(*)*","DOS_CreateFile(*)*","DOS_Device::GetInformation(*)*","DOS_Device::Read(*)*","DOS_Device::Write(*)*","DOS_FindDevice(*)*","DOS_FlushSTDIN(*)*","DOS_GetSTDINStatus(*)*","DOS_MakeDir(*)*","DOS_OpenFile(*)*","DOS_ReadFile(*)*","DOS_Shell::BuildCompletions(*)*","DOS_Shell::CMD_CHDIR(*)*","DOS_Shell::CMD_CLS(*)*","DOS_Shell::CMD_COPY(*)*","DOS_Shell::CMD_DELETE(*)*","DOS_Shell::CMD_DIR(*)*","DOS_Shell::CMD_ECHO(*)*","DOS_Shell::CMD_PAUSE(*)*","DOS_Shell::CMD_TYPE(*)*","DOS_Shell::CMD_VOL(*)*","DOS_Shell::DoCommand(*)*","DOS_Shell::Execute(*)*","DOS_Shell::ParseLine(*)*","DOS_Shell::Prepare(*)*","DOS_Shell::Run(*)*","DOS_Shell::ShowPrompt(*)*","DOS_Shell::execute_shell_cmd(*)*","DOS_WriteFile(*)*","EGA16_FillRow(*)*","ExceptionPageHandler::Exception(*)*","ExceptionPageHandler::writeb(*)*","ExceptionPageHandler::writed(*)*","ExceptionPageHandler::writew(*)*","FinishSetMode(*)*","IDE_DelayedCommand(*)*","IDE_SelfIO_In(*)*","IDE_SelfIO_Out(*)*","IMGMAKE::Run(*)*","IMGMAKE::printHelp(*)*","IMGMOUNT::DetectGeometry(*)*","IMGMOUNT::MountFat(*)*","IMGMOUNT::MountImageNone(*)*","IMGMOUNT::Run(*)*","INT10_Handler(*)*","INT10_LoadFont(*)*","INT10_PutPixel(*)*","INT10_ReloadFont(*)*","INT10_ScrollWindow(*)*","INT10_SetActivePage(*)*","INT10_SetCursorPos(*)*","INT10_SetCursorShape(*)*","INT10_SetSingleDACRegister(*)*","INT10_SetVideoMode(*)*","INT10_TeletypeOutput(*)*","INT10_TeletypeOutputAttr(*)*","INT10_ToggleBlinkingBit(*)*","INT10_WriteChar(*)*","INT13_DiskHandler(*)*","INT15_Handler(*)*","INT8_Handler(*)*","IO_ReadB(*)*","IO_WriteB(*)*","IPXNET::Run(*)*","MEM_BlockCopy(*)*","MOUNT::Run(*)*","NewInitPageHandler::InitPage(*)*","NewInitPageHandler::readb(*)*","NewInitPageHandler::writeb(*)*","NewInitPageHandler::writew(*)*","Normal_Loop(*)*","PAGING_NewPageFault(*)*","PROGRAMS_Handler(*)*","Program::WriteOut(*)*","Program::WriteOut_NoParsing(*)*","SDLNet_TCP_Send(*)*","SHELL_Init(*)*","SHELL_Run(*)*","VGA_ROM_BIOS_ENTRY_callback_func(*)*","WriteChar(*)*","asyncify_sleep(*)*","backone(*)*","byn$mgfn-shared$IO_ReadB(*)*","byn$mgfn-shared$IO_WriteB(*)*","device_CON::AdjustCursorPosition(*)*","device_CON::GetInformation(*)*","device_CON::Output(*)*","device_CON::Read(*)*","device_CON::Real_INT10_SetCursorPos(*)*","device_CON::Real_INT10_TeletypeOutput(*)*","device_CON::Real_INT10_TeletypeOutputAttr(*)*","device_CON::Write(*)*","fatDrive::FileCreate(*)*","fatDrive::MakeDir(*)*","fatFile::Close(*)*","fatFile::Flush(*)*","fatFromDOSDrive::GetUnmodifiedSector(*)*","fatFromDOSDrive::ReadSector(*)*","imageDisk::Read_AbsoluteSector(*)*","imageDisk::Read_Sector(*)*","imageDisk::Write_Sector(*)*","initcodepagefont(*)*","jsdos::SockDrive::Read_AbsoluteSector(*)*","jsdos::SockDrive::create(*)*","jsdos_main(*)*","localFile::Close(*)*","localFile::Flush(*)*","localFile::Read(*)*","localFile::UpdateLocalDateTime(*)*","mem_memcpy(*)*","mem_readb(*)*","mem_writeb(*)*","mem_writed(*)*","mem_writew(*)*","outc(*)*","runRuntime(*)*","server_network_connect(*)*","server_run(*)*","showWelcome(*)*","time_t_to_DOS_DateTime(*)*"] \ No newline at end of file +["BIOS::cb_bios_boot__func","BIOS::cb_bios_post__func","BIOS::cb_bios_startup_screen__func","BIOS_Int10RightJustifiedPrint","BOOT::Run","BOOT::printError","CALLBACK_Idle","CALLBACK_RunRealFar","CALLBACK_RunRealInt","CHOICE::Run","CPU_ForceV86FakeIO_In","CPU_ForceV86FakeIO_Out","ConnectToServer","DOSBOX_RunMachine","DOS_21Handler","DOS_CheckExtDevice","DOS_CloseFile","DOS_CreateFile","DOS_Device::GetInformation","DOS_Device::Read","DOS_Device::Write","DOS_FindDevice","DOS_FlushSTDIN","DOS_GetSTDINStatus","DOS_IOCTL","DOS_MakeDir","DOS_OpenFile","DOS_ReadFile","DOS_Shell::BuildCompletions","DOS_Shell::CMD_CHDIR","DOS_Shell::CMD_CLS","DOS_Shell::CMD_COPY","DOS_Shell::CMD_DELETE","DOS_Shell::CMD_DIR","DOS_Shell::CMD_ECHO","DOS_Shell::CMD_PAUSE","DOS_Shell::CMD_TYPE","DOS_Shell::CMD_VOL","DOS_Shell::DoCommand","DOS_Shell::Execute","DOS_Shell::InputCommand","DOS_Shell::ParseLine","DOS_Shell::Prepare","DOS_Shell::Run","DOS_Shell::ShowPrompt","DOS_Shell::execute_shell_cmd","DOS_WriteFile","EGA16_FillRow","ExceptionPageHandler::Exception","ExceptionPageHandler::writeb","ExceptionPageHandler::writed","ExceptionPageHandler::writew","FinishSetMode","IDE_DelayedCommand","IDE_EmuINT13DiskReadByBIOS","IDE_SelfIO_In","IDE_SelfIO_Out","IMGMAKE::Run","IMGMAKE::printHelp","IMGMOUNT::DetectGeometry","IMGMOUNT::MountFat","IMGMOUNT::MountImageNone","IMGMOUNT::Run","INT10_Handler","INT10_LoadFont","INT10_PutPixel","INT10_ReloadFont","INT10_ScrollWindow","INT10_SetActivePage","INT10_SetCursorPos","INT10_SetCursorShape","INT10_SetSingleDACRegister","INT10_SetVideoMode","INT10_TeletypeOutput","INT10_TeletypeOutputAttr","INT10_ToggleBlinkingBit","INT10_WriteChar","INT13_DiskHandler","INT15_Handler","INT8_Handler","IO_ReadB","IO_WriteB","IPXNET::Run","MEM_BlockCopy","MOUNT::Run","NewInitPageHandler::InitPage","NewInitPageHandler::readb","NewInitPageHandler::writeb","NewInitPageHandler::writew","Normal_Loop","PAGING_NewPageFault","PROGRAMS_Handler","Program::WriteOut","Program::WriteOut_NoParsing","SDLNet_TCP_Send","SHELL_Init","SHELL_Run","VGA_ROM_BIOS_ENTRY_callback_func","VM_Boot_DOSBox_Kernel","WriteChar","asyncify_sleep","backone","byn$mgfn-shared$IO_ReadB","byn$mgfn-shared$IO_WriteB","device_CON::AdjustCursorPosition","device_CON::GetInformation","device_CON::Output","device_CON::Read","device_CON::Real_INT10_SetCursorPos","device_CON::Real_INT10_TeletypeOutput","device_CON::Real_INT10_TeletypeOutputAttr","device_CON::Write","fatDrive::FileCreate","fatDrive::MakeDir","fatFile::Close","fatFile::Flush","fatFromDOSDrive::GetUnmodifiedSector","fatFromDOSDrive::ReadSector","imageDisk::Read_AbsoluteSector","imageDisk::Read_Sector","imageDisk::Write_Sector","increaseticks","initcodepagefont","jsdos::SockDrive::Read_AbsoluteSector","jsdos::SockDrive::create","jsdos_main","localFile::Close","localFile::Flush","localFile::Read","localFile::UpdateLocalDateTime","mem_memcpy","mem_readb","mem_writeb","mem_writed","mem_writew","outc","runRuntime","server_network_connect","server_run","showWelcome","time_t_to_DOS_DateTime","BIOS::cb_bios_boot__func(*)*","BIOS::cb_bios_post__func(*)*","BIOS::cb_bios_startup_screen__func(*)*","BIOS_Int10RightJustifiedPrint(*)*","BOOT::Run(*)*","BOOT::printError(*)*","CALLBACK_Idle(*)*","CALLBACK_RunRealFar(*)*","CALLBACK_RunRealInt(*)*","CHOICE::Run(*)*","CPU_ForceV86FakeIO_In(*)*","CPU_ForceV86FakeIO_Out(*)*","ConnectToServer(*)*","DOSBOX_RunMachine(*)*","DOS_21Handler(*)*","DOS_CheckExtDevice(*)*","DOS_CloseFile(*)*","DOS_CreateFile(*)*","DOS_Device::GetInformation(*)*","DOS_Device::Read(*)*","DOS_Device::Write(*)*","DOS_FindDevice(*)*","DOS_FlushSTDIN(*)*","DOS_GetSTDINStatus(*)*","DOS_IOCTL(*)*","DOS_MakeDir(*)*","DOS_OpenFile(*)*","DOS_ReadFile(*)*","DOS_Shell::BuildCompletions(*)*","DOS_Shell::CMD_CHDIR(*)*","DOS_Shell::CMD_CLS(*)*","DOS_Shell::CMD_COPY(*)*","DOS_Shell::CMD_DELETE(*)*","DOS_Shell::CMD_DIR(*)*","DOS_Shell::CMD_ECHO(*)*","DOS_Shell::CMD_PAUSE(*)*","DOS_Shell::CMD_TYPE(*)*","DOS_Shell::CMD_VOL(*)*","DOS_Shell::DoCommand(*)*","DOS_Shell::Execute(*)*","DOS_Shell::InputCommand(*)*","DOS_Shell::ParseLine(*)*","DOS_Shell::Prepare(*)*","DOS_Shell::Run(*)*","DOS_Shell::ShowPrompt(*)*","DOS_Shell::execute_shell_cmd(*)*","DOS_WriteFile(*)*","EGA16_FillRow(*)*","ExceptionPageHandler::Exception(*)*","ExceptionPageHandler::writeb(*)*","ExceptionPageHandler::writed(*)*","ExceptionPageHandler::writew(*)*","FinishSetMode(*)*","IDE_DelayedCommand(*)*","IDE_EmuINT13DiskReadByBIOS(*)*","IDE_SelfIO_In(*)*","IDE_SelfIO_Out(*)*","IMGMAKE::Run(*)*","IMGMAKE::printHelp(*)*","IMGMOUNT::DetectGeometry(*)*","IMGMOUNT::MountFat(*)*","IMGMOUNT::MountImageNone(*)*","IMGMOUNT::Run(*)*","INT10_Handler(*)*","INT10_LoadFont(*)*","INT10_PutPixel(*)*","INT10_ReloadFont(*)*","INT10_ScrollWindow(*)*","INT10_SetActivePage(*)*","INT10_SetCursorPos(*)*","INT10_SetCursorShape(*)*","INT10_SetSingleDACRegister(*)*","INT10_SetVideoMode(*)*","INT10_TeletypeOutput(*)*","INT10_TeletypeOutputAttr(*)*","INT10_ToggleBlinkingBit(*)*","INT10_WriteChar(*)*","INT13_DiskHandler(*)*","INT15_Handler(*)*","INT8_Handler(*)*","IO_ReadB(*)*","IO_WriteB(*)*","IPXNET::Run(*)*","MEM_BlockCopy(*)*","MOUNT::Run(*)*","NewInitPageHandler::InitPage(*)*","NewInitPageHandler::readb(*)*","NewInitPageHandler::writeb(*)*","NewInitPageHandler::writew(*)*","Normal_Loop(*)*","PAGING_NewPageFault(*)*","PROGRAMS_Handler(*)*","Program::WriteOut(*)*","Program::WriteOut_NoParsing(*)*","SDLNet_TCP_Send(*)*","SHELL_Init(*)*","SHELL_Run(*)*","VGA_ROM_BIOS_ENTRY_callback_func(*)*","VM_Boot_DOSBox_Kernel(*)*","WriteChar(*)*","asyncify_sleep(*)*","backone(*)*","byn$mgfn-shared$IO_ReadB(*)*","byn$mgfn-shared$IO_WriteB(*)*","device_CON::AdjustCursorPosition(*)*","device_CON::GetInformation(*)*","device_CON::Output(*)*","device_CON::Read(*)*","device_CON::Real_INT10_SetCursorPos(*)*","device_CON::Real_INT10_TeletypeOutput(*)*","device_CON::Real_INT10_TeletypeOutputAttr(*)*","device_CON::Write(*)*","fatDrive::FileCreate(*)*","fatDrive::MakeDir(*)*","fatFile::Close(*)*","fatFile::Flush(*)*","fatFromDOSDrive::GetUnmodifiedSector(*)*","fatFromDOSDrive::ReadSector(*)*","imageDisk::Read_AbsoluteSector(*)*","imageDisk::Read_Sector(*)*","imageDisk::Write_Sector(*)*","increaseticks(*)*","initcodepagefont(*)*","jsdos::SockDrive::Read_AbsoluteSector(*)*","jsdos::SockDrive::create(*)*","jsdos_main(*)*","localFile::Close(*)*","localFile::Flush(*)*","localFile::Read(*)*","localFile::UpdateLocalDateTime(*)*","mem_memcpy(*)*","mem_readb(*)*","mem_writeb(*)*","mem_writed(*)*","mem_writew(*)*","outc(*)*","runRuntime(*)*","server_network_connect(*)*","server_run(*)*","showWelcome(*)*","time_t_to_DOS_DateTime(*)*"] \ No newline at end of file diff --git a/targets/dosbox-x-sdl2.cmake b/targets/dosbox-x-sdl2.cmake index f41e5a7..d03cbd8 100644 --- a/targets/dosbox-x-sdl2.cmake +++ b/targets/dosbox-x-sdl2.cmake @@ -9,6 +9,7 @@ set(DEFINITIONS_CORE_X # missed in libserial.cpp -DCBAUD=0 -DCMSPAR=0 + -DC_EMSCRIPTEN ) if (${EMSCRIPTEN}) @@ -686,7 +687,8 @@ target_link_libraries(dosbox-x-sdl2 libdosbox-x-sdl2) set_property(TARGET dosbox-x-sdl2 PROPERTY CXX_STANDARD 11) if (${EMSCRIPTEN}) - target_compile_options(libdosbox-x-jsdos PUBLIC -fwasm-exceptions) + target_compile_options(libdosbox-x-sdl2 PUBLIC -fwasm-exceptions) + target_include_directories(libdosbox-x-sdl2 PUBLIC "${NATIVE_DIR}/sdl2net") set_target_properties(dosbox-x-sdl2 PROPERTIES SUFFIX .html) target_link_options(dosbox-x-sdl2 PUBLIC ${EM_LINK_OPTIONS} @@ -696,8 +698,10 @@ if (${EMSCRIPTEN}) "-sINVOKE_RUN=1" "--profiling-funcs" "-sASYNCIFY=1" + "-sASYNCIFY_IMPORTS=['syncSleep']" ) + target_compile_options(libdosbox-x-jsdos PUBLIC -fwasm-exceptions) add_executable(wdosbox-x "${SRC_DIR}/dos/dosbox/cpp/worker-protocol.cpp") set_target_properties(wdosbox-x PROPERTIES SUFFIX .js) target_link_libraries(wdosbox-x libdosbox-x-jsdos libzip) @@ -714,7 +718,7 @@ if (${EMSCRIPTEN}) "-sASYNCIFY_IMPORTS=['syncSleep']" "-sASYNCIFY_WHITELIST=@${TARGETS_DIR}/dosbox-x-asyncify.txt" "-sEXPORT_NAME='WDOSBOXX'" - "-sERROR_ON_UNDEFINED_SYMBOLS=0") + "-sERROR_ON_UNDEFINED_SYMBOLS=1") elseif (APPLE) target_link_libraries(dosbox-x-sdl2 ${SDL2_LIBRARIES}