Update more converted IO
This commit is contained in:
@@ -13,11 +13,11 @@ namespace JabyEngine {
|
||||
static constexpr auto Height = PublicDisplay::Height;
|
||||
|
||||
#ifdef JABYENGINE_PAL
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::PAL();
|
||||
static constexpr auto DisplayMode = GPU_IO_Values::DisplayMode::PAL();
|
||||
static constexpr uint16_t ScanlinesV = 288;
|
||||
static constexpr auto DisplayRange = PositionI16::create(78, 35);
|
||||
#else
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::NTSC();
|
||||
static constexpr auto DisplayMode = GPU_IO_Values::DisplayMode::NTSC();
|
||||
static constexpr uint16_t ScanlinesV = 240;
|
||||
static constexpr auto DisplayRange = PositionI16::create(76, 16);
|
||||
#endif //JABYENGINE_PAL
|
||||
@@ -78,7 +78,7 @@ namespace JabyEngine {
|
||||
|
||||
struct Receive {
|
||||
static void prepare() {
|
||||
GPU_IO::GP1.set_dma_direction(GPU_IO::GPUSTAT::DMADirection::CPU2GPU);
|
||||
GPU_IO::GP1.set_dma_direction(GPU_IO_Values::GPUSTAT::DMADirection::CPU2GPU);
|
||||
reset_cmd_buffer();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace JabyEngine {
|
||||
using namespace Periphery_IO;
|
||||
|
||||
static void connect_to(uint16_t port) {
|
||||
JOY_CTRL.write(Value::JOY_CTRL::create_for(port));
|
||||
JOY_CTRL.write(Periphery_IO_Values::JOY_CTRL::create_for(port));
|
||||
busy_loop(500);
|
||||
}
|
||||
|
||||
static void close_connection() {
|
||||
JOY_CTRL.write(Value::JOY_CTRL::close());
|
||||
JOY_CTRL.write(Periphery_IO_Values::JOY_CTRL::close());
|
||||
}
|
||||
|
||||
static void send_byte(uint8_t byte) {
|
||||
while(!JOY_STAT.is_ready_transfer());
|
||||
JOY_TX_DATA.write(Value::JOY_TX_DATA::create(byte));
|
||||
JOY_TX_DATA.write(Periphery_IO_Values::JOY_TX_DATA::create(byte));
|
||||
}
|
||||
|
||||
static uint8_t read_byte() {
|
||||
@@ -30,8 +30,8 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
static void acknowledge() {
|
||||
while(JOY_STAT.read().is_set(Value::JOY_STAT::ACKIrqLow));
|
||||
JOY_CTRL.write(JOY_CTRL.read().set(Value::JOY_CTRL::ACK));
|
||||
while(JOY_STAT.read().is_set(Periphery_IO_Values::JOY_STAT::ACKIrqLow));
|
||||
JOY_CTRL.write(JOY_CTRL.read().set(Periphery_IO_Values::JOY_CTRL::ACK));
|
||||
|
||||
Interrupt::ack_irq(Interrupt::Periphery);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user