Commit Graph

31 Commits

Author SHA1 Message Date
76976fef30 convert SPU to OOP 2023-11-04 14:20:58 +01:00
ac38faef14 update copyright years 2023-11-04 00:21:46 +01:00
b1e4bd5520 merge local_wifi (#1516)
* attempt at betterer wifi

* add preliminary sync mechanism
* fix gaps in wifi implementation

* move local-MP comm to its own module instead of cramping Platform.cpp

* remove some stupid cruft

* as you wish, Sorer

(starting work on shared-memory system)

* shared-memory IPC that actually works (albeit Windows-only for now)

* shut up logging from NULL writes on ARM7 (ffs Nintendo learn to code)

* get this somewhat good

* leave client sync mode when host deauths. makes download play actually work.

* start implementing MP-comm error handling

* * add MP-reply error counters
* feeble attempt at fixing slowdown/desync/etc problems

* somewhat better exchange/sync method

* * when entering power-saving mode, be sure to finish transferring the current frame first
* fix misc bug due to old cruft leftover

makes for a more stable connection

* remove a bunch of cruft

* set wifi time interval to 34 cycles instead of 33. games seem sensitive to the general timing of wifi vs the rest of the system, and this seems to make things run better, atleast until I rewrite this to use a proper scheduler.

* more graceful handling of disconnects

* deal with FIFO overflow more gracefully

* BAHAHAHAHAHAHAHAHHHH

THE SNEAKY BASTARDS

so, when the DS receives a beacon with the right BSSID

that beacon's timestamp is copied to USCOUNTER

* attempt at making the connection process smoother for weird games

* * begin adding POWCNT2, only applies to wifi for now
* begin work on wifi scheduler

* implement the shitty timers

* add the RF wakeup thing

* begin work on receiving frames. for now it can just receive melonAP beacons, but hey, it's a start.

* add enough TX functionality that online wifi is a possibility again.

* there are problems with this scheduler thing. committing it anyway

* kind of a rollback... we're gonna work out a compromise on this, I guess

* don't transmit shit if RXCNT.bit15 isn't set

* move RX-finish to its own function. more accurate filtering. implement RXFILTER.

* remove some cruft

* fix some of the shittiness when trying to connect more than two players

* fix some more shittiness

* fix more wifi shittiness (mainly don't try to receive shit while sending a frame)

* run wifi every 8µs. improves performance.

* fix IRQ14/IRQ15

* make this work under Linux

* Make it work on macOS, for now using a custom sem_timedwait
implementation.

If anyone knows anything about mach ports and have an idea for how to
make this work using mach IPC, please do let me know.

* 25ms seems like a good timeout

* begin work on proper multiplayer UI shito.

for now, determine a global instance ID, and derivate the system MAC from it. remove 'randomize MAC' option.

* finish removing RandomizeMAC

* lay groundwork for instance-unique config

* work some on the UI... make it not labelled Fart

* more UI work: make it explicit that some things are instance-unique

* separate firmware files for multiplayer instances

* make instances save to different save files, too

* more UI work, make things somewhat less shitty

* lay base for the multiplayer settings dialog

* actually hook up most of that dialog

* actually implement the fun audio settings

* ensure all the wifi shit is properly savestated and reset. properly update timings for the wifi region when wifi is disabled.

* add more fun labels

* * ignore WEP frames if WEP is off
* implement RX_LEN_CROP

* fake enough of WEP processing to make Inazuma Eleven work

* * do not copy more ROM banner data than actually needed
* avoid trying to read out of bounds if the banner offset is bad

* Fix oversight with the preferences action causing the build to fail on macOS

Co-authored-by: Nadia Holmquist Pedersen <nadia@nhp.sh>
2022-09-22 20:32:27 +02:00
35cc79787d update copyright headers 2022-01-09 02:15:50 +01:00
418b351986 SPU: Emulate SOUNDBIAS and 10-bit degrade 2021-08-17 01:01:15 +02:00
2df6b4fdc3 Audio interpolation (#1176)
add audio interpolation (emulation improvement)
2021-08-08 14:27:57 +02:00
2ff065e5ea Fix some compiler warnings 2021-05-03 13:40:44 +01:00
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
05b94eff66 make audio output thread safe(r?) 2020-11-15 15:29:38 +01:00
9ac60a840a SPU: work with scalars instead of arrays 2020-10-31 13:48:02 +01:00
2f9a6b7c03 SPU: delay channel start until whenever it can actually start. fixes maxmod interpolated mode. 2020-07-23 12:59:19 +02:00
43e045357f make it able to switch between DS and DSi modes 2020-06-01 20:36:30 +02:00
83f8e11bc1 update copyright years 2020-02-14 20:18:08 +01:00
02a6fe182c see, Arisotura, was it that hard? 2019-09-04 16:29:40 +02:00
455b0e5689 more fixes to audio output
maybe by 2034 we'll finally get that shit going
2019-09-01 15:41:46 +02:00
fbad8b0f43 * new FPS limiter
* new audio output/sync method

about fucking time
2019-08-29 15:55:18 +02:00
626a9c1385 my bad. 2019-08-18 11:31:03 +02:00
b0efde8bf7 also, update copyright name 2019-01-22 15:58:29 +01:00
a4eaf7dc19 SPU:
* support channel repeat mode 3, behaves same as mode 1 (loops)
* always clear channel buffers, so if channels 0-7 use format 3, they don't output old data over and over again (fixes #281)
2018-12-14 00:14:06 +01:00
7bf62918cd SPU done 2018-10-18 02:45:38 +02:00
fea7955675 fixor copyright years. 2018-09-15 02:32:13 +02:00
73bf4471ee audio: change output rate to 47340Hz, add resampler with small margin to elimiate pops/clicks due to output rate fluctuation
output rate is picked such that 1024 samples at that rate equal exactly 710 samples at the SPU's output rate
2017-12-11 18:41:05 +01:00
b96ac8e000 (finally) fix sound
* reset capture position when starting capture
* reorder channel/capture handling
* implement FIFO for channel and capture
2017-11-11 18:46:42 +01:00
495d0ba12d add support for SPI shutdown, btw 2017-09-21 03:59:12 +02:00
4ffb217791 add support for 16bit IE reads/writes (fixes #66) 2017-06-24 01:21:09 +02:00
3f3b2977d7 * sound capture from left/right mixers
* support for appropriate output modes
2017-04-08 22:59:27 +02:00
a4f436f827 * stub more wifi crap
* louder sound
* misc fixes
2017-04-07 17:37:49 +02:00
d8bbf25431 * PCM8, PCM16, ADPCM, white noise
* volume, volume div, panning, master volume
2017-04-07 01:06:10 +02:00
76c4e57608 preliminary audio. only supports PSG (and handles all channels as such). drops out every once in a while. 2017-04-06 22:38:46 +02:00
8d66beba6b start SPU work 2017-04-06 19:44:34 +02:00
28cddadfbc * bump version number
* feed system time into RTC
* start laying base for sound
2017-04-04 15:32:50 +02:00