Skip to content

Conversation

@markroth8
Copy link
Contributor

Library Fix

  • In src/vrEmu6502.c, updated vrEmu6502Reset() to initialize vr6502->currentOpcodeAddr = 0xffff;.

Test Runner Fixes

  • Robust Parsing: Refactored readHexFile to use manual parsing with memcpy and explicit null-termination via memset on a reusable temporary buffer.
  • Binary Mode: HEX files are now opened with "rb" to ensure consistent behavior across platforms.
  • Initialization Sync: Initialized lastPc = 0; in main() to ensure it does not match the library's initial 0xffff.
  • MSVC Compatibility: Fixed signed/unsigned comparison warnings and other minor MSVC-specific issues to ensure a clean build with /WX.

Verification Results

All 11 tests now pass on Windows:
100% tests passed, 0 tests failed out of 11

Tested with ctest -C Release

@markroth8
Copy link
Contributor Author

Fixes #8

@markroth8 markroth8 marked this pull request as draft January 19, 2026 19:25
@markroth8
Copy link
Contributor Author

Actually, hold on, I may have incorrectly diagnosed the reason for the failure.

@markroth8 markroth8 force-pushed the bugfix/8-Windows-test-failures-and-fragile-hex-parsing branch from 21ffa16 to 3766edf Compare January 19, 2026 20:10
@markroth8
Copy link
Contributor Author

Test Runner Fixes

  • Fix premature trap detection when memory state is pre-initialized (as is the case in Windows), causing lastPc == PC before the test even begins!

Verification Results
All 11 tests now pass on Windows:
100% tests passed, 0 tests failed out of 11

Tested with ctest -C Release

@markroth8 markroth8 marked this pull request as ready for review January 19, 2026 20:12
@visrealm visrealm merged commit aae98cb into visrealm:main Jan 19, 2026
3 checks passed
@visrealm
Copy link
Owner

Thanks

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