Lots to be done still.  Submitting before deadline so I have _something_ visible by the time things close.

Pushing control / command next to things with a CPU will let you edit the CPU's microcode.  The CPU has 256 bytes of memory, no registers, aside from a program counter, and has 16 instructions.

A star next to an operand means 'dereference', or 'read the memory from this location before applying the operation'.

ADD 0x1 0x2 0x3 means 'Add the values 1 and 2 and store it in address 3.'

ADD *0x1 0x2 0x3 means 'Read the memory at address 0x1 and add 2, then store it in address three.'

ADD 0x1 0x2 *0x3 means 'Add the values 1 and 2, then read the address at 0x3 and store it there.'

Internally all opcodes are basically four bytes.

The full instruction list:

OperationNumber of InstructionsDescription
ADD3Add the first and second operands.  Store at the third.
SUB3
MUL3
DIV3
MOD3
AND3
OR3
XOR3
NOT2
MOV2Fake instruction that gets rewritten to OR OP0 0x0 OP1.  Useful for loading and moving data.
Example: MOV 0x12 0x34 will move the literal 0x12 into the address 0x34.
JE3JUMP if OP0 and OP1 are equal.
JG3JUMP if OP0 > OP1.
SPC1Store program counter.  Can be used to fake subroutines.
JMP1Fake instruction that gets rewritten to JE 0x0 0x0 OP0



Download

Download
AIAndGamesJam2021_win_2021_06_03_23_02.zip 15 MB