It is currently Wed Sep 20, 2017 4:47 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 171 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12
Author Message
PostPosted: Thu Jun 01, 2017 1:11 am 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 709
Location: New Mexico, USA
I'm experiencing some sort of color math emulation bug in bsnes-plus (accuracy version). I've tried this test ROM in several other emulators (no$sns, higan, snes9x, etc) and it looks correct. However, when running in bsnes-plus-accuracy the fog/clouds are displayed with a different random color on each power-on/reset/load/reload. I'm running v073+3a. It seems to be picking a random color out of thin air. The color that it randomly chooses is usually not even from the existing palette. Lol.
Attachment:
translucent.sfc [32 KiB]
Downloaded 21 times


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 2:42 am 
Offline

Joined: Mon Nov 10, 2008 3:09 pm
Posts: 428
jwdonal wrote:
I'm experiencing some sort of color math emulation bug in bsnes-plus (accuracy version). I've tried this test ROM in several other emulators (no$sns, higan, snes9x, etc) and it looks correct. However, when running in bsnes-plus-accuracy the fog/clouds are displayed with a different random color on each power-on/reset/load/reload. I'm running v073+3a. It seems to be picking a random color out of thin air. The color that it randomly chooses is usually not even from the existing palette. Lol.
Attachment:
translucent.sfc


You're not initializing $2132 (COLDATA) properly. You need to write %11100000 ($e0) to set it to black, not 0. The upper 3 bits are which channels to change and the lower 5 bits are the value to change them to. Writing 0 does absolutely nothing.


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 3:30 am 
Offline
User avatar

Joined: Sat Jul 04, 2009 2:28 pm
Posts: 140
Location: Wunstorf, Germany
Dang, beat me to it. :P Just commented here: https://github.com/devinacker/bsnes-plu ... -305454286


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 5:06 am 
Offline
User avatar

Joined: Tue Apr 05, 2016 5:25 pm
Posts: 116
You should probably be using an initialization routine to set initial values for all the registers as well as zero out the memory. This way you're starting with a known state. bsnes-plus is likely simulating the real hardware behavior of RAM effectively being filled with random values on power on.

There's an InitSNES routine floating around that you can use.

_________________
SNES NTSC 2/1/3 1CHIP | serial number UN318588627


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 9:29 am 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 709
Location: New Mexico, USA
AWJ wrote:
You're not initializing $2132 (COLDATA) properly. You need to write %11100000 ($e0) to set it to black, not 0. The upper 3 bits are which channels to change and the lower 5 bits are the value to change them to. Writing 0 does absolutely nothing.
Sneaky :evil: Lol. I haven't done much (really anything) with color math yet, so that's why I didn't know about that special write behavior. Thanks!


Top
 Profile  
 
PostPosted: Thu Jun 01, 2017 10:30 am 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 365
Location: ...
HihiDanni wrote:
There's an InitSNES routine floating around that you can use.

This works for me, but it's a mess due to taking code from different locations. I've cleaned it up myself but haven't put it online yet and probably won't for a while, so.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 171 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12

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