- Updated TestConfig to include ImGui test speed options, conditionally compiled based on the YAZE_ENABLE_IMGUI_TEST_ENGINE flag.
- Enhanced command line argument parsing to support new test speed options: --fast, --normal, and --cinematic, improving flexibility for UI testing.
Benefits:
- Improved configurability for testing scenarios involving ImGui.
- Enhanced user experience by allowing more granular control over test execution speed.
- Added option to export compile commands for clangd and other Language Server Protocol (LSP) tools by setting CMAKE_EXPORT_COMPILE_COMMANDS to ON in CMake.
- Updated yaze_test.cc to conditionally include ImGui test engine headers based on the YAZE_ENABLE_IMGUI_TEST_ENGINE flag, improving modularity and organization.
Benefits:
- Enhanced development experience with better integration of LSP tools.
- Improved code organization by managing includes based on feature flags.
- Removed direct inclusion of `emulator_commands.h` in non-gRPC contexts to streamline dependencies.
- Updated CMake configuration to conditionally include emulator command sources only when gRPC is enabled, enhancing modularity.
- Ensured consistent handling of emulator commands across different components.
Benefits:
- Improved code organization and maintainability by clarifying the inclusion of gRPC-related features.
- Enhanced flexibility in managing command handlers based on compilation flags.
- Moved the declaration of `AgentControlServer` to a forward declaration in the header file for better clarity and organization.
- Updated the `EditorManager` constructor to initialize the version string and popup manager context.
- Added conditional compilation for gRPC-related includes and commented out the agent control server initialization for future reference.
- Ensured consistent definition of `IMGUI_DEFINE_MATH_OPERATORS` across multiple files to prevent potential issues with ImGui usage.
Benefits:
- Improved code organization and readability.
- Enhanced maintainability by clarifying the initialization process and managing includes effectively.
- Introduced preprocessor macros for feature flags in CMake, allowing conditional compilation based on the presence of gRPC and JSON features.
- Updated the agent source file list to include gRPC-dependent sources only when gRPC is enabled, enhancing modularity and maintainability.
Benefits:
- Improved flexibility in enabling/disabling features at compile time.
- Streamlined source management for better organization of gRPC-related components.
- Added `AgentControlServer` to manage gRPC connections for emulator control.
- Introduced `EmulatorServiceImpl` with methods for starting, stopping, and controlling the emulator, including button presses and memory operations.
- Created new command handlers for pressing, releasing, and holding emulator buttons.
- Updated CMake configuration to include new source files and proto definitions for the emulator service.
Benefits:
- Enhanced control over the emulator through gRPC, allowing for remote interactions.
- Improved modularity and maintainability of the emulator's command handling.
- Streamlined integration of new features for emulator control and state inspection.
- Renamed `turbo_mode()` to `is_turbo_mode()` for clarity in the Emulator class.
- Improved input handling in the Snes class by adding button state management and ensuring proper initialization of input controllers.
- Implemented multiple audio resampling methods (linear, cosine, cubic) in the Dsp class, allowing for enhanced audio quality during playback.
- Updated the user interface to include options for selecting audio interpolation methods and added keyboard shortcuts for emulator controls.
Benefits:
- Improved code readability and maintainability through clearer method naming and structured input management.
- Enhanced audio playback quality with new resampling techniques.
- Streamlined user experience with added UI features for audio settings and keyboard shortcuts.
- Updated CMake configuration to conditionally link the yaze_test_support library for both yaze and yaze_emu targets, ensuring proper integration with TestManager.
- Enhanced status messages to provide clearer feedback on the linkage status and potential issues if the target is not found.
Benefits:
- Improved clarity and maintainability of the CMake configuration.
- Enhanced modularity by managing test dependencies more effectively.
- Improved the CMake configuration to conditionally link the yaze_test_support library for the yaze target when tests are enabled, providing clearer feedback on linkage status.
- Updated the file dialog implementation to include specific filters for ROM files and all files, enhancing user experience during file selection.
- Added status messages to inform users about the linkage of test support and potential issues if the target is not found.
Benefits:
- Enhanced clarity and maintainability of the CMake configuration.
- Improved user interaction with file dialogs through better filtering options.
- Enhanced audio backend initialization by adding comments for clarity and ensuring a moderate buffer size for optimal latency and stability.
- Updated the emulator's run logic to start in a running state by default and refined the auto-pause mechanism to only trigger during window resizing, removing aggressive focus-based pausing.
- Implemented adaptive audio buffering to maintain smooth playback, adjusting the number of queued samples based on current buffer status.
Benefits:
- Improved user experience with more intuitive audio handling and reduced latency.
- Enhanced stability during window operations, preventing crashes on macOS.
- Streamlined audio processing for better performance and responsiveness.
- Added conditional linkage of the yaze_test_support library for both yaze and yaze_emu targets when tests are enabled, ensuring proper integration with TestManager.
- This change enhances the modularity of the CMake configuration by managing test dependencies more effectively.
Benefits:
- Improved organization of test support linkage in the CMake configuration.
- Enhanced maintainability by ensuring that test dependencies are only included when necessary.
- Included the JSON library directory in the test CMake configuration to support JSON functionalities in tests.
- This addition enhances the testing environment by providing necessary dependencies for JSON handling.
Benefits:
- Improved testing capabilities by integrating JSON support.
- Streamlined CMake configuration for better modularity in test setups.
- Modified include paths in multiple source files to reflect the new directory structure, ensuring all references are correctly aligned with the updated project organization.
Benefits:
- Enhanced maintainability and clarity of the codebase by standardizing include paths.
- Updated include paths in several source files to reflect the new directory structure, ensuring consistency across the project.
- Deferred the linkage of the yaze_test_support library to the test.cmake file for better dependency management and ordering.
Benefits:
- Improved organization of include paths for better maintainability.
- Enhanced modularity by managing test dependencies separately.
- Added new include directories for ImGui and SDL to the test CMake configuration, enhancing the testing environment.
- Updated the linkage to include ImGui and SDL targets, ensuring proper integration for GUI tests.
Benefits:
- Improved support for GUI testing by integrating necessary libraries.
- Streamlined the CMake configuration for better modularity in test setups.
- Removed direct linkage of yaze_test_support in the yaze target when tests are enabled, as it is now included transitively through yaze_editor.
- Added linkage of yaze_editor to yaze_test_support to facilitate TestManager usage, ensuring test dependencies are managed privately.
Benefits:
- Simplified CMake configuration by reducing direct dependencies.
- Enhanced modularity and maintainability of test support in the editor.
- Introduced a new file dialog implementation using nativefiledialog-extended for better file handling on Windows and Linux platforms.
- Updated CMake configuration to link the new file dialog library and include necessary directories.
- Enhanced the editor library to conditionally link a test support library when testing is enabled.
Benefits:
- Improved user experience with native file dialogs for file operations.
- Streamlined testing support in the editor library, enhancing modularity and maintainability.
- Modified the yaze_add_compiler_flags function to set C++ and C standards in the parent scope, ensuring they are applied correctly across the project.
- Added a new compiler flag for MSVC to support C++20/23 features, enhancing compatibility with modern C++ standards.
Benefits:
- Improved consistency in compiler settings across different CMake targets.
- Enhanced support for newer C++ features, facilitating modern development practices.
- Made ABSL_TARGETS available to the rest of the project via include(), improving modularity.
- Added MSVC-specific compile options for yaml-cpp to address exception handling warnings.
Benefits:
- Streamlined integration of Abseil targets across the project.
- Improved compatibility and reduced warnings for yaml-cpp on MSVC.
- Added new entries to .gitignore to exclude generated files and directories, improving project cleanliness.
- Set minimum policy version for subdirectories in CMake to ensure compatibility with older dependencies like yaml-cpp, enhancing build reliability.
Benefits:
- Streamlined project structure by ignoring unnecessary files.
- Improved compatibility and maintainability of the CMake configuration.
- Modified the CMake configuration for yaml-cpp to use version 0.8.0 with an inline patch, ensuring compatibility with CMake 3.31+.
- Implemented a manual population and patching process to adjust the minimum required CMake version in the yaml-cpp CMakeLists.txt, enhancing build reliability.
Benefits:
- Improved compatibility with newer CMake versions.
- Streamlined dependency management for yaml-cpp.
- Updated the CMake configuration to enable Objective-C language support only when building on macOS, improving cross-platform compatibility.
- This change streamlines the project setup by ensuring that unnecessary languages are not included in non-macOS environments.
Benefits:
- Enhanced portability of the build system.
- Reduced complexity in project configuration for non-macOS platforms.
- Removed the `old_cpu.cc` file from the CMake build configuration to streamline the project structure and eliminate unused code.
- This change enhances maintainability by focusing on the current CPU implementation.
Benefits:
- Improved clarity and organization of the build system.
- Reduced potential confusion from legacy code.
- Added a section on the "best effort" release strategy for pre-1.0 versions, emphasizing flexibility and transparency in CI/CD workflows.
- Introduced a command-line flag standardization decision, adopting the Abseil Flags library for consistent argument parsing across all binaries.
- Outlined a migration plan to phase out the legacy flag system, enhancing maintainability and user experience.
Benefits:
- Improved clarity on release processes and platform availability.
- Streamlined command-line argument handling, reducing technical debt and improving user experience.
- Added support for a new `--tui` flag in the CLI to launch a chat-based TUI for ROM interaction.
- Integrated a fallback mechanism for loading ROM files from specified directories.
- Updated the ChatTUI to provide a more informative initial message and added a new option to display ROM info.
- Refined the CI workflow to differentiate between stable and experimental test runs, improving test result organization.
Benefits:
- Improved user experience with the new TUI feature for ROM hacking.
- Enhanced clarity in CI test results, facilitating better debugging and reporting.
- Refactored CMakeLists.txt to streamline project configuration and improve readability.
- Introduced new utility functions in `utils.cmake` for setting compiler flags and managing dependencies.
- Added `dependencies.cmake` to centralize third-party dependency management, enhancing modularity.
- Updated CI workflows to include new build options and improved logging for better feedback during configuration.
- Implemented precompiled headers in various libraries to speed up compilation times.
Benefits:
- Improved maintainability and clarity of the build system.
- Enhanced build performance through precompiled headers.
- Streamlined dependency management for easier integration of third-party libraries.
- Implemented a Command Abstraction Layer to eliminate ~1300 lines of duplicated code across tool commands, enhancing maintainability and consistency.
- Established a unified structure for argument parsing, ROM loading, and output formatting across all commands.
- Added comprehensive documentation, including a Command Abstraction Guide with migration checklists and testing strategies.
- Introduced better testing capabilities for command components, making them AI-friendly and easier to validate.
- Removed legacy command classes and integrated new command handlers for improved functionality.
Benefits:
- Streamlined command handling and improved code quality.
- Enhanced developer experience with clear documentation and testing strategies.
- Maintained backward compatibility with no breaking changes to existing command interfaces.
- Introduced new commands for dungeon editing, including exporting room data, listing objects, and setting room properties.
- Implemented a hex viewer component for inspecting ROM data in a hexadecimal format.
- Updated the tool dispatcher to handle new dungeon commands and integrated them into the CLI.
- Enhanced the main menu and unified layout to include the hex viewer and improved navigation.
- Refactored existing components for better state management and event handling.
Benefits:
- Expanded functionality for dungeon editing and ROM inspection.
- Improved user experience with new tools and streamlined navigation.
- Introduced a new utility function `FindAsset` in `PlatformPaths` to locate asset files across multiple standard directories, enhancing flexibility in asset management.
- Updated various components to utilize `FindAsset` for loading configuration and prompt files, replacing hardcoded search paths with a more robust solution.
- Improved error handling and logging for asset loading failures, ensuring clearer feedback during runtime.
- Refactored existing code in `gemini_ai_service`, `prompt_builder`, and `platform_paths` to leverage the new asset resolution mechanism, promoting code consistency and maintainability.
- Updated CI and release workflows to set the YAZE_BUILD_EMU flag to OFF, preventing the emulator from being built during the CI process.
- This change aims to streamline the build process and focus on core functionalities without the emulator overhead.
- Updated APU timing analysis to reflect implementation completion, addressing core timing issues with the SPC700.
- Added a headless emulator test harness for testing APU functionality without GUI overhead.
- Enhanced cycle accuracy and instruction execution, with known audio glitches noted for future refinement.
- Updated success criteria to reflect completed tasks and ongoing work for unit tests and audio quality improvements.
Benefits:
- Improved APU execution accuracy and synchronization.
- Streamlined testing process for APU functionality.
- Clear documentation of current implementation status and future work.
- Introduced a new cycle lookup table for SPC700 instructions, improving timing precision.
- Refactored instruction execution to be fully atomic, eliminating the bstep mechanism.
- Added detailed comments for clarity on cycle counts and instruction behavior.
- Implemented additional logging for CPU audio initialization to aid debugging.
Benefits:
- Enhanced synchronization between CPU and APU.
- Improved testability and accuracy of instruction timing.
- Streamlined code for better maintainability and understanding.
- Replace floating-point ratio with integer numerator/denominator
- Convert RunCycles() to use new Step() function
- Implement explicit cycle budget loop
- Add detailed comments explaining the conversion
Benefits:
- Perfect precision (no floating-point drift over long sessions)
- Explicit cycle counting for better debugging
- Faster integer arithmetic
- Testable cycle accuracy per instruction
- Add Step() method that executes one complete instruction atomically
- Returns exact cycle count consumed by the instruction
- Handles reset and stopped states explicitly
- Uses cycle lookup table from spc700_cycles.h
- Maintains compatibility with existing RunOpcode() for gradual migration
This implements the LakeSnes-inspired atomic execution model while
adding explicit cycle return for better testability.
- Document what LakeSnes does right (atomic execution, cycle callbacks)
- Identify where LakeSnes falls short (implicit counting, no explicit return)
- Define what we're adopting vs improving
- Clarify hybrid approach: LakeSnes simplicity + explicit validation
- Document current bstep mechanism and its fragility
- Identify root cause of handshake timing failure
- Design atomic instruction execution approach
- Plan fixed-point cycle ratio conversion
- Outline implementation strategy
Relates to #APU-timing-fix
- Reorganized docs with series naming (A-I)
- Added B4-git-workflow.md (pre-1.0 relaxed rules)
- Added E6-emulator-improvements.md (consolidated APU/emulator plans)
- Added I2-future-improvements.md (long-term vision)
- Implemented mock ROM mode for testing without ROM files
- Updated agent_test_suite.sh to use mock ROM by default
- CI/CD ready: no ROM files needed for agent testing
- Added a new feature to the `z3ed` AI agent allowing testing in mock ROM mode, which creates a minimal valid ROM structure with embedded labels but no actual game data.
- Updated the `agent_test_suite.sh` script to default to mock ROM mode for easier testing.
- Introduced `--mock-rom` command line flag to enable mock ROM mode in various agent commands.
- Enhanced documentation to cover the usage and benefits of mock ROM mode for CI/CD and development testing.
- Implemented necessary changes in the codebase to support mock ROM initialization and label management.
- Removed the `HandleEntityDragging` function to streamline entity dragging logic directly within the `OverworldEditor`.
- Implemented centralized drag-and-drop functionality for entities, improving user interaction during editing.
- Updated the `OverworldEntityRenderer` to manage hovered entities more effectively, enhancing the overall editing experience.
- Cleaned up unused code and improved readability across the entity handling components.
- Introduced a new method `set_dirty` in the `Rom` class to manage the dirty state of ROM data.
- Updated `DungeonCanvasViewer` to process texture queues before drawing, improving texture readiness and rendering performance.
- Refactored `ObjectDrawer` to utilize `TileInfo` instead of `Tile16`, enhancing tile data handling and consistency across the codebase.
- Improved the `ObjectParser` to read tile data as `TileInfo`, ensuring accurate parsing and memory management.
- Added performance optimizations in the `Room` class to track changes in properties and reduce unnecessary rendering.
- Enhanced logging for debugging purposes during tile drawing and object rendering processes.
- Enhanced the DrawTileToBitmap function to correctly calculate tile positions within the graphics buffer, addressing potential out-of-bounds issues.
- Added detailed comments to clarify the organization of tile sheets and pixel indexing.
- Optimized the RenderRoomGraphics function by deferring texture processing to batch updates, significantly improving performance when multiple rooms are open.
- Updated method name from SendMessage to SendChatMessage in both the implementation and header files to better reflect its purpose in the network collaboration context.
- Ensured consistency in method signatures across the codebase.
- Streamlined the canvas documentation by consolidating multiple guides into a single comprehensive overview.
- Updated the canvas architecture section to reflect new features and interaction modes, enhancing clarity for users.
- Improved API patterns and integration steps for editors, ensuring consistency across documentation.
- Removed outdated content and added new sections on automation and debugging, aligning with recent code changes.
- Adjusted file paths in the documentation to match the current project structure, ensuring accurate references.