GithubHelp home page GithubHelp logo

ESP32/ESP8266 port? about arduinogotchi HOT 8 OPEN

garyz88 avatar garyz88 commented on June 3, 2024
ESP32/ESP8266 port?

from arduinogotchi.

Comments (8)

GaryZ88 avatar GaryZ88 commented on June 3, 2024 1

Please noted that I disabled all the CPU clock speed emulation code to improve the speed and program size. If you are using ESP32, you have to add back the clock speed emulation parts.

static void hal_sleep_until(timestamp_t ts) {
...
}

static timestamp_t hal_get_timestamp(void) {
...
}

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 3, 2024

Maybe a pure c++ or c emulator like the mcugotchi?

from arduinogotchi.

GaryZ88 avatar GaryZ88 commented on June 3, 2024

Hi,

I didn't use any assembly in this project, it is a pure C implementation. There is one Arduino directive I used, "PROGMEM", it will force the compiler to put static variable into FLASH instead of RAM.

Also, to reduce the program size, I used U8g2 library to handle graphics. Due to the complex paging mechanism in U8g2, the graphical routine is very hard to understand.

I suggest you can start your porting with TamaTool, the original emulator created by TamaLib creator.

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 3, 2024

Ok I have it working now in the ESP32... And using a Nokia display... I made a few changes in the code to make it work. Are you interested in the code?

I have problems with the resolution but now i can see the egg trying to hatch :)

Also I noted that you hardcoded the Buttons and the Speaker pins.... So i made a change in the code so you can select the pinmap using #define in the main file

image

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 3, 2024

Tks Gary.

Now I'm reading the code for the graphics. Now i have to solder some buttons to see the icons. But now i resized the pixel size and centered in the screen. I have modiefied the code so no blank spaces between the pixels. Tks a lot!

BTW... this screen (nokia 1100) consumes less than 1mA without the Back-Light, so the battery will least longer!

image

from arduinogotchi.

NoNamedCat avatar NoNamedCat commented on June 3, 2024

Is there a way to update the screen dynamically? I noted that the emulator update the screen every defined time...
If we can update the screen only when the image is changed we can get some time for other things like the emulation itself.

from arduinogotchi.

GaryZ88 avatar GaryZ88 commented on June 3, 2024

It can't. But I can direct you the location to tune the graphics refresh rate and CPU speed:
tamalib.c

  • tamalib_mainloop_step_by_step()

cpu.c

  • Search the variable "CPU_SPEED_RATIO"

ArduinoGotchi.ino

  • hal_sleep_until()
  • hal_get_timestamp()

from arduinogotchi.

AljokExe avatar AljokExe commented on June 3, 2024

Hey Gary, can I get your email? I am trying to replicate your tamagotchi project as a gift for my girlfriend, yet I cant find an available ROM anywhere.
Care to provide me with some info? [email protected]

from arduinogotchi.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.