Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sidneycadot
Copy link
Contributor

The JMP (ind) bug is present in the 6502 which is emulated by both the "6502" and "6502X" emulation targets of sim65; specifically, the OPC_6502_6C handler. In the old code, the bug-exhibiting code was not executed when the target was set to 6502X, which is incorrect. The patch removes the (CPU == CPU_6502) check, which made no sense.

The JMP (ind) bug was actually fixed in the 65c02. Indeed, the OPC_65C02_6C opcode handler has code that implements the 'right' behavior.

… with the "6502X" CPU type.

The JMP (ind) bug is present in the 6502 which is emulated by both the "6502" and "6502X"
emulation targets of sim65; specifically, the OPC_6502_6C handler. In the old code, the
bug-exhibiting code was not executed when the target was set to 6502X, which is incorrect.
the patch removes the (CPU == CPU_6502) check, which made no sense.

The JMP (ind) bug was actually fixed in the 65c02. Indeed, the OPC_65C02_6C opcode handler
has code that implements the 'right' behavior.
@kugelfuhr
Copy link
Contributor

When touching the code anyway, I would suggest to fix the brace style in the piece of code you changed. It doesn't match the one described in the wiki.

@sidneycadot
Copy link
Contributor Author

The prescribed coding style hasn't been applied consistently throughout the file. It's a bit of a mess in that respect.

In this particular function, the bracketing style is left as it was to keep the patch minimal relative to the issue it's addressing, which I think is good practice. Commits (and PRs) should aim to fix precisely one issue, in my opinion.

If making the coding style consistent is a goal, that warrants a separate issue, with separate patches to fix precisely and only those coding style consistency issues.

@mrdudz
Copy link
Contributor

mrdudz commented Nov 30, 2024

If making the coding style consistent is a goal, that warrants a separate issue, with separate patches to fix precisely and only those coding style consistency issues.

yes indeed. don't mix style fixes with code fixes

@mrdudz
Copy link
Contributor

mrdudz commented Dec 1, 2024

Thanks!

@mrdudz mrdudz merged commit 79e26c1 into cc65:master Dec 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants