We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Widescreen: Difference between revisions

From SnesLab
Jump to: navigation, search
mNo edit summary
m (Vitor Vilela moved page WidescreenRomHacking to Widescreen)
(No difference)

Revision as of 04:57, 10 April 2021

(first draft, please point out any mistakes and ask any questions)

widescreen-specific code

objects

Objects are up to 64 pixels wide.
For their x coordinates we have a 9 bit unsigned integer,
i.e. values from 0 to 511.
0 to 255 are the visible columns of the screen.
To be able to have objects start off the left side and extend into the screen, the values wrap,
i.e. 449 to 511 is treated as -63 to -1.
256 to 448 place objects outside of the visible area.

For widescreen 16:9 we add 64 pixels to each side.
So the visible columns of the (wide) screen are now -64 to 319,
or technically 448 to 511 and 0 to 319.
So with objects partially off screen to the left the minimal coordinate with visible content is -127 aka 385.

Using that coordinate space you can place objects in the widescreen area quite similar to placing them in the normal screen area.
It should also not break support on other emulators or hardware AFAIK.

emulator

https://www.reddit.com/r/emulation/comments/bmc9t9/bsneshd_beta_5_bsnes_1073_formally_hd_mode_7_mod/
(repo comming soon)