Comments (5)
That looks nice! Very clear API.
from agon-vdp.
NB there are two different sets of FG and BG colours to consider here as text and graphics colours are tracked separately. that's potentially 4 different colours to send across.
if we were to piggy-back this information along with the mode info then the current VDP protocol buffer on the eZ80 side would need to be expanded beyond its current 16 byte size. there's also the question of what format should be used for sending the colours - VDU 23,0,&84,x;y;
sends four bytes (red, green, blue and palette index), so should we copy that or just send the palette index value?
if the mode information packet is expanded to include this data then a new version of MOS would be needed that would understand this new data packet format, and expose that data to users
another consideration if this data is sent along as part of the mode information is keeping such information "current" on MOS. this would likely mean that all changes to currently selected graphics or text colour would send back full screen mode information. we could just not do that, but that might not match user expectations.
an alternative approach would be to add a new command to individually read colour values. that could potentially use the same response packet format as VDU 23,0,&84,x;y;
(read screen pixel) and thus allow the same OS "scrpixel" info bytes to be used. this would automatically be supported by the current MOS with no changes necessary.
there is an argument that this kind of functionality shouldn't be necessary. we're a mono-tasking system so any program running should be completely in control of the currently selected colours, so it could/should be able to just keep track of whichever colours are active in its own internal state....
having said that, one could imagine for instance having an interrupt-driven clock program resident that periodically draws a clock in the corner of the screen. it would need to change the colours to do so to ensure a consistent display. a "good citizen" version of such a program would change the colours back after it has done its drawing so as to not affect the main application. to do so it would need to be able to read the currently selected colours. this would similarly be useful for a future multi-tasking OS layer
from agon-vdp.
I like the idea of a separate command, is this is typically not required info. AED needs it so it can correctly display the cursor without blinking and on exit it can restore what was the color scheme being used if it were changed in the editor i.e being a "good citizen".
from agon-vdp.
I've just come up with an implementation of this in AgonConsole8/agon-vdp#112
@avalonbits if you could take a look at that, assuming you think it's good I'll raise an equivalent PR here too
from agon-vdp.
PR now raised here too 😁
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
- Feature Request: the ability to copy from screen/buffer to current bitmap HOT 3
- 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
- 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.