Commit graph

67 commits

Author SHA1 Message Date
Bart Trzynadlowski 61159c07f8 Added 8- and 16-bit tilegen VRAM access handlers to fix missing columns in Star Wars Trilogy tilemaps. Thanks to Spindizzi for initial confirmation that this was the problem. 2017-03-23 04:22:25 +00:00
Bart Trzynadlowski de043355bc Marked offset of code in CROM for scudp 2016-06-24 01:01:30 +00:00
Bart Trzynadlowski b0911afd1f Added drive board and lamp raw outputs (submitted by SailorSat) 2016-06-07 01:51:16 +00:00
Ian Curtis 8979246642 remove bad rom patches 2016-05-26 16:21:42 +00:00
Bart Trzynadlowski 8ba8d7290e Hooked up Sega Bass Fishing / Get Bass controls 2016-05-26 04:13:22 +00:00
Bart Trzynadlowski 8c082abab9 Added some IRQ-related code (commented out for now) from MAME findings. May incorporate in the future when investigating IRQs and timing again. 2016-05-10 03:08:03 +00:00
Bart Trzynadlowski a9095e6c8e Added a register read handler for tilegen (although nothing seems to benefit from it) 2016-05-08 20:30:45 +00:00
Bart Trzynadlowski 9249eaa29f Fixed logic for clearing bottom layer. Added new functions to 2D renderer interface. Avoid drawing top and bottom surfaces when no layers are present there. Added some comments to tile 2016-05-08 19:27:08 +00:00
Ian Curtis 6d1aa4d527 fix compilation 2016-05-03 18:38:06 +00:00
Bart Trzynadlowski 9a2bb78add Hooked up Magical Truck Adventure controls 2016-04-13 03:28:04 +00:00
Ian Curtis d2563c035f you were right Bart :) (Fixes broken sound in last build) 2016-04-11 15:16:35 +00:00
Bart Trzynadlowski 775256118d Fixed Magical Truck Adventure country check (accidentally removed a line in previous commit). 2016-04-10 23:57:55 +00:00
Bart Trzynadlowski 7ade3a6abb Magical Truck Adventure expects 0x03 to be returned from MIDI control port (thanks, Ville). Game now boots but crashes because VROM texture uploads clobber memory for some reason. 2016-04-10 21:47:07 +00:00
Bart Trzynadlowski a202d8adc3 Do not print extra hardware message when there is none 2016-04-04 03:42:55 +00:00
Bart Trzynadlowski 6e5c301de8 Encryption device emulation (thanks to MAME), fixed warnings in Model3.cpp, added a string formatter helper, and updated Win32 GCC Makefile. 2016-04-02 21:50:40 +00:00
Ian Curtis 93f6b01e0b Update project to vs 2013. Clean compile warnings 2016-03-22 12:30:23 +00:00
Bart Trzynadlowski 47c54d100b Updated to support new IRender3D interface and added FrameTimings object. 2016-03-21 23:25:29 +00:00
Bart Trzynadlowski ee8afa17c3 Contribution by Luciano Lopez:
- Added vs215o ROM set.
- Security board data for vs298 now also returned for vs2v991, vs299, vs299a, and vs299b, helping them run.
2015-05-12 02:50:28 +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
Nik Henson 08d347ccc7 Small tweak to get to compile under GCC (Unix/MacOS) 2012-07-24 20:37:40 +00:00
Nik Henson a3c15e8208 Slight tweak to changes made to sound board synchronisation code in previous commit. The previous change was necessary to ensure no deadlock when waiting for sound board thread to exit but it introduced unwanted buffer overruns (with the end result being that the sound was often speeded up) so have added an extra check in WakeSoundBoardThread to prevent this. 2012-07-24 20:18:30 +00:00
Nik Henson 108ac64de8 - CModel3::StopThreads was rather gracelessly killing threads while they were waiting on their semaphores, which works okay Windows but not on Mac OS-X where it was preventing Supermodel from exiting properly. Hence, have instead altered StopThreads to signal to threads that they should exit and wait until until they have all done so. This is much better and is what I should have done the first time around had I not been so lazy :-)!
- Also fixed a small race condition in WakeSoundBoardThread.  Previously if it happened to be called just before the sound board thread had finished processing a frame's worth of audio but before it had got around to waiting on the sync condition variable then the wake notification would be lost.
2012-07-23 20:35:10 +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
Bart Trzynadlowski 772c94d122 - Committing Nik's timing changes: the PowerPC's DEC and TBR now count at the correct rate and time is accurately maintained between calls to the emulator. A VBlank bit was identified in the Real3D status register space and is now timed. Unfortunately, there are still some problems and not all games are perfect, but FV2, VS2, and others are working much better or perfectly.
- Added a new dump of Scud Race Plus (scudp1). Strangely, this one uses an MPC106 instead of the MPC105 used by every other Step 1.5 game...
2012-07-12 06:13:24 +00:00
Bart Trzynadlowski aba801ebb4 Byte swapped sample ROMs. This should fix the audio distortion that many users noticed. The differences are particularly noticeable in Scud Race and Daytona 2. 2012-02-23 03:08:57 +00:00
Nik Henson 8a4ea64994 Added OSD/Video.h to provide OSD-dependent video functionality. The static functions in here get called by Model3.cpp from within the render thread so that any OSD related rendering can also be run in parallel for a further speed increase.
Updated OSD/SDL/Main.cpp to provide the SDL implementations of the functions in OSD/Video.h.
2012-02-13 23:37:48 +00:00
Bart Trzynadlowski 9fc0d7b3cc Updated some comments regarding the VF3 ROM patches. It seems many of them are no longer necessary. The single necessary patch affects timing (note how the warning screen stays up longer when it is removed). This needs to be investigated -- perhaps it can lead to a timing fix for vf3, vs2, and fvipers2? 2012-02-01 18:08:13 +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
Bart Trzynadlowski 4c3d6e1abf Fixed a MAGIC_NUMBER comment typo. 2011-12-23 21:03:24 +00:00
Bart Trzynadlowski a1346b57f5 - Changed spelling of some messages in drive board code.
- Added an extra blank line after info display in CModel3.
- Cleaned up comments in Main.cpp.
- More document updates. Fixed '-no-music'->'-no-dsb', 'EmulateMusic'->'EmulateDSB'.
2011-09-22 17:28:49 +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 f695ff7094 CModel3::StopThreads() now makes sures threads are paused before deleting thread objects. 2011-09-18 22:49:21 +00:00
Bart Trzynadlowski 45603b5549 - Tweaked comments in Supermodel.ini
- More work on README.txt
- Tweaked some error/info messages.
2011-09-17 23:41:12 +00:00
Nik Henson 58954ee4cc Small updates:
- added methods to CModel3 to access sound board and drive board
 - added methods to CSoundBoard to access 68K and DSB (if attached)
 - added methods to CDSB1 & CDSB2 to access Z80 & 68K respectively
 - small code tweak in DriveBoard.cpp
 - comment tweaks in Model3.h & Model3.cpp
