- 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.
- Modified the CI workflow to ensure the test script has the correct path for execution.
- Added a new script for testing dungeon room loading, which checks for torches, blocks, pits, and doors, and analyzes the log for errors.
- Enhanced the script with detailed output for successful loading and error detection, improving testing capabilities for dungeon features.
- Moved canvas utility functions into a dedicated `canvas_utils` module for better structure and maintainability.
- Introduced a new `BppFormatUI` class for managing BPP format selection and conversion, enhancing the user interface for format management.
- Updated CMake configuration to include new source and header files for the canvas utilities and BPP format UI.
- Adjusted file paths in the project structure to reflect the new organization, ensuring proper integration across components.
- Changed the enum values in GetTestStatusResponse from STATUS_* to TEST_STATUS_* for consistency and clarity.
- Updated corresponding references in imgui_test_harness_service.cc and gui_automation_client.cc to reflect the new enum naming.
- Added /EHsc compiler option in CMakeLists.txt for MSVC to enable C++ exception handling.
- Added a new "Layout Override" section in the DungeonCanvasViewer, allowing users to enable or disable layout overrides for dungeon rooms.
- Implemented a checkbox to toggle the override and a slider to select the layout ID when enabled.
- Removed the previously disabled room layout drawing code to streamline the rendering process.
- Updated the layout management to ensure proper handling of layout IDs and visibility settings.
- Enhanced the overall user interface for better control over dungeon layout visualization.
- Refactored file paths for performance-related headers to reflect the new directory structure under `app/gfx/performance/`.
- Updated references in the `Canvas` class to align with the new paths, ensuring proper integration of performance monitoring components.
- Cleaned up unnecessary prefixes in performance integration checks to enhance code readability and maintainability.
- Refactored header includes for Performance Profiler and Dashboard to reflect new directory structure under `app/gfx/performance/`.
- Introduced a new `EmulatorTestSuite` class to validate core emulator components, including APU, SPC700, and debugging features.
- Enhanced test suite with detailed test cases for APU handshake, SPC700 cycle accuracy, breakpoint management, and audio backend functionality.
- Removed outdated `test_dungeon_objects.cc` file from the test suite to streamline testing focus.
- Updated file paths for performance-related headers to reflect new directory structure under `app/gfx/performance/`.
- Introduced new `PerformanceDashboard` and `PerformanceProfiler` classes for comprehensive performance monitoring and reporting.
- Enhanced performance metrics collection and visualization capabilities, including real-time updates and detailed reports.
- Improved memory usage tracking and optimization status analysis within the graphics system.
- Ensured compatibility with existing components by updating include directives across multiple files.
- Introduced a static array of pointers for the 8 predefined room layouts, enhancing the structure and accessibility of room layout data.
- Included the necessary header for std::array to support the new data structure.
- Added preprocessor directives to push and pop the DWORD and ERROR macros in widget_discovery_service.h, rom_service_impl.h, and gui_automation_client.h.
- This change ensures compatibility with protobuf generated code in a Windows environment, preventing potential compilation issues.
- Added multiple downwards drawing routines for various object types, enhancing the rendering capabilities of the ObjectDrawer.
- Implemented methods for drawing 2x2 and 4x2 tiles with specific patterns and sizes, including edge cases for certain object IDs.
- Updated the initialization logic to map new object IDs to their respective drawing routines, ensuring comprehensive coverage for downwards rendering.
- Introduced debug logging for object drawing to facilitate troubleshooting and performance monitoring.
- Added a preprocessor directive to undefine the DWORD macro in CMake configuration for both CI and release workflows, ensuring compatibility with protobuf generated code.
- This change addresses potential compilation issues when using gRPC and protobuf in a Windows environment.
- Updated DungeonCanvasViewer to disable room layout drawing to reduce visual clutter, enhancing clarity during object placement.
- Enhanced BackgroundBuffer to skip empty and floor tiles, preventing overwriting of drawn elements and improving rendering efficiency.
- Refined Bitmap palette application to ensure correct transparency handling and marked bitmaps as modified for texture updates.
- Streamlined ObjectDrawer by removing unnecessary debug logs and simplifying object drawing logic, improving performance and readability.
- Adjusted Room rendering methods to utilize palette indirection for accurate color application, ensuring consistent visual output across rooms.
- Added a sub-menu for toggling visibility of object outlines based on type and layer, allowing for more granular control over displayed objects in the dungeon canvas.
- Implemented checkboxes for filtering object outlines by type (Type 1, Type 2, Type 3) and layer (Layer 0, Layer 1, Layer 2) in the debug menu.
- Updated the drawing logic to respect the new filtering options, ensuring only the selected objects are rendered on the canvas.
- Improved the visibility of object ID labels by making them smaller and less obtrusive, enhancing the overall clarity of the canvas display.
- Added detailed comments to clarify the canvas coordinate system and scaling model for dungeon rendering.
- Implemented persistent debug overlays for room and texture information, allowing real-time visibility of room properties and texture states.
- Introduced a context menu with options for debugging, including toggling visibility of room info, texture info, and object bounds.
- Updated canvas drawing methods to ensure correct handling of unsized dimensions and scaling, improving rendering accuracy.
- Refactored coordinate conversion functions to return unsized pixel coordinates, preventing double-scaling issues.
- Refactored DungeonCanvasViewer to utilize LoadLayoutTilesToBuffer for rendering layout tiles, improving the separation of concerns in the rendering process.
- Updated ObjectDrawer to draw using 8x8 tiles instead of 16x16, enhancing tile rendering accuracy and efficiency.
- Modified Room and RoomLayoutObject classes to support room-specific graphics buffers, ensuring correct tile usage during rendering.
- Removed legacy methods and classes related to tile handling, streamlining the codebase and improving maintainability.
- Added preprocessor directives to undefine the DWORD and ERROR macros on Windows, ensuring compatibility with protobuf generated code in imgui_test_harness_service.h and gui_automation_client.h.
- This change prevents potential compilation issues when using gRPC and protobuf in a Windows environment.
- Introduced a new command-line flag for specifying log categories, allowing users to filter logs based on selected categories.
- Implemented parsing of the comma-separated log categories string in the main application.
- Enhanced the LogManager to support category-specific logging and added console output to indicate which categories are enabled for debugging.
- Deleted the room_diagnostic.cc and room_visual_diagnostic.cc files, along with their corresponding header files, to clean up the codebase.
- Updated zelda3_library.cmake to remove references to the deleted diagnostic files, streamlining the build process.
- Removed the inclusion of room_diagnostic.h in room.cc as it is no longer needed.
- Introduced advanced room properties UI in the Dungeon Editor, allowing users to set effects and tags for rooms through dropdown menus.
- Updated the rendering logic to visualize room layouts, including walls, floors, pits, water, and doors, with appropriate color coding for clarity.
- Improved texture management by processing texture updates immediately to ensure objects appear correctly in the editor.
- Organized ROM address constants into a new header file for better maintainability and clarity in the codebase.
- Refactored existing code to utilize the new constants, ensuring a cleaner and more consistent naming convention.
- Introduced a new Debug Controls card in the Dungeon Editor V2, allowing runtime control over debug logging and log levels.
- Implemented UI elements for enabling/disabling debug logs, selecting log levels, and managing room rendering and texture processing.
- Updated the DungeonEditorV2 class to include visibility management for the Debug Controls card and integrated it into the control panel.
- Enhanced logging functionality in the LogManager to support runtime adjustments for debug logging.