I'm trying to understand a little better how interpreting the NES works and i'm looking for an emulator with a clean and easy to understand code. Most sources that i found are full of hacks and whistles. I'm looking for something quite simple. Do you guys recommend anything? It doesn't have to be perfect or anything, just basic emulation that works!
No matter what emulator you look at it is going to be pretty complex. The best way to understand it is to write you own. The basic operation of emulation can be this.
Write a CPU Core for the 65xx variant in the NES. Basically a 6502 but no decimal mode. Create your memory handlers and implement some sort of PPU, then alternate running the CPU and PPU.
It would be more helpful if you said what specifically you are looking to do.
Emulators are inherently complicated, so I doubt you'll find any decent emulators coded the way you you're looking for. There might be some bare bones emulator out there coded in a simple way, probably without sound, without mappers, doing tile-based rendering at best, and complete lack of timing accuracy, but would you really find such a program useful in any way?
When you emulate a machine at such a low level, there are so many little things to worry about... different things that have to run in parallel and can interrupt each other, functions that are triggered by accessing specific memory areas, the huge number of different ways to interface with cartridges (i.e. mappers)... all of that causes emulators to be hard to understand, and there's no way to avoid that.
DRRNES is an NES emulator made in QBASIC.
http://www.zophar.net/nes/drr-nes.html
Maybe simple enough to get a general idea?
I would say, if you want to learn how emulators work, start from
SIDE and
PIE. They aren't NES emulators, but they'll show you basic things that will help you with understanding NES emulators.