Jerome Grimbert writes: > If you can wait a little, I should write a new trap soon (as I said, the <> > I really believe that the various GD2 modes should not be a burden for an > application programmer, but an opportunity to choose the best suitable > format for the data. Therefore, the usage of GD2 drivers should not add > any code (such as which mode is running) into the application. > You may want to use the extra functionalities of GD2 if present, but that > might impact compatibility.
I think this is an excellent principle - if it can be solved in a technically satisfactory way. Does anyone else have any thoughts on how this might impact? > To get back on the exact question, I do not know. May be there is some > calls which give that information ? (or which do not return an error in > such cases ?) I suppose the only "legal" way at present is to query the DISP_xxx Thing. >From SBasic: IF DISP_TYPE >= 32: PRINT "HI COLOR MODE" However, from assembler its really quite an unnecessary fiddle to do. There really wants to be a system variable or a simple call for this, one that would be easy to implement as a "dummy" toolkit for older systems. <> > Do you have any hardware which use mode(2,0) ? > I only know of QXL/QPC: mode(2,32) and Q40/Q60: mode(2,33) > And if you leave the conversion to the system, I really believe that you do not > need to know the current mode at the application level: > Especially, Imagine that your application has detected a mode and has performed some adaptation to it. And somehow, outside of your application, the user changed the mode after your adaptation, how are you going to react and prevent that ? > Are you going to regularly check the current mode and readapt on the fly ? > It is really simpler to have the system do that for your application, which > means in first place that your application should not be aware of the current mode. Your application should make provision for both original QL and GD2 driver and leave the data structures upto the system to choose the best appearance. > (so it can run on a classical QL too, if meaningfull [for instance, the sprite editor is not currently able to run on such mode]). Even so, it will sometimes be necessary to check for the presence of GD2 initially: rem Init if GD2 then blue = $70: ....: else blue = 0: .... .... rem Main ink#ch;blue .... This cant be done automatically without retro-engineering Qdos. Per