#include "../../internal-include/mipscalls.hpp"
#include <PSX/GTE/gte.hpp>
#include <PSX/System/syscalls.hpp>


namespace JabyEngine {
    namespace boot {
        namespace GTE {
            void setup() {
                SysCall::EnterCriticalSection();
                    const auto sr = bit::set(MIPS::SR::read(), MIPS::SR::CU2);
                    MIPS::SR::write(sr);
                SysCall::ExitCriticalSection();

                JabyEngine::GTE::set_geom_offset(0, 0);
                JabyEngine::GTE::set_geom_screen(512);
            }
        }
    }
}