Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEO direct video memory dump option for screen snapshot #31

Closed
wants to merge 7 commits into from

Conversation

bbbradsmith
Copy link
Contributor

@bbbradsmith bbbradsmith commented Jan 3, 2024

An alternative screenshot option based on a recent mailing list discussion.

Enabled via Config.bNEOScreenSnapShot (no UI added for it).

This creates a NEO file format screenshot, out of the data in FrameBuffer (screen.c). This works for ST low, medium, and high resolutions.

Otherwise with TT or Falcon the FrameBuffer structure is not filled with any screen data, so it instead dumps data from ST RAM at the current video base address.

The palette is taken from the centre line of the FrameBuffer for Low and Medium resolutions. High resolution and TT/Falcon don't seem to store per-line palette, but I instead extracted the GenConvert palette for it.

Some notes about the .NEO format:

  • The original NEOChrome program only works with 320x200 4bpp images, though the format has a few header fields that can support other resolutions.
  • There are 3 known resolution values (0=low, 1=med, 2=high). This dump will use one of those 3 values if the data is 4, 2, or 1bpp. As an extension for resolutions with different bpp, I have simply placed the bpp value here to assist identification.
  • The internal filename starts with "HATARI" and ends with BPP indicator text (e.g. "4BPP"), which can be used to identify the format extension if needed, and as a hint about the BPP.
  • The 16 palette entries in the header will be filled with up to 16 x 9-bit colour values in the standard ST format (or STE 12-bit values). If the machine is not an ST and BPP <= 8, a suffix of 2^bpp x 24-bit RGB palette entries will follow the video data to allow a full recovery of the image's original colour. This suffix will begin with 3 ASCII characters "RGB" for verification. (This suffix is ignored by NEOChrome, so 4bpp 320x200 images will a suffix are still compatible.)
  • The screen width and height fields are used, indicating the screen dimensions without borders.
  • The amount of data that follows the header will match the screen width, height, and bpp.

huth pushed a commit that referenced this pull request Jan 17, 2024
…d Smith)

This needs to be enabled via Config.bNEOScreenSnapShot=TRUE (no UI added for it)

Notes from Brad Smith (#31 for more details) :
This creates a NEO file format screenshot, out of the data in FrameBuffer (screen.c).
This works for ST low, medium, and high resolutions. The palette is taken
from the centre line of the FrameBuffer for Low and Medium resolutions.
For High resolution don't seem to store per-line palette, but I instead extracted
the GenConvert palette for it.
@huth
Copy link
Member

huth commented Jan 21, 2024

Since @npomarede merge the NEO support, I think we can close this pull request here now

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.

2 participants