nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
4.94k stars 479 forks source link

Idea: Teensy 4.1 Port #1354

Open AnthonyDiGirolamo opened 3 years ago

AnthonyDiGirolamo commented 3 years ago

Hi all! For fun, I'm looking into maybe porting TIC-80 to the Teensy 4.1 microcontroller.

It's definitely fast enough considering the 3ds port works so well. So far I haven't looked into the tic80 source yet but my main concern is ram usage. Only 1MB of ram is available out of the box. Two additional 8MB ram chips can be soldered on for extra space.

I know Lua works well running on top of the teensy arduino core but not sure about the other supported languages. Also have an embedded GPU in mind to use: https://github.com/AnthonyDiGirolamo/teensy-display-shield and keyboard: https://github.com/AnthonyDiGirolamo/i2c-thumb-keyboard

This isn't as cheap as a raspberry pi build but it would be a dedicated (no operating system) build. Somewhat less fantasy console 🙂

Looking for thoughts or feedback on the feasibility.

ben-clegg commented 3 years ago

I started taking a look at doing this with ESP32 and the arduino framework a while ago, but sadly I don't have my dev boards with me. I used platformio as a build system because it's a little nicer to use than the arduino IDE, and could make porting a little easier. I did have some issues with getting the git submodule dependencies working, but adding them as libraries to the project seemed to be an alright workaround. Sadly I'm not the most experienced C programmer, so I couldn't quite work out how to get some of the other dependencies linked to the compiler.

Hopefully I'll have time to look at it again in a few months, so I'd like to see what you come up with, I can imagine your approach should just run on other arduino compatibles too.

pavelmachek commented 1 year ago

So... I got Tic-80 to run on Esp-32 based T-Watch-2020. Currently it runs from psram, so rather slowly (1 fps?). It is here, probably needs more symlinks to compile. https://gitlab.com/tui/My-TTGO-Watch/-/merge_requests/new?merge_request%5Bsource_branch%5D=devel-2 Help needed. Lot of help needed :-).