So i was looking for NES emulators to port to Ti Nspire and then i stumbled into this, LameNES.
LameNES is a simple NES emulator that can emulate Super Mario Bros along with other games. (with some graphical glitches)
What's special about LameNES is that it doesn't require lots of dependencies at all.
This allowed me to easily port it the TI nspire and even made me wondered if I (or someone else) couldn't port it to the 3DO.
It is using SDL for graphics stuff and only one function is needed to draw everything on screen. EVERYTHING
Code: Select all
Uint8 R = palette[nescolor].r;
Uint8 G = palette[nescolor].g;
Uint8 B = palette[nescolor].b;
Uint32 *bufp;
bufp = (Uint32 *)screen->pixels + y*screen->pitch/4 + x;
*bufp = color;
Code: Select all
SetPixel(screen,x,y, R, G, B);
Code: Select all
void draw_pixel(unsigned int x, unsigned int y, int nescolor)
{
Uint8 R = palette[nescolor].r;
Uint8 G = palette[nescolor].g;
Uint8 B = palette[nescolor].b;
SetPixel(screen,x,y, R, G, B);
}
It's ANSI C compliant too so the compiler will probably not complain.
So for a minimal build, LameNES would require :
- fopen and fclose support (It's there)
- malloc (It's there too)
- Init the screen and make a function to draw a pixel on screen.
And that's it.
It will most likely be very slow (it's interpreted) but i think that would be a nice experimentation.
Ultimately, if you need some speed, we can borrow some assembly code from 3DNES. (LameNES but ported to the 3DS)
If i'm not mistaken, the 3DS and the 3DO are in fact using the same architecture (ARMv6), only that the 3DS has some additional extensions.
Do you think it can be done ?