ec0d1bcf0c
Added basic::co instructions (not finished yet).
...
Removed `InstFmt::mnemonic`.
2021-01-11 19:07:09 +00:00
9cc7d81e8e
Added pseudo::shift_assign instructions.
...
Fixed `pseudo::store` instruction being implemented wrong.
2021-01-11 17:47:52 +00:00
a00fd15d49
Added pseudo::{load, store} instructions.
...
Fixed `basic::{load, store}` instructions reading destination and source backwards.
2021-01-11 17:25:18 +00:00
cc44af744c
Fixed missing 0x when printing signed hex in some places.
2021-01-11 16:59:22 +00:00
e29c3ed4e0
Added pseudo::jmp.
...
Refactored `basic::{jmp, cond}`'s target calculation.
2021-01-11 16:58:20 +00:00
b72a857a8a
Added pseudo::move_reg instruction.
2021-01-11 16:25:59 +00:00
db2cac8840
Added pseudo::Nop instruction.
2021-01-11 15:58:42 +00:00
195e7d9f24
Added TryInto for all enum instructions.
...
Added `pseudo::load_imm` instrution.
Instructions are now only decoded if aligned to a word.
2021-01-11 15:39:12 +00:00
da41cb8eca
decompiler now just goes instruction by instruction.
2021-01-11 14:44:44 +00:00
8d08ed0d60
Directive now stores a reference to the string read.
...
`InstFmt` no longer requires the instruction bytes.
2021-01-11 14:41:42 +00:00
7fb0030128
Made Directive::Decode respect alignment.
...
Added several methods to `Pos` for alignment.
2021-01-11 14:20:20 +00:00
adf8538736
Added inst::Inst::decode and changed ParseIter to use it.
...
`Directive::decode` now only returns itself.
2021-01-11 14:05:10 +00:00
847e88d490
Added inst::InstSize.
...
Removed `Pos + i16` implementation.
Added `Pos + usize` implementation.
2021-01-11 13:45:16 +00:00
f0258052ba
Now allowing clippy::indexing_slicing globally in dcb-exe.
2021-01-11 13:03:20 +00:00
a40802a84c
Fixed load and store basic instruction being presented wrong.
2021-01-11 13:02:35 +00:00
affd7034e6
Added pseudo::Decodable trait for decoding pseudo instructions.
2021-01-10 15:01:16 +00:00
543283f04f
Added dcb_util::DisplayWrapper and now using it in dcb-exe.
2021-01-10 14:03:03 +00:00
c04eb2245a
Changed all Encodable::encode impl declarations to be consistent.
2021-01-09 15:57:11 +00:00
00bcbd1422
Revised inst::basic's documentation and added an extra indirection with basic::Raw.
2021-01-09 15:43:33 +00:00
88db3def6f
Removed the dcb-exe::exe::raw module (from last commit).
...
Moved `InstFmt` to it's own module.
2021-01-09 15:07:28 +00:00
c0b1ee4fc5
Revised documentation in dcb-exe::exe::inst.
2021-01-09 15:01:01 +00:00
764628e691
Revised dcb_exe::exe::pos's impls.
...
Ran `cargo fmt` on the whole project.
2021-01-09 14:37:15 +00:00
21a0d7a4cb
Revised documentation for dcb-exe::exe.
2021-01-09 14:19:44 +00:00
9dd35a19a7
Fixed test in dcb/src/lib.rs
2021-01-09 13:50:12 +00:00
2f4aea7eec
Revised documentation and lints for dcb-exe/lib.rs.
...
Fixed formatting in `mult::Inst`'s `InstFmt::fmt` impl.
2021-01-09 13:45:02 +00:00
c0b2fd8c62
Added FuncTable and Func back to dcb-exe.
...
Added an iterator over function, data and misc (`ExeItem`) for the executable.
2021-01-09 12:34:43 +00:00
854d90858e
Fixed basic::Inst not decoding everything correctly.
2021-01-08 17:43:06 +00:00
5ad6f6cb5e
Added basic::shift instruction.
2021-01-08 16:15:28 +00:00
058da819ee
Implemented InstFmt for pseudo::Inst and Directive.
...
Renamed `PseudoInst` to `Inst`.
2021-01-08 15:53:35 +00:00
0483c63bfd
Added new InstFmt trait for formatting instructions.
2021-01-08 15:26:43 +00:00
979deae4c3
Moved ParseIter to it's own file.
2021-01-08 14:37:28 +00:00
7c196ec4a9
Added dcb_exe::exe::inst::basic::{Decodable, Encodable}.
2021-01-08 14:33:49 +00:00
48e29ec83c
Revamped most things.
...
Honstly not sure what's happened, but `dcb-exe` is mostly being redone from scratch.
2021-01-08 13:39:50 +00:00
c9644ae2fb
Removed type alises for strings of AsciiStrArr.
2020-11-13 21:09:49 +00:00
be5ea141b3
Fixed issue with card effect SetAttack using x instead of y for the attack type.
2020-11-13 16:02:33 +00:00
c78822db7e
Improved dcb-exe slightly, now gets compiled.
2020-11-11 20:07:12 +00:00
38ea8db1db
Split dcb into dcb-io, dcb-exe, dcb-util and dcb.
...
Also worked on `dcb-exe` slightly, but still not fully supported.
2020-11-11 17:56:37 +00:00
bda1755eed
Added dcb::game::card::table::Header and dcb::game::card::Header for the table header and card header in the table, respectively.
...
Modified `dcb::game::card::Table` to use these new headers.
2020-11-05 18:40:33 +00:00
94bb2d780d
Renamed some instructions' register names for consistency.
...
Made `BasicInst::Lui` it's own type.
Started working on `PseudoInst`.
Removed `dcb::game::exe` and `decompiler` binary temporarily.
Fixed the game file not being read / written correctly.
2020-11-05 15:59:59 +00:00
b974e89d74
Fixed wrong formatting for some instructions.
2020-11-03 12:14:12 +00:00
0e58b3df15
Renamed SimpleInstruction to BasicInstruction.
...
Added `BasicInst` type to replace `BasicInstruction` eventually.
Replaced `Formatter<'_>` with just `Formatter` where possible.
Added a `Display` impl for `Header`.
`dw` instructions now have their argument replaced instead of just having a comment.
2020-11-03 12:05:54 +00:00
e62561f228
Discovered some extra functions and data relating to start and main_loop.
2020-11-01 17:14:43 +00:00
03d0b3425f
Function comments & labels are now sorted ascending.
2020-11-01 05:54:02 +00:00
06f67c4cf0
Data and DataTable now acknowledge stacked / 'specialized' data locations.
...
Improved replacement of addresses with their labels somewhat.
Grealy extended the known data locations with hardware locations.
2020-11-01 05:51:55 +00:00
6f70c110c4
Data, DataTable, Func and FuncTable now just use String instead of providing a S: AsRef<str> generic.
...
Fixed `Pos` not decoding normal integers correctly.
Unwrapper all string-encoded hex values to simply hex values.
`Func` and `Data` now have some fields defaulted.
2020-11-01 04:28:38 +00:00
21c2019713
Modified DataTable and FuncTable to dynamically load the known functions instead of describing them in code.
...
Removed unecessary dependencies for `dcb` and `dcb-tools`.
`dcb::game::exe::Pos` is now deserialized properly as a hex-string.
2020-11-01 04:01:11 +00:00
dc3b66167e
Revamped game::exe::{Func, FuncTable}.
...
Added experimentally getting function arguments heuristically.
2020-10-30 09:15:46 +00:00
0e5ea3967f
Revamped game::exe::{Data, DataTable}.
...
Renamed `MergeSortedIter` to `DiscardingSortedMergeIter`.
2020-10-30 07:09:31 +00:00
998ef01b54
Moved game:.exe::Data from an enum to a struct with the kind of data.
...
Renamed `int` usage to `u32` throughout.
Added `Dh` and `Db` directives.
Unfortunately, function end printing just broke. This feature was minor and will be currently removed as other parts are revamped.
2020-10-30 06:28:58 +00:00
35d0909152
Changed function signature from C style to Rust style.
...
`AllData::get()` can not retrieve data before it.
2020-10-29 11:44:44 +00:00