Homebrew RELEASE LaiNES - A cycle accurate NES Emulator

  • Thread starter Thread starter Deleted-442439
  • Start date Start date
  • Views Views 51,682
  • Replies Replies 132
  • Likes Likes 35
The UI will be entirely swapped out not too long from now since I'm not a huge fan of it as is.

In terms of videosize and filtering: The size is removed as it also enlarges the buffer the ppu ends up writing frames to, and anything beyond 1x size just stutters horribly. The filter itself is always set to nearest as any of the others were too much of a hit on performance just the same.

Once opengl is available from libnx or a portlib these will be non-issues and the options will be put back in. If you'd like to test and verify for yourself, gui.cpp in my repo has the lines commented for the menu options and functions responsible for scaling and quality. If you happen to find a tweak to get them running nicely please let me know with a pr, would greatly appreciate!

Like I said before, you can do bilinear hardware scaling with gfxConfigureResolution, or, if you use my sdl2 port, switch to fullscreen for the same result. Also, you'll have to wait a lot for opengl, if it ever come :)
 
Last edited by cpasjuste,
Like I said before, you can do bilinear hardware scaling with gfxConfigureResolution, or, if you use my sdl2 port, switch to fullscreen for the same result. Also, you'll have to wait a lot for opengl, if it ever come :)

Hmmm, if you could PM me with more details I would appreciate it. As of right now if I apply any scaling to window size larger than the base buffer size or if set to linear/best for filtering, the result is an unplayable fps.
 
Like I said before, you can do bilinear hardware scaling with gfxConfigureResolution, or, if you use my sdl2 port, switch to fullscreen for the same result. Also, you'll have to wait a lot for opengl, if it ever come :)
Hmmm, if you could PM me with more details I would appreciate it. As of right now if I apply any scaling to window size larger than the base buffer size or if set to linear/best for filtering, the result is an unplayable fps.

Don't use SDL hint for scale quality nor SDL setLogicalSize. The way I ported sdl2 for the switch is :

- if you init/set SDL window windowed, then no internal scaling is applied, so you must handle scaling (and position) yourself (see https://github.com/Cpasjuste/pfba/blob/master/pfba/gui/video_nx.cpp#L140 , this code don't use SDL but it allow "fast" (still slower than hw scaling) 2x, 3x.. point scaling).

- if you init/set SDL window fullscreen, then it's hardware scaled internally (linear, no choice..), of course only if you set a higher window resolution than your internal buffer size.

So, say you have a 256*240 buffer and want fullscreen with hardware scaling, you'll set SDL window fullscreen with 256 width and 240 height and just draw your buffer without manual scaling. You'll loose aspect ratio of course, but you can use a 300*240 (example, didn't calculate it) window and draw at x=22 (margins) to add borders and respect ratio.
 
Last edited by cpasjuste,
  • Like
Reactions: waywardson07
Don't use SDL hint for scale quality nor SDL setLogicalSize. The way I ported sdl2 for the switch is :

- if you init/set SDL window windowed, then no internal scaling is applied, so you must handle scaling (and position) yourself (see https://github.com/Cpasjuste/pfba/blob/master/pfba/gui/video_nx.cpp#L140 , this code don't use SDL but it allow "fast" (still slower than hw scaling) 2x, 3x.. point scaling).

- if you init/set SDL window fullscreen, then it's hardware scaled internally (linear, no choice..), of course only if you set a higher window resolution than your internal buffer size.

So, say you have a 256*240 buffer and want fullscreen with hardware scaling, you'll set SDL window fullscreen with 256 width and 240 height and just draw your buffer without manual scaling. You'll loose aspect ratio of course, but you can use a 300*240 (example, didn't calculate it) window and draw at x=22 (margins) to add borders and respect ratio.

Correct me if I'm wrong, but based on your description that's exactly what I'm doing: Sdl window is created with the same dimensions as the buffer (both 256x240), and fullscreen. No modifications to window or buffer size are made past that point in gui::init here:

https://github.com/Kevoot/LaiNESwitch/blob/master/source/gui.cpp

Keep in mind that set_size and set_render_quality are never called, only what is in gui::init for dimensions.

EDIT: Also keep in mind that the multiplication factor in the initial window creation will always simply be 1 as of now, as no scaling will be done since set_size is never called.
 
Last edited by Kevoot,
Low priority request (unless you have OCD in which case it's life threatening).. what is different with this nro that we can't add an icon using vgmoose's asset editor?
 
nice work.. it works on 5.1.0 to let people know how do i add roms and from where thanks keep up the good work..

edited i got it wow really great work works 100%
-Thread on behalf of @Kevoot as he can't yet post links-

687474703a2f2f692e696d6775722e636f6d2f327475446c43772e706e67


Hello all,

Just finished up on my first version of LaiNES, originally created by AndreaOrru https://github.com/AndreaOrru/LaiNES

I've tested with LoZ and SMB3 and they run fullspeed, no audio crackling whatsoever.

Why this emu over the others: - It has a pretty sweet GUI, and runs fullspeed without sound breaking

Controls:
- Direction -> DPad (Joystick too but there's a weird bug on the x-axis)
- A -> A
- B -> B
- Select -> Minus
- Start -> Plus
- Program Menu -> R

Directions to run: - On the release page

Downloads:

Release (updated may 24th): https://github.com/Kevoot/LaiNESwitch/releases/tag/1.1.0

Source: https://github.com/Kevoot/LaiNESwitch

Changelog:

UPDATE 1.1.0
.
 
Last edited by MrWhosHacking,
I just tried this with SX OS 1.1 and Mario Bros. 1, runs at about 50% speed with heavy sound stuttering.
Is that an SX OS issue dealing with homebrew wrongly?

[Edit] I got it, with hekate everything is fine. So SX OS is the problem.
 
Last edited by wurstpistole,
Does the Switch allow for the native refresh rate of the console? Are you forced to: underclock the NES or use 60Hz output with frame rate conversion?

For the video output, are you able to natively set 240p on the Switch or are you performing some kind of prescale onto a larger "canvas"?
 
what is different with this nro that we can't add an icon using vgmoose's asset editor?
Don't know if that's the exact issue, but the icon is too large. It needs to be 256x256, that's why it also doesn't show up in the Homebrew Menu. @Kevoot: Can you please use an icon with the right size for the next version?
 
Updates incoming relatively soon. Just submitted a PR for semaphores in libnx. Once that's all set I'll be separating the drawing portion to it's own thread and should see a nice speedup.

Icon has also been fixed and a couple minor tweaks in latest commit, didn't see it being worth a release quite yet.
 
  • Like
Reactions: hippy dave
New version out:
https://github.com/Kevoot/LaiNESwitch/releases/tag/1.2.0

See OP for instructions as they haven't changed

This release adds threading, which boosted performance massively. Full speed ahead.

P.S. didn't notice this before but apparently docked mode works now too
 
Last edited by Kevoot,
Does anyone know the max rom count that could be added in the "game" folder of LaiNESwitch v1.2.0?

I installed the complete NES rom collection in the game folder but LaiNESwitch won't show no more than 17 games as I scroll down the rom list. Any ideas?

I'm currently on firmware 5.1.0
 

Site & Scene News

Popular threads in this forum