Skip to main content

John Carmack almost certainly was the first to use the hardware scrolling capabilities of the EGA specifically, together with efficient tile and sprite drawing and erasing algorithms to create a slick, full-screen scrolling 16-colour console-like game engine on the IBM PC. "Adaptive Tile Refresh" was one part of this. He did so through experimentation, reading documentation and learning about the EGA and drawing/masking/rotating techniques through Michael Abrash's articles online, in Dr. Dobbs Journal and in the book Power Graphics Programming.

(And note that Mega Man (1990) for DOS came out very close (I believe 4 colourcolor CGA), and other earlier DOS games like License to Kill (1989) and Spy Hunter (1984) had scrolling as well - this wasn't in all directions and probably a full-screen redraw. I've also found a Quora post attributed to the developer of the DOS port of Golden Axe that says that game predates Keen.)

No, Carmack wasn't the first person ever to implement a system where tiles upon a moving background are redrawn row-by-row, or to devise algorithms for efficiently erasing and drawing blocks of tiles or sprites based on their motion (or lack of).

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimisationoptimization available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls. Looking at Chocolate Keen (reverse engineered from a disassembly of Keen 1-3) sprite handling also falls under ATR - when a sprite is drawn, it invalidates all tiles it overlaps on the tilemap on that display page, which are then redrawn on the next tilemap redraw (that is, refresh) pass.

