Extend C64Script with machine, config, and disk commands#97
Merged
Conversation
…ganization, and improve clarity - Introduced a new section for Plugin & Integration Commands, consolidating plugin-specific I/O commands. - Renumbered sections for consistency and clarity. - Added detailed command overview table with references for all plugin-provided commands/functions. - Merged machine control specifications into the main language spec, detailing commands like RESET, REBOOT, PAUSE, and POWEROFF. - Expanded configuration commands for Ultimate 64, including CFG$, CFG_ITEM$(), and CFG_OPTIONS$(). - Enhanced documentation for drive commands, including DRIVE_MOUNT, DRIVE_UNMOUNT, and DRIVE_MODE. - Improved error handling descriptions and examples throughout the document. - Updated effect parameters reference for better usability and clarity.
…trol, and SID/VIC/CPU settings - Implemented `test_u64_config.c64script` and its expected trace to validate U64 configuration commands. - Created `test_u64_drives.c64script` and its expected trace to test drive operations. - Added `test_u64_keyboard_buffer.c64script` to check keyboard buffer commands. - Developed `test_u64_machine_control.c64script` for machine control commands. - Introduced `test_u64_sid_vic_cpu.c64script` to validate SID/VIC/CPU configuration commands. - Enhanced `test_c64script_compiler.c` with new tests for executing configuration, drive, and keyboard commands. - Added `test_c64script_rest_network.c` to test REST network I/O commands with a mock server.
- Added script file metadata fields (script_path, script_dir, script_basename) to the c64-script.h structure. - Updated CMakeLists.txt to include additional source files for the script tests. - Enhanced coverage matrix documentation with new test cases for error handling and logging. - Implemented new test scripts for PEEK address range errors, default log file path, and relative path resolution. - Updated the test suite to expect failures for invalid PEEK addresses and added checks for drive properties. - Introduced a new Python script to export C64U configuration snapshots to YAML format.
- Updated expected trace files to ensure proper newline characters are included in output strings. - Corrected escape sequences for quotes in string variables to maintain consistency and prevent syntax errors. - Adjusted log entries and content variables to reflect accurate expected outputs in test cases.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends C64Script with machine control, configuration management, and disk operations capabilities, enabling automated testing and device management through the scripting system.
Changes:
- Added new script commands for machine control (pause, resume, poweroff), configuration management, and disk operations
- Enhanced mock C64U server with drive state tracking, config management, and request logging
- Introduced audio mixer snapshot functionality for AV sync scenarios
- Improved IP detection to use host-based detection alongside generic detection
Reviewed changes
Copilot reviewed 54 out of 107 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/mock_c64u_server.py | Extended mock server with drive/config APIs, request logging, and state management |
| src/c64-types.h | Added audio mixer snapshot fields to c64_source structure |
| src/c64-source.c | Updated IP detection to try host-based detection first, added REST client ready callback |
| src/c64-script-vm-internal.h | New internal header defining VM helper functions and utilities |
| src/c64-script-vm-dispatch.c | New empty dispatch file serving as entry point for VM dispatch system |
| src/c64-script-vm-dispatch-*.h | New header files declaring dispatch functions for memory, machine, and keyboard operations |
| tests/e2e/results/* | Updated E2E test result files with new baseline metrics |
…efaults and logging behavior
- Introduced `test_integer_overflow.c64script` to verify behavior of integer overflow with % variables.
- Added corresponding expected trace for integer overflow test.
- Created `test_label_disambiguation.c64script` to test label disambiguation when using labels without colons.
- Added expected trace for label disambiguation test.
- Updated `test_map_defaults.c64script` to use CONFIG${} syntax for consistency.
- Adjusted expected traces for map defaults to reflect changes in CONFIG syntax.
- Modified expected traces in `test_log_default_path.expected-trace.yaml` to ensure consistency in log entries.
- Updated expected traces in `test_u64_config.expected-trace.yaml` to replace numeric values with empty strings for ITEMS$ array.
…options to build script, improve README, and adjust fuzzing parameters
…file writing is validated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.