post on writing to PPU during rendering

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
dougeff
Posts: 2675
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

post on writing to PPU during rendering

Post by dougeff » Wed Mar 21, 2018 11:43 am

Thought I would share my testing on writing to the PPU during rendering.

https://nesdoug.com/2018/03/21/ppu-writ ... rendering/

I wanted to try to change a palette color mid-frame. I think I did ok, with the exception of noticable glitches at the exact write to the palette.

Let me know if I've made any technical errors, or ways I could improve this code. Thanks.

(source code is asm for asm6).
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
tokumaru
Posts: 11648
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: post on writing to PPU during rendering

Post by tokumaru » Wed Mar 21, 2018 11:53 am

I didn't see you mention anything about sprites... Maybe you should include them in the test, since they're known to brave erratically when rendering is disabled mid-screen.

That being said, mid-screen palette changes are possible, but you need a "gap" of one or more blank scanlines (no background or sprites) if you want to do it without glitches, because it's just too much stuff to do in a single hblank.
Last edited by tokumaru on Wed Mar 21, 2018 11:57 am, edited 1 time in total.

User avatar
dougeff
Posts: 2675
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: post on writing to PPU during rendering

Post by dougeff » Wed Mar 21, 2018 11:55 am

Oh, I forgot about that. Thanks for the input.
nesdoug.com -- blog/tutorial on programming for the NES

Post Reply