Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No-op passing several corax tests #19

Open
algometric opened this issue Sep 30, 2023 · 2 comments
Open

No-op passing several corax tests #19

algometric opened this issue Sep 30, 2023 · 2 comments

Comments

@algometric
Copy link

algometric commented Sep 30, 2023

I only have the required opcodes to run the IBM logo screen implemented (00E0, 1NNN, 6XNN, 7XNN, ANNN, DXYN) with any unknown instruction nooping, and I get a huge number of checkmarks:
image

I'm assuming there's a magic opcode in here that if I implement it'll suddenly cause the others to break more consistently, but especially given its position right after the IBM logo in this repo that still seems misleading?

If this isn't an issue because any missing checkmark is a failure state, maybe it's worth just having a note in the readme?

@coornio
Copy link

coornio commented Oct 10, 2023

The problem is, you can't reliably create tests for instructions when the instructions to run these very tests are missing or written incorrectly. It's not like the test itself runs in an independent emulator after all, only testing the concerned instruction on your own side when absolutely needed.

You'll want to run the test after actually implementing most, if not all, of the instructions to a satisfactory degree, then it will help you point out discrepancies.

For more targeted cases, you'll be better off putting instructions in your ram and registers manually and checking the resulting values to ensure things worked as intended.

@Timendus
Copy link
Owner

That's true, the test needs a couple of opcodes to actually be able to run. Honestly I'm slightly surprised that you can even render all of that with only the opcodes to IBM implemented 😄 I generally just throw an error (in my interpreter's code) when any opcode is used that I haven't implemented yet. That way you get an error from your interpreter telling you to implement the opcode, an error from the test telling you the implementation wasn't done correctly, or a tap on the back from the checkmark. We could be more specific about that in the manual though, that's a good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants