gm-matthew
7d32bde074
When disabling sound IRQs via MIDI control port, clear current IRQ
...
Prevents Dirt Devils hanging during boot
2024-05-22 15:36:15 -07:00
gm-matthew
8a0bf29dd8
Sound IRQs are acknowledged by writing to MIDI data port
2024-05-20 13:38:45 +01:00
gm-matthew
3e394d1257
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
2024-05-04 19:43:02 +01:00
gm-matthew
39dc16d8ba
Use integer value for game stepping
2024-05-02 23:25:53 +01:00
gm-matthew
944e4855d9
Adding newly dumped version of Scud Race
...
Allow Step 1.5 games to access 53C810 via 0xC00000xx if the netboard is disabled, because scuddxo requires this
2024-05-02 15:43:37 +01:00
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
firewave
5332d8f945
fixed some -Wunused-*
compiler warnings
2023-12-02 14:27:32 -08:00
Bart Trzynadlowski
47253d8398
Fixed graphics analysis -gfx-state option
2023-11-11 13:55:02 -08:00
Bart Trzynadlowski
a57b379498
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.
2023-11-11 13:46:05 -08:00
Ian Curtis
8dda8e9105
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.
2023-11-03 13:24:59 +00:00
Ian Curtis
6595b9320e
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.
2023-10-14 20:05:00 +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
gm-matthew
015e8e9212
Drive board uses the value 0xFF (not 0x00) on ports 42 and 45 to stop all effects when port 46 is set to 0xFF; fixes FFB effects continuing after game ends
2023-07-01 23:21:51 -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
gm-matthew
79a2414f3f
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
2022-11-19 21:06:39 -08:00
toxieainc
4c727abdc8
change all INT16 mixing/intermediate clamping to floats
...
also fixes 3 bugs:
1) mpeg right channel volume was always using the left channel volume, too
2) too high MusicVolume setting was not clamped to 0..200
3) too high SoundVolume setting was not clamped to 0..200
2022-11-06 13:00:13 -08:00
toxieainc
b98be0c2e7
optimize ReadRegister, as localtime (at least on MSVC/Windows) is significantly showing up in profiling
...
e.g. in SW Trilogy
caches localtime until time changes (i.e. limits calls to 1/sec)
2022-07-11 18:47:13 +02: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
a742a73772
njz3: Fix sound volume with new quadrophonic audio code
2022-06-19 16:15:54 +00: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
Bart Trzynadlowski
3f6937e1a6
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.
2022-02-05 00:52:34 +00:00
Bart Trzynadlowski
32933ef9b0
Added a -dump-textures option (config key DumpTextures) that writes texture BMP files, one for each known format (12 in all currently)
2022-02-01 23:15:06 +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
Ian Curtis
b8aac0a4f8
white space.
2021-12-17 23:58:20 +00:00
Ian Curtis
6f7130c50b
Better document real3d registers
2021-12-17 23:57:12 +00:00
Matthew Daniels
6ff099b5ba
Clear all Real3D DMA registers on reset; uninitialized values were causing issues with MSVC debug builds
2021-12-17 23:36:54 +00:00
Matthew Daniels
94772ae3d9
Include required header files in Model3GraphicsState.h - fixes potential build errors in GCC
2021-12-15 13:55:27 +00:00
Matthew Daniels
0c47ac831a
Increase MIDI FIFO buffer size for SCSP; should prevent FIFO overflows
...
Also use similar macro for DSB FIFO buffer
2021-11-30 23:01:37 +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
94d8a1b22d
Increase size of DSB2 FIFO buffer; fixes Sega Rally 2 music occasionally not switching or fading out
2021-10-26 22:47:24 +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
020e2d1b32
DSB2 clock speed from 4MHz to 11MHz.
2021-03-13 08:17:11 +00:00
SpinDizzy
de470aaf52
Fixed cycle counting overflow that was causing DSB2 to halt execution.
2021-03-07 10:12:37 +00:00
Ian Curtis
6cf9974102
missing header
2021-03-03 20:31:57 +00:00