|
|
преди 5 години | |
|---|---|---|
| ceres-asm | преди 5 години | |
| ceres-sys | преди 5 години | |
| src | преди 5 години | |
| .gitignore | преди 5 години | |
| Cargo.lock | преди 5 години | |
| Cargo.toml | преди 5 години | |
| LICENSE | преди 6 години | |
| README.md | преди 5 години | |
| justfile | преди 5 години | |
| test.asm | преди 5 години | |
a shitty fantasy console written in rust using a proprietary MIPS based asm instruction set. a lot of inspiration from PICO-8. ceres is structured of these crates:
ceres uses a 256x144 screen with a separate video buffer from the standard memory. colors are 16-bit structured like 0b0000_rrrr_gggg_bbbb where the first four bits are ignored. the video buffer is structured row major where each u16 is an individual pixel
all registers are unsigned 16 bit
| Register number | Register name | Register usage |
|---|---|---|
| 0 | z0 | always contains zero |
| 1 | pc | program counter |
| 2 | sp | stack pointer |
| 3 | ra | return address |
| 4-6 | a0-a2 | argument registers |
| 7 | v0 | return register |
| 8 | v1 | return register 2 |
| 9-15 | t0-t6 | temporary registers |
god oh fuck what am i even doing
ld:signifier $dest immediate/address| opcode | signifier | destination | padding | immediate/address |
|---|---|---|---|---|
00001 |
100 |
0000 |
0000 |
0000000000000000 |
add $src1 $src2 $dest| opcode | padding | source1 | source2 | dest |
|---|---|---|---|---|
00010 |
000000000000000 |
0000 |
0000 |
0000 |