cleanup common

This commit is contained in:
scawful
2024-08-06 18:01:33 -04:00
parent 7488551335
commit 1c1f8e9c1c
2 changed files with 29 additions and 27 deletions

View File

@@ -227,12 +227,21 @@ inline uint32_t MapBankToWordAddress(uint8_t bank, uint16_t addr) noexcept {
return result;
}
uint32_t Get24LocalFromPC(uint8_t *data, int addr, bool pc = true);
int HexToDec(char *input, int length);
// "Store little endian 16-bit value using a byte pointer, offset by an
// index before dereferencing"
void stle16b_i(uint8_t *const p_arr, size_t const p_index,
uint16_t const p_val);
// Load little endian halfword (16-bit) dereferenced from an arrays of bytes.
// This version provides an index that will be multiplied by 2 and added to the
// base address.
uint16_t ldle16b_i(uint8_t const *const p_arr, size_t const p_index);
// Load little endian halfword (16-bit) dereferenced from
uint16_t ldle16b(uint8_t const *const p_arr);
void stle16b(uint8_t *const p_arr, uint16_t const p_val);
@@ -245,10 +254,6 @@ struct FolderItem {
typedef struct FolderItem FolderItem;
uint32_t Get24LocalFromPC(uint8_t *data, int addr, bool pc = true);
uint32_t crc32(const std::vector<uint8_t> &data);
void CreateBpsPatch(const std::vector<uint8_t> &source,
const std::vector<uint8_t> &target,
std::vector<uint8_t> &patch);