Re: [Linux] GUI discussion
Posted: Sun 09 Jul, 2017 5:33 pm
Sorry! My bad. Fixed in rev 791.Roman S wrote:[edit] path.c and path.h seems to be missing in the repository...
Sorry! My bad. Fixed in rev 791.Roman S wrote:[edit] path.c and path.h seems to be missing in the repository...
Also i using Battler's 86Box, Press F12+F8 to release mouse from here.JosepMa wrote: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).
In PCem, the alternate way to get out of mouse capture is CTRL+END (it's written in the titlebar)basic2004 wrote:Also i using Battler's 86Box, Press F12+F8 to release mouse from here.
When using 3-button mice (and wheel mice), middle button to using guest's middle button, so F12+F8 is needed.
2-button mode can use F12+F8 too.
I'm not sure what's causing this. Do anyone have any idea?basic2004 wrote:Titlebar's encoding is messed up.
basic2004 wrote:I want to select synth mode from configuration of 'Roland MT-32 Emulation'.
I just committed it :)Battler wrote:The CM-32L was added?
When did you experience crashes? It'd be great if you can reproduce them so I can fix them :)teppic wrote:After the fix this compiles and runs on Arch Linux. A couple of crashes sometimes when changing the config, but the actual emulation seems really stable.
Quick question - is it based on the current development version or patched on the last release?
With the new interface changes I don't seem to be getting any crashes. The only weird thing I noticed is when you click to close the window the pop up appears behind other windows, so I thought it wasn't working.bit wrote: When did you experience crashes? It'd be great if you can reproduce them so I can fix them
I regularly merge in the latest from mainline so it is up to date.
I found this problem, this title encoded ANSI or UTF8 but titlebar want showing to Unicode(UTF-16LE) on Windows,bit wrote:I'm not sure what's causing this. Do anyone have any idea?basic2004 wrote:Titlebar's encoding is messed up.
Code: Select all
void sdl_set_window_title(const char* title) {
if (hwnd && !is_fullscreen())
SetWindowText(hwnd, title);
}
Code: Select all
void sdl_set_window_title(const char* title) {
if (window && !is_fullscreen())
SDL_SetWindowTitle(window, title);
}
Code: Select all
䍐浥瘠㈱倀敃䵭楡坮摮刀睡椠灮瑵爠来獩整敲Ⅴ
刀睡椠灮瑵爠来獩牴瑡潩慦汩摥ਡ䜀㍌琠獥t
Code: Select all
PCem v12 PCemMainWnd Raw input registered!
Raw input registration failed!
GL3 test
Code: Select all
if (!window)
{
char message[200];
sprintf(message,
"SDL window could not be created! Error: %s\n",
SDL_GetError());
wx_messagebox(window_ptr, message, "SDL Error", WX_MB_OK);
return 0;
}
SDL_SetWindowTitle(window, "PCem v12"); // here
SDL_SetWindowPosition(window, rect.x, rect.y);
SDL_SetWindowSize(window, rect.w, rect.h);
Code: Select all
gcc -march=i686 -O3 -m32 -msse2 -mfpmath=sse -fomit-frame-pointer -mstackrealign -DRELEASE_BUILD -c wx-sdl2-display-win.c
wx-sdl2-display-win.c: In function 'window_create':
wx-sdl2-display-win.c:532:29: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
wincl.lpszClassName = szClassName;
^
wx-sdl2-display-win.c:551:29: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
wincl.lpszClassName = szSubClassName;
^
wx-sdl2-display-win.c:569:33: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
info.dwTypeData = label;
^
wx-sdl2-display-win.c:23:21: warning: passing argument 2 of 'CreateWindowExW' from incompatible pointer type [-Wincompatible-pointer-types]
#define szClassName "PCemMainWnd"
^
wx-sdl2-display-win.c:23:21: note: in definition of macro 'szClassName'
#define szClassName "PCemMainWnd"
^~~~~~~~~~~~~
In file included from C:/mingw/mingw32/i686-w64-mingw32/include/windows.h:72:0,
from wx-sdl2-display-win.c:12:
C:/mingw/mingw32/i686-w64-mingw32/include/winuser.h:2135:26: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'char *'
WINUSERAPI HWND WINAPI CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
^~~~~~~~~~~~~~~
wx-sdl2-display-win.c:578:17: warning: passing argument 3 of 'CreateWindowExW' from incompatible pointer type [-Wincompatible-pointer-types]
"PCem v12", /* Title Text */
^~~~~~~~~~
In file included from C:/mingw/mingw32/i686-w64-mingw32/include/windows.h:72:0,
from wx-sdl2-display-win.c:12:
C:/mingw/mingw32/i686-w64-mingw32/include/winuser.h:2135:26: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'char *'
WINUSERAPI HWND WINAPI CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
^~~~~~~~~~~~~~~
wx-sdl2-display-win.c: In function 'window_close':
wx-sdl2-display-win.c:24:24: warning: passing argument 1 of 'UnregisterClassW' from incompatible pointer type [-Wincompatible-pointer-types]
#define szSubClassName "PCemSubWnd"
^
wx-sdl2-display-win.c:24:24: note: in definition of macro 'szSubClassName'
#define szSubClassName "PCemSubWnd"
^~~~~~~~~~~~
In file included from C:/mingw/mingw32/i686-w64-mingw32/include/windows.h:72:0,
from wx-sdl2-display-win.c:12:
C:/mingw/mingw32/i686-w64-mingw32/include/winuser.h:2083:29: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'char *'
WINUSERAPI WINBOOL WINAPI UnregisterClassW (LPCWSTR lpClassName, HINSTANCE hInstance);
^~~~~~~~~~~~~~~~
wx-sdl2-display-win.c:23:21: warning: passing argument 1 of 'UnregisterClassW' from incompatible pointer type [-Wincompatible-pointer-types]
#define szClassName "PCemMainWnd"
^
wx-sdl2-display-win.c:23:21: note: in definition of macro 'szClassName'
#define szClassName "PCemMainWnd"
^~~~~~~~~~~~~
In file included from C:/mingw/mingw32/i686-w64-mingw32/include/windows.h:72:0,
from wx-sdl2-display-win.c:12:
C:/mingw/mingw32/i686-w64-mingw32/include/winuser.h:2083:29: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'char *'
WINUSERAPI WINBOOL WINAPI UnregisterClassW (LPCWSTR lpClassName, HINSTANCE hInstance);
^~~~~~~~~~~~~~~~
Code: Select all
pc.o: In function `resetpchard':
pc.c:(.text+0x3d8): undefined reference to `midi_device_init'
pc.o: In function `loadconfig':
pc.c:(.text+0x1062): undefined reference to `midi_device_get_from_internal_name'
pc.c:(.text+0x1067): undefined reference to `midi_device_current'
pc.c:(.text+0x19a9): undefined reference to `midi_device_current'
pc.o: In function `saveconfig':
pc.c:(.text+0x20dd): undefined reference to `midi_device_current'
pc.c:(.text+0x20e5): undefined reference to `midi_device_get_internal_name'
sound.o: In function `sound_poll':
sound.c:(.text+0xb78): undefined reference to `midi_poll'
sound_mpu401_uart.o: In function `mpu401_uart_write':
sound_mpu401_uart.c:(.text+0x60): undefined reference to `midi_write'
sound_sb.o: In function `sb_16_init':
sound_sb.c:(.text+0xf9f): undefined reference to `mpu401_init'
sound_sb.o: In function `sb_awe32_init':
sound_sb.c:(.text+0x128e): undefined reference to `mpu401_init'
wx-config.o: In function `config_dlgsave':
wx-config.c:(.text+0x232a): undefined reference to `midi_device_current'
wx-config.c:(.text+0x2a1c): undefined reference to `midi_device_current'
wx-config.o: In function `config_dlgproc':
wx-config.c:(.text+0x398f): undefined reference to `midi_device_getname'
wx-config.c:(.text+0x39a5): undefined reference to `midi_device_available'
wx-config.c:(.text+0x39d9): undefined reference to `midi_device_current'
wx-config.c:(.text+0x3f15): undefined reference to `midi_device_current'
wx-config.c:(.text+0x3f1d): undefined reference to `midi_device_has_config'
wx-config.c:(.text+0x5057): undefined reference to `midi_device_getname'
wx-config.c:(.text+0x506d): undefined reference to `midi_device_available'
wx-config.c:(.text+0x50a1): undefined reference to `midi_device_current'
wx-config.c:(.text+0x54b3): undefined reference to `midi_device_has_config'
wx-config.c:(.text+0x56aa): undefined reference to `midi_device_getdevice'
collect2: error: ld returned 1 exit status
make: *** [PCem-wx-SDL2] Error 1
Ah good point. I've made that dialog always on top so it shouldn't happen again :)teppic wrote:With the new interface changes I don't seem to be getting any crashes. The only weird thing I noticed is when you click to close the window the pop up appears behind other windows, so I thought it wasn't working.
Oooh I see. That's great info, thanks!basic2004 wrote:I found this problem, this title encoded ANSI or UTF8 but titlebar want showing to Unicode(UTF-16LE) on Windows,
I've forgotten to update the linux32-makefile for a while, which is the cause of those undefined references :)szadycbr wrote:Do i have configured something wrong on my ubuntu?
Good point, I added some checks so now it won't crash at least :)leilei wrote:The shader stuff could use some sanity checking. I get crashes when starting a config with missing shaders (including missing shaders defined in glslps)
Unfortunately this won't work in a glslp. According to the glslp-spec (https://github.com/Themaister/Emulator- ... /Cg/README) the PREV-uniforms which the motionblur-shaders use work on the previously rendered frames but every shader in an glslp renders during one frame.leilei wrote:I tried to chain motionblur shaders together in a glslp and it doesn't seem to happen either. It still acts like there's one of them in use
I assume you mean the filter that you select in the menu. It does work, but a bit differently than the other modes. Since it's doing multiple rendering-passes the filter is applied only during the first pass. If no shaders are used it would look the same as the other modes if there were only one rendering-pass but since it was easier to always do two passes it won't have the same behavior there.leilei wrote:Also does bilinear filter ever work in GL3?
What's a backporch?leilei wrote:Would be nice if it somehow supported the backporch. I feel that's strongly missing from it as the corners are cutting off text
I tried SetWindowTextA already but I use it SDL_SetWindowTitle if PCem applied language pack later, ANSI version can conflict with them.bit wrote:Apparently wxWidgets is Unicode-enabled by default, and the code from win.c is probably not Unicode-aware.
Maybe an easy fix would be to use ANSI-version (for example SetWindowTitleA) of those functions?
Code: Select all
Thread 1 "pcem" received signal SIGSEGV, Segmentation fault.
deviceconfig_open (hwnd=<optimized out>, device=0x0) at wx-deviceconfig.cc:229
229 device_config_t *config = device->config;
Great! Yeah I though it was easier to do it like that for now :)basic2004 wrote:I compiled latest revision again, I understood why you select multibyte(ANSI)...
I saw no warnings anymore in this revision. Great!!
Is PCem plan to support language pack?
Yeah on Linux everything pcem-related can be found in ~/.pcem/. By default the roms will be searched in ~/.pcem/roms and /usr/share/pcem/romsszadycbr wrote:Thank You bit, it compiles with no problems now.
I still have some problems running it, the previous version from you which i compiled on second page of this topic works great, however now it does not see roms folder in pcem directory, only if i copy it to usr/share/pcem/roms. at every start it always says "Configured romset not available. Defaulting to available romset." , dont know why. also after few runs , on and off the whole program something gets messed up with rooms i guess, cos it shows video bios, and it close before you can see bios screen , if i copy roms folder again to usr/share.... then it works again but no log file is created during the crash. when i select CD rom it asks me for hard disk .img file, all i can do is see all files and select the iso, but it still assumes that the iso is a hdd and bios does see it as such, so no CD. also when i quit quake_sw it hangs on the exit screen (under dos) , so yeah, few problems to be checked in linux version.
But hey! its not all bad, to my surprise (honestly i did not expect that) quake 1 performance is much better, like much much better using exactly same configuration, comparing to previous build, on p120mmx at default 320x200 it was always smooth but after switching to 360x480 the screen was horribly "scrolling" and now is almost same as at 320x200 and smooth with no scrolling, maybe cos of the few new instructions in cpu code? i dont know, but it is definitely running it faster, i though performance wont be any better on my laptop, well i was wrong, very nice surprise.
Thank You for your work .BTW the gui seems to be even better now.
Tested on ubuntu 14.04 lts 32bit. ;)
EDIT: it seems to that copying roms folder to usr/share/pcem/ helped but not always , and now most of the time is not working, just quick display video bios and crash right away , without log file. sometimes i manage it to run but only till i close app, then again it wont start.
Can anyone try 32 bit wx sdl2 linux version and tell, does it behave the same way?
Yeah it was recently changed on Linux to be more like other Linux-applications, which is why everything pcem-related can be found in ~/.pcem/teppic wrote:I used strace to find out where it was looking for roms, as it ignores the directory it's installed in. It searches under ~/.pcem/roms
Another issue is that it's case sensitive and so it will miss any filenames with capital letters in them. I got around it by sticking the roms on a FAT partition and linking it to that directory.
Code: Select all
find . -depth -exec rename -v 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
Good catch, fixed! :)teppic wrote:edit: also, if no midi device is set and you click the settings button it crashes, gdb says this line caused the crash:
Code: Select all
Thread 1 "pcem" received signal SIGSEGV, Segmentation fault. deviceconfig_open (hwnd=<optimized out>, device=0x0) at wx-deviceconfig.cc:229 229 device_config_t *config = device->config;
Code: Select all
svn checkout https://github.com/mborjesson/PCem-wx-SDL2.git pcem
cd pcem/branches/fluidsynth
./configure --enable-wx
make
Ouch, that doesn't sound good. I hope you get it working again!szadycbr wrote:Thank You bit , i found the log file, and i can see that it is something wrong with my system, apparentely i do write this reply from puppy linux, it appears as i broke down my ubuntu, (firt time!!!). the PCem log says that it could not crate files, etc. so no wonder why it crahes, and PCem from command line shows that i have no root permission to IBUS , that user share is not working , and bla bla. So it looks as PCem is working fine.
I need to install new ubuntu i guess cos now everything gets fu..ed and it hangs on everything, also Sudo gets broken, blah!!! how? doesnt matter, just want to say that it is probably fault in my sysytem , so no worries, and thanks.
I haven't updated the autoconf-files so you need to runLaucian wrote:I just compiled the Fluidsynth branch, but I can't select it as a MIDI option. I tried editing the file manually, but my changes were reverted to "None". Fluidsynth itself works on SCUMMVM. What could be causing that? I'm using Arch Linux.
I have the lingering suspicion I might have compiled it without Fluidsynth support somehow. I just didCode: Select all
svn checkout https://github.com/mborjesson/PCem-wx-SDL2.git pcem cd pcem/branches/fluidsynth ./configure --enable-wx make
Code: Select all
make -f Makefile.linux64-wx-sdl2
Nice! :)leilei wrote:Here's some shader presets to have fun with
https://github.com/leilei-/someshaders
feel free to improve/whatever. I hope i'm doing this right
(I did think about implementing V1/V2/V3 filter as a shader for this repo, but that would also require a Voodoo CLUT shader to apply after it, as well as extensive hacking to make them the first shaders processed and only for when the voodoo's used. Also since the shader stuff's independently rendered, an interference shader (i.e. moving diagonal lines, should be a trivial sin job) could be possible for more accurate Voodoo signal emulation :P)
Soon I'd like to update mainline with the new things I've added: Updated GUI (wx), OpenGL 3.0 with glslp/glsl shader-support (wx), updated MIDI with Roland MT-32 Emulation (all versions). Is there something of that you don't want to be added?SarahWalker wrote:Paths changes (finally) committed at rev 789.
That works, thanks.bit wrote:I haven't updated the autoconf-files so you need to runfrom the src-directory.Code: Select all
make -f Makefile.linux64-wx-sdl2
Could you explain this a bit more? I'm not sure what you mean.Laucian wrote:I noticed a bug. Any changes to a machine sets the memory (mem_size) to 1024, 640 or 64 depending on the machine, so I'm guessing the lowest value. Editing the file yourself is a workaround.