[Linux] GUI discussion
Re: [Linux] GUI discussion
It is too hot, also in Poole, ha ha.
Re: [Linux] GUI discussion
No problem, take your time. There's probably something there I haven't thought about or could've done better :)SarahWalker wrote:Revs 774-776 commit the patches attached to this thread, except for the configurable paths one - I need to look over that some more, and in the UK at present it's too hot to consider doing anything resembling thinking.
It needs more testing in Windows/Allegro, since I pretty much only use the wx/SDL2-port on Linux.
It was very hot here for a while as well, finally getting a bit cooler.
Re: [Linux] GUI discussion
I tried to build your latest revision, but failed.
I tried to build Makefile.mingw-wx-sdl2 in Windows 10.
Code: Select all
wx-sdl2-video-gl3.o:wx-sdl2-video-gl3.c:(.text+0x1d1b): undefined reference to `_imp__glActiveTexture@4'
wx-sdl2-video-gl3.o:wx-sdl2-video-gl3.c:(.text+0x2e72): undefined reference to `_imp__glActiveTexture@4'
collect2.exe: error: ld returned 1 exit status
make: *** [PCem-wx-SDL2.exe] Error 1
Re: [Linux] GUI discussion
Seems like it might be an old opengl32-library. Try the branch gl3-test and see if that builds for you.basic2004 wrote:I tried to build your latest revision, but failed.I tried to build Makefile.mingw-wx-sdl2 in Windows 10.Code: Select all
wx-sdl2-video-gl3.o:wx-sdl2-video-gl3.c:(.text+0x1d1b): undefined reference to `_imp__glActiveTexture@4' wx-sdl2-video-gl3.o:wx-sdl2-video-gl3.c:(.text+0x2e72): undefined reference to `_imp__glActiveTexture@4' collect2.exe: error: ld returned 1 exit status make: *** [PCem-wx-SDL2.exe] Error 1
Re: [Linux] GUI discussion
I built gl3-test branch, this launched successful.bit wrote:Seems like it might be an old opengl32-library. Try the branch gl3-test and see if that builds for you.
GL3 renderer with shader, crt-geom.glslp (from RetroArch.)
Re: [Linux] GUI discussion
Looks nice. Could that be committed upstream too? PCem could use some shadery action... (and maybe have monitor "emulation" from it by picking a list of simulated monitors and maybe with appropriate edid emulation and the sync errors/phosphor trail buffer/fade in/color pollution)
EDIT: Compiled and tried it out. The virtual refresh rate is a nice idea, though i had keyboard input issues especially with the modifier keys sticking (especially alt). The shader manager also has a focus issue after applying a shader change so it would scroll back up to the top edit box
I've also noticed the text modes on the better video cards get clipped by CRT shaders' overscans
EDIT: Compiled and tried it out. The virtual refresh rate is a nice idea, though i had keyboard input issues especially with the modifier keys sticking (especially alt). The shader manager also has a focus issue after applying a shader change so it would scroll back up to the top edit box
I've also noticed the text modes on the better video cards get clipped by CRT shaders' overscans
- Attachments
-
- crazycrtfun.jpg (254.92 KiB) Viewed 21092 times
-
- Posts: 183
- Joined: Wed 18 Mar, 2015 5:27 am
Re: [Linux] GUI discussion
Excellent work going on here, loving this!
-
- Posts: 183
- Joined: Wed 18 Mar, 2015 5:27 am
Re: [Linux] GUI discussion
Yes, that would be incredible. I've always wanted to be able to capture the subtleties of different displays. For example, I used to have a lot of Trinitron-based CRTs. Those often had horizontal curvature without any vertical curvature. Are there any shader packages that offer that, or easy ways to hack it from an existing full-curvature implementation?leilei wrote:PCem could use some shadery action... (and maybe have monitor "emulation" from it by picking a list of simulated monitors and maybe with appropriate edid emulation and the sync errors/phosphor trail buffer/fade in/color pollution)
Re: [Linux] GUI discussion
Most "tweaked shader packages" i've seen primarily deal with recreating NTSC CRT tvs much less monitors
Tweaking and sharing preferences might be close. Here's a preset which roughly approximate an early VGA monitor (from memory
(gausshackh and v are just blurs\blur-gauss-*.glsl with a "* 0.08" tacked after the pixel size to decrease the radius)
Maybe refresh rate of the video mode could be exposed to shader for other tweaks? (i.e. scanline beam size reduction if higher on some monitors, and maybe a fake flicker effect more obvious on a lower refresh rate)
Tweaking and sharing preferences might be close. Here's a preset which roughly approximate an early VGA monitor (from memory
(gausshackh and v are just blurs\blur-gauss-*.glsl with a "* 0.08" tacked after the pixel size to decrease the radius)
Code: Select all
[SDL2]
fullscreen = 1
fullscreen_mode = 0
scale = 1
scale_mode = 0
vsync = 0
focus_dim = 0
render_driver = gl3
[GL3]
input_scale = 1.000000
input_stretch = 0
simulated_refresh_rate = 60.000000
[GL3 Shaders]
shaders = 3
shader0 = shaders\blurs\gausshackh.glsl
shader1 = shaders\blurs\gausshackv.glsl
shader2 = shaders\crt\crt-easymode-halation.glslp
[GL3 Shaders - crt-easymode-halation.glslp]
GAMMA_INPUT = 2.870000
RETRO_PIXEL_SIZE = 0.000000
GAMMA_OUTPUT = 1.000000
SHARPNESS_H = 0.000000
SHARPNESS_V = 0.000000
MASK_TYPE = 6.000000
MASK_STRENGTH_MIN = 0.130000
MASK_STRENGTH_MAX = 0.240000
MASK_SIZE = 1.000000
SCANLINE_STRENGTH_MIN = 0.050000
SCANLINE_STRENGTH_MAX = 0.000000
SCANLINE_BEAM_MIN = 1.000000
SCANLINE_BEAM_MAX = 1.050000
GEOM_CURVATURE = 0.020000
GEOM_WARP = 0.020000
GEOM_CORNER_SIZE = 0.020000
GEOM_CORNER_SMOOTH = 500.000000
INTERLACING_TOGGLE = 0.000000
HALATION = 0.310000
DIFFUSION = 0.170000
BRIGHTNESS = 1.250000
Re: [Linux] GUI discussion
Great! I've merged this branch into master.basic2004 wrote:I built gl3-test branch, this launched successful.
Thank you! I will provide a patch for it when it has been tested for a while.leilei wrote:Looks nice. Could that be committed upstream too?
Yeah I'm aware of the modifier keys sticking, especially on Windows. It has been on my todo for a while now but I've been focusing more on the fun stuff, but I should probably look at it soon :)leilei wrote:i had keyboard input issues especially with the modifier keys sticking (especially alt).
I think with crt-lottes* you can adjust the curvature independently.ecksemmess wrote:Those often had horizontal curvature without any vertical curvature. Are there any shader packages that offer that
Thats a good idea. It should be possible to expose it as the simulated refresh rate, since that is the rate of which the frameCount-value will be updated in the shader.leilei wrote:Maybe refresh rate of the video mode could be exposed to shader for other tweaks?
Re: [Linux] GUI discussion
I testing fluidsynth branch in my Windows 10,
wxWidgets UI showing MIDI configuration correctly but Windows UI isn't.
This problem appeared on advanced configuration of Roland MT-32 emulation too.
CONFIG_FILE, CONFIG_SPINNER is missing on Windows UI.
And no sound from FluidSynth, and MT-32 emulation only this branch too.
wxWidgets UI showing MIDI configuration correctly but Windows UI isn't.
This problem appeared on advanced configuration of Roland MT-32 emulation too.
CONFIG_FILE, CONFIG_SPINNER is missing on Windows UI.
And no sound from FluidSynth, and MT-32 emulation only this branch too.
Re: [Linux] GUI discussion
I modify cfg file manually, FluidSynth and MT-32 emulation plays correctly.basic2004 wrote:And no sound from FluidSynth, and MT-32 emulation only this branch too.
I think this was configuration problem.
[FluidSynth] and [Roland MT-32 Emulation]'s settings are turned to 0 after configuration.
and these device configuration aren't save when apply changes.
Re: [Linux] GUI discussion
I made a new config, and set FluidSynth.
this code is FluidSynth settings from config file.
and MT-32.
CONFIG_SPINNER wasn't applied correctly.
this code is FluidSynth settings from config file.
Code: Select all
[FluidSynth]
sound_font = B:\kgs88.sf2
output_gain = 0
chorus = 0
chorus_voices = 0
chorus_level = 0
chorus_speed = 0
chorus_depth = 0
chorus_waveform = 0
reverb = 0
reverb_room_size = 0
reverb_damping = 0
reverb_width = 0
reverb_level = 0
interpolation = 2
Code: Select all
[Roland MT-32 Emulation]
output_gain = 0
reverb = 1
reverb_output_gain = 0
reversed_stereo = 0
status_show_instruments = 0
Re: [Linux] GUI discussion
@basic2004:
Yeah the FluidSynth branch is in early stages. I've only tested it on wx/SDL2 on Linux, but it's great that you tried it for Windows!
I think I know why the configuration for CONFIG_SPINNER isn't saved on Windows, I'll take a look at that.
The Windows UI configuration items will be added later.
Yeah the FluidSynth branch is in early stages. I've only tested it on wx/SDL2 on Linux, but it's great that you tried it for Windows!
I think I know why the configuration for CONFIG_SPINNER isn't saved on Windows, I'll take a look at that.
The Windows UI configuration items will be added later.
Re: [Linux] GUI discussion
Thanks to Windows-specific fixing but I need to solve this.
Right click context menu don't disappear when clicking except this context menu,
Is this problem only Windows-specific?
Right click context menu don't disappear when clicking except this context menu,
Is this problem only Windows-specific?
Re: [Linux] GUI discussion
Yes that is a Windows-specific problem. Unfortunately I'm not entirely sure how to fix it.
Re: [Linux] GUI discussion
It is quite interesting how this is evolving.
I tried an older version (what is merged into pcem's official repo) and it gave me more instability (not completely sure if it was related to the source, the compiler the binary being built for 64bits , the virtual machine or something else).
As for the images, I would like to suggest something that should give that extra feeling of emulation, now that resizing and shaders can be used: Set the monitor size.
You know, up to now, pcem was resizing the screen according to the pixels of the emulated video. Then, there were the options to keep a 4:3 aspect ratio that have recently been possible also on windowed mode, and that, coupled to window resizing, has allowed to resize the window to a size to what a monitor of that time would correspond.
As such, I am suggesting a setting that could resize the window to the 14'' 4:3, 15.6'' 5:4, and the likes, determined by actual screen size, not by pixels.
I used a ruler to determine the width and height of the window, and I have it resized to what would correspond to a 15.6 monitor. With Direct3D, that gives quite a feeling of what such a monitor would show.
I tried an older version (what is merged into pcem's official repo) and it gave me more instability (not completely sure if it was related to the source, the compiler the binary being built for 64bits , the virtual machine or something else).
As for the images, I would like to suggest something that should give that extra feeling of emulation, now that resizing and shaders can be used: Set the monitor size.
You know, up to now, pcem was resizing the screen according to the pixels of the emulated video. Then, there were the options to keep a 4:3 aspect ratio that have recently been possible also on windowed mode, and that, coupled to window resizing, has allowed to resize the window to a size to what a monitor of that time would correspond.
As such, I am suggesting a setting that could resize the window to the 14'' 4:3, 15.6'' 5:4, and the likes, determined by actual screen size, not by pixels.
I used a ruler to determine the width and height of the window, and I have it resized to what would correspond to a 15.6 monitor. With Direct3D, that gives quite a feeling of what such a monitor would show.
-
- Posts: 183
- Joined: Wed 18 Mar, 2015 5:27 am
Re: [Linux] GUI discussion
That's actually not a half bad idea--in the config, we could have fields where the user enters the horizontal and vertical dimensions of their host system's screen in inches, and PCem could then use that to calculate the window dimensions in pixels that would correspond to various standard classic monitor sizes, and offer a selection from among them.
Re: [Linux] GUI discussion
A XT silpheed video in the shader stuff. Should really tweak and get the phosphor to persist a bit more in the darker range
the sdl2 input got really sticky during the recording for some reason. also numpad 4 doesn't work
i've also had a unexpected fullscreen alt-f4 incident which closed the emulator instead of performing a guest alt-f4
the sdl2 input got really sticky during the recording for some reason. also numpad 4 doesn't work
i've also had a unexpected fullscreen alt-f4 incident which closed the emulator instead of performing a guest alt-f4
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Linux] GUI discussion
Paths changes (finally) committed at rev 789.
Re: [Linux] GUI discussion
Does not compile for me:
[edit] path.c and path.h seems to be missing in the repository...
Code: Select all
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"PCem\" -DPACKAGE_TARNAME=\"pcem\" -DPACKAGE_VERSION=\"v12\" -DPACKAGE_STRING=\"PCem\ v12\" -DPACKAGE_BUGREPORT=\"Sarah\ Walker\ \<pcem@pcem-emulator.co.uk\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pcem\" -DVERSION=\"v12\" -DHAVE_LIBOPENAL=1 -DHAVE_LIBALUT=1 -DHAVE_LIBPTHREAD=1 -I. -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/SDL2 -D_REENTRANT -O3 -c -o pcem-acer386sx.o `test -f 'acer386sx.c' || echo './'`acer386sx.c
808x.c: In function ‘dumpregs’:
808x.c:511:15: error: ‘logs_path’ undeclared (first use in this function)
chdir(logs_path);
^~~~~~~~~
808x.c:511:15: note: each undeclared identifier is reported only once for each function it appears in
Re: [Linux] GUI discussion
Thanks! I hope you will find it useful. I use it when I work on the Windows-version when I work with two different sources at the same time, it makes it easy to share the same configs and roms.SarahWalker wrote:Paths changes (finally) committed at rev 789.
But as Roman S said though, paths.c/h is missing.
basic2004 wrote:Right click context menu don't disappear when clicking except this context menu
I think you will like the latest commits to my GitHub/master. The wx/SDL2 Windows-version now uses much of the code from the D3D Windows-version, which means that there is now a menu bar and the keyboard should behave the same, so hopefully no stickiness or accidental ALT+F4. The rendering is still done through SDL2. There might be some issues I haven't found so it would be great if as many Windows-users as possible could test it and see if it works properly.leilei wrote:the sdl2 input got really sticky during the recording for some reason. also numpad 4 doesn't work
i've also had a unexpected fullscreen alt-f4 incident which closed the emulator instead of performing a guest alt-f4
EDIT: I should also mention that the Windows-version now requires SDL2 version 2.0.5+. The Linux-version still works with older versions.
Re: [Linux] GUI discussion
Thanks for patching, I watched wxWidgets in Windows to Windows UI, so right click don't appear context menu anymore.bit wrote:I think you will like the latest commits to my GitHub/master. The wx/SDL2 Windows-version now uses much of the code from the D3D Windows-version, which means that there is now a menu bar and the keyboard should behave the same, so hopefully no stickiness or accidental ALT+F4. The rendering is still done through SDL2.
keen4.jpg
There might be some issues I haven't found so it would be great if as many Windows-users as possible could test it and see if it works properly.
EDIT: I should also mention that the Windows-version now requires SDL2 version 2.0.5+. The Linux-version still works with older versions.
but I found a problem, current version isn't doing time synchronization correctly both Windows, wxWidgets.
I found this problem in official development version(rev. 7742fe7) too.
Re: [Linux] GUI discussion
I've also noticed the encoding of the window title is briefly chinese for a second.
Middleclick can't unlock the mouse and I also had a situation where an always on top window (i.e. a media player) catching focus from the locked mouse cursor would still keep the mouse cursor locked with no way to alt-tab back or use the unlock hotkey. Had to Ctrl-Alt-Del then taskmanager end the media player to be able to click on the pcem window to regain proper focus so it could unlock the mouse
Middleclick can't unlock the mouse and I also had a situation where an always on top window (i.e. a media player) catching focus from the locked mouse cursor would still keep the mouse cursor locked with no way to alt-tab back or use the unlock hotkey. Had to Ctrl-Alt-Del then taskmanager end the media player to be able to click on the pcem window to regain proper focus so it could unlock the mouse
Re: [Linux] GUI discussion
I am with leilei that the middleclick feature should be restored.
As I understand, it was removed in order to add support for middle click for emulated applications, but that was already present, when switching to a Microsoft intellimouse. Serial and PS/2 modes are meant for 2-button setups, and there, middleclick can be used for unlocking the mouse. (At much, if 3-button is needed for serial and/or ps/2, then add an additional setup option for them).
As I understand, it was removed in order to add support for middle click for emulated applications, but that was already present, when switching to a Microsoft intellimouse. Serial and PS/2 modes are meant for 2-button setups, and there, middleclick can be used for unlocking the mouse. (At much, if 3-button is needed for serial and/or ps/2, then add an additional setup option for them).
Re: [Linux] GUI discussion
I'm not able to compile under Arch linux, I get errors from allegro4:
Code: Select all
allegro-midi.c:22:6: error: conflicting types for ‘plat_midi_play_msg’
void plat_midi_play_msg(uint8_t* val)
^~~~~~~~~~~~~~~~~~
Re: [Linux] GUI discussion
Oki, I've added middle-click to release the mouse in windowed mode :)
I'll see if I can reproduce the focus issue. EDIT: I tried an always on top countdown timer that stole focus when the timer reached zero but I couldn't reproduce the problem. I did some changes anyway, let's see if it happens again.
I'll see if I can reproduce the focus issue. EDIT: I tried an always on top countdown timer that stole focus when the timer reached zero but I couldn't reproduce the problem. I did some changes anyway, let's see if it happens again.
I've added the missing MIDI-changes to the Allegro-version. However if you want to use the wxWidgets-UI you need to run configure with --enable-wxteppic wrote:I'm not able to compile under Arch linux, I get errors from allegro4:
Code: Select all
allegro-midi.c:22:6: error: conflicting types for ‘plat_midi_play_msg’ void plat_midi_play_msg(uint8_t* val) ^~~~~~~~~~~~~~~~~~
Last edited by bit on Sun 09 Jul, 2017 1:56 pm, edited 1 time in total.
Re: [Linux] GUI discussion
Ah I was probably compiling it with the wrong config option then. It fails to link now though, same with and without the wx optionbit wrote: I've added the missing MIDI-changes to the Allegro-version. However if you want to use the wxWidgets-UI you need to run configure with --enable-wx
Code: Select all
pcem-hdd.o:(.data.rel+0x200): undefined reference to `wd1007vse1_device'
pcem-hdd_esdi.o: In function `esdi_close':
hdd_esdi.c:(.text+0x2f): undefined reference to `hdd_close'
hdd_esdi.c:(.text+0x3b): undefined reference to `hdd_close'
pcem-hdd_esdi.o: In function `esdi_init':
hdd_esdi.c:(.text+0x13b): undefined reference to `hdd_load'
hdd_esdi.c:(.text+0x153): undefined reference to `hdd_load'
pcem-hdd_esdi.o: In function `esdi_callback':
hdd_esdi.c:(.text+0x886): undefined reference to `hdd_read_sectors'
hdd_esdi.c:(.text+0xdec): undefined reference to `hdd_write_sectors'
Re: [Linux] GUI discussion
Fixed :)teppic wrote:It fails to link now though, same with and without the wx option :)
Re: [Linux] GUI discussion
Builds fine now I can't test it at the moment (did a remote build) but will check it out later.