diff --git a/.idea/artifacts/TerranBASIC.xml b/.idea/artifacts/TerranBASIC.xml index 6b36520..986dfb6 100644 --- a/.idea/artifacts/TerranBASIC.xml +++ b/.idea/artifacts/TerranBASIC.xml @@ -21,36 +21,54 @@ - - - - - - + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + + + + + + + + + + + @@ -62,15 +80,15 @@ - - + + - - + + diff --git a/.idea/misc.xml b/.idea/misc.xml index 4c38193..6f29fee 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..6825116 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,7 @@ + + \ No newline at end of file diff --git a/assets/disk0/AUTOEXEC.BAT b/assets/disk0/AUTOEXEC.BAT index 8c1175f..7ba415e 100644 --- a/assets/disk0/AUTOEXEC.BAT +++ b/assets/disk0/AUTOEXEC.BAT @@ -5,5 +5,6 @@ set PATH=\tvdos\installer;\tvdos\tuidev;$PATH set KEYBOARD=us_colemak rem this line specifies which shell to be presented after the boot precess: +tvdos/i18n/korean zfm command -fancy diff --git a/assets/disk0/tvdos/bin/command.js b/assets/disk0/tvdos/bin/command.js index 26c7aaf..c5c7e59 100644 --- a/assets/disk0/tvdos/bin/command.js +++ b/assets/disk0/tvdos/bin/command.js @@ -35,7 +35,7 @@ function print_prompt_text() { print(" "+CURRENT_DRIVE+":") con.color_pair(161,253) con.addch(16);con.curs_right() - con.color_pair(0,253) + con.color_pair(240,253) print(" \\"+shell_pwd.join("\\").substring(1)+" ") if (errorlevel != 0 && errorlevel != "undefined" && errorlevel != undefined) { con.color_pair(166,253) @@ -61,7 +61,7 @@ function greet() { con.clear() con.color_pair(253,255) print(' ');con.addch(17);con.curs_right() - con.color_pair(0,253) + con.color_pair(240,253) print(" ".repeat(greetLeftPad)+welcome_text+" ".repeat(greetRightPad)) con.color_pair(253,255) con.addch(16);con.curs_right();print(' ') diff --git a/buildapp/build_app_linux_arm.sh b/buildapp/build_app_linux_arm.sh index 02e2f21..6637ddb 100755 --- a/buildapp/build_app_linux_arm.sh +++ b/buildapp/build_app_linux_arm.sh @@ -22,6 +22,7 @@ cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile cp -r "../out/TerranBASIC.jar" $DESTDIR/ +cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/ # Pack everything to AppImage ARCH=arm_aarch64 "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; } diff --git a/buildapp/build_app_linux_x86.sh b/buildapp/build_app_linux_x86.sh index 4877eb1..da1012a 100755 --- a/buildapp/build_app_linux_x86.sh +++ b/buildapp/build_app_linux_x86.sh @@ -22,6 +22,7 @@ cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile cp -r "../out/TerranBASIC.jar" $DESTDIR/ +cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/ # Pack everything to AppImage "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; } diff --git a/buildapp/build_app_mac_arm.sh b/buildapp/build_app_mac_arm.sh index 1a906a2..9d1d03b 100755 --- a/buildapp/build_app_mac_arm.sh +++ b/buildapp/build_app_mac_arm.sh @@ -23,5 +23,6 @@ cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/ # Copy over all the assets and a jarfile cp -r "../out/TerranBASIC.jar" $DESTDIR/Contents/MacOS/ +cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/Contents/MacOS/ echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_mac_x86.sh b/buildapp/build_app_mac_x86.sh index 9295ba2..e4441e1 100755 --- a/buildapp/build_app_mac_x86.sh +++ b/buildapp/build_app_mac_x86.sh @@ -23,5 +23,6 @@ cp -r "../out/$RUNTIME" $DESTDIR/Contents/MacOS/ # Copy over all the assets and a jarfile cp -r "../out/TerranBASIC.jar" $DESTDIR/Contents/MacOS/ +cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/Contents/MacOS/ echo "Build successful: $DESTDIR" diff --git a/buildapp/build_app_windows_x86.sh b/buildapp/build_app_windows_x86.sh index 83f1478..11795e6 100755 --- a/buildapp/build_app_windows_x86.sh +++ b/buildapp/build_app_windows_x86.sh @@ -18,6 +18,7 @@ cp -r "../out/$RUNTIME" $DESTDIR/ # Copy over all the assets and a jarfile cp -r "../out/TerranBASIC.jar" $DESTDIR/ +cp "../lib/compiler-23.1.10.jar" "../lib/compiler-management-23.1.10.jar" "../lib/truffle-compiler-23.1.10.jar" "../lib/truffle-api-23.1.10.jar" "../lib/truffle-runtime-23.1.10.jar" "../lib/polyglot-23.1.10.jar" "../lib/collections-23.1.10.jar" "../lib/word-23.1.10.jar" "../lib/nativeimage-23.1.10.jar" "../lib/jniutils-23.1.10.jar" $DESTDIR/ # Temporary solution: zip everything zip -r -9 -l "out/$DESTDIR.zip" $DESTDIR diff --git a/buildapp/tbaslinux_arm/AppRun b/buildapp/tbaslinux_arm/AppRun index 7b90fa1..a73cea2 100755 --- a/buildapp/tbaslinux_arm/AppRun +++ b/buildapp/tbaslinux_arm/AppRun @@ -1,3 +1,4 @@ #!/bin/bash cd "${0%/*}" -./runtime-linux-arm/bin/java -Xms128M -Xmx2G -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./TerranBASIC.jar +GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar +./runtime-linux-arm/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Xms128M -Xmx2G -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./TerranBASIC.jar diff --git a/buildapp/tbaslinux_x86/AppRun b/buildapp/tbaslinux_x86/AppRun index b155968..46a92c1 100755 --- a/buildapp/tbaslinux_x86/AppRun +++ b/buildapp/tbaslinux_x86/AppRun @@ -1,3 +1,4 @@ #!/bin/bash cd "${0%/*}" -./runtime-linux-x86/bin/java -Xms128M -Xmx2G -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./TerranBASIC.jar +GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar +./runtime-linux-x86/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Xms128M -Xmx2G -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ./TerranBASIC.jar diff --git a/buildapp/tbasmac_arm/TerranBASIC.sh b/buildapp/tbasmac_arm/TerranBASIC.sh index 24c6430..486ffab 100755 --- a/buildapp/tbasmac_arm/TerranBASIC.sh +++ b/buildapp/tbasmac_arm/TerranBASIC.sh @@ -1,3 +1,4 @@ #!/bin/bash cd "${0%/*}" -./runtime-osx-arm/bin/java -XstartOnFirstThread -Xms128M -Xmx2G -jar ./TerranBASIC.jar +GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar +./runtime-osx-arm/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -XstartOnFirstThread -Xms128M -Xmx2G -jar ./TerranBASIC.jar diff --git a/buildapp/tbasmac_x86/TerranBASIC.sh b/buildapp/tbasmac_x86/TerranBASIC.sh index 83673b7..7e5937c 100755 --- a/buildapp/tbasmac_x86/TerranBASIC.sh +++ b/buildapp/tbasmac_x86/TerranBASIC.sh @@ -1,3 +1,4 @@ #!/bin/bash cd "${0%/*}" -./runtime-osx-x86/bin/java -XstartOnFirstThread -Xms128M -Xmx2G -jar ./TerranBASIC.jar +GRAAL_MODULE_PATH=compiler-23.1.10.jar:compiler-management-23.1.10.jar:truffle-compiler-23.1.10.jar:truffle-api-23.1.10.jar:truffle-runtime-23.1.10.jar:polyglot-23.1.10.jar:collections-23.1.10.jar:word-23.1.10.jar:nativeimage-23.1.10.jar:jniutils-23.1.10.jar +./runtime-osx-x86/bin/java --upgrade-module-path=$GRAAL_MODULE_PATH -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -XstartOnFirstThread -Xms128M -Xmx2G -jar ./TerranBASIC.jar diff --git a/buildapp/tbaswindows_x86/TerranBASIC.bat b/buildapp/tbaswindows_x86/TerranBASIC.bat index 248b0f0..0413d78 100755 --- a/buildapp/tbaswindows_x86/TerranBASIC.bat +++ b/buildapp/tbaswindows_x86/TerranBASIC.bat @@ -1,2 +1,3 @@ cd /D "%~dp0" -.\runtime-windows-x86\bin\java -Xms128M -Xmx2G -jar .\TerranBASIC.jar +set GRAAL_MODULE_PATH=compiler-23.1.10.jar;compiler-management-23.1.10.jar;truffle-compiler-23.1.10.jar;truffle-api-23.1.10.jar;truffle-runtime-23.1.10.jar;polyglot-23.1.10.jar;collections-23.1.10.jar;word-23.1.10.jar;nativeimage-23.1.10.jar;jniutils-23.1.10.jar +.\runtime-windows-x86\bin\java --upgrade-module-path=%GRAAL_MODULE_PATH% -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler -Xms128M -Xmx2G -jar .\TerranBASIC.jar diff --git a/lib/_create_graaljs_edit.md b/lib/_create_graaljs_edit.md index bcdf876..7bb4a2a 100644 --- a/lib/_create_graaljs_edit.md +++ b/lib/_create_graaljs_edit.md @@ -1,20 +1,8 @@ -## How To Edit the Graaljs Jars +## GraalJS JAR Editing (OBSOLETE) -0. Download following from Maven: +The META-INF/services cross-registration hack was needed for GraalJS 22.3.1 where +`js` and `regex` JARs each needed the other's `TruffleLanguage$Provider` registered. - org.graalvm.js:js:00.0.0 - org.graalvm.js:js-scriptengine:00.0.0 - -1. grab `js-00.0.0.jar` -2. on `META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider`, edit as shown: - - com.oracle.truffle.js.lang.JavaScriptLanguageProvider (existing line) - com.oracle.truffle.regex.RegexLanguageProvider (<< add this line) - -3. grab `regex-00.0.0.jar` -4. on `META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider`, edit as shown: - - com.oracle.truffle.regex.RegexLanguageProvider (existing line) - com.oracle.truffle.js.lang.JavaScriptLanguageProvider (<< add this line) - -5. Re-zip two files +As of GraalJS 24.1.2, the service discovery mechanism changed to +`TruffleLanguageProvider` and each JAR registers its own provider independently. +No JAR editing is required. diff --git a/lib/collections-23.1.10-javadoc.jar b/lib/collections-23.1.10-javadoc.jar new file mode 100644 index 0000000..05ab039 Binary files /dev/null and b/lib/collections-23.1.10-javadoc.jar differ diff --git a/lib/collections-23.1.10-sources.jar b/lib/collections-23.1.10-sources.jar new file mode 100644 index 0000000..b79b448 Binary files /dev/null and b/lib/collections-23.1.10-sources.jar differ diff --git a/lib/collections-23.1.10.jar b/lib/collections-23.1.10.jar new file mode 100644 index 0000000..811ddb8 Binary files /dev/null and b/lib/collections-23.1.10.jar differ diff --git a/lib/icu4j-71.1.jar b/lib/compiler-23.1.10-javadoc.jar similarity index 54% rename from lib/icu4j-71.1.jar rename to lib/compiler-23.1.10-javadoc.jar index 7c5cb50..0695edf 100644 Binary files a/lib/icu4j-71.1.jar and b/lib/compiler-23.1.10-javadoc.jar differ diff --git a/lib/compiler-23.1.10-sources.jar b/lib/compiler-23.1.10-sources.jar new file mode 100644 index 0000000..a15f89f Binary files /dev/null and b/lib/compiler-23.1.10-sources.jar differ diff --git a/lib/compiler-23.1.10.jar b/lib/compiler-23.1.10.jar new file mode 100644 index 0000000..9dd587f Binary files /dev/null and b/lib/compiler-23.1.10.jar differ diff --git a/lib/compiler-management-23.1.10-javadoc.jar b/lib/compiler-management-23.1.10-javadoc.jar new file mode 100644 index 0000000..21a72c7 Binary files /dev/null and b/lib/compiler-management-23.1.10-javadoc.jar differ diff --git a/lib/compiler-management-23.1.10-sources.jar b/lib/compiler-management-23.1.10-sources.jar new file mode 100644 index 0000000..0e0fa48 Binary files /dev/null and b/lib/compiler-management-23.1.10-sources.jar differ diff --git a/lib/compiler-management-23.1.10.jar b/lib/compiler-management-23.1.10.jar new file mode 100644 index 0000000..ad4a668 Binary files /dev/null and b/lib/compiler-management-23.1.10.jar differ diff --git a/lib/graal-sdk-22.3.1-javadoc.jar b/lib/graal-sdk-22.3.1-javadoc.jar deleted file mode 100644 index 277726e..0000000 Binary files a/lib/graal-sdk-22.3.1-javadoc.jar and /dev/null differ diff --git a/lib/graal-sdk-22.3.1-sources.jar b/lib/graal-sdk-22.3.1-sources.jar deleted file mode 100644 index 7f62f88..0000000 Binary files a/lib/graal-sdk-22.3.1-sources.jar and /dev/null differ diff --git a/lib/graal-sdk-22.3.1.jar b/lib/graal-sdk-22.3.1.jar deleted file mode 100644 index 1de1b39..0000000 Binary files a/lib/graal-sdk-22.3.1.jar and /dev/null differ diff --git a/lib/icu4j-23.1.10-javadoc.jar b/lib/icu4j-23.1.10-javadoc.jar new file mode 100644 index 0000000..b9d3849 Binary files /dev/null and b/lib/icu4j-23.1.10-javadoc.jar differ diff --git a/lib/icu4j-23.1.10-sources.jar b/lib/icu4j-23.1.10-sources.jar new file mode 100644 index 0000000..ffcfab9 Binary files /dev/null and b/lib/icu4j-23.1.10-sources.jar differ diff --git a/lib/icu4j-23.1.10.jar b/lib/icu4j-23.1.10.jar new file mode 100644 index 0000000..389ce6d Binary files /dev/null and b/lib/icu4j-23.1.10.jar differ diff --git a/lib/icu4j-71.1-javadoc.jar b/lib/icu4j-71.1-javadoc.jar deleted file mode 100644 index 249d8ef..0000000 Binary files a/lib/icu4j-71.1-javadoc.jar and /dev/null differ diff --git a/lib/icu4j-71.1-sources.jar b/lib/icu4j-71.1-sources.jar deleted file mode 100644 index 28f3bf4..0000000 Binary files a/lib/icu4j-71.1-sources.jar and /dev/null differ diff --git a/lib/jniutils-23.1.10-javadoc.jar b/lib/jniutils-23.1.10-javadoc.jar new file mode 100644 index 0000000..4822a5a Binary files /dev/null and b/lib/jniutils-23.1.10-javadoc.jar differ diff --git a/lib/jniutils-23.1.10-sources.jar b/lib/jniutils-23.1.10-sources.jar new file mode 100644 index 0000000..b598ee2 Binary files /dev/null and b/lib/jniutils-23.1.10-sources.jar differ diff --git a/lib/jniutils-23.1.10.jar b/lib/jniutils-23.1.10.jar new file mode 100644 index 0000000..5f837d7 Binary files /dev/null and b/lib/jniutils-23.1.10.jar differ diff --git a/lib/js-22.3.1-edit.jar b/lib/js-22.3.1-edit.jar deleted file mode 100644 index 978a5d0..0000000 Binary files a/lib/js-22.3.1-edit.jar and /dev/null differ diff --git a/lib/js-22.3.1-sources.jar b/lib/js-22.3.1-sources.jar deleted file mode 100644 index fc7522e..0000000 Binary files a/lib/js-22.3.1-sources.jar and /dev/null differ diff --git a/lib/js-22.3.1-javadoc.jar b/lib/js-language-23.1.10-javadoc.jar similarity index 53% rename from lib/js-22.3.1-javadoc.jar rename to lib/js-language-23.1.10-javadoc.jar index cecb7da..8fa8933 100644 Binary files a/lib/js-22.3.1-javadoc.jar and b/lib/js-language-23.1.10-javadoc.jar differ diff --git a/lib/js-language-23.1.10-sources.jar b/lib/js-language-23.1.10-sources.jar new file mode 100644 index 0000000..f71f00e Binary files /dev/null and b/lib/js-language-23.1.10-sources.jar differ diff --git a/lib/js-language-23.1.10.jar b/lib/js-language-23.1.10.jar new file mode 100644 index 0000000..18946bd Binary files /dev/null and b/lib/js-language-23.1.10.jar differ diff --git a/lib/js-scriptengine-22.3.1-javadoc.jar b/lib/js-scriptengine-22.3.1-javadoc.jar deleted file mode 100644 index 1763b85..0000000 Binary files a/lib/js-scriptengine-22.3.1-javadoc.jar and /dev/null differ diff --git a/lib/js-scriptengine-22.3.1-sources.jar b/lib/js-scriptengine-22.3.1-sources.jar deleted file mode 100644 index 76006c5..0000000 Binary files a/lib/js-scriptengine-22.3.1-sources.jar and /dev/null differ diff --git a/lib/js-scriptengine-22.3.1.jar b/lib/js-scriptengine-22.3.1.jar deleted file mode 100644 index 3675423..0000000 Binary files a/lib/js-scriptengine-22.3.1.jar and /dev/null differ diff --git a/lib/js-scriptengine-23.1.10-javadoc.jar b/lib/js-scriptengine-23.1.10-javadoc.jar new file mode 100644 index 0000000..545d673 Binary files /dev/null and b/lib/js-scriptengine-23.1.10-javadoc.jar differ diff --git a/lib/js-scriptengine-23.1.10-sources.jar b/lib/js-scriptengine-23.1.10-sources.jar new file mode 100644 index 0000000..d082d97 Binary files /dev/null and b/lib/js-scriptengine-23.1.10-sources.jar differ diff --git a/lib/js-scriptengine-23.1.10.jar b/lib/js-scriptengine-23.1.10.jar new file mode 100644 index 0000000..07d46ba Binary files /dev/null and b/lib/js-scriptengine-23.1.10.jar differ diff --git a/lib/nativeimage-23.1.10-javadoc.jar b/lib/nativeimage-23.1.10-javadoc.jar new file mode 100644 index 0000000..5c38e23 Binary files /dev/null and b/lib/nativeimage-23.1.10-javadoc.jar differ diff --git a/lib/nativeimage-23.1.10-sources.jar b/lib/nativeimage-23.1.10-sources.jar new file mode 100644 index 0000000..548c74b Binary files /dev/null and b/lib/nativeimage-23.1.10-sources.jar differ diff --git a/lib/nativeimage-23.1.10.jar b/lib/nativeimage-23.1.10.jar new file mode 100644 index 0000000..d6c2239 Binary files /dev/null and b/lib/nativeimage-23.1.10.jar differ diff --git a/lib/polyglot-23.1.10-javadoc.jar b/lib/polyglot-23.1.10-javadoc.jar new file mode 100644 index 0000000..376cb58 Binary files /dev/null and b/lib/polyglot-23.1.10-javadoc.jar differ diff --git a/lib/polyglot-23.1.10-sources.jar b/lib/polyglot-23.1.10-sources.jar new file mode 100644 index 0000000..fead753 Binary files /dev/null and b/lib/polyglot-23.1.10-sources.jar differ diff --git a/lib/polyglot-23.1.10.jar b/lib/polyglot-23.1.10.jar new file mode 100644 index 0000000..900e21d Binary files /dev/null and b/lib/polyglot-23.1.10.jar differ diff --git a/lib/regex-22.3.1-edit.jar b/lib/regex-22.3.1-edit.jar deleted file mode 100644 index a100ed1..0000000 Binary files a/lib/regex-22.3.1-edit.jar and /dev/null differ diff --git a/lib/regex-22.3.1-javadoc.jar b/lib/regex-22.3.1-javadoc.jar deleted file mode 100644 index 7e2c092..0000000 Binary files a/lib/regex-22.3.1-javadoc.jar and /dev/null differ diff --git a/lib/regex-22.3.1-sources.jar b/lib/regex-22.3.1-sources.jar deleted file mode 100644 index b4cdcf7..0000000 Binary files a/lib/regex-22.3.1-sources.jar and /dev/null differ diff --git a/lib/regex-23.1.10-javadoc.jar b/lib/regex-23.1.10-javadoc.jar new file mode 100644 index 0000000..a90fa4c Binary files /dev/null and b/lib/regex-23.1.10-javadoc.jar differ diff --git a/lib/regex-23.1.10-sources.jar b/lib/regex-23.1.10-sources.jar new file mode 100644 index 0000000..9fc5ef9 Binary files /dev/null and b/lib/regex-23.1.10-sources.jar differ diff --git a/lib/regex-23.1.10.jar b/lib/regex-23.1.10.jar new file mode 100644 index 0000000..875feaa Binary files /dev/null and b/lib/regex-23.1.10.jar differ diff --git a/lib/truffle-api-22.3.1-javadoc.jar b/lib/truffle-api-22.3.1-javadoc.jar deleted file mode 100644 index f8f92d7..0000000 Binary files a/lib/truffle-api-22.3.1-javadoc.jar and /dev/null differ diff --git a/lib/truffle-api-22.3.1-sources.jar b/lib/truffle-api-22.3.1-sources.jar deleted file mode 100644 index 96b94cd..0000000 Binary files a/lib/truffle-api-22.3.1-sources.jar and /dev/null differ diff --git a/lib/truffle-api-23.1.10-javadoc.jar b/lib/truffle-api-23.1.10-javadoc.jar new file mode 100644 index 0000000..bab3cd1 Binary files /dev/null and b/lib/truffle-api-23.1.10-javadoc.jar differ diff --git a/lib/truffle-api-23.1.10-sources.jar b/lib/truffle-api-23.1.10-sources.jar new file mode 100644 index 0000000..118f4f7 Binary files /dev/null and b/lib/truffle-api-23.1.10-sources.jar differ diff --git a/lib/truffle-api-22.3.1.jar b/lib/truffle-api-23.1.10.jar similarity index 60% rename from lib/truffle-api-22.3.1.jar rename to lib/truffle-api-23.1.10.jar index 4547ae4..35ab290 100644 Binary files a/lib/truffle-api-22.3.1.jar and b/lib/truffle-api-23.1.10.jar differ diff --git a/lib/truffle-compiler-23.1.10-javadoc.jar b/lib/truffle-compiler-23.1.10-javadoc.jar new file mode 100644 index 0000000..14d4ecd Binary files /dev/null and b/lib/truffle-compiler-23.1.10-javadoc.jar differ diff --git a/lib/truffle-compiler-23.1.10-sources.jar b/lib/truffle-compiler-23.1.10-sources.jar new file mode 100644 index 0000000..bc7e9de Binary files /dev/null and b/lib/truffle-compiler-23.1.10-sources.jar differ diff --git a/lib/truffle-compiler-23.1.10.jar b/lib/truffle-compiler-23.1.10.jar new file mode 100644 index 0000000..cfd53ad Binary files /dev/null and b/lib/truffle-compiler-23.1.10.jar differ diff --git a/lib/truffle-runtime-23.1.10-javadoc.jar b/lib/truffle-runtime-23.1.10-javadoc.jar new file mode 100644 index 0000000..3555005 Binary files /dev/null and b/lib/truffle-runtime-23.1.10-javadoc.jar differ diff --git a/lib/truffle-runtime-23.1.10-sources.jar b/lib/truffle-runtime-23.1.10-sources.jar new file mode 100644 index 0000000..d5a7285 Binary files /dev/null and b/lib/truffle-runtime-23.1.10-sources.jar differ diff --git a/lib/truffle-runtime-23.1.10.jar b/lib/truffle-runtime-23.1.10.jar new file mode 100644 index 0000000..28a0f17 Binary files /dev/null and b/lib/truffle-runtime-23.1.10.jar differ diff --git a/lib/word-23.1.10-javadoc.jar b/lib/word-23.1.10-javadoc.jar new file mode 100644 index 0000000..2e52880 Binary files /dev/null and b/lib/word-23.1.10-javadoc.jar differ diff --git a/lib/word-23.1.10-sources.jar b/lib/word-23.1.10-sources.jar new file mode 100644 index 0000000..629c87b Binary files /dev/null and b/lib/word-23.1.10-sources.jar differ diff --git a/lib/word-23.1.10.jar b/lib/word-23.1.10.jar new file mode 100644 index 0000000..9107205 Binary files /dev/null and b/lib/word-23.1.10.jar differ diff --git a/terranmon.txt b/terranmon.txt index 194474c..2ddfd39 100644 --- a/terranmon.txt +++ b/terranmon.txt @@ -235,45 +235,6 @@ Memory Space Palette stored in following pattern: 0b rrrr gggg, 0b bbbb aaaa, .... Palette number 255 is always full transparent (bits being all zero) -(DRAFT) Optional Sprite Card (VRAM Bank 1 (256 kB)) -250880 bytes - One of: - Secondary layer - Other 8-bit of the primary framebuffer (4K colour mode) - -SPRITE FORMAT DRAFT 1 - - 533 bytes: Sprite attribute table - (41 sprites total, of which 1 is GUI cursor) - 12 bytes - signed fixed point - X-position - Y-position - Transform matrix A..D - 1 bytes - 0b 0000 00vp - (p: 0 for above-all, 1 for below-text, v: show/hide) - 10496 bytes: Sprite table - 256 bytes - 16x16 texture for the sprite - 235 bytes: - unused - -SPRITE FORMAT DRAFT 2 - - DMA Sprite Area - 18 bytes each, total of ??? sprites - 1 byte - Sprite width - 1 byte - Sprite height - 12 bytes - signed fixed point - Affine transformation A,B,C,D,X,Y - 1 byte - Attributes - 0b 0000 00vp - (p: 0 for above-all, 1 for below-text, v: show/hide) - 3 bytes - Pointer to raw pixmap data in Core Memory - MMIO 0..1 RO @@ -389,21 +350,6 @@ MMIO Text-mode-font-ROM is immutable and does not belong to VRAM Even in the text mode framebuffer is still being drawn onto the screen, and the texts are drawn on top of it -Copper Commands (suggestion withdrawn) - -WAITFOR 3,32 - 80·03 46 00 (0x004603: offset on the framebuffer) -SCROLLX 569 - A0·39 02 00 -SCROLLY 321 - B0·41 01 00 -SETPAL 5 (15 2 8 15) - C0·05·F2 8F (0x05: Palette number, 0xF28F: RGBA colour) -SETBG (15 2 8 15) - D0·00·F2 8F (0xF28F: RGBA colour) -END (pseudocommand of WAITFOR) - 80·FF FF FF - -------------------------------------------------------------------------------- TSVM MOV file format diff --git a/tsvm_core/src/net/torvald/tsvm/VMJSR223Delegate.kt b/tsvm_core/src/net/torvald/tsvm/VMJSR223Delegate.kt index 73822b0..ef6cdd6 100644 --- a/tsvm_core/src/net/torvald/tsvm/VMJSR223Delegate.kt +++ b/tsvm_core/src/net/torvald/tsvm/VMJSR223Delegate.kt @@ -141,6 +141,26 @@ class VMJSR223Delegate(private val vm: VM) { for (i in 0 until len) vm.poke(to + i*toVector, vm.peek(from + i*fromVector)!!) } } + fun pokeBytes(dest: Int, src: org.graalvm.polyglot.Value, len: Int) { + val destL = dest.toLong() + val lenL = len.toLong() + val devPtr = getDev(destL, lenL, true) + if (devPtr != null) { + var i = 0 + while (i < len) { + UnsafeHelper.unsafe.putByte(devPtr + i, src.getArrayElement(i.toLong()).asInt().toByte()) + i++ + } + } else { + val vector = if (destL >= 0) 1L else -1L + var i = 0 + while (i < len) { + vm.poke(destL + i * vector, src.getArrayElement(i.toLong()).asInt().toByte()) + i++ + } + } + } + fun mapRom(slot: Int) { vm.romMapping = slot.and(255) } diff --git a/tsvm_core/src/net/torvald/tsvm/peripheral/BlockTransferInterface.kt b/tsvm_core/src/net/torvald/tsvm/peripheral/BlockTransferInterface.kt index e41ae7b..58f2d7f 100644 --- a/tsvm_core/src/net/torvald/tsvm/peripheral/BlockTransferInterface.kt +++ b/tsvm_core/src/net/torvald/tsvm/peripheral/BlockTransferInterface.kt @@ -4,7 +4,7 @@ import net.torvald.tsvm.VM import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicInteger -abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolean, val baudRate: Int = 20_000_000) { +abstract class BlockTransferInterface(val isMaster: Boolean, val isSlave: Boolean, val baudRate: Int = 0) { var recipient: BlockTransferInterface? = null; protected set