336 Commits

Author SHA1 Message Date
imsys f133009adf Creates the BUILD_SURF build option (#2889)
* Creates the BUILD_SURF build option

* Managing starting with no game loaded

When built with BUILD_EDITORS=OFF, and we execute the app without any
game, it starts by showing the Main menu.

We also hide options from the menu when there is no cart loaded: the
Resume and Reset.

When we start with no cart and we try to do a Surf, it was saying there
were changes made to the cart, so I also do a check if the cart was
loaded before showing the warning.

So, basically when the App is started without any games, it will show
the options: Surf, Options, Quit

* Android: BUILD_EDITORS=OFF & BUILD_SURF=ON

* Fix inisializing cart by arg when BUILD_EDITORS=OFF

* rebuild
2026-03-12 19:16:10 +01:00
Gabriel Terrien 80926eba36 [Fix] [Android] restore external keyboard arrow keys by tightening joystick classification (#2897) 2026-03-12 18:53:10 +01:00
Carsten Teibes 48673531dd Add Nintendo Switch port (#2866)
* Initial Nintendo Switch Port

* Switch: Enable CRT shader

* Switch: Some QOL changes
- hack: make the menu accessible with "+"
- Invert Controller buttons A/B X/Y
- Enable network log only for debug builds
- Enable touchscreen mouse emulation
Also add myself to the credits in README

---------

Co-authored-by: Vadim Grigoruk <grigoruk@gmail.com>
2025-11-23 11:57:51 +01:00
Carsten Teibes e9d10fe29b Revamp the 3DS port (#2864)
- fix use of deprecated macro
- move network stuff to platform directory
- ensure all lua is built for 32 bit integers
- clean up build configurations
- use newer docker image
2025-11-20 09:31:26 +01:00
Dania Rifki b3feccf770 Add YueScript as an additional scripting language (#2743)
* Publish Code

* Fixed YueScript build.

* Disabled macro feature which crashes runtime.

* Update YueScript submodule

* Try to fix the "function TIC()..." isn't found bug, no luck so far...

* Fix Demo and Mark

* Format yue.cpp

* Make it work in C99, let's hope this compiles in Win XP et cetera

* Fix Compilation Issues

* Try fixing rpi-baremetal(4) and nintendo-3ds builds

* Try fixing linking

* Reenable Exceptions

* Override YueParser

* Try forcing newer glibc?

* Debugging Build Step

* Update YueScript version

* Simplify build

* Add yue.cpp

* Whoops

* Update YueScript

* Update circle.patch to try to fix the build error

* Try removing -lstdc++fs

* Modify Patch

* Revert Update circle.patch

* ???

* Forgot to git Apply

* Accidentally put it in macOS instead of N3DS

* Remove platform specific configurations for now

* Remove thread_local for N3DS Build

* Use a more reliable way to disable thread_local on N3DS

* Forgot to pass in initial-exec

* Remove build/yuescript-makefile-remove-stdc++fs.patch

* Include libyuescript in the baremetal Makefile

---------

Co-authored-by: Li Jin <dragon-fly@qq.com>
2025-10-20 19:08:09 +02:00
Carl Lange da3ea61dab [web export] Fix Safari Arrow keys in HTML export/webapp (#2838)
* web: Fix Safari Arrow keys in HTML export and webapp\n\n- Remap Arrow key events with KeyboardEvent.location === 3 (numpad) to location: 0 on WebKit in capture phase\n- Prevent page scrolling on Arrow keys while canvas is focused\n- Ensure canvas is focusable (tabindex=0) and focused on start\n\nThis addresses Safari/WebKit misclassification of physical Arrow keys so games receive directional input correctly.

* Add missing semicolon

* Update index.html

* Update index.html
2025-09-20 10:10:42 +02:00
imsys 8071f388b3 [Android] Update gradle and gradlew to v9.0.0 (#2836)
* [Android] Update gradle and gradlew to v9.0.0

As we update gradle-wrapper.jar, it is desirable to confirm the
authenticity.

It can be checked by verifying:
sha256sum gradle/wrapper/gradle-wrapper.jar

to be identical to the one available at:
http://services.gradle.org/distributions/gradle-9.0.0-wrapper.jar.sha256

that should be:

76805e32c009c0cf0dd5d206bddc9fb22ea42e84db904b764f3047de095493f3

* [Android] updates JDK to v17

* [Android] Updates NDK to version r23

* [Android] informs NDK version in gradle file

The newer versions of Gradle requires us to explicitly inform the NDK
version we use.

* readme and comments
2025-09-20 10:08:27 +02:00
imsys 6a23ce9306 [Android standalone] fix association of .tic and .png to TIC-80 app (#2837)
* [Android standalone] fix association of .tic and .png to TIC-80 app 

Solves #2811

* [Android standalone] Fix loading directly from files

The android app was not configured to open directly form apps.
This now should work.
Code written by Gemini.

* [Android standalone] .tic file association case insensitive
2025-09-14 10:36:31 +02:00
imsys bae9661882 [Linux] Associates .tic and .png to TIC-80 (#2835) 2025-09-13 08:04:19 +02:00
imsys 03cad44003 [Android] Associate .tic files to TIC-80 app (#2834)
* [Android] Associate .tic files to TIC-80 app

Proposed by @Popolon at #2811

* [Android] Associate .tic and .png to TIC-80 app
2025-09-13 08:02:03 +02:00
imsys 70b0ba34c4 [Android standalone] update SDL files to v2.32.10 (#2831)
* [Android standalone] update SDL files to v2.32.10

* fixed multiline comment

I tried to selective update the file, butt there were a multiline
comment I mislook. So I just updated he full file SDLActivity.java file.

* [Android standalone] Restore custom virtual keyboard after SDL update

[Gemini 2.5 Pro] The custom virtual keyboard on Android is no longer
displayed after updating the underlying SDL library from v2.26.2 to
v2.32.10.

This was caused by a change in how the new version of `SDLActivity.java`
handles text input. The newer SDL version more aggressively activates
its own text input system (`SDL_StartTextInput()`) on Android.

The TIC-80 C code in `src/system/sdl/main.c` has a function,
`isKbdVisible()`, which determines whether to render the custom
keyboard. This function contained a specific check for Android:
`!SDL_IsTextInputActive()`. This line was intended to hide the custom
keyboard when a native (e.g., system) keyboard was active.

Because the newer SDL version keeps its text input system active by
default, this check was causing the custom TIC-80 keyboard to be
permanently hidden.

This change resolves the issue by commenting out the
`!SDL_IsTextInputActive()` check. This restores the intended behavior,
ensuring that TIC-80's own integrated virtual keyboard is always used
for input on touch devices, independent of the underlying SDL text input
state.

* Restore virtual keyboard and system keyboard toggle

Tries to make the system keyboard show when it was previously working.

* [Android standalone]

The virtual keyboard was not appearing after updating SDL to v2.32.10.

The new `SDLActivity.java` now enables text input on launch by default,
which caused TIC-80's logic to hide its custom keyboard.

This is fixed by adding an explicit `SDL_StopTextInput()` call during
initialization to restore the correct default state. A redundant text
input call was also removed from the `SDL_KEYDOWN` handler to ensure the
system keyboard is only activated by its specific toggle key.
2025-09-13 08:00:37 +02:00
josei 91800e0035 Baremetal Pi fix (#2763)
* Remove fopen/fclose reference from bytebattle part to fix baremetal pi boot (avoid 4-colour screen)

* Add support for isdir, deldir and delfile in baremetal pi

* Skip tic80.com folder in baremetal pi as there is no network

* Hide .local folder in baremetal pi

* Hide pixel cursor in baremetal pi, as a cursor is already rendered by tic80

* Fix potential buffer overflow in baremetal pi

* Remove unused code

* Add support for USB storage, using SD card as fallback, in baremetal pi

* Add baremetal pi support for ES locale while keeping US as default

* Use mouse raw mode instead of cooked mode to fix missing button-up events in baremetal pi
2025-03-22 21:03:08 +01:00
Miguel 0365ecc05a Use O3 + flto with all but msvc (#2696)
* use O3 with flto

* fix msvc builds

* back to minsizerel in msvc, baremetal and 3ds

* default to static in builds with flto

* use ubuntu 22.04 for linux amd64

* use gcc12 in ubuntu 22.04

* include ubuntu24.04 + gcc14 for linux amd64

* Update build.yml

* Update build.yml

* add required dep for ubuntu24.04

* Update build.yml

* try to force strict aliasing

* revert and try to get latest gcc14

* build with Os + flto to compare

* compile with O2 with flto to compare

* go back to O3+flto as is the faster option

* forgot to use release in android

* use macos13 as 12 is being deprecated

* more platforms

---------

Co-authored-by: Vadim Grigoruk <grigoruk@gmail.com>
2024-11-11 14:27:23 +01:00
Miguel ce24e76341 Update 3ds docker toolchain (#2701)
* update 3ds docker

* try to fix 3ds lua error

* revert and try to fix wren error

* disable lua and scheme for 3ds

* try to fix lua

* try to fix lua

* try to fix lua

* test

* revert

* try to fix lua

* test

* test

* continue

* possible last lua fix

* disable javascript in 3ds

* disable js correctly

* disable python for 3ds

* try to fix script.c

* try to fix another error

* test

* try to fix miniaudio

* test

* test

* test

* test

* test

* test

* try to fix gif errors

* test

* test

* test

* continue

* try with official devkitarm docker image

* test

* clean

* proper miniaudio fix

* mianiaudio version used before

* use cmake to build 3dsx

* use explicit name

* fix 3ds build instructions

* use NINTENDO_3DS from devkitPro cmakery

* fixup build commands

* output to build/bin

* update tested version

---------

Co-authored-by: Dave Murphy <davem@devkitpro.org>
2024-11-11 14:22:32 +01:00
Miguel 3125d4a472 update to latest circle-stdlib (#2697) 2024-10-17 01:52:40 +02:00
Alice 81de993d66 Cleanup: remove all trailing spaces from the source code (#2664)
* `cmake`: Remove trailing spaces

* `build`, `src`: Remove trailing spaces

* `templates`: Remove trailing spaces

* `demos`: Remove trailing spaces

* `include`: Remove trailing spaces
2024-08-26 21:01:59 +02:00
Alice 3af8080ac2 Remove support for sokol. (#2662) 2024-08-26 13:04:02 +02:00
Vadim Grigoruk 5d60c02469 build langs separately for wasm 2024-05-25 17:33:25 +02:00
Pedrocasf 1f23057e87 Update SDLActivity.java (#2593)
Possibly fix arrow keys error on android
2024-05-22 21:40:35 +02:00
nesbox 3dfc2ed638 #2257: deploy scripts as shared libs 2024-05-19 15:37:46 +02:00
Vadim Grigoruk 505e817280 merge shared api to main branch (#2568) 2024-05-05 17:02:25 +02:00
nesbox 8c769f81e8 Revert "bump Janet version to v1.34 (#2539)"
This reverts commit 9f5ce525ff.
2024-04-27 12:29:38 +02:00
Alec Troemel 9f5ce525ff bump Janet version to v1.34 (#2539)
* bump janet to version 1.34.0

* remove unused strict: true from janet example

* update janetconf to new version
2024-04-27 10:18:52 +02:00
Vadim Grigoruk 4ffa300ba0 #2257: build languages as shared libs (#2519)
* added BUILD_STATIC=OFF option to split scripts to shared libs

* rpi build fix

* rpi build fix

* macos build fix

* rpi baremetal build fix

* build fix

* call api without macro

* wren build fix

* clang build fix

* baremetal fix

* fixed python and janet shared libs
2024-04-21 13:02:31 +02:00
bonjorno7 a7062b8259 Update config.tic.dat to add TRIM_ON_SAVE option
In my previous PR I didn't commit this file because I didn't know what it was for.
I understand now that this is the default config, which gets loaded when you use `config reset` in the console, so it's important that it's up to date.
2023-11-28 20:11:03 +01:00
nesbox 4441c9c797 #2358: fixed horizontal scroll in the code editor 2023-11-25 10:49:50 +01:00
nesbox 00a895d65d #2335: added REVERT_SCROLL option to the config 2023-11-11 10:55:05 +01:00
nesbox 59ff33bb14 #2313: fixed cart addition in wasm 2023-10-08 13:36:06 +02:00
Vadim Grigoruk 7b86c1c339 Merge pull request #2306 from AlecTroemel/janet-v-1.31
bump janet version to 1.31.0
2023-09-23 12:10:52 +02:00
nesbox f1590a3d43 #2300: added 32 bit Android 2023-09-23 12:09:05 +02:00
alectroemel 79da692489 update janetconf.h to new version, include patches for windows build in janet 2023-09-19 08:31:56 -05:00
nesbox fe6a156915 #2283: update Android version 2023-08-27 11:41:07 +02:00
nesbox 5b9739967a #2229: fixed CRT effect in alone exports 2023-08-24 17:19:28 +02:00
nesbox 335c45f23e v1.2-dev 2023-08-17 13:40:07 +02:00
nesbox cff7ee5452 #2218: new GIF encoder 2023-08-16 17:17:25 +02:00
nesbox f63db38e92 fixed html tab outline 2023-08-14 12:45:24 +02:00
nesbox 3e24eeb813 updated demo carts data 2023-08-06 14:05:12 +02:00
nesbox 530d7f825a #1191: Duktape changed to QuickJS 2023-08-05 12:12:29 +02:00
nesbox 49fa975af5 android build reduced to arm64-v8a 2023-08-02 20:35:23 +02:00
nesbox cd05d0ab03 bump janet version to 1.29.1 2023-08-02 20:34:38 +02:00
nesbox e7fbd51f37 android build fix 2023-08-01 21:08:03 +02:00
Kian-Meng Ang 12cac71773 fix typos
found via `codespell -S vendor,./src/system -L siz,crate,gaus,gameboy,windowz,passtime`
and `typos --format brief`
2023-07-30 19:44:37 +08:00
Kolten Pearson 2ec5a8b2dc fixes #2199 there is now options for configuring tabs/spaces in the
editor and by default python and moonscript will use spaces
2023-06-10 20:36:10 -06:00
Kolten Pearson 4e3589e827 fixed pythonmark bunny demo 2023-06-04 12:26:41 -06:00
nesbox 687802dc64 updated credits 2023-06-01 18:32:28 +02:00
alectroemel eadfb2239e focus the canvas on click 2023-05-26 11:10:49 -05:00
nesbox a7e5bbb315 baremetal build fix 2023-05-14 15:08:30 +02:00
Kolten Pearson 70f784454a addded outline function 2023-05-10 21:14:21 -06:00
Kolten Pearson 211e43618c made the benchmark cart 2023-05-09 22:14:23 -06:00
Kolten Pearson 129f37f8da pythondemo.tic is working 2023-05-09 21:02:58 -06:00