[Linux] GUI discussion

Discussion of development and patch submission.
buka
Posts: 11
Joined: Tue 17 Nov, 2015 9:13 pm

Re: [Linux] GUI discussion

Post by buka » Sat 20 May, 2017 10:00 am

Okay I seem to have some problems getting Voodoo 2 emulation to work. The drivers installed fine but upon launching 3dfx games I get this error as if windows could not properly detect the voodoo card. It appears on windows boot also. Has anyone also encountered this problem and possibly found a solution to it?


Image

Image

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Sat 20 May, 2017 12:04 pm

Buka, i think you installed win98 and you let windows to detect and install drivers, right? windows drivers install hardware but not glide libraries, take one of this drivers http://www.falconfly.de/voodoo2.htm and install them. i dont know what kind of drivers are this ones , are they with setup or just pure drivers , either way uninstall that shit from device manager and install one of this, it WILL work. if in any case there will be no setup, then do it manually.

buka
Posts: 11
Joined: Tue 17 Nov, 2015 9:13 pm

Re: [Linux] GUI discussion

Post by buka » Sat 20 May, 2017 12:15 pm

Windows automatically installed drivers for the s3 virge, not the voodoo 2. I installed it manually, the latest reference driver from the very site you've just mentioned. Even tried older drivers from the site and they don't work either.

I even tried windows 95 and got the same error. That's why I think it might be related to the unofficial build provided by @bit or maybe some compilation issue, I'm not sure, it's weird.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Sat 20 May, 2017 12:18 pm

Very strange, it should work. maybe you right, cos on Sarah versions its fine. lets wait for Bit answer.
Last edited by szadycbr on Tue 23 May, 2017 10:35 am, edited 1 time in total.

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sat 20 May, 2017 3:50 pm

Voodoo2 should work :)
However the issue you're experiencing could be related to the Voodoo recompiler on 64-bit Linux which doesn't seem to work properly, at least with the games I've tried it with. So if you're running a 64-bit build and have it enabled you could try to disable it and see if it starts working.

buka
Posts: 11
Joined: Tue 17 Nov, 2015 9:13 pm

Re: [Linux] GUI discussion

Post by buka » Sat 20 May, 2017 4:44 pm

bit wrote:Voodoo2 should work :)
However the issue you're experiencing could be related to the Voodoo recompiler on 64-bit Linux which doesn't seem to work properly, at least with the games I've tried it with. So if you're running a 64-bit build and have it enabled you could try to disable it and see if it starts working.
Bingo ;)

Disabling the recompiler eliminates the issue. Let's get to testing, hopefully the performance won't be terrible.

User avatar
SarahWalker
Site Admin
Posts: 1757
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Linux] GUI discussion

Post by SarahWalker » Sat 20 May, 2017 5:41 pm

Finally had a play with this. In general I like - a huge improvement on the Allegro GUI. Any objections to me merging this into mainline?

A few comments :
  • Obviously on mainline the interface has changed a bit, to include the new configuration manager. Could these changes be added to this interface? I'd like to see this before I merge it.
  • I found on VMware running Ubuntu 16.02 that the renderer defaulted to OpenGL, which on this configuration resulted in a black window. Maybe default to software?
  • I'm not entirely keen on the separate window for the menu, but I understand that this makes interfacing with SDL/OpenGL somewhat easier.
  • I found that on Ubuntu 14.04 that trying to get the required versions of libraries was sufficiently difficult to the point of "I can't be arsed with this"! Therefore I suspect the Allegro GUI will stay in the codebase, at least in the short term, as I expect resolving the dependencies on some distros may be a tad tricky.

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sun 21 May, 2017 11:30 am

