matthew-5pl / gb_cardputer Goto Github PK
View Code? Open in Web Editor NEWM5Stack Cardputer "Port" of Peanut-GB
M5Stack Cardputer "Port" of Peanut-GB
Trying to load ROMs larger than ~200 KBs in size causes a crash before emulation can even start, logging an error in the read_rom_to_ram
function before (presumably) the ESP32's crash handler resets the device.
The SD Card API functions (specifically the File.readBytes
method) expects a char*
(aka int8_t*
) as a buffer to write the file data to, but Peanut-GB wants the ROM to be an array of uint8_t
s.
Since I'm a bad programmer this was my solution:
// rom data is read to char* readRom
uint8_t *rom = (uint8_t*)readRom;
// return rom to Peanut-GB
I think this somehow breaks when ROMs are too big, where loading the ROM into RAM exceeds the Cardputer's 512 KB of SRAM. At the same time, I only log that message when the read_rom_to_ram
function returns NULL
, so the function is definitely reaching its end.
I don't really have the time or energy to look into or debug this much since I'm busy with school right now, but since other people seem to be interested in Game Boy emulation on the Cardputer I think this would be a good place for other people (who probably have a better understanding of C than me) to potentially fix this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.