Commit Graph

25 Commits

Author SHA1 Message Date
kaitou
e5501e555f
fix: set default mode to 24 hours (#2166) 2024-10-22 20:13:55 +02:00
Arisotura
8fc403cdad update copyright headers 2024-06-15 17:01:19 +02:00
Arisotura
25a7b1ca1d
merge doublemelon (#2067)
non-exhaustive (but exhausting) list of changes:

* base laid for multiple window support, but will likely require more work to work correctly
* encapsulation of frontend state for proper multi-instance support
* (JIT still needs a fix for the NDS::Current workaround but we can get there later)
* new, more flexible configuration system
2024-06-15 13:52:47 +02:00
Jesse Talavera
9bfc9c08ff
Sprinkle const around where appropriate (#1909)
* 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
2023-12-12 11:07:22 +01:00
Jesse Talavera-Greenberg
e973236203
Refactor NDS and DSi to be objects (#1893)
* 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`
2023-11-28 23:16:41 +01:00
Jesse Talavera-Greenberg
346dd4006e
Move all core types into namespaces (#1886)
* 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
2023-11-25 18:32:09 +01:00
Arisotura
ac38faef14 update copyright years 2023-11-04 00:21:46 +01:00
Arisotura
e4f4e94694 convert RTC to OOP 2023-11-03 21:20:09 +01:00
Arisotura
70c6750561 better, less hacky, more OOP-friendly scheduler design 2023-11-02 21:04:09 +01:00
Arisotura
eb13bce6e7 RTC: add the DSi alarm expansion registers 2023-11-02 12:21:59 +01:00
Arisotura
3b4fdea376 minor cleanup 2023-11-01 12:03:35 +01:00
Arisotura
9a450f5f28
RTC revamp (#1867)
* get this started

* implement DSi RTC commands

* set up RTC clock timer. lay down basic idea of a clock.

* make the date/time registers writable

* move RTC state to its own structure, to make it easier to deal with

* more RTC work
lay base for date/time dialog

* get the bulk of the RTC functionality going

* much simpler design for RTC stuff

* aha, that is what it is

* start working on the RTC IRQ

* implement all types of RTC IRQ

* start refining sleep mode. code still kinda sucks.

* implement keypad IRQ

* refine it some more

* shut the fuck uuuuuupppppppppppppp
2023-10-30 18:37:49 +01:00
Jesse Talavera-Greenberg
b078ca802f
Expose SRAM pointers for frontends that manage save data their own way (#1643)
* 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
2023-03-27 22:36:26 +02:00
Jesse Talavera-Greenberg
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
Arisotura
35cc79787d update copyright headers 2022-01-09 02:15:50 +01:00
RSDuck
436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
Valeri
0d845c9e69
Random minor fixes (#757)
* Fix incorrect/questionable assert() usage

Originally reported by https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2159000700,
but also includes a bunch of other fixes.

* Fix some `printf` warnings

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2160310550

* Remove useless check

It is never passed thanks to `if (num_in < 1) {...; return}` before
Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840804

* Add missing header guard, rename other to avoid conflicts

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2163210746

* Make DSi_SDDevice destructor virtual

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2158670642

* Use thread-safe localtime_r, assign `time` result directly

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840805

* Fix MinGW build

It needs _POSIX_THREAD_SAFE_FUNCTIONS to export `localtime_r`
2020-10-01 13:44:09 +02:00
Arisotura
3fde8411a7 fix ass-stupid RTC bug 2020-06-15 13:40:54 +02:00
Arisotura
fc5eedc716 * take nwifi forward some
* shut up CP15 printf's for Fx0
* fix bugs
2020-06-15 13:39:33 +02:00
Arisotura
83f8e11bc1 update copyright years 2020-02-14 20:18:08 +01:00
Arisotura
b0efde8bf7 also, update copyright name 2019-01-22 15:58:29 +01:00
StapleButter
3a54b9178b RTC done. misc shito. 2018-10-18 03:04:39 +02:00
StapleButter
fea7955675 fixor copyright years. 2018-09-15 02:32:13 +02:00
StapleButter
28cddadfbc * bump version number
* feed system time into RTC
* start laying base for sound
2017-04-04 15:32:50 +02:00
StapleButter
8a4ed8f41c reorganize repo, move shit around 2017-03-16 23:01:22 +01:00