Skybuck\\\'s Universal Memory Architecture...



Skybuck\'s Universal Memory Architecture Extension (16 january 2022)

There may be a problem with the Tron/Snake based approach/idea.

In Tron/Snake the motor cycles/snakes can only grow. Shrinking is not possible, except when they die.

To allow shrinking additional information would need to be recorded. For example where the snake cell came from.

To incorporate this functionality the following changes should be made:

DirectionBit0 is renamed to GrowDirectionBit0
DirectionBit1 is renamed to GrowDirectionBit1

Two new direction bits are added:


The meaning of combining two of the same direction bits to form a direction bit field remain the same:

Order of DirectionBits: DirectionBit0, DirectionBit1:
00 = up
01 = right
10 = down
11 = left

(DirectionBit0 is LSB=least significant bit, DirectionBit1 is MSB=Most Significant Bit)

The ShrinkDirectionBits should be set to where the snake cell came from, it\'s ancestor/predecessor.

So for example.

If the current snake cell is on x 200 y 100 and it came from x 199 y 100 the shrink bits would be set as follows:

ShrinkDirectionBit0 = 1
ShrinkDirectionBit1 = 1

This indicates that if the snake wants to shrink back into a safe memory cell that was allocated before the growth then it can do so
and go there.

This leaves one problem remaining indicating if there was a previous connected bit. Like in the ConnectionBit description.

This may and could also be updated or the head/tail pointers could be used to detect if it\'s already at the head/tail.
Or as defined as SourceX,SourceY.

If the connection bit feature is implemented/used it will also need to be updated and renamed:

ConnectionBit will be renamed to NextBitConnected

and a new bit will be introduced:


The maining of these bits are slightly altered:

For NextBitConnected it means:

0 = head of snake/last cell
1 = intermediate cell

For PreviousBitConnected it means:

0 = tail of snake/first cell
1 = intermediate cell

This extended version should allow shrinking (as well as growing) of snakes (a bit more easily) ! ;)

To go Left, Right, Down, Up is weakly defined, but I will give a suggestion here:

To go left means -1
To go right means +1
To go up means +1
To go down means -1

(Visualizing an image of the memory map may have to be inverted on vga/graphics systems where the y-axis is inverted.)

Bye for now,

Welcome to