Commit Graph

88 Commits

Author SHA1 Message Date
Lioncash
4c97deb364 PowerPC: Namespace all header contents for PowerPC.h
Puts everything under the same namespace. Previously the header was only
partially namespaced, which is inconsistent.
2018-03-22 19:01:47 -04:00
Lioncash
50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Sepalani
4f1c0ca3e9 HLE: Improve format string detection heuristic 2018-03-06 21:21:56 +04:00
Léo Lam
3deb8ce074 HLE: Use enum classes for HookType and HookFlag 2018-02-04 14:50:55 +01:00
Léo Lam
a184ab93b6 HLE: Remove an unused function
There is nothing using PanicAlert in either official titles or libogc.
2018-02-04 14:41:55 +01:00
Sepalani
6ffb5dbaaa HLE: DWC_Printf debug added 2018-01-23 19:02:32 +01:00
Lioncash
dd4203bec8 Core: Remove unnecessary includes
Also moves a cpp file's related header file to the top of the inclusions if it isn't already there.
2017-06-15 18:52:22 -04:00
Shawn Hoffman
90f863a7a3 HLE: fix unreachable code warning 2017-06-07 19:52:07 -07:00
Sepalani
f28f23af1d StringUtil: StringPopBackIf added 2017-06-06 05:08:51 +01:00
Sepalani
1209959012 HLE: Prevent GetStringVA to strip newlines 2017-06-06 04:31:01 +01:00
Sepalani
190f7cbc4f HLE_OS: Fix missing-declarations warnings 2017-06-06 04:23:54 +01:00
shuffle2
065c3d78b7 Merge pull request #5486 from sepalani/hle-print
HLE: More printf logs added
2017-06-05 17:29:13 -07:00
Sepalani
ba5cb50afc HLE: Improve HLE_GeneralDebugPrint detection 2017-06-04 20:53:14 +01:00
Sepalani
ac51c80ad0 HLE: Log (v)fprintf messages 2017-06-03 21:05:14 +01:00
Sepalani
2989c0cb61 HLE: Log (v)dprintf messages 2017-06-03 21:05:13 +01:00
Sepalani
9f6d6e6921 HLE: HLE_GeneralDebugVPrint added 2017-06-03 21:03:44 +01:00
Sepalani
061dadbc61 HLE: SVR4 VAList struct added 2017-06-03 21:01:59 +01:00
Sepalani
5a4f085c10 HLE: VAList cleanup and SystemVABI namespace 2017-06-03 21:01:59 +01:00
Sepalani
e9dd0072de HLE: Variable Argument Lists support 2017-06-03 21:01:58 +01:00
Sepalani
2afa546551 HLE: Fix __write_console implementation 2017-06-03 20:06:31 +01:00
Sepalani
0f74f1ffb3 HLE: Use a proper apploader OSReport 2017-05-02 20:47:47 +01:00
Sepalani
02f9c03c45 HLE: Fix apploader regression 2017-04-30 02:21:50 +01:00
Sepalani
4f9e5e1141 [HLE] Added GetFirstFunctionIndex matching the start address 2017-04-29 19:38:40 +01:00
Sepalani
e259b3fa76 [HLE] Fixes XFB and invisible printf 2017-04-29 19:38:39 +01:00
Sepalani
5a1ebe232e HLE: Add Reload() function 2017-04-09 14:02:34 +01:00
Sepalani
20a9c5b12d HLE: Add PatchFixedFunctions() function 2017-04-09 14:02:34 +01:00
Sepalani
5f7002da5c HLE: More printf floating point types handled 2017-02-17 10:51:10 +00:00
Matthew Parlane
b9fc79020d Merge pull request #4817 from sepalani/debug_print_case
Handle another case with HLE_GeneralDebugPrint
2017-02-06 17:40:44 +13:00
Lioncash
f7b9db9846 PowerPC: Convert CoreMode enum into an enum class
Prevents constants from polluting the namespace.
2017-02-04 19:34:56 -05:00
Sepalani
e280f5615a Handle another case with HLE_GeneralDebugPrint 2017-02-03 23:30:37 +00:00
Léo Lam
24199293d3 IOS: Reorganise the source files and IPC_HLE→IOS
IPC_HLE is actually IOS HLE. The actual IPC emulation is not in
IPC_HLE, but in HW/WII_IPC.cpp. So calling IPC_HLE IOS is more
accurate. (If IOS LLE gets ever implemented, it'll likely be at
a lower level -- Starlet LLE.)

