aboutsummaryrefslogtreecommitdiff
path: root/src/DSi_I2C.cpp
Commit message (Collapse)AuthorAge
* Sprinkle `const` around where appropriate (#1909)Jesse Talavera2023-12-12
| | | | | | | | | * Sprinkle `const` around where appropriate - This will make it easier to use `NDS` objects in `const` contexts (e.g. `const` parameters or methods) * Remove the `const` qualifier on `DSi_DSP::DSPRead16` - MMIO reads can be non-pure, so this may not be `const` in the future
* Refactor `NDS` and `DSi` to be objects (#1893)Jesse Talavera-Greenberg2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First crack at refactoring NDS and DSi into objects - Remove all global/`static` variables in `NDS` and related classes - Rely more on virtual dispatch when we need to pick methods at runtime - Pass `NDS&` or `DSi&` to its constituent components where necessary - Introduce some headers or move some definitions to break `#include` cycles * Refactor the frontend to accommodate the core's changes * Move up `SchedList`'s declaration - Move it to before the components are initialized so the `map`s inside are initialized - Fields in C++ are initialized in the order they're declared * Fix a crash when allocating memory * Fix JIT-free builds * Fix GDB-free builds * Fix Linux builds - Explicitly qualify some member types in NDS, since they share the same name as their classes * Remove an unnecessary template argument - This was causing the build to fail on macOS * Fix ARM and Android builds * Rename `Constants.h` to `MemConstants.h` * Add `NDS::IsRunning()` * Use an `#include` guard instead of `#pragma once`
* Move all core types into namespaces (#1886)Jesse Talavera-Greenberg2023-11-25
| | | | | | | | * Reorganize namespaces - Most types are now moved into the `melonDS` namespace - Only good chance to do this for a while, since a big refactor is next * Fix the build
* convert DSi I2C and cameraArisotura2023-11-04
|
* update copyright yearsArisotura2023-11-04
|
* get this started: refactor SPI in OOPArisotura2023-11-03
|
* 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
* DSi power button and volume switch support (#1630)Ed_IT2023-04-04
| | | | | | | | | | | | | * Add proper BPTWL interrupts * Added DSi power button and volume switch hotkeys * Added hardware reset workaround * Adjusted syntax to follow guidelines * Added DSi output volume synchronization * Fix trivial member function error
* 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
* actual DSi camera support (#1520)Arisotura2022-10-02
| | | basically feeding something that isn't a fixed stripe pattern, and emulating enough of the camera hardware to make this work
* Add support for changing the DS and DSi battery levelRayyan Ansari2022-03-07
| | | | | | The DS battery level is configured via the SPI Power Management Device, and the DSi's is configured via the I2C BPTWL. Add support for changing these registers and add the "Power Management" dialog in the UI.
* 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)
* actually make DSi-mode direct boot work to some extentArisotura2021-08-30
|
* Fix some compiler warningsWaluigiWare642021-05-03
|
* 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
|
* Merge branch 'master' into dsi_cameraArisotura2020-10-26
|\ | | | | | | | | # Conflicts: # src/DSi_I2C.cpp
| * I2C: silence logging for devices A0/E0 (mysterious alternate cameras)Arisotura2020-10-26
| |
| * betterer battery levelArisotura2020-10-26
| |
* | messin' aroundArisotura2020-09-08
|/
* Merge remote-tracking branch 'upstream/slirp' into slirp-mergeNadia Holmquist Pedersen2020-07-26
|\
| * huh. all DSi files had outdated copyright yearsArisotura2020-06-05
| |
* | reconcile DSi and JIT, fastmem for x64 and WindowsRSDuck2020-06-30
|/
* betterer SD/MMC code. Flipnote can save shit!Arisotura2020-06-01
|
* make soft-reset work somewhat betterArisotura2020-05-30
|
* messing aroundArisotura2019-10-20
|
* guess after all we shouldn't send ACKs for nonexistant I2C devicesArisotura2019-08-06
|
* camera: enough stub to pass firmware initArisotura2019-08-06
|
* lay base for camera shitoArisotura2019-08-06
|
* * add SCFG_EXTArisotura2019-07-03
| | | | * quick hack to detect cartridges
* ayyyArisotura2019-06-20
| | | | getting there!
* fix fucking ass-stupid bug with new-WRAM handlingArisotura2019-06-16
|
* betterer I2CArisotura2019-06-15
|
* get it to do more interesting thingsArisotura2019-06-15
|
* fix I2C shit? I thinkArisotura2019-06-15
|
* add I2C shitoArisotura2019-06-15