View unanswered posts | View active topics It is currently Wed Nov 22, 2017 5:26 pm



Reply to topic  [ 4 posts ] 
Theme Park revisited 
Author Message
Lurker
User avatar

Joined: Tue Dec 07, 2004 1:40 am
Posts: 151
Reply with quote
Post Theme Park revisited
A little while back, someone pointed out to me that Theme Park still wasn't quire right. So i look, and sure enough the alignment isn't quote right between BG1 and the other BGs and OBJ. Recall that Theme Park writes $ff then $03 to $2110, then writes $00 to $210d exactly once and yet expects BG1HOFS to have the value $0000, not $0003. Previous investigation had discovered that changing the ROM to write $83 to $2110 would make the real SNES have BG1HOFS=$0080, at the time mistakenly interpreted as $0083.

Further investigation reveals that the value jumps by 8s: any of $80-$87 leads to BG1HOFS being $0080, while $88 suddenly jumps to $0088. A little more testing reveals that the real formula for BGnxOFS registers is:
Code:
Current = (Byte<<8) | (Prev&~7) | ((Current>>8)&7);
with Prev shared among all 8 registers.

OTOH, the M7* registers still seem to use the old formula:
Code:
Current = (Byte<<8) | M7Prev;
with M7Prev again shared. OTOH, we still don't know the exact details of the Mode 7 calculations, particularly the observed offset quantization under extreme magnification, a few details of offsets ourside the standard -1024 to 1023 range, and the bit-accuracy of the scaling formulas...


Sun Jun 19, 2005 3:38 am
Profile
Rookie

Joined: Fri Nov 26, 2004 7:50 pm
Posts: 14
Location: PA, USA
Reply with quote
Post 
anomie: US. Patent 5,327,158
Has to do with mode 7 calculations and stuff...
It scares the hell out of me...

Lord Nightmare

_________________
"When life gives you zombies... *CHA-CHIK* ...you make zombie-ade!"


Sun Jun 19, 2005 4:59 am
Profile ICQ YIM
Reply with quote
Post 
Well, luckily (if you will), it says at the bottom that this was just a reference design, and that the final implementation could be (and probably is) different.

Quote:
Current = (Byte<<8) | (Prev&~7) | ((Current>>8)&7);

Ugh ... have to change those things again ...
Nice find.


Sun Jun 19, 2005 2:13 pm
Lurker
User avatar

Joined: Tue Dec 07, 2004 1:40 am
Posts: 151
Reply with quote
Post 
Lord Nightmare wrote:
anomie: US. Patent 5,327,158
Has to do with mode 7 calculations and stuff...
It scares the hell out of me...

Even if the patent has detailed enough technical details, the interesting corner cases are still probably different...


Sun Jun 19, 2005 3:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.