This also totally gets rid of the IPC_HLE prefix in file names, and
moves some source files to their own subdirectories to make the file
hierarchy cleaner.

We're going to get ~14 additional source files with the USB PR,
and this is really needed to keep things from becoming a total pain.
2017-01-18 20:43:10 +01:00
Matthew Parlane
5790f15be8 Merge pull request #4299 from sepalani/hle_symbols
SymbolDB: Multiple symbols detection allowed
2017-01-13 10:05:32 +13:00
Lioncash
a10bb15f17 HLE: Add explicit initializers for OSBreakPoints' stub entry
No behavior change, this just makes implicit values explicit.
2017-01-05 14:15:45 -05:00
Lioncash
2941468857 HLE: Align table formatting 2017-01-05 14:13:30 -05:00
Sepalani
d778b8a820 SymbolDB: GetSymbolsFromName added 2016-12-19 21:02:23 +00:00
Léo Lam
09fdab7fb4 HLE: Add a hook for JUTWarningConsole_f
JUTWarningConsole_f calls vprintf, but in a way we currently don't
handle (which messes up the printed message). However, it is a standard
debug print function, so we can directly hook it instead of waiting for
the vprintf call.

This is necessary to fix debug output in a few games now that vprintf
is properly detected in more games.
2016-12-09 23:40:06 +01:00
JosJuice
b47e607105 HLE_OS: More bounds checking in GetStringVA 2016-11-12 19:17:15 +01:00
JosJuice
3d80d454ce HLE_OS: Implement %n in GetStringVA
%n writes to a pointer that's provided as a parameter.
We didn't have a custom implementation of this before,
meaning that %n would trigger a write to the host
memory instead of the emulated memory!
2016-11-12 19:16:55 +01:00
Sepalani
aa63253838 HLE: Logs nlPrintf calls 2016-10-05 19:15:26 +01:00
shuffle2
d1df222367 Merge pull request #4297 from sepalani/hle_patch
HLE: Remove duplicate in OSPatches
2016-10-04 17:39:50 -07:00
shuffle2
71aa243333 Merge pull request #4298 from sepalani/hle_bp
HLE: Wrong array used in BP patching fixed
2016-10-04 17:38:06 -07:00
Sepalani
58f5cd944c HLE: Another DebugPrint case added 2016-10-04 21:40:43 +01:00
Sepalani
6e8c5040df HLE: Wrong array used in BP patching fixed 2016-10-04 16:47:06 +01:00
Sepalani
61580b0dec HLE: Remove duplicate in OSPatches 2016-10-04 16:33:47 +01:00
EmptyChaos
76558c4d87 HLE: Fix warnings 2016-10-03 18:49:08 +11:00
shuffle2
fba6801851 Merge pull request #4216 from EmptyChaos/geckocodes-cleanup
GeckoCodes: Don't run PPC code in CoreTiming callbacks
2016-10-02 22:37:51 -07:00
EmptyChaos
b3547870ee PatchEngine/GeckoCode: Heuristic stack checks
Try to make sure the stack is sane before calling into the
codehandler. This is intended to reduce the possibility of random
memory corruption.
2016-10-03 16:27:42 +11:00
EmptyChaos
31cf8432bf HLE: Differentiate Address hooks from Symbol hooks
GeckoCodes require address hooks which don't correspond to any
symbol in the symbol table. The hooks get deleted when repatching
the game because they did not persist across calls to
HLE::PatchFunctions.
2016-10-03 16:27:42 +11:00
EmptyChaos
83407263e5 HLE/GeckoCode: Add new HLE hook exit trampoline
Dolphin emulates GeckoCodes by fiddling with the CPU state when a
VI Interrupt occurs. The problem with this is that we don't know
where the PC is so it's non-deterministic and not necessarily
suitable for use with the codehandler.

There are two options: Patch the game like Gecko OS either directly
or using HLE::Patch, or use a trampoline so we can branch from any
PC even if it would otherwise not be valid. The problem with Gecko OS
patches is there are 10 of them and they have to be configured
manually (i.e. Game INIs to would need to have a [Core]GeckoHookType
property).

HLE_Misc::GeckoReturnTrampoline enables the Code Handler to be
entered from anywhere, the trampoline restores all the registers that
had to be secretly saved to the stack.
2016-10-03 16:27:42 +11:00
EmptyChaos
541a42a7e3 GeckoCode: Use named constants in ICache flush hack
Turns out one of the magic numbers was very magic. The gameid is
an ad-hoc comm protocol with HLE_Misc to control the number of times
the ICache is reset.
2016-10-03 16:27:18 +11:00