easiest emulator to modify?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Petruza
Posts: 311
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

easiest emulator to modify?

Post by Petruza »

Hi, I'd like to make some tools to debug and reverse-engineer the NES.
So I don't want to have a hard time trying to understand and even compile a complex emulator.
So in your experience, what emulator would you think is the easiest one to have a look at its source, understand it and compile it with some modifications?
It doesn't matter if its emulation isn't 100% accurate, as long as works fine.
Using SDL is a plus, as I'm already familiar with it.
Also an emulator whose source code doesn't have to be modified in order to run on windows would be really nice.

Thanks! :D
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

If you want to see source code to better understand how the NES works, and troubleshoot issues in your own emulator, look at the source code to Nintendulator.
Its PPU code is a great reference to what events happen on which PPU cycle.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Petruza
Posts: 311
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

Post by Petruza »

Well, I don't just want to understand how the NES works, yes that's the main reason, but actually I want to be able to compile and run the emulator and try to make some changes to its source and see them running.
I've seen really cryptic code in many open source projects.

Thanks, I'll give it a try!
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

What kind of modifications are you looking to do?
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Hardest emulator to modify: FCEU :)
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Petruza
Posts: 311
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

Post by Petruza »

MottZilla wrote:What kind of modifications are you looking to do?
Some that come to mind now:
- sprite inspector: specify a sprite index so that the emulator draws a colored squate around it so you can identify it.
The idea that motivated this is based on Pacify3D, which emulates the arcade port of Pacman, rendering the characters in 3D while the emulation runs.
I'd like to make an emulator that can recognize sprites and render them in a 3D space, witrh predefined 3D models of course. So you can make a file which specifies 3d models and textures to certain sprite indexes, or certain pixel patterns, or palettes, or whatever.

I've debugged some games, and noted that, for example, Super Mario Bros has static CHR ( most likely ROM ) while Kirby's adventure modifies some tiles in run-time to make the wave effect in the water, and I wonder if mario or kirby are always the same sprites, say 0,1,2 and 3, and they vary their tiles throughout the game, or not...

So far that's the only feature I would like to have in order to get a better idea of how commercial games handle sprites, but I'm sure I'll think of some other usefull features as well as you can sugest some to me :wink:
Dwedit wrote:Hardest emulator to modify: FCEU :)
I kinda figuered that out :D
Post Reply