Commit graph

  • 3bc2794b0a Use the correct texture enable bit Ian Curtis 2016-04-03 16:10:40 +0000
  • 3c8352f4ca Added a comment: observation of Star Wars and Scud Race color modulation issues. Bart Trzynadlowski 2016-04-03 04:09:06 +0000
  • f09dd457c5 Update vs project for encryption code Ian Curtis 2016-04-02 22:14:39 +0000
  • 688af26846 Possible work around for slightly incorrect viewport positions in ECA and harley Ian Curtis 2016-04-02 22:13:59 +0000
  • a99f022487 add missing include Ian Curtis 2016-04-02 22:08:25 +0000
  • 6e5c301de8 Encryption device emulation (thanks to MAME), fixed warnings in Model3.cpp, added a string formatter helper, and updated Win32 GCC Makefile. Bart Trzynadlowski 2016-04-02 21:50:40 +0000
  • c0f679479a Added virtual destructor to CDSB Bart Trzynadlowski 2016-04-02 21:35:06 +0000
  • 0d989831ed Added encryption keys, converted to cstdint types, fixed whitespace Bart Trzynadlowski 2016-04-02 21:33:33 +0000
  • c7ad13fb31 Whitespace, cstdint types Bart Trzynadlowski 2016-04-02 21:32:28 +0000
  • 9c2aff72c8 add missing file Ian Curtis 2016-04-02 15:41:50 +0000
  • c7412828d4 Use proper texture wrapping mode for 2d. Stops garbage down the top and left sides. Should really use NPOT texture. Ian Curtis 2016-04-02 12:23:46 +0000
  • 736f5ab958 add missing project files Ian Curtis 2016-04-01 16:36:12 +0000
  • 7e7847bc83 Allow asymmetric projection matrices. Fixes a bunch of missing effects and bad camera angles in harley. Ian Curtis 2016-03-31 09:27:42 +0000
  • c398cab1b1 update project Ian Curtis 2016-03-29 15:29:15 +0000
  • aee89390ba add LOD table data. Maybe we can get clipping planes out of these Ian Curtis 2016-03-28 20:11:46 +0000
  • e79b241a49 properly mark dynamic meshes as such Ian Curtis 2016-03-28 19:58:36 +0000
  • e1278f4451 allow 8 bit mono textures to be contour textures, fixes a bunch of missing transparency in harley la riders Ian Curtis 2016-03-27 08:39:40 +0000
  • ffaed8ae32 clear the rom mesh buffer Ian Curtis 2016-03-26 22:48:51 +0000
  • 4992e59673 Cache rom models, for better performance. Ian Curtis 2016-03-26 22:44:26 +0000
  • 8488f22ac5 Ian Curtis 2016-03-24 13:26:28 +0000
  • 0327db246f WIP Ian Curtis 2016-03-24 13:17:17 +0000
  • 23172c9aec fix for bad matrix with NaN Ian Curtis 2016-03-23 01:05:02 +0000
  • 5c513445b1 Fixed detected axis printf() and compiler warnings (hopefully I did not parenthesize any conditionals incorrectly!) Bart Trzynadlowski 2016-03-23 00:47:53 +0000
  • f031e5d095 finish front/back face culling code based on matrix determinant. Optimised opengl to avoid redundant state changes. Ian Curtis 2016-03-22 23:39:59 +0000
  • 44ea902181 add missing project file Ian Curtis 2016-03-22 22:00:17 +0000
  • 8ea5978093 fix parenthesis error Ian Curtis 2016-03-22 21:59:51 +0000
  • e7eb912eaa add maths functions Ian Curtis 2016-03-22 13:47:28 +0000
  • 93f6b01e0b Update project to vs 2013. Clean compile warnings Ian Curtis 2016-03-22 12:30:23 +0000
  • ce99c47f8a Remove double copy of shaders Ian Curtis 2016-03-22 11:40:24 +0000
  • 5b3eea25fb fix basic compile errors (with vs) Ian Curtis 2016-03-22 11:34:32 +0000
  • 09747bcd7c Tweaked Windows gcc Makefile Bart Trzynadlowski 2016-03-22 03:43:55 +0000
  • 3627213577 Fixed compiler warnings, whitespace, and moved local variable declarations to site of assignment Bart Trzynadlowski 2016-03-22 03:43:31 +0000
  • ec7588e2cd Include Version.h Bart Trzynadlowski 2016-03-22 03:41:00 +0000
  • 028727b389 Fixed typo that broke build Bart Trzynadlowski 2016-03-22 02:44:38 +0000
  • 4c7186b1f1 Fixed warnings and whitespace Bart Trzynadlowski 2016-03-22 01:37:55 +0000
  • 78609688c5 Fixed warnings and whitespace Bart Trzynadlowski 2016-03-22 01:24:23 +0000
  • bd09b3b68b Fixed warnings and whitespace Bart Trzynadlowski 2016-03-22 01:16:46 +0000
  • f0488a3c94 Moved lastCycles static int out of header file (fixes compiler warnings) Bart Trzynadlowski 2016-03-22 01:05:34 +0000
  • 3afe3cf1a7 Moved Bart Trzynadlowski 2016-03-21 23:27:30 +0000
  • 47c54d100b Updated to support new IRender3D interface and added FrameTimings object. Bart Trzynadlowski 2016-03-21 23:25:29 +0000
  • 708455a82d CRender3D -> CLegacy3D Bart Trzynadlowski 2016-03-21 23:22:26 +0000
  • 60ce6180c0 Update Supermodel.h with graphics path and moved version string to separate header file Bart Trzynadlowski 2016-03-21 23:20:32 +0000
  • d61b01ab6f Removing legacy 3D engine files that were already moved to Graphics/Legacy3D Bart Trzynadlowski 2016-03-21 23:12:17 +0000
  • 34301e97e1 Adding new 3D engine by Ian Curtis. Old engine moved to Graphics/Legacy3D/. Bart Trzynadlowski 2016-03-21 04:10:14 +0000
  • 9802bbbfd8 Fixed compilation errors involving min and max functions Bart Trzynadlowski 2016-03-21 04:07:32 +0000
  • 0579e65ebd Added registers to debugger: ctr, xer, srr0, srr1, sdr1, imiss, dmiss, hid0, hid1 Bart Trzynadlowski 2016-03-21 04:03:44 +0000
  • 27c20ff5e5 Fixed compiler warnings Bart Trzynadlowski 2016-03-21 04:02:14 +0000
  • 8f87bb1698 53c810: do not increment DSP when executing interrupt instruction. Fixes invalid polygons in Virtua Fighter 3. Thanks to Ian Curtis for discovering that the polygons were incorrectly-copied garbage. Bart Trzynadlowski 2016-02-23 05:28:17 +0000
  • 8e6712d2c7 Fixed display of PowerPC condition code bits in debugger (were backwards) and changed XER to print as hex. Bart Trzynadlowski 2015-12-07 05:56:36 +0000
  • 3d00225cba Support for loading an arbitrary (non-game) CROM image. Bart Trzynadlowski 2015-12-07 05:29:07 +0000
  • 1035b0c6a8 Gracefully handle the case when a zip file contains no known Model 3 ROM set. Bart Trzynadlowski 2015-06-13 02:57:41 +0000
  • 6bf4244207 Converted line endings from DOS to UNIX format. Bart Trzynadlowski 2015-06-13 02:56:26 +0000
  • ee8afa17c3 Contribution by Luciano Lopez: Bart Trzynadlowski 2015-05-12 02:50:28 +0000
  • 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... Nik Henson 2013-11-30 19:39:59 +0000
  • b017b24b1f Changed output "Pause" to "pause", as it is spelled in MAME, for MAMEHooker. Bart Trzynadlowski 2012-09-06 05:38:35 +0000
  • 08d347ccc7 Small tweak to get to compile under GCC (Unix/MacOS) Nik Henson 2012-07-24 20:37:40 +0000
  • 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. Nik Henson 2012-07-24 20:18:30 +0000
  • 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. Nik Henson 2012-07-23 20:35:10 +0000
  • 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. Bart Trzynadlowski 2012-07-16 02:27:55 +0000
  • 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 Nik Henson 2012-07-15 21:04:46 +0000
  • ac29fc1e88 Somehow John's Build.bat and Clean.bat did not get added in r262. Here they are. Bart Trzynadlowski 2012-07-12 06:40:55 +0000
  • 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... Bart Trzynadlowski 2012-07-12 06:13:24 +0000
  • 3963a7a53c Applied a series of patches by John Peterson: John Peterson 2012-07-12 05:28:08 +0000
  • 93b71c8429 Applied Nik's fix for cyclical scene graphs. Improves Harley Davidson, Ski Champ, Emergency Call Ambulance, and Ocean Hunter. Bart Trzynadlowski 2012-03-31 19:41:55 +0000
  • 1bce444668 Brought in the near clipping plane for Step 1.5+. Objects close to camera are no longer cut-off (e.g., driver arms and steering wheels in cockpit views). Note: This change should probably be applied to Step 1.0 as well in the future. For now, I am leaving the old distance because Step 1.0 coordinates need closer investigation. Bringing in the near clipping plane extends the view frustum depth and will worsen Z-buffer accuracy. Be on the lookout for Z-fighting that did not previously exist. Bart Trzynadlowski 2012-02-28 04:34:32 +0000
  • f9c3b9b5f8 DirectInputSystem's initial state wasn't being initialized properly, which would sometimes result in invalid input values until keyboard or mouse was successfully acquired Nik Henson 2012-02-27 20:32:15 +0000
  • 69610ef8dd Added a clear() method to VBORef and removed unsafe memset() clear. Bart Trzynadlowski 2012-02-25 06:36:04 +0000
  • 3b41239cfb This update fixes (hopefully) the last of the texture upload lags that were affecting some games, in particular Daytona 2 and Spikeout. To achieve this UploadTextures no longer clears the model cache when called. Instead the cache is kept in-tact (which should help improve cache hits) and all textures referenced by models being rendered are (re-)decoded with every frame. To help with tracking all the unique texture references contained in a model a new class TextureRefs has been added. Nik Henson 2012-02-23 23:20:21 +0000
  • 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. Bart Trzynadlowski 2012-02-23 03:08:57 +0000
  • 16e4fcab06 Forgot to update to-do list in previous revision. Added a comment to mark CRender2D::WriteVRAM() as deprecated. Bart Trzynadlowski 2012-02-23 00:12:46 +0000
  • fcf1d955a9 Previous "optimization" contained a mistake and made things worse. Removed unnecessary clear of the bottom layer buffer. Now, if there is no bottom layer, it will not be displayed at all and glClear(GL_COLOR_BUFFER_BIT) is used instead. Bart Trzynadlowski 2012-02-22 01:34:42 +0000
  • c085be59af Further optimization/simplification of the 2D renderer's main loop. Bart Trzynadlowski 2012-02-20 04:09:11 +0000
  • 453df4f5f5 - Finished cleaning up and optimizing the 2D renderer. - Fixed up color offset register support for new 2D rendering system. Now maintains 2 computed palettes for layers A/A' and B/B'. - Fixed a minor bug in InitPalette(); VRAM was not being typecast properly. - Fixed specular lighting bug that occurred on some OpenGL drivers because integers were not being interpreted as floats in the vertex shader. - Began to update copyright date in some files. - Graphics modules now use the C++-style names for C standard library headers (e.g., stdio.h -> cstdio) consistent with the rest of Supermodel. Bart Trzynadlowski 2012-02-20 03:45:48 +0000
  • 0257f1f9e8 Contour processing (discarding of pixels when alpha==0) enabled for A4L4 texture formats. Improves smoke and fire in Daytona 2. Bart Trzynadlowski 2012-02-17 07:45:50 +0000
  • 5709010cb2 Default SCSP balance set to 0. Was erroneously set at +50%. Bart Trzynadlowski 2012-02-14 09:13:36 +0000
  • 79d24d403f - NOTE: In this revision (possibly earlier), I've started to notice some intermittent geometry glitches in Spikeout and slowdown while playing certain characters. - Added multi-texture fragment shader to repo. - Added a multiTexture option (enabled by default) to use multi-texturing to decode textures. - Added some comments regarding timing to the PowerPC execution loop. Bart Trzynadlowski 2012-02-14 03:28:52 +0000
  • 30130f2bd5 Updated fragment shaders' floating point comparisons and also some knock-on changes from SVN revision 246. Nik Henson 2012-02-13 23:51:32 +0000
  • 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. Nik Henson 2012-02-13 23:37:48 +0000
  • 84eb017744 Added support for multiple texture sheets (with up to one per Model 3 texture format) as a rather brute-force way to handle overlapping texture formats in the current 3D engine. This fixes some corrupt textures in Daytona 2 and Virtua Striker 2 (and possibly other games) and also offers a small speed increase when some scenes load multiple overlapping textures. This feature only enables itself when a compatible shader script is loaded. Since none have been checked in yet this means it is currently disabled. Nik Henson 2012-02-13 21:54:26 +0000
  • 35a47bc7e3 Added command line options to force windowed mode and to control GPU multi-threading. Bart Trzynadlowski 2012-02-11 16:40:09 +0000
  • 1b8740165c Added a wide screen hack that can be enabled with the -'wide-screen' argument or WideScreen in the config file. Bart Trzynadlowski 2012-02-10 19:53:51 +0000
  • 40a51287df Tweaked help text slightly. Bart Trzynadlowski 2012-02-09 17:15:15 +0000
  • 09f9bd81fd Fixed left/right stereo channels -- they were reversed by default. Bart Trzynadlowski 2012-02-09 17:12:13 +0000
  • c5d0cb0d97 Added front/rear speaker balance (actually the master/slave SCSP balance). Balance setting is stored in CSoundBoardConfig and can be set on the command line (-balance) or config file (Balance). Valid range is 100 (front speaker volume doubled, rear muted) to -100. The default is 0, both sets at full volume. Balance is applied in the SCSP core before overall sound and music volume settings. Bart Trzynadlowski 2012-02-09 07:58:07 +0000
  • 6814ef1ed8 Added preliminary specular lighting to shaders. The "no spotlight" shader has not yet been updated. Bart Trzynadlowski 2012-02-06 02:54:43 +0000
  • 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? Bart Trzynadlowski 2012-02-01 18:08:13 +0000
  • 0fcb9686f9 Documented the tile generator. Bart Trzynadlowski 2012-01-27 22:27:38 +0000
  • 8a8609f383 - Added specular highlight support to the 3D engine. A shininess parameter is now be passed to the shaders. Does not work correctly and I will save the shaders themselves for a future commit. - Added support for layer priorities. Highly unoptimal! This absolutely needs to be polished up before any release (and properly documented). For now, priorities in the popular games seem to be fixed but not all possible priority settings have been figured out yet. Bart Trzynadlowski 2012-01-27 05:52:59 +0000
  • c38ec7d5af Removed unused dirty rectangle code. Bart Trzynadlowski 2012-01-26 02:57:02 +0000
  • e00a372cef Removed unused dirty rectangle code. Bart Trzynadlowski 2012-01-26 02:49:07 +0000
  • b7980aa562 Removed unused dirty rectangle code. Bart Trzynadlowski 2012-01-26 02:48:16 +0000
  • 93d68c5bf8 Added missing library WbemUuid.lib to VS project linker options Nik Henson 2012-01-22 16:33:40 +0000
  • 3315fb463b Small correction to lighting model in shaders. Light intensity is no longer clipped. Bart Trzynadlowski 2012-01-22 01:05:59 +0000
  • b57ba51e44 Removed unused (and non-functional) 'stack machine' scene graph traversal. Bart Trzynadlowski 2012-01-18 08:12:23 +0000
  • 4c7fe2f266 MinGW Makefile now uses cmd prompt commands, not UNIX/msys. Bart Trzynadlowski 2012-01-18 05:58:11 +0000
  • 1d64fc2c9e Added a MinGW Makefile for users of GCC on Windows. Bart Trzynadlowski 2012-01-18 05:28:34 +0000
  • dd4a1320b6 Removed deprecated, unused Turbo68K stuff. Bart Trzynadlowski 2012-01-18 05:25:39 +0000
  • 611ef43ba5 Now compiles with MinGW. Among other things, the use of __uuidof() was removed. Bart Trzynadlowski 2012-01-18 04:59:42 +0000
  • 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. Nik Henson 2012-01-16 23:21:14 +0000
  • 0835e38b94 Removed unecessary SDL include Nik Henson 2012-01-16 23:04:37 +0000