Commit Graph

61 Commits

Author SHA1 Message Date
Jaklyy 33f6218972 avoid checking T bit every instruction 2024-12-09 00:31:21 -05:00
Jaklyy 9a4dc94910 reimplement interlocks 2024-12-07 09:36:33 -05:00
Jaklyy 3d6ebc1d2b rework tracking of overlap 2024-12-07 00:43:36 -05:00
Jaklyy 08435d2272 implement arm7 code fetches 2024-12-06 17:01:02 -05:00
Jaklyy 5698cf1862 lay ground work for main ram contention TAKE 2
alt title: ITS WORKING! ITS WORKING!!!
2024-12-05 13:29:32 -05:00
Jaklyy 9f04905672 fix mcr 2024-12-01 15:28:46 -05:00
Jaklyy 4099823af7 more write buffer work 2024-11-12 16:58:10 -05:00
Jaklyy 3fe73f764f Merge branch 'interpreter-fixes' into chemical-x 2024-11-08 01:06:12 -05:00
Jaklyy 60a819c1ed correct handling of T bit changes w/o pipeline flush on arm9 2024-11-08 01:02:36 -05:00
Jaklyy 051b236839 Merge branch 'less-ambitious-timing-rework' into chemical-x 2024-10-18 21:10:39 -04:00
Jaklyy 8ff0946b8a mrc causes interlocks 2024-10-18 17:10:00 -04:00
Jaklyy cc031cd4b8 Merge branch 'less-ambitious-timing-rework' into chemical-x 2024-10-18 15:01:14 -04:00
Jaklyy e2a810147f re-add interlocks
breaks gcc debug builds for ??? reason
2024-10-18 15:00:55 -04:00
Jaklyy d7212643f1 move arm9 code fetches into the cycle add routine
setting up for re-adding interlocks
2024-10-16 12:21:48 -04:00
Jaklyy 6b8671d80a Merge branch 'less-ambitious-timing-rework' into chemical-x 2024-10-11 02:05:44 -04:00
Jaklyy 5c120f45ee Merge branch 'interpreter-fixes' into less-ambitious-timing-rework 2024-10-10 20:34:00 -04:00
Jaklyy 787d0c9afc mrc r15 updates flags
also my prior implementation made mrc w/ r15 raise an exception by accident
oops!
2024-10-10 11:09:07 -04:00
Jaklyy 93dce82b07 implement cmp with "rd == 15" on arm9
cmp and friends with bits 12-15 set to 1 borrow characteristics from their legacy 26 bit p variants
thumb version does nothing of note
2024-10-10 10:48:17 -04:00
Jaklyy 3870216fd0 correction: 2024-10-10 03:53:51 -04:00
Jaklyy 53b38c363f ok no it didn't lie to me 2024-10-10 03:32:53 -04:00
Jaklyy 286de74666 Merge branch 'less-ambitious-timing-rework' into chemical-x 2024-09-29 22:43:38 -04:00
Jaklyy c62f0f1244 Merge branch 'interpreter-fixes' into less-ambitious-timing-rework 2024-09-29 22:42:40 -04:00
Jaklyy 7b0d71dbbe Revert T bit changing support for arm7
i cannot comprehend what is happening currently
2024-09-22 19:57:33 -04:00
Jaklyy 157e9c5b04 reimplement changing t bit with arm7
kinda slow though?
2024-09-20 13:37:58 -04:00
Jaklyy 7afa805afc slightly better code 2024-09-20 05:37:51 -04:00
Jaklyy 45f87a1c8d prevent t bit changes without pipeline flush on arm7
idk what's happening fully and its gonna be slow to emulate most likely
we'll figure this out later
2024-09-19 21:02:54 -04:00
Jaklyy 6ebabde392 implement changing thumb bit. and bkpt ig
probably wrong
2024-09-19 04:37:01 -04:00
Jaklyy e5654ec541 r15 mrc mrs 2024-09-16 17:50:09 -04:00
Jaklyy 53cc0378b1 Merge branch 'pr/1955' into chemical-x 2024-09-08 11:41:11 -04:00
Jaklyy ceb5a9febe draw (most of) the rest of the owl 2024-09-06 03:59:59 -04:00
Jaklyy f692e7391a the docs lied to me (again) 2024-08-26 19:48:42 -04:00
Jaklyy a85b2bfb56 tweak when irqs are triggered and fix prefetch aborts
also ig add some comments next to the svc funcs so that someone searching for "swi" can find them easier
2024-08-05 14:57:17 -04:00
Jaklyy fe69cfac7d Merge remote-tracking branch 'upstream/master' into interpreter-fixes 2024-08-04 21:28:32 -04:00
Jaklyy 4b703d24b5 improve msr timings for arm9 2024-08-03 16:22:14 -04:00
Jaklyy 3c936d84b3 improve mrs, mrc timings 2024-08-03 16:20:50 -04:00
Jakly 12be06beb6
fix gdb stub causing the emulator to hang on undefined instructions (#2054)
* dont hang on undefined instruction

* Add spaces

---------

Co-authored-by: Kemal Afzal <RSDuck@users.noreply.github.com>
2024-08-01 22:48:52 +02:00
Jaklyy 038ffa3a35 revert the *entire* interlock implemention
too slow, not accurate enough.
we need to do a *lot* more research into the specifics of how this works with all the various aspects of the cpu's timings before we can make a good implementation
2024-07-11 20:08:35 -04:00
Jaklyy 0060958fed Merge remote-tracking branch 'upstream/master' into jump-after-writeback 2024-07-03 15:26:58 -04:00
Jaklyy a973c0bf5b initial implementation of interlock cycles 2024-06-15 16:07:36 -04:00
Arisotura 8fc403cdad update copyright headers 2024-06-15 17:01:19 +02:00
Jaklyy 42218106b0 verify writable msr bits 2024-06-11 10:30:30 -04:00
Jaklyy 3699768ac9 most cpsr bits can't actually be updated (or at least can't be read?) 2024-06-08 14:01:54 -04:00
Jaklyy 8191f92bb6 mcr is also affected 2024-06-08 10:42:19 -04:00
DesperateProgrammer 9fa814b68e Added check of op1 in MCR/MRC
Fixed Cache Debug registers were accessible, when op1 != 3 in MCR/MRC instructions
Added BIST Test Status register and its cache linefill disable bits
2024-02-01 13:15:03 +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
PoroCYon 3ab752b8ca
GDB stub (#1583)
* gdbstub beginnings

* gdbstub: finish gdb impl things, next up is integration with melonDS

* holy fuck the gdbstub works

* gdb breakpoints work, but there's a mysterious crash on continue

* fix memory corruption that sometimes happened, and make resetting the console thru gdb work

* remove some gdb debug printing

* fix things in gdbstub

* separate option for enabling gdbstub

* add mode-dependent CPU registers

* C++ize the GDBstub code

* add gdbstub config in emu settings dialog

* make sure gdb is disabled when jit is enabled

* Remove unnecessary compiler flags, mark ARMJIT assembly code as no-execute-stack

This hardens the binary a little bit against common exploitation methods

* add option to wait for debugger attach on startup

* only insert GNU stack notes on linux

* disable gdbstub enable checkbox when jit is enabled

* fix non-linux incompatibilities

* enable gdbstub by default

* fix issues with gdbstub settings disable stuff

* format stuff

* update gdb test code

* Fix segfault when calling StubCallbacks->GetCPU()

C++ overrides are hard. Please I'm just a lowly C programmer.

* fix packet size not being sent correctly

Thanks to @GlowingUmbreon on Github for troubleshooting this

* fix select(2) calls (i should read docs more properly)

* fix GDB command sequencing/parsing issue (hopefully)

* [GDB] implement no-ack mode

* fix sending ack on handshake

* get lldb to work
2023-10-22 15:35:31 +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 bfe50e41b4 MCR/MRC aren't available in user mode 2021-10-28 19:47:26 +02:00