Commit Graph

34 Commits

Author SHA1 Message Date
54ebf1b1b2 convert DSi I2C and camera 2023-11-04 19:42:36 +01:00
ac38faef14 update copyright years 2023-11-04 00:21:46 +01:00
440b356674 get this started: refactor SPI in OOP 2023-11-03 20:17:00 +01:00
ee55677086 Assorted portability enhancements (#1800)
* 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
2023-08-18 22:50:57 +02:00
613280d3b4 DSi power button and volume switch support (#1630)
* 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
2023-04-04 12:31:58 +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
2569c67a13 Add support for changing the DS and DSi battery level
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.
2022-03-07 21:08:54 +01: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
523552a92d actually make DSi-mode direct boot work to some extent 2021-08-30 20:26:49 +02:00
2ff065e5ea Fix some compiler warnings 2021-05-03 13:40:44 +01:00
1846a71265 Cart refactor (#1073)
complete cart-interface refactor, will make this code a lot easier to deal with
2021-04-25 00:48:02 +02:00
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
fc922ffb14 Merge branch 'master' into dsi_camera
# Conflicts:
#	src/DSi_I2C.cpp
2020-10-26 20:47:30 +01:00
49a96f41da I2C: silence logging for devices A0/E0 (mysterious alternate cameras) 2020-10-26 20:34:54 +01:00
2f15bcf93b betterer battery level 2020-10-26 17:55:25 +01:00
8d42b1c7d7 messin' around 2020-09-08 20:19:37 +02:00
b4ad35948d Merge remote-tracking branch 'upstream/slirp' into slirp-merge 2020-07-26 21:41:09 +02:00
c5381d2911 reconcile DSi and JIT, fastmem for x64 and Windows 2020-06-30 23:50:41 +02:00
5cd1177e34 huh. all DSi files had outdated copyright years 2020-06-05 20:44:18 +02:00
77f4663f49 betterer SD/MMC code. Flipnote can save shit! 2020-06-01 16:24:59 +02:00
8f5dff1725 make soft-reset work somewhat better 2020-05-30 13:52:51 +02:00
1c72df43ab messing around 2019-10-20 18:35:16 +02:00
9c1ea0e539 guess after all we shouldn't send ACKs for nonexistant I2C devices 2019-08-06 13:31:27 +02:00
28a9c7d9d1 camera: enough stub to pass firmware init 2019-08-06 13:06:14 +02:00
62a605cd92 lay base for camera shito 2019-08-06 02:27:54 +02:00
c5e14074c3 * add SCFG_EXT
* quick hack to detect cartridges
2019-07-03 12:37:34 +02:00
d943a51b96 ayyy
getting there!
2019-06-20 03:19:51 +02:00
78c41736c3 fix fucking ass-stupid bug with new-WRAM handling 2019-06-16 14:26:54 +02:00
7b19a01204 betterer I2C 2019-06-15 18:39:34 +02:00
4d3f346edc get it to do more interesting things 2019-06-15 18:30:12 +02:00
93330d2670 fix I2C shit? I think 2019-06-15 17:23:48 +02:00
58e3ff61ac add I2C shito 2019-06-15 16:58:02 +02:00