# HG changeset patch # User Paul Boddie # Date 1322938049 -3600 # Node ID 9584cf16614a0d2c1ac8c7fecfb9cb221cf88fe8 Some documentation of the Acorn Electron ULA and discussion of potential enhancements. diff -r 000000000000 -r 9584cf16614a ULA.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ULA.txt Sat Dec 03 19:47:29 2011 +0100 @@ -0,0 +1,83 @@ +Hardware Scrolling +------------------ + +On the standard ULA, &FE02 and &FE03 map to a 9 significant bits address with +the least significant 5 bits being zero, thus limiting the scrolling +resolution to 64 bytes. An enhanced ULA could support a resolution of 2 bytes +using the same layout of these addresses. + +|--&FE02--------------| |--&FE03--------------| +XX XX 14 13 12 11 10 09 08 07 06 XX XX XX XX XX + + XX 14 13 12 11 10 09 08 07 06 05 04 03 02 01 XX + +In practice, a resolution of 8 bytes is more useful, since the mapping of +screen memory to pixel locations is character oriented. A change in 8 bytes +would permit a scrolling resolution of 2 pixels in MODE 2, 4 pixels in MODE 1 +and 5, and 8 pixels in MODE 0, 3 and 6. This resolution is actually observed +on the BBC Micro (see 18.11.2 in the BBC Microcomputer Advanced User Guide). + +Palette Definition +------------------ + +Since all memory accesses go via the ULA, an enhanced ULA could employ more +specific addresses than &FE*X to perform enhanced functions. For example, the +palette control is done using &FE*8-F and merely involves selecting predefined +colours, whereas an enhanced ULA could support the redefinition of all 16 +colours using specific ranges such as &FE18-F (colours 0 to 7) and &FE28-F +(colours 8 to 15), where a single byte might provide 8 bits per pixel colour +specifications similar to those used on the Archimedes. + +Hardware Sprites +---------------- + +An enhanced ULA might provide hardware sprites, but this would be done in an +way that is incompatible with the standard ULA, since no &FE*X locations are +available for allocation. In a special ULA mode, one might allocate a pair of +locations (for example, &FE20 and &FE21) as a pair of registers referencing a +region of memory from which a sprite might be found and potentially copied +into internal RAM, with other locations (for example, &FE22 and &FE23) +providing the size of the region. + +Enhanced Graphics +----------------- + +Screen modes with different screen memory mappings, higher resolutions and +larger colour depths might be possible, but this would in most cases involve +the allocation of more screen memory, and the ULA would probably then be +obliged to page in such memory for the CPU to be able to sensibly access it +all. Merely changing the memory mappings in order to have Archimedes-style +row-oriented screen addresses (instead of character-oriented addresses) could +be done for the existing modes, but this might not be sufficiently beneficial, +especially since accessing regions of the screen would involve incrementing +pointers by amounts that are inconvenient on an 8-bit CPU. + +Enhanced Sound +-------------- + +The standard ULA reserves &FE*6 for sound generation and cassette +input/output, thus making it impossible to support multiple channels within +the given framework. The BBC Micro ULA employs &FE40-&FE4F for sound control, +and an enhanced ULA could adopt this interface. + +Waveform Upload +--------------- + +As with a hardware sprite function, waveforms could be uploaded or referenced +using locations as registers referencing memory regions. + +BBC ULA Compatibility +--------------------- + +Although some new ULA functions could be defined in a way that is also +compatible with the BBC Micro, the BBC ULA is itself incompatible with the +Electron ULA: &FE00-7 is reserved for the video controller in the BBC memory +map, but controls various functions specific to the 6845 video controller; +&FE08-F is reserved for the serial controller. It therefore becomes possible +to disregard compatibility where compatibility is already disregarded for a +particular area of functionality. + +&FE20-F maps to video ULA functionality on the BBC Micro which provides +control over the palette (using address &FE21, compared to &FE07-F on the +Electron) and other system-specific functions. Since the location usage is +generally incompatible, this region could be reused for other purposes.