-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32/ESP8266 port? #1
Comments
Maybe a pure c++ or c emulator like the mcugotchi? |
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. |
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 |
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) { |
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! |
Is there a way to update the screen dynamically? I noted that the emulator update the screen every defined time... |
It can't. But I can direct you the location to tune the graphics refresh rate and CPU speed:
cpu.c
ArduinoGotchi.ino
|
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. |
Hello Gary. Thks a lot for porting this to the Arduino IDE.
I try to compile the source for the ESP32 and i cant. I think that the problem is that you put in the emulator assembly code for the atMega328 architecture...
Im trying to port the emulator for this architecture the esp32 and/or esp8266 and my head crashes a lot in the journey.
Can you give me a hint of what i need to do for porting this code or the mcuGotchi to this plataforms?
The text was updated successfully, but these errors were encountered: