Commit graph

39 commits

Author SHA1 Message Date
SpinDizzy c86dab0fe9 - Disabled Alt-O (dump timings) and Alt-U (dump input state) when
SUPERMODEL_DEBUGGER not defined
- Option '-print-inputs' works again if no ROM set specified
2019-02-19 09:24:31 +00:00
SpinDizzy 98106df68b Inputs can now be configured on a per-game basis 2019-01-13 16:20:19 +00:00
Ian Curtis a7e851d578 updated command line help 2018-09-14 20:31:34 +00:00
Ian Curtis b39de6e4df Fix controller inputs (Spindizzi) 2018-03-30 12:04:27 +00:00
Ian Curtis f7678d918e remove using namespace from headers .. 2018-01-03 17:51:24 +00:00
Ian Curtis e462fbeda0 remove unused variable 2017-04-11 11:11:45 +00:00
Bart Trzynadlowski 006260be47 Harry Tuttle's fixes to fishing controls: invert fishing rod y and fishing stick y axis values so setting a negative axis is not necessary. Also changed reel to an analog input (similar to a pedal), whose neutral position is 0. 2017-04-07 04:42:04 +00:00
Bart Trzynadlowski cc32e0bf8e Removed last vestiges of CINIFile from input system and removed Games.cpp, INIFile.cpp, and ROMLoad.cpp 2017-04-05 16:19:08 +00:00
Bart Trzynadlowski f34e25dfc7 Massive internal change: removed CConfig object and replaced it with a hierarchical config object system (Util::Config::Node). Games are now defined in an XML file. Hopefully I didn't break too many things :/ 2017-03-27 03:19:15 +00:00
Bart Trzynadlowski 8ba8d7290e Hooked up Sega Bass Fishing / Get Bass controls 2016-05-26 04:13:22 +00:00
Bart Trzynadlowski 9a2bb78add Hooked up Magical Truck Adventure controls 2016-04-13 03:28:04 +00:00
Bart Trzynadlowski 5c513445b1 Fixed detected axis printf() and compiler warnings (hopefully I did not parenthesize any conditionals incorrectly!) 2016-03-23 00:47:53 +00:00
Ian Curtis 93f6b01e0b Update project to vs 2013. Clean compile warnings 2016-03-22 12:30:23 +00:00
Nik Henson 8835d6fe36 Some updates to Supermodel made at beginning of the year but only now got around to checking in (better late than never...):
- hooked up the remaining controls in Supermodel (except for Magical Truck Adventure which does not work at all yet).  The new controls are:
  * InputAnalogJoyTrigger2 and InputAnalogJoyEvent2 for the additional second trigger and event buttons that were missing from Star Wars Trilogy,
  * InputRearBrake and InputMusicSelect for the rear brake and music selection buttons that were missing from Harley Davidson,
  * InputAnalogGunXXX, InputAnalogTriggerXXX, InputAnalogGunXXX2 and InputAnalogTriggerXXX2 for the analogue guns of Ocean Hunter and LA Machineguns (NOTE: these controls must be calibrated in the games' service menus otherwise they will not work properly.  Also, the alignment of the gun cursor does not line up very well with the mouse position at the moment, but at least the games are a bit more playable now, although still with numerous graphical glitches...)
  * InputSkiXXX for the controls of Ski Champ, making the game playable now.
- hooked up existing InputViewChange control to Harley Davidson's view change button
- improved the handling of InputGearShiftUp/Down inputs so that they work better with the driving games.  With Dirt Devils, ECA, Harley and LeMans this means they map directly to the game's own shift up/down controls, while with the 4-speed games such as Daytona 2, Scud Racer and Sega Rally 2, they simulate the user shifting up and down through the gears
- added defaults for the new controls to Supermodel.ini
- other small code tweaks:
  * fix small bug with handling of pos/neg inputs mapping to a control with inverted range (0XFF to 0x00) - this was needed to get Ski Champ's X-axis to work properly
  * removed Wait method from InputSystem and added to CThread as CThread::Sleep instead
  * added FrameTimings struct to hold all frame timings in a single place
No networking code yet as just haven't had a chance to work on it since initial progress at the beginning of the year - am *hoping* might have some time to pick it up again over Christmas...
2013-11-30 19:39:59 +00:00
Bart Trzynadlowski f1e93bcd8f - Fixed Win32 GCC Makefile.
- Reverted Nik's polygon palette index change in Models.cpp. Subtracting 1 was breaking Scud Race.
- Added an explicit typecast in Inputs.cpp, which GCC requires for some reason.
2012-07-16 02:27:55 +00:00
Nik Henson 183dca563d Committing various small updates that have been hanging around in my source tree for a while now:
- Added 'crosshairs' command line and config option.
- Added 'vsync' command line and config option (so far only tested on NVidia cards on Windows 7 - other graphics drivers, O/Ss or driver settings may simply chose to ignore this).
- Added fullscreen toggle within game using Alt+Enter key combination.
- Added framework for lamp outputs and 'outputs' command line and config option.  So far only the lamps for driving games are hooked up in the emulator (others to be added later).
- Added an initial outputs implementation for Windows that sends MAMEHooker compatible messages (-outputs=win to enable)
- Fixed fps calculation in Main.cpp that was producing incorrect results and so giving the impression that frame throttling wasn't working properly when in fact it was.
- Fixed palette indexed colours as the index was always off by one, causing incorrect colours in various games, eg drivers' suits and flashing Start sign in Daytona 2.
- Altered caching of models so that models with palette indexed colours use the dynamic cache rather than the static one.  This is so that changes in palette indexed colours appear on screen, eg the flashing Start sign on the advanced course of Daytona 2 (although currently the START message itself is not visible due to other problems with texture decoding).
- Fixed small bug in TileGen.cpp which meant both palettes were being completely recomputed pretty much with every frame.  This was a significant performance hit, particularly as palette recomputation is currently being done in SyncSnapshots (it should be moved out of here at some point, although for now it's no big deal).
- Made sure all OpenGL objects and resources are deleted in Render2D/3D destructors, in particular the deleting of the VBO buffer in DestroyModelCache.
- Made sure that GLSL uniforms are always checked to see if they are bound before using them in order to stop unecessary (but harmless) GL errors.
- Altered the default texture sheet handling to use a single large GL texture holding multiple Model3 texture sheets rather than multiple GL textures as before (if required, the old behaviour can still be selected with the mulisheet fragment shader).  I believe this fixes the disappearing crosshairs/corrupt GL state problem which the multisheet fragment shader seemed to be triggering somehow.
- Fixed a bug in debugger which meant memory watches were not triggering properly
2012-07-15 21:04:46 +00:00
Nik Henson d1d5175548 New multi-threaded rendering changes that parallelise graphics rendering and PPC execution in order to increase performance on multi-core machines.
New gpuMultiThreaded config option to enable/disable multi-threaded rendering (enabled by default, disabling it reverts to previous behaviour).
Other rendering optimisations:
 - texture uploads now only affect appropriate region in the texture sheet, rather than uploading the whole sheet each time
 - performance of clearing the model caches has been improved
New Alt+O key input added to toggle outputting of frame timings for debugging purposes.
2012-01-16 23:21:14 +00:00
Nik Henson 0835e38b94 Removed unecessary SDL include 2012-01-16 23:04:37 +00:00
Nik Henson dfa77e9207 Added support for joystick sliders to input system.
Added extra debugging output to calibration input detection routine (activated by pressing Shift).
2011-11-01 23:24:37 +00:00
Bart Trzynadlowski d2b381ce8b - Documentation updates.
- Added fflush() to config dialog output where it was missing.
2011-09-24 20:54:47 +00:00
Bart Trzynadlowski 33f35effaf - Tweaked text in input configuration dialog.
- Changed version string to 0.2a-RC3 because RC2 build was sent out to testers earlier.
2011-09-22 18:15:29 +00:00
Bart Trzynadlowski 46bc52bb12 - Changed save state error messages slightly.
- Wrapped rows that exceed 80 columns in Supermodel.ini.
- Added some member and function comments to a few header files. 
- Changed version string to 0.2a-RC2 in anticipation of sending another release candidate build to testers.
- Added GAME_INPUT_RALLY flag to dirtdvlsa, eca, and ecax.
- Configuration dialog no longer refers to Sega Rally 2 and Dirt Devils; instead, "Miscellaneous Driving Game Buttons"
- More additions to README.txt.
2011-09-22 06:11:47 +00:00
Nik Henson 773c2ec9ad Fix to get InputSystem.cpp to compile under Linux again after updates today 2011-09-21 23:45:49 +00:00
Nik Henson cb2b8f9235 Tweaked header comment! 2011-09-21 22:32:16 +00:00
Nik Henson dba953d1a0 Added copyright header to file 2011-09-21 22:31:27 +00:00
Nik Henson 0528a4f0c6 Changes to input system:
- altered PrintSettings to output all settings for attached controls, even if no different to defaults
- added option on calibration screen to detect an axis simply by moving the axis
2011-09-21 22:15:16 +00:00
Bart Trzynadlowski 24f46e9f86 Updated UNIX Makefile, fixed some syntax errors. 2011-09-21 19:12:50 +00:00
Nik Henson b9430cd988 Changes to input system:
- Joystick axis saturation values can now range from 1-200 rather than just 1-100.  This lets the user make axis less sensitive, if required.
- Added joystick axes calibration menus to -config-inputs.
- Moved DirectInput & XInput feedback settings out of CDirectInputSystem and into COSDConfig (so that they can be configured per-game).
- DirectInput mode now only grabs background access to keyboard, mice and joystick when configuring inputs, otherwise it only grabs foreground access.
Other changes:
- Main.cpp now ensures all Model3 threads are paused before shutting down.
2011-09-18 21:44:40 +00:00
Bart Trzynadlowski d200dff89e - Changed EmulateSCSP -> EmulateSound and -no-scsp -> -no-sound.
- Changed gear shifting behavior: neutral gear has its own button now.
- Removed SUPERMODEL_SOUND.
- DirectInput is the default input system for Windows now.
- Multi-threading is on by default, replaced -multi-threaded w/ -no-threads.
- Made crosshairs larger and more visible.
- Added Nik to co-author list and began updating file copyright notices.
- Fixed Virtua Striker 2 input names (player 2 inputs end with the number 2 instead of 1).
- Added documentation to a Docs/ subdirectory.
- Exported all default input configurations to Supermodel.ini and added that to the repository. Internally, Supermodel initializes all controls to "NONE" now.
2011-09-14 06:16:22 +00:00
Bart Trzynadlowski abd86a5624 - Cleaned up game names (primary sets no longer have revision labels in title).
- Added volume controls to UI.
- Renamed "Sega Rally Controls" to "Sega Rally/Dirt Devils Controls" (even though Dirt Devils has no hand brake).
- Hooked up gear shifting and view change for Dirt Devils.
- Removed debug printf()'s from DSB.cpp.
- Removed debug printf() from Real3D.cpp.
- Disabled assertions in SCSPDSP.cpp.
- Converted all error messages in Amp library to Supermodel format.
2011-09-08 05:08:16 +00:00
Nik Henson 48e98ff75d Added friction effect to feedback enumeration 2011-09-06 18:56:25 +00:00
Bart Trzynadlowski 8be2966ecb - Added crosshairs for light gun games and disabled mouse cursor in full screen mode (no way to re-enable it now).
- Fixed Real3D FIFO buffer overflow bug.
- Input system cannot be changed for non-Windows builds (only SDL is available).
- Added Spikeout-specific controls.
2011-08-27 21:37:37 +00:00
Bart Trzynadlowski b19f600fec - Added mappings for individual joysticks in Virtual On for dual-joystick gamepads.
- Input settings are now only read from "global" to avoid confusion.
2011-08-26 05:06:34 +00:00
Nik Henson 0153a02b19 Added version of ConfigInputs that doesn't take display dimensions 2011-06-28 23:16:40 +00:00
Nik Henson 7f53bd4816 Added new UI input to break execution and enter debugger (default mapping Alt+B) 2011-06-27 23:04:34 +00:00
Nik Henson 2e14ec3e6e Small code tidy up (moved some code out of header file into cpp file where it belongs) 2011-06-22 20:18:40 +00:00
Nik Henson e8782b98fa Changes relating to input system:
- Added ability to configure axis min, centre and max values in INI file.  This allows some types of steering wheel pedals that use an inverted value range to work properly with the emulator.
 - Modified CINIFile to read and write signed numbers (needed for above change).
 - Added check at configuration start for "bad" input sources such as axes that are wrongly calibrated or buttons that are always triggering a value.  Otherwise they cause the configuration loop to wait indefinitely for the axis or button to be released.
 - Removed superfluous check for XInput devices when XInput is not enabled in CDirectInputSystem.
 - Improved force beedback code in CDirectInputSystem and also added the extra feedback effects needed so far for drive board emulation.
2011-06-22 13:06:52 +00:00
Nik Henson 5e247021be Changes relating to input system:
- Fixed bug with mapping of multiple assignments.
- Added new ! operator for input mappings, which lets the user specify that an input must not be active.
- Added option to print info about input system (such as settings and detected keyboards, mice and joysticks) during input configuration.
- Added new trigger input for lightgun games with a configurable option to automatically pull trigger when offscreen input is activated (this makes playing with the mouse easier as the gun can be reloaded with single mouse button, rather than having to press both
 buttons at the same time).
- Added -xinput command line option that switches to using XInput API rather than DirectInput for XBox 360 controllers (this allows the XBox 360 controller's two triggers to be read independently which works better for driving games when they are mapped to accele
rator and brake).
- Added initial version of force feedback implementation to DirectInputSystem (this still needs work).
2011-06-05 20:53:39 +00:00
Bart Trzynadlowski 783446fca2 Fixing import mistake: moving source code to trunk/Src. 2011-04-24 01:19:40 +00:00