nbarkhina / numero

TI-83 Emulator for Libretro
Other
8 stars 5 forks source link

Memory Curiosity:)? Err Overflow Error Message on some platforms when loading games/programs. #9

Open KMFDManic opened 8 months ago

KMFDManic commented 8 months ago

Hello, @nbarkhina very impressed with what you did with the Numero Core. I love the multifaceted ability to run calculations, as well as install games and programs. I was able to get several games working successfully with the PC build. BUT, if I attempted to replicate the same process on other platforms, such as the RetroPie2, etc, I would get an Err Overflow Memory error. This would occur after installing Mirage OR Ion, then a game, like Castlevania, Doom...

So, then, I had an idea, that ended up working out successfully. Based on your ReadMe, save states are created which lock the exact spot you are in. So, what I ended up doing was installing Mirage, then Castlevania on PC, then copying that save state over to another platform. Low and behold, upon booting up the Core, it was exactly where I saved it at on PC. So, I had zero issues running Castlevania:)

Now then, this workaround is a duct tape fix that I would prefer to try to fix coding wise, so more platforms can benefit from this amazing Core:) Is there a possibility this Err Overflow error can be due to limited RAM on whichever platform, or directly tied to "save state size". Just trying to best determine a fix that might make it feasible to install Mirage, Castlevania, and universally run this on more platform, without the Memory Overflow error:)

I did a little demonstration. Thanks again, for everything! I know we should be able to pinpoint this memory anomaly somehow:)

https://www.youtube.com/watch?v=vhwXd5zmW0k&t=3s

nbarkhina commented 8 months ago

Hi @KMFDManic that was a really cool video! Thanks for making it, and for testing the core. Yes the fact that the core runs at all, and that you were able to get it to run castlevania using your clever workaround means it's probably a solvable issue. I unfortunately don't own a retropie so I can't really test it :(

You may have some luck messing with the flags in the Makefile. Maybe looking at how the other cores build for that platform and trying/using some of those flags. If I do get a Retropie I will definitely test this. Thanks for letting me know.

KMFDManic commented 8 months ago

@nbarkhina In this particular case, I think the platform is not necessarily the overall problem. This memory err overflow likely affects several platforms, aside from PC. I will do some tests and coding changes and hopefully be able to pinpoint what's causing the memory to run out. It will be nice making this more possible for others to enjoy:) Thanks again:)

KMFDManic commented 8 months ago

@nbarkhina Going against accuracy, is there a way to actually add more RAM to the calculator, which is emulated within this Core? I did more tests, and definitely pinpointed the overflow error as "not enough RAM". I know this goes a little against the grain. But, hey, just imagine how things could play out if we were able to add more RAM than the original calculator allowed, hehe. For now, however, I was able to "fix" the memory issues on my end, and can run any game. But, just gotta micromanage that memory! MirageOS uses TOO MUCH. So, I decided on using DOORS, instead, which is more serviceable with the RAM issue:) Thanks again!

nbarkhina commented 8 months ago

I actually remember looking into this a while back and I couldn't get it to work. The emulator has "banks" for memory which are defined in "83hw.cpp" as cpu->mem_c->banks[i].ram. However when I just increased this number and turned on the calculator and went to settings the reported memory did not increase. It's possible the BIOS itself has a hard coded limit. There may be some workaround but that was as far as I got on that.