libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.77k stars 1.77k forks source link

[3DS] suggestion: enable 800x240 output for New 3DS #14469

Open therealteamplayer opened 1 year ago

therealteamplayer commented 1 year ago

Pull request #8586 introduced new display mode settings for 3DS systems. Among these was a 2D (High Resolution) mode that utilised an 800x240 resolution, but only on Old 3DS systems as New 3DS systems had issues. However, as @beta215 and @pdpapper allude to in #8586, there is a new method to display 800x240 content on New 3DS, used in homebrew such as the standalone mGBA emulator. This could mean that 800x240 may be possible on New 3DS, and this would be a great benefit for e.g. the gpSP core, as this would allow for a 3x horizontal integer scale, vastly improving image quality in GBA games.

LibretroAdmin commented 1 year ago

@MrHuu What do you think of this?

MrHuu commented 1 year ago

Without checking the lictru gfxIsWide() function, I'm not sure if it would conflict with the current rendering code. If i'm correct, this functions sets the framebuffer to a single 800x240 size instead of 2 x 400x240 (left / right) and disables the parallax layer.

Setting the framebuffer is already handled by retroarch, we just need to disable the parallax layer on new3ds devices.

To have this added we can either;

I'm not sure which cores (mame?) are being build with the legacy toolchain, but these builds won't have the feature available.

While i havn't looked at 800x240 specifically, i don't think the actual rendered texture size is adjusted to 800x240. This means gpu scaling will look better, but it won't allow to use the retroarch provided scaling options to go above 400x240.

ruvaldak commented 6 months ago

800px mode utilizes the full 800 pixel horizontal resolution of the display in 2d. In terms of the hardware, the resolution is truly 800 pixels wide in this mode. As such, it does allow higher resolution rendered textures - such as 3x horizontal integer scale as mentioned in the OP. Hoping this gets added soon, as it makes an enormous difference in the standalone mGBA 3ds port - gb, gbc, and gba alike.

bootmii commented 4 months ago

Some New 2DSes have 800-pixel-wide screens (mine does) and I think some don't? How are we gonna detect this? My idea is to use a test pattern with alternating vertical stripes in each letter (one letter uses "left eye" pixels and one uses "right eye" pixels) and if it doesn't show up properly, there can be one button to disable 800-pixel mode and one to enable it. We just have to make sure they're X and Y or something else out of the way that won't be mindlessly pressed.

ruvaldak commented 4 months ago

That could work well enough, though Im not entirely sure if that would even be possible on non-800px displays - could completely blank out the screen or something. A better option might be like changing resolution in a PC game, where it asks if it's worked properly, and after a brief countdown with no confirmatiom, reverts the change.

MrHuu commented 4 months ago

We can just read the 3ds / 2ds model and act to it.

CFGU_GetSystemModel(&device_model);

ruvaldak commented 4 months ago

As bootmii mentioned, it seems some 2DS XLs counterintuitively have 800px screens, so having some way to manually enable the mode & test the functionality in such cases could be useful.

MrHuu commented 4 months ago

I'm only aware of the old2ds (non xl) not being capable of using wide mode. You're telling me 'some' old2ds XL models arn't capable? I can't find any information about this statement, is there any link or info about this?

But, the issue isn't excluding (or testing for) unsupported models. As the feature is currently not available at all. Otherwise all videomodes ( also the disabled 2d 800px mode ) can be manually selected and should already only be available on supported models.

If you're interested in fixing this feature, re-enable the code, and update to be compatible with libctru 2 and up. If working as intended, exclude edge cases.

bootmii commented 4 months ago

Mr. Huu, there is no such thing as an "old2ds XL". "2DS XL" refers to the New Nintendo 2DS XL, and can run New 3DS exclusive software but only in 2D. Mine has an 800-pixel-wide screen, some don't, and no O2DS does. Every 3D-capable 3DS has one, as it uses it for 3D.

On Wed, Feb 14, 2024 at 9:50 AM MrHuu @.***> wrote:

I'm only aware of the old2ds (non xl) not being capable of using wide mode. You're telling me 'some' old2ds XL models arn't capable? I can't find any information about this statement, is there any link or info about this?

But, the issue isn't excluding (or testing for) unsupported models. As the feature is currently not available at all. Otherwise all videomodes ( also the disabled 2d 800px mode ) can be manually selected and should already only be available on supported models.

If you're interested in fixing this feature, re-enable the code, and update to be compatible with libctru 2 and up. If working as intended, exclude edge cases.

— Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/14469#issuecomment-1944317766, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABREL2Q6EP7XY7WDHTB47ATYTT2P7AVCNFSM6AAAAAAQ37RL6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGMYTONZWGY . You are receiving this because you commented.Message ID: @.***>

MrHuu commented 4 months ago

My apologies, you're right, it should be new2ds xl. If there is any reference of different screens used on this model, with different capabilities, feel free to share.

I can't find any reference to this, and all documentation from libctru to set the wide mode suggest it's only the old2ds which isn't supported.

If it depends on a certain LCD type / manufacturer, it's possible to retreive this information from the device as-well and act to it. Or, just enable wide mode en retreive it's state which should be false if the device isn't capable. But i can't test it as i don't own a new2dsxl.

I personally have no interest in re-enabling this feature, and without any information or references on such cases, it would be a guessing job i won't even attempt.