Comments (3)
Curiously I wrote a comment on this very functionality earlier today on the AgonConsole8/agon-vdp repo 😁
I've been thinking about implementing this functionality for a little while now. Recent changes to how bitmaps are handled make this much more practical to implement. A few brief notes...
Generally our VDU commands follow Acorn's lead.
Acorn used VDU 23, 27, 1, n, 0, 0, 0, 0, 0, 0
to define a bitmap (what they called a sprite). We have used this command instead to define a bitmap...
The Acorn version of this command takes the last two graphics cursor positions to define the rectangle of screen to grab.
On the surface, there's a conflict here with the command we have on the Agon. Acorn's command includes the bitmap number, whereas the command we currently have doesn't, and instead that byte is half of our width 16-bit value.
However - we can potentially implement Acorn's version, pretty much exactly as-is.
Our interpreter for VDU 23, 27, 1 could look to see if there's a height of 0
sent - and from that it could trigger "define bitmap from screen" mode.
Some further notes...
The bitmap system was recently update to use the buffers system added in the buffered commands API for storage, which opens up lots of possibilities for bitmap processing. See #97 for more info on the features that adds.
The new buffer-backed bitmap system maps the existing 8-bit bitmap IDs to 16-bit buffer IDs that are in the range of &FA00-FAFF, or 64000-64255.
VDU 23, 27, 32
is already command that selects a bitmap using a full 16-bit ID, allowing more than 255 bitmaps to be used (again, see #97 ). (Yeah - I'd have put a gap between the bitmap and sprite operations too 😁 )
Flipping bitmaps is quite easily done using the buffered commands API. (Flipping is slightly easier, conceptually, when you're using 8-bit bitmaps rather than 32-bit ones, which are now supported. I'm pretty sure I wrote examples in the docs.)
Clearing a single bitmap is now possible - just delete the buffer that it's stored in with the buffered command API.
Your ideas around sending data back to the eZ80 are also on my radar. That would most likely be done by sending data from a buffer. There's details to be worked out for this tho, so that might take a bit longer.
In conclusion - there's no need to define a new command for the "define bitmap from screen" functionality - the command is already there, it just hasn't been implemented yet. 😁
Also at least some of the other things you've mentioned are already there. 😁
from agon-vdp.
needs some enhancements to vdp-gl, but I believe I have something that's working
from agon-vdp.
the "copy screen to bitmap" feature was included in AgonConsole8 agon-vdp 2.2.0 release
PR #153 adds support for this for Quark. NB this requires an updated/revised vdp-gl
from agon-vdp.
Related Issues (20)
- Documentation for new screen modes added in VDP 1.03RC2 HOT 1
- Make vertical timing of 640x240 modes the same as 320x240 modes HOT 1
- VDU to get a keycode HOT 2
- Documentation for virtual keycodes
- [Feature request] a VDU command to change only a byte in a bitmap, and some other stuffs HOT 1
- vdu 25,80,x;y; do wrong triangles HOT 8
- PRINT TAB() should be relative to text viewport. HOT 1
- Help wanted - How to get audio status (audio command 1) ? HOT 5
- VDP crash on real Agon but not on the emulator sending bitmaps data HOT 2
- PLOT 69 does not set the current position. HOT 1
- Key up events rollover HOT 1
- Feature Request: class ProxyWaveformGenerator : public WaveformGenerator HOT 2
- Circle terminal position is incorrect. HOT 3
- [bug] Issue with equal/plus key on French keyboard HOT 2
- When using double-buffered modes, keyboard input is not visible HOT 3
- Feature request: Changing video modes should preserver colour scheme HOT 2
- Feature request: expose the selected FG/BG colours HOT 5
- Agon locks up when POS and/or VPOS is used with VDU 31 HOT 2
- Leave firmware to Steve.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agon-vdp.