Commit graph

  • 503c88df11 fix the bad projection matrix in dirt devils and lost world Ian Curtis 2017-03-07 01:29:07 +0000
  • f173c3c3ce The hardware actually seems to treat the quad primitive as a triangle strip. The winding order can actually change between the first and second 'triangle' inside the quad, leading our code to incorrectly backface cull the 2nd triangle. So we must re-calculate the winding order for the 2nd triangle. This fixes a massive missing poly in the road in la machine guns, probably other games too. The hardware is unaffected by the winding order, as it doesn't calculate the poly normal from the vertices directly, instead it uses the provided normal in the poly header. Ian Curtis 2017-02-21 23:35:40 +0000
  • 5b9741bd5d Support high priority polygons. They are treated as a separate overlay plane by the h/w. Fixes some missing fx in harley. Ian Curtis 2017-02-20 17:22:32 +0000
  • 2ae2010ee4 Add high priority poly function. Used by harley. Ian Curtis 2017-02-18 23:58:08 +0000
  • 4a116190b5 When the translator map?? bit is enabled the colour format seems to be 4-5bit. Max observed value is 16. Scaling these values up seems to produce the correct colours in harley and dirt devils. Ian Curtis 2017-02-16 17:20:42 +0000
  • 7407d03036 Put a check in there, in case near values come out really close to zero. Fixes a slight corner case in lemans24. A check probably should have been there originally :) Ian Curtis 2017-02-08 16:14:50 +0000
  • 24cbeed526 Dynamically calculate near/far frustum planes for each viewport priority layer by clipping the overlapping meshes with the 4 frustum planes. A bit brute forcy, but the results are great. Ian Curtis 2017-02-07 14:05:03 +0000
  • 144125a62e mark the nodes without valid distances set Ian Curtis 2017-02-05 15:36:05 +0000
  • c82dc55485 cosmetics Ian Curtis 2016-12-22 22:11:19 +0000
  • 72dd0dbf98 only need to cull against 4 clipping planes Ian Curtis 2016-12-22 22:09:13 +0000
  • 20a9514aa2 For scroll fog set the viewport to the entire area, allows fog to work in widescreen mode Ian Curtis 2016-12-15 19:27:08 +0000
  • ca7046729e properly cache un-normalised texture coordinates, fixes a texturing regression in Daytona Ian Curtis 2016-12-15 12:10:52 +0000
  • f355e2d062 fix microtexture colours Ian Curtis 2016-12-15 00:45:32 +0000
  • 89e75a9803 Only check scroll fog value from the first viewport from each priority layer. Seems to fix problems with background fogging. Ian Curtis 2016-12-14 19:57:05 +0000
  • 707e945db9 delete unused files Ian Curtis 2016-12-09 14:15:11 +0000
  • 2c23268d88 Support microtexture relative scale. The exact scaling values are not known, but a 2x difference between each level seems highly likely. We know from visual inspection from scud that the first level is exactly 4. The SDK has a function that accepts a float input for scale and does this. lod = (1/scale) + 0.5. If lod>3 lod = 3. So this is our best guess. Ian Curtis 2016-12-09 14:13:46 +0000
  • da8b63b44b The model3 shares vertices between polygons. But it also seems to do this for polygons with different textures. This means the texture coordinate for potentially different sizes textures is shared. Currently this was broken leading to some corrupted looking textures. The fix is to simply cache the old texture coordinates, and recalculate the normalised coordinates in the new texture coordinate space. Ian Curtis 2016-12-06 14:39:46 +0000
  • 10a5d2c0e1 refactor Ian Curtis 2016-12-06 12:25:34 +0000
  • eece2d75b4 tweak scroll fog logic Ian Curtis 2016-12-04 22:37:49 +0000
  • adbebb0204 clean up Ian Curtis 2016-12-04 22:37:22 +0000
  • a310e8e5cf minor optimisations Ian Curtis 2016-11-28 17:32:25 +0000
  • abc8c24b69 Only check the geometry for culling with valid node distances. We will need this later. Ian Curtis 2016-11-27 19:30:46 +0000
  • fe60d115d2 Revert changes .. if we clip against the real3d clipping planes, our wide screen hack won't work anymore. Ian Curtis 2016-11-26 01:19:51 +0000
  • 665fa90425 Get clipping planes directly from the viewport data. Also no need to clip against a far plane Ian Curtis 2016-11-26 01:12:08 +0000
  • 54c405709f Need to walk back in memory and check the previous texture tiles to see if they overlap with the current textures being invalidated. If they overlap they must be cleared too. Algorithm is a bit brute forcy and more expensive than I'd like but it fixes the bad textures in Spikeout. Ian Curtis 2016-11-22 20:30:10 +0000
  • 84ae8f035c Skip processing the mipmap section of memory. The real3d doesn't create mipmaps down to 1x1 that is needed to do mipmapping properly on modern hardware anyway. Ian Curtis 2016-11-21 09:04:56 +0000
  • 2ddc8a30e0 Clear queued texture uploads after processing them. Saves re-uploading the same textures whilst paused Ian Curtis 2016-11-20 17:02:59 +0000
  • 10dd530cde More accurate 2D colours. White should map to 255 not 248 Ian Curtis 2016-11-15 12:44:47 +0000
  • 483ba2f398 Fix the shading in scud. When lighting is disabled the fixed shading intensities appear to be offset values added to the colour value. Ian Curtis 2016-11-11 17:50:27 +0000
  • 0a7c0d0864 change throttle logic for smoother playback, we could get closer to 60fps if SDL timers weren't so lame Ian Curtis 2016-10-21 00:04:12 +0000
  • 2f49012786 change scroll fog logic to parse the lower priority viewports first Ian Curtis 2016-10-09 18:10:57 +0000
  • f0a15febd1 implement scroll fog, fixes a tonne of missing fx Ian Curtis 2016-10-09 16:34:12 +0000
  • ef11990d19 Parse out scrollfog value used for blending over the 2d background. Ian Curtis 2016-10-08 15:41:16 +0000
  • 33e795de9b Fix scenes with missing fog in ocean hunter. The game was passing negative fog densities. The sign seems to be ignored by the model 3. Ian Curtis 2016-10-08 15:15:25 +0000
  • 9eeb81ac69 same fix for legacy engine Ian Curtis 2016-10-08 12:10:47 +0000
  • 33cf6c89d1 our scratch mem must match correct max texture size Ian Curtis 2016-10-08 11:59:25 +0000
  • c472d90fb9 Fix the sky in advanced stage in Dirt Devils. It uses a massive (for 1998 :p) 1024x256 texture. Ian Curtis 2016-10-06 20:10:45 +0000
  • c3581c9fe8 Support multiple microTextures, fixes crazy texturing in sega ski champ. I'm assuming microtextures are always located on the other memory bank to the base texture. This logic seems to work for all our games anyway. Ian Curtis 2016-10-06 01:37:29 +0000
  • e21ea93319 Added RGBA4 format to BMP file writer Bart Trzynadlowski 2016-09-07 01:25:27 +0000
  • 3df3610361 Made parsing of hex values more robust Bart Trzynadlowski 2016-08-25 04:54:08 +0000
  • 23435ae4fe Initial check in of Games.xml (only two games defined so far) Bart Trzynadlowski 2016-08-25 04:53:38 +0000
  • 458684eb22 Fixed new 3D engine's fragment shader to work on some older GPUs by reducing the number of discard statements to one Bart Trzynadlowski 2016-08-24 22:21:18 +0000
  • 4b184b05dc Updated game loader to make use of latest changes to config tree: generic value types and eliminated pointers Bart Trzynadlowski 2016-08-24 04:13:23 +0000
  • c2f80cef6b Support for hex numbers in string to integer conversions (with '0x' prefix) and special keywords in string to bool conversions (true/false/on/off/yes/no) Bart Trzynadlowski 2016-08-24 04:11:52 +0000
  • f08ad1584f Added Util::Stricmp() and small tweak to serialization of Util::Format Bart Trzynadlowski 2016-08-24 04:10:20 +0000
  • 2efe18b525 Added support for multiple value types in config nodes. Removed Ptr_t and ConstPtr_t from public interface, moved config tree builders into their own file, and made them pass by reference and value. Exceptions can be thrown now on lookup failures. Removed s_empty_node -- failed lookups in [] operator create a permanent "hidden" child. Updated comment in NewConfig.cpp. Bart Trzynadlowski 2016-08-21 22:22:45 +0000
  • 01a6ad1596 Added copy constructor and assignment operator using C++11 move semantics Bart Trzynadlowski 2016-08-19 00:01:45 +0000
  • a9816467d8 Defined inputs Bart Trzynadlowski 2016-08-18 04:19:36 +0000
  • fbeeb3c922 Support for deep copies via assignment operator. This will pave the way for elimination of Ptr_t and ConstPtr_t. Bart Trzynadlowski 2016-08-18 04:14:36 +0000
  • 5652aab91f Added Write() method to write buffer to an ostream, and added an ostream operator overload Bart Trzynadlowski 2016-08-18 04:13:50 +0000
  • 1dc360a8b0 Changes to game loader interface, added 32-bit word swapping utility function Bart Trzynadlowski 2016-08-11 03:53:19 +0000
  • 41105c15d7 Added Logger.o to OSX and UNIX Makefiles. Should fix compilation on these platforms. Bart Trzynadlowski 2016-08-10 03:38:19 +0000
  • 821243b80f Removing MSVC Makefile Bart Trzynadlowski 2016-08-10 03:37:29 +0000
  • a2423a8b75 Initial check-in of game loader (not operational yet) Bart Trzynadlowski 2016-08-10 03:28:40 +0000
  • 037bfc648d Byte swapping utility function Bart Trzynadlowski 2016-08-10 03:27:59 +0000
  • 718c237063 Added ValueAsBool(), ValueAsBoolWithDefault(), and ValueAsUnsignedWithDefault() Bart Trzynadlowski 2016-08-10 03:27:01 +0000
  • f4311a0ab2 update visual studio project Ian Curtis 2016-07-10 13:11:51 +0000
  • 52d6eac7e5 Added Util::Config::Node::ValueAsUnsigned() with support for base 10 and 16 ('0x' prefix) Bart Trzynadlowski 2016-07-10 04:25:41 +0000
  • 331d7042f2 Added Util::ToLower() Bart Trzynadlowski 2016-07-10 04:25:12 +0000
  • a84aacf80b Config::Node::Add() now supports nested keys (e.g., Add("foo/bar/baz", "0") will create three nested config nodes) Bart Trzynadlowski 2016-07-09 15:19:17 +0000
  • 24c341120a Changed Config::Node::Create() to Add() and added a Set() method (for INI semantics). Turned Test_Config.cpp into a proper unit test reporting pass/fail for each test. Bart Trzynadlowski 2016-07-09 14:45:48 +0000
  • 2e069af603 Adding tinyxml2 lib Bart Trzynadlowski 2016-07-07 05:05:27 +0000
  • 724dc93294 XML parsing support for new config system Bart Trzynadlowski 2016-07-07 04:59:10 +0000
  • bcc663d4eb Moved logging functions into OSD/Logger.cpp (eventually logging system will be reworked entirely) and added new config tree structure (not yet used). Bart Trzynadlowski 2016-07-05 01:15:58 +0000
  • 0650ffc37c Updated Win32 gcc, UNIX, and OSX Makefiles Bart Trzynadlowski 2016-07-04 01:02:04 +0000
  • 0ab486645c Updated Fragment_NoSpotlight.glsl (fragment shader for legacy engine without spot light) Bart Trzynadlowski 2016-07-04 01:00:24 +0000
  • 732bff2769 disable spot light if the extent is zero Ian Curtis 2016-06-29 20:53:19 +0000
  • 1c39956568 Saving progress on scudp disassembly Bart Trzynadlowski 2016-06-29 03:29:00 +0000
  • efa7776871 parse some unimplemented spot light values from viewport Ian Curtis 2016-06-27 17:35:27 +0000
  • 012253efe3 Added disassembly of Scud Race Plus Bart Trzynadlowski 2016-06-27 03:22:38 +0000
  • de043355bc Marked offset of code in CROM for scudp Bart Trzynadlowski 2016-06-24 01:01:30 +0000
  • d058a29ac8 stencil translucent non textured polys Ian Curtis 2016-06-19 23:33:06 +0000
  • 85c4d85562 refactor Ian Curtis 2016-06-19 21:43:09 +0000
  • c2b1db11f8 Cull geometry based on the culling distances in the nodes. Should give some sort of speedup on lower end pcs where the CPU is predominantly the bottle neck. Ian Curtis 2016-06-16 20:05:29 +0000
  • f31f06b42e Fix compilation when SUPERMODEL_DEBUGGER enabled Bart Trzynadlowski 2016-06-13 00:53:39 +0000
  • d799c63b1a cache bound texture Ian Curtis 2016-06-10 11:29:20 +0000
  • 48a79a8f14 cleaning Ian Curtis 2016-06-10 10:18:47 +0000
  • b0911afd1f Added drive board and lamp raw outputs (submitted by SailorSat) Bart Trzynadlowski 2016-06-07 01:51:16 +0000
  • 8440bc7f03 support negative exponent Ian Curtis 2016-06-03 09:33:46 +0000
  • 5081ee99dc Add code to convert the 16bit float format used by the hardware back into float 754 format. 16bit floats are used for the culling radiuses in the nodes. Ian Curtis 2016-06-03 00:01:34 +0000
  • 6dc5845d47 Added -vsync and -no-vsync option descriptions to command line help Bart Trzynadlowski 2016-06-02 23:51:43 +0000
  • 9bc1fbf0cb remove dead code Ian Curtis 2016-06-02 21:26:50 +0000
  • 968652bcfb Added a Split() function to Util::Format. Bart Trzynadlowski 2016-06-02 03:14:46 +0000
  • d1330d310c XInput fix: search for all three possible XInput DLLs (xinput1_4.dll, xinput1_3.dll, and xinput9_1_0.dll). I have not tested 32-bit builds. Bart Trzynadlowski 2016-06-02 00:13:42 +0000
  • ff8e9d6aad Check for overflow. Fixes some fade effects Ian Curtis 2016-05-30 23:10:56 +0000
  • 9a49fefe12 Legacy engine: fixed texture offsets (VON2 was broken by last commit). Texture coordinates are wrapped within the bank first and then the bank can be swapped. This also allows the full range of texture coordinate bits to be used as specified in the Pro-1000 SDK. Bart Trzynadlowski 2016-05-30 19:18:11 +0000
  • 36074d9fd5 Y texture offsets are just 5 bits. Texture coordinate wrap around happens in the same texture sheet, not into the next one. Fixes various texturing bugs in sega rally. Ian Curtis 2016-05-30 13:25:00 +0000
  • d1f49675b1 Legacy engine: Culling node texture Y offset is only 5 bits (fixes Sega Rally 2 initials decal) Bart Trzynadlowski 2016-05-29 20:49:28 +0000
  • 2ee0d9018e New engine: modf -> std::modf (fixes compilation on gcc) Bart Trzynadlowski 2016-05-28 20:54:25 +0000
  • 1a908dd414 Legacy engine: expanded color index to 12 bits from 11. Does this affect any games? Bart Trzynadlowski 2016-05-28 20:50:05 +0000
  • 5c1a240565 New engine: expanded color indices to 12 bits from 11. Added PolygonHeader::ColorIndex and SensorColorIndex methods. Bart Trzynadlowski 2016-05-28 20:49:10 +0000
  • 2ef5203839 Forgot to describe one polygon header field in Model.cpp Bart Trzynadlowski 2016-05-28 20:40:45 +0000
  • e4a5c341dd Updated polygon header descriptions Bart Trzynadlowski 2016-05-28 20:33:10 +0000
  • 0ebb8d5d47 Legacy engine: Added stencil buffering for layered models and shadows. Not as accurate as new engine because stencil buffering is applied per-model rather than per-polygon, so the entire model must consist of stencil-tested polygons. In practice, though, this seems to work fine. Bart Trzynadlowski 2016-05-28 19:52:30 +0000
  • ce03c13847 Optimise non smooth texture repeat to only effect texture boundaries, rather than poly boundaries. Fixes a few ugly artefacts Ian Curtis 2016-05-28 13:21:35 +0000
  • 661f19be19 fix transparency values, values are from 0-32, not 0-16 where the top bit disables Ian Curtis 2016-05-27 22:20:57 +0000
  • 2086b1c9af Stencil layered polys, fixes shadow z fighting in some of the games. Other games maybe using stipple alpha (yuck), not sure yet. Ian Curtis 2016-05-27 19:30:40 +0000
  • 8979246642 remove bad rom patches Ian Curtis 2016-05-26 16:21:42 +0000
  • 3f9936d664 don't clamp after spot light code, looks much closer to h/w Ian Curtis 2016-05-26 09:06:09 +0000
  • 8ba8d7290e Hooked up Sega Bass Fishing / Get Bass controls Bart Trzynadlowski 2016-05-26 04:13:22 +0000