The ZX Spectrum has no hardware scrolling or sprites, only a 1-bit unscrollable display, chunked up in to 8x8 regions colouredcolored by 'attribute' values. Less-experienced ZX Spectrum programmers writing arcade ports such as Space Invaders-clones would clear the entire screen and draw the sprites, but more-experienced programmers would erase and redraw any moving elements or even redraw only their edges, or use XOR to draw-undraw elements if the resulting visual garbage when sprites overlapped other sprites or the background was acceptable. (XOR was known - mentioned in this 1976/8 patent, ZX Spectrum BASIC's drawing primitives expose XOR drawing mode as the statement OVER n.)

John Carmack almost certainly the first to use the hardware scrolling capabilities of the EGA specifically, together with efficient tile and sprite drawing and erasing algorithms to create a slick, full-screen scrolling 16-colour console-like game engine on the IBM PC. "Adaptive Tile Refresh" was one part of this. He did so through experimentation, reading documentation and learning about the EGA and drawing/masking/rotating techniques through Michael Abrash's articles online, in Dr. Dobbs Journal and in the book Power Graphics Programming.

(And note that Mega Man (1990) for DOS came out very close (I believe 4 colour CGA), and other earlier DOS games like License to Kill (1989) and Spy Hunter (1984) had scrolling as well - this wasn't in all directions and probably a full-screen redraw. I've also found a Quora post attributed to the developer of the DOS port of Golden Axe that says that game predates Keen.)

No, Carmack wasn't the first person ever to implement a system where tiles upon a moving background are redrawn row-by-row, or to devise algorithms efficiently erasing and drawing blocks of tiles or sprites based on their motion (or lack of).

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimisation available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls. Looking at Chocolate Keen (reverse engineered from a disassembly of Keen 1-3) sprite handling also falls under ATR - when a sprite is drawn, it invalidates all tiles it overlaps on the tilemap on that display page, which are then redrawn on the next tilemap redraw (that is, refresh) pass.

The ZX Spectrum has no hardware scrolling or sprites, only a 1-bit unscrollable display, chunked up in to 8x8 regions coloured by 'attribute' values. Less-experienced ZX Spectrum programmers writing arcade ports such as Space Invaders-clones would clear the entire screen and draw the sprites, but more-experienced programmers would erase and redraw any moving elements or even redraw only their edges, or use XOR to draw-undraw elements if the resulting visual garbage when sprites overlapped other sprites or the background was acceptable. (XOR was known - mentioned in this 1976/8 patent, ZX Spectrum BASIC's drawing primitives expose XOR drawing mode as the statement OVER n.)

John Carmack almost certainly was the first to use the hardware scrolling capabilities of the EGA specifically, together with efficient tile and sprite drawing and erasing algorithms to create a slick, full-screen scrolling 16-colour console-like game engine on the IBM PC. "Adaptive Tile Refresh" was one part of this. He did so through experimentation, reading documentation and learning about the EGA and drawing/masking/rotating techniques through Michael Abrash's articles online, in Dr. Dobbs Journal and in the book Power Graphics Programming.

(And note that Mega Man (1990) for DOS came out very close (I believe 4 color CGA), and other earlier DOS games like License to Kill (1989) and Spy Hunter (1984) had scrolling as well - this wasn't in all directions and probably a full-screen redraw. I've also found a Quora post attributed to the developer of the DOS port of Golden Axe that says that game predates Keen.)

No, Carmack wasn't the first person ever to implement a system where tiles upon a moving background are redrawn row-by-row, or to devise algorithms for efficiently erasing and drawing blocks of tiles or sprites based on their motion (or lack of).

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimization available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls. Looking at Chocolate Keen (reverse engineered from a disassembly of Keen 1-3) sprite handling also falls under ATR - when a sprite is drawn, it invalidates all tiles it overlaps on the tilemap on that display page, which are then redrawn on the next tilemap redraw (that is, refresh) pass.

The ZX Spectrum has no hardware scrolling or sprites, only a 1-bit unscrollable display, chunked up in to 8x8 regions colored by 'attribute' values. Less-experienced ZX Spectrum programmers writing arcade ports such as Space Invaders-clones would clear the entire screen and draw the sprites, but more-experienced programmers would erase and redraw any moving elements or even redraw only their edges, or use XOR to draw-undraw elements if the resulting visual garbage when sprites overlapped other sprites or the background was acceptable. (XOR was known - mentioned in this 1976/8 patent, ZX Spectrum BASIC's drawing primitives expose XOR drawing mode as the statement OVER n.)

deleted 63 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimisation available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls.

Other interesting parts Looking at Chocolate Keen (reverse engineered from a disassembly of Keen like1-3) sprite handling also falls under ATR (maybe a form of dirty rectangles with a tile-based granularity: If when a baddie stays in the same place and doesn't change to their next animation frame, leave him alone. If he movessprite is drawn, erase him by stamping the backgroundit invalidates all tiles he obscuredit overlaps on topthe tilemap on that display page, which are then draw him fully again.) aren't what's referred to byredrawn on the termnext tilemap redraw (that is, refresh) pass.

Carmack's innovation was to devise 2868086 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable and fast across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

EGA programming is obtuse: bitplane selection, barrel shifting - lots of fields that can be set to ensure bitplaned graphics land in the correct 'slot' within a byte, etc. Descriptions of adaptive tile refresh also note that the drawing buffer is wider than the displayed region to allow for an off-screen region to scroll into (similar to the Sega example I mentioned), this means Carmack would have to also set the register containing the address increment per scanline (also known as the 'stride') to a non-standard value, and so on.

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimisation available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls.

Other interesting parts of Keen like sprite handling (maybe a form of dirty rectangles with a tile-based granularity: If a baddie stays in the same place and doesn't change to their next animation frame, leave him alone. If he moves, erase him by stamping the background tiles he obscured on top, then draw him fully again.) aren't what's referred to by the term.

Carmack's innovation was to devise 286 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable and fast across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

EGA programming is obtuse: bitplane selection, barrel shifting - lots of fields that can be set to ensure bitplaned graphics land in the correct 'slot' within a byte, etc. Descriptions of adaptive tile refresh also note that the drawing buffer is wider than the displayed region to allow for an off-screen region to scroll into (similar to the Sega example I mentioned), this means Carmack would have to also set the register containing the address increment per scanline (also known as the 'stride') to a non-standard value.

I've opened another question to discuss what parts of the Keen engine 'Adaptive tile refresh' refers to - I believe it's an optimisation available when using hardware scrolling on a software-drawn tilemap to reduce the frequency and number of tiles that need to be redrawn as the screen scrolls. Looking at Chocolate Keen (reverse engineered from a disassembly of Keen 1-3) sprite handling also falls under ATR - when a sprite is drawn, it invalidates all tiles it overlaps on the tilemap on that display page, which are then redrawn on the next tilemap redraw (that is, refresh) pass.

Carmack's innovation was to devise 8086 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable and fast across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

EGA programming is obtuse: bitplane selection, barrel shifting - lots of fields that can be set to ensure bitplaned graphics land in the correct 'slot' within a byte, etc. Descriptions of adaptive tile refresh also note that the drawing buffer is wider than the displayed region to allow for an off-screen region to scroll into (similar to the Sega example I mentioned), this means Carmack would have to also set the register containing the address increment per scanline (also known as the 'stride') to a non-standard value, and so on.

added 392 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80

In short, people were familiar with similar tile and sprite drawing techniques or able to come up with their own algorithms suited to the target platform all through the 80s.

You say the PC had 'no specialized graphics controllers' but in fact it's the EGA card's PEL Panning register that made Keen's fine scrolling possible. The CGA has a configurable start address value which allows page flipping, vertical motion and coarse horizontal motion, but the EGA has an additional fine-panning register allowing motion within a memory byte/word - together these allow panning to any single pixel in the video RAM. The same registers are used in VGA Mode X (and a similar mechanism is used for scrolling on Amiga chipsets).

Carmack's innovation was to devise 286 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable and fast across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

no, I didn't. Hard for people today to appreciate how scarce info was back then; Foley&Van DamnDamn[sic] was no help for low level hacks

(Foley & Van Dam refers to the textbook 'Fundamentals of Interactive Computer Graphics', 1982 )

So although tile refresh strategies for scrolling games on other systems existed previously, Carmack believes he came up with the complete strategy used in Keen in isolationCarmack believes he came up with the complete strategy used in Keen in isolation.

You say the PC had 'no specialized graphics controllers' but in fact it's the EGA card's PEL Panning register that made Keen's fine scrolling possible. The CGA has a configurable start address value which allows page flipping, vertical motion and coarse horizontal motion, but the EGA has an additional fine-panning register allowing motion within a memory byte/word - together these allow panning to any single pixel in the video RAM. The same registers are used in VGA Mode X (and a similar mechanism is used for scrolling on Amiga chipsets).

Carmack's innovation was to devise 286 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

no, I didn't. Hard for people today to appreciate how scarce info was back then; Foley&Van Damn was no help for low level hacks

So although tile refresh strategies for scrolling games on other systems existed previously, Carmack believes he came up with the complete strategy used in Keen in isolation.

In short, people were familiar with similar tile and sprite drawing techniques or able to come up with their own algorithms suited to the target platform all through the 80s.

You say the PC had 'no specialized graphics controllers' but in fact it's the EGA card's PEL Panning register that made Keen's fine scrolling possible. The CGA has a configurable start address value which allows page flipping, vertical motion and coarse horizontal motion, but the EGA has an additional fine-panning register allowing motion within a memory byte/word - together these allow panning to any single pixel in the video RAM. The same registers are used in VGA Mode X (and a similar mechanism is used for scrolling on Amiga chipsets).

Carmack's innovation was to devise 286 real mode algorithms like the ones in use on other systems for tiles and sprites, and having the engine be stable and fast across multiple competing first- and third-party EGA card implementations and monitors*. To get a full engine in place would need lots of experimentation and iteration. Adaptive Tile Refresh would be one useful part of this.

no, I didn't. Hard for people today to appreciate how scarce info was back then; Foley&Van Damn[sic] was no help for low level hacks

(Foley & Van Dam refers to the textbook 'Fundamentals of Interactive Computer Graphics', 1982 )

So although tile refresh strategies for scrolling games on other systems existed previously, Carmack believes he came up with the complete strategy used in Keen in isolation.

added 46 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 510 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 210 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 776 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 760 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 217 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 48 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 18 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 18 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 18 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 14 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
deleted 519 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
deleted 519 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
deleted 519 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
deleted 519 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
deleted 519 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 73 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
added 73 characters in body
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading
Source Link
knol
  • 12.8k
  • 1
  • 47
  • 80
Loading