GithubHelp home page GithubHelp logo

Comments (5)

avalonbits avatar avalonbits commented on July 22, 2024 1

That looks nice! Very clear API.

from agon-vdp.

stevesims avatar stevesims commented on July 22, 2024

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.

avalonbits avatar avalonbits commented on July 22, 2024

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.

stevesims avatar stevesims commented on July 22, 2024

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.

stevesims avatar stevesims commented on July 22, 2024

PR now raised here too 😁

from agon-vdp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.