1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/ULA.txt Sat Dec 03 19:47:29 2011 +0100
1.3 @@ -0,0 +1,83 @@
1.4 +Hardware Scrolling
1.5 +------------------
1.6 +
1.7 +On the standard ULA, &FE02 and &FE03 map to a 9 significant bits address with
1.8 +the least significant 5 bits being zero, thus limiting the scrolling
1.9 +resolution to 64 bytes. An enhanced ULA could support a resolution of 2 bytes
1.10 +using the same layout of these addresses.
1.11 +
1.12 +|--&FE02--------------| |--&FE03--------------|
1.13 +XX XX 14 13 12 11 10 09 08 07 06 XX XX XX XX XX
1.14 +
1.15 + XX 14 13 12 11 10 09 08 07 06 05 04 03 02 01 XX
1.16 +
1.17 +In practice, a resolution of 8 bytes is more useful, since the mapping of
1.18 +screen memory to pixel locations is character oriented. A change in 8 bytes
1.19 +would permit a scrolling resolution of 2 pixels in MODE 2, 4 pixels in MODE 1
1.20 +and 5, and 8 pixels in MODE 0, 3 and 6. This resolution is actually observed
1.21 +on the BBC Micro (see 18.11.2 in the BBC Microcomputer Advanced User Guide).
1.22 +
1.23 +Palette Definition
1.24 +------------------
1.25 +
1.26 +Since all memory accesses go via the ULA, an enhanced ULA could employ more
1.27 +specific addresses than &FE*X to perform enhanced functions. For example, the
1.28 +palette control is done using &FE*8-F and merely involves selecting predefined
1.29 +colours, whereas an enhanced ULA could support the redefinition of all 16
1.30 +colours using specific ranges such as &FE18-F (colours 0 to 7) and &FE28-F
1.31 +(colours 8 to 15), where a single byte might provide 8 bits per pixel colour
1.32 +specifications similar to those used on the Archimedes.
1.33 +
1.34 +Hardware Sprites
1.35 +----------------
1.36 +
1.37 +An enhanced ULA might provide hardware sprites, but this would be done in an
1.38 +way that is incompatible with the standard ULA, since no &FE*X locations are
1.39 +available for allocation. In a special ULA mode, one might allocate a pair of
1.40 +locations (for example, &FE20 and &FE21) as a pair of registers referencing a
1.41 +region of memory from which a sprite might be found and potentially copied
1.42 +into internal RAM, with other locations (for example, &FE22 and &FE23)
1.43 +providing the size of the region.
1.44 +
1.45 +Enhanced Graphics
1.46 +-----------------
1.47 +
1.48 +Screen modes with different screen memory mappings, higher resolutions and
1.49 +larger colour depths might be possible, but this would in most cases involve
1.50 +the allocation of more screen memory, and the ULA would probably then be
1.51 +obliged to page in such memory for the CPU to be able to sensibly access it
1.52 +all. Merely changing the memory mappings in order to have Archimedes-style
1.53 +row-oriented screen addresses (instead of character-oriented addresses) could
1.54 +be done for the existing modes, but this might not be sufficiently beneficial,
1.55 +especially since accessing regions of the screen would involve incrementing
1.56 +pointers by amounts that are inconvenient on an 8-bit CPU.
1.57 +
1.58 +Enhanced Sound
1.59 +--------------
1.60 +
1.61 +The standard ULA reserves &FE*6 for sound generation and cassette
1.62 +input/output, thus making it impossible to support multiple channels within
1.63 +the given framework. The BBC Micro ULA employs &FE40-&FE4F for sound control,
1.64 +and an enhanced ULA could adopt this interface.
1.65 +
1.66 +Waveform Upload
1.67 +---------------
1.68 +
1.69 +As with a hardware sprite function, waveforms could be uploaded or referenced
1.70 +using locations as registers referencing memory regions.
1.71 +
1.72 +BBC ULA Compatibility
1.73 +---------------------
1.74 +
1.75 +Although some new ULA functions could be defined in a way that is also
1.76 +compatible with the BBC Micro, the BBC ULA is itself incompatible with the
1.77 +Electron ULA: &FE00-7 is reserved for the video controller in the BBC memory
1.78 +map, but controls various functions specific to the 6845 video controller;
1.79 +&FE08-F is reserved for the serial controller. It therefore becomes possible
1.80 +to disregard compatibility where compatibility is already disregarded for a
1.81 +particular area of functionality.
1.82 +
1.83 +&FE20-F maps to video ULA functionality on the BBC Micro which provides
1.84 +control over the palette (using address &FE21, compared to &FE07-F on the
1.85 +Electron) and other system-specific functions. Since the location usage is
1.86 +generally incompatible, this region could be reused for other purposes.