Skip to content

ComputerSpaceDesign ‐ Memory Sound Board

ToS edited this page May 12, 2025 · 7 revisions

Overview

cs_pcb_docu-memory

Sprite Generation - Rocket and General

The displayed shape is origined by one of 4 basic shapes that are derived from the diodes section with a couple of multiplexers that are triggered by address lines for the vertical and horizontal. Those are feed with the lower 4 bits of the position counters at the motion board (implemented as drifting counters).

However, there are a total of 32 vectors for the rocket, that are counted by a counter chain consisting of a 4-bit up and down counter at UE4, chained via UE5:C to a flip-flop UE3, which acts as the 5th bit of the counter. The 4 basic shapes are repeated over all 32 vectors and modified with a combination of horizontal mirroring, vertical mirroring and 90 degree counter clockwise rotation of the shape where needed.

Basic 4 shapes are selected in either forward or backwards order by UE2. Depending on the enable lines E1 and E2, the order of shapes is either forward or backward. The direction is derived by bit 3 of the vector counter.

The modifiers remain unchanged for a sequence of 4 vectors until they get changed for the next 4 vector segment. There is a total of 8 vector segments (8 segments * 4 shapes = 32 vectors).

Horizontal mirroring is achieved by setting the first input for all UB5 gates to high. This is triggered by UC5:D pin 11 on high. The status of UC5:D has its origin by bits 3, 4 and 5 of the vector counter.

Vertical mirroring is achieved by setting the first input for all UA5 gates to high. This is triggered by UC5:C pin 8 on high. The status of UC5C pin 8 has its origin by bits 3 and 4 of the vector counter.

Rotation is achieved by UD6, UC6, UB6 and UA6 by setting select line A to high. This is triggered by UC5.A pin 3 on high. The origin of UC5:A pin 3 is an evaluation of vector counter bits 3 and 4.

The modifier table for all 8 segments is as follows (starting with A at 5 past 12:00, going to H at 5 before 12:00):

  • segment A -> shapes 1-4, no modifiers
  • segment B -> shapes 4-1, rotation, v-mirror and h-mirror
  • segment C -> shapes 1-4, rotation and v-mirror
  • segment D -> shapes 4-1, v-mirror
  • segment E -> shapes 1-4, v-mirror and h-mirror
  • segment F -> shapes 4-1, rotation
  • segment G -> shapes 1-4, rotation and h-mirror
  • segment H -> shapes 4-1, h-mirror

CS-MemoryBrd_RocketVectors

Sprite Generation - Saucer

While the rocket has a maximum dimension by 16 by 16 "pixels", the saucer can only have 16 (width) by 8 (height). The limitation in height is a pay off caused by its duplication.

The duplication of the saucer is as simple as it is fascinating: On the motion board, UA3 pin 11 is connected to UD3 pin 11 instead of UE3 pin 11. AU3 is a big NAND gate that generates the SaucerEnable signal. While normaly only the 4 most significant bits of the vertical and horizontal counters are used to generate the SaucerEnable (and also RocketEnable) signal, they made a tiny change und used for the saucer instead of bits 5, 6, 7 and 8 the bits 4, 5, 6 and 7. This causes the that the 4 bit pattern appears twice over the span of 256 vertival lines instead of just one time. But, it takes away one bit of the lower part, which is used for the select lines for the saucer shape. Therefore just a height of 8 pixels possible.

The saucer has a perfect semetrical shape on the vertical and the horizontal axis. Therefore the h-mirroring and the v-mirroring that modifies the address lines for the rocket have no visual impact for the saucer, which reduces complexity in the circuitry that otherwise would be necessary in addition.

Oscilator for Animation and Thrust/ Rotate Input Delay

Without reasonable delay of the thrust and rotation Inputs, comming directly from the switches at the control panel, the impact would be unreasonable fast, render the game controls unusable. In the schematic, the thrust Input can be seen directly combined with the oscilator output at UF3:B.

Via "ResetA" the oscilator signal is also connected to UF6 pin 9 and UE5:B pin 6 where it is slowing down the rotate switch inputs.

Furthermore the oscilator is slowing down and controlling the rocket flame animation via UE1:B and UE1:A.

Left Turn Condition

The left turn is directly triggered by the left turn switch that is comming from the control panel, but delayed by the oscilator signal, coming from "ResetA" into UE5:B pin 5. Only if the rotate left switch is pressed and UE5:B receives an oscilator pulse, the vector counter at UE4 gets decremented by one.

Right Turn Condition

The right turn has two different triggers:

  • The right turn switch is pressed and an oscilator pulse is received on UF6 pin 9 (similar to the left rotation) or
  • A "Spin" signal is triggered by the collision detection and the spin oscilator is providing a pulse (UF2 and C29).

Horizontal and Vertical Velocity

Triggered by the delayed thrust input, a horizontal and vertical velocity counter is adjusted at UH4 (vertical) and UJ4 (horizontal). The counter adjustment for both axis depends on the actual rocket vector and the related counter at UE4 and UE3. The counter values get translated into 3 bit velocity values and an direction signal by an array of logical gates. Those information are forwarded to the motion board via the backplane, where they are used to adjust the position counter chain for the rocket sprite.