feat(apu): finalize APU timing implementation and introduce headless emulator test harness

- 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.
This commit is contained in:
scawful
2025-10-10 18:58:17 -04:00
parent 5778a470f7
commit ede4c2ab1f
3 changed files with 318 additions and 23 deletions

View File

@@ -100,14 +100,11 @@ endif()
include(app/net/net_library.cmake)
include(app/zelda3/zelda3_library.cmake)
include(app/editor/editor_library.cmake)
include(app/emu/emu_library.cmake)
if(YAZE_BUILD_TESTS AND NOT YAZE_MINIMAL_BUILD)
include(app/test/test.cmake)
endif()
if(YAZE_BUILD_EMU)
include(app/emu/emu_library.cmake)
endif()
endif()
if (YAZE_BUILD_APP)
@@ -197,16 +194,12 @@ if (YAZE_BUILD_APP)
endif()
if(YAZE_USE_MODULAR_BUILD)
set(_yaze_modular_links yaze_editor)
set(_yaze_modular_links yaze_editor yaze_emulator)
if(TARGET yaze_agent)
list(APPEND _yaze_modular_links yaze_agent)
endif()
if(YAZE_BUILD_EMU AND TARGET yaze_emulator)
list(APPEND _yaze_modular_links yaze_emulator)
endif()
if(YAZE_BUILD_TESTS AND TARGET yaze_test_support)
list(APPEND _yaze_modular_links yaze_test_support)
endif()
@@ -433,6 +426,31 @@ target_link_libraries(yaze_emu PUBLIC
libprotobuf)
endif()
endif()
# Headless Emulator Test Harness (minimal dependencies, fast compile)
if(NOT YAZE_MINIMAL_BUILD)
add_executable(yaze_emu_test emu_test.cc)
target_include_directories(
yaze_emu_test PRIVATE
${CMAKE_SOURCE_DIR}/src/lib/
${CMAKE_SOURCE_DIR}/src/app/
${CMAKE_SOURCE_DIR}/src/
${SDL2_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_BINARY_DIR}
)
target_link_libraries(yaze_emu_test PRIVATE
${ABSL_TARGETS}
${SDL_TARGETS}
${CMAKE_DL_LIBS}
yaze_emulator
yaze_util
)
message(STATUS "✓ yaze_emu_test: Headless emulator test harness configured")
endif()
endif()
if (YAZE_BUILD_Z3ED)
include(cli/z3ed.cmake)