Hi.
I'm currently attempting to implement the PPU unit and was hoping that I could get some feedback on the method I am planning to attempt.
I have a CPU which executes for a certain number of cycles and then deals with any cyclic tasks that need dealing with, before beginning the execution of instructions again.
After reading posts on this board, it seems like it might be a good idea to have it so that if enough CPU cycles have passed for a scanline to be output, get the PPU to build up the next scanline and output it to the display?
If this method worked out ok, I guess for background rendering i'd need to
* grab all the pattern table information relevant to the current line, convert the layers obtained into 2 bit color form
* grab the colour values for the relevant line from the attribute table
* Output this to the display using the relevant palette entries.
For sprite rendering I think it'd work in a similar way, substituting OAM for the attribute table.
Also, i've seen people talking about scanline rendering and tile rendering. Am I right that scanline rendering is the method I talked about above and tile based rendering is the method where graphics are output to the screen a tile at a time?
If this is the case, i'm guessing that the scanline approach will result in more accurate emulation due to register and memory values changing between lines etc?
Sorry if this seems a bit unreadable. Hopefully it makes some sense.
Thank you very much.
I'm currently attempting to implement the PPU unit and was hoping that I could get some feedback on the method I am planning to attempt.
I have a CPU which executes for a certain number of cycles and then deals with any cyclic tasks that need dealing with, before beginning the execution of instructions again.
After reading posts on this board, it seems like it might be a good idea to have it so that if enough CPU cycles have passed for a scanline to be output, get the PPU to build up the next scanline and output it to the display?
If this method worked out ok, I guess for background rendering i'd need to
* grab all the pattern table information relevant to the current line, convert the layers obtained into 2 bit color form
* grab the colour values for the relevant line from the attribute table
* Output this to the display using the relevant palette entries.
For sprite rendering I think it'd work in a similar way, substituting OAM for the attribute table.
Also, i've seen people talking about scanline rendering and tile rendering. Am I right that scanline rendering is the method I talked about above and tile based rendering is the method where graphics are output to the screen a tile at a time?
If this is the case, i'm guessing that the scanline approach will result in more accurate emulation due to register and memory values changing between lines etc?
Sorry if this seems a bit unreadable. Hopefully it makes some sense.
Thank you very much.