Well, I've new questions...
1.- A general question. Let's say the PPU renders a frame 60 times per second (60Hz). Then, in an emulator: the CPU runs the equivalent cycles, then the PPU renders a frame, then other tasks are done, then CPU runs the equivalent cycles, then... and so on. Is it right? If so, a problem comes to mind. In a real NES the CPU is running while the PPU renders a frame (to process the frame) and also between a frame and the next one, it never stops running. Then, how many cycles have to be executed in a frame render based emulator? I'm a bit lost with it.. Is it there any kind of interrupt implicated?
2.- Another question. A NMI is signalled by the PPU after the last rendered scanline (if 8D of $2000 is 1). The question is: is it signalled after the full Name Table has been rendered or after the last VISIBLE scanline has been rendered? I supose the first one is the right answer, cause it means that everything has been processed, both the virtual and the visible screen.
3.- And last questions. Are the 256 SPR-RAM bytes independent of PPU's $4000 bytes? If so, how does the game set its contents? Via DMA maybe? Then, which are the initial values of the Name Tables, the Attribute Tables and the SPR-RAM? What happens in the first rendered frame? (I supose first frames may look black cause there's nothing to render...) How should start an emulator: rendering the first frame or running CPU cycles? (I supose it should run CPU cycles, cause at the begining there's nothing to render...).
I think I would be able to aswer all these questions, but I prefer asking to more experienced programmers.
Thanks in advance and excuse me for being so ignorant.