SarahWalker wrote:Finally had a play with this. In general I like - a huge improvement on the Allegro GUI. Any objections to me merging this into mainline?
I'm happy you like it! :)
I have no objections about merging it.
SarahWalker wrote:Obviously on mainline the interface has changed a bit, to include the new configuration manager. Could these changes be added to this interface? I'd like to see this before I merge it.
I'm currently working on adding in those changes. It might take a little while since it's quite a big change :)
SarahWalker wrote:I found on VMware running Ubuntu 16.02 that the renderer defaulted to OpenGL, which on this configuration resulted in a black window. Maybe default to software?
That shouldn't be a problem. The software renderer is missing a few features though such as linear filtering, but maybe a message box could pop up the first time explaining that it's there for compatibility reasons and should be changed to OpenGL if possible.
SarahWalker wrote:I'm not entirely keen on the separate window for the menu, but I understand that this makes interfacing with SDL/OpenGL somewhat easier.
I've actually been experimenting with using right click on the display-window to show the menu instead which I could look in to adding if you'd like. It would make it behave more like the Windows-/Allegro-versions and the machine-window could be hidden by default and be more like the status-window in the Windows-version.
SarahWalker wrote:I found that on Ubuntu 14.04 that trying to get the required versions of libraries was sufficiently difficult to the point of "I can't be arsed with this"! Therefore I suspect the Allegro GUI will stay in the codebase, at least in the short term, as I expect resolving the dependencies on some distros may be a tad tricky.
I haven't tried Ubuntu 14.04 but I could take a look at it so it can be built with the versions it has. But keeping Allegro for the time being is a good idea as an alternative.

EluanCM
Posts: 70
Joined: Tue 27 Oct, 2015 2:07 pm
Location: Brazil
Contact:

Re: [Linux] GUI discussion

Post by EluanCM » Sun 21 May, 2017 4:51 pm

bit wrote: That shouldn't be a problem. The software renderer is missing a few features though such as linear filtering, but maybe a message box could pop up the first time explaining that it's there for compatibility reasons and should be changed to OpenGL if possible.
But linear filtering should be disabled when emulating screens, IMHO it just makes things blurry and ugly.

basic2004
Posts: 124
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Linux] GUI discussion

Post by basic2004 » Sun 21 May, 2017 5:49 pm

EluanCM wrote:
bit wrote: That shouldn't be a problem. The software renderer is missing a few features though such as linear filtering, but maybe a message box could pop up the first time explaining that it's there for compatibility reasons and should be changed to OpenGL if possible.
But linear filtering should be disabled when emulating screens, IMHO it just makes things blurry and ugly.
Blurry and ugly vs. Dotty and ugly

I want both, PCem should add rendering 'OpenGL'(show like d3d), 'OpenGL Non-Blur'(openglnb, show like ddraw) mode.
and I want PCem use GLSL shaders like RetroArch or DOSBox SVN Daum.

Shaders can make various screen effects, this can show sharp and clean pixel when PCem turned on 4:3 mode or resized.

Ultimately... PCem should select 'Audio Out' devices(default and various audio devices) and buffer for low-latency.
DirectSound, XAudio, ASIO and WASAPI in Windows,
PulseAudio, ALSA, JACK in Linux,
and so on.

Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Linux] GUI discussion

Post by Battler » Sun 21 May, 2017 6:06 pm

- basic2004: PCem uses OpenAL for audio, which on Windows runs on top of DirectSound.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Mon 22 May, 2017 2:32 pm

i got same thing as Leilei :
wx-sdl2-video.c:311:9: error: 'for' loop initial declarations are only allowed in C99 mode
wx-sdl2-video.c:311:9: note: use option -std=c99 or -std=gnu99 to compile your code

and i dont know how to change script or else. I m trying to build this on ubuntu 16 and so far that is my first error.

AmatCoder
Posts: 28
Joined: Thu 02 Mar, 2017 8:45 pm

Re: [Linux] GUI discussion

Post by AmatCoder » Wed 24 May, 2017 1:39 am

@szadycbr
You can edit makefile and add option -std=gnu99 to CFLAGS.

