-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix cpu6 detect #34
base: main
Are you sure you want to change the base?
Fix cpu6 detect #34
Conversation
Needs to set V flag depending on value for various cpu6 detection code to work
Now cpu6 detection works, code actually executes these
alu_out ^= ALU_V; | ||
// Explicitly clears L and F flags | ||
alu_out &= ~(ALU_L | ALU_F); | ||
logic_flags(v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be neat if you describe CPU detection logic somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a comment?
Code just executes a clr to a non-zero value and checks the v flag. As CPU5 doesn't implement "small immediates", it clears to zero and v flag is zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, got it. CPU5 ignored the remaining nibble of the operand, where the constant was pushed in in cpu6.
Still perhaps worth leaving somewhere. In code comments or maybe on wiki.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so we finally know wtf was going on. Cool
CLR needs to set V flag depending on value for various cpu6 detection code to work.
Also stub parity enable/disable.
Allows
?DSKT
to correctly detect and report that it's running on cpu6Before:
After