2011-09-15 21:10:38 +00:00
Bart Trzynadlowski 1629cd711c - Updated README (far from finished).
- Music volume cannot be changed if game has no DSB.
- Extra hardware (DSB, drive board) is printed in information display when ROM is loaded.
2011-09-15 07:13:19 +00:00
Bart Trzynadlowski 2f5bf43bda Updated copyright information and added headers to all remaining files except debugger. 2011-09-14 19:08:43 +00:00
Bart Trzynadlowski cf73207c98 - Nik's new decoupled audio code with fixes to minimize overruns.
- VBlank timing: increased to 20% of a frame.
2011-09-12 05:43:37 +00:00
Nik Henson 0495421cbc DriveBoard changes:
- fixed bug in SendConstantForce which was sending incorrect values at times
- removed friction effect for now, until can determine its exact command seq
- added checking of compatibility of saved state and temporary disabling of drive board if not compatible
2011-09-09 07:18:52 +00:00
Bart Trzynadlowski 11d1d61bc2 - Removed BOOL and replaced it with native C++ type, bool.
- Removed TRUE and FALSE, changed to 'true' and 'false' keywords.
2011-09-08 06:34:18 +00:00
Bart Trzynadlowski 4040b7eeee Forgot to disable drive board if ROM not loaded. 2011-09-08 01:13:25 +00:00
Bart Trzynadlowski 70ec09de92 - Added drive board ROM loading.
- Changed EnableFFeedback -> ForceFeedback to be more consistent with the other options.
- Updated help text.
2011-09-08 01:07:06 +00:00
Nik Henson d7ee278f69 Added handling of drive board (if attached) 2011-09-07 07:21:56 +00:00
Bart Trzynadlowski 498d90d667 Multithreading was always enabled in the CModel3 constructor. Disabled this behavior. 2011-09-05 19:05:47 +00:00
Bart Trzynadlowski bda9efebac - getbass now uses MPC106.
- Fixed some error messages in 53C810.cpp.
- Fixed stereo (was swapped) and added a flip stereo option.
2011-09-01 06:43:01 +00:00
Bart Trzynadlowski b647cd5a4b - Added Spikeout Final Edition.
- Minor change to DSB save state loading: only loopEnd is checked before using MPEG_SetLoop().
2011-08-28 20:56:36 +00:00
Bart Trzynadlowski 87dc5b4181 - Fixed format strings for messages involving __LINE__.
- Fixed an MPEG related crash when loading save states. If usingLoopStart is 0, it is important not to call MPEG_SetLoop()!
- -input-system is working again.
- Changed the format of some messages here and there.
2011-08-28 04:37:41 +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
Bart Trzynadlowski d318efe58c - Program settings are now managed by the CConfig class.
- Moved Logger.h to OSD/, cleaned up comments.
- Command line and config file parsing have been rewritten.
- Began replacing C standard library headers with C++ versions (eg. stdio.h -> cstdio). I think I got most of them, but not all.
2011-08-19 20:43:07 +00:00
Bart Trzynadlowski 5e1ea75374 Fixed memory pool macros to (hopefully) work with gcc. 2011-08-15 05:59:33 +00:00