LameNES (NES emulator) for 3DO ?

Tools and projects
Post Reply
User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

LameNES (NES emulator) for 3DO ?

Post by blabla » Sun May 10, 2015 11:07 pm

I'm mainly talking to coders who hang out sometimes here so i'll be a bit technical.

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;
And "bufp = (Uint32 *)screen->pixels..etc" can be translated to this :

Code: Select all

SetPixel(screen,x,y, R, G, B);
We will end up with this function to handle all the drawing on-screen :

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 also uses SDL for input but that too can be easily replaced.
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 ?
Last edited by blabla on Sat May 23, 2015 5:39 am, edited 1 time in total.

User avatar
BryWI
3DO ZERO USER
Posts: 1334
Joined: Sat Feb 03, 2007 8:16 pm
Location: Kenosha, WI, USA
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by BryWI » Sat May 16, 2015 2:33 am

I believe a Russian programmer ported an NES emulator to the 3DO. I do not know how well it ran though. I am not sure if it was ever released.

Versus

Re: LameNES (NES emulator) for 3DO ?

Post by Versus » Mon May 18, 2015 10:11 pm

Russian NES emulator was never released. :( It was completed in approx. 80%, but canceled.
Hope someone can make another one.

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Fri May 22, 2015 8:28 pm

Versus wrote:Russian NES emulator was never released. :( It was completed in approx. 80%, but canceled.
Hope someone can make another one.
Notabigsuprise
It can be done, i simply need to know how to draw a pixel on screen.
I wish Saffron would chime in here...

User avatar
Aer Fixus
3DO ZERO USER
Posts: 40
Joined: Thu Aug 21, 2014 10:59 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Aer Fixus » Sat May 23, 2015 1:01 am

blabla wrote:
Versus wrote:Russian NES emulator was never released. :( It was completed in approx. 80%, but canceled.
Hope someone can make another one.
Notabigsuprise
It can be done, i simply need to know how to draw a pixel on screen.
I wish Saffron would chime in here...
A while back, I was looking into that. There's a function for it in the documentation. I never tried it, but it said something about it being too slow to be used for anything substantial.

Edit: directly from the documentation (01gpr073.html in the "3DO Online Developer Documentation")
Synopsis
Err WritePixel (Item bitmapItem,GrafCon *gc,Coord x, Coord y)

Description
This call writes a pixel to the display of the specified bitmap. The pixel is rendered in the foreground color of the GrafCon structure. It is rendered on the column and row specified by the x and y arguments respectively.

Notes
The current implementation of this routine is very slow. This will change in future releases.

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sat May 23, 2015 5:51 am

A while back, I was looking into that. There's a function for it in the documentation. I never tried it, but it said something about it being too slow to be used for anything substantial.
Edit: directly from the documentation (01gpr073.html in the "3DO Online Developer Documentation")
Thanks for that, i saw it in the headers too.
I found a function almost doing what i need inside of Topper's library but using fillRect instead.

EDIT: I'm working on it, it's on github now.
https://github.com/gameblabla/lamenes-3do

It builds but it does not work right now...
fopen does not work as expected and it returns 1. (which means it failed to load the NES ROM)
Perhaps i could try to embed it inside the executable but for now,
i'll try something easier like a CHIP8 emulator.

EDIT2: So i ported the CHIP-8 emulator too but like LameNES, it doesn't work.
I suspected fopen to be the problem but now i can confirm it.
It seems like fopen only works on development systems,
even though it is used by some examples.
Or maybe fopen only works with the official SDK...
So instead, i will try to embed the ROMs inside the executable.

Unfortunely, this means that if you need to change the ROMs,
you will need a compiler.

Versus

Re: LameNES (NES emulator) for 3DO ?

Post by Versus » Sun May 24, 2015 10:27 pm

It's the only way to make it work?

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sun May 24, 2015 10:53 pm

Versus wrote:It's the only way to make it work?
For now, yes.
If someone else has the official SDK installed then they can give it a try.
I don't know why it doesn't work : Maybe it does and i'm doing something wrong.

Versus

Re: LameNES (NES emulator) for 3DO ?

Post by Versus » Sun May 24, 2015 11:31 pm

This function (fopen) isn't from official SDK, right?

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Mon May 25, 2015 12:37 am

This function (fopen) isn't from official SDK, right?
Yes, it's from the SDK.
What i'm saying though is that maybe fopen works when compiled wth the official SDK. (Mac OS, SDK and all that crap)
I'm using a different compiler but it's also possible i'm using older or new libraries that broke the fopen function.
Don't know really

Versus

Re: LameNES (NES emulator) for 3DO ?

Post by Versus » Mon May 25, 2015 9:50 am

I'll try to remake your makefile to MacOS SDK format and compile the source.

MathUser
3DO ZERO USER
Posts: 34
Joined: Mon Mar 23, 2015 6:25 pm

Re: LameNES (NES emulator) for 3DO ?

Post by MathUser » Tue Nov 03, 2015 9:26 pm

I too hope Saffron can comment.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Wed Mar 30, 2016 4:30 pm

Sorry, didn't see this thread until now.

In order to open a file, you must use File Folio calls, items and I/O system. You can get info in the official SDK documentation.

I've written an example but consider it pseudo code since it's written from memory and I can't try to compile it:

Code: Select all

// Read file from path and write it to data buffer.
int32 ReadFile(char *path, char *data)
{
	Item fileItem;
	Item ioreq;
	IOInfo ioInfo;
	FileStatus fStat;
	int32 err;
	
	fileItem = OpenDiskFile(path); 
	if (fileItem < 0)
	{
		// Handle error.
		return fileItem;
	}

	// Get file status (in order to obtain file size).
	memset(&ioInfo,0,sizeof(IOInfo));
	ioInfo.ioi_Command = CMD_STATUS;
	ioInfo.ioi_Recv.iob_Buffer = &fStat;
	ioInfo.ioi_Recv.iob_Len = sizeof(FileStatus);

	// Do quick I/O.
	err = DoIO(ioreq, &ioInfo);	
	if (err>=0) 
	{	
		// Read data from a file.
		memset(&ioInfo,0,sizeof(IOInfo));
		ioInfo.ioi_Command = CMD_READ;
		ioInfo.ioi_Recv.iob_Buffer = dataAddress;
		ioInfo.ioi_Recv.iob_Len = fStat.fs_ByteCount;
		
		// Do quick I/O.
		err = DoIO(ioreq, &ioInfo);
	}
	
	// Cleaning.
	Deletereqpeq(ioreq);
	CloseDiskFile(fileItem);
	
	// Return err.
	return err;
}
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Wed Mar 30, 2016 8:14 pm

Yo, Saffron !
First of all, thanks for the help.
I have one question though...

How am i supposed to use your readfile command ?
To explain things a bit, using FILE, i'm loading the ROM like this :

Code: Select all

FILE* fp;
fp = fopen("rom.ch8", "rb");
If i understand your code well, it should be like this :

Code: Select all

int32 fp, error_file;
error_file = ReadFile("rom.ch8", fp);
Is this right ? Because i'm not too sure how it's supposed to return the content to the data buffer.
In fact, the data variable isn't used at all from what i gather.

So maybe it should be more like this :

Code: Select all

int32 ReadFile(char *path)
{
   Item fileItem;
   Item ioreq;
   IOInfo ioInfo;
   FileStatus fStat;
   int32 err;
   
   fileItem = OpenDiskFile(path);
   if (fileItem < 0)
   {
      // Handle error.
      return fileItem;
   }

   // Get file status (in order to obtain file size).
   memset(&ioInfo,0,sizeof(IOInfo));
   ioInfo.ioi_Command = CMD_STATUS;
   ioInfo.ioi_Recv.iob_Buffer = &fStat;
   ioInfo.ioi_Recv.iob_Len = sizeof(FileStatus);

   // Do quick I/O.
   err = DoIO(ioreq, &ioInfo);   
   if (err>=0)
   {   
      // Read data from a file.
      memset(&ioInfo,0,sizeof(IOInfo));
      ioInfo.ioi_Command = CMD_READ;
      ioInfo.ioi_Recv.iob_Buffer = dataAddress;
      ioInfo.ioi_Recv.iob_Len = fStat.fs_ByteCount;
      
      // Do quick I/O.
      err = DoIO(ioreq, &ioInfo);
   }
   
   // Cleaning.
   Deletereqpeq(ioreq);
   CloseDiskFile(fileItem);
   
   // Return err.
   return err;
}

Code: Select all

int32 fp;
fp = ReadFile("rom.ch8");
It still doesn't seem correct though... I guess it's really pseudo code.
(It doesn't help the fact that FILE isn't working at all and it's just here to misled us)

Would probably be best if we reimplement FILE using the native file functions, that would less of a pain in the ass.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Thu Mar 31, 2016 8:54 am

I've realized that I missed to initialize the IO item, I've added the line, also data variable was called dataAddress inside the function code :P

Anyway as I said this was more a "proof of concept" of how to do it rather than a substitute of fopen or a function that you could literary paste in your code.

This weekend I can download the lame nes github project and create a working function if you want (If I get some time to configure it and compile all :mrgreen:).

The "char* data" is a data pointer which should be already allocated so the IO call can write the bytes from the file to this buffer address.

BTW the 3DO ARM60 is very weak so I'm not sure what speed can be achieved using lame nes. Also, the 3DO is intended to work with cel sprites, writing pixels directly is going to be very slow (that was the problem with 3DO Doom, for example). Still, as a hobbyist/learning project, I think it's cool :wink:

Code: Select all

// Read file from path and write it to data buffer.
int32 ReadFile(char *path, char *data)
{
   Item fileItem;
   Item ioreqItem;
   IOInfo ioInfo;
   FileStatus fStat;
   int32 err;
   
   fileItem = OpenDiskFile(path);
   if (fileItem < 0)
   {
      // Handle error.
      return fileItem;
   }

   // Initialize I/O.
   ioreqItem = CreateIOReq(NULL, 0, fileItem, 0);

   // Get file status (in order to obtain file size).
   memset(&ioInfo,0,sizeof(IOInfo));
   ioInfo.ioi_Command = CMD_STATUS;
   ioInfo.ioi_Recv.iob_Buffer = &fStat;
   ioInfo.ioi_Recv.iob_Len = sizeof(FileStatus);

   // Do quick I/O.
   err = DoIO(ioreqItem, &ioInfo);   
   if (err>=0)
   {   
      // Read data from a file.
      memset(&ioInfo,0,sizeof(IOInfo));
      ioInfo.ioi_Command = CMD_READ;
      ioInfo.ioi_Recv.iob_Buffer = data;
      ioInfo.ioi_Recv.iob_Len = fStat.fs_ByteCount;
      
      // Do quick I/O.
      err = DoIO(ioreqItem, &ioInfo);
   }
   
   // Cleaning.
   Deletereqpeq(ioreqItem);
   CloseDiskFile(fileItem);
   
   // Return err.
   return err;
}
You can't take the sky from me

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Fri Apr 01, 2016 1:12 pm

I've taken a quick look at lamenes sourcecode and the way it uses fopen I think you could just use 3DO's streaming file functions:

Stream *OpenDiskStream( char *theName, int32 bSize )
int32 ReadDiskStream( Stream *theStream, char *buffer,int32 nBytes )
int32 SeekDiskStream( Stream *theStream, int32 offset,enum SeekOrigin whence )

They're more easy to dealt with and from what I've seen you don't need more to read the rom file. The official SDK help contains all the info you need to use them, they are similar to fopen, fread and fseek (and the returned value of fseek will serve as ftell).

http://hackipedia.org/Platform/3D0/html ... pg003.html

Hope it helps!
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sat Apr 02, 2016 10:50 pm

Saffron wrote: Stream *OpenDiskStream( char *theName, int32 bSize )
int32 ReadDiskStream( Stream *theStream, char *buffer,int32 nBytes )
int32 SeekDiskStream( Stream *theStream, int32 offset,enum SeekOrigin whence )
...
Hope it helps!
Thanks for the help !
I gave those a try with my Chip-8 emulator.
After a bit of fiddling, i was finally able to get it to work properly.
Here are the changes i did.

I still have to give LameNES a try though but now that i know that those functions are working,
it should not be a problem now.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Sat Apr 02, 2016 11:24 pm

edit: I've compiled your code and added the file streaming for 3DO and now it loads the rom.

I've noticed the code uses printf and that crashes the program, so you should comment those lines.

Now the problem is that looks like it's not rendering properly, but at least is executing the rom.
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sun Apr 03, 2016 10:34 am

Saffron wrote:edit: I've compiled your code and added the file streaming for 3DO and now it loads the rom.

I've noticed the code uses printf and that crashes the program, so you should comment those lines.

Now the problem is that looks like it's not rendering properly, but at least is executing the rom.
That was fast, thanks for the help !
Yes, it does not seem to render properly but this same function works with my chip8 so it should work properly...
Not sure if the emulator is really slow or if it's a problem with the rendering function.
According to my calculations, LameNES should be more than 30 times slower than normal.

Perhaps we should give SMS_Plus a try instead ?
It does not take a lot of ressources and it does not have many dependencies either.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Sun Apr 03, 2016 1:24 pm

I've made some progress, but the rendering code in french doesn't help :lol:

Still, things look better now:

Image
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sun Apr 03, 2016 4:26 pm

Saffron wrote:I've made some progress, but the rendering code in french doesn't help :lol:

Still, things look better now:

Image
!!!

Nice job !
So... what was the problem ?
The file loading code or the rendering ?

btw, i can try to translate some of the comments in french if you really need it. (they aren't mine but topper's one)

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Sun Apr 03, 2016 5:12 pm

And another one :mrgreen:

Image

There was two problems:

First, the include order must be fixed, some 3DO definitions are being override by the default compiler library definitions, so for example the 3DO seek enum was not being used, I switched to use the corresponding numerical numbers instead of SEEK_END, etc.

Second, the drawing wasn't done right. I removed the imageFondChargement() function from the init_SDL, and update_screen() only calls affichageRendu(), which already calls affichageMiseAJour() in the correct order.

The current rendering code could be greatly optimized. but still I'm not sure if it will be enough for lamenes.
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Sun Apr 03, 2016 7:05 pm

There was two problems:

First, the include order must be fixed, some 3DO definitions are being override by the default compiler library definitions, so for example the 3DO seek enum was not being used, I switched to use the corresponding numerical numbers instead of SEEK_END, etc.

Second, the drawing wasn't done right. I removed the imageFondChargement() function from the init_SDL, and update_screen() only calls affichageRendu(), which already calls affichageMiseAJour() in the correct order.

The current rendering code could be greatly optimized. but still I'm not sure if it will be enough for lamenes.
It seems like the problem was both the loading and the rendering...
But now, i can get it to work !

Many thanks Saffron for the help !
I'm preparing a new release and i'll announce it here.

As for optimising, there's still a lot to do.
The rendering is currently the bottleneck as it is very inefficient, especially with large redraws.
If we could draw directly to a buffer or something, that would be great.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Sun Apr 03, 2016 11:23 pm

I've noticed the color table is messed up :P

About speed, currently the CPU_execute() call is taking too much time from the CPU, even if the rendering was super fast, there's no way for the poor 3DO cpu to emulate the nes cpu in enough time.

lamenes does a simple switch statement, so we can try with a jumptable or other tricks, but even then... I think it's too much for the cpu.
You can't take the sky from me

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by blabla » Mon Apr 04, 2016 6:37 am

Saffron wrote:I've noticed the color table is messed up :P

About speed, currently the CPU_execute() call is taking too much time from the CPU, even if the rendering was super fast, there's no way for the poor 3DO cpu to emulate the nes cpu in enough time.

lamenes does a simple switch statement, so we can try with a jumptable or other tricks, but even then... I think it's too much for the cpu.
I have noticed that colors are messed up too.
Probably due to the 3DO using a 15-bit format...

But yeah, it's going to be difficult to optimise LameNES without completely refactoring the emulator...
Except that i found another NES emulator !

It's called LiteNES and their authors ensured it is very portable.
(only 2 small files, hal.c and main.c need to be modified)
It can be found here.

I have already ported hal.c :

Code: Select all

#include <types.h>
#include <graphics.h>
#include <getvideoinfo.h>
#include <displayutils.h>
#include <mem.h>
#include <umemory.h>
#include <list.h>
#include <event.h>

#include "hal.h"
#include "fce.h"
#include "common.h"

#include "3DO/GestionAffichage.h"
#include "3DO/GestionSprites.h"
#include "3DO/GestionTextes.h"

unsigned short color_map[64];
  
/* Wait until next allegro timer event is fired. */
void wait_for_frame()
{
}

/* Set background color. RGB value of c is defined in fce.h */
void nes_set_bg_color(int c)
{
	affichageCouleurUnie(color_map[c]);
}

/* Flush the pixel buffer */
void nes_flush_buf(PixelBuf *buf) 
{
	int i;
 	for (i = 0; i < buf->size; i ++) 
 	{
		Pixel *p = &buf->buf[i];
		int x = p->x, y = p->y;
		fill_rectangle(x, y, 1, palette[p->c].r, palette[p->c].g, palette[p->c].b);
	}
}

/* Initialization:
   (1) start a 1/FPS Hz timer. 
   (2) register fce_timer handle on each timer event */
void nes_hal_init()
{
	affichageInitialisation();
	InitializeControlPads();
	affichageRendu();
}

/* Update screen at FPS rate by allegro's drawing function. 
   Timer ensures this function is called FPS times a second. */
void nes_flip_display()
{
	int i;
	affichageRendu();
	
    for (i = 0; i < 64; i ++) 
    {
        pal color = palette[i];
        color_map[i] = MakeRGB15(color.r, color.g, color.b);
    }
}

/* Query a button's state.
   Returns 1 if button #b is pressed. */
int nes_key_state(int b)
{
	uint32	gButtons;
	DoControlPad(1, &gButtons, (ControlUp | ControlDown | ControlLeft | ControlRight));
		
    switch (b)
    {
        case 0: // On / Off
            return 1;
        case 1: // A
            return gButtons & ControlA;
        case 2: // B
            return gButtons & ControlB
        case 3: // SELECT
            return gButtons & ControlC;
        case 4: // START
            return gButtons & ControlStart;
        case 5: // UP
            return gButtons & ControlUp;
        case 6: // DOWN
            return gButtons & ControlDown;
        case 7: // LEFT
            return gButtons & ControlLeft;
        case 8: // RIGHT
            return gButtons & ControlRight;
        default:
            return 1;
	}
}
It's faster than LameNES btw and it's much smaller too.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Mon Apr 04, 2016 12:32 pm

That emulator looks better but still I really doubt their 6502 emulation would be fast enough for 3DO.

We're talking about an ARM60 13MHz with no cache that is shared with the OS and even stalled at times due to the DMA architecture (although I'm not sure how much time is lost when you don't have any cel or sound to process, surely it still takes some time).
You can't take the sky from me

User avatar
BryWI
3DO ZERO USER
Posts: 1334
Joined: Sat Feb 03, 2007 8:16 pm
Location: Kenosha, WI, USA
Contact:

Re: LameNES (NES emulator) for 3DO ?

Post by BryWI » Thu Apr 21, 2016 12:43 pm

I don't know if this is going to help you at all but according to that screen shot of mario above, the emulator is over rendering from the nametable. It is rendering the first column of the $2400 nametable along with the whole $2000 name table on the start up screen. I don't know if that would slow down the emulator that much though. Btw, yeah that colors are a little messed up, but is it because of the palette the emulator is using or are the palette writes to $3F00 in the PPU working correctly? It looks like most colors are close except that hot pink! Just something to look at. Sorry if this is stuff you already looked into. I just have been messing with writing NES homebrew and learned the NES 6502 assembly opcodes recently. Been using a debugger and a hex editor to write some simple NES code. ha! Hacking NES games and creating codes has become much easier now.

User avatar
Saffron
3DO ZERO USER
Posts: 42
Joined: Wed Feb 11, 2015 6:35 pm

Re: LameNES (NES emulator) for 3DO ?

Post by Saffron » Fri Apr 22, 2016 10:00 am

The github code is highly unoptimized, but I tried executing just the opcodes with no rendering at all and is still too slow, surely the 6502 core emulation can be done much better than the lamenes code, but I doubt it will be fast enough for the 3DO to render the frames at real time.

And yeah, the 6502 assembly is really fun to code for :D (Along with the Z80!).
You can't take the sky from me

Post Reply