← Back to context

Comment by weinzierl

1 day ago

At the end of the day it's always pixels - alway has been [1] - and the efficiency of storing and blitting a small number of fixed size rectangles is hard to beat if you can get away with it.

[1] Except for the early oscilloscope style vector displays maybe.

No, this is technically not fully correct. Early text based display output systems were relying on special character generator hardware to generate the display signals producing the text on screen. Those systems did not have any means of generating arbitrary pixel patterns.

  • Do you have an example? All the 8-bitters I know drew the characters from memory, which was a character ROM per default but could be changed either with a screw driver or by bank switching some RAM in-place.

    EDIT: If you mean they were not copied in a frame buffer first, you are right. I should not have written 'blitting'.

    • IBM PC / AT / PS/2 all had a separate text mode, with glyphs defined in character ROM or RAM. Read about CGA, EGA, VGA. So TUIs basically owned the place since mid-1980s when PCs became ubiquitous, until mid-1990s when Windows started to dominate.

    • > which was a character ROM per default but could be changed either with a screw driver or by

      No. Stop believing everything ChatGPT told you on this topic and DYOR. That's some bad hallucinations.

      1 reply →

    • The character ROM was not read and processed by the CPU. The CPU set some bytes in video RAM, which served as indexes into the character ROM by the video output hardware.

      I believe on some systems there were some tricks that allowed some bitmap display by redefining glyphs. One example off the top of my head is The 8-Bit Guy's Planet X2, which can use text mode but with glyphs redefined to use for icons, units, terrain, UI, etc.

      1 reply →

    • kaypro & trs-80, just a couple I happen to know myself. There is no way I just happen to know about the only 2.

Character-based hardware only stores the characters and the grid instead of the full bitmap for the frame, which is very efficient memory-wise. Tile-based hardware (e.g. most console graphics chips in the 8/16 bit era) also had scrolling and layers, and was extremely memory-efficient as well. With bitmap displays you already store full frames.

  • Sure. Maybe I should not have written 'blitting' when the rectangles are not copied from one memory location to another but end up directly on the screen.

    My original point that putting a fixed number of small and fixed rectangles on a screen is more efficient than line drawing still stands though.

    • It's still wrong, though.

      Without dedicated sprite hardware it's not more efficient to read a byte from one place and write a byte to another than to write background bytes and write line colour bytes. DMA controllers on µCs won't save you: a character is usually something like 8x8 or 8x16 and displays are rarely more than 8 bit, so we're talking about DMA transfers of just 8 bytes each, and the overhead of setting them up more than offsets any efficiencies gained.

      An 8x12 cell, for example, is 96 pixels to be transferred in 12 rows of 8 pixels. That's 96 reads, 96 writes, and (assuming an unrolled inner loop) 12 branches, to copy as a sprite. Or, it's 96 writes and 12 branches to clear, and (horizontal line) another 8 writes to draw, no branches.

      When your graphics become too complex for simple drawing routines to handle them, they're probably also too complex for simple character ROMs, too.

      2 replies →