add support for copy-screen-to-bitmap#153
Open
stevesims wants to merge 2 commits intobreakintoprogram:mainfrom
Open
add support for copy-screen-to-bitmap#153stevesims wants to merge 2 commits intobreakintoprogram:mainfrom
stevesims wants to merge 2 commits intobreakintoprogram:mainfrom
Conversation
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 bitmap `n` from the last two graphics cursor positions, using an 8-bit bitmap ID and also `VDU 23,27,&21,n;0;` using a 16-bit bitmap/buffer ID these commands are compatible with the existing `VDU 23,27,1` and `VDU 23,27,&21` commands - the system can tell the difference as these variants require a zero “height” value if 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` format the 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 a `format` byte, but this isn’t required/supported/needed for copying screen to bitmap, i.e. this command variant requires one less byte to be sent requires an updated/custom vdp-gl
fixes issue with capturing bitmap to buffer zero (the `createBuffer` call was preventing creation of buffer with ID 0, as it can’t be used as a place to redirect output)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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,0to define bitmapnfrom 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,1andVDU 23,27,&21commands - 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::Nativeformatthe 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,&21when pointing to an existing buffer to set it to be a bitmap also usually expects aformatbyte, 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