Commit Graph

38 Commits

Author SHA1 Message Date
4b32fb802c actually rename that setting 2023-06-24 16:34:23 +02:00
4b170b94d5 pointless micro optimisations 2023-04-28 17:05:34 +02:00
79dfb8dc8f Introduce Platform::Log (#1640)
* Add Platform::Log and Platform::LogLevel

* Replace most printf calls with Platform::Log calls

* Move a brace down

* Move some log entries to one Log call

- Some implementations of Log may assume a full line

* Log the MAC address as LogLevel::Info
2023-03-23 18:04:38 +01:00
3f4573574a actual DSi camera support (#1520)
basically feeding something that isn't a fixed stripe pattern, and emulating enough of the camera hardware to make this work
2022-10-02 16:47:57 +02: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
e665e25bd3 Custom path support (#1333)
also including:
* getting rid of shitty strings
* all new, cleaner ROM handling code
* base for DSi savestates
* GBA slot addons (for now, memory cart)
2022-01-07 14:00:43 +01:00
1472a0ec4b move 'randomize MAC' setting to firmware settings, and add setting for changing the MAC.
make things overall betterer.
2021-11-19 13:31:14 +01:00
19ddaee13b finally decouple Config from the core. baahhahahahah 2021-11-18 01:17:51 +01:00
d5b248bb86 decouple more config shit from the core. bahahah 2021-11-17 21:44:49 +01:00
5bb8f4c922 * remove more Config dependencies from the core
* also use less shitty strings
2021-11-17 20:42:11 +01:00
c1dcd585be decouple JIT from Config. bahahahahah 2021-11-17 18:15:50 +01:00
ff3f661bb5 DLDI/SD folder-sync apparatus (#1251)
guess we can finally have DLDI that isn't obtuse
2021-10-28 18:47:13 +02:00
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
712919ec41 Remove unneeded OpenGL loading function code (#1006) 2021-02-17 20:53:07 +00:00
f05bc50d40 use std::function in Thread_Create so we can revert back to using it 2021-02-11 16:00:36 +01:00
bf97387f26 Improved SRAM performance (#925)
* Offload NDS SRAM writing to separate thread, debounce writes to two seconds after last flush or DeInit.

* Fixed printf messages.

* Fixes after CR.

* Fixed potential portability issue with time_t
2021-01-09 22:18:57 +01:00
6e8bac3909 Merge vram dirty tracking
Squashed commit of the following:

commit b463a05d4b909372f0cd1ad91caa0c77a25e5901
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Mon Nov 30 01:55:35 2020 +0100

    minor fix

commit ce73cebbdf5da243d7ebade82d8799ded9cd6b28
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Mon Nov 30 00:43:08 2020 +0100

    fix dirty flags of BG/OBJ mappings not being reset

commit fc5d73a6178e3adc444398bdd23de8314b5ca8f8
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Mon Nov 30 00:11:13 2020 +0100

    use flat vram for gpu2d everywhere

commit 34ee9fe2bf04fcfa2a5a1c8d78d70007e606f1a2
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Sat Nov 28 19:10:34 2020 +0100

    mark VRAM dirty for display capture

commit e8778fa2f429c6df0eece19d6a5ee83ae23a0cf4
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Sat Nov 28 18:59:31 2020 +0100

    use flat VRAM for textures and texpals
    also skip rendering if nothing changed and a bunch of fixes

commit 53f2041e2e1a28b35702a2ed51de885c36689f71
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Fri Nov 27 18:29:56 2020 +0100

    use vram dirty tracking for extpals
    also preparations to take this further

commit 4cdfa329e95aed26d3b21319c8fd86a04abf20f7
Author: RSDuck <rsduck@users.noreply.github.com>
Date:   Mon Nov 16 23:32:22 2020 +0100

    VRAM dirty tracking
2020-11-30 19:49:18 +01:00
2720df9650 make platform objects typesafer and add mutex 2020-11-09 21:52:35 +01:00
9df8d91bdc keep the ugliness confined in Platform.cpp 2020-05-19 21:34:24 +02:00
83f8e11bc1 update copyright years 2020-02-14 20:18:08 +01:00
7af658f089 Add a UNIX_PORTABLE build option, turning it off makes a build of melonDS suitable for systemwide installation. 2019-12-04 22:46:33 +01:00
f8751bd1fb first attempt at things
(also fix softrenderer reset)
2019-04-01 02:51:31 +02:00
60a728283e * remove EmuDirectory from the core
* rework OpenLocalFile(), make the code more elegant, also fixes #352
2019-03-27 13:54:33 +01:00
f08b87b41f * move melon_fopen_local() to Platform.cpp
* make it require that the file already exist (hopefully fixing config saving bug)
* finally axe melon_fopen.cpp
2019-03-27 13:34:26 +01:00
6d7e80b677 move melon_fopen() to Platform.cpp
melon_fopen_local() will need fixoring
2019-03-27 04:23:03 +01:00
b0efde8bf7 also, update copyright name 2019-01-22 15:58:29 +01:00
fea7955675 fixor copyright years. 2018-09-15 02:32:13 +02:00
4ec2d109f7 wifi: more shit 2017-12-18 19:31:26 +01:00
e44bc7743d actually init pcap etc 2017-12-17 23:09:48 +01:00
495d0ba12d add support for SPI shutdown, btw 2017-09-21 03:59:12 +02:00
8558eff8aa properly reset 3D thread state 2017-05-26 01:22:11 +02:00
4b3caedbe7 first attempt at threading the 3D renderer 2017-05-23 23:38:28 +02:00
edc959dcf5 draft APIs for threading in the core.
also, misc wifi crap, nothing noteworthy.
2017-05-19 22:17:28 +02:00
3b07da3a97 attempt at actually sending packets.
into the void for now.
2017-05-12 00:48:42 +02:00
01361f006e (untested yet) code for sending and receiving packets via sockets
MAC randomization
2017-05-11 23:43:57 +02:00
9a2e2998e9 salvage socket init code 2017-05-11 19:57:49 +02:00
36fa621436 lay base for core->platform interaction
(immediately planned: threaded 3D renderer, wifi connectivity)
2017-05-09 04:55:38 +02:00