Commit graph

40 commits

Author SHA1 Message Date
Arisotura ac38faef14 update copyright years 2023-11-04 00:21:46 +01:00
Jesse Talavera-Greenberg 8c4e5af737
Slight polish to DMA (#1856)
* Slight polish to DMA

- Default-initialize members explicitly
- Mark some methods as const noexcept
- Initialize DMA::MRAMBurstTable to DMATiming::MRAMDummy
- Use the default destructor

* Move DMA_Timings definitions to a source file

- To ensure constant and unique addresses

* Include some extra DMA members in the savestate

* Simplify serializing the DMA table

- Extend the dummy table to 256 bytes (same length as the real ones)

* Revert the type change to DMA::DoSavestate

* Keep the MRAMBurstTable inside the DMA class, instead of using a pointer

- If we use a pointer to an external table, then we can't use it in savestates (else that external table gets overwritten)
2023-10-24 23:27:55 +02:00
RSDuck 7731f66e55 fix some UB 2023-08-01 03:00:41 +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
Arisotura d20543c119
DMA timing renovation (#1207)
* make timers usable for measurement shito without being assfuckingly unreliable

* bürp

* Arisotura can you ever clean up your goddamn code

also regroup the timer code instead of having it split weirdly

* make the set-timing functions a tad less hacky

* congrats Arisotura you made an ass-enum

* add timing region tables, and separate timings for ARM9 DMA (exempt of 3c penalty)

* temp work on DMA timings, not finished

also, did you know? 'increment/reload' is also a thing for the source address

* begin work

* add some of the GBA slot/wifi timings

* complete it, I guess

* make some progress

* getting somewhere

* sdsdfs

* see, Arisotura, was it that hard? blarg.
2021-08-31 02:28:34 +02:00
RSDuck 436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
Arisotura 1dbe69c6be remove some debug crap 2020-12-10 18:09:11 +01:00
RSDuck 842379c410 harmless DMA micro optimisation 2020-11-16 17:22:34 +01:00
RSDuck 9772201345 remove some UB
- savestates used to read a four bytes from a single byte value
- a few unassigned variables
- some other things
- also make the ROR macro an inline function
2020-09-04 20:37:14 +02:00
Arisotura 43e045357f make it able to switch between DS and DSi modes 2020-06-01 20:36:30 +02:00
Arisotura 2327de2423 Merge commit '4b57416552ec2fa95216e2b044559f215723bf70' into melonDSi 2020-05-30 03:12:42 +02:00
Arisotura 83f8e11bc1 update copyright years 2020-02-14 20:18:08 +01:00
Arisotura d6bbc6f0f1 tremble upon the NDMA implementation
that doesn't do much beyond getting stuck
2019-06-18 22:54:07 +02:00
Arisotura 841122bc51 prevent old DMA from being a shitshow. 2019-06-18 21:12:39 +02:00
Arisotura b0efde8bf7 also, update copyright name 2019-01-22 15:58:29 +01:00
StapleButter 669247e8c8 redesign main emu loop to use timestamps instead of being a trainwreck
* cleaner code
* faster in some cases
* more accurate (on-demand compensation for timers and GPU)
* less prone to desyncs
* overall betterer
2019-01-05 05:28:58 +01:00
StapleButter 3dd8c7b152 finish the work on the main loop. finally fix all cases of desync I could find. also add #ifdef'd debug code to check for desyncs. 2018-12-11 15:56:34 +01:00
StapleButter 78d384a754 temp commit
almost done killing ARM9/ARM7 desync, f
2018-12-11 03:08:46 +01:00
StapleButter b569c03884 make it fasterer 2018-12-09 01:26:51 +01:00
StapleButter 29bca33bc6 take it somewhere.
still need to speed it up a tad.
2018-12-09 01:17:05 +01:00
StapleButter c6fb152d80 start devolving things.
also implement proper DMA timings.

will not build. don't try.
2018-12-08 22:33:41 +01:00
StapleButter 86dae1a25c make this other branch where we're going to actually make it usable
but it'll be a gross hack
2018-12-08 20:27:00 +01:00
StapleButter 172fb4876a begin work on general timing renovation. way shitty because it behaves as if caches were off, so everything will be slow as shit. 2018-12-04 17:54:10 +01:00
StapleButter a9e7f8bc5b add proper support for GXFIFO stalls.
bad games that blast the GXFIFO and overflow it:
* Super Mario 64 DS
* Rayman RR2

latter seems to get its music streaming crapoed.
2018-11-23 22:21:41 +01:00
StapleButter 7ba32ea076 make the ARM clock shift configurable. nothing fancy there, just paving the way for DSi support later. 2018-11-07 18:38:54 +01:00
StapleButter b5c39680a5 hax, finally making savestates usable
F1 to save, F2 to load. filename hardcoded for now.

shits itself:
* when the 3D engine is used
* when a debugger is used (heh)
2018-10-18 04:00:16 +02:00
StapleButter de91eabf71 savestate shito: fix compile errors.
still far from being finished, so avoid using unless you want to spawn blackholes or some pretty bad shit.
2018-10-18 00:27:55 +02:00
StapleButter 7cbcc6c230 zlarg 2018-09-15 03:41:09 +02:00
StapleButter 60f24a7432 moar progress on it 2018-09-15 03:29:36 +02:00
StapleButter fea7955675 fixor copyright years. 2018-09-15 02:32:13 +02:00
StapleButter 4afac28263 proper display FIFO emulation 2017-06-26 11:02:10 +02:00
StapleButter bdac2467e7 oh well 2017-04-23 15:38:39 +02:00
StapleButter 1759672d14 a few attempts at optimization 2017-04-23 15:25:15 +02:00
StapleButter 96a3848d84 make ROM command handling accurate, remove gross DMA hack. 2017-04-11 20:21:31 +02:00
StapleButter 68eb4f6caf * implement missing graphics (affine BG, rotscaled bitmap sprite)
* fix potential crash upon exit
* more work on the input config UI
* misc fixes
2017-03-24 20:53:01 +01:00
StapleButter 08a634371a fix bug that happened when HDMA got interrupted (or any repeating DMA, for that matter) 2017-03-21 02:05:40 +01:00
StapleButter 2150240cbd implement some obscure DMA types 2017-03-20 22:18:35 +01:00
StapleButter a56bf5c76c make timers not suck. fixes issues (Worms2 intro FMV plays at the right speed, aging cart tests get further...) 2017-03-20 17:39:42 +01:00
StapleButter 8a4ed8f41c reorganize repo, move shit around 2017-03-16 23:01:22 +01:00
Renamed from DMA.cpp (Browse further)