diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-01-18 19:35:42 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-01-18 19:35:42 +0100 |
| commit | 67672d06776e38b06f31f6599678767c60eed58a (patch) | |
| tree | 4846c762815b887036b10a7aadd849dd8fdd4420 /src/nes/util | |
| parent | fe7243fdd14f6ef57033f9e70141aba970dba7ea (diff) | |
implement ppu io registers
Diffstat (limited to 'src/nes/util')
| -rw-r--r-- | src/nes/util/address.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nes/util/address.hh b/src/nes/util/address.hh index 77ee76a..85a00ab 100644 --- a/src/nes/util/address.hh +++ b/src/nes/util/address.hh @@ -60,4 +60,14 @@ namespace nes { return address{ static_cast<std::uint16_t>(a + b.get_absolute()) }; } + + constexpr auto operator-(address const a, std::uint16_t const b) -> address + { + return address{ static_cast<std::uint16_t>(a.get_absolute() - b) }; + } + + constexpr auto operator%(address const a, std::uint16_t b) -> address + { + return address{ static_cast<std::uint16_t>(a.get_absolute() % b) }; + } } // namespace nes
\ No newline at end of file |
