diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7000a07..fbbb71c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,7 +46,7 @@ fips_end_app() target_compile_definitions(v6502r PRIVATE CHIP_6502) target_include_directories(v6502r PRIVATE m6502) if (FIPS_EMSCRIPTEN) - target_link_options(v6502r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/m6502/shell.html -sLEGACY_RUNTIME=1) + target_link_options(v6502r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/m6502/shell.html) endif() fips_begin_app(vz80r windowed) @@ -59,7 +59,7 @@ fips_end_app() target_compile_definitions(vz80r PRIVATE CHIP_Z80) target_include_directories(vz80r PRIVATE z80) if (FIPS_EMSCRIPTEN) - target_link_options(vz80r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/z80/shell.html -sLEGACY_RUNTIME=1) + target_link_options(vz80r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/z80/shell.html) endif() fips_begin_app(v2a03r windowed) @@ -72,5 +72,5 @@ fips_end_app() target_compile_definitions(v2a03r PRIVATE CHIP_2A03) target_include_directories(v2a03r PRIVATE 2a03) if (FIPS_EMSCRIPTEN) - target_link_options(v2a03r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/2a03/shell.html -sLEGACY_RUNTIME=1) + target_link_options(v2a03r PUBLIC --shell-file ${CMAKE_SOURCE_DIR}/src/2a03/shell.html) endif() diff --git a/src/util.c b/src/util.c index ca598c1..6b86004 100644 --- a/src/util.c +++ b/src/util.c @@ -12,6 +12,8 @@ static struct { } util; #if defined(__EMSCRIPTEN__) +EM_JS_DEPS(v6502r, "$ccall"); + EM_JS(void, emsc_js_init, (void), { Module['emsc_js_onload'] = emsc_js_onload; });