69 Commits

Author SHA1 Message Date
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
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
e60a708b3c Fix TIC-80 when using a French AZERTY layout (#2663)
* Initial naive implementation

* Reorganize code

* Generalize & future-proof

Detects more keyboard layouts etc.

* Unbreak other platforms

* Refactor keyboard layouts into an enum
2024-08-26 20:58:07 +02:00
Alice
43a031789d Feature: FFT support (#2607)
* FEATURE: add miniaudio to the project

* FEATURE: add kissfft to the project

* FEATURE: update kiss_fft to my fork with an important patch

* FEATURE: FFT

Prior work:
* https://github.com/glastonbridge/TIC-80
* https://github.com/creativenucleus/TIC-80-bytebattle
* https://github.com/sknebel/TIC-80/tree/tmp

Based on:
* https://github.com/Gargaj/Bonzomatic
* https://github.com/TheNuSan/Bonzomatic

* FIX: Disable FFT on Baremetal/Android/3DS

* QOL: DRY refactor, better clamping

* DOCS: Add past contributors

Byte Battle / FFT patches + the FFT features from Bonzomatic to contributors in README
2024-05-29 21:30:44 +02:00
nesbox
42047e159d fixed crash when you load tic without any langs 2024-05-25 12:22:15 +02:00
Rob Loach
b255c61381 libretro: Update the libretro state values (#2590)
* libretro: Update the libretro state values

* libretro: Disable module loading on libretro
2024-05-20 08:38:49 +02:00
nesbox
3dfc2ed638 #2257: deploy scripts as shared libs 2024-05-19 15:37:46 +02:00
Vadim Grigoruk
c516b17e28 winxp/win7 macro definition plus fixed some warnings 2024-05-05 19:31:42 +02:00
Vadim Grigoruk
505e817280 merge shared api to main branch (#2568) 2024-05-05 17:02:25 +02:00
Vadim Grigoruk
e6c9f97a1e #2257: added global memcpy/memset undef 2024-04-21 16:55:45 +02:00
Vadim Grigoruk
4a8cd417d4 Added cmake build options for all the supported scripts (#2423) 2023-12-26 18:51:53 +03:00
Yue Wang
b17388631b Make WREN a configration build option. (#2418) 2023-12-26 15:40:54 +03: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
5eaefe3f53 basic functionality is in place 2023-05-03 00:13:05 -06:00
David St-Hilaire
86bdc2971f Merge branch 'main' into main 2023-02-02 08:01:46 -05:00
David St-Hilaire
22f92b33ed Added Scheme support to TIC-80 2023-01-30 22:33:19 -05:00
nesbox
c8648b4c8d test janet build 2023-01-30 12:58:02 +01:00
Vadim Grigoruk
9a3d502bdd Merge pull request #2079 from AlecTroemel/charlotte_janet_support
janet support
2023-01-23 01:08:09 +03:00
Jens Nyberg
2a700111a0 Fix segfault in player-sdl
There is a bug in that tic80_tick doesnt set up the counter and freq callbacks
properly which leads to a segfault.

This is probably not a good solution and it only works for player-sdl and the
same issue is probably also in libretro which needs a proper fix too.
2022-12-23 22:37:20 +01:00
Charlotte Koch
ef9d33b651 needed to add ourselves in the tic80_config.h 2022-09-01 19:07:46 -07:00
phcoder
6be04dfa6e Remove OSX version check
Comment indicates that it's about SDL but this header is used
outside of SDL as well. Instead put it in SDL-specific files
2022-05-31 18:13:59 +02:00
phcoder
99dc5553be Big-endian support
Unlike my previous attempt this minimizes the changes to actual code.

Now solitaire.tic runs correctly. Only 2 fields were actually crossing
byte boundary and needed byte-swap handling or field-splitting. Others
were just a straight reorder of bitfields
2022-05-31 18:13:59 +02:00
phcoder
201282ae14 Import endianness header from libretro 2022-05-31 18:13:59 +02:00
phcoder
1eebf3a5a8 Replace bool with u8 in bitfields 2022-05-31 18:10:34 +02:00
nesbox
aeabb55bef merged WASM runtime PR #1772 2022-02-23 16:39:44 +03:00
nesbox
3dc2feacbe removed tic80local struct and done some Studio refactoring 2022-02-21 18:39:23 +03:00
Rob Loach
4f3c3ecf10 mruby: Fix the option checks 2022-01-23 22:29:14 -05:00
Rob Loach
66c97236e3 mruby: Initial commit for optional Ruby 2022-01-23 20:25:47 -05:00
Jeremiasz
c656bdf4a7 Ruby scripting support (#1726)
* Register submodule for mruby

* Link binaries against static mruby

* Adapt old mrb_api.c code to current internal API-s

* Create Ruby demos

* Mention Ruby support in README.md

* Mention Ruby in features
* Attribution

* Fix broken demos

* Add mruby WASM target

* Fix compatibility with old CMake versions

* Fix support for languages with single-char comment

Current behavior assumes that comments comprise
exactly two characters, such as "--" or "//".

Many languages, such as Ruby and Python, use
a single character, such as the pound sign
or the ASCII quotation mark to signal
a single-line comment.

* Fix segfault when opening outline

* Actions: Install Ruby where not present

* Honor Windows MRuby static exts

* Build mruby with /MT on Windows

* Force mruby to use .a suffix for static libraries

Github Actions seems to also prefer the UNIX-native
prefix on Windows CMake

* Do not build redundant mrbgems

Created a gembox containing only
useful gems

* Infer mruby CFLAGS from CMake

* Pass CMake flags to MRuby cross target

* Revert "Pass CMake flags to MRuby cross target"

This reverts commit 1a8bf8330e.

It turns out that wrapping CMake's poor cross build support
was not a good idea after all.

* Refactor mruby build configuration sets

* mruby toolchain switching from CMake

* Guess CMAKE_COMMAND on Windows OS

* [mruby] Delegate ENV passing to rake invocation

CMake's env helper is broken on Windows OS :/

* Enforce certain mruby toolchains from CMake side

* Simplify mruby build system

* Genericize cross compilation
* Clean mruby build artifacts with make/ninja clean

* Force mruby bootstrap to use MSVC where applicable

* Fix naming in demos.c

* Fix incorrect mruby x-compilation logic

* Use TARGET_CC as the ultimate linker in mruby builds

Some toolchains seem to work better this way.

* Explicitly use mruby clang toolchain on macOS

* Set --sysroot in mruby for macOS Clang

* Do not depend on YACC

https://github.com/nesbox/TIC-80/pull/1726#issuecomment-989728667:
> mruby can be built without yacc(or GNU Bison) after mruby 2.1.2+( https://mruby.org/releases/2020/08/06/mruby-2.1.2-released.html).

* Set ImageOS in Actions runner Dockerfiles

This allows Ruby to be installed on those
non-standard images.

* Revert "Set ImageOS in Actions runner Dockerfiles"

This reverts commit 0ea4ecaf83.

* Manually install Ruby in cross Actions containers

* mruby Android toolchain

* Additional params for mruby android toolchain

* Don't build redundant mrbgems

* Whitelist mrbgem "stdlib-io" anyway

* Don't fortify sources on Android

* Disable source fortification project-wide on Android

* Also disable fortify at link time on Android

* Android build fixes

* Fix building on Raspberry Pi

* Fix missing variable prefix in Android CMake

* Rename: mrb.c -> mruby.c

* Adapt mruby.c code to master

* Fix silly misplacement of definition in CMakeLists

* Use CMake-native target version inference

ref.  https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_API.html

* Do not link mruby against winsock on WinNT

* Add mruby target to stub export action

* Revert "Use CMake-native target version inference"

This reverts commit 6164e0b052.

* Explicitly set ANDROID_API from gradle

* Move: /mruby/ -> /build/mruby/

More consistent with the rest of the project tree

* baremetalpi: Link against libmruby

* Prepare standalone NDK toolchains in Actions

* Link sysroot in standalone NDK

* Patch mruby with modern NDK support

* Actions: Provision Git to allow "am" patching

* Revert "Actions: Provision Git to allow "am" patching"

This reverts commit 375ca376f2.

* Patch mruby during the configuration step

* Github Actions: Recreate standalone NDK toolchains

* Fix mruby build on Android

* Update build instructions
2021-12-11 20:22:32 +03:00
nesbox
602d90893a Some code refactoring for the #1618 2021-11-01 18:45:30 +03:00
msx80
20e9caca18 Improvements for language support (#1590)
* Cleanups as discussed in https://github.com/nesbox/TIC-80/discussions/1289

* switches for languages

* removed stale marks

* resolved dependency loop, unified vm pointer, removed SCRIPT_LIST

* forgot a field

* removing extra log and fixing forgotten javascript

Co-authored-by: msx80 <msx80@github>
2021-09-15 19:23:24 +03:00
nesbox
860dd0e714 #986: added relative mouse mode 2021-07-15 16:15:16 +03:00
nesbox
2d532a6b89 removed unnecessary map section from the config 2021-05-30 16:10:52 +03:00
Nesbox
f724c8c9bb some text formatting for the help 2021-05-26 18:31:22 +03:00
Nesbox
a0581c1e41 play with some interesting macros 2021-05-07 17:16:03 +03:00
Nesbox
0eaccd17e2 #426: added console command parser and did some code refactoring 2021-05-06 19:54:39 +03:00
Nesbox
aa8b654421 #1264: some code cleaning 2021-01-21 13:44:40 +03:00
Nesbox
5f23af383f fixed Visual Studio 2019 compilation warnings 2020-09-29 18:08:05 +03:00
asie
26947836d4 Add pixel color format field to TIC-80 structs and blitting.
Allows for natively outputting to the buffer in a format different than
the default SDL/Sokol one. This also means that the libretro port now
avoids an additional conversion step.
2020-06-20 01:10:03 +02:00
anatol
5798f8c0d3 fixed some warnings from A static analyzer 2020-04-29 16:24:15 +03:00
nesbox
0dd24096e8 recovered html export 2020-03-27 00:22:02 +03:00
msx80
cfa72df43e Baremetal Raspberry PI build support (#918)
* Raspberry PI baremetal support

* boot utils for baremetal RPI

* Building instructions

* fix surf continuously accessing disk
2019-09-02 15:40:44 +03:00
Vadim Grigoruk
4eef02123e added Android build to Travis CI 2019-08-14 16:45:49 +03:00
nesbox
22b0525888 #883 TIC_FREQUENCY renamed to TIC80_SAMPLERATE 2019-07-19 11:33:38 +03:00
Vadim Grigoruk
be801c93aa Merge branch 'sokol' 2018-12-01 21:55:10 +03:00
Graham Clemo
6d22991d54 Merge https://github.com/nesbox/TIC-80 into add-squirrel 2018-10-14 13:10:28 +01:00
nesbox
cd4db83725 sokol: temporary sound fixes 2018-09-21 17:17:12 +03:00
nesbox
559a8bb920 reverted ugly keyboard handling 2018-09-04 23:22:59 +03:00
Vadim Grigoruk
7e19ce65e8 #707 one more attempt 2018-08-26 09:34:27 +03:00