NES emulation


Staff member
Does someone is interested on a port of a NES emu on Saturn ? I'm not sure if it's worth to take a little time to work on. I'd like to see some emu running on a saturn but I don't know C portable emu easy to put(and also fast) on saturn.

I only had a look on FCE 0.1 sources but FCE++ 0.1 (I didn't find FCE 0.1 for PC), wasn't able to run a free ROM displaying the NES color palette.
me, i would love to start on a project. it gives us both more experience, it be nice. it wouldnt be much emulation problems for the nes to be on the saturn.
I dunno. It wasn't doable on PSX last I checked. One emulator managed to run games but it ran them at about 1/2 notmal speed.

Rather than porting code from another emu which could potentially be way slower on a Saturn, it might be better to start fromt he ground-up using the other code as a reference for the simpler things like mapper emulation.
DBoy, you're right... i think we should! you know, mix all the good stuff from one emulator to another one....

i think it's a great idea!
I think designing it from the ground-up for the Saturn is the way to go because then it's designed FOR the Saturn. I don't know much about Saturn programming but I imagine like every other machine it has it hardware quirks and optimizations that can be taken advantage of only on that machine. I mean, it doesn't make sense to port a clunky C based 65c02 emulation core to the Saturn when you could write one in SH-2 asm to begin with.

Though writing a lot of stuff like that would be incredibly time consuming. I guess it's a matter of how much time you have available to put into the project and what your end goals are -- just running a NES game or having it run like it does on a real NES.

I imagine a product like this could produce a lot of good documentation and code for future Saturn development though.
Your Right Again! except i dont know ASM, i know C! hehehe... yes it would be better to code a nice own emulator but unless if the team really is into it... (it can be done!) maybe no sound but hey thats ok. im real interested in doing this.
I'm not becomming part of this group, but the Stardust C core has a 65c02 interpreter in good condition, or at least partially usable (the 65c816 behaves like a 65c02 when the E flag is set, and I emulated that as well)

If you converted all the funcions into assembly macros it _might_ be a solid base to work on. Or at least something
TakaIsSilly, it would be a great idea but you told me you had also fast display function using tile rendering mode of the saturn, it would help too.
Oh, sorry. I actually have your e-mail waiting for a reply right in front of me, i never ended up compiling your code on the modern GCC. I don't know mutch NES hardware, but I don't belive the routine works correctly, since the tilemap is very diferent...

(sorry for this off-topic)

SMS tile map is composed in this format:

bit 15: unused

14: unused

13: unused

12: when set, tile is displayed in front of sprites

11: when set, display tile using sprite palette rather than tile palette

10: when set, flip tile vertically

9: when set, flip tile horizontally

0-8: tile definition number to use (0..511)

this table is very simmilar to the one Saturn uses so it can be quickly converted. We just read VDP Register 2 for the location and make a few byte operations. This is consistent with the GFX.c from Stardust. SMS also has a 4-bit bitmap plane format for tiles, that can be decoded like the SNES tiles. From what I just read in some docs I checked, the NES PPU is the bastard of all video chips and I can't find simmilarities between it and the Saturn VDP.
thanks, I'll try to understand your information and use them for the SMS emu.

For nescphp and AntiPasta, I''m also interested in making a team. I've started ROM reading using FCE 0.1 functions but I think there are some bugs. I will install Visual Studio to compare behavior and see debug informations easillyon PC version to correct my problems.
Heh, I'll get some NES emulator source and i'll start on the Controller Porting stuff

(Nes Controller -> saturn controller)

i'll make it... controller.c & controller.h

Also i got a problem that is burning a hole in my brain

#include "sgl.h"

int ss_main(void)



slPrint("Sega Saturn",slLocate(9,2));


Is this Correct? the compiler (MAKE.EXE) says + compiles good then i make a Iso using CDBuild.exe & strip.exe + some wierd ass Ip.Bin (i use SatCcC*.exe to change it to U) then i use SSF (it's set to U) then It loads good, shows the black sega logo then it gives me a SH error..... i cant test nothing because it gives me errors (satourne gives Sh Op Code error!) i dont know whats wrong.

VBT: i would love to be on the team (the legendary Nes2Sat Team)
Originally posted by nescphp@Feb. 07 2003, 12:30 pm


Is this Correct? the compiler (MAKE.EXE) says + compiles good then i make a Iso using CDBuild.exe & strip.exe + some wierd ass Ip.Bin (i use SatCcC*.exe to change it to U) then i use SSF (it's set to U) then It loads good, shows the black sega logo then it gives me a SH error..... i cant test nothing because it gives me errors (satourne gives Sh Op Code error!) i dont know whats wrong.

It might be a long shot, but have you tried testing on Giri Giri?
Originally posted by nescphp@Feb. 06 2003, 7:30 pm

#include "sgl.h"

int ss_main(void)



slPrint("Sega Saturn",slLocate(9,2));


I bet this will work:

#include "sgl.h"

int ss_main(void){


 slPrint("Sega Saturn",slLocate(9,2));





Otherwise, the code will keep running after the slPrint instruction into the big memory unknown.

As for vbt, I'll send you some real code, based on the old SMS emulador... as soon as I can dig out that emu source from the stack of CD's ^^;
Sounds like a great idea! I know I wouldnt be able to help with the programming
but if there is anything else you need, like some graphical gui or whatever, I would gladly help!
hehe, Thanks Taka! but i need some help on how the SATURN DIR should be formed, the files and stuff... maybe that will help? if so can anyone show me how my Saturn SDK should be, like Dirs.... and stuff? ehh...
How Should my Compiler SATURN dir be set? heres my setenv.bat:

REM sh-hms







REM Set TMPDIR to point to a ramdisk if you have one



How Do I need 2 set it up???

also, It gives me this message:


gcc main.c -O2 -m2 -g -c -I../../INCLUDE/ -o main.o

gcc -m2 -L../../LIB/ -Xlinker -T../../SAMPLE/COMMON//sl.lnk -Xlinker -Map -Xlink

er -Xlinker -e -Xlinker ___Start -nostartfiles ../../SAMPLE/COMMON/cinit.

o ../../LIB/sglarea.o main.o ../../LIB/sega_sys.a -lcd -lsgl -o sl.coff

objcopy -O binary sl.coff sl.bin

Compiles Good but I dont know if it does it right.

I then use MK.BAT to make my ISO....

i used the Ip.bin Off the VCD TOOLS Folder (3rd Party)

then i use SATCONV tho change the CODE to U.

Then It loads Fine, Then It Gives me a Japanese ERror on SFF...

I also did a little test if my CD TOOLS are OK and they are, i copied a 0.bin off cotton boomerang 2

and then created a ISO... ran it on my SSF and it worked! there is something wrong with my compiler for sure!

i know my test Code Works! I also tried compiling a example, and i still got the SH error..... :/

could ya please help me by showing me like how its suppose to be setup? maybe setup a FTP so i can see how to set yours up

lol i know its stupid but i need some help on it. also how will i bev able to code in ASM + setup my compiler?

wow, i am new around here and i should keep watching this thread. sounds very interesting. It would be nice to have a NES emulator on saturn.. then i can give my dreamcast a break.