some improvements i think

This commit is contained in:
2026-01-16 13:32:36 +02:00
parent 49adb21b81
commit c69f589439
16 changed files with 338 additions and 5 deletions

26
asmrigs/spec/brb.txt Normal file
View File

@@ -0,0 +1,26 @@
Brick Rigs B is a programming language made to work in the game Brick Rigs
1. The main issues of Brick Rigs
There are multiple limitations that are present in Brick Rigs:
1. Math Bricks are updated once per frame. It limits them to be one
time usage, which may cause some problems if you want to set the same
brick multiple times.
To solve this issue we've developed multiple targets:
1. Native Brick Rigs framed - allows to run code once per frame,
useful for missiles and custom built-logic.
2. Native Brick Rigs stacked - splits the code into multiple
parts, which allows stack to occur at a cost of a single frame.
3. Combat Advanced's virtual machine - it allows to run complex code by
using Combat Advanced's virtual machine
There are multiple extensions for native Brick Rigs
1. Combat Advanced's memory module
2. Combat Advanced's trigonometry functions
2. Syntaxis
It can be seen in B user's guide

42
asmrigs/spec/o.txt Normal file
View File

@@ -0,0 +1,42 @@
Brick Rigs math vehicle object file specification v 1.0.
1. Terminology
"byte" must be 1 byte long (uint8_t in C)
"word" must be 2 bytes long (uint16_t in C)
"int" must be 4 bytes long (uint16_t in C)
2. Global header
First comes global header which has following structure:
struct
{
byte magic[4];
byte architecture[2];
word symbols_number;
}
Where:
magic must equal to 0x1 'B' 'M' 'O'
architecture is defined per implementation
symbols_number is the amount of symbols
3. Symbols
First comes the header:
struct
{
byte type;
int name_offset;
byte name_lenght;
int data_offset;
byte data_lenght;
}
Where:
type is equal to 0x1 which defines function or 0x2 which defines variable
name_lenght is equal to the lenght of the name of the symbol + 1
data_lenght is equal to the data lenght of the symbol
After that comes the ASCII terminated by 0x0 set of lenght of name_lenght, which defined name of the symbol