Comments (8)
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.
Maybe a pure c++ or c emulator like the mcugotchi?
from arduinogotchi.
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.
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
from arduinogotchi.
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!
from arduinogotchi.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinogotchi.