foxygit / fake-08-xbox360 Log in
commit a9bb61f483ac8aac921a97b96254144abc995774
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Sat Jan 10 14:26:03 2026 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Sat Jan 10 14:26:03 2026 -0700

    Update z8lua with support for ~ as bxor operator
---
 libs/z8lua                                     |   2 +-
 test/carts/screenshots/tilde_bxor_test_f01.png | Bin 0 -> 343 bytes
 test/carts/tilde_bxor_test.p8                  |  17 +++++++++++++++++
 test/endtoendtests.cpp                         |  16 ++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/libs/z8lua b/libs/z8lua
index 876d147..1c73cd0 160000
--- a/libs/z8lua
+++ b/libs/z8lua
@@ -1 +1 @@
-Subproject commit 876d147e1f5fab9659b126dd8e7466fe7bf644f4
+Subproject commit 1c73cd0f1523f11b8723063163487b3c6ce0720d
diff --git a/test/carts/screenshots/tilde_bxor_test_f01.png b/test/carts/screenshots/tilde_bxor_test_f01.png
new file mode 100644
index 0000000..4b351ff
Binary files /dev/null and b/test/carts/screenshots/tilde_bxor_test_f01.png differ
diff --git a/test/carts/tilde_bxor_test.p8 b/test/carts/tilde_bxor_test.p8
new file mode 100644
index 0000000..2b99db1
--- /dev/null
+++ b/test/carts/tilde_bxor_test.p8
@@ -0,0 +1,17 @@
+pico-8 cartridge // http://www.pico-8.com
+version 43
+__lua__
+function _draw()
+cls()
+print("0~0: "..tostr(0~0))
+print("0~1: "..tostr(0~1))
+print("1~0: "..tostr(1~0))
+print("1~1: "..tostr(1~1))
+end
+__gfx__
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
diff --git a/test/endtoendtests.cpp b/test/endtoendtests.cpp
index d342071..fda493d 100644
--- a/test/endtoendtests.cpp
+++ b/test/endtoendtests.cpp
@@ -1056,6 +1056,22 @@ TEST_CASE("Loading and running carts") {

         vm->CloseCart();
     }
+    SUBCASE("tilde (~) operator (bxor) test"){
+        vm->LoadCart("tilde_bxor_test.p8", false);
+        vm->vm_run();
+        vm->Step();
+
+        SUBCASE("No error reported"){
+            CHECK(vm->GetBiosError() == "");
+        }
+        SUBCASE("screen matches screenshot"){
+            vm->Step();
+
+            CHECK(verifyScreenshot(vm, host, "carts/screenshots/tilde_bxor_test_f01.png"));
+        }
+
+        vm->CloseCart();
+    }

     delete vm;
     delete host;