$4014 switching

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

$4014 switching

Post by Celius »

I was wondering a couple days ago if it was possible to switch RAM sections that are assigned to $4014 midframe. When I tried it, it worked, but not like I thought it would. I have one sprite being displayed in $200-$2FF, and midframe I check for a sprite #0 hit to have it switch to display $300-$3FF. The two sprites show up, but there is a constant flickering between the two of them. Is there a simple explanation as to why this happens? It doesn't make sense to me why it should.
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Last edited by loopy on Wed Aug 20, 2008 11:25 am, edited 1 time in total.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Also, writing to $4014 is equivalent to writing 256 times to $2004. $2004 writes probably require rendering to be completely turned off just like $2007 writes.
Again, it's not really switching, you just change OAM data midframe. I have very few idea on where this could be usefull at all, exept if you're making a game with two split screen and absolutely want to bypass the normal 64 sprites limitation.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I was trying to make a game hold more than 64 sprites, and I thought that might be useful. But maybe I shouldn't, I suppose. Oh well, thanks for the help anyways :) .
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

We've heard of games doing this before, but you have to stop rendering mid-frame for a while to do a second sprite DMA. Very few PPU operations can be performed while rendering is on and not cause glitches.
Post Reply