aboutsummaryrefslogtreecommitdiff
path: root/src/CP15.cpp
Commit message (Collapse)AuthorAge
* Sprinkle `const` around where appropriate (#1909)Jesse Talavera2023-12-12
| | | | | | | | | * 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
* Refactor `NDS` and `DSi` to be objects (#1893)Jesse Talavera-Greenberg2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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`
* Move all core types into namespaces (#1886)Jesse Talavera-Greenberg2023-11-25
| | | | | | | | * 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
* Refactor the JIT to be object-oriented (#1879)Jesse Talavera-Greenberg2023-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move TinyVector to a new file - So it's less sensitive to #include ordering * Forgot to include assert.h * Refactor ARMJIT_Memory into an object * Oops, forgot a declaration * Refactor ARMJIT to be contained in an object * Remove an unused function declaration * Add a missing #include * Remove a now-unused global * Use ARMJIT_Memory's own memory access functions * Fix some omissions in the ARM JIT * Move libandroid to be a member of ARMJIT_Memory instead of a global * Default-initialize most fields in ARMJIT_Compiler.h * Define NOOP_IF_NO_JIT * Finish refactoring the JIT to be object-oriented
* update copyright yearsArisotura2023-11-04
|
* Assorted portability enhancements (#1800)Jesse Talavera-Greenberg2023-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Introduce `Platform::Log` (#1640)Jesse Talavera-Greenberg2023-03-23
| | | | | | | | | | | | | * 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
* invalidate JIT blocks in ARM7 WVRAM when it's remappedRSDuck2022-08-22
|
* update copyright headersArisotura2022-01-09
|
* get rid of DTCMSizeRSDuck2021-10-29
|
* add the PU checks. bahahahahArisotura2021-10-29
|
* oops!Arisotura2021-10-28
|
* more accurate DTCM checkArisotura2021-10-28
|
* DMA timing renovation (#1207)Arisotura2021-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* update copyright year and add missing GPL headersRSDuck2021-03-12
|
* DSi: make ARM9-clock-selector actually workArisotura2020-08-17
|
* Merge remote-tracking branch 'upstream/slirp' into slirp-mergeNadia Holmquist Pedersen2020-07-26
|\
| * * take nwifi forward someArisotura2020-06-15
| | | | | | | | | | * shut up CP15 printf's for Fx0 * fix bugs
* | fix build with JIT disabledRSDuck2020-07-25
| | | | | | | | fixes #675 and #674
* | reconcile DSi and JIT, fastmem for x64 and WindowsRSDuck2020-06-30
| |
* | first steps in bringing over the JIT refactor/fastmemRSDuck2020-06-16
| |
* | rewrite JIT memory emulationRSDuck2020-06-16
| |
* | fix build with JIT disabled and set default JIT maxblock size to 32RSDuck2020-06-16
| |
* | include more information in DataRegionRSDuck2020-06-16
| |
* | new block cache and much more...RSDuck2020-06-16
| | | | | | | | | | | | | | | | | | - more reliable code invalidation detection - blocks aren't stopped at any branch, but are being followed if possible to get larger blocks - idle loop recognition - optimised literal loads, load/store cycle counting and loads/stores from constant addresses
* | remove debug printfRSDuck2020-06-16
| |
* | fix uninitialised memory mappingRSDuck2020-06-16
| |
* | jit: add compile optionRSDuck2020-06-16
| |
* | JIT: baseRSDuck2020-06-16
|/ | | | all instructions are interpreted
* make it able to switch between DS and DSi modesArisotura2020-06-01
|
* Merge commit '4b57416552ec2fa95216e2b044559f215723bf70' into melonDSiArisotura2020-05-30
|\
| * update copyright yearsArisotura2020-02-14
| |
* | merge moarArisotura2020-05-30
|\|
| * smarter CP15 PU region updates. disable some useless logging.Arisotura2019-10-21
| | | | | | | | fixes #528
* | melonDSi: skeleton in placeArisotura2019-06-15
|/
* fix ass-stupid bug in CP15 PU region setupArisotura2019-06-10
|
* also, update copyright nameArisotura2019-01-22
|
* blarg. setting it to 4 breaks MillionaireArisotura2019-01-22
|
* tweak cached memory timings.StapleButter2019-01-18
| | | | fixes things, but needs watching closely for other things that could break.
* redesign main emu loop to use timestamps instead of being a trainwreckStapleButter2019-01-05
| | | | | | | | * cleaner code * faster in some cases * more accurate (on-demand compensation for timers and GPU) * less prone to desyncs * overall betterer
* add PoC ARM9 instruction cache logic. not actually in use, but it's there as ↵StapleButter2019-01-04
| | | | a reference (and if we ever need it).
* avoid potential crash with EmuDirectory if we somehow got no argv or an ↵StapleButter2018-12-16
| | | | empty path
* add missing shit to savestates. bump the version up.StapleButter2018-12-11
|
* more sensible cache timingsStapleButter2018-12-11
| | | | (still a big fat hack)
* Mario&Sonic doesn't like it when its code is running too fast; ↵StapleButter2018-12-11
| | | | dual-screen-3D shits itself big time
* add back faster prefetch for ARM9StapleButter2018-12-11
|
* change where audio/joystick are inited, attempting to fix potential COM ↵StapleButter2018-12-11
| | | | initialize issues
* make it fastererStapleButter2018-12-09
|
* take it somewhere.StapleButter2018-12-09
| | | | still need to speed it up a tad.
* make this other branch where we're going to actually make it usableStapleButter2018-12-08
| | | | but it'll be a gross hack