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

From SnesLab
Revision as of 22:30, 17 May 2019 by DerKoun (talk | contribs)
Jump to: navigation, search

(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)