# The Intel 8244 / 8245: video and sound The 8244 (NTSC) and 8245 (PAL) are one custom Intel design. The only manufacturer description found is Intel's **"8245" product specification, REV 0, 1/20/78**, a preliminary document that describes the chip as a general-purpose part (I8245; a copy is pages 51-74 of the pinned `mcs-48.pdf`, its second character-set page missing). It is tier 2, but early: where the production chip differs, the programmers' documents (VG003, tier 2; BORIS, GUST, tier 3) and observation win (charter, axis A: directness). A second copy of an "8245.pdf" is on the Console5 wiki, which refuses automated fetches (behind a Cloudflare challenge); Aubrey can fetch it by hand to compare (open decision 9). Intel's names and the programmers' names differ. This table maps them: | I8245 | VG003 / programmers | What | | --- | --- | --- | | minor system (4 blocks) | sprites | 8x8 objects from RAM, one colour each | | major system, group 2 (12 CAM locations) | single characters | 8-dot-wide objects from the character ROM | | major system, group 1 (4 CAM locations x 4 LSS) | quads | four characters at 16-clock spacing | | LSS (linear select store) | character pointer + colour | a 9-bit two's-complement displacement into the ROM, and RGB | | grid display system | grid | 9 horizontal, 10 vertical bars | | overlap status / enable overlap | collision register | | ## Address map (I8245 "Address Structure", BORIS App. D, GUST 16) | Address | Contents | R/W (I8245) | | --- | --- | --- | | 00h-0Fh | sprites 0-3: Y, X, attribute, (unused) | Y, X r/w; attribute write-only | | 10h-3Fh | 12 characters: Y, X, LSS 0-7, LSS 8-11 (bit 0 = pointer bit 8, bits 1-3 = R,G,B) | r/w | | 40h-7Fh | 4 quads x 4 characters (the position of the last character places all four) | r/w | | 80h-9Fh | sprite pattern RAM, 8 bytes per sprite; bit 0 is shown leftmost (GUST 4.2.4) | r/w | | A0h | control | r/w (I8245); write-only (GUST) | | A1h | status | read | | A2h | write: overlap enable; read: overlap status (cleared when read) | | | A3h | colour latch | write | | A4h, A5h | Y and X beam position registers | read | | A7h-A9h | sound shift register bytes 0-2 | write | | AAh | sound control | r/w | | C0h-C8h | horizontal grid segments, rows 0-7, one register per column | r/w | | D0h-D8h | horizontal grid segments, row 8 (bit 0 only) | r/w | | E0h-E9h | vertical grid segments, one register per vertical bar | r/w | Registers not listed (A6h, ABh-BFh, C9h-CFh, D9h-DFh, EAh-FFh) are not described anywhere read: their reads and writes are U3. ### Control A0h | Bit | I8245 | BORIS / GUST | Tag | | --- | --- | --- | --- | | 0 | horizontal interrupt, "20 us in advance of horizontal blanking" | horizontal (line) interrupt enable | DOC | | 1 | forced position strobe: 1 = X/Y follow the beam; 0 = frozen (OR'd with the STB pin; a falling edge freezes; stays frozen until X is read) | same | DOC | | 2 | sound interrupt enable | same | DOC | | 3 | "enable grid": grid luminance on; 0 = grid off, grid RAM free for other use | grid display on; grid registers cannot be changed while 1 | DOC | | 4 | external overlap interrupt enable (two chips) | unused on the console | DOC | | 5 | enable display of objects; change objects only while 0 | foreground on; "changing sprites, chars and quads while this bit is 1 seems to have no effect" (GUST) | DOC, OBSERVED | | 6 | dot grid | same | DOC | | 7 | grid segment width: 1 = wide (16 clocks) | fill mode: boxes right of each vertical segment | DOC | ### Status A1h | Bit | I8245 | BORIS | Tag | | --- | --- | --- | --- | | 0 | horizontal status: starts 20 us before HBL starts, ends 5 us before HBL ends | 1 = scan active, 0 = HBLANK | DOC (the two disagree on polarity wording: C5) | | 1 | position strobe status: 1 = follow beam, 0 = latched | same | DOC | | 2 | sound needs service | same | DOC | | 3 | vertical status = vertical blanking | "goes to 1 for 40 us at the start of VBLANK" | C6 | | 6 | external chip overlap | unused on the console | DOC | | 7 | major system overlap: a character's shift register loaded while still busy | "character overlap" | DOC | Reading status clears bits 2 and 6 and the IRQ flip-flop (I8245 p. 15). The vertical interrupt the console uses comes from the VBL line wired to the 8048's `INT`; I8245 says "Vertical Interrupts are not generated within the 8245", so how VBL becomes a level that the BIOS can clear is board wiring to read from VG003's schematic (U4). ### Colour latch A3h Bits 0-2 grid blue, green, red; bits 3-5 background blue, green, red; bit 6 grid bright (I8245 p. 15; GUST 16.2.4 agrees). The background's intensity is always 0, unless P1.7 forces the luminance output (GUST 15.7, his p17.a48: "makes all dark colors bright, so all 16 colors can be used as background colors"; OBSERVED by its author, tier 3). Sprites take the bright colours (intensity always set, GUST 16.4). The 16-colour palette and the composite/RGB conversion are U5: no measured palette exists among the sources read. ## Objects - **Sprites** (minor system): 4 objects, 8x8 from pattern RAM, attribute bits 0 X9 (the ninth horizontal bit, half-clock steps of 140 ns), 1 S (shift odd or even lines: "smoothing"), 2 D (double size), 3-5 R, G, B. I8245 p. 10 gives the delay table of X9, S and D per even and odd line (0, 140 or 280 ns). Each sprite has a 3-bit line counter updated at the start of each scan line. - **Characters** (major system group 2): 12 objects. Y is 7 bits on even lines (121 positions), X 8 bits (183 positions) (I8245 p. 7). The pattern address is `LSS = ROM address - (Y / 2)`: a displacement, not a character number, so where a character starts in the ROM depends on its Y position (I8245 p. 8). Each ROM character is 8 dots by 7 rows, each row shown on two lines ("8 x 7 bit arrays ... (7 x 2) horizontal lines"). An end-of-pattern is detected "on every eighth address", which is the wrap behaviour GUST's quadcut.a48 shows (a character that does not stop at its end and shows the next one: "display wraps around and shows the full block"). - **Quads** (group 1): 4 CAM locations each pointing at 4 LSS entries, fixed spacing of 16 clocks; "if the fourth pattern is truncated all four objects will be truncated to the height of the fourth" (I8245 p. 8; GUST 15.6 agrees). - **Overlap rule**: when two major-system objects meet on one line, the shift register is "already loaded" and status bit 7 is set; what is drawn is "unpredictable" (BORIS 4.4). Exactly what the chip shows is U6. - **Character ROM**: 64 shapes (BORIS App. C; VG003 pp. 33-35 draws the shapes on squared paper; I8245's character pages are partly missing). MAME carries a 512-byte dump, `charset_i8244.bin` (SHA-1 41538271...7fef). Whether the board takes the shapes from the player's dump or draws them from VG003 is open decision 5. ## Grid 9 horizontal bars of 9 segments each (3 lines high, 21 lines apart), 10 vertical bars of 8 segments (2 or 16 clocks wide, 14 clocks apart... I8245 says "the spacing between adjacent vertical bars is fourteen clock intervals", which cannot be right with 16-clock wide segments touching: C7). Top bar on the 24th line after VBL ends, leftmost bar on the 10th clock after HBL ends; "upper left hand corner of the grid has program coordinates (Y,X) = (13H,0BH). The observed position on the screen will be (Y,X) = (18H,18H)" (I8245 p. 11). Dots: 3 lines by 2 clocks at every intersection when control bit 6 is set. ## Collisions Write A2h with the objects to test; I8245: a 0 bit masks that object's overlaps from setting the *other* objects' bits; the status register stores coincidences "as they occur on the screen" and is cleared when read. Bits: 0-3 sprites, 4 vertical grid, 5 horizontal grid and dots, 6 external (the CX pin: the G7400's EF9340/41 bright colours, GUST 14.3), 7 major system (characters and quads). Programs read it in VBL "one frame later" (GUST 16.2.3; BORIS 4.8: "only valid during VBLANK"). The exact dot rule (which pixels count: the shifted sprite halves, the grid's dots, background) is U7: no source read says it, and the detectors (MAME, O2EM, the MiSTer core) are the only evidence until a test ROM's verdict on hardware is found. ## Beam position (A4h, A5h) "The X position in vdc_scanrow increments on every 0 to 1 transition of the VDC pixel clock input. The vdc_scanline register is incremented when the vdc_scanrow register changes from 0CEh to 0CFh. The vdc_scanrow register wraps around from 0E3h to 0" (GUST 16.2.5; tier 3, from his experiments). That gives 228 counts per line, the PAL figure. The NTSC count (227.5 clocks per line by MAME's screen) is U8. ## Sound (A7h-AAh) A 24-bit shift register clocked at line rate / 4 or / 16 (control bit 5: I8245 gives 3933 Hz and 983 Hz from a 15,734 Hz line, the NTSC figures; PAL is 15,625/4 and /16), optionally recirculating (bit 6), with a noise feedback path (bit 4, "in the 25 bit shift path"), a 4-bit volume as a duty-cycle down-counter chopping the output (bits 0-3), enable bit 7 (I8245 pp. 12-13; BORIS 4.10). An interrupt is raised each time 24 bits have shifted out (a mod-24 counter). The noise polynomial, the chopping frequency and the reset values are U9. ## Sync and the PAL machine I8245 describes the PAL chip as a master dividing 3.54 MHz "by a factor of 227.0" for 15,625 Hz and 313/312 lines, and, "for operation on European standards, the 8244 will be operated in the Slave mode and appropriate signals will be supplied to it from external sync circuitry". GUST: "the Videopac G7000 has a lot of additional logic to generate a PAL compatible signal". MAME's PAL screen is 228 clocks by 313 lines. Which chip is master on the G7000 and what the external logic does to line counts is C3/C8 and U10. ## Mid-frame behaviour - Object registers may be changed only with control bit 5 = 0, the grid only with bit 3 = 0 (all sources). "Dynamic positioning" during HBL is a design intent in I8245. - Reading back character registers while graphics are on "returns junk" (GUST's charread.a48 description; OBSERVED, tier 3). What the junk is: U11. - Cartridges change registers mid-screen using line interrupts (T1 counter) or by polling A4h (BORIS 4.13). ## The chip rule Users of the 8244/8245 in MAME 0.285: the six machines of `philips/odyssey2.cpp` only. No second family board would use it: **it stays in the board**, as an instance-based package so the G7400 rows can mix it with the EF9340/41.