top of page

42e236b / 11-06-2024





average rating is 4 out of 5
average rating is 4 out of 5
average rating is 4 out of 5

SuperModel emulates Sega's Model 3 arcade platform which uses OpenGL and SDL library to those arcade games. It's still considered to be in "alpha" stage of development, meaning it lacks many planned features and does not yet have a user-friendly graphical interface, game compatibility remains average, and all CPUs are emulated using straightforward interpretation rather than fast just-in-time translation. 

Front-End UI:  SuperModel 3 UI or SuperModel Assistant



Most Recent Changes


  • Add comment briefly explaining optimization

  • Minor shader optimization: If the mipmap level is 0.0, we only need to run texBiLinear() for the highest quality texture mipmap. Adds around 10-20% more performance in Daytona 2


  • Fix some missing scroll fog background effects in ECA

  • Spelling...


  • When disabling sound IRQs via MIDI control port, clear current IRQ. Prevents Dirt Devils hanging during boot


  • Sound IRQs are acknowledged by writing to MIDI data port


  • Merge pull request #149 from gm-matthew/scuddxo

  • Only access SCSI device at 0xC0xxxxxx if it has been configured to do so

  • Fixes some step 1.5 games not working in last update.


  • Adding newly dumped version of Scud Race

  • Use integer value for game stepping

  • Allow Step 1.5 games to access 53C810 via 0xC00000xx if the netboard is disabled, because scuddxo requires this


  • Updated .gitignore to exclude build directories and Supermodel release directories


  • Merge pull request #138 from h0tw1r3/fix/2d-shaders which Fixes 2D texture rendering on OSX


  • CLogger: destructor needs to be virtual


  • fix segfault in CMultiLogger: vsprintf may change its va_list argument so repeatedly calling it with the same va_list arg is undefined behavior. Fix this by creating a copy of the va_list argument before each vsprintf call.


  • PowerPC frequency determined by board stepping, config option is now just an override


  • No need to have changelog from 2011 in Readme.txt anymore.


  • Clamp LODscale. If the object is drawn at zero we produce an Inf value which will produce Nans with later calculations.


  • Amend ambient fog logic: Should stop the sky flashing in lemans24, and the background totally disappearing in sega rally after a game. The logic here is still not totally understood but works well enough for the games.


  • Add supersampling anti-aliasing: Late christmas present. Due to the way alpha works on the model3 adding regular anti-aliasing doesn't really work. Supersampling is very much a brute force solution, render the scene at a higher resolution and mipmap it. It's enabled via command line with the -ss option, for example -ss=4 for 4x supersampling or by adding Supersampling = 4 in the config file. Note non power of two values work as well, so 3 gives a very good balance between speed and quality. 8 will make your GPU bleed, since it is essentially rendering 64 pixels for every visible pixel on the screen.


  • Floating point reversed z-buffer and new clipping code

  • Added new uniform bool polyAlpha to shaders; Added original matrix functions back into Mat4 class though they are currently unused

  • Floating point reversed z-buffer and new clipping code; Also always draw nodes with culling disabled even if they test as being outside the visible frustum


  • Remove debug code

  • Fix some stencil issues:Merge pull request #120 from gm-matthew/patch 

  • Fixed Scud Race Plus "ROLLING START" patch

  • Accidentally patched the wrong memory location in Scud Race Plus

  • Merge pull request #118 from firewave/uninit 

  • Model3.cpp: avoid usage of uninitialized memory

  • Inputs/MultiInputSource.cpp: fixed mismatching allocation and deallocation

  • Src/Inputs/MultiInputSource.cpp:87:3: error: Mismatching allocation and deallocation: CMultiInputSource::m_srcArray 

  • fixed some -Wunused-* compiler warnings stencil mask must be set to all 1s otherwise we can't clear all the bits in the stencil buffer. Also we no longer need to save/restore the depth buffer into between priority layers.


  • Dirt Devils does not use the handbrake

  • fix minor error


  • Remove debug code

  • Fix some stencil issues: stencil mask must be set to all 1s otherwise we can't clear all the bits in the stencil buffer. Also we no longer need to save/restore the depth buffer into between priority layers.


  • Added some TODO notes to Main.cpp

  • Fixed graphics analysis -gfx-state option

  • DSB.h: when generating a debug build in gcc w/ -g, k_framePeriod was causing a linker error. Not sure why k_timerPeriod wasn't but made them both constexpr.

  • byte_layout attribute for region tag, intended to support Sega Racing Classic 2 ROM extracted from Yakuza

  • Rewrite the stencil buffer usage slightly, so both the LOS and layered polys work. LOS uses the top bit of the stencil buffer. Fixes some minor issues with draw order in sega rally.


  • Fix regression: Scroll attenuation seems to disable ambient fog. If scroll attenuation is enabled it's telling the h/w to draw the real3d spot light on fog for the scroll fog layer. This should fix a regression where the background disappears on sega rally.


  • Correct scroll fog attenuation logic

  • The attenuation value effects the spot light on fog for the scroll fog layer. The old implemention was nearly correct but the paramaters for the mix function were swapped.

  • Scroll fog needed a break statement otherwise it could draw potentially multiples times.

  • The fog atttenuation paramater doesn't appear to effect scroll fog, other than to potentially enable it. This fixes some issues with emergency call ambulance.

  • Added support for the node discard attributes which sega rally2 uses to throw away specific geometry. This fixes junk that starts to show up in the levels after multiple runs.

  • Add LOD switching and blending out culling nodes


  • Fix the line of sight function. Polygons have a line of sight value that's either a 0 or 1. We write this value into the stencil buffer, then read the app can read it back to determine the polygon attribute is visible or not. The returned value is 1/depth value in world coordinates. The first bit of the float is actually a control bit, 1 indicates no geometry hit, 0 indicates geometry hit.

  • Update comments for the culling node function. gm_matthew worked out that the last 2 bits of the model scale float appear to be control bits for disable culling and valid model scale. Strange logic but the line of sight (LOS) function does something similar by re-using float bits for control words.


  • Update to define GIF widths (for Safari) 

  • Set language standard to c++ 17


  • Fix white gfx on linux / intel gpus. These optimisations originally came from toxieainc


  • Amend the ambient fog logic to be disabled if fog density/start is set to zero. This fixes a regression where the sky stops drawing in lost world.

    Rewrite the scroll fog shader slightly. Scroll fog is a 2d layer, it has no depth, or can be considered to be drawn at infinity, therefore is not effected by the viewport light. The scroll attenatuion value also I think attenatutes the scroll fog alpha value. This fixes various effects in emergency call ambulance.


  • Prior scroll fog logic was nearly correct. For scroll fogging to draw it needs either a start value or a fog density value, but these can come from a different viewport if they have the same colour fog set. This fixes the credits in vf3 which sets scroll fog, but it never draws on the original hardware.

    For a long time we've had bug reports that in vf3 the background in the Dural levels was the wrong colour, it should have been much darker. We thought it was again missing scroll fog, but gm_mathew worked out it was actually coming from the fogAmbient paramater. Not only does it darken the fog, but it also has an effect on the 2d background from the tilegen, similar to scroll fog. This also fixes the sky in lemans24.


  • Remove debug code 

  • Rewrite the logic for the scoll fog (render buffer clear colour). Each viewport can potentially have a scroll fog value so the logic of which value to pick wasn't immediately clear. TLDR I think it picks the highest value starting from the lowest priority layers. This fixes the sky in daytona battle on the edge.


  • Scroll fog is like a clear colour for the render target, but can be semi transparent as the tilegen layer can be shown underneath. I assumed that transprent polys would be drawn to the render target for transparent polys but unfortunately the logic does not work. So where else could it be drawn? Well with limited memory it must be draw to the buffer for opaque polys, which means this render target is also blended.


  • Implement correct "round to nearest" mode On PowerPC round to nearest ties to even, not away from zero. Also implement correct behavior for ppc_fresx Fixes "tips to win" sequence in Daytona 2 BOTE

  • Rewrite the renderer a bit to spit out the finished graphics from the 3d chip on separate buffers. One buffer is for opaque pixels, and 2 more for translucent pixels. Before the frame was composited on the back buffer, which meant the tilegen had to have been drawn first. This way the images are now totally independant of the tilegen chip so can be drawn as soon as the register write 0xC is written to the tilegen.

  • Some games update the tilegen after the ping_ping bit has flipped at 66% of the frame, so we need to split the tilegen drawing up into two stages to get some effects to work. So having the tilegen draw independantly of the 3d chip can make this happen.


  • Updated build script to use SFTP ( server upgrade no longer supports ftp)


  • Updated build script to use SFTP ( server upgrade no longer supports ftp)

  • gm_mathew worked out that the camera flashes in sega rally 2 have the'reset-matrix' attribute set inside the culling nodes, which was unsupported until now because we never found any games to have used this bit. The reset matrix is a bit strange, I would assume it would just reset the matrix back to identity, instead it seems to just reset the rotation back to identity whilst preserving the scale/position.


  • Update README

  • Model3.cpp: Comment describing scan line timing.

  • Ping-pong flip timing depends of the value of tilegen register 0x08

  • Also make the debugger display 16 bytes per line when using the "listmemory" command. Mirrored system registers can now be watched


  • Update rules file. Not tested this but hopefully it should work

  • Emulate the entire tilegen chip in a GLSL shader. (This is now possib……le with opengl 3+). The tilegen drawing was emulated on the CPU, but was one of the most expensive functions in the emulator according to a profiler. On a modern GPU it's pretty much free, because a GPU is a massive SIMD monster. 

  • Tilegen shaders are mapped to uniforms, and the vram and palette are mapped to two textures.

  • TODO rip out the redundant code in the tilegen class. We don't need to pre-calculate palettes anymore. etc

  • The tilegen code supports has a start/end line so we can emulate as many lines as we want in a chunk, which will come in later as some games update the tilegen immediately after the ping_pong bit has flipped ~ 66% of the frame.

  • The scud rolling start tilegen bug is probably actually a bug in the original h/w implementation, that ends up looking correct on original h/w but not for us. Need hardware testing to confirm what it's actually doing.


  • Prevent "ROLLING START" scrolling glitch in Scud Race. There is a quirk of the tilegen chip that causes this glitch not to occur on real hardware, but we can't be sure what it is without testing. Much easier to just patch all the Scud Race ROM sets

  • Fix Z80Debug.cpp compile with C++20: String literals should not be used to initialize char* but C++17 and earlier were letting it slide

  • SCSP: added more detail to comment explaining 68K clock speed as recommended by Brian Troha


  • DMA device register always returns Step 1.x PCI ID Step 2.x games by AM3 request PCI ID this way and expect to see 0x16c311db master (#81)

  • Set soundboard CPU to correct clock speed The 68K on the soundboard is rated at 12 MHz but runs at 11.2896 MHz, which is 256 cycles/sample with a 44100 Hz sample rate. Removed SoundClock and Freq as they are not needed


Add description of swtrilgy patch from MAME …

  • Star Wars Trilogy will sometimes write to a JTAG register and then read it back to verify it, but this doesn't work correctly with Supermodel's current JTAG implementation; it will try again and never succeed, getting stuck in an infinite loop. This patch stops the code from branching up and trying the write/read cycle again, allowing the subroutine to continue normally.

    We need to implement shift register widths correctly for each JTAG device (Mercury, Venus, Earth, etc.) for the unpatched code to work properly... right now Supermodel implements one JTAG device with a huge 197-bit data shift register


  • Games.xml: Removed seemingly unnecessary swtrilgy and swtrilgya patches, which should re-enable JTAG configuration and fix Endor Death Star tunnel shading.

  • Fix GCC 13 build.

  • Work around to prevent I/O error after a while on fishing games with tension

  • Crosshair optimization: -create crosshairs only once in Init() instead of created them at every cycle. -use matrix scale to apply the aspect ratio


  • Makefile.Win32: fixed detection of Windows Command Prompt for rmdir command


  • Crosshair: use actual adjusted viewport resolution (configuration resolution is not the same thing). Fixes crosshair alignment for resolutions with non-Model 3 aspect.


  • Windows app manifest added to enable PerMonitorV2 DPI awareness


  • README.txt: Updated Section 5 (video settings), squeezed everything b… 

  • NetBoard: guard against freeing null pointers and INetBoard needed a … 

  • Autobuild script update following crosshair update


  • Autobuild script update following crosshair update

  • m_crosshair is not needed and the config should be checked every fram… 

  • Better optimisations

  • Change Media folder to Assets folder

  • Crosshair refactor 

  • README.txt: Fixed a typo, end-of-sentence formatting in section 10


  • README.txt: fixed typoBart Trzynadlowski

  • README.txt: Added region codes to section 10 (c/o Brian Troha)


  • Fixed window position config storage and command line parsing

  • Config nodes: added the ability to clear out node values or create them

  • -pos=<x>,<y> -> correct error when not present fixes

  • Add two video settings:  -pos=<x>,<y> & borderless

  • Allow joystick to be fetch if windows has no focus in SDL input mode. 


  • Games.xml and README.txt updated by Brian Troha (new Ocean Hunter ROM…


  • Update with macOS build details


  • Add missing filename to ErrorLog call

  • Memory allocated but not released.


  • Make sure to invalidate texture memory when going fullscreen otherwise it might not be syned correctly.

  • SDL_SetWindowFullscreen isn't needed as we call ResizeGLScreen which sets the fullscreen mode afterwards.

  • We must explicitly call SDL_SetWindowFullscreen after setting the dis… …play mode otherwise the refresh rate doesn't change.


  • Be a bit more flexible with the display frequencies we'll match


  • The model 3 (actually model 1,2 and 3) all used some crazy refresh ratete of 57.524hz. If your screen refresh rate is 60hz, supermodel will work fine, but really run too fast. Anyway if you create a custom refresh rate, supermodel will automatically pick this, and set it when the emulator is in fullscreen mode. Apparently this works with most monitors, even cheapo low end ones.

    To active set your command line to:
    -res=1920,1080 -vsync -fullscreen -true-hz

    Replace the resolution with whatever your monitor's native resolution is.

  • Better opengl resource allocation. Fixes going fullscreen and back.


  • Add FileSystemPath.cpp to Visual Studio project


  • Fixed build on macOS

  • Switched to Util::Format() to generate screenshot filename

  • First review code changes (identation and cosmetic changes)

  • Changed pathType from string var to enumcasasfernando

  • Keep Supermodel files (config, nvram, saves, etc.) in a predictable path when running on Linux


  • add undefd codepath for correct use of the 18bit DAC path


  • Fix uniform location.

  • Update Model3.cpp

  • whitespace

  • Wait until IRQ2 is acknowledged before starting IRQ40 sequence. 


  • Incomplete texture headers uploaded via FIFO are now discarded. Ski Champ sends one more 32-bit word via DMA than it should which was causing Supermodel to erroneously intepret the extra word as another texture


  • [Makefile.Win32] $MSYSTEM check never fails.


  • FIx shaders failing to build on apple h/w


  • Update makefile

  • Remove some left over depreciated opengl functions. They were basical… 

  • Merge branch 'master' of

  • Rewrite the whole project for GL4+. I figured if we removed the limit…


  • change all INT16 mixing/intermediate clamping to floats


  • 68K now uses run-time hooks for IRQ and instruction hook callbacks


  • Games.xml: Added re-dumped magtruck and retained old ROM set with patch


  • Fix build for linux (just missing header)


  • Upgrade the glsl shader class a bit. Add a const char* comparitor

  • Add a proper git ignore file...

  • And fix the legacy renderer to build...


  • after clarifications, minor cleanup

  • remove 2 dupe function calls, where ProcessLos should actually be rat

  • Fix new 3D engine texture2DLod function missing error on Linux/MESA


  • change one more place with potential aliasing issue

  • address review and move bit casts to new header

  • use correct slash

  • Harmless math warning fixes. map->unordered_map in CNew3D::CacheModel


  • Revert "port some changes from MAME/MESS

  • fix missing version GLSL compiler warnings on startup 

  • port some changes from MAME/MESS


  • Revert "port some changes from MAME/MESS"

  • Optimize quad rendering by replacing the double 

  • Port some changes from MAME/MESS




  • Revert "port some changes from MAME/MESS"

  • Port some changes from MAME/MESS

  • Equivalent optimizations, NFC

  • Port some (simple) changes from MAME/MESS


Fix some errors, fix some performance warnings, and some simple (but effective) optimizations


Games.xml: Align ROM names with MAME.

--46eff8c--- New build bot script for GitHub


Fix build with SUPERMODEL_DEBUGGER enabled. Probably last commit as source has moved to git.


njz3: Fix sound volume with new quadrophonic audio code


values must be signed, to handle negative numbers, my bad


minor fix


Added configurable refresh rate. Default is 60 but -true-hz on the command line enables 57.524 Hz mode, which some players report making Spikeout and the timing of combos in VF3 more authentic. The config key is RefreshRate and is specified as a floating point value. Should the desire arise, arbitrary refresh rates can be set in Supermodel.ini using this key but almost no validation of the value is performed. Thanks to forum user trap15 for the original code and PonMi for advocating for this ...


njz3: Proper quadrophonic audio support. Need 4+ speakers to take advantage otherwise down mixed to stereo.


Added default values for PortIn, PortOut, and AddressOut


fix: explicit specialization requires 'template <>'


Bitmap size field in the BITMAPV4HEADER was not being set correctly (the image viewers I've been using are unaffected by this but it ought to be corrected)


When dumping textures, two T1RGB5 texture maps are written: with and without contour processing. Contour processing can be disabled per-polygon and some textures intended to be used without contour processing contain pixels with T=1 that are clearly not supposed to be transparent. We now output textures_t1rgb5_contour.bmp and textures_t1rgb5_opaque.bmp.


Added a -dump-textures option (config key DumpTextures) that writes texture BMP files, one for each known format (12 in all currently)


Adjust the number of PowerPC cycles executed per frame to assume 57.524 Hz refresh rate


Double buffer the line of sight values. Should allow the correct values to be returned if GPU threading is enabled


Fixing Magical Truck Adventure bad ROM dump which was causing attract mode to stop rendering


Methods should be marked as noexcept because they cannot throw


white space


Better document real3d registers


Clear all Real3D DMA registers on reset; uninitialized values were causing issues with MSVC debug builds


Another header include fix


Include required header files in Model3GraphicsState.h - fixes potential build errors in GCC


Increase MIDI FIFO buffer size for SCSP; should prevent FIFO overflows


PowerPC IRQ line deassertion; DMA only fires interrupts when required


Getting rid of most of the includes from Supermodel.h; each file now explicitly includes the header files it needs.


Shared RAM on simulated netboard is now double-buffered; Spikeout Final Edition no longer requires a hack to work.


New JTAG patch for Sega Rally 2; linked mode now fully working.


Increase size of DSB2 FIFO buffer; fixes Sega Rally 2 music occasionally not switching or fading ou


Non-linked games no longer falsely list the net board under extra hardware


UI Update Details (06-01-2021)

  • following recent rom set name changes in Games.xml 

  • Added – list view of all the supported games

  • Added – preview of each game (snaps).

  • Added – button of the roms directories.

  • Added – check Load button (Load Rom)

  • Added – all video options

  • Added – all sound options

  • Added – all control options (for the time being it uses the supermodel configurator (accurate and will never fail)

  • Added – system link options (preliminary) will only work with the only version created by Spindizzi2560451

Show Previous Changes


  • Fix 16-bit variables not displaying correctly in Z80 debugger (at least in MSVC builds)


  • Fix netboard resets and detection of simulated netboard linking to itself


  • Adding simulated netboard; all linked games except Sega Rally 2 working at full speed.


  • Corrected alignment issues with netboard RAM; send/receive parameters no longer need to be manipulated to work correctly. Fixes bugs including Scud Race linked car orientation.


  • Add some async network methods. Async send copies to an internal buffer and sends in another thread so doesn't block at all. Added CheckDataAvailable method to the TCPReceive class. Can check or wait for data without blocking.


  • DSB2 clock speed from 4MHz to 11MHz.


  • New dumps added:


  • Fixed cycle counting overflow that was causing DSB2 to halt execution.


  • missing header


  • DSB2 IRQ 2 now fires at 1KHz rather than once per frame, improving


  • Just a few compile warnings


  • Fix project file


  • Build bot script.


  • Introduce new config keywords.

  • In xinput mode, lets the choice to have left and right gamepad motors vibrate together.
    XInputStereoVibration = 1 (both motors) [default]
    XInputStereoVibration = 0 (separate motors)

  • In sdl input mode, new control option to set minimum strength above which a Model 3 constant force command will be simulated on an sdl gamepad device.
    SDLConstForceThreshold = 30 [default]
    note : the vibration strength can be mod with SDLConstForceMax = [val]


  • The controls of bass/getbass games were no longer good, following recent rom set name changes in Games.xml.


  • Corrected game set names & game titles (Brian Troha)


  • Added rumble skipad in Ski Champ game.


  • Service menu activated in swtrilgyp.


  • Add -O3 optimization option for OSX and Linux.


  • Cannot locate older

bottom of page