r637Fixed a bug in MCRFS instruction related to the VXSOFT, VXSQRT, and VXCVI bits. Thanks to Spindizzi.---------------------r636Finish fixed shading for 2.0 hardware. I'm pretty sure it actually works identically to step 1.5 hardware. The oddball is LA machine guns where the viewport ambient doesn't seem to effect the brightness. But the ambient works differently in this game because it uses the unclamped light model. Still need to investigate if the diffuse factor effects fixed shading.---------------------r635With fixed shading, when lighting is disabled, fixed shading appears to be a flat shaded version based upon the poly colour, instead of per vertex attributes.---------------------r634Pad struct and align on 4 byte boundary.---------------------r633simplify---------------------r632fixed shading doesn't effect the alpha channel---------------------r631Fixed shading (per vertex poly colours) on step 1.5 hardware have the viewport ambient value added to them. This fixes various shading on scud. To do this had to switch the maths to the vertex shader.---------------------r630Fix attribute locations. glBindAttribLocation must be called linking---------------------r629Added support for loading shaders from files for new engine and tile renderer. Changed help text to reflect new engine being default.---------------------r628make the new3d engine default :] Legacy engine can still be selected using -legacy3d in the command line---------------------r627use generic vertex attributes---------------------r626Technically matrix casts are only allowed in glsl 1.2 and later---------------------r625Remove debug code---------------------r624Sometime 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.---------------------r623cosmetic---------------------r622Add the unclamped light model we know exists to the shaders.---------------------r621Ski 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 :)---------------------r620We 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.---------------------r619Implement unclamped light model based upon Harry's findings. Unknown how this is turned on/off.---------------------r618Use c++11 raw string literals---------------------r617Clamp 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.---------------------r616remove WIP code---------------------r615convert sun angle coordinate system outside of the shader---------------------r614A 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.---------------------r613fix double offset---------------------r612Revert previous fixed shading changes. Implement new logic for fixed shading on step 1.5 hardware based upon Harry's findings.---------------------r611remove debug code---------------------r610Fix the fix shading in star wars. Fixed shading still needs some work for mag truck and dirt devils to match the arcade.---------------------r609cosmetic---------------------r608Tweak scroll fog logic again .. should fix missing 2d fogging in Spikeout---------------------r607rewrite scroll fog logic---------------------r606Remove debug code---------------------r605minor culling node optimisations---------------------r604don't need cast, conversion is implicit---------------------r603better state handling---------------------r602parse out some culling node values---------------------r601There 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.---------------------r600The 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. ---------------------r599Linux Makefile fixed by Sergio Benjamin---------------------r598light parameters must be clamped (HarryTuttle)---------------------r597Virtua 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.---------------------r596Updated Util::Config::Node unit tests with multiple leaf node test---------------------r595remove unused variable---------------------r594Extended -gfx-state to produce culling node analysis---------------------r593Fixed 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).---------------------r592Spindizzi's SCSP DSP fix for the VF3TB cave stage---------------------r591Hooked up the command line help options (thanks, Spindizzi!) and updated copyright info---------------------r590Removed unnecessary patches from lemans24---------------------r589add missing include---------------------r588Removed 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.---------------------r587Updated help text to include -game-xml-file option---------------------r586Moved ROM patches into Games.xml and added patches to swtrilgy to make test emu work and to eca/ecau to pass the network check---------------------r585add missing include---------------------r584Harry 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.---------------------r583Harry Tuttle's change to Harley gear shift to use a single bit instead of two (no detectable difference in behavior, though)---------------------r582Removed unused file: Game.cpp ---------------------r581Fixed lamachin title -- thanks Jiterdomer!---------------------r580cosmetic---------------------r579Daytona 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.---------------------r578Removed last vestiges of CINIFile from input system and removed Games.cpp, INIFile.cpp, and ROMLoad.cpp---------------------r577Using Game::INPUT_* instead of obsolete GAME_INPUT_*---------------------r576Changes by Harry Tuttle: game list more accurately reflects MAME's, added a root level XML "games" node, print ROM version along with title---------------------r575Fixed graphics state analyzer---------------------r574Added cstring---------------------r573Added remaining games largely thanks to the efforts of the mysterious '阳阳'---------------------r572more whitespace ..---------------------r571white space ..---------------------r570Cache dereferenced values. Cuts loading time from 15 to 5 seconds in debug mode :)---------------------r569Included cstring for memcpy---------------------r568Rewrote 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.---------------------r567Rewrite the spot light code, and implement the missing fog logic. (HarryTuttle)---------------------r566Fixed missing file detection (set_difference requires inputs sorted by desired key) and improved error reporting---------------------r565Made scuda a child set of scud---------------------r564Removed TODO comment---------------------r563Smarter game selection when a zip file contains multiple games (prefer child when parent is also present in zip)---------------------r562Warn about parent ROM sets having parent defined (not allowed)---------------------r561Print missing files from games---------------------r560Support loading of parent ROM sets (e.g., scudp will load scud)---------------------r559compile fixes---------------------r558MSYS2 compile fix (HarryTuttle)---------------------r557Replace glsl 3 function. Apparently this doesn't work on OS X.---------------------r556fix compile warnings---------------------r555Sort games found in zip file by descending order of matching files so that game with the *most* matching files is picked---------------------r554Added: bass, daytona2, dirtdvls, harley, lemans24, scuda, skichamp, spikeofe, spikeout, von2, vs2, vs298, vs2v991---------------------r553Fixed scud mpeg roms---------------------r552don't ask---------------------r551fix project files---------------------r550fix multiple default constructors ---------------------r549add missing include---------------------r548Massive 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 :/---------------------r547Cosmetic: renamed step to stepping---------------------r546No need to enclose values in quotes when writing INI file. Print that file was saved to console and log.---------------------r545Added a TODO list---------------------r544Added srally2---------------------r543Encapsulated zip file handling and added a "parent" member to the Game struct---------------------r542Checking 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---------------------r541Fixed dayto2pe sample ROMs---------------------r540The 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.---------------------r539Just 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.---------------------r538cosmetic---------------------r537calculate the correct number of mipmap textures---------------------r536Originally 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 :)---------------------r535Added fvipers2---------------------r534use 32bit types---------------------r533Added more games to Games.xml: dayto2pe, eca, lamachin, lostwsga, magtruck, oceanhun, vf3. Fixed swtrilgy (MPEG music).---------------------r532Added 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.---------------------r531fix scissor code for native resolution (thanks HarryTuttle)---------------------r530remove debug code---------------------r529The 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 :)---------------------r528Texture 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.---------------------r527Change microtexture scaling values. Seem to much better match expected output. (thanks HarryTuttle)---------------------r526More fixes to microtexture coordinates. They go vertically up and down the texture sheet, and not horizontally as I had guessed. (Thanks HarryTurtle)---------------------r525Fix microtexture texture coordinates (thanks HarryTuttle)---------------------r524fix the bad projection matrix in dirt devils and lost world---------------------r523The 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.---------------------r522Support high priority polygons. They are treated as a separate overlay plane by the h/w. Fixes some missing fx in harley.---------------------r521Add high priority poly function. Used by harley.---------------------r520When 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.---------------------r519Put 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 :)---------------------r518Dynamically 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.---------------------r517mark the nodes without valid distances set---------------------r516cosmetics---------------------r515only need to cull against 4 clipping planes---------------------r514For scroll fog set the viewport to the entire area, allows fog to work in widescreen mode---------------------r513properly cache un-normalised texture coordinates, fixes a texturing regression in Daytona---------------------r512fix microtexture colours---------------------r511Only check scroll fog value from the first viewport from each priority layer. Seems to fix problems with background fogging.---------------------r510delete unused files---------------------r509Support 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.---------------------r508The 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.---------------------r507refactor---------------------r506tweak scroll fog logic---------------------r505clean up---------------------r504minor optimisations---------------------r503Only check the geometry for culling with valid node distances. We will need this later.---------------------r502Revert changes .. if we clip against the real3d clipping planes, our wide screen hack won't work anymore.---------------------r501Get clipping planes directly from the viewport data. Also no need to clip against a far plane---------------------r500Need 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.---------------------r499Skip 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.---------------------r498Clear queued texture uploads after processing them. Saves re-uploading the same textures whilst paused---------------------r497More accurate 2D colours. White should map to 255 not 248---------------------r496Fix the shading in scud. When lighting is disabled the fixed shading intensities appear to be offset values added to the colour value.---------------------r495change throttle logic for smoother playback, we could get closer to 60fps if SDL timers weren't so lame---------------------r494change scroll fog logic to parse the lower priority viewports first---------------------r493implement scroll fog, fixes a tonne of missing fx---------------------r492Parse out scrollfog value used for blending over the 2d background.---------------------r491Fix scenes with missing fog in ocean hunter. The game was passing negative fog densities. The sign seems to be ignored by the model 3.---------------------r490same fix for legacy engine---------------------r489our scratch mem must match correct max texture size---------------------r488Fix the sky in advanced stage in Dirt Devils. It uses a massive (for 1998 :p) 1024x256 texture.---------------------r487Support 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.---------------------r486Added RGBA4 format to BMP file writer---------------------r485Made parsing of hex values more robust---------------------r484Initial check in of Games.xml (only two games defined so far)---------------------r483Fixed new 3D engine's fragment shader to work on some older GPUs by reducing the number of discard statements to one---------------------r482Updated game loader to make use of latest changes to config tree: generic value types and eliminated pointers---------------------r481Support 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)---------------------r480Added Util::Stricmp() and small tweak to serialization of Util::Format---------------------r479Added 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.---------------------r478Added copy constructor and assignment operator using C++11 move semantics---------------------r477Defined inputs---------------------r476Support for deep copies via assignment operator. This will pave the way for elimination of Ptr_t and ConstPtr_t.---------------------r475Added Write() method to write buffer to an ostream, and added an ostream operator overload---------------------r474Changes to game loader interface, added 32-bit word swapping utility function---------------------r473Added Logger.o to OSX and UNIX Makefiles. Should fix compilation on these platforms.---------------------r472Removing MSVC Makefile ---------------------r471Initial check-in of game loader (not operational yet)---------------------r470Byte swapping utility function ---------------------r469Added ValueAsBool(), ValueAsBoolWithDefault(), and ValueAsUnsignedWithDefault()---------------------r468update visual studio project ---------------------r467Added Util::Config::Node::ValueAsUnsigned() with support for base 10 and 16 ('0x' prefix)---------------------r466Added Util::ToLower() ---------------------r465Config::Node::Add() now supports nested keys (e.g., Add("foo/bar/baz", "0") will create three nested config nodes)---------------------r464Changed 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.---------------------r463Adding tinyxml2 lib ---------------------r462XML parsing support for new config system ---------------------r461Moved logging functions into OSD/Logger.cpp (eventually logging system will be reworked entirely) and added new config tree structure (not yet used). ---------------------r460Updated Win32 gcc, UNIX, and OSX Makefiles ---------------------r459Updated Fragment_NoSpotlight.glsl (fragment shader for legacy engine without spot light)---------------------r458disable spot light if the extent is zero---------------------r457Saving progress on scudp disassembly---------------------r456parse some unimplemented spot light values from viewport---------------------r455Added disassembly of Scud Race Plus---------------------r454Marked offset of code in CROM for scudp---------------------r453stencil translucent non textured polys---------------------r452refactor---------------------r451Cull 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.---------------------r450Fix compilation when SUPERMODEL_DEBUGGER enabled---------------------r449cache bound texture---------------------r448cleaning---------------------r447Added drive board and lamp raw outputs (submitted by SailorSat)---------------------r446support negative exponent---------------------r445Add 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.---------------------r444Added -vsync and -no-vsync option descriptions to command line help---------------------r443remove dead code---------------------r442Added a Split() function to Util::Format.---------------------r441XInput 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.---------------------r440Check for overflow. Fixes some fade effects---------------------r439Legacy 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.---------------------r438Y 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.---------------------r437Legacy engine: Culling node texture Y offset is only 5 bits (fixes Sega Rally 2 initials decal)---------------------r436New engine: modf -> std::modf (fixes compilation on gcc)---------------------r435Legacy engine: expanded color index to 12 bits from 11. Does this affect any games?---------------------r434New engine: expanded color indices to 12 bits from 11. Added PolygonHeader::ColorIndex and SensorColorIndex methods.---------------------r433Forgot to describe one polygon header field in Model.cpp---------------------r432Updated polygon header descriptions---------------------r431Legacy 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.---------------------r430Optimise non smooth texture repeat to only effect texture boundaries, rather than poly boundaries. Fixes a few ugly artefacts---------------------r429fix transparency values, values are from 0-32, not 0-16 where the top bit disables---------------------r428 - Some Sauce by Ian.Stencil layered polys, fixes shadow z fighting in some of the games. Other games maybe using stipple alpha (yuck), not sure yet.---------------------r427remove bad rom patches---------------------r426don't clamp after spot light code, looks much closer to h/w---------------------r425Hooked up Sega Bass Fishing / Get Bass controls---------------------r424basic spotlight code---------------------r423Fixed fog in legacy 3D engine. Now computed same as new engine, with 4-bit light modifier and corrected fog mixing in shaders.---------------------r422Updated legacy engine vertex shader to use specular shininess and coefficient along with old equation. Still not correct (too strong compared to the old method).---------------------r421fix alpha testing for texture format 7---------------------r420remove dead code---------------------r419support 4 bit textures---------------------r418correctly mask pointers---------------------r417optimise hash table access for better performance---------------------r416support colour table pointer---------------------r415remove debug code---------------------r414Fog start is apparently the fog value at the viewport (0,0,0) I guess like an ambient value. Default value is negative---------------------r413Non luminous polygons seem to be effected by the lightModifier also. API seems to have no restriction in this regard, neither does the SDK. The ocean hunter requires this for some of the 2d stuff. Light modifier values only seem to exist between 0-16, which is strange for 5 bits of precision. Possibly top bit disables the effect and lower 4 bits are the value. This clearly differs from the SDK, but without this the values come out clearly wrong.---------------------r412adjust (hopefully correct) fog equation---------------------r411preliminary specular---------------------r410- Removed a stale comment---------------------r409Legacy renderer changes:

