OneLoneCoder / olcNES

NES Emulator, and Tutorial Video Code
1.36k stars 229 forks source link

Disassemble logging "error" on REL addressing mode #46

Closed fabriciorby closed 2 years ago

fabriciorby commented 2 years ago

I am using this project as a model to create a NES emulator using Java.

There's something happening here, when I run the code showed in the video value should be -6, but it's going as 250. Which causes inaccurate logging. https://github.com/OneLoneCoder/olcNES/blob/master/Part%232%20-%20CPU/olc6502.cpp#L1580

To fix this in Java I did a explicit cast to byte, unfortunately I don't know how to do in C++...

For example, here in the video it should be BNE #$FA [$8010] {REL} instead of BNE #$FA [$8110] {REL} image

OneLoneCoder commented 2 years ago

The next video touches on this, so keep watching!

fabriciorby commented 2 years ago

The next video touches on this, so keep watching!

Oh, of course! Thanks for reply and all content, and sorry for opening this issue then :p