M-1000 Map: 0-8191: 1k RAM, repeated 8 times. 8192-16383: PIA, repeated 4096 times. 16384-24575, 57344-65535: 2k ROM, repeated 8 times. The cartridges use the zones 26624-30719 and 32768-40959. I think that these are the only available in the Imagination Machine. Graphics: A MC6847 Video Display Generator. The Display Memory used is 512-1023. In graphic mode, the address lines are recombined with the data in 0-383, and they work like 12 rows of 32 programmable characters, 16 lines height. These characters ar defined by the data in 512-1023. There are a maximum of 32 possible characters. Character 0 uses 512-527, character 1 uses 528-543 and so on. There are a total of 262 scan lines: 192 in the active display, 38 before and 32 after. FS is connected to the interrupt input of the PIA. The transition from hight to low occurs at the end of the active display (scan line 230) and the transition from low to hight at the end of the display area. A/G is connected to the PIA. Is set or reset with the bit 7 of the address 8194 (0=Text, 1=Graphics). NOTE: I assume in this text that the PIA's are programmed like they are in the M1000 ROM and in the BASIC ROM. A/S is connected to D7. INV is connected to D6. GM1 and GM2 are set to 1. GM0 is connected to the PIA, bit 6 of 8194. There are only two possible modes (0=CG6, 1=RG6). CSS is connected to the PIA. It is set or reset with the bit 3 of 8193 when the bits 4 and 5 are set to 1. It is combined also with D6, so it is only valid when the value of the character or the pseudo-character have the bit 6 (64) set to 1. In text mode, only the inverse characters can be orange. In Graphic mode, the characters with a value 0-31 are of standard color and those with value 64-95 can be of the alternate color set. This input defines also the color of the border. In text mode the border is black. In graphic mode the border is green or buff according to the state of CSS in the righmost character of the line. For more information, see the 6847 datasheet. The display mode can be switched from Text to Graphics and vice versa in the display area. According to the analysis of the programs and the photographs, it seems that, obviously, in text mode the address line A5 is incremented only when a new character row is found, and in graphic mode every scan line. Thus, when the mode switch from text to graphics, the scan line shown is not the situated in the same position of the screen, but that corresponding to the counter. This will be incremented in the next line. When switching from graphics to text, the character row shown will be that corresponding to the counter (mod 16), with a line counter of 0 in the character. In the next scan line, we'll see the second line of the same character row, and so on. The switching is usually made near the end of the scan line, in the border area. TV effect: It seems that when using a TV Set, solitary black pixels between two buff pixels can be erroneously interpreted as a change in chrominance and shown as green or red according to the position in the line (red when in even position, green when in odd). This color affects also to the preceding pixel. Sound: The sound is generated directly for the CPU. The speaker is connected to the PIA, and is switched on or off with the bit 3 of 8195. Controllers: Each controller has 12 keys and 4 contacts in the 4 positions of the stick. The fire button is connected in parallel with the "En" key. The 32 "keys" are arranged in a matrix of 8 columns (4 for each controller) and 4 rows. To explore the state of the keys. The row is selected with the bits 0-3 of 8194 (a bit set to 0 indicates that the row is to be scanned) and the state of the selected row(s) is read in 8192 (a bit set to 0 indicates a pressed key). Interrupts: The interrupt is enabled or disabled in the PIA, bit 0 of 8195 (1=enabled, 0=disabled). With the bit 1 of 8195 can be selected the flank where the interrupt occurs(0=high to low, 1=low to high) Clock: The VDG uses a 3.579545 MHz crystal. This frequency, divided by 4, is used to clock the CPU. Thus, during a screen scan line 56.75 CPU cycles occur. Rounding this value to 57, UFO ceases to work, because it uses a loop of 19 CPU cycles where the interrupt is enabled during only 6 and waits for the change of a memory location that naturally does not occur.