Commit graph

35 commits

Author SHA1 Message Date
GaryOderNichts b734393a81
Fix compiling with GCC13 (#20) 2023-10-27 11:34:21 +02:00
GaryOderNichts dad19f10ad
Support 8gb MLC dumps (#15) 2022-08-08 19:10:20 +02:00
GaryOderNichts a814c60b75 Support boot0 emulation
Added command line option `--boot0` to run boot0.
Currently boots until jumping to boot1 which results in an undefined instruction without a valid boot1 key, since boot1 couldn't be decrypted.
2022-08-08 18:39:40 +02:00
GaryOderNichts d5ea23858f Change LT_SPARE behaviour to work with boot0
Renamed `LT_BOOT0` to `LT_SPARE1` since this register handles more than just locking out boot 0.
Handle `LT_SPARE0` and `LT_SPARE1` behaviour used by boot0 mem flushing.
2022-08-08 18:39:40 +02:00
GaryOderNichts 022e713e91 Fix AES CBC continue flag
The provided IV should only change If bit 12 of `AES_CTRL` is set.
If it's not set the IV should *not* change with each decrypted block.
2022-08-08 18:39:40 +02:00
linkmauve 70974277af
debugger: Use libreadline for the prompt (#11)
* debugger: Use libreadline for the prompt

This fixes the issue where ^D would put the debugger into an infinite
loop, and adds support for persistent history, with familiar
keybindings.

I originally tried to make this new dependency optional, but your
usage of make doesn’t really tend itself to this, feel free to tell me
if you prefer another option.

Co-authored-by: Yannik Marchand <ymarchand@me.com>
2021-12-01 08:14:07 +01:00
Emmanuel Gil Peyrot 63b9001111 CI: Speedup the build step by using make’s parallelism
Using this option, the CI will now build the .o files in parallel on its
multiple cores, making the build step go from 1:40 down to 1:04 in one
run.
2021-11-30 20:17:36 +01:00
Yannik Marchand abdd9f3301 Remove useless code in PPCMMU 2021-10-07 13:49:45 +02:00
Emmanuel Gil Peyrot a4cc6ed0df Makefile: Allow custom compilers with CXX variable
This lets users use a different compiler than g++, a common option is
clang++, another is ccache alongside one of these two.
2021-10-07 13:48:45 +02:00
Yannik Marchand 7395acc3b4 Do not raise an exception on unknown GPU packets 2021-04-01 14:08:44 +02:00
Yannik Marchand f29fdc9c42 Implement LC DMA 2021-04-01 13:54:57 +02:00
Yannik Marchand bf18cef73a Fix frsp and fres 2021-04-01 12:38:06 +02:00
Yannik Marchand 85976223f2 Use default g++ instead of g++-8
This hopefully fixes the CI build
2021-04-01 11:49:21 +02:00
Yannik Marchand de879fd008 Update readme 2021-04-01 11:38:21 +02:00
Yannik Marchand 490295e247 Implement low level DSP emulation to fix crash in AXInit 2021-04-01 11:37:04 +02:00
Yannik Marchand 05d7afa58f
Update README.md 2021-03-20 21:13:50 +01:00
Yannik Marchand ae0ad7371f Remove debugger.cpp 2021-03-20 21:09:15 +01:00
Yannik Marchand 20f1337269 Implement a few more ppc instructions 2021-03-20 21:03:29 +01:00
Yannik Marchand 6e6609902b Implement addme, lswi and stswi 2021-03-20 21:03:29 +01:00
Yannik Marchand 227682af2b Reorganize code, fix bugs and more progress in hbm.rpx 2021-03-20 21:03:29 +01:00
James Benton 51d4f8e82a Add Windows support for memory mapped file i/o. 2020-06-30 20:46:13 +02:00
James Benton dd3c663c30 Use signal instead of sigaction.
signal is supported on Windows whereas sigaction is not.
2020-06-14 17:45:15 +02:00
James Benton 9001cd60d2 Fix static_assert without message.
You are targeting C++14 where a message for static_assert is required.
2020-06-14 17:40:23 +02:00
James Benton 0236bbda49 Fix EnableIf / DisableIf macros.
This fixes two things:

You cannot have a std::enable_if on a member function which is only
conditional on the template parameters of the class it belongs to. The
typical way to solve this is by doing redeclaring the type in the function
template, eg:
template<typename T>
class Foo {
template<typename U = T, std::enable_if<is_something<U>> void bar();
}

However that would require usage of the macro to look like:
template<typename U = T, EnableIf(is_something<U>)>

So instead we can make your macro add a bool type to the template paramater
list which is the result of the enable_if, and then use std::enable_if on
that instead, eg:
bool B = (__VA_ARGS__), typename std::enable_if_t<B, int> = 0

However there is one more problem, as you overload your functions with this
macro (eg Matrix::determinant), this leads to both overloads having the
same type signature template<bool B, typename std::enable_if_t<B, int>> so
you end up with duplicated function error.

The way to fix that is to ensure both functions have separate type
signatures, to do that we can repeat the __VA_ARGS__ condition inside the
std::enable_if usage - whilst still being sure to use B to satisfy the
previously mentioned constraint. Which finally leads us to:
bool B = (__VA_ARGS__), typename std::enable_if_t<!B && !(__VA_ARGS__), int> = 0
2020-06-14 17:39:56 +02:00
James Benton 282a3ba18a Add github actions build 2020-06-14 17:18:41 +02:00
James Benton 44f2ba84f2 typeutils: Fix variadic macros EnableIf / DisableIf. 2020-06-14 17:13:52 +02:00
James Benton ad3f406d89 Include ciso646 for the and / or keywords on MSVC. 2020-06-14 17:11:11 +02:00
James Benton 5c4bcbaa1f stringutils: Fix implicit T to char warning. 2020-06-14 17:07:28 +02:00
James Benton d65fc47add Rename Sys::{stdout, stderr, stdin} to Sys::{out, err, in}.
Unfortunately on Windows these are macros so this code cannot compile.
2020-06-14 17:01:34 +02:00
Yannik Marchand f917108b9a Implement HDP stub 2020-03-19 09:07:01 +01:00
Yannik Marchand e815e3f2b4
Pick a random license 2020-03-18 09:55:00 +01:00
Yannik Marchand bb312e4f80
Create README.md 2020-03-18 09:52:10 +01:00
Yannik Marchand 2506228eee Remove ipcdriver command from debugger (it doesn't seem to work anyway) 2020-03-18 09:43:48 +01:00
Yannik Marchand d0508bd8b1 Make sure that files and logs folders are pushed to github 2020-03-18 09:43:27 +01:00
Yannik Marchand 06bf92292c Complete rewrite in c++ 2020-03-18 08:03:42 +01:00