Commit Graph

118 Commits

Author SHA1 Message Date
2df43765fb Added missing aliases for PseudoInstruction::MovReg.
Changed `PseudoInstruction::{Li16, LiNeg16}` to `PseudoInstruction::{LiU16, LiI16}`.
Added missing `PseudoInstruction::AddiuAssign`.
2020-10-26 19:54:30 +00:00
8a090411b1 Now using glob imports in impl FromRawIter for PseudoInstruction. 2020-10-26 01:26:01 +00:00
f4c74402f2 Fixed extra whitespace in simple.rs 2020-10-26 01:23:48 +00:00
eb51f448ce SimpleInstruction is now defined using bitmatch instead of a macro. 2020-10-26 01:14:16 +00:00
2d931f10cb Moved Pos to game::exe::pos.
Adding missing instructions `break` + `syscall`.
Added `Func` for the game executable.
`Pos` now implements `serde::{Serialize, Deserialize}`.
2020-10-25 22:46:04 +00:00
233eec4fa1 Added heuristics-based decompiler to dcb-tools. 2020-10-25 19:12:54 +00:00
7d1ebd5fa3 Added instruction decoding to the executable. 2020-10-25 19:11:41 +00:00
46e794c1c5 Fixed wrong formatting of references for SignedHex. 2020-10-24 20:18:38 +01:00
6c29f8e9ca Added simple format wrapper for displaying a signed hexadecimal number in dcb::util::signed_hex.
Now depending on `int-conv`.
2020-10-24 19:33:48 +01:00
06c88e506d Added new deserializer for the game executable. 2020-10-23 03:00:37 +01:00
147a44e4cd Fixed missing doc links. 2020-10-22 01:02:01 +01:00
128945e52f Removed unnecessary rustfmt.toml from dcb-tools. 2020-10-21 01:31:34 +01:00
402a653442 Now not ignoring certain utilities in resources/. 2020-10-21 01:29:50 +01:00
8e48e530ab Removed TODO based on currently nightly supporting the feature. 2020-10-21 01:23:02 +01:00
de5c550e7a Fully integrated dcb-tools into the repo. 2020-10-21 01:17:41 +01:00
27a0008740 Merge branch 'dcb-tools' 2020-10-21 00:54:53 +01:00
5a8f2cc1f5 Moved project into sub-folder 'dcb-tools' in preparation for merge with main repo 2020-10-21 00:54:06 +01:00
00a527744c Now informing the compiler of certain invariants in AsciiStrArr::len.
Removed certain impossible debug asserts.
2020-10-21 00:35:33 +01:00
9324f88a96 Fixed guarantees in <[u8; N+1] as NullAsciiString<N>>::write_string. 2020-10-21 00:17:11 +01:00
3b4d814e5c Removed contracts dependency.
Added error alias `dcb::ascii_str_arr::FromUtf8Error`.
Improved several functions within `dcb::ascii_str_arr`.
Revised errors in `dcb::ascii_str_arr`.
2020-10-08 11:21:11 +01:00
4a3bd9a5cc Addressed new clippy lints.
Made `dcb::game::deck::CardId` a transparent struct over an alias.
Improved implementations of `Bytes for dcb::game::deck::Deck`.
`Read`/`Write` implementations of `dcb::GameFile` now make stronger guarantees in their implementation, using `unsafe` where appropriate.
2020-10-08 10:35:57 +01:00
8296adffe7 Added derive macro ProxySentinal for deriving Bytes.
Removed `dcb::util::generate_enum_property_option`.
2020-10-06 11:21:59 +01:00
4c9fa02bf2 Now using ref-cast for casting between repr(transparent) references instead of a From hack. 2020-10-06 08:24:50 +01:00
47303aa8e9 Revised generate_enum_property_option to be closer to an eventual derive. 2020-09-20 02:48:32 +01:00
2a39f8b438 Moved Bytes interface to dcb-bytes crate.
Instead of implementing `Bytes for Option<T>`, a proxy is now used, as `dcb-bytes` is in a separate crate.
2020-09-20 02:34:39 +01:00
152c8250ff Made dcb a workspace and moved the current implementation to the main crate dcb. 2020-09-20 00:45:38 +01:00
a4eba109bf Moved Digimon's errors to their own module. 2020-09-20 00:34:08 +01:00
aa7edaf92b Fixed bounds on Bytes's associated types. 2020-09-19 23:38:08 +01:00
1b276918d3 Fixed issue with formatter. 2020-09-18 17:30:31 +01:00
e18612b8c7 Added forgotten invariant on AsciiStrArr. 2020-09-18 17:25:15 +01:00
333fab38b4 Extended interface of AsciiStrArr.
`AsciiStrArr` now stores it's chracters as `MaybeUninit`.
Added unit tests to `AsciiStrArr`.
Fixed documentaton with `address::real::ToDataError`.
2020-09-18 17:24:08 +01:00
fac333c0ed Improved AsciiStrArr. 2020-09-18 04:42:26 +01:00
d66b855ab3 Improved slicing and indexing into AsciiStrArr.
Added `TryFrom<&str> for AsciiStrArr<N>`.
2020-09-18 03:56:14 +01:00
cdaf7047f4 Added AsciiStrArr and modified all modules to use it. 2020-09-18 01:45:58 +01:00
65deb1fe84 Added global allow for new clippy lint, clippy::unwrap_in_result.
Fixed bug with `Read` and `Write` implementations of `GameFile`.
`Data` and `Real` addresses, now print `0x` before their number to indicate they're hexadecimal.
Added unit tests for `Read` and `Write` implementations of `GameFile`.
2020-09-17 15:48:52 +01:00
32c2de695d Revised some unit tests for Move. 2020-09-11 14:09:20 +01:00
e85527fdbf move warning and errors now implement std::error::Error.
`From` / `Into` implementations for `Data` and `u64` are now done using `derive_more`.
2020-09-11 13:28:49 +01:00
2ec0a90e58 Simplified Read, Write and Seek implementations of GameFile.
Added some unit tests for `game_file`.
Added `Data::remaining_bytes`.
Fixed bug in `Real::try_to_data`.
Renamed `Real::data_section_end` to `cur_sector_data_section_end`.
Added `Real::next_sector_data_section_start`.
2020-09-11 13:25:22 +01:00
68916aa93d Added try_to_data and to_real methods to the addresses.
Started using the new address methods instead of `From` / `TryFrom`.
Moved definition of `TryFrom` and `From` for addresses into their respective modules.
Revised implementation of `Seek` for `GameFile`.
2020-09-10 14:35:07 +01:00
3786c89f18 Added restrictions to Bytes::ByteArray. 2020-09-09 12:38:02 +01:00
46470cdae7 Now using min_const_generics. 2020-09-09 12:35:28 +01:00
faa6beacfa util::impl_bytes::generate_enum_property_option is now exported in util. 2020-09-09 12:24:41 +01:00
ae8402634a Turned various functions in util and io const.
Added missing `Sub` and `SubAssign` implementations to `io::address::Real`.
Added `from_u64` and `as_u64` to both address types in `io`.
2020-09-09 12:12:08 +01:00
ffd06d4f28 Updated lints to reflect new clippy versions.
Moved `clippy::unsafe_derive_deserialize` allow to where it is explicitly allowed, instead of allowing it crate-wide.
2020-09-09 11:56:59 +01:00
7873c5eed3 Moved helper macros to implement Bytes to util.
Discovered more fields of `Deck`.
Fixed `DeckTable` having the wrong address for the table.
2020-07-21 18:18:46 +01:00
1e171b7071 Replaced occurencies of 0x{:x} in format strings with the equivalent {:#x} 2020-07-18 22:04:35 +01:00
820b1e3225 Improved card table.
Added some features to deck table, such as reading & writing the header.
2020-07-18 22:03:47 +01:00
e89efc849d Fixed wrong usage of char in documentation.
Added some derives to `CardTable`.
Added documentation for `Deck`.
2020-07-14 23:10:09 +01:00
9885563e32 Moved CardTable's errors to it's own module.
Changed all `log::debug!` to `log::trace!`.
2020-07-14 22:24:52 +01:00
e62a374d48 Removed unused nightly features. 2020-07-14 22:15:30 +01:00