Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
b92622b765 Revert "Misc fixes for dsiwifi BMI stage (#1216)"
This reverts commit a54b076b06.
2021-10-02 13:57:52 +02:00
a54b076b06 Misc fixes for dsiwifi BMI stage (#1216) 2021-09-06 12:52:33 +02:00
2ff065e5ea Fix some compiler warnings 2021-05-03 13:40:44 +01:00
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
43348210f9 Fix some compiler warnings 2021-01-25 14:12:13 +00:00
fa4363ede6 make FIFO size static whene possible 2020-12-30 23:37:46 +01:00
c9447935ff NWifi: correctly determine ROM/chip/etc IDs based on hardware version (as specified in firmware).
fixes #700
2020-08-19 17:53:31 +02:00
7132e11bd4 make it work without a hack 2020-06-21 10:29:08 +02:00
b31e049b30 wifi fixes and shit. getting there, somewhat. 2020-06-21 01:43:32 +02:00
91ff63a194 fix slirp crash when exiting without having inited slirp
also fix misc bugs
2020-06-16 14:09:54 +02:00
1101ed773b make it get further 2020-06-16 02:52:53 +02:00
afbdd96a90 make it actually connect. hark hark hark 2020-06-15 16:06:00 +02:00
c6dc5dfc4b get it to atleast finish a scan without shitting itself 2020-06-15 14:35:02 +02:00
fc5eedc716 * take nwifi forward some
* shut up CP15 printf's for Fx0
* fix bugs
2020-06-15 13:39:33 +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
f7f4ff0519 wifi: take this shit further. complete wifi init 2019-08-04 02:16:16 +02:00
0918da7b00 add BMI commands and other shit 2019-07-24 21:13:08 +02:00
06716794a1 lots of things. attempting to make wifi init work. not there yet. 2019-07-24 18:48:52 +02:00
5062ed543a HARK HARK HARK HARK 2019-07-03 01:17:23 +02:00
ec042000cf lay base for DSi wifi 2019-07-03 00:07:51 +02:00