08/22/08: PMODE Graphics by jorge_machin, | Category: OS-9 | 2 comments - (Comments are closed)
I was wondering how OS-9 programmers wrote assembly language games. Did they access 6847 directly to take advantage of high resolution graphics?
2 comments to PMODE Graphics
Different programmers have their own techniques and styles, meaning every possible way of using Coco graphics undoubtedly has been used. However, I don’t think that’s the question you really meant to ask.
OS-9 is not not restricted to PMODE graphics. When running on a Coco3 OS-9 also gives access to HSCREEN graphics. That set of graphics was generated by the GIME chip not a combination of the MC6883 (SAM) and MC6847 (Video Display Generator aka VDG).
NitrOS-9 gives access to both VDG and high resolution graphics on a Coco3 using three different approaches of which the least desirable one is direct ml access to the GIME. There are built-in graphic commands in Basic-09, OS-9 system level commands via Display or Wcreate, and OS-9 system calls via OS9 I$GetStt and I$SetStt (get and set status). Given your question, I’d suggest you try writing to standard output the code sequences used with Display. These are given in the Windows chapter of the OS-9 Level II owner’s manual.
Your answer was very enlightening to me. Thanks.
As a next step, I was reading the source code of the GFX subroutine module to learn more and I saw how it parses the parameters of the graphics functions (line, circle, move mode, etc).
I think I can write now an assembly language program using the GFX subroutine module, but I will continue programming in Basic09 because it is easier. I did this research because I wanted to know how OS-9 works.
But I’m quite surprised because I was expecting to see graphics algorithms and system calls using I$setstt in the GFX subroutine module, but the code seems to do only system calls using I$write to the standard output (except for the joystick and GColor functions). Maybe I’m wrong or looking at the wrong code.
At my current OS-9 assembly language level is hard to me to say what the subroutine is writting to the standard output and why but I assume it is just a system call to do the work.