Re: [Linux] GUI discussion
Posted: Tue 30 May, 2017 9:15 pm
I build that too, works very nice.
Thank You!
Thank You!
Code: Select all
VPATH = . dosbox resid-fp
CPP = g++
CC = gcc
WXRC = wxrc
CFLAGS = -DRELEASE_BUILD -O3 -m32 -fomit-frame-pointer -msse2 -mstackrealign -D__MINGW64__ $(shell wx-config --cxxflags) $(shell wx-config --cxxflags)
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl.o cdrom-image.o \
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86.o compaq.o config.o cpu.o dac.o \
device.o dells200.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o hdd.o hdd_esdi.o headland.o i430lx.o i430fx.o \
i430vx.o ide.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o joystick_standard.o joystick_sw_pad.o joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o \
keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o lpt.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_ps2.o \
mouse_serial.o neat.o nmi.o nvr.o olivetti_m24.o opti495.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o \
scat.o serial.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_cms.o sound_dbopl.o \
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o x86seg.o x87.o xtide.o \
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-sdl2-hdconf.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display.o
DBOBJ = cdrom_image.o dbopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
LIBS = -mwindows -lopenal -lstdc++ -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid $(shell wx-config --libs) $(shell sdl2-config --libs) -static-libstdc++ -static-libgcc
PCem-wx-SDL2.exe: $(OBJ) $(DBOBJ) $(SIDOBJ)
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem-wx-SDL2.exe" $(LIBS)
all : PCem-wx-SDL2.exe
clean :
del *.o
del PCem-wx-SDL2.exe
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CFLAGS) -c $<
%.o : %.cpp
$(CPP) $(CFLAGS) -c $<
Code: Select all
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/pcem-9999 --htmldir=/usr/share/doc/pcem-9999/html --libdir=/usr/lib64 --enable-wx
Why? Emulators like MAME, Mednafen etc. also require copyrighted bios images and those emulators are packaged on most distros. The user must get bios files on her own.SarahWalker wrote:I'd be amazed if anyone ever wanted to put PCem in a distro. I'd have assumed that the legal issues associated with the required BIOS images would make it a complete non-starter.
Surely @bit can do it. If not, I could do it when I get some free time.SarahWalker wrote:If anyone does want to make PCem act more like a normal Linux application, then feel free!
Code: Select all
pcem-model.o: In function `at_batman_init':
model.c:(.text+0x109e): undefined reference to `sio_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:617: pcem] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/pcem-9999/work/pcem-9999/src'
make: *** [Makefile:368: all-recursive] Error 1
Roman S wrote:
Sure, I can take a look at it.AmatCoder wrote:Surely @bit can do it. If not, I could do it when I get some free time.
No problem :)AmatCoder wrote:For my part, no. That's exactly what I had in mind.
Thanks for working on this.
Code: Select all
[Paths]
roms_paths = ${HOME}/.pcem/roms/:/usr/share/pcem/roms/
nvr_path = ${HOME}/.pcem/nvr/
configs_path = ${HOME}/.pcem/configs/
logs_path = ${HOME}/.pcem/logs/
Np! :)AmatCoder wrote:@bit, I tested it and it's working like a charm. Now PCem (at least the wx port) can be packaged by distros :D . Thanks!
Yeah it works on Windows. It is primarily developed for Linux though so there might be some bugs when running it on Windows.Zup wrote:Does this GUI works in Windows?
Code: Select all
void set_nvr_path(char *s)
{
strncpy(nvr_path, s, 511);
nvr_path[511] = 0;
append_slash(nvr_path);
}
Oh I see, thanks! I'm still not used to programming C so it's great you're pointing out things like this :)JohnElliott wrote:Where you're using strncpy(), you need to make sure there's a terminating zero -- if strncpy() truncates the string, it doesn't add one. So, for example:Code: Select all
void set_nvr_path(char *s) { strncpy(nvr_path, s, 511); nvr_path[511] = 0; append_slash(nvr_path); }
Take a look at the mt32emu-branch on my GitHub. It's an experimental branch that adds built-in support for Roland MT-32 emulation using Munt and also adds Windows MIDI in the Windows-version.basic2004 wrote:Thanks for patching, but wxWidgets version didn't support MIDI out device yet.
If wxWidgets version can support MIDI, I'll use this on my Windows.
Oh! Standalone Intelligent MPU-401 with MUNT, this is very wonderful feature!bit wrote:Take a look at the mt32emu-branch on my GitHub. It's an experimental branch that adds built-in support for Roland MT-32 emulation using Munt and also adds Windows MIDI in the Windows-version.
Code: Select all
pc.o:pc.c:(.text+0x309): undefined reference to `midi_device_init'
pc.o:pc.c:(.text+0xef3): undefined reference to `midi_device_get_from_internal_name'
pc.o:pc.c:(.text+0xef8): undefined reference to `midi_device_current'
pc.o:pc.c:(.text+0x1728): undefined reference to `midi_device_current'
pc.o:pc.c:(.text+0x1e28): undefined reference to `midi_device_current'
pc.o:pc.c:(.text+0x1e30): undefined reference to `midi_device_get_internal_name'
sound.o:sound.c:(.text+0xb21): undefined reference to `midi_poll'
sound_mpu401_uart.o:sound_mpu401_uart.c:(.text+0x65): undefined reference to `midi_write'
sound_sb.o:sound_sb.c:(.text+0xf99): undefined reference to `mpu401_init'
sound_sb.o:sound_sb.c:(.text+0x1286): undefined reference to `mpu401_init'
wx-config.o:wx-config.c:(.text+0xa5d): undefined reference to `midi_device_getname'
wx-config.o:wx-config.c:(.text+0xa7b): undefined reference to `midi_device_available'
wx-config.o:wx-config.c:(.text+0xa8c): undefined reference to `midi_device_getname'
wx-config.o:wx-config.c:(.text+0xa98): undefined reference to `midi_device_current'
wx-config.o:wx-config.c:(.text+0x1037): undefined reference to `midi_device_current'
wx-config.o:wx-config.c:(.text+0x103f): undefined reference to `midi_device_has_config'
wx-config.o:wx-config.c:(.text+0x2280): undefined reference to `midi_device_current'
wx-config.o:wx-config.c:(.text+0x2884): undefined reference to `midi_device_getname'
wx-config.o:wx-config.c:(.text+0x289a): undefined reference to `midi_device_available'
wx-config.o:wx-config.c:(.text+0x28d1): undefined reference to `midi_device_current'
wx-config.o:wx-config.c:(.text+0x2d26): undefined reference to `midi_device_current'
wx-config.o:wx-config.c:(.text+0x2e08): undefined reference to `midi_device_has_config'
wx-config.o:wx-config.c:(.text+0x304c): undefined reference to `midi_device_getdevice'
collect2.exe: error: ld returned 1 exit status
make: *** [PCem-wx-SDL2.exe] Error 1
Oops, sorry. I had forgot to commit the makefile from my Windows PC, I've done that now :)basic2004 wrote:I testing wxWidgets version of PCem with my Windows.
but I saw these errors when compiling current revision(19140e5).Windows version(Makefile.mingw) compiled no errors, listing MIDI out devices with Windows MIDI, and plays MIDI very well.Code: Select all
pc.o:pc.c:(.text+0x309): undefined reference to `midi_device_init' pc.o:pc.c:(.text+0xef3): undefined reference to `midi_device_get_from_internal_name' pc.o:pc.c:(.text+0xef8): undefined reference to `midi_device_current' pc.o:pc.c:(.text+0x1728): undefined reference to `midi_device_current' pc.o:pc.c:(.text+0x1e28): undefined reference to `midi_device_current' pc.o:pc.c:(.text+0x1e30): undefined reference to `midi_device_get_internal_name' sound.o:sound.c:(.text+0xb21): undefined reference to `midi_poll' sound_mpu401_uart.o:sound_mpu401_uart.c:(.text+0x65): undefined reference to `midi_write' sound_sb.o:sound_sb.c:(.text+0xf99): undefined reference to `mpu401_init' sound_sb.o:sound_sb.c:(.text+0x1286): undefined reference to `mpu401_init' wx-config.o:wx-config.c:(.text+0xa5d): undefined reference to `midi_device_getname' wx-config.o:wx-config.c:(.text+0xa7b): undefined reference to `midi_device_available' wx-config.o:wx-config.c:(.text+0xa8c): undefined reference to `midi_device_getname' wx-config.o:wx-config.c:(.text+0xa98): undefined reference to `midi_device_current' wx-config.o:wx-config.c:(.text+0x1037): undefined reference to `midi_device_current' wx-config.o:wx-config.c:(.text+0x103f): undefined reference to `midi_device_has_config' wx-config.o:wx-config.c:(.text+0x2280): undefined reference to `midi_device_current' wx-config.o:wx-config.c:(.text+0x2884): undefined reference to `midi_device_getname' wx-config.o:wx-config.c:(.text+0x289a): undefined reference to `midi_device_available' wx-config.o:wx-config.c:(.text+0x28d1): undefined reference to `midi_device_current' wx-config.o:wx-config.c:(.text+0x2d26): undefined reference to `midi_device_current' wx-config.o:wx-config.c:(.text+0x2e08): undefined reference to `midi_device_has_config' wx-config.o:wx-config.c:(.text+0x304c): undefined reference to `midi_device_getdevice' collect2.exe: error: ld returned 1 exit status make: *** [PCem-wx-SDL2.exe] Error 1
Thanks to updating, I compiled wxWidgets version and works well.bit wrote:Oops, sorry. I had forgot to commit the makefile from my Windows PC, I've done that now
I'm working on this right now. Is there anything else that could be of interest to display? I'm thinking about adding an option to display the current instruments.basic2004 wrote:I want this feature, Showing MIDI Message (eg. 'The saga continues..' message showing when starting Prince of Persia 2) from PCem Machine(wxWidgets version) and Misc/Status(Windows version) When I select "Roland MT-32 Emulation".
If it was available for Linux I might have been interested to take a look at it, but unfortunately it is not. Maybe someone else is willing to do it.basic2004 wrote:And I want another feature, support VSTi.
I recommend "Roland SOUND Canvas VA", when found a path '%ProgramFiles%/Roland/Sound Canvas VA/SOUND Canvas VA.dll' installed SOUND Canvas VA.
This supports Roland SC-55(fully optimized with GM/GS supported DOS games), 88, 88Pro, and 8820.
or "VST Plugin" from MIDI out device, and select VST DLL file(path) and toggle showing VST panel from Configure.
Oh, that's interesting!bit wrote:I'm working on this right now. Is there anything else that could be of interest to display? I'm thinking about adding an option to display the current instruments.basic2004 wrote:I want this feature, Showing MIDI Message (eg. 'The saga continues..' message showing when starting Prince of Persia 2) from PCem Machine(wxWidgets version) and Misc/Status(Windows version) When I select "Roland MT-32 Emulation".
Yes, I found another VST host, 'Pedalboard2'. I'm enough with this and 'VSThost' now.bit wrote:If it was available for Linux I might have been interested to take a look at it, but unfortunately it is not. Maybe someone else is willing to do it.basic2004 wrote:And I want another feature, support VSTi.
I recommend "Roland SOUND Canvas VA", when found a path '%ProgramFiles%/Roland/Sound Canvas VA/SOUND Canvas VA.dll' installed SOUND Canvas VA.
This supports Roland SC-55(fully optimized with GM/GS supported DOS games), 88, 88Pro, and 8820.
or "VST Plugin" from MIDI out device, and select VST DLL file(path) and toggle showing VST panel from Configure.