aboutsummaryrefslogtreecommitdiff
path: root/src/DSi_SD.cpp
Commit message (Collapse)AuthorAge
* update copyright yearsArisotura2023-11-04
|
* better, less hacky, more OOP-friendly scheduler designArisotura2023-11-02
|
* Refactor DSi_NAND (#1844)Jesse Talavera-Greenberg2023-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor diskio's contents - Change ff_disk_read_cb/write_cb into a std::function instead of a raw pointer - Add const specifiers as needed * Refactor DSi_NAND to manage the file system's mounted lifetime with RAII * Split NANDMount into NANDMount and NANDImage - NANDImage is used for information about the NAND that doesn't require decryption or filesystem access - NANDMount is used to actually access the file system - Both classes manage their respective resources (the NAND file handle and the NAND's mount) with RAII - Also split the file loading into another function that I will remove in a later PR * Make NANDMount immovable * Remove NAND-loading code that I had sectioned off into a function - Incomplete copypasta - I must have gotten distracted * Tidy up NANDImage's initialization - Don't unmount the disk image if the constructor fails (that's NANDMount's job now) - Only assign CurFile if the constructor succeeds * Add some const-correctness * Move DSi NAND initialization to the frontend - The NANDImage is now installed via a unique_ptr in DSi * Remove Platform::DSi_NANDPath - Not Config::DSiNANDPath; that can still be configured as usual - The core no longer needs to care
* Assorted portability enhancements (#1800)Jesse Talavera-Greenberg2023-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce some Platform calls for managing dynamic libraries * Add Platform::WriteFATSectors * Introduce some Platform calls for managing dynamic libraries * Add Platform::WriteFATSectors * Change includes of "../types.h" to "types.h" - Makes it easier to directly include these headers in downstream projects * Change an include of "../Wifi.h" to "Wifi.h" * Allow CommonFuncs.cpp to compile on Android * Tidy up some logging calls - Use Platform::Log in LAN_Socket.cpp - Soften some warnings to Debug logs (since they don't necessarily represent problems) * Add Platform::EnterGBAMode - Gracefully stop the emulator if trying to enter GBA mode * Soften some logs that most players won't care about * Soften some more logs * Introduce Platform wrappers for file operations * Fix pointer spacing * Fix more style nits * Log the errno when ftruncate fails * Fix FileSeek offset argument - With an s32 offset, we couldn't access files larger than 2GB * Revise Platform::StopEmu to address feedback - Remove Platform::EnterGBAMode in favor of adding a reason to Platform::StopEmu - Also rename Platform::StopEmu to Platform::SignalStop - Add an optional argument to NDS::Stop - Use the new argument everywhere that the console stops itself * Rename FileGetString to FileReadLine - It conveys the meaning better * Rename FileSeekOrigin::Set to Start - It conveys the meaning better * Change definition of FileGetString to FileReadLine - Oops, almost forgot it * Rename FlushFile to FileFlush - To remain consistent with the other File functions * Add a FileType usage * Fix line break in FileSeekOrigin * Document Platform::DeInit * Clarify that StopReason::Unknown doesn't always mean an error * Move and document FileType::HostFile * Remove Platform::OpenDataFile - Nothing currently uses it * Refactor Platform::OpenFile and Platform::OpenLocalFile to accept a FileMode enum instead of a string - The enum is converted to fopen flags under the hood - The file type is used to decide whether to add the "b" flag - Some helper functions are exposed for the benefit of consistent behavior among frontends - Equivalent behavior is maintained * Fix a tab that should be spaces * Use Windows' 64-bit implementations of fseek/ftell * Move Platform::IsBinaryFile to Platform.cpp - It could vary by frontend * Remove an unused FileType * Rename an enum constant * Document various Platform items * Use Platform::DynamicLibrary to load libandroid - And clean it up at the end * Fix a typo * Pass the correct filetype to FATStorage - Since it can be used for DSI NAND images or for SD cards * Remove Platform::FileType
* pointless micro optimisationsRSDuck2023-04-28
|
* 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
* properly make the DSi NAND instance-uniqueArisotura2022-09-23
|
* fix last commit for when no SD is insertedRSDuck2022-08-21
|
* fix DSi SD newly inserted/removed IRQ bitsRSDuck2022-08-21
| | | | | we don't support SD card hot swapping and SDIO wifi is always inserted, so those bits are always zero special thanks to Evie
* update copyright headersArisotura2022-01-09
|
* 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)
* finally decouple Config from the core. baahhahahahahArisotura2021-11-18
|
* DLDI/SD folder-sync apparatus (#1251)Arisotura2021-10-28
| | | guess we can finally have DLDI that isn't obtuse
* Revert "Misc fixes for dsiwifi BMI stage (#1216)"Nadia Holmquist Pedersen2021-10-02
| | | | This reverts commit a54b076b0659abc00820985fccbfa9ac095e3358.
* Misc fixes for dsiwifi BMI stage (#1216)Max Thomas2021-09-06
|
* 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 headersRSDuck2021-03-12
|
* Fix some compiler warningsWaluigiWare642021-01-25
|
* keep only one handle of the NAND file aroundRSDuck2021-01-17
|
* make FIFO size static whene possibleRSDuck2020-12-30
|
* make unlaunch'd NANDs workArisotura2020-10-25
|
* make SD support actually be a thingArisotura2020-08-25
|
* * take nwifi forward someArisotura2020-06-15
| | | | | * shut up CP15 printf's for Fx0 * fix bugs
* huh. all DSi files had outdated copyright yearsArisotura2020-06-05
|
* I'm a major derpArisotura2020-06-02
|
* silence pointless and spammy printfArisotura2020-06-01
|
* reset SD controllers during a soft-resetArisotura2020-06-01
|
* betterer SD/MMC code. Flipnote can save shit!Arisotura2020-06-01
|
* * 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)
* support DSi-mode cartsArisotura2019-08-04
| | | | except they need to have the DSi-mode shit encrypted
* wifi: take this shit further. complete wifi initArisotura2019-08-04
|
* lots of things. attempting to make wifi init work. not there yet.Arisotura2019-07-24
|
* lay base for DSi wifiArisotura2019-07-03
|
* * AES-CCM decryptArisotura2019-07-02
| | | | * fix a bunch of bugs
* make it work betterArisotura2019-06-21
|
* make it actually not crapo the NANDArisotura2019-06-20
|
* implement SD/MMC write (cmd25)Arisotura2019-06-20
|
* ayyyArisotura2019-06-20
| | | | getting there!
* there, PSISPArisotura2019-06-19
|
* fix moar bugs, get furtherer (add support for SDHC addressing)Arisotura2019-06-19
|
* fix more bugs, get furtherArisotura2019-06-19
|
* fix bug with SD reads going a bit too farArisotura2019-06-19
|
* add AES, fix a bunch of bugsArisotura2019-06-19
| | | | we're getting an error screen! wee
* plug it to the SD/MMC FIFO.Arisotura2019-06-18
| | | | now half the shit is done.
* add data32 IRQ thingArisotura2019-06-18
|
* take all the SDMMC shit further. now it's completing MMC init and trying to ↵Arisotura2019-06-18
| | | | read shit.
* moar SD/MMC commandsArisotura2019-06-17
|
* take this shit furtherArisotura2019-06-17
|
* lay base for SD shitArisotura2019-06-16