Commit graph

127 commits

Author SHA1 Message Date
Bart Trzynadlowski e59ecea32d PowerPC frequency determined by board stepping, config option is now just an override 2024-01-28 21:08:12 -08:00
Ian Curtis c039d08c03 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.
2023-12-26 18:25:03 +00:00
firewave 71e5baa61b Model3.cpp: avoid usage of uninitialized memory
```
==213531== Thread 20 SoundBoardNoSyn:
==213531== Conditional jump or move depends on uninitialised value(s)
==213531==    at 0x1A1D1E: CModel3::RunSoundBoardThread() (Model3.cpp:2607)
==213531==    by 0x49BECEA: UnknownInlinedFun (SDL_thread.c:292)
==213531==    by 0x49BECEA: RunThread.lto_priv.0 (SDL_systhread.c:76)
==213531==    by 0x4F719EA: start_thread (pthread_create.c:444)
==213531==    by 0x4FF5653: clone (clone.S:100)
```
2023-12-03 14:46:23 +01:00
Bart Trzynadlowski 7867c0145e
Model3.cpp: Comment describing scan line timing. 2023-09-25 14:45:57 +02:00
Matthew Daniels 801945d066 Whitespace 2023-09-25 14:41:35 +02:00
gm-matthew 24d24db988 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
2023-09-25 14:41:35 +02:00
gm-matthew b2fee4242c 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
2023-08-20 17:43:40 -07:00
CapitaineSheridan 18f3c23a9f Work around to prevent I/O error after a while on fishing games with tension 2023-05-07 21:41:57 -07:00
CapitaineSheridan 7e025e64a2 Memory allocated but not released. 2022-12-28 18:24:11 -08:00
Matthew Daniels 7513cc769a Update Model3.cpp
whitespace
2022-11-25 15:27:12 -08:00
gm-matthew 6a392f2cc9 Add comment 2022-11-25 15:27:12 -08:00
gm-matthew 916d3d3af1 whitespace 2022-11-25 15:27:12 -08:00
gm-matthew 2063303a4d Wait until IRQ2 is acknowledged before starting IRQ40 sequence. Fixes Ski Champ hanging at FBI screen when region set to USA 2022-11-25 15:27:12 -08:00
toxieainc 4961951a89 fix a real error (m68kdasm) and some harmless performance warnings and use modern headers 2022-07-11 18:10:41 +02:00
toxieainc e0053b3a46 fix some real errors (Model3,InputSystem), minor errors (SCSP,SDL/Main) and some performance warnings 2022-07-11 17:43:59 +02:00
Ian Curtis 83e7b5f45d njz3: Proper quadrophonic audio support. Need 4+ speakers to take advantage otherwise down mixed to stereo. 2022-06-09 21:10:39 +00:00
Matthew Daniels 646b46fd4b Adjust the number of PowerPC cycles executed per frame to assume 57.524 Hz refresh rate
Fighting Vipers 2 attract mode no longer requires 100+ MHz to run smoothly

Supermodel itself still runs at 60 Hz
2022-01-23 15:32:53 +00:00
Matthew Daniels e93c5d710f PowerPC IRQ line deassertion; DMA only fires interrupts when required
PowerPC no longer clears its own IRQ line; it is now cleared by the IRQ controller when there are no more pending interrupts. Not all games clear DMA interrupts so it was necessary to tweak the 53C810 SCSI controller and the Real3D DMA interface to only fire interrupts if a certain register is correctly set. 53C810 has the documented DIEN (DMA Interrupt Enable) register; Real3D DMA seems to use the low bit of the dmaConfig register.

Also I removed the net IRQ as no games seem to actually use it.
2021-11-28 01:11:11 +00:00
Matthew Daniels 9ffce8b92a Getting rid of most of the includes from Supermodel.h; each file now explicitly includes the header files it needs.
Making changes to a header file should no longer force the entire project to recompile.
2021-11-22 17:15:06 +00:00
Matthew Daniels 50465f9a5a Shared RAM on simulated netboard is now double-buffered; Spikeout Final Edition no longer requires a hack to work.
Preparing to enable simulated netboard to run in its own thread
2021-11-05 00:23:29 +00:00
Matthew Daniels b62110617b New JTAG patch for Sega Rally 2; linked mode now fully working.
Few other minor changes
2021-10-30 23:00:49 +00:00
Matthew Daniels a20366d338 Fix netboard resets and detection of simulated netboard linking to itself 2021-04-19 22:15:50 +00:00
Matthew Daniels 5a570ce7fe Adding simulated netboard; all linked games except Sega Rally 2 working at full speed. 2021-04-14 01:20:45 +00:00
Matthew Daniels 98d4f1c6f6 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. 2021-03-22 01:08:45 +00:00
SpinDizzy e4998f57fd Skichamp Driveboard error fix. 2021-02-18 10:35:38 +00:00
SpinDizzy 08d4735ee8 Huge refactor of the Driveboard:
-Separate each possible boards (wheel, joystick, skipad, billboard).
-Defined a Driveboard type in Games.xml for each games.
-Due to the refactoring, Driveboard Savestates have changed (a common base data + a specific board data are saved).
-Backwards compatibility with previous save states is maintained.
-Driveboard rom section is no longer required anymore. This disables Driveboard emulation in case the rom is not found.
-Added Billboard emulation (vf3, vs2, fvipers2, von2). 7 segments and lamps Outputs are redirected to Supermodel outputs.
-Changes project to C++ 17 standard.
2021-02-18 10:29:15 +00:00
SpinDizzy 6627b1e95f The controls of bass/getbass games were no longer good, following recent rom set name changes in Games.xml. 2021-01-05 14:24:57 +00:00
SpinDizzy 6626afc8bb Added rumble skipad in Ski Champ game.
This is only a simulation (cmd are interpreted), not an emulation because we lack informations on the game itself and its driveboard (does it have dedicated cpu/rom ?).
2020-12-30 17:14:14 +00:00
SpinDizzy 1f50519905 Magical Truck Adventure rom patch to unlock region. (enter service menu, then Start P1, Start P1, Service, Start P1, Service, Test) 2020-12-21 15:39:15 +00:00
SpinDizzy 5143669cb9 Star Wars Trilogy lever feedback activated 2020-10-24 09:12:54 +00:00
SpinDizzy d3955062e4 Correct the returned value from previous getbass patch
There was a strange side effect on Ocean Hunter game
2020-08-26 16:05:23 +00:00
SpinDizzy 9e8e993026 Getbass related
Game now boots in game
Add missing analog input and buttons
2020-08-25 08:48:25 +00:00
SpinDizzy 6af882548f Linux build compatibility changes 2020-07-03 09:15:08 +00:00
SpinDizzy a73a06d546 Netboard related : Define a new hardware line in games.xml 2020-07-01 15:56:21 +00:00
SpinDizzy 345310fbee _rotl() replacement 2020-06-17 16:31:22 +00:00
Ian Curtis 1a3407bec8 Fix corrupted memory in network mode 2020-06-17 11:41:41 +00:00
Ian Curtis daef27be37 Replace network code with new tcp implementation 2020-06-16 11:55:38 +00:00
Ian Curtis d688fdd3d5 cache variable, without it is unusably slow in debug mode 2020-06-12 17:33:21 +00:00
SpinDizzy 4f347ff3f1 SDL1 to SDL2 internal changes 2020-04-19 08:34:58 +00:00
Ian Curtis e1827cfd13 Stretch the time the ping_pong bit flips a bit to bump writes into correct frame. Otherwise they end up getting written at like 99.8% of the frame and overlapping with the next. 2019-11-08 20:36:11 +00:00
Ian Curtis 2e6968fe9d Thanks to our anonymous contributor who managed to patch a model 3 game and run it on real h/w, we were able to obtain some timing values we had been long been missing for correct emulation. The h/w polls something called the ping_pong bit at start-up to sync the GPU with the CPU. Unfortunately we didn't have the correct values and just manually used some per game hacks to get games to run. This mostly worked, but some games were writing more or less frames than they should have been for a given time period. When the ping_pong bit flips at 66% of the frame time, games were writing data for a new frame, which meant writes were often straddling 2 separate frames. We aren't 100% sure if IRQ2 or the ping_pong bit is vblank. 2019-11-07 20:29:17 +00:00
SpinDizzy b0813ef7a0 - PCI bridge can be specified in Games.xml for games that use a different version than expected based on stepping. No more hard-coded exceptions.
- Real3D PCI ID can be specified in Games.xml for exceptions that require it.
- Real3D status bit timing specified in Games.xml for exceptions that require it.
2019-01-13 16:00:37 +00:00
Ian Curtis d8f736e7a8 timing fix for srally2x (Spindizzi) 2019-01-06 23:48:34 +00:00
Ian Curtis 9f5a19a04a Use correct PCI IDs (Harry Tuttle) 2018-07-09 08:06:06 +00:00
Ian Curtis 609d1ba19f Fix step 1.0 games with NET_BOARD defined (Spindizzi) 2018-03-08 14:27:28 +00:00
Ian Curtis d8572a923a Update network code (Spindizzi) 2018-02-24 15:53:18 +00:00
Ian Curtis 995cf6adb0 white space 2018-01-29 19:33:29 +00:00
Ian Curtis 10cefb7c61 Support both types of lightgun in lost world. 2nd type fixes some missing fx. Thanks to Any for pointing this out. To use the old type change analog_gun1 to gun1 in the xml file. 2018-01-29 19:31:23 +00:00
Ian Curtis 964f08c894 Disable the netboard if EmulateNet=0 (Spindizzi) 2018-01-25 20:38:31 +00:00
Ian Curtis cf7850602b fix build 2018-01-08 00:13:23 +00:00