426 Commits

Author SHA1 Message Date
CasualPokePlayer
c5cddc0407
RTC state machine improvements (#3459)
* Try to correct the RTC state machine to only operate on edges

Unsure if all of this is entirely right (haven't ran any tests to confirm behavior here). Fixes RTC within Pokemon games (and maybe other games) due to the added write latch code adding a _readPins call.

* More correct behavior based on testing

* Move this init to align to struct

* Correctly handle rtc output on falling edges rather than raising edges

also correctly handle rtc output in general, even in cases outside of an rtc read cmd
_outputPins needed to be corrected here, it shouldn't be reading gpioBase here...

* Simplify

* More RTC state machine fixes

Separate out command start and command write data processing
Command start processing happens again if the command magic is invalid (note: doesn't apply to the unmapped command 5)
Ensure command data processing loops
Output 1s for commands with no actual output

* Put SIO output in states

* Try to correct light sensor too

* inc state version

* fix reserved names
2025-04-29 22:48:23 -07:00
CasualPokePlayer
8740f3dde1 Narrow these in runtime struct too 2025-04-06 21:20:39 -07:00
CasualPokePlayer
57d1552582 Increment state version, narrow direction in state too 2025-04-06 21:20:39 -07:00
CasualPokePlayer
3ae429fd91 Implement GPIO internal write latch
Regardless of direction, a write to GPIO data actually succeeds fully with all 4 bits. However, this does not directly touch the pin state. It instead places it into an internal write only latch. This latch asserts bits onto the pin state if direction allows for such, otherwise the other side (e.g. RTC) will be the one asserting bits (but this does not end up touching the internal write latch).

The implementation here is likely not entirely accurate for direction changes from out to in (as that depends on each external device implementation), but it should be correct for in to out changes.
2025-04-06 21:20:39 -07:00
Vicki Pfau
7607a5bea9 GB MBC: Add Sintax support 2025-02-12 03:52:03 -08:00
Vicki Pfau
a9041b122f GBA Video: Allow proxy flush timing configuration 2025-02-10 02:23:53 -08:00
Vicki Pfau
2e7918d8b2 GBA: Update some register information with new stereoscopy discoveries 2025-02-07 03:03:09 -08:00
Vicki Pfau
7fe4f4593e GBA Savedata: Rename flash ID constants, add missing entries 2025-01-20 16:55:30 -08:00
Vicki Pfau
7012f9c666 Debugger: Allow memory access logs to operate read-only 2025-01-15 23:46:20 -08:00
Vicki Pfau
b8c890e1bc Debugger: Plumb access source information through to access logger 2025-01-14 03:30:28 -08:00
Vicki Pfau
75dc290853 Debugger: Expose mDebuggerAccessLoggerGetRegion 2025-01-12 04:30:12 -08:00
Vicki Pfau
edaa27796b GBA: Improve reset behavior of various hardware components 2024-12-11 17:24:22 -08:00
Vicki Pfau
a5e3e746b2 GBA Unlicensed Carts: Prevent multicarts from remapping after being locked 2024-11-23 19:46:44 -08:00
Vicki Pfau
bdb0057fb3 GBA Serialize: Add support for Vast Fame state 2024-11-23 03:23:05 -08:00
Vicki Pfau
dc263295dd GBA Memory: Add unlicensed cart write handling stub 2024-11-17 03:34:33 -08:00
Vicki Pfau
91cf829261 GBA Memory: Add initial support for N-in-1 style multicarts 2024-11-17 02:58:25 -08:00
Vicki Pfau
4a5a25e90c GBA DMA: Cache cycle estimation on first DMA 2024-10-18 03:50:09 -07:00
Vicki Pfau
bfc52cd2f0 All: Fix whitespace errors 2024-09-30 17:24:04 -07:00
Vicki Pfau
7089a5572b GBA SIO: Add periodic hard sync so the runner doesn't get too ahead 2024-09-29 19:58:56 -07:00
Vicki Pfau
0823797671 GBA SIO: Remove driver sets and driver load/unload concepts 2024-09-28 00:24:31 -07:00
Vicki Pfau
630e3a591a GBA SIO: Add support for side data in save states 2024-09-26 22:40:26 -07:00
Vicki Pfau
26e20ca846 GBA SIO: Remove old lockstep driver 2024-09-26 22:40:26 -07:00
Vicki Pfau
0955b94466 GBA SIO: Bring up new lockstep driver 2024-09-26 22:40:26 -07:00
Vicki Pfau
0b9cf1270c GBA SIO: Modify GBASIOTransferCycles to not require SIO struct 2024-09-26 22:40:26 -07:00
Vicki Pfau
621eb4d425 GBA SIO: Move starting/end timing logic out of drivers 2024-09-26 22:40:26 -07:00
Vicki Pfau
0425dadee9 GBA SIO: Add RCNT bitfield 2024-09-26 22:40:26 -07:00
Vicki Pfau
ab655db3f8 GBA SIO: Fix NORMAL timing out 2024-09-26 22:40:26 -07:00
Vicki Pfau
54c9e9d411 GBA SIO: Move NORMAL finishing logic out of drivers 2024-09-26 22:40:26 -07:00
Vicki Pfau
1b0b540de6 GBA SIO: Move cycle estimation values into core 2024-09-26 22:40:26 -07:00
Vicki Pfau
cd4132fba3 GBA SIO: Move MULTI finishing logic out of drivers 2024-09-26 22:40:26 -07:00
Vicki Pfau
a6914b2ddb Util: Rename color_t to avoid namespace conflicts 2024-09-06 23:24:40 -07:00
Vicki Pfau
b072cb40cb Core: Fix video proxy renderer creation and improve API 2024-09-06 23:24:40 -07:00
Vicki Pfau
a5ea157c9a GBA Video: Add stubs for saving/loading extra data out of the video renderers 2024-09-01 01:56:52 -07:00
Vicki Pfau
eaee4228ba GBA Video: Improve emulation of window start/end conditions (fixes #1945) 2024-08-16 02:32:44 -07:00
Vicki Pfau
8ab2681bca Core: Expose more ROM information from the API 2024-08-11 23:25:18 -07:00
Vicki Pfau
0484cd5d31 GBA: Remove unused field 2024-07-07 12:24:24 -07:00
Vicki Pfau
79193b914b GBA Audio: Fix crash in audio subsampling if timing lockstep breaks 2024-06-25 04:08:47 -07:00
Vicki Pfau
1a3873da67 GBA Serialize: Fix some minor save state edge cases
There are two edge cases fixed in this commit. The first one involves audio
FIFO DMA state not being properly updated if the game reconfigured it between
save and load. This doesn't happen often, but it could conceivably affect
custom sound engines. The second case is the extremely rare case of a save
state being taken directly after a DMA ending but before an open bus read. The
chances of this happening are negligible, but it's still a bug regargless.
2024-06-25 03:13:33 -07:00
Vicki Pfau
2ea11feda6 GBA Memory: Improve VRAM access stall cycle estimation 2024-06-17 02:27:31 -07:00
Vicki Pfau
458300b02e Core: Improve rumble emulation by averaging state over entire frame (fixes #3232) 2024-06-17 00:15:44 -07:00
Rib
58651f2054 GBA Memory: Clean up Vast Fame code somewhat 2024-06-12 15:58:55 -07:00
Rib
20fc7b6ef3 GBA Memory: Support the Chinese version of Digimon Sapphire by Vast Fame 2024-06-12 15:58:55 -07:00
Vicki Pfau
e4e455dd5e ARM: Add framework for coprocessor support 2024-06-02 17:30:17 -07:00
Vicki Pfau
942167acdf ARM: Backport some CPU table improvements from medusa 2024-06-02 17:17:24 -07:00
Vicki Pfau
b7729c9e80 GBA Video: Add special circlular window handling in OpenGL renderer 2024-05-27 02:57:23 -07:00
Vicki Pfau
f51cb153d1 Core: Switch from blip to mAudioResampler 2024-04-22 00:47:42 -07:00
Vicki Pfau
89866aff95 GBA Audio: Remove broken XQ audio pending rewrite
Gone but not forgotten.
2024-04-22 00:29:11 -07:00
Vicki Pfau
73a39dea65 Core: Finally kill off GBAAudioCalculateRatio 2024-04-16 21:02:55 -07:00
Vicki Pfau
fd4175ebf8 Util: Rename CircleBuffer to mCircleBuffer 2024-04-12 23:27:37 -07:00
Vicki Pfau
0e441527c8 CMake: Rename USE_DEBUGGERS and USE_GDB_STUB to ENABLE_DEBUGGERS and ENABLE_GDB_STUB
ENABLE flags are for optional features, USE flags are for optional dependencies
2024-04-08 03:08:10 -07:00