Shop OBEX P1 Docs P2 Docs Learn Events
"Applied Concepts in Microcomputer Graphics" by Bruce A. Artwick — Parallax Forums

"Applied Concepts in Microcomputer Graphics" by Bruce A. Artwick

I happened across this book in a local bookstore (yes, they do still exist) for $5 so I bought it.
I see that it is available on amazon on about $5 too.
If you are interested in graphics it is well worth your "lunch money".
http://www.amazon.com/gp/offer-listing/0130393223

Anyway in the book he talks about a "hardware screen erase" where a flag is set by the main program which makes the video driver erase the video memory as it is displaying it (I assume it displays and THEN erases). I guess a flag is set at the end of the screen update to signal to the main program that the screen erase has been complete.

I have never heard of this before and I was wondering if anyone has seen any Propeller video drivers that do this ? It sounds like it would be pretty easy to implement. It could be expanded to fill video memory with any particular value.

Bean

Comments

  • evanhevanh Posts: 15,918
    1984, RAM bandwidth was precious back then, ... I'll take a stab and say that means it'll use what is normally the DMA display read channel but, instead of reading the RAM to display the picture, it'll write the RAM with zeros as it also displays a blank picture. On the next refresh it'll go back to reading the RAM which is now all zeros.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-12-23 05:25
    Yes, that makes sense. Sadly, that didn't make it into any 8 bitters I can remember. Most of them were eating a lot of CPU cycles just doing display anyway.

    On some machines, like an Apple, or Coco having reads be transparent to the CPU, one could clear while drawing, but that was about as expensive as xor type tricks were. Same goes for just clearing known screen regions, or partial buffering.

    The latter is done by dividing the screen into regions. Draw only that region, then clear it, draw next, etc... on machines that allow for paging vram in sections, you can trade image integrity for the perception of a higher frame rate.

    Or, on faster things like the Prop, you can divide into strips horizontally, clear and draw in less than a frame. Work your way across and the user sees a high rate, but with image tearing at times. I called this ripple draw. Useful when the whole screen can't be drawn in less than a frame and there is only room for small buffers, or no buffers. I have an example using graphics demo here somewhere.

    On the Prop, I've done it (clear while drawing), but it didn't make a lot of sense. Just use a COG and blast the RAM clear at the right time. This can overlap drawing on a bitmap, and comes for free as part of sprites and tiles as those use line buffers anyway.

    Timing HUB writes makes for specific size draw loops. Adding an extra HUB op rarely makes sense when another COG gets it for free anyway.

  • Great book, BTW. Classic. I used to own a copy and learned a ton from it.
  • Modern video cards do block-based compression like this for z-buffers. A tile has a "Max Z" value set, so clearing a tile just sets a bit, and the max Z value for the whole tile. If a poly crosses the tile and fails the test, it's very fast. If a poly cuts the tile, only then are all the values per-pixel updated.
Sign In or Register to comment.