Page 1 of 1

Re: When turning off rendering would not work?

Posted: Sun Dec 09, 2018 1:47 pm
by pubby
Don't think anyone can help much without seeing code and/or an example ROM.

Anyway, changing the palette outside of VBLANK causes colored lines to appear on the screen. Search the wiki for more info. Even with rendering off, you have to change the palette inside VBLANK.

Re: When turning off rendering would not work?

Posted: Sun Dec 09, 2018 1:59 pm
by dougeff
Set a breakpoint for writes to 2001. Make sure the code is doing what you think.

Re: When turning off rendering would not work?

Posted: Sun Dec 09, 2018 5:07 pm
by tokumaru
The exact time at which you disable and enable rendering matters too: if you do it mid-screen, you'll get half-rendered frames on the screen, which aren't nice. Better wait for vblank in those cases too.

Re: When turning off rendering would not work?

Posted: Mon Dec 10, 2018 10:57 am
by dougeff
Load the palette first, then the nametable. Then you don't have to wait for a 2nd v-blank.

Re: When turning off rendering would not work?

Posted: Mon Dec 10, 2018 1:15 pm
by Sumez
Unless you are doing a quick scene flip, like exiting the edge of a screen to enter another, waiting for an extra vblank isn't really expensive. A couple of frames is practically no wait to anyone playing the game. :)

Re: When turning off rendering would not work?

Posted: Mon Dec 10, 2018 1:56 pm
by lidnariq
Battle Kid took some ribbing for being a flip-screen platformer that blanks the screen for 5-ish vblanks between each screen. It just looks a little sloppy.

On the other hand, it might count as the first widespread commercial modern homebrew, and there's a lot to be said for completing a project at all.

Re: When turning off rendering would not work?

Posted: Mon Dec 10, 2018 4:15 pm
by tokumaru
Flipping screens in action games can be a little annoying in some situations. I remember a couple of screens in Battle Kid where you had to jump from platforms near the top of the screen and the successive flashes caused by switching to the screen above and quickly falling back multiple times were a little hard on the eyes. Not only that, but the enemies kept resetting their positions on every screen switch, which was disorienting.

I don't know if there's a better way to handle that on the NES... I guess you could "pause and fade" to eliminate the flashing, but then the slowness of moving around gets annoying, specially if you want to reach a distant place quickly.