libretro / bsnes

Super Nintendo (Super Famicom) emulator
https://bsnes.byuu.org
Other
11 stars 13 forks source link

Option to change internal resolution to 256x224 #21

Closed CutterXYZ closed 4 years ago

CutterXYZ commented 4 years ago

Hi. The core always reports its internal resolution as 512x448 even with games running in 256x224. This prevents from up-scaling to fullscreen with integer scaling for those users having monitors with 1200 vertical pixels. Instead they are stuck with a small picture of 1024x896 (x2). With a base resolution of 256x224 we could up-scale to full screen 1280x1120 (x5).

I suspect the higher resolution is only needed for a few games like Secret of Mana ? Please implement an option to change the internal resolution to 256x224.

rtretiakov commented 4 years ago

This is not how the emulator core works, so this is more of an issue to handle upstream instead of at the libretro level. At this time the core does not require resolution changes to be handled at the frontend level with the accurate PPU which is actually easier in some respects. With the fast PPU you will notice that it will default to a 256x224 canvas and upscale when mode 7 is activated.

CutterXYZ commented 4 years ago

With the fast PPU you will notice that it will default to a 256x224 canvas and upscale when mode 7 is activated.

Fast PPU is enabled in the core's options but the internal resolution is 512x448.

Previous versions of bsnes handled this differently which allowed for more flexibility in upscaling.

janderclander14 commented 4 years ago

Yes, I can confirm the same issue, but with a 768p screen, which only allows for 2x integer scaling instead of the optimal 3x.

However, when Fast PPU is enabled, I was able to obtain a proper integer scaling using a custom resolution with 256x224 x 3 and integer scaling off. It sounds weird, but is seems that the image is actually being rendered at 256x224 (and this is why a custom x3 scale is fine), but the emulator always reports 512x448 resolution (regardless the PPU setting), which fools the automatic scaling presets in retroarch and do not allow to use even scaling factors.

On the other hand, disabling Fast PPU actually renders the image at 512x448 (and the custom scaling described above shows the expected distortion).

DerKoun commented 4 years ago

As a workaround you can you can try bsnes-hd at 1x scale (or 5x/3x scale if it helps your specific games). I handle resolution differently in the libretro core (not claiming correctly, but it seems to work so far).

If any developer here wants to compare notes on "retro_get_system_av_info" in bsnes and bsnes-hd both projects may benefit. (But I have been away from the project for some time due to some IRL stuff, so I'd need some time to get back into it again)