- Updated shading model. Unfortunately, it is far from perfect but it seems to be the best I can do for now. Not really much of a difference from before except that the Scud Race castle is fixed at the expense of the Yosemite level in LA Machineguns being too bright.- Added lots of notes in the shading code.- Passing both specular coefficient and shininess to shader. This will probably break specular lighting for now until the shader is updated to use the shininess correctly.- Color table address in polygon RAM is now obtained from culling nodes as they are traversed (found this in the Pro-1000 SDK).---------------------r408Added palette bit to list of bits to dump for analysis---------------------r407Disable light modifier on fog, seems not to work .. values don't make sense. Maybe the model3 doesn't use these.---------------------r406remove dead code---------------------r405double up polys for two sided polys, fixes some diffuse lighting problems---------------------r404FLT_MAX -> std::numeric_limits<float>::max()r403Added some IRQ-related code (commented out for now) from MAME findings. May incorporate in the future when investigating IRQs and timing again.r402update header documentation---------------------r401Fix bad texture seems---------------------r400Reverted stencil mask change. This reintroduces the Scud Race 'ROLLING START' bug. Previous 'fix' did not work for Magical Truck Adventure anyway and also broke some games (Daytona 2 transmission and course select screen, ECA title screen). The stencil mask is not shifted by 16 pixels and I suspect that either there is some unknown trick to horizontal scrolling or that the behavior is affected by hidden raster timing registers hidden in the JTAG interface.---------------------r399Added a register read handler for tilegen (although nothing seems to benefit from it)---------------------r398Fixed 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---------------------r397Rewrote 2D renderer and fixed 2D layer priorities, stencil mask clipping (Scud Race 'ROLLING START'), and cleaned up code. Unfortunately, the new code is about 50% slower, mostly due to the need to perform stencil clipping after scrolling.---------------------r396add texture helper functions---------------------r395remove pointless loop---------------------r394Split face colour from per vertex poly colour. Fixes colour bleeding between connected polys in harley.---------------------r393Changed XInput DLL failure message---------------------r392update poly header class---------------------r391Fixed compilation on gcc (gotos cannot cross variable declarations)---------------------r390Flat shaded polys can't share vertex normals with adjacent connected polys. Fixes some bad lighting in Harley on pavements---------------------r389support flat shading---------------------r388Make sure texture is bound to correct texture unit, stop flashing micro textures in daytona---------------------r387set correct microtexture wrap mode---------------------r386preliminary microtexture---------------------r385skip viewports marked as disabled, might stop parsing some bad data---------------------r384fix compilation---------------------r383Added support for A1RGB5 to BMP file writer and added a (commented-out) example of how to use it to dump texture memory in ~CReal3D()---------------------r382wrap invalid texture sizes, seems to fix bad textures in srally2 (skid marks)---------------------r381Turn off lighting if fixed shading (or no normals) flag is present. Fixes some of the lighting weirdness in scud---------------------r380Legacy engine: fixed per-vertex fixed shading to incorporate Ian's findings that the intensity value is signed and that fixed shading applies only when lighting is enabled---------------------r379Daytona seems to use 3 bits for texture transparency, will figure it out later but for now this works---------------------r378Fix fixed shading maths---------------------r377Updated to-do comments---------------------r376fixed shading code---------------------r375Legacy engine: preliminary per-vertex fixed shading. Only limited testing with LA Machineguns (appears to work), Sega Rally 2 (appears okay), and Scud Race (fixes expert course bridge but not other mis-colored polygons).---------------------r374read front buffer---------------------r373Luminous bit is now also dumped in polygon header analysis because shading modes may depend on whether or not lighting is enabled---------------------r372Legacy engine: extracting fixed shading component (but still can't use it because unsure of how to activate)---------------------r371Fixed polygon header bit analysis code: was forgetting to swap GL buffer back to retrieve pixels from last rendered frame---------------------r370color flag---------------------r369update project---------------------r368make compilable with visual studio---------------------r367simplify---------------------r366Forgot a newline---------------------r365Polygon header bit analysis code (need to #define DEBUG and use -gfx-state option)---------------------r364Added utility function to write BMP files---------------------r363Updated polygon header description with double-sided bit (forgot it in last update!)---------------------r362Added an updated description of the polygon header to the top of Legacy3D/Models.cpp---------------------r361fix model normals, add code for fixed shading, as of yet flag to turn it on is unknown---------------------r360Legacy engine: vertex normals are standalone and do not need to be added to polygon normal---------------------r359Added a debug option to load and render a single frame of graphics state from a save state file. Only available if compiled with DEBUG defined. Invoked using: -gfx-state= on command line.---------------------r358Using IEmulator interface instead of CModel3 directly---------------------r357Changed save state file version (r340 changed Real3D save format, breaking compatibility with older states, and states were probably already incompatible with 0.2a)---------------------r356Fixed white space and warnings. Fixed second argument to -dis option in cases where other numerical parameters are specified on command line.---------------------r355Flattened out nested if-statements in new engine's fragment shader to improve compatibility with older GPUs (e.g., NVS 300)---------------------r354parse viewports in normal order---------------------r353walk siblings before children, fixes some of the transparency drawing issues in ocean hunter---------------------r352simplify---------------------r351avoid cast warning---------------------r350simplify list code---------------------r349Updated Mac OS X Makefile---------------------r348Fixed 8-bit texture decoding in legacy 3D engine. Contour mode/alpha still needs to be made consistent (as much as possible) with new engine.---------------------r347Updated Supermodel.ini with default Magical Truck Adventure controls---------------------r346Hooked up Magical Truck Adventure controls---------------------r345you were right Bart :) (Fixes broken sound in last build)---------------------r344Don't use variable sized variables across platforms, unless needed---------------------r343Fix - cannot specify explicit initializer for arrays---------------------r342Figured out Step 1.0 VROM texture uploads. Fixes missing textures in VF3 and VF3TB.---------------------r341Debugger compilation fixed: CBus -> IBus---------------------r340Fixed Magical Truck Adventure by emulating VROM texture ports as a FIFO. Now, VF3 crashes on Akira's stage (and probably the other stages with texture glitches). Other games may be affected, too (not thoroughly tested yet).---------------------r339Fixed Magical Truck Adventure country check (accidentally removed a line in previous commit).---------------------r338Magical 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.---------------------r337Created IEmulator interface, renamed CBus to IBus and CPCIDevice to IPCIDevice. Frames now rendered when emulator paused.---------------------r336tweak frustum planes---------------------r335Changed help text to explain that -sound-volume and -music-volume only take effect when DSB is present---------------------r334Fixes for non-Windows builds: Makefile updated and fixed header files in Vec.cpp---------------------r333revert viewport code---------------------r332change tex format 4---------------------r331Clamping diffuse+ambient light intensity to 1.0 (legacy engine)---------------------r330Added a comment about viewports---------------------r329Fixed texture enable bit (fixes Star Wars light sabers and Sega Rally 2 cones) and added a hack for (and more comments about) color modulation. Scud Race, Sega Rally 2, LA Machineguns, etc. look correct now, but Fighting Vipers 2 shadows ar...---------------------r328Fixed Types.h include---------------------r327Do not print extra hardware message when there is none---------------------r3268-bit texture upload byte selection (thanks to Ville; but not tested yet); code cleanup---------------------r325rgb values were swapped for paletted colours---------------------r324Use the correct texture enable bit---------------------r323Added a comment: observation of Star Wars and Scud Race color modulation issues.---------------------r322More textures fixed.---------------------r313add missing project files---------------------r312Allow asymmetric projection matrices. Fixes a bunch of missing effects and bad camera angles in harley.---------------------r311update project---------------------r310add LOD table data. Maybe we can get clipping planes out of these---------------------r309properly mark dynamic meshes as such---------------------r308allow 8 bit mono textures to be contour textures, fixes a bunch of missing transparency in harley la riders---------------------r307clear the rom mesh buffer---------------------r306Cache rom models, for better performance.---------------------r305---------------------r304WIP---------------------r303fix for bad matrix with NaN---------------------r302Fixed detected axis printf() and compiler warnings (hopefully I did not parenthesize any conditionals incorrectly!)---------------------r301finish front/back face culling code based on matrix determinant. Optimised opengl to avoid redundant state changes.---------------------r300add missing project file---------------------r299fix parenthesis error---------------------r298add maths functions---------------------r297Update project to vs 2013. Clean compile warnings---------------------r296Remove double copy of shaders---------------------r295fix basic compile errors (with vs)---------------------r294Tweaked Windows gcc Makefile---------------------r293Fixed compiler warnings, whitespace, and moved local variable declarations to site of assignment---------------------r292Include Version.h---------------------r291Fixed typo that broke build---------------------r290Fixed warnings and whitespace---------------------r289Fixed warnings and whitespace---------------------r288Fixed warnings and whitespace---------------------r287Moved lastCycles static int out of header file (fixes compiler warnings)---------------------r286Moved---------------------r285Updated to support new IRender3D interface and added FrameTimings object.---------------------r284CRender3D -> CLegacy3D---------------------r283Update Supermodel.h with graphics path and moved version string to separate header file---------------------r282Removing legacy 3D engine files that were already moved to Graphics/Legacy3D---------------------r281Adding new 3D engine by Ian Curtis. Old engine moved to Graphics/Legacy3D/.---------------------r280Fixed compilation errors involving min and max functions---------------------r279Added registers to debugger: ctr, xer, srr0, srr1, sdr1, imiss, dmiss, hid0, hid1---------------------r278Fixed compiler warnings---------------------r27753c810: 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.---------------------r276Fixed display of PowerPC condition code bits in debugger (were backwards) and changed XER to print as hex.---------------------r275Support for loading an arbitrary (non-game) CROM image.---------------------r274Gracefully handle the case when a zip file contains no known Model 3 ROM set.---------------------r273Converted line endings from DOS to UNIX format.---------------------r272Contribution by Luciano Lopez:- Added vs215o ROM set.- Security board data for vs298 now also returned for vs2v991, vs299, vs299a, and vs299b, helping them run.---------------------r271Some 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 placeNo 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...---------------------r270Changed output "Pause" to "pause", as it is spelled in MAME, for MAMEHooker.---------------------r269Small tweak to get to compile under GCC (Unix/MacOS)---------------------r268Slight 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.---------------------r267- 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.---------------------r266- 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.---------------------r265Committing 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---------------------r264Somehow John's Build.bat and Clean.bat did not get added in r262. Here they are.---------------------r263- 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...---------------------r262Applied a series of patches by John Peterson:- Fixed a printf statement in ConsoleDebugger.cpp.- Fixed memory watches not breaking in CPUDebug.h.- Added some helpful batch files to the VS2008 directory.- Added support for automatic loading of parent ROM sets.---------------------r261Applied Nik's fix for cyclical scene graphs. Improves Harley Davidson, Ski Champ, Emergency Call Ambulance, and Ocean Hunter.---------------------r260Brought 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.---------------------r259DirectInputSystem's initial state wasn't being initialized properly, which would sometimes result in invalid input values until keyboard or mouse was successfully acquired---------------------r268Added a clear() method to VBORef and removed unsafe memset() clear.---------------------r257This 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.---------------------r256Byte swapped sample ROMs. This should fix the audio distortion that many users noticed. The differences are particularly noticeable in Scud Race and Daytona 2.---------------------r255Forgot to update to-do list in previous revision. Added a comment to mark CRender2D::WriteVRAM() as deprecated.---------------------r254Previous "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.---------------------r253Further optimization/simplification of the 2D renderer's main loop.---------------------r252- 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.---------------------r251Contour processing (discarding of pixels when alpha==0) enabled for A4L4 texture formats. Improves smoke and fire in Daytona 2.---------------------r250Default SCSP balance set to 0. Was erroneously set at +50%.---------------------r249- 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.---------------------r248Updated fragment shaders' floating point comparisons and also some knock-on changes from SVN revision 246.-This line, and those below, will be ignored--M Shaders/Fragment_Flat.glslM Shaders/Fragment_NoSpotlight.glsl---------------------r247Added 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.---------------------r246Added 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.---------------------Supermodel v0.2a Changelog:- New, fully customizable input system. Supports any combination ofkeyboards, mice, and analog and digital controllers. [Nik Henson]- Texture offsets. Fixes models in 'Fighting Vipers 2', 'Virtual On',cars in the 'Scud Race' and 'Daytona USA 2' selection screens, etc.- Fixed a 2D palette bug that would cause black pixels to occasionallyturn transparent.- Added all remaining ROM sets. [krom]- Got some new games to boot: 'Spikeout', 'Ski Champ', 'Sega BassFishing', 'Dirt Devils', etc.- Sound support. Special thanks to ElSemi for contributing his SCSPemulator and Karl Stenerud for allowing us to use his 68K emulator.- Multi-threading support. Sound and drive board emulation are off-loaded to separate threads, substantially enhancing performance.[Nik Henson]- Z80 emulation based on code by Frank D. Cringle and YAZE-AG byAndreas Gerlich.- Digital Sound Board (MPEG music) emulation courtesy of R. Belmont andthe MPEG decoder library by Tomislav Uzelac.- Improved ROM loader. It should no longer be as easily confused bycombined ROM sets as long as unused files are removed.- Configuration file now supports more settings and allows game-specific customization.- Added light gun crosshairs ('The Lost World'), enabled by default infull screen mode and selectable by pressing Alt-I.- Drive board and force feedback emulation for 'Scud Race', 'DaytonaUSA 2', and 'Sega Rally 2'. [Nik Henson]- Viewable display area properly clipped. Ghost artifacts no longerappear in border regions when the resolution exceeds the displayarea.- Changed gear shifting: added a dedicated neutral gear and sequentialshifting.- Console-based debugger (not enabled by default, must beenabled during compile-time). [Nik Henson]- Source code and Makefile cleanup.---------------------Supermodel v0.1.2 Alpha Changelog:- Included missing GLEW files.---------------------Supermodel v0.1.1a Changelog:Thanks to Nik Henson, a 64-bit Windows build is now available from the Download page! I haven't tried it myself (I don't have 64-bit Windows) but Nik says it is a little bit faster at points where the 32-bit build normally slows down. I've also made a very minor source update, adding GLEW headers that were missing. The annoying GLEW-related warnings on Microsoft Visual C++ are now suppressed.---------------------Supermodel v0.1a Changelog:First Release.---------------------

For compatibility purposes, you can download the previous builds on this folder right here for release builds. Same goes for debug builds here.

As for custom music, your MP2 files has to be converted to 32000 Hz MP2 and place it into the root of Supermodel's folder and make sure your MusicVolume has to be set to 100 to avoid clipping. The original MP2 file was 128 Kbps, so you need to lower down the volume of your MP2 file, the more the bitrate was getting higher, the more the music crackles.

Hello everyone.I am new to the forum but I am from the start !!I wonder if emulating netlink is expected soon?seen the great progress of this emulator I am eager to fulfill connect my twin !!Once again thank you all for your great work !!

Last edited by Kimi on Mon May 30, 2016 2:36 am, edited 1 time in total.

fla56 wrote:hi, thanks for this but 64bit builds not running for me via Supermodel-UI, any ideas?

happening for EmuCR builds too in case that helps...

Win10 64bit i7-980x

Supermodel UI is outdated, use Emuloader. If you don't like Emuloader, you need to input the command line to run the game and setting up controls (only if you want to use Raw Input for Lightgun games).

Last edited by Jiterdomer on Mon May 30, 2016 1:24 am, edited 1 time in total.

Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine