Add some GTE code

This commit is contained in:
2024-01-24 12:04:03 -05:00
parent 6f3b67fab8
commit 1922515228
5 changed files with 107 additions and 2 deletions

View File

@@ -66,7 +66,9 @@
"**/*.dep": true
},
"files.associations": {
"stdio.h": "c"
"stdio.h": "c",
"TUTO0.C": "cpp",
"MAIN.C": "cpp"
}
}
}

View File

@@ -3,7 +3,9 @@
#include <PSX/System/IOPorts/dma_io.hpp>
#include <stdio.h>
#include <PSX/GTE/gte.hpp>
#include <PSX/System/syscalls.hpp>
#include "../../reference/inline_n.h"
extern "C" uint32_t __heap_start;
extern "C" uint32_t __bss_start;
@@ -65,6 +67,18 @@ namespace JabyEngine {
}
}
static void test_gte() {
const auto data = GTE::SVECTOR::create();
asm("# MY PLANSCHI START");
GTE::ldv0(data);
asm("# MY PLANSCHI END");
asm("# THEIR PLANSCHI START");
gte_ldv0(&data);
asm("# THEIR PLANSCHI END");
}
void start() {
static constexpr auto DebugX = 0;
static constexpr auto DebugY = 0;
@@ -74,6 +88,7 @@ namespace JabyEngine {
printf("Heap starts @0x%p\n", &__heap_start);
printf("BSS from 0x%p to 0x%p (%u)\n", &__bss_start, &__bss_end, __bss_len);
test_bios_font();
test_gte();
__debug_boot_print_at(GPU::Color24::Green(), DebugX, DebugY, DebugScale, "PLANSCHI from 0x%p to 0x%p\n", &__planschi_start, &__planschi_end);
boot::Start::setup();