dosbox_read_framebuffer
Capture raw framebuffer pixels directly from emulator video memory, bypassing window scaling for accurate quantitative screen analysis.
Instructions
Read the guest's screen straight out of the emulator's video memory: the palette indices the guest wrote, at the instant of the read, with no window, no scaling and no palette round trip. Prefer this over dosbox_capture_screen for anything quantitative -- photographing the window costs the guest real time and can catch a half-drawn frame.
FINDING THE PAGE NEEDS A REFERENCE. Give reference= a 64,000-byte frame of what is on screen and the page is confirmed byte for byte; without one this refuses, because a blind scan finds the most picture-like page in memory and on a real guest that is often a sprite bank or an offscreen buffer. Once confirmed the location is cached and every later read is free. allow_unconfirmed=true takes the guess anyway.
Writes .bin (one byte per pixel) and .png when stem is given. A page-flipping game has more than one page; pass page_offset from the pages list to read the other.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| stem | No | Output path without a suffix; omit to only report. | |
| relocate | No | Search for the page again rather than reusing the cached one. | |
| reference | No | Path to a 64,000-byte frame of what is on screen, to confirm the page. | |
| page_offset | No | Byte offset of the page, from a previous call's pages list. | |
| allow_unconfirmed | No | Accept an unconfirmed blind scan; check the result yourself. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||