getting conditional branch now

This commit is contained in:
2026-05-12 17:55:05 +02:00
parent 2be9570aa9
commit df68e42d61
8 changed files with 176 additions and 4 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <broadway/mmio/vi.hpp>
#include "ircolib/log.hpp"
namespace weee::core {
void video_interface::write(ircolib::u32 addr, ircolib::u16 value) {
addr -= 0x0c002000;
switch (addr) {
case 2:
dcr.raw = value;
break;
default:
ircolib::panic("video_interface::write to unimplemented addr 0x{:04X} with value 0x{:04X}", addr, value);
}
}
} // namespace weee::core
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include <ircolib/types.hpp>
namespace weee::core {
union DCR {
struct {
unsigned e : 1;
unsigned r : 1;
unsigned i : 1;
unsigned d : 1;
unsigned le0 : 2;
unsigned le1 : 2;
unsigned fmt : 2;
unsigned : 6;
};
ircolib::u16 raw;
};
struct video_interface {
void write(ircolib::u32, ircolib::u16);
private:
DCR dcr{};
};
} // namespace weee::core