RIP-Comm / clementine

Gameboy Advance emulator.
MIT License
49 stars 13 forks source link

Adding `LCDRegisters` mapping to `InternalMemory` #82

Closed AlessioC31 closed 2 years ago

AlessioC31 commented 2 years ago

This PR adds LCDRegisters memory region to InternalMemory. It serves as preparation to implement the ppu (hopefully :D).

Structs IORegister and LCDRegisters have been written to model these registers.

Unit tests have been added to InternalMemory.

Added get_byte and set_byte in Bits trait to selectively read/write a specific byte from an u32.

AlessioC31 commented 2 years ago

Can you squash latest 3 commit? They didn't add nothing relevant

You mean squashing the latest 3 commits into the Memory: Add IORegister and LCDRegisters structs one?

guerinoni commented 2 years ago

Can you squash latest 3 commit? They didn't add nothing relevant

You mean squashing the latest 3 commits into the Memory: Add IORegister and LCDRegisters structs one?

Yes, I mean if you have:

Just keep the first commit, without other "fixes" or related, we don't have already PR merged then we can keep commit as clean as possibile :D

AlessioC31 commented 2 years ago

Can you squash latest 3 commit? They didn't add nothing relevant

You mean squashing the latest 3 commits into the Memory: Add IORegister and LCDRegisters structs one?

Yes, I mean if you have:

  • ARM: Implement X instruction
  • ARM: Add test for X

Just keep the first commit, without other "fixes" or related, we don't have already PR merged then we can keep commit as clean as possibile :D

Ok I squashed 2 commits but I left the "Memory: Fix reading from work RAM" separate since it changes some logic which was already present