Joystick Support?

Support and general discussion.
Post Reply
LanceSteel
Posts: 1
Joined: Thu 22 May, 2014 3:56 am

Joystick Support?

Post by LanceSteel »

I've really been getting into this emulator for running my collection of classic DOS games. Is there any plans on the horizon for joystick support? I ask because I'm itching to play Wing Commander 1 and 2 and Privateer and the mouse just doesn't have the same feel! Thanks for all the hard work. The emulator is great!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Joystick Support?

Post by SarahWalker »

Just added this, at rev 106.
Bugman
Posts: 7
Joined: Thu 05 Jun, 2014 8:14 pm

Re: Joystick Support?

Post by Bugman »

Your emulator is awesome. It is a nice alternative to others out there, and is much more realistic. The only issue I have been having is PC speaker support in a few games.
I was curious, any chance you could post a compiled windows executable so I can try out some of the new features? I've read instructions from another forum and have some luck. But still too many errors to get a complied file.
Thanks for you help! -Brian
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Joystick Support?

Post by therock247uk »

Heres the errors

Errors here to...

therock247uk@DELL-PC /c/users/therock247uk/desktop/PCem-0202ec1f468e/PCem-0202ec
1f468e/src
$ make -f makefile.mingw
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c 386.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c 808x.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c acer386sx.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c ali1429.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c amstrad.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c cdrom-ioctl.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c config.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c cpu.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c dac.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c device.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c dma.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c fdc.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c gameport.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c headland.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c i430vx.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c ide.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c io.c
io.c: In function 'io_init':
io.c:23:51: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_inb[c][0] = port_inw[c][0] = port_inl[c][0] = NULL;
^
io.c:23:33: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_inb[c][0] = port_inw[c][0] = port_inl[c][0] = NULL;
^
io.c:24:51: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_outb[c][0] = port_outw[c][0] = port_outl[c][0] = NULL;
^
io.c:24:33: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_outb[c][0] = port_outw[c][0] = port_outl[c][0] = NULL;
^
io.c:25:51: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_inb[c][1] = port_inw[c][1] = port_inl[c][1] = NULL;
^
io.c:25:33: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_inb[c][1] = port_inw[c][1] = port_inl[c][1] = NULL;
^
io.c:26:51: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_outb[c][1] = port_outw[c][1] = port_outl[c][1] = NULL;
^
io.c:26:33: warning: assignment from incompatible pointer type [enabled by defau
lt]
port_outb[c][1] = port_outw[c][1] = port_outl[c][1] = NULL;
^
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c jim.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard_amstra
d.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard_at.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard_olim24
.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard_pcjr.c

gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c keyboard_xt.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c lpt.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c mcr.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c mem.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c model.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c mouse.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c mouse_ps2.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c mouse_serial.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c neat.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c nvr.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c olivetti_m24.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c opti.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c pc.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c pci.c
pci.c: In function 'pci_init':
pci.c:76:30: warning: assignment from incompatible pointer type [enabled by defa
ult]
pci_card_read[c] = pci_card_write[c] = pci_priv[c] = NULL;
^
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c pic.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c piix.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c pit.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c ppi.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c rom.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c serial.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sis496.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_ad1848.c
sound_ad1848.c: In function 'ad1848_init':
sound_ad1848.c:199:31: warning: incompatible implicit declaration of built-in fu
nction 'pow' [enabled by default]
attenuation = pow(10, attenuation / 10);
^
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_adlib.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_adlibgold
.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_cms.c
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_dbopl.cc
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_emu8k.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_gus.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_mpu401_ua
rt.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_opl.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_pas16.c
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_resid.cc
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_sb.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_sb_dsp.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_sn76489.c

gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_speaker.c

gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_ssi2001.c

gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c sound_wss.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c soundopenal.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c timer.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c um8881f.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c um8669f.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ati_eeprom.
c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ati_mach64.
c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ati18800.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ati28800.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ati68860_ra
mdac.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_cga.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_cl5429.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ega.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_et4000.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_et4000w32.c

gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_et4000w32i.
c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_hercules.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_icd2061.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_ics2595.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_mda.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_olivetti_m2
4.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_oti067.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_paradise.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_pc1512.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_pc1640.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_pc200.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_pcjr.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_s3.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_s3_virge.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_sdac_ramdac
.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_stg_ramdac.
c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_svga.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_svga_render
.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_tandy.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_tgui9440.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_tkd8001_ram
dac.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_tvga.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_unk_ramdac.
c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_vga.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c vid_voodoo.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c video.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c wd76c10.c
gcc.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win.c
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win-d3d.cc
win-d3d.cc: In function 'void d3d_init_objects()':
win-d3d.cc:143:68: warning: pointer of type 'void *' used in arithmetic [-Wpoint
er-arith]
uint32_t *p = (uint32_t *)(dr.pBits + (y * dr.Pitch));
^
win-d3d.cc: In function 'void d3d_blit_memtoscreen(int, int, int, int, int, int)
':
win-d3d.cc:264:64: warning: pointer of type 'void *' used in arithmetic [-Wpoint
er-arith]
memcpy(dr.pBits + ((yy - y1) * dr.Pitch), &(((uint32_t
*)buffer32->line[yy + y])[x]), w * 4);
^
win-d3d.cc: In function 'void d3d_blit_memtoscreen_8(int, int, int, int)':
win-d3d.cc:339:77: warning: pointer of type 'void *' used in arithmetic [-Wpoint
er-arith]
uint32_t *p = (uint32_t *)(dr.pBits + (yy * dr.Pitch));

^
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win-d3d-fs.cc
win-d3d-fs.cc: In function 'void d3d_fs_init_objects()':
win-d3d-fs.cc:165:68: warning: pointer of type 'void *' used in arithmetic [-Wpo
inter-arith]
uint32_t *p = (uint32_t *)(dr.pBits + (y * dr.Pitch));
^
win-d3d-fs.cc: In function 'void d3d_fs_blit_memtoscreen(int, int, int, int, int
, int)':
win-d3d-fs.cc:350:64: warning: pointer of type 'void *' used in arithmetic [-Wpo
inter-arith]
memcpy(dr.pBits + ((yy - y1) * dr.Pitch), &(((uint32_t
*)buffer32->line[yy + y])[x]), w * 4);
^
win-d3d-fs.cc: In function 'void d3d_fs_blit_memtoscreen_8(int, int, int, int)':

win-d3d-fs.cc:441:77: warning: pointer of type 'void *' used in arithmetic [-Wpo
inter-arith]
uint32_t *p = (uint32_t *)(dr.pBits + (yy * dr.Pitch));

^
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win-ddraw.cc
win-ddraw.cc: In function 'void ddraw_blit_memtoscreen(int, int, int, int, int,
int)':
win-ddraw.cc:168:54: warning: pointer of type 'void *' used in arithmetic [-Wpoi
nter-arith]
memcpy(ddsd.lpSurface + (yy * ddsd.lPitch), &(((uint32_t *)buffer32
->line[y + yy])[x]), w * 4);
^
win-ddraw.cc:202:76: warning: pointer of type 'void *' used in arithmetic [-Wpoi
nter-arith]
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));

^
win-ddraw.cc: In function 'void ddraw_blit_memtoscreen_8(int, int, int, int)':
win-ddraw.cc:243:76: warning: pointer of type 'void *' used in arithmetic [-Wpoi
nter-arith]
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));
^
win-ddraw.cc:248:59: warning: pointer of type 'void *' used in arithmetic [-Wpoi
nter-arith]
p = (uint32_t *)(ddsd.lpSurface + (4 * ddsd.lPitch));
^
win-ddraw.cc:282:76: warning: pointer of type 'void *' used in arithmetic [-Wpoi
nter-arith]
p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.lPitch));

^
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win-ddraw-fs.cc

win-ddraw-fs.cc: In function 'void ddraw_fs_blit_memtoscreen(int, int, int, int,
int, int)':
win-ddraw-fs.cc:212:54: warning: pointer of type 'void *' used in arithmetic [-W
pointer-arith]
memcpy(ddsd.lpSurface + (yy * ddsd.lPitch), &(((uint32_t *)buffer32
->line[y + yy])[x]), w * 4);
^
win-ddraw-fs.cc: In function 'void ddraw_fs_blit_memtoscreen_8(int, int, int, in
t)':
win-ddraw-fs.cc:282:86: warning: pointer of type 'void *' used in arithmetic [-W
pointer-arith]
uint32_t *p = (uint32_t *)(ddsd.lpSurface + (yy * ddsd.
lPitch));

^
g++.exe -O3 -march=i686 -fomit-frame-pointer -D RELEASE_BUILD -c win-joystick.cc

In file included from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\win
nt.h:34:0,
from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\win
def.h:253,
from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\win
dows.h:48,
from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\rpc
.h:2,
from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\obj
base.h:3,
from c:\users\therock247uk\desktop\mingw-pcem\mingw\include\din
put.h:17,
from win-joystick.cc:1:
win-joystick.cc: In function 'void joystick_init()':
win-joystick.cc:45:38: error: 'DIDEVTYPE_JOYSTICK' was not declared in this scop
e
if (FAILED(lpdi->EnumDevices(DIDEVTYPE_JOYSTICK, joystick_enum_callback
, NULL, DIEDFL_ATTACHEDONLY)))
^
make: *** [win-joystick.o] Error 1

therock247uk@DELL-PC /c/users/therock247uk/desktop/PCem-0202ec1f468e/PCem-0202ec
1f468e/src
$
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Joystick Support?

Post by SarahWalker »

What DirectX libraries are you using?

BTW, please don't double post to both this forum and VOGONS - I do read both.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Joystick Support?

Post by SarahWalker »

Try adding

Code: Select all

#define DIRECTINPUT_VERSION 0x0700
to the top of win-joystick.cc.
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Joystick Support?

Post by therock247uk »

hmm not sure i got my build environment from a post over at retroroms.net i guess i need to make a newer one which versions of stuff should i be using?

edit: adding the line worked!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Joystick Support?

Post by SarahWalker »

Good, fix committed at rev 108.
Bugman
Posts: 7
Joined: Thu 05 Jun, 2014 8:14 pm

Re: Joystick Support?

Post by Bugman »

I thought I would post an update.
I was able to compile the latest source. The joystick support seems to work nicely.
The sound repeats/stutters in most games.
Of course, I cant tell if its a bug or if I just am not compiling it correctly.
And chance we can get a new compiled executable from you soon?
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Joystick Support?

Post by SarahWalker »

Next release should be towards the end of summer. I don't put out binaries of development versions.
Bugman
Posts: 7
Joined: Thu 05 Jun, 2014 8:14 pm

Re: Joystick Support?

Post by Bugman »

I have compiled the newest version a couple times now with other compiler collections form other folks. I keep getting the same issue, sound repeats itself / stutters.
I have not had this issue with the previous versions.
Thought I would report this in case it is of some use for debugging.
Post Reply