Commit graph

  • 5709ee2659 Sometime ago I managed to work out that specular on the model3 is not real specular, and really is just an extension of diffuse lighting. But attempts were derailed by corner cases and the fact we were not handling the normals correctly. Anyway Harry managed to successfully come up with an algorithm, and coefficients that give an almost perfect match to specular on the model3, based soley on observations from video footage! He also worked out that the lighting on hardware 1.5 onwards appears to be unclamped (ie greater than 1). This quite radically changes the brightness of some of the games, but much better matches the original hardware. Ian Curtis 2017-08-09 16:56:56 +0000
  • 1d338877fc cosmetic Ian Curtis 2017-08-03 11:05:04 +0000
  • 3fc28159eb Add the unclamped light model we know exists to the shaders. Ian Curtis 2017-08-03 10:41:18 +0000
  • b1bd877b82 Ski champ for some reason is passing denormalised numbers for the modelscale. This is causing a NaN in our shader killing the lighting for these models, so we simply skip these, since they are essentially zero anyway. Thanks to Harry for finding this bug :) Ian Curtis 2017-08-01 23:48:53 +0000
  • 9aa3f13777 We were force normalising the result of matrix * normal, which looked correct in most cases. But this didn't preserve the scaling of the matrix, or the scaling of the model normals which resulted in many over bright areas. On it's own this generally worked, but games like Star Wars looked quite broken. Harry correctly figured out if you scale these normals by the scaling value that is sometimes present in the culling nodes the lighting looks correct. Still more work to do to correctly figure out the model3's lighting model. Ian Curtis 2017-07-29 16:30:30 +0000
  • a9b49c1676 Implement unclamped light model based upon Harry's findings. Unknown how this is turned on/off. Ian Curtis 2017-07-22 17:15:14 +0000
  • 2335f3173b Use c++11 raw string literals Ian Curtis 2017-07-08 10:55:14 +0000
  • 3efb055344 Clamp the ambient light to a max of 0.75. LA Machine guns seems to use an ambient value of 1, which is full bright for everything. But for some reason the hardware seems to treat this as ~ 0.75. This fixes various missing shading in the game. This doesn't seem to have any negative effects on other games I have tested. Clamping in the shader as we might need the full range of values for fixed shading. Ian Curtis 2017-06-29 19:05:30 +0000
  • 9e9a549283 remove WIP code Ian Curtis 2017-06-25 20:09:45 +0000
  • ec3872d108 convert sun angle coordinate system outside of the shader Ian Curtis 2017-06-25 19:50:02 +0000
  • 97781108e8 A second go at fixing the fixed lighting in star wars .. Fixed shading is per vertex poly colours. For some reason in star wars they are treated as unsigned values instead of signed, like in every other game. These polys are all marked with specular enabled, where as in the rest of the games they are missing this flag. That's the only difference I can find. Ian Curtis 2017-06-21 17:04:53 +0000
  • 1532168af7 fix double offset Ian Curtis 2017-06-20 21:44:58 +0000
  • b00315b072 Revert previous fixed shading changes. Implement new logic for fixed shading on step 1.5 hardware based upon Harry's findings. Ian Curtis 2017-06-20 20:13:42 +0000
  • bb3c538808 remove debug code Ian Curtis 2017-06-20 19:46:06 +0000
  • 260daa1b91 Fix the fix shading in star wars. Fixed shading still needs some work for mag truck and dirt devils to match the arcade. Ian Curtis 2017-06-17 16:05:54 +0000
  • 73a7d2760d cosmetic Ian Curtis 2017-06-07 23:16:22 +0000
  • 1193069709 Tweak scroll fog logic again .. should fix missing 2d fogging in Spikeout. Ian Curtis 2017-06-07 23:14:01 +0000
  • 45741b24d2 rewrite scroll fog logic Ian Curtis 2017-05-06 16:47:31 +0000
  • 80004b0dad Remove debug code Ian Curtis 2017-04-25 00:31:39 +0000
  • 7694e4eb0c minor culling node optimisations Ian Curtis 2017-04-25 00:10:55 +0000
  • ff936c588b don't need cast, conversion is implicit Ian Curtis 2017-04-20 19:46:40 +0000
  • 912bb0e7cf better state handling Ian Curtis 2017-04-20 19:43:41 +0000
  • 9b226ed478 parse out some culling node values Ian Curtis 2017-04-17 10:40:07 +0000
  • 3c78571615 There are 2 bits in the polyheader labelled discard. When both are set ie in sega rally, the polygons are totally discarded. Scud seems to set bit 1 which seems halve the opacity. Ian Curtis 2017-04-15 19:00:46 +0000
  • 21836c088c The real3d has a flag that allows the hw to skip polygons so that they aren't rendered. Sega rally2 uses this for the dust effects. Triangles or quads that have this flag are junk, and look like random corruption if you try to draw them. We assumed polys that shared vertices with these bad polygons were also bad. It turns out the last few shared vertices in these polys were in fact valid, and thus the entire quad/triangle strip should be drawn and not discarded. Ian Curtis 2017-04-14 23:41:11 +0000
  • a2fcbf8a3a Linux Makefile fixed by Sergio Benjamin Bart Trzynadlowski 2017-04-14 17:09:33 +0000
  • fc50bdee98 light parameters must be clamped (HarryTuttle) Ian Curtis 2017-04-14 00:08:17 +0000
  • 391aafd4c1 Virtua fighter has a few massive polys that shouldn't be visible. It looks like these polys have a bad matrix, but the node distances are all zero. This means the bounding box that encapsulates them is of size zero. Skipping over these entirely seems to fix the issue. Ian Curtis 2017-04-12 15:47:57 +0000
  • 4a70d5ec9a Updated Util::Config::Node unit tests with multiple leaf node test Bart Trzynadlowski 2017-04-12 02:41:02 +0000
  • e462fbeda0 remove unused variable Ian Curtis 2017-04-11 11:11:45 +0000
  • 76817790d4 Extended -gfx-state to produce culling node analysis Bart Trzynadlowski 2017-04-11 07:03:47 +0000
  • 9dd2b24729 Fixed behavior of Util::Config::Node when adding nested nodes (only leaf level can be duplicated; e.g., foo/bar and foo/bar will create one foo with two bar children, rather than two foo each with one bar). Bart Trzynadlowski 2017-04-11 07:03:10 +0000
  • 901b8c3fa4 Spindizzi's SCSP DSP fix for the VF3TB cave stage Bart Trzynadlowski 2017-04-09 15:27:43 +0000
  • 9989eae8aa Hooked up the command line help options (thanks, Spindizzi!) and updated copyright info Bart Trzynadlowski 2017-04-09 15:08:02 +0000
  • 53fcb57ec5 Removed unnecessary patches from lemans24 Bart Trzynadlowski 2017-04-09 00:10:38 +0000
  • 06cb5708e3 add missing include Ian Curtis 2017-04-08 21:01:11 +0000
  • a649a0d36b Removed patches from source code and moved them into game XML file. Created ROMSet.cpp. Print a more descriptive error when game XML file fails to load. Bart Trzynadlowski 2017-04-08 18:30:29 +0000
  • 86ffda66d8 Updated help text to include -game-xml-file option Bart Trzynadlowski 2017-04-08 18:28:49 +0000
  • c8053e3178 Moved ROM patches into Games.xml and added patches to swtrilgy to make test emu work and to eca/ecau to pass the network check Bart Trzynadlowski 2017-04-08 18:16:26 +0000
  • 788a480ff3 add missing include Ian Curtis 2017-04-07 15:47:36 +0000
  • 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. Bart Trzynadlowski 2017-04-07 04:42:04 +0000
  • 4ca7d5ef0e Harry Tuttle's change to Harley gear shift to use a single bit instead of two (no detectable difference in behavior, though) Bart Trzynadlowski 2017-04-07 04:30:27 +0000
  • 205282a758 Removed unused file: Game.cpp Bart Trzynadlowski 2017-04-06 03:23:32 +0000
  • 25f22724d7 Fixed lamachin title -- thanks Jiterdomer! Bart Trzynadlowski 2017-04-05 20:57:40 +0000
  • 101e43213e cosmetic Ian Curtis 2017-04-05 19:32:01 +0000
  • edfb521a9b Daytona seems to use this completely undocumented feature of the real3d pro-1000, the ability to invert texture colours. This patch fixes the colours on the cars, and the signs which should flash by alternating their colours. Ian Curtis 2017-04-05 17:57:38 +0000
  • cc32e0bf8e Removed last vestiges of CINIFile from input system and removed Games.cpp, INIFile.cpp, and ROMLoad.cpp Bart Trzynadlowski 2017-04-05 16:19:08 +0000
  • df283d9aa3 Using Game::INPUT_* instead of obsolete GAME_INPUT_* Bart Trzynadlowski 2017-04-05 16:17:57 +0000
  • c013eab711 Changes by Harry Tuttle: game list more accurately reflects MAME's, added a root level XML "games" node, print ROM version along with title Bart Trzynadlowski 2017-04-05 05:35:45 +0000
  • f6707ecfba Fixed graphics state analyzer Bart Trzynadlowski 2017-04-04 23:28:06 +0000
  • c4bf565a1a Added cstring Bart Trzynadlowski 2017-04-04 23:27:39 +0000
  • ad6b4b0e71 Added remaining games largely thanks to the efforts of the mysterious '阳阳' Bart Trzynadlowski 2017-04-04 05:27:37 +0000
  • 4ebcf5865a more whitespace .. Ian Curtis 2017-04-03 12:02:49 +0000
  • a141635be6 white space .. Ian Curtis 2017-04-03 12:01:37 +0000
  • c617a453fa Cache dereferenced values. Cuts loading time from 15 to 5 seconds in debug mode :) Ian Curtis 2017-04-03 12:00:25 +0000
  • 5aafbbf936 Included cstring for memcpy Bart Trzynadlowski 2017-04-03 05:34:23 +0000
  • 2aa9dc7967 Rewrote large parts of ROM loading code to more gracefully handle merged sets where overwritten parent ROMs are not present. Better handling of multiple zip files. Optimized ROM loading when stride and chunk size are equal and got rid of safety checks that I don't believe are necessary any longer. Bart Trzynadlowski 2017-04-03 01:03:38 +0000
  • f0e00c5dc7 Rewrite the spot light code, and implement the missing fog logic. (HarryTuttle) Ian Curtis 2017-04-02 21:03:59 +0000
  • 07660be0df Fixed missing file detection (set_difference requires inputs sorted by desired key) and improved error reporting Bart Trzynadlowski 2017-04-01 05:08:50 +0000
  • e04c368114 Made scuda a child set of scud Bart Trzynadlowski 2017-03-31 05:32:16 +0000
  • 68ebf35aac Removed TODO comment Bart Trzynadlowski 2017-03-31 05:23:34 +0000
  • b0957e6459 Smarter game selection when a zip file contains multiple games (prefer child when parent is also present in zip) Bart Trzynadlowski 2017-03-31 05:23:04 +0000
  • e40d268214 Warn about parent ROM sets having parent defined (not allowed) Bart Trzynadlowski 2017-03-31 04:44:45 +0000
  • 47ce132292 Print missing files from games Bart Trzynadlowski 2017-03-31 04:27:09 +0000
  • fd0f7ec6d1 Support loading of parent ROM sets (e.g., scudp will load scud) Bart Trzynadlowski 2017-03-30 06:17:34 +0000
  • cd1a551e4b compile fixes Ian Curtis 2017-03-28 22:28:46 +0000
  • 1a766843b5 MSYS2 compile fix (HarryTuttle) Ian Curtis 2017-03-28 21:02:14 +0000
  • 69eac95846 Replace glsl 3 function. Apparently this doesn't work on OS X. Ian Curtis 2017-03-28 20:24:44 +0000
  • 70259eec34 fix compile warnings Ian Curtis 2017-03-28 19:33:16 +0000
  • 318f4cf6dc Sort games found in zip file by descending order of matching files so that game with the *most* matching files is picked Bart Trzynadlowski 2017-03-28 04:03:38 +0000
  • aa4331c2c4 Added: bass, daytona2, dirtdvls, harley, lemans24, scuda, skichamp, spikeofe, spikeout, von2, vs2, vs298, vs2v991 Fixed: dayto2pe title Bart Trzynadlowski 2017-03-28 04:01:50 +0000
  • 40486fc840 Fixed scud mpeg roms Bart Trzynadlowski 2017-03-28 01:05:35 +0000
  • ddbf08ac73 don't ask Ian Curtis 2017-03-27 22:06:23 +0000
  • f320af2049 fix project files Ian Curtis 2017-03-27 22:01:31 +0000
  • 3fefff36c2 fix multiple default constructors Ian Curtis 2017-03-27 18:15:15 +0000
  • 5c15dac16f add missing include Ian Curtis 2017-03-27 14:14:36 +0000
  • 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 :/ Bart Trzynadlowski 2017-03-27 03:19:15 +0000
  • 26a4417a5f Cosmetic: renamed step to stepping Bart Trzynadlowski 2017-03-27 03:13:34 +0000
  • 10befe4938 No need to enclose values in quotes when writing INI file. Print that file was saved to console and log. Bart Trzynadlowski 2017-03-27 03:10:36 +0000
  • 35d9842dd8 Added a TODO list Bart Trzynadlowski 2017-03-27 03:09:24 +0000
  • 2e6a58b21c Added srally2 Bart Trzynadlowski 2017-03-27 03:08:40 +0000
  • c4a63821c3 Encapsulated zip file handling and added a "parent" member to the Game struct Bart Trzynadlowski 2017-03-27 02:02:22 +0000
  • ba3a0b5e2a Checking in GameLoader.cpp, GameLoader.h, and ROMSet.h (not currently used in build) because I need to make a substantial modification in my local tree Bart Trzynadlowski 2017-03-26 16:38:55 +0000
  • 9e19b46692 Fixed dayto2pe sample ROMs Bart Trzynadlowski 2017-03-25 17:39:09 +0000
  • ff624afb4d The mipmap data in some games seems to being sent behind the base textures, and when the base textures are bound and created the mipmap chain is not yet valid in memory. To fix this, we invalidate the base textures, when the mipmap chain is updated. Ian Curtis 2017-03-25 00:06:24 +0000
  • 06c1cdcf94 Just use 1 hash map for the textures, instead of 1 for each format. Should greatly speed up texture invalidation. TODO invalidate texture mipmaps .. the h/w actually seems to stream the mipmap data separate from the base textures in some cases. Ian Curtis 2017-03-24 20:54:12 +0000
  • 98d56ff011 cosmetic Ian Curtis 2017-03-24 17:43:07 +0000
  • 82ac030dff calculate the correct number of mipmap textures Ian Curtis 2017-03-24 16:51:52 +0000
  • 17f878421b Originally to do mipmapping, I just used the base texture and then let the h/w automatically generate the mipmap chain. I wasn't sure the real3d api even exposed to the programmer the ability to directly set the mipmap data. Anyway, as pointed out by HarryTuttle scud actually uses darker mipmaps for an effect on the water. This patch uses the uses the actual mipmap data from the real3d memory. Only tested scud, so hopefully I didn't cause any cataclysmic errors :) Ian Curtis 2017-03-24 13:38:20 +0000
  • df3805e741 Added fvipers2 Bart Trzynadlowski 2017-03-24 05:33:25 +0000
  • 17f7c2d9f6 use 32bit types Ian Curtis 2017-03-23 17:18:33 +0000
  • 3c2cf175f4 Added more games to Games.xml: dayto2pe, eca, lamachin, lostwsga, magtruck, oceanhun, vf3. Fixed swtrilgy (MPEG music). Bart Trzynadlowski 2017-03-23 04:38:39 +0000
  • 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. Bart Trzynadlowski 2017-03-23 04:22:25 +0000
  • 9fb6acc92d fix scissor code for native resolution (thanks HarryTuttle) Ian Curtis 2017-03-22 20:38:44 +0000
  • 519cce34f5 remove debug code Ian Curtis 2017-03-19 09:54:51 +0000
  • 9780f333b4 The model3 has this weird issue where the 2d and 3d planes are misaligned by 2 pixels. Originally I made a quick hack that shifted subviewports 2 pixels. But apparently that wasn't enough, as the issue effects everything. Thanks to HarryTuttle for pointing this out, and making a patch :) Ian Curtis 2017-03-19 01:33:45 +0000
  • b19ceb0b6a Texture coordinates seem to be scaled relative to the fixed texture size of 256. Thanks to HarryTurtle for figuring this crazy logic out. The road in scud matches the arcade now almost perfectly. Ian Curtis 2017-03-13 00:59:35 +0000
  • dcd018ab7e Change microtexture scaling values. Seem to much better match expected output. (thanks HarryTuttle) Ian Curtis 2017-03-12 19:00:00 +0000
  • 732e3ef51f More fixes to microtexture coordinates. They go vertically up and down the texture sheet, and not horizontally as I had guessed. (Thanks HarryTurtle) Ian Curtis 2017-03-11 12:55:47 +0000
  • 6636776f03 Fix microtexture texture coordinates (thanks HarryTuttle) Ian Curtis 2017-03-11 01:18:43 +0000