Comments (6)
As you've observed, if no controller is connected then Boxer disables gameport emulation and reports no joystick device to the game. This differs from DOSBox by design: in fact Boxer does this precisely because of Privateer, and games like it, because otherwise users wouldn't be able to start up Privateer at all without having a controller or a fake JOYA.DAT file - making the game otherwise unplayable out-of-the-box.
This behaviour does get in the way of a user-applied workaround for this MIDI bug however, since there is currently no way to force Boxer to present a joystick to the DOS game without having a controller attached. Boxer could selectively override its behaviour for Privateer, but that would then rely on the user having a JOYA.DAT file in place, and would break the game for everybody who doesn't.
So, a truly automatic workaround for this bug would require Boxer to:
- Pretend there is a joystick even when there isn't; and simultaneously
- Feed the game a fake JOYA.DAT file if a real one is not present.
Boxer could do the former without much trouble, but it has no functionality for the latter at the moment; I have been planning to implement such a system for handling problems like this though. (Such a system would be most useful if it could also patch DOS binaries in memory, but that's a whole other kettle of fish.)
One question: does your fake JOYA.DAT contain valid calibration data that results in usable joystick control if one later connects a real controller? The game will not ask the user to recalibrate if JOYA.DAT is present, so it's vital that the calibration data in the file is valid.
from boxer.
A good analysis of the impact of some of the workarounds, thank you. There's real calibration data in that JOYA.DAT file, yes, but who knows if that would be appropriate for different controllers so it certainly isn't a solution in itself. I don't know the details of Privateer's calibration data, but unfortunately I would assume as a file it's only useful in the absence of an actual controller and calibration data.
from boxer.
Well helpfully modern USB and bluetooth game controllers provide consistent inputs that Boxer can reliably normalize, so calibration data that's accurate for one controller is also accurate for any other.
(In practice there's one or two exceptions to this: principally when calibrating on a controller with square axis travel, like a PC gamepad, then using the same calibration data with a controller with circular travel, like a console gamepad - they can't reach the same diagonal extents, so the game doesn't think they're pushing all the way. That's not a major problem with Privateer though.)
from boxer.
I see. The file's taken from somewhere floating around the web, so if this was something that ended up as a bundled workaround I would recommend recalibrating with an actual controller connected to OS X and Boxer as I can't vouch for its accuracy. Unfortunately I don't have one.
from boxer.
Bit more info:
I got in touch with Mario Brito (of http://hcl.solsector.net/), who has been in the Wing Commander modding scene for literally decades. Asked him about the issue and he was aware of it, so poked at the executable and actually came up with a fix. In short, the game tells the CPU to ignore interrupts during reads of the joystick; this would generally be good (guarantees timing accuracy) but the game doesn't re-enable interrupts when it's done. They get re-enabled 'at some point' later, messing the music timing.
Patch out the interrupt ignore instruction and bam, solved. Mario's going to revisit the patch at a later date to look into making the joystick reading generally more robust (read: timed), but cursory checks don't suggest any issues (either with or without a joystick attached).
BSDiff patch for PRCD.exe:
http://isrob.com/files/prcd_patch.bdf
from boxer.
Oh nice catch! That explanation does make a lot of sense. I'll test this myself and will let GOG know of the fix so hopefully they'll integrate it into the copy of Privateer they're selling.
(If the diff could get weaponised as a patcher exe, that could go up on wcnews.com as well - I dunno what tools are available for wrapping bspatches though.)
from boxer.
Related Issues (20)
- Can't compile the master 64 bit Boxer, help needed =( HOT 25
- Magic mouse buttin not working HOT 8
- 64 bit builds do not support joysticks HOT 13
- not running on 10.15 Catalina HOT 2
- Boxer Crashes under Parallels HOT 1
- save games not work since 64bit update ?! HOT 7
- Support compressed .boxer bundles or inner .harddisk containers.
- CD Audio is stuttering and making the game jittery in 64-bit build HOT 4
- Is Boxer a still active project? HOT 1
- Mac ARM (Apple Silicon)-native build HOT 5
- License file
- Active Fork? HOT 1
- App crashes when trying to print HOT 5
- Boxer Bundler creating a non-working standalone HOT 2
- 2 Gamepads
- New version of Boxer coming? HOT 4
- PC booter games saving HOT 5
- Render non-latin characters HOT 1
- DDHidLib/DDHidLib.h File Not Found HOT 2
- Migrate to DOSBox's overlay drives
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxer.