Setup Periperhy
This commit is contained in:
parent
f7ad811304
commit
f15061fe67
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
#include "ioport.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Periphery_IO {
|
||||
__declare_io_value(JOY_MODE, uint16_t) {
|
||||
static constexpr JOY_MODE create() {
|
||||
return JOY_MODE{0x000D};
|
||||
}
|
||||
};
|
||||
|
||||
__declare_io_value(JOY_BAUD, uint16_t) {
|
||||
static constexpr JOY_BAUD create() {
|
||||
return JOY_BAUD{0x0088};
|
||||
}
|
||||
};
|
||||
|
||||
__declare_io_port(, JOY_MODE, 0x1F801048);
|
||||
__declare_io_port(, JOY_BAUD, 0x1F80104E);
|
||||
}
|
||||
}
|
|
@ -21,6 +21,10 @@ namespace JabyEngine {
|
|||
namespace Timer {
|
||||
void setup();
|
||||
}
|
||||
|
||||
namespace Periphery {
|
||||
void setup();
|
||||
}
|
||||
}
|
||||
|
||||
void __no_return run();
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#include <PSX/System/IOPorts/periphery_io.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace Periphery {
|
||||
void setup() {
|
||||
Periphery_IO::JOY_MODE.write(Periphery_IO::JOY_MODE::create());
|
||||
Periphery_IO::JOY_BAUD.write(Periphery_IO::JOY_BAUD::create());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,6 +24,9 @@ namespace JabyEngine {
|
|||
static constexpr auto DebugY = 0;
|
||||
static constexpr auto DebugScale = 1.0;
|
||||
|
||||
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
|
||||
Periphery::setup();
|
||||
|
||||
__debug_boot_color_at(::JabyEngine::GPU::Color24::White(), DebugX, DebugY, DebugScale);
|
||||
enable_DMA();
|
||||
|
||||
|
|
Loading…
Reference in New Issue