AidenBeresford / FeGBA

Rust-based Game Boy Advance emulator written and maintained by TAMU students.
MIT License
1 stars 0 forks source link

MLA Instruction #13

Closed XuMingSheng closed 4 weeks ago

AidenBeresford commented 1 month ago

Looks mostly right but you have to index the register array with idx[x] that way it works for all processor modes. If you need an example I implemented BX on my branch which you can see in my PR #14 Also style nitpick but I prefer the instruction functions to be in UPPER_SNAKE_CASE.

XuMingSheng commented 1 month ago

Oh, so that's the reason why there's an additional layer of wrapping of the index. Cool! As for the function naming style, I think UPPER_SNAKE_CASE violates the convention of Rust, but I changed it anyway.

AidenBeresford commented 1 month ago

Oh, so that's the reason why there's an additional layer of wrapping of the index. Cool! As for the function naming style, I think UPPER_SNAKE_CASE violates the convention of Rust, but I changed it anyway.

It does violate Rust convention but I think it looks better anyways. Do you have any specific reason for returning on a failed condition instead of just executing on a passed condition? I personally thinks it looks better the other way but if you have a good reason I'm willing to hear you out.