add support for copy-screen-to-bitmap #153
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
adds support for Acorn GXR style “copy screen to bitmap” command sequence
this is supported on both
VDU 23,27,1,n,0,0,0
to define bitmapn
from the last two graphics cursor positions, using an 8-bit bitmap ID and alsoVDU 23,27,&21,n;0;
using a 16-bit bitmap/buffer IDthese commands are compatible with the existing
VDU 23,27,1
andVDU 23,27,&21
commands - the system can tell the difference as these variants require a zero “height” valueif the buffer specified already exists then it will be deleted/cleared before the new bitmap is created from the screen. the resultant bitmap data will be in vdp-gl’s
Bitmap::Native
formatthe original Acorn command documentation specifies that a few more zeros should be sent. you can safely send additional zeros, as per Acorn’s documentation, as they will just be ignored.
it should be noted that
VDU 23,27,&21
when pointing to an existing buffer to set it to be a bitmap also usually expects aformat
byte, but this isn’t required/supported/needed for copying screen to bitmap, i.e. this command variant requires one less byte to be sentrequires an updated/custom vdp-gl, and can thus currently only be built using PlatformIO