6b3528507f
Now parsing and requiring branch delay slot markers.
...
Fixes #2 .
2021-05-07 21:27:01 +01:00
3fc494759e
Changed ParseCtx to have a lifetime associated and Parsable::parse to not allow the instruction to borrow the context itself, only it's values.
2021-05-07 21:13:25 +01:00
f6e0f529fa
Non-single pseudo instructions following a jump are now decoded as basic instructions.
2021-05-01 20:15:38 +01:00
4c3c940181
Renamed .ascii to .asciiz
2021-05-01 19:36:56 +01:00
d9be541f2e
Improved syscall handling.
2021-05-01 19:30:06 +01:00
e50d8f0ec4
Moved ExecError to it's own module.
2021-05-01 18:02:09 +01:00
8913219908
Moved ExecState out of dcb-exe and replaced it with the trait ExecCtx.
2021-05-01 18:00:24 +01:00
bedfb07ea1
Added syscall 2 for printing all registers.
2021-05-01 17:50:40 +01:00
cbff6033c1
Fixed issue where multiple labels couldn't exist in the same position.
2021-05-01 17:36:14 +01:00
275592a6ba
Added dcb-dbg for debugging programs.
...
Fixed issue with `ExecState::exec` skipping instructions.
2021-05-01 17:26:25 +01:00
3c02d93dd9
Added initial support for executing instructions.
2021-05-01 16:24:07 +01:00
233db9b200
Now using anyhow::ensure where appropriate.
2021-05-01 14:19:51 +01:00
e807189052
Improved formatting of dcb_util::fmt_err.
2021-04-30 17:37:28 +01:00
6548ef75a8
Added overriding of data and function paths.
2021-04-30 17:27:32 +01:00
c4678e54cc
Cleaned up data/function loading in dcb-decompiler.
2021-04-30 16:54:00 +01:00
1a736c8f80
Added dcb_util::fmt_err_wrapper_owned.
2021-04-30 16:52:06 +01:00
f6cff70e2a
Added dcb_util::parse_from_file.
2021-04-30 16:44:21 +01:00
8487c3714c
Added serde::Deserialize impl for FuncTable.
2021-04-30 16:44:04 +01:00
a4187f3eb4
Moved BcdU8 to it's own module.
2021-04-30 16:27:16 +01:00
1749b78fed
Added function validation.
...
Fixed issue with function `modify_spu_delay1`.
`dcb_util::fmt_err{_wrapper}` not supports non-static errors.
2021-04-30 15:54:49 +01:00
49c8ee53cc
Added missing labels to all known functions.
2021-04-30 15:25:46 +01:00
174b9b03c7
Revised some documentation and added warning for missing labels for the display context implementation in dcb-decompiler.
2021-04-30 15:00:52 +01:00
e04317c091
Functions now have a kind.
2021-04-30 15:00:15 +01:00
53a214602e
Moved displaying context to it's own module and renamed it.
2021-04-30 14:44:43 +01:00
475c3c241b
Added warning on unused overrides.
2021-04-29 22:58:16 +01:00
80a85d6ca2
Decompiler now outputs + after any jump / condition instruction.
2021-04-29 22:20:28 +01:00
3eed1e930a
Moved known/foreign data/func loading into the executable.
...
Slightly revised the data / func table interface.
2021-04-29 16:36:27 +01:00
4b559b7ce1
Added some more documentation to psx header.
2021-04-29 15:38:26 +01:00
3485d10e21
Removed unnecessary features flags.
2021-04-29 15:20:28 +01:00
c211a2fc86
Revised some names in parse::line and added some unit tests.
2021-04-29 12:06:25 +01:00
b572f1d922
Removed existing Addr{Hi, Lo} and renamed AddrSigned{Hi, Lo} to Addr{Hi, Lo}, as all addresses are siged when obtaining their lo and hi.
2021-04-28 20:13:04 +01:00
bff47fad58
Switched all current @addr_ to @signed_addr_, as they all use addiu, thus they are addresses.
2021-04-28 20:05:07 +01:00
a98c971306
Added some more overrides.
2021-04-28 20:03:58 +01:00
64c7d09b4b
Added AddrSignedLo and AddrSignedHi label functions.
2021-04-28 19:40:37 +01:00
c10b9b0b5f
Added warning on heuristic functions during argument override.
2021-04-28 19:40:04 +01:00
a5beaa479d
Turned all heuristically found data locations used in the overrides to known data.
2021-04-28 16:48:34 +01:00
b152773621
Implemented validation for argument overrides.
2021-04-28 16:12:14 +01:00
cd6f64cb34
Updated parse::line to support label functions.
...
Fixed single-argument "nop" not being parsed.
2021-04-28 15:25:56 +01:00
926e2669f7
Renamed ParsingIter to DecodeIter.
2021-04-28 13:15:26 +01:00
cb07f9cd60
Added better instruction argument override.
...
Added more instruction argument overrides.
2021-04-27 19:58:41 +01:00
e5fae97779
`Added overriding for certain positions.
2021-04-27 19:15:04 +01:00
23c98ecd47
nop now doesn't have any arguments if only 1 nop exists.
...
Renamed and added some data / functions.
2021-04-27 17:48:06 +01:00
e2761ac842
Removed old line and renamed line2 to line.
2021-04-27 16:43:12 +01:00
f7c8572dd9
Added line2 for parsing.
2021-04-27 16:40:59 +01:00
f76179929f
Now wrapping long comments.
2021-04-26 18:14:13 +01:00
53963b5a7e
Switched to a 120 max width.
2021-04-26 18:07:33 +01:00
443c6f6c38
Fixed jalr not supporting parsing single argument.
...
Fixed `[ls]wc{n}` not supporting non-offset register arguments.
Fixed `li` prefering unsigned values.
`pseudo::{load, store}` now use their unique mnemonics to avoid collision with basic instructions.
`ParseCtx:arg_pos` now supports label offsets.
Added `Inst::write` to write instructions.
Added `Pos + i64` impl.
Brought back and fixed `dcb-compiler`.
Fixed current function labels not having a leading `.`.
2021-04-26 17:58:05 +01:00
be3a9d6ec0
main Inst, pseudo::Inst and Directive are now Parsable.
2021-04-26 16:32:19 +01:00
9b79f3b5c9
Added lifetime to Parsable trait.
2021-04-26 16:05:07 +01:00
f54325bafe
Removed InstFmt, InstTargetFmt and InstTarget.
2021-04-26 15:39:27 +01:00