* 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
* Updates verdor/zip from v0.1.19 to v0.3.5
no need for the -DCMAKE_POLICY_VERSION_MINIMUM=3.5 flag anymore.
* uses zip v0.2.6 instead of v.3.5
due to:
zip/src/miniz.h:8503:30: error: comparison is always false due to
limited range of data type [-Werror=type-limits]
8503 | if (((mz_uint64)buf_size > 0xFFFFFFFF) || (uncomp_size >
0xFFFFFFFF)) {
* tries zip v0.3.5 again
but with the -Wno-type-limits flag
* Update vendor/zip to 0.3.6
* Add -Wno-stringop-truncation to zip compile options
* Refactor compiler option checks for zip to only apply -Wno-stringop-truncation for GCC
* Fix for Baremetal GCC treating string truncation warnings as errors
* Fix support for bare-metal environment by defining lstat as stat
* Format comment
---------
Co-authored-by: imsys <911254+imsys@users.noreply.github.com>
* Fix WASM btnp and fget return type
Fixes https://github.com/nesbox/TIC-80/issues/2183
`btnp` and `fget` are linked as returning i32, but m3ApiReturnType(bool) only writes 1 byte and leaves the remaining 3 bytes uninitialized.
This can cause those functions to randomly return true in release builds.
* Fix btnp return type
* 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>
- 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
* 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>
* 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
* [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
* Informs retroarch that PNG extension is also supported
* Loading PNG cart from cart.c (fix PNG load in libretro)
Moved loadPngCart from studio.c to cart.c
The standalone binary loads carts from this stack:
studio.c: studio_create()
console.c: initConsole()
console.c: cmdLoadCart()
cmdLoadCart() had a working PNG cart load,
but libretro uses `tic.c: tic80_load()` directlty, but that had a
incompete PNG load.
So I tried to combine and bring the aproach from cmdLoadCart() to
tic80_load() by letting them both use the same PNG loading function.
* libpng CMakelist - order may matter
* target_link_libraries(tic80core PRIVATE png)
* [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
* [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.
* Includes the msf_gif.h in the project instead of using the full repo (saves 711 MiB of disk space)
* fix macos build
CMake Error at vendor/zip/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
-- Configuring incomplete, errors occurred!
Update the VERSION argument <min> value. Or, use the <min>...<max>
syntax
to tell CMake that the project requires at least <min> but has been
updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
There is a critical bug in how the core handles game time, directly
related to TIC80_FREQUENCY. The core incorrectly provides the TIC-80
engine with the time delta (time since last frame) instead of a
continuously running counter. This causes the engine's internal clock to
advance far too slowly, leading to the reported issues.
Because state->frameTime is being reset instead of accumulated, the
TIC-80 engine sees a counter value that hovers around the same number
every frame (e.g., ~16667 for 60 FPS). When the engine calculates the
difference (new_counter_value - old_counter_value), the result is close
to zero. The engine therefore concludes that almost no time has passed,
causing game logic to run at a fraction of the intended speed.
1. DCMAKE_POLICY_VERSION_MINIMUM=3.5 required with brew version of cmake
2. Correct binary name for chmod +x (binary is called tic80)
3. Renamed app from TIC80DEV to tic80dev for consistency with release name
* [libretro] draw cursor directly to screen
This fixes some bugs where the cursor were not drawn in some games, and
also causing a cursor trail in other games.
* [libretro] Makes the cursor to start hidden
As many games don't use mouse, we keep it hidden while it was not moved.
Those wanting to take screenshots of the titlescreen don't risk taking a
screenshot of the cursor.
* Informative screenshot filenames
screenshots and recordings now contain the rom name + datetime
* Informative screenshot filenames - multiplataform fix
In my last commit, the code to get the milliseconds would not work on
Windows. This new code should be able to compile on Windows too.
* Informative screenshot filenames - multiplataform fix2
* Update SDL2 submodule to release-2.32.10
* SDL2 update MSVC fix
Tries to ensure SDL2 builds with the same runtime as the rest of the
project
* Another try to compile the updated SDL2 on MSVC.
* Yet another try to compile the updated SDL2 on MSVC.
* Directly link libs for SDL2 win compiling
* SDL2 update linking MSVC try using CMP0079
* another sdl2 win build try