Example: If you want 64-bit version then edit Makefile.linux64-wx-sdl2 file and change line 5 from
CFLAGS = -Doff64_t=__off64_t -O3 -fomit-frame-pointer -msse2 -m32 $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)
to
CFLAGS = -Doff64_t=__off64_t -O3 -fomit-frame-pointer -msse2 -m32 -std=gnu99 $(shell wx-config --cxxflags) $(shell sdl2-config --cflags)

This happens on Ubuntu because it uses 4.x.x version of gcc which default C mode was -std=gnu89.
With 5.x.x and later versions it works because the default was changed to -std=gnu11.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Wed 24 May, 2017 5:30 am

@AmatCoder
Thank you very much,i m learning thanks to You guys, and i m grateful for it, now it goes nearly to the end but , again i got errors:
wx-sdl2-display.o: In function `render':
wx-sdl2-display.c:(.text+0xe17): undefined reference to `SDL_WarpMouseGlobal'
wx-sdl2-display.c:(.text+0xefc): undefined reference to `SDL_GetGlobalMouseState'
collect2: error: ld returned 1 exit status

i use 32bit ubuntu, and , could You explain what does it mean and is it important? cos i got a loot of this warning :
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++ [enabled by default]
is that something i need to worry?
And one more thing, is there any way that i could Learn all of that alone from home? i keep posting this questions but i would like to learn a least the basics, can You tell me how You obtain that knowledge? and how many years it took? Do you have to attend a special school or i can learn in home?

AmatCoder
Posts: 28
Joined: Thu 02 Mar, 2017 8:45 pm

Re: [Linux] GUI discussion

Post by AmatCoder » Wed 24 May, 2017 3:06 pm

szadycbr wrote:@AmatCoder
Thank you very much,i m learning thanks to You guys, and i m grateful for it, now it goes nearly to the end but , again i got errors:
wx-sdl2-display.o: In function `render':
wx-sdl2-display.c:(.text+0xe17): undefined reference to `SDL_WarpMouseGlobal'
wx-sdl2-display.c:(.text+0xefc): undefined reference to `SDL_GetGlobalMouseState'
collect2: error: ld returned 1 exit status
Are you using Ubuntu 14.04?
Those functions only are available since SDL 2.0.4 and Ubuntu 14.04 has 2.0.2 version.
szadycbr wrote:i use 32bit ubuntu, and , could You explain what does it mean and is it important? cos i got a loot of this warning :
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++ [enabled by default]
is that something i need to worry?
No, that is because CFLAGS also are passed to g++ but is ignored, don't worry.
szadycbr wrote:And one more thing, is there any way that i could Learn all of that alone from home? i keep posting this questions but i would like to learn a least the basics, can You tell me how You obtain that knowledge? and how many years it took? Do you have to attend a special school or i can learn in home?
Well, I learned alone. Just getting knowledge from internet (tutorials, etc.) ... and a lot of time wasted with those things, I guess. ;)

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Wed 24 May, 2017 3:47 pm

@AmatCoder thank You, And yes i use 14.04 LTS, bahh!!!! i should go for 16 i guess. i checked Synaptic and only 2.0.2 is avaliable, ehh.
BTW Thanks to PCem i did compile linux version of Return To Castle Wolfenstain!!!!
The more i will play with PCem the more i will know, i think.
Thank You again for all Your help. its time for upgrade from the 14 :mrgreen:

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Wed 24 May, 2017 5:03 pm

@AmatCoder Ta Daa!!! grandpa Google help me in ubuntu 14.04 :
wget http://libsdl.org/release/SDL2-2.0.4.tar.gz -O - | tar xz
cd SDL2-2.0.4
./configure
make
sudo make install

And it works great , compiled first time, just had to remove 2.0.2 before this.
and had to rename 430vx bios to be available.
Without Your help i would not have a clue what to do!!! Thanks Again :D
Testing Begin!!!!

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Sat 27 May, 2017 10:14 am

