Skip to content

emulator stores frames and raw data like a real Archon - #56

Merged
astronomerdave merged 4 commits into
mainfrom
DH/emulator-sample-depth
Oct 16, 2026
Merged

astronomerdave merged 4 commits into
mainfrom
DH/emulator-sample-depth

Conversation

@astronomerdave

Copy link
Copy Markdown
Contributor

bug fix 1

camerad's fetch() incorrectly limits max buffer address

bug fix 2

The emulator ignored the RAW* keys and reported BUFnRAWOFFSET=0, so a raw read fetched the image from the buffer base, and every frame was 16-bit whatever SAMPLEMODE said. A real Archon stores the frame at the SAMPLEMODE depth and, with RAWENABLE=1, captures 16-bit raw samples of one channel during the same readout, into the same frame buffer, fetched at BUFnBASE + BUFnRAWOFFSET.

Separately, READOUT_TIME now applies to the LINECOUNT loaded at APPLYALL, so a mode with fewer lines reads out faster, and each FETCH block leaves the send queue before the next is written, so a host waiting for whole blocks doesn't stall.

(This was a result of recent KPF-related work, so all of this has already been tested)

David Hale added 3 commits October 16, 2026 10:18
the ceiling added a block count to a byte address, refusing any fetch
more than 477 KiB into a buffer, which would include every raw read
from a real Archon
frames are 16 or 32 bits per SAMPLEMODE, reported in BUFnSAMPLE

with RAWENABLE=1 raw samples are stored after the image at the next
whole block, reported in BUFnRAWBLOCKS, BUFnRAWLINES and BUFnRAWOFFSET

FETCH is served from any address inside a buffer
READOUT_TIME applies to the LINECOUNT loaded at APPLYALL

each FETCH block leaves the send queue before the next is written

@mikelangmayr mikelangmayr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

(also centered RAW output on 32768 to better match the adc output)
@astronomerdave
astronomerdave merged commit 5950ece into main Oct 16, 2026
5 checks passed
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.

3 participants