Prepare for new IOPort code

This commit is contained in:
2023-09-13 22:23:29 +02:00
parent 101e44b1ac
commit b0189469cd
3 changed files with 126 additions and 0 deletions

View File

@@ -50,6 +50,7 @@
]
},
"settings": {
"cmake.configureOnOpen": false,
"C_Cpp.default.includePath": [
"include",
"../../include"

View File

@@ -11,9 +11,26 @@ extern "C" uint32_t __planschi_start;
extern "C" uint32_t __planschi_end;
namespace JabyEngine {
// For now
namespace Blubb {
__new_declare_io_value(Test, uint32_t) {
};
__new_declare_io_port(Test, 0);
static void bla(New::IOPort<struct Test>& wuff) {
asm("#planschi");
const auto a = Test::from(Bit(1), Bit(2));
wuff.write(a);
wuff.write(a);
wuff.write(a);
asm("#planschi");
}
}
namespace boot {
namespace Start {
static void enable_DMA() {
::JabyEngine::Blubb::bla(::JabyEngine::Blubb::Test);
DMA_IO::DPCR = DMA_IO::DPCR_t(DMA_IO::DPCR).set(DMA_IO::DPCR_t::SPUEnable).set(DMA_IO::DPCR_t::GPUEnable).set(DMA_IO::DPCR_t::CDROMEnable);
}