Hi Bit, i checked Your new build, it compiled no problems . the new config folder and saving config seems to work well and its quite nice, i can without any hassle now save multiple configurations.
But , there is a problem i can not bring menu , and by pressing ctrl-alt-pgdn it goes full screen, when i press ctrl-alt-pgup it pops separate window in a form of white box on the middle of PCem screen, i can put it in background but i cant switch it off.
The white box window is named "null frame" so i guess something went wrong either with compiling or i miss something in my system.
Attachments
ctr-alt-pgup (null frame).png
ctr-alt-pgup (null frame).png (20.08 KiB) Viewed 5366 times

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sat 27 May, 2017 12:49 pm

There's now an update available on GitHub which would be great if I could get some feedback on :)

Here's the main changes:
  • The GUI no longer requires to be two windows. Instead I've added right-click shortcut on the display-window to access the menu. The machine-window is still there and it's possible to get almost the same behavior as before by selecting Options -> Show on start.
  • Added the new configuration manager. Also added rename/delete to manage configurations easier.
  • Fixed the compilation issues on Ubuntu 14.04.5. The minimum required version of SDL2 is now 2.0.1.
  • Added host CD/DVD drive to the menu.
  • Software is now the default renderer.
There's still a few things missing that I'm going to add (like resetting "don't show this again" messages) and some other things, but the main features are there at least.
Regarding Windows and OSX the focus right now is on Linux so I'm not sure the port works properly there at the moment.

I hope everyone like the changes!
szadycbr wrote:But , there is a problem i can not bring menu , and by pressing ctrl-alt-pgdn it goes full screen, when i press ctrl-alt-pgup it pops separate window in a form of white box on the middle of PCem screen, i can put it in background but i cant switch it off.
The white box window is named "null frame" so i guess something went wrong either with compiling or i miss something in my system.
Oh right, I had forgotten to remove the keyboard-shortcut so it toggled the visibility of the invisible menu frame which is empty. I've removed it now :)
The menu is now accessed through right-clicking on the display-window.
Last edited by bit on Sat 27 May, 2017 7:31 pm, edited 1 time in total.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Sat 27 May, 2017 3:14 pm

@Bit Well Done, it works Flawlessly!!! right click, it bring menu , from this menu i can bring machine window and Pause emulation. Everything is Available through right click menu!!!! The config window works great, now i have 430vx and 486ami machines with two separate hdd images , quickly accessible by one click. All changes to configurations are automatically saved , so no worries.
It took me a minute or two to get use to the layout , but everything is there!!!
Without bringing any additional widow from main PCem window by right click menu i can change disks and cd's.
Its really brilliant.
Although this is all perfect it would be nice if user could undock mouse cursor by middle mouse click like in windows (ehh, lazy people he he :D ), but of course it is not necessary at all, but then you can do it all with one hand :mrgreen: .
For anyone who can, please do check it , its worth it!!!
I think That the journey onto new GUI in Linux is complete, i cant think what else user could want.

andr25352
Posts: 9
Joined: Sun 12 Feb, 2017 9:50 am

Re: [Linux] GUI discussion

Post by andr25352 » Sat 27 May, 2017 4:59 pm

@Bit Hi, I have tried your new GUI and I have two issues worth mentioning:

1. I cannot get the "iso" button on my danish keyboard to work, it does nothing at all(this was also an issue with the earlier build, but not the Windows build).
I wasn't sure whether it is actually called iso, but that is the only term I know to describe it.
On this grid view of an iso keyboard it's B-00.
https://en.wikipedia.org/wiki/File:Keyb ... 9995-1.jpg

2. Show on start on the machine is not persistent after a complete reset of the application.

szadycbr
Posts: 290
Joined: Mon 21 Nov, 2016 6:23 pm

Re: [Linux] GUI discussion

Post by szadycbr » Sat 27 May, 2017 6:16 pm

