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

Galactic Empire Fixes (FPU + Input) #631

Merged
merged 9 commits into from
Oct 9, 2024
Merged

Galactic Empire Fixes (FPU + Input) #631

merged 9 commits into from
Oct 9, 2024

Conversation

enusbaum
Copy link
Member

  • Refactor CPU Debugging
    • Moved code to "init" on CPU load, not every Tick
    • Added Variable Watching
  • Fix FPU Rounding
    • Fixed FPU Control Word Loading (FLDCW)
    • Utilizes FPU Control Word for Midpoint Rounding Mode
    • Implement FPU Control Word mode for Rounding in FPU OpCodes (FISTP, FRNDINT)
  • Add Extension Method ToHexString() on ReadOnlyArray to print the entire Array
  • Removed Unused Code
  • Added Method Comment on currently Uncommented Code
  • Fix handling of trailing spaces on input in parsein (Trailing NULLs)

- Adds Helper Method to get the Rounding Control value from the FPU Control Word
- Add `ToHexString()` extension method with no parameters to convert the entire span to a hex string
- Refactor Debug Info to be set in constructor, not every `Tick()` (debug performance)
- Add Debug option to Watch Variables (memory addresses) for change
- Fix `FLDCW` to actually load Control Word properly
- Update FPU Methods with rounding to utilize the Rounding Control bytes to define rounding type
- Code Cleanup
- Length shouldn't include the terminating null
- Just null should return a length of zero, those zero for expected
- Added Test for trailing space
@enusbaum enusbaum requested a review from paladine August 27, 2024 01:25
- Add Control Word to Unit Tests for `FLDCW` and `FRNDINT`
- Verify Different Rounding Modes in these Unit Test cases
@paladine paladine merged commit 29bb032 into master Oct 9, 2024
2 checks passed
@paladine paladine deleted the ge-fpu-fixes branch October 9, 2024 02:02
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

Successfully merging this pull request may close these issues.

2 participants