joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.69k stars 381 forks source link

Windows 95 and 98 - Controller not recognized ? #1877

Open Sebiohazard opened 4 years ago

Sebiohazard commented 4 years ago

Good evening everyone !

I tried a Windows 95 install to see if my joystick is recognized but I have the same problem as with Windows 98... here is the conf file I used:

[sdl]
autolock=true
usescancodes=true

[dosbox]
title=Windows 95
memsize=64
vmemsize=8
vesa modelist width limit=0
vesa modelist height limit=0

[dos]
ver=7.1
keyboardlayout=sf

[cpu]
cputype=pentium_mmx
core=normal
cycles=30000

[sblaster]
sbtype=sb16vibra
irq=5

[joystick]
joysticktype=auto

[ne2000]
ne2000=false
nicirq=10
realnic=list

[fdc, primary]
int13fakev86io=true

[ide, primary]
int13fakeio=true
int13fakev86io=true

[ide, secondary]
int13fakeio=true
int13fakev86io=true
cd-rom insertion delay=4000

[render]
aspect=true
scaler=normal3x

[autoexec]
imgmount 0 boot.ima -t floppy
imgmount 2 win95.vhd -t hdd -size 512,63,64,520

Did I forget something ?

Greetings !

Wengier commented 4 years ago

Welcome to this issue tracker. As we had discussed earlier elsewhere, your joystick is indeed recognized in the DOS shell (both integrated DOS and guest DOS). So this must be something with the Windows 95/98 configuration or driver. There is now a draft Wiki page named “Guide:Setting up joysticks in DOSBox‐X”, please be sure to check it out:

https://github.com/Wengier/dosbox-x-wiki/wiki/Guide%3ASetting-up-joysticks-in-DOSBox%E2%80%90X

andres-asm commented 4 years ago

on Windows you need to change some resources on the gameport device http://pages.retromods.org/radius/post/2020-09-05-w95-guide/#finishing-touches

This is vanilla dosbox but I figure the same applies

rderooy commented 4 years ago

The wiki joystick page does not mention Windows under DOSBox-X yet. I was intending to check Windows 3.0a Multimedia Edition up to Win98SE but have not had the time to do so.

Also, I think DOSBox ECE has some additional joystick patches which DOSBox-X lacks. Not sure if adding those would make a difference.

On Fri, Sep 25, 2020 at 12:10 AM Sebiohazard notifications@github.com wrote:

Good evening everyone !

I tried a Windows 95 install to see if my joystick is recognized but I have the same problem as with Windows 98... here is the conf file I used:

`[sdl] autolock=true usescancodes=true

[dosbox] title=Windows 95 memsize=64 vmemsize=8 vesa modelist width limit=0 vesa modelist height limit=0

[dos] ver=7.1 keyboardlayout=sf

[cpu] cputype=pentium_mmx core=normal cycles=30000

[sblaster] sbtype=sb16vibra irq=5

[joystick] joysticktype=auto

[ne2000] If you want networking in Windows, set ne2000=true. This also requires that you set realnic= to a suitable value for your PC

ne2000=false nicirq=10 realnic=list

[fdc, primary] int13fakev86io=true

[ide, primary] int13fakeio=true int13fakev86io=true

[ide, secondary] int13fakeio=true int13fakev86io=true cd-rom insertion delay=4000

[render] aspect=true scaler=normal3x

[autoexec]

imgmount 0 boot.ima -t floppy imgmount 2 win95.vhd -t hdd -size 512,63,64,520`

Did I forget something ?

Greetings !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joncampbell123/dosbox-x/issues/1877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHBR2X6N5I56BFKWSN6LYLSHO7UHANCNFSM4RY2MMUQ .

Sebiohazard commented 4 years ago

Thank you for your answers !

  1. My joystick is well recognized in the Mapper Editor.

  2. I also tried the diagnostic tools here under DOS 7.0 (Windows 98 SE) & my joystick is recognized.

  3. You will find a post about my problem on the VOGONS forum here.

  4. Is DOSBox-SVN core more suitable than DOSBox-X for installing Windows 95 or 98 ?

Greetings !

rderooy commented 4 years ago

@Sebiohazard it is reportedly possible to install win9x in DOSBox-SVN. But you will have lots more problems as, amongst others, it lacks proper support for IDE controllers and the developers have indicated not being interested in adding it. This means that when you boot Win9x in DOSBox-SVN that your harddisk will run in legacy compatibility mode, and you cannot access a CD-ROM. DOSBox-X is the only dosbox fork to have this IDE emulation functionality at this point.

andres-asm commented 4 years ago

No! I was justo giving that because it contains the advice about changing the gameport base address.

I bet X should be better and more stable

On Fri, Sep 25, 2020, 08:05 Sebiohazard notifications@github.com wrote:

Thank you for your answers !

1.

My joystick is well recognized in the Mapper Editor. 2.

I also tried the diagnostic tools here https://www.vogons.org/download/file.php?id=91111 under DOS 7.0 (Windows 98 SE) & my joystick is recognized. 3.

You will find a post about my problem on the VOGONS forum here https://www.vogons.org/viewtopic.php?f=31&t=76199. 4.

Is DOSBox-SVN core more suitable than DOSBox-X for installing Windows 98 or 98 ?

Greetings !

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/joncampbell123/dosbox-x/issues/1877#issuecomment-698916795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEFUFYYY3KZ55ZKBPL2M3SHSISPANCNFSM4RY2MMUQ .

Wengier commented 4 years ago

@Sebiohazard Windows 95 and 98 are officially supported in DOSBox-X, so we will try to actively improve its function in DOSBox-X. On the other hand, remember that DOSBox (SVN or other forks) generally focus on DOS games, and Windows 9x is never officially supported by DOSBox SVN (so don't expect them to ever try to improve its emulations for Windows 95/98).

andres-asm commented 4 years ago

@Sebiohazard did you try this imagen

Sebiohazard commented 4 years ago

@fr500 hello unfortunately I cannot change " Setting based on " I only have one choice why ?!

andres-asm commented 4 years ago

oh that's weird! I wouldn't know to be honest.

Sebiohazard commented 4 years ago

@fr500 @Wengier is my .conf file correct ? Maybe something is missing, right ?

Wengier commented 4 years ago

@Sebiohazard Since your joystick does work in DOSBox-X’s emulated DOS, it means that your joystick can be recognized by guest systems inside DOSBox-X. So it is more like a Windows 9x configuration issue, or maybe the driver issue. But you can certainly try to change the joystick type and see if it can be recognized by Windows 9x then.

shortlyfelongrope commented 2 years ago

I know this is a necro thread, but I ran into this issue recently (began trying to tackle it around 2021-08). I have found a solution, and it possibly points to an error within dosbox-x.

I am running windows 10 (whatever service pack is current as of 2021-10-16), on an i4770k @ stock (3.5GHz) system, 32GB ram, GTX1080ti. I use vjoy to map my xbox elite series 2 controller to old games, so I am routing through vjoy. I use hidguardian to block win10 from seeing the xbox controller, so in control panel -> devices and printers -> controllers only sees vjoy. I am using the 20211001 release (.18) though this present in the antecedents .17 and .16.

I load win95 (any version, tested it on RTM, a, b, and c) or win98 (any version, tested RTM and SE). My controller is recognized in the dosbox-x mapper, and works in mechwarrior 2 run through dosbox-x. However, the controller is not recognized within win9x operating as guest os within dosbox-x.

Under my computer -> control panel -> system -> device manager -> sound, video, and game controllers, there is listed: 1) creative labs sound blaster 16 plug and play, 2) gameport joystick, 3) mpu-401 compatible.

Under gameport joystick -> properties -> resources, there is only the option for "basic configuration 0000", which is i/o range 0200-0207. This range will not recognize dosbox-x emulating the gameport joystick. There is no "basic configuration 0" or "basic configuration 1" as others have suggested to use. This makes the joystick not visible in win9x, and will not work.

Now, the fix:

1) Under device manager -> sound, video, and game controllers, select gameport joystick, and hit "remove".

2) In control panel, launch "add new hardware".

3) Click "next".

4) Select "no" -- we are going to manually install the gameport.

5) From the list, near the bottom, select "sound, video and game controllers" and hit "next".

6) In the left hand list select "microsoft", in the right hand list select "gameport joystick" (there may be a few, with driver dates listed, try each of them until one works, though, it may require repeating this entire process for each attempt). Once both sides have been selected, hit "next".

7) It should now list i/o as 0201. Hit "next".

8) Hit "finish".

9) It will ask you to restart, hit "no". If you restart, you need to repeat this process, kind of killing the point.

10) You will need to recalibrate your controller each time as well (within "joystick" on win95 fresh install, or "game controllers" in the updated versions).

I need to repeat this every single time i restart win9x under dosbox-x. It's not that difficult, but it is quite annoying.

It is worth pointing out that PCEM and 86box both emulate the gameport controller and accept vjoy and joysticks on the i/o range of 0200-0207. I believe this means dosbox-x is not feeding windows the correct gameport i/o information. I am not a CE expert, so I have no real idea what's going on here, but it does point to an issue that might have a simple fix in the dosbox-x code.

Hopefully this helps anyone else out that has been having this issue.

mtmrc commented 2 years ago

I just encountered this same problem on Windows 98SE, what fixed it for me was changing sound card from sb16vibra to sb16. Only difference is you need to go to Add new hardware for Windows to detect it.

Gnoenk commented 1 year ago

I have also encountered this issue. Thanks to the description of @shortlyfelongrope we have a workaround which also worked on my machine. However this is cumbersome to do and a permanent fix would be highly appreciated. I still need to test the enhancement from @mtmrc.

rderooy commented 1 year ago

I had a look at the source code and am wondering about this section in src/hardware/sblaster.cpp

// NTS: DOSBox-X as coded now always has a joystick port at 0x201 even if no joystick
            write_Logical_Device_ID('C','T','L',0x7,0x0,0x0,0x1); // CTL7001
            write_Compatible_Device_ID('P','N','P',0xB,0x0,0x2,0xF); // PNPB02F
            write_Identifier_String("Game");
            write_IO_Port(/*min*/0x200,/*max*/0x200,/*count*/0x08);

The min and max are set to 200 instead of 201...

rderooy commented 1 year ago

I tried changing both values to 201 and recompiled, and in Win98SE deleted the Gameport and let windows autodetect it, and it just put it again to IO 200. Trying to change the IO port to 201 causes a resource conflict. image

leslietoo commented 1 year ago

I just encountered this same problem on Windows 98SE, what fixed it for me was changing sound card from sb16vibra to sb16. Only difference is you need to go to Add new hardware for Windows to detect it.

yes, good solution, now my PS2 dualshock2 is playable, thanks!

leslietoo commented 1 year ago

@fr500 hello unfortunately I cannot change " Setting based on " I only have one choice why ?!

changing sound card from sb16vibra to sb16 you will have 2 setting choices, just do it as @mtmrc said.