Skip to content

experiment: isolate first-photo DMA fallback in Pokopia - #20

Closed
Framerr wants to merge 1 commit into
nx2from
experiment/pokopia-first-photo-dma-fallback
Closed

Framerr wants to merge 1 commit into
nx2from
experiment/pokopia-first-photo-dma-fallback

Conversation

@Framerr

@Framerr Framerr commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Goal

Diagnose the reproducible first-capture bug in #14 without undoing the approved DMA flush fix.

Reporter observed 3/3 first photos corrupt across independent restarts, with one second photo corrupt and all third photos correct. A separate rapid-photo test reported one vertically wrapped image.

Experimental change

  • In MaxwellDMA::CopyBlockLinearToPitch, match the expected 1920×1080 RGBA8 image-to-buffer transfer (7680-byte pitch and row length, 1080 rows, supported block-linear source layout).
  • For the first two matching copies per emulator process only, bypass AccessAccelerateDMA().ImageToBuffer() and use the existing CPU unswizzle/readback fallback.
  • Every other transfer uses the original acceleration + approved flush path unchanged.
  • Log the first twelve matching copies (source/destination, geometry, index, fallback) to confirm that the probe actually reaches the photo path.
  • Control: FRAMEROPIA_FIRST_PHOTO_DMA_CPU=0 disables the test and restores normal behavior.

Caveats

This is an A/B diagnostic hypothesis, not a proven fix. The exact shape match may fail if Pokopia uses another pitch/copy geometry; inspect logs before interpreting a negative test. CPU fallback may introduce a temporary slowdown for the initial photographs. No generalized buffer-cache change and no old PR #16 patch.

Validation

  • Windows CI build succeeds, artifact-only, no release
  • Log reports Pokopia photo-shaped DMA copy ... fallback=true for first photo
  • Across 5 fresh emulator starts, record outcomes of first three photos per start
  • Repeat with FRAMEROPIA_FIRST_PHOTO_DMA_CPU=0 as control
  • Check vertical wrap, geometry stability and FPS

Do not merge without reporter confirmation. Baseline nx2 remains unaffected.

Framerr commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

Reporter test: severe photo regression — reject this experiment (2026-11-08)

The reporter tested the first-photo CPU DMA fallback experiment and reports all saved Pokopia photographs are corrupt. This is much worse than the previous accepted DMA flush behavior (initially 48/50 good, though first-capture corruption remains reproducible).

Result: FAIL. Bypassing accelerated ImageToBuffer for the first photo-shaped transfers does not fix first-capture corruption in the tested setup, and is associated with severe regression. Do not merge. No root cause has been established. Restore the accepted nx2 baseline (PR #17) for further tests. Keep branch for reference. No new release.

@Framerr Framerr closed this Nov 8, 2026
Framerr added a commit that referenced this pull request Nov 8, 2026
Ship the validated Pokopia DMA readback fix, new transparent Frameropia F logo for README and Windows app icon, redesigned README and honest v0.0.3 release notes. Exclude rejected experiments (#16, #18, #19, #20). Preserve existing user data and executable names.
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.

1 participant