@andr25352 good catch, this button does not work here either. I guess it needs some TLC , and it would be fine.

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sat 27 May, 2017 7:29 pm

szadycbr wrote:@Bit Well Done, it works Flawlessly!!!
Thank you! :)
szadycbr wrote:Although this is all perfect it would be nice if user could undock mouse cursor by middle mouse click like in windows
I've actually disabled the middle mouse button on purpose, mainly because I wanted to use it when using Windows 95 while in windowed mode. But it's not that difficult to add it if people want it :)
andr25352 wrote:1. I cannot get the "iso" button on my danish keyboard to work, it does nothing at all(this was also an issue with the earlier build, but not the Windows build).
...
2. Show on start on the machine is not persistent after a complete reset of the application.
Good catch! I don't think I ever tried that key so I never noticed it was missing :)
Both of these issues has been fixed.

andr25352
Posts: 9
Joined: Sun 12 Feb, 2017 9:50 am

Re: [Linux] GUI discussion

Post by andr25352 » Sat 27 May, 2017 8:37 pm

@Bit Thanks, it works really nice now,
except that Show on start is still not marked after a reset of the application,
so it looks like it is disabled even though it is enabled.

Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Linux] GUI discussion

Post by Battler » Sat 27 May, 2017 9:03 pm

andr25352 wrote:1. I cannot get the "iso" button on my danish keyboard to work, it does nothing at all(this was also an issue with the earlier build, but not the Windows build).
I wasn't sure whether it is actually called iso, but that is the only term I know to describe it.
On this grid view of an iso keyboard it's B-00.
https://en.wikipedia.org/wiki/File:Keyb ... 9995-1.jpg
It's what I call the "Central European key"... and this goes to show my fears were spot on, SDL 2 is still bad for handling the keyboard, as keys not present on US keyboards do not seem to be getting passed through at all.
bit wrote:Good catch! I don't think I ever tried that key so I never noticed it was missing :)
If you have to manually add support for a key, then this is more proof IMHO, that SDL 2's keyboard handling is bad. A good keyboard handler gets the scan codes as they are pressed and passes them on unaltered.

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sat 27 May, 2017 9:05 pm

andr25352 wrote:@Bit Thanks, it works really nice now,
except that Show on start is still not marked after a reset of the application,
so it looks like it is disabled even though it is enabled.
Oops, forgot that one :)
Fixed!

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Sat 27 May, 2017 9:56 pm

Battler wrote:If you have to manually add support for a key, then this is more proof IMHO, that SDL 2's keyboard handling is bad. A good keyboard handler gets the scan codes as they are pressed and passes them on unaltered.
Unfortunately getting the raw scancodes is a bit difficult on Linux, or the X server to be more precise. It depends on which keyboard driver is used and how that driver translates the scancodes.
Looking at the SDL2 source I wouldn't say that SDL2's keyboard-handling is bad, I think it's awesome that the SDL-devs are willing to take care of that mess so we don't have to do all that ourselves :)
But yeah, it would have been nice if SDL2 provided translated raw scancodes so we wouldn't have to do that.

It could be possible to use evdev which is raw input but that would lock out users that don't use that.

User avatar
SarahWalker
Site Admin
Posts: 1757
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Linux] GUI discussion

Post by SarahWalker » Mon 29 May, 2017 2:39 pm

Committed at rev 737.

User avatar
SarahWalker
Site Admin
Posts: 1757
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Linux] GUI discussion

Post by SarahWalker » Mon 29 May, 2017 3:25 pm

And rev 738 lets you build it through autoconf - './configure --enable-wx'. The library checks for this may not be 100% correct.

bit
Posts: 98
Joined: Sun 19 Mar, 2017 7:04 pm

Re: [Linux] GUI discussion

Post by bit » Tue 30 May, 2017 8:13 pm

SarahWalker wrote:Committed at rev 737.
Nice! It works great!

Post Reply