Patches for wxWidgets/SDL2

Discussion of development and patch submission.
Post Reply
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Patches for wxWidgets/SDL2

Post by bit »

I decided to create a new thread only for patches related to the wxWidgets/SDL2-port to reduce the amount of posts in the other thread.

The first patch I'll provide here is a big one.
The major additions are:
  • An updated UI.
  • OpenGL 3.0 with GLSL/GLSLP-support. GLSLP is used by RetroArch so many of the shaders from there should work.
  • Many updates and improvements to the Windows-version. It should now be more similar to the regular Windows-version.
And lots of minor changes and bugfixes.

The patch was too big to add as an attachment so I've uploaded it here:
https://martinborjesson.com/pcem/170719-wx_updates.7z (1mb)
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patches for wxWidgets/SDL2

Post by SarahWalker »

Committed at rev 821.

Could I request that you split patches up a bit more in future? It makes it easier to see what the individual changes are :)
teppic
Posts: 53
Joined: Tue 20 Jun, 2017 12:31 pm

Re: Patches for wxWidgets/SDL2

Post by teppic »

The new SDL UI is part of the official release now? That's nice for us Linux people :)
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

SarahWalker wrote:Committed at rev 821.

Could I request that you split patches up a bit more in future? It makes it easier to see what the individual changes are :)
Thanks!

Of course, I'm sorry about that. My larger patch-submissions in the future will not be in one big file :)
Last edited by bit on Sun 30 Jul, 2017 8:41 pm, edited 1 time in total.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

Fixed so it can now be built on Windows even if wxrc.exe does not exist, also removed an include that shouldn't be there.
Fixed so the correct value is used for timer_freq.
Updated the configuration manager so that when it is opened again after shutting down the emulated machine that config will be selected.
Attachments
170730-wx_fixes.patch
(1.42 KiB) Downloaded 328 times
170730-wx_active_config.patch
(1.26 KiB) Downloaded 326 times
basic2004
Posts: 124
Joined: Sun 08 Jan, 2017 5:59 pm

Re: Patches for wxWidgets/SDL2

Post by basic2004 »

Munt 2.2.0 has released.
Newest mt32emu has most accurate old MT-32 emulation and support new MT-32 (2.04) ROMs.
You should update mt32emu.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

basic2004 wrote:Munt 2.2.0 has released.
Newest mt32emu has most accurate old MT-32 emulation and support new MT-32 (2.04) ROMs.
You should update mt32emu.
I will take a look at it, thanks for letting me know of the new release :)
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

This patch adds an option for custom resolution.
Attachments
170731-custom_resolution.patch
(78.49 KiB) Downloaded 328 times
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patches for wxWidgets/SDL2

Post by SarahWalker »

Revs 825-828 commit the last three patches.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

This patch fixes some issues with shader rendering.
Attachments
170810-shader_fixes.patch
(8.36 KiB) Downloaded 330 times
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

This patch moves the renderer update-method to prevent the GPU from slowing down the emulation.
Attachments
170813-renderer_update_move.patch
(3.04 KiB) Downloaded 343 times
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patches for wxWidgets/SDL2

Post by SarahWalker »

Shader rendering fixes committed at rev 846.

I haven't committed the other patch, as it slows the emulator down for me.
ecksemmess
Posts: 183
Joined: Wed 18 Mar, 2015 5:27 am

Re: Patches for wxWidgets/SDL2

Post by ecksemmess »

That last uncommitted patch is the one that fixed the major problem that killed non-Software-renderer performance for iwasaperson across the board on all emulated machines, right? Seems like something that will have to be re-incorporated somehow, possibly with a setting to allow the user to choose between the two renderer update methods.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

I added a setting for it. It can be found in Video -> Alternative update-lock (not sure if that's what it should be called) and it uses the old behavior by default.
It replaces the previous patch.
Attachments
170817-renderer_update_move.patch
(12.12 KiB) Downloaded 345 times
ecksemmess
Posts: 183
Joined: Wed 18 Mar, 2015 5:27 am

Re: Patches for wxWidgets/SDL2

Post by ecksemmess »

Looks good. :)
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

These patches fixes real CD-ROM on Windows and adds a copy-button to the Configuration Manager.
Attachments
170820-config_sel_copy.zip
(4.96 KiB) Downloaded 310 times
170820-real_cdrom.patch
(1.18 KiB) Downloaded 321 times
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patches for wxWidgets/SDL2

Post by SarahWalker »

Video update patch committed at rev 853.

Did you mean to make all the video options per-machine btw? Seems at least some of them would be better as globals.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patches for wxWidgets/SDL2

Post by SarahWalker »

Other patches committed in revs 854/855.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

SarahWalker wrote:Did you mean to make all the video options per-machine btw? Seems at least some of them would be better as globals.
When I implemented GL3 I wanted the user to be able to have some settings different per-machine. And while I did that it felt strange to mix global-settings with machine-settings, so to minimize confusion I just did all of them as machine-settings.
But you're right that some of them would be better as globals. Do you think it's fine to mix them or should the global-settings be moved somewhere so it's more clear that they are globals?
ecksemmess
Posts: 183
Joined: Wed 18 Mar, 2015 5:27 am

Re: Patches for wxWidgets/SDL2

Post by ecksemmess »

I'd think that the UI should certainly make it very obvious to the user which settings will be applied globally and which will be applied per-machine. Lots of potential for confusion there.
bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: Patches for wxWidgets/SDL2

Post by bit »

ecksemmess wrote:I'd think that the UI should certainly make it very obvious to the user which settings will be applied globally and which will be applied per-machine. Lots of potential for confusion there.
Yeah. My suggestions would be to either move all those menu-options to the menu in the machine-window called for example Global Settings or create a new settings-dialog for them.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Patches for wxWidgets/SDL2

Post by leilei »

I miss being able to go straight to hardware configuration from the main window menu bar. Have to pop open a new window which may be piled under the window and then find its menu bar and open it there :(
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Patches for wxWidgets/SDL2

Post by JosepMa »

There's an image missing in this commit:
https://bitbucket.org/JosepMaJaz/pcem/c ... 3af80a963f
wxrc -c pc.xrc -o wx-resources.cpp
22:55:34: Error: can't open file '.\icons/32x32/computer_go.png' (error 2: el sistema no puede encontrar el archivo especificado.)
Post Reply