It is currently Tue Jul 23, 2019 2:20 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Jun 22, 2019 9:40 am 
Offline
User avatar

Joined: Mon Jul 14, 2014 6:05 am
Posts: 94
Location: Lausanne, Switzerland
So I noticed something pretty odd with my palette swapping routine on real hardware. Sometimes, when I swap palettes mid-frame, the background colour is wrong.

https://cdn.discordapp.com/attachments/ ... 000309.jpg
https://cdn.discordapp.com/attachments/ ... 001405.jpg

Here's how it should look like
https://cdn.discordapp.com/attachments/ ... 001531.jpg
https://cdn.discordapp.com/attachments/ ... 001541.jpg

Turns out it goes away if I write to $2006 before reenabling the background. (Doing 7>1>6>6 does the glitch, but 7>6>6>1 doesn't).
Also, it only happens sometimes. Sometimes it swaps the palettes as it should. By the way this was tested on a real board and on an INL board (MMC3). Is this a new quirk?


Top
 Profile  
 
PostPosted: Sat Jun 22, 2019 10:07 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2536
Location: DIGDUG
Is it just color index zero that is the wrong color?

If so. It could maybe be fixed by having the last write be the correct color to one of the mirrors of 3f00

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Jun 22, 2019 12:31 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11376
Location: Rio de Janeiro - Brazil
Mid-frame palette changes are full of "gotchas", so I wouldn't hurry into calling any odd behavior a new quirk. First we'd have to take a look at the actual code doing the palette changes, how it's timed, and try to understand why it works some of the time.


Top
 Profile  
 
PostPosted: Sat Jun 22, 2019 12:42 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8488
Location: Seattle
Other things I'd try testing:

Does it glitch if you try 7>6>1>6? 7>waste four cycles>1>6>6 ?

I can't think of a way that the known existing glitches would cause a palette write to have failed, but I could be forgetting something.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group