Open Yave-Yu opened 2 months ago
PAR is not about 256x8. PAR means you leave height as is and stretch width by 8/7 ratio. 256*8/7 would be width, and height would remain the same. That way pixel dimensions (pixel aspect ratio) become correct, since pixels that NES sends to the TV are not square.
Ah, I forgot write window size. I mean, when I use 7x window size, it would have 2048x1680 with maintain aspect ratio, but no, it has 2051x1680, a little wider than (256x8)x(240x7).
Which core are you testing this with? Also, how are you measuring the window size?
And what version is this? Presumably 2.10 RC1 since that added an option for 7x scale in the menubar.
In any case I believe this is due to a shortcoming of the system: window size is only a multiplier of the (int) virtual width and height given by the core. In this case, this is most likely (256 * 8 / 7 = 292.5714...), rounded to 293. Multiplied by 7 = 2051 (source).
The correct way would be to have either a scaling factor which is then applied to the buffer size or make VirtualWidth and VirtualHeight return double
instead of int
.
(256x8)x(240x7).
This is not how PAR works.
Which core are you testing this with? Also, how are you measuring the window size?
I tested NesHawk and BSNESv115+ core, I take screenshot then minus border to get game width. I now using 200% DPI, so border has 2 pixels width. The (7x) full width is 2055, I minus two border: 2055-2x2=2051.
And what version is this? Presumably 2.10 RC1 since that added an option for 7x scale in the menubar.
Just downloaded newer dev.
VirtualWidth and VirtualHeight return double instead of int.
I think this would work out better, when they're used they could just be rounded out in the end (after any potential calculations).
I've tried making virtual width and height float
to see what would happen, and those virtual sizes are passed through so many layers that I've just given up for now.
Found a temporary solution: I just notice it now, enable integer scaling (see red box) then use 8x so I can see perfect 8:7 PAR scaling.
On NES and SNES emulation, enable Maintain aspect ratio follows 8:7 PAR, that would stretch horizontal pixel to perfect 2048 (256x8), but current BizHawk stretched it to 2051 instead, a little longer than 8:7 PAR expected size.