List Memory Bank v1.0
Overview
It's similar to Memory Bank, it can only store one row of data, but it has many useful functions. And it can be used without initialization.
The file saved to the save is an unprocessed binary file, which can be edited with a hex editor.
The exported file format is .GBLMB
, which is essentially a ZIP compressed file. It can be uncompressed and edited with a hex editor.
In addition, it has Volatile type, which does not need initialization too.
Ports Definition
Top Output
Function |
---|
Output Data / Result |
Right Input
Function |
---|
Right Index |
Bottom Input
Function |
---|
Synchronous Operations, details are in the table below. |
Left Input
Function |
---|
Left Index |
Back Input
Function |
---|
Input Data |
Synchronous Operations
Index stats at 0.
Voltage | Operation | Description |
---|---|---|
Not Connected | Async Read | When the bottom port is not connected, the top port will output the data at the right index (out of range outputs 0, same bellow.) |
0 or Others | None | When the voltage of the bottom port is 0 or other unspecified voltage, the output will be 0. If the bottom port is connected to an element or wire, the List Memory Bank will be in synchronous operation mode. In this mode, only if the voltage of the bottom port changes, the operation will be executed. |
1 | Read | Read the data at the right index, and output it to the top port. |
2 | Write | Write the back input within the range of the left and right index. Note 1: Including the two index addresses, same bellow. Note 2: If the left index is 0, only the right index address will be overwritten, same bellow.) |
3 | Insert | Insert the back input within the range of the left and right index, the count is the bigger index minus the smaller index, plus one. |
4 | Cut | Read the data at the right index, output it to the top port, and remove it. |
5 | Remove | Remove the data within the range of the left and right index. |
6 | Index | Find the first data equals to the back input within the range of the left and right index, and output the index to the top port. Note 1: If no result, it outputs 0xFFFFFFFF. Note 2: If the two index is both 0, it will find in all range. |
7 | Last Index | Find the last data equals to the back input within the range of the left and right index, and output the index to the top port. Note 1: If no result, it outputs 0xFFFFFFFF. Note 2: If the two index is both 0, it will find in all range. |
8 | Query & Remove | Remove all data equals to the back input within the range of the left and right index, and output the removed count. |
9 | Count | Find the data equals to the back input within the range of the left and right index, and output the count. |
10 (0xA) | Copy & Paste | Copy the data at the right index and write it to the left index. If the right index is 0, it will write 0, same bellow. |
11 (0xB) | Copy & Insert | Copy the data at the right index and insert it to the left index. |
12 (0xC) | Reverse | Reverse the order of data within the range of the left and right index. |
13 (0xD) | Ascending Order | Order the data within the range of the left and right index in ascending order. |
14 (0xE) | Descending Order | Order the data within the range of the left and right index in descending order. |
15 (0xF) | Data Count | Output the count of data currently stored. Note: If you write data to a large index, the count will be large too. |
16~31 (0x10~1F) | Left Binary Operation in Batch | Perform binary operation in batch within the range of the left and right index. The original data is the left value, the back input data is the right value, the operation methods from 16~31 are: add, subtract, multiply, divide, remainder, equal, greater than, no less than, less than, no greater than, maximum, minimum, left shift, right shift, power and logarithm (the left value is anti-logarithm, the right value is base). |
32~47 (0x20~2F) | Right Binary Operation in Batch | This operation is like the operation above, but the original data is the right value, the back input data is the left value. |
48~66 (0x30~42) | Unary Operation in Batch | Perform unary operation in batch within the range of the left and right index. The original data is the input value, the operation methods from 48~66 are: sin, cos, tan, cot, sec, csc, asin, acos, atan, sinh, cosh, tanh, sign magnitude, two's complement reverse. |
256 (0x100) | Set Width | Set the width of data, which image display or terrain layer display reads, to the back input. The default value is 0. |
257 (0x101) | Set Height | Set the height of data, which image display or terrain layer display reads, to the back input. The default value is 0. |
258 (0x102) | Set Offset | Set the offset of data, which image display or terrain layer display reads, to the back input. The default value is 0. When the display reads data from this memory bank, it will ignore the first n data. |
272 (0x110) | Get Width | Get the width you set, and output it to the top port. |
273 (0x111) | Get Height | Get the height you set, and output it to the top port. |
274 (0x112) | Get Offset | Get the offset you set, and output it to the top port. |