aboutsummaryrefslogtreecommitdiff
path: root/src/NDSCart.cpp
Commit message (Collapse)AuthorAge
* pointless micro optimisationsRSDuck2023-04-28
|
* Expose SRAM pointers for frontends that manage save data their own way (#1643)Jesse Talavera-Greenberg2023-03-27
| | | | | | | | | | * Add a clarifying comment - In case it saves some poor bastard hours of fruitless work * Expose GBA and NDS save memory - Add GetSaveMemory and GetSaveMemoryLength functions - Where unsupported, they return null and zero
* Introduce `Platform::Log` (#1640)Jesse Talavera-Greenberg2023-03-23
| | | | | | | | | | | | | * 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
* merge local_wifi (#1516)Arisotura2022-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix reading banner from homebrew ROMsRayyan Ansari2022-09-02
| | | | | Some homebrew ROMs do not have a banner, and use a null value to indicate this. Do not attempt to read the banner when this is the case.
* fix SCFG_MC cartridge inserted bitRSDuck2022-08-21
|
* make invalid SPI memory commands return 0xFF. fixes #1366 (Dementium II ↵Arisotura2022-03-14
| | | | checks the results of RDSR, RDID and cmd 00 to determine what kind of backup memory is present)
* fix some gaps in the SPI/cart implementationsArisotura2022-03-14
|
* * support patching multiple DLDI interfacesArisotura2022-03-12
| | | | | * fix the DLDI size entry fixes the Smash demo
* update copyright headersArisotura2022-01-09
|
* explicitly eject the cart before a load with reset, preventing a spurious ↵Arisotura2022-01-08
| | | | | | cart-eject IRQ on startup also fix possible KEY1 issues when using internal BIOS
* Custom path support (#1333)Arisotura2022-01-07
| | | | | | | also including: * getting rid of shitty strings * all new, cleaner ROM handling code * base for DSi savestates * GBA slot addons (for now, memory cart)
* DLDI/SD folder-sync apparatus (#1251)Arisotura2021-10-28
| | | guess we can finally have DLDI that isn't obtuse
* actually make DSi-mode direct boot work to some extentArisotura2021-08-30
|
* NDSCart: correctly restrict reading the DSi region on DSi cartsArisotura2021-07-22
|
* Add ROM Header struct and ROM info dialog (#1095)WaluigiWare642021-07-02
|
* add missing default return value. fixes #1105Arisotura2021-06-20
|
* Propagate common ImportSRAM return value from NAND cartridge function (#1104)Raphaël Zumer2021-05-16
|
* NDSCart: enforce WR bit.Arisotura2021-05-03
| | | | Bad Apple demo will break, because its NitroFS driver is broken. it needs a DLDI argv structure to exist in order to use its DLDI driver instead.
* er, oopsArisotura2021-05-01
|
* er, all cart types might want to have teh B8 commandArisotura2021-04-30
|
* cart: ensure each set of commands can only be run in the correct command mode.Arisotura2021-04-30
| | | | fixes #1083 (there was a chance an encrypted KEY1 command could be interpreted as something else and fuck things up)
* fill most gaps in ROM listArisotura2021-04-30
|
* support savemem for Face Training (NAND, atleast 32MB, likely 64MB)Arisotura2021-04-30
|
* Cart refactor (#1073)Arisotura2021-04-25
| | | complete cart-interface refactor, will make this code a lot easier to deal with
* Update copyright year and add missing GPL headers part 2WaluigiWare642021-03-21
| | | | | Looks like a lot of files were missed... Closes #1036
* SRAM things (#970)SuuperW2021-02-23
| | | | | | | * Allow SRAMManager to save to/load from a buffer. * Don't delete what doesn't exist. Don't create a thread that will do absolutely nothing. * Update SRAMManager's SecondaryBuffer when loading a savestate.
* Polish up archive support (#930)Madhav Kanbur2021-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix directory path when extracting from archive * Don't create new dir in execution dir of melonds * Create it beside the archive instead Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * ArchiveUtil : Use QT functions for I/O * Make it more platform independent, cleaner * Fixes permission related crash on linux Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * NDSCart : Abstract out common code in LoadROM() Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Extract nds roms to memory * Some stuff is still broken in the frontend Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * GBACart : Abstract out common code in LoadROM() Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Extract gba roms to memory Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Integrate archive support with recent files Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * onClickRecentFile : Pause emu thread conditionally * Don't pause at start of the function * If user opens an archive and hits cancel, it won't pause Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Handle Resets when loading from archives * Ask user to pick the rom(s) again (i.e. GBA & NDS) when there are multiple files in the archive(s) * Directly load if only 1 file Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Archive support for drag-n-drop * Also recent files support for drag-n-drop Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * main : Allocate rombuffer objects on stack * Less messy, decreases chances of memory leaks * Underlying implementation of qbytearray uses heap (hopefully?) Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * GetSavestateName : Archive support * Construct ssname from srampath (since rompath has archive name) NOTE: In general, archive name != rom file name !!!!!!!!!! Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Add srl and dsi as "direct-load" formats * Direct-load = anything not in an archive Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Don't use static functions Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Remove QT stuff from Util_ROM * Also, during reset, directly load file from archive (no rom picker) Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Remove QT includes from FrontendUtil.h Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Util_ROM/LoadROM() : Use SetupDSiNAND() Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Util_ROM/Reset() : Use strrchr() Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Util_ROM : Put Archive stuff behind ifdefs Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * main: Set parent widget for archive dialog boxes Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Revert "Util_ROM/Reset() : Use strrchr()" This reverts commit c8af6f066f6aa15e5557e478417edb125cad0809.
* Improved SRAM performance (#925)Kimmy Andersson2021-01-09
| | | | | | | | | * 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
* don't calculate the CRC checksum of ROMs on loadRSDuck2020-12-30
| | | | the value isn't used anywhere anyway
* delay savefile flush to the end of the frameRSDuck2020-11-11
|
* flush to file after importing SRAMRSDuck2020-10-06
|
* add functionality to import savefilesRSDuck2020-09-11
|
* actually add DLDI. bahahahhhArisotura2020-09-03
|
* remove requirement for initmem7/9.bin (but this requires augmented BIOS ↵Arisotura2020-06-02
| | | | dumps, we'll get there)
* make it able to switch between DS and DSi modesArisotura2020-06-01
|
* Merge remote-tracking branch 'remotes/origin/master' into melonDSiArisotura2020-05-30
|\
| * embed romlist.binArisotura2020-05-30
| |
| * make it able to map the Tab keyArisotura2020-05-20
| |
| * minor fixArisotura2020-05-17
| |
* | fix shito.Arisotura2020-05-30
| |
* | Merge commit '4b57416552ec2fa95216e2b044559f215723bf70' into melonDSiArisotura2020-05-30
|\|
| * should probably be a strncmp() and not strncasecmp()Arisotura2020-03-30
| |
| * properly handle ROMs with encrypted secure areaArisotura2020-03-30
| |
| * Merge pull request #546 from nadiaholmquist/feature/unix-xdgArisotura2020-01-28
| |\ | | | | | | Make melonDS properly installable systemwide on UNIX systems
| | * Add a UNIX_PORTABLE build option, turning it off makes a build of melonDS ↵Nadia Holmquist Pedersen2019-12-04
| | | | | | | | | | | | suitable for systemwide installation.
| * | Fix "é" character encoding in NDS.cppRaphaël Zumer2019-12-09
| | |
| * | Remove unused Write function in NDSCartRaphaël Zumer2019-12-09
| |/
* | * some fixes to SD controller support, make it clear that there is no SD ↵Arisotura2019-10-19
| | | | | | | | | | | | | | | | | | inserted, makes Flipnote work somewhat better * immediately clear AES busy flag when the block count is zero (occurs when loading DSi cart games) * implement NDMA start modes that have an old-DMA equivalent (except for GXFIFO mode) now it boots DSi carts!
* | * base for potentially re-encrypting modcrypt, doesn't seem to be required? ↵Arisotura2019-08-07
| | | | | | | | | | | | but can also serve to decrypt it * revise SD IRQ behavior (fixing potential hang when loading DS games)