Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
magic_register [2016/05/28 22:59]
ex_writer
magic_register [2016/06/01 16:04]
ex_writer removed
Line 1: Line 1:
 ====== Magic System ====== ====== Magic System ======
  
-The **Magic System** is enabled when data is written to a memory location between 0 to 16K ($0–$3FFF),​ aka **Magic Memory**. Since this memory range is occupied by [[system ROM]] and [[cartridges|cartridge ROM]], respectively,​ data cannot be written to this area. Instead, a modified form of the data is actually written to memory location X + 16K. +The Magic System is enabled when data is written to a memory location between 0 to 16K ($0–$3FFF),​ aka Magic Memory. Since this memory range is occupied by [[system ROM]] and [[cartridges|cartridge ROM]], respectively,​ data cannot be written to this area. Instead, a modified form of the data is actually written to memory location X + 16K. 
  
 ===== Magic Register ===== ===== Magic Register =====
  
-The **Magic Register** ([[output port]] $C) byte determines how the data is modified. Each bit flags a specific data transformation. The purpose of each Magic Register bit is shown below:+The Magic Register ([[output port]] $C) byte determines how the data is modified. Each bit flags a specific data transformation. The purpose of each Magic Register bit is shown below:
  
 ^ Bit ^ Function ^ Description ^ ^ Bit ^ Function ^ Description ^
-| 0 | LSB of shift amount | |+| 0 | LSB of shift amount | Shift pixel data 0, 1, 2, or 3 pixels right before drawing ​|
 | 1 | MSB of shift amount | | | 1 | MSB of shift amount | |
 | 2 | Rotate | Not supported on the Bally Arcade | | 2 | Rotate | Not supported on the Bally Arcade |
-| 3 | Expand | | +| 3 | Expand | Convert 1bpp data to 2bpp 
-| 4 | OR | | +| 4 | OR | Draw in OR mode 
-| 5 | XOR | | +| 5 | XOR | Draw in XOR mode 
-| 6 | Flop | | +| 6 | Flop | Mirror pixel data 
-| 7 | Not used | Must remain 0 |+| 7 | Unused ​| Must remain 0 |
  
 The order in which magic functions are performed is as follows: The order in which magic functions are performed is as follows:
Line 25: Line 25:
 As many as four functions can be used at any one time, and any function can be bypassed. OR and XOR cannot be done at the same time. As many as four functions can be used at any one time, and any function can be bypassed. OR and XOR cannot be done at the same time.
  
-**NOTE:** Rotation is not available in consumer mode, and thus does not function ​on the AstrocadeTo learn more, please ​consult the Nutting Manual pp. 98–99.+**NOTE:** Rotation is not supported ​on the Bally ArcadeFor more details, consult the Nutting Manual pp. 98–99.
 ==== Expander ==== ==== Expander ====
  
 The expander expands the 8-bit data bus into 8 pixels (i.e., 16 bits). It expands a 0 on the data bus into a 2-bit pixel and 1 into another 2-bit pixel. Thus, two-color patterns can be stored in ROM in half the normal memory space. The expander expands the 8-bit data bus into 8 pixels (i.e., 16 bits). It expands a 0 on the data bus into a 2-bit pixel and 1 into another 2-bit pixel. Thus, two-color patterns can be stored in ROM in half the normal memory space.
  
-During each memory write instruction using the expander, either the upper half or the lower half of the data bus is expanded. The half used is determined by the expand flip-flop. The flip-flop is reset by an output to the magic register and is toggled after each [[Magic Register|Magic Memory]] write. The upper half of the data bus is expanded when the flip-flop is 0, and the lower half when the flip-flop is 1.+During each memory write instruction using the expander, either the upper half or the lower half of the data bus is expanded. The half used is determined by the expand flip-flop. The flip-flop is reset by an output to the magic register and is toggled after each Magic Memory write. The upper half of the data bus is expanded when the flip-flop is 0, and the lower half when the flip-flop is 1.
  
 The expand register ([[output port]] $19) determines the pixel values into which the data bus will be expanded. A 0 on the data bus will be expanded into the pixel defined by bits 0 and 1 of the expand register. A 1 on the data bus will be expanded into the pixel defined by bits 2 and 3 of the expand register. The expand register ([[output port]] $19) determines the pixel values into which the data bus will be expanded. A 0 on the data bus will be expanded into the pixel defined by bits 0 and 1 of the expand register. A 1 on the data bus will be expanded into the pixel defined by bits 2 and 3 of the expand register.