RIP-Comm / clementine

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

Add THUMB mode #136

Closed AlessioC31 closed 1 year ago

AlessioC31 commented 1 year ago

This PR adds preliminary work needed to implement THUMB mode.

Should we refactor the code a bit to share code between the two modes? (traits, etc)

For now I just renamed old methods in fetch_arm, decode_arm and execute_arm and I implemented the _thumb ones. But we can discuss here what we think is best :)

codecov-commenter commented 1 year ago

Codecov Report

Base: 48.99% // Head: 46.88% // Decreases project coverage by -2.10% :warning:

Coverage data is based on head (fd89dcf) compared to base (affd045). Patch coverage: 21.42% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #136 +/- ## ========================================== - Coverage 48.99% 46.88% -2.11% ========================================== Files 30 30 Lines 1635 1670 +35 ========================================== - Hits 801 783 -18 - Misses 834 887 +53 ``` | [Impacted Files](https://codecov.io/gh/RIP-Comm/clementine/pull/136?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [emu/src/arm/data\_processing.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vZGF0YV9wcm9jZXNzaW5nLnJz) | `72.35% <ø> (ø)` | | | [emu/src/arm/instruction.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vaW5zdHJ1Y3Rpb24ucnM=) | `69.56% <0.00%> (-9.51%)` | :arrow_down: | | [emu/src/arm/opcode.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vb3Bjb2RlLnJz) | `12.00% <0.00%> (-64.48%)` | :arrow_down: | | [emu/src/arm/psr.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vcHNyLnJz) | `75.00% <0.00%> (+1.74%)` | :arrow_up: | | [emu/src/arm/single\_data\_transfer.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vc2luZ2xlX2RhdGFfdHJhbnNmZXIucnM=) | `92.30% <ø> (ø)` | | | [emu/src/memory/internal\_memory.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9tZW1vcnkvaW50ZXJuYWxfbWVtb3J5LnJz) | `77.77% <0.00%> (-6.23%)` | :arrow_down: | | [ui/src/cpu\_inspector.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dWkvc3JjL2NwdV9pbnNwZWN0b3IucnM=) | `0.00% <ø> (ø)` | | | [emu/src/arm/arm7tdmi.rs](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZW11L3NyYy9hcm0vYXJtN3RkbWkucnM=) | `62.08% <38.70%> (-1.81%)` | :arrow_down: | | ... and [1 more](https://codecov.io/gh/RIP-Comm/clementine/pull/136/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.