Files
weee/core/broadway/mmio/vi.hpp
T

84 lines
1.6 KiB
C++

#pragma once
#include <ircolib/types.hpp>
namespace weee::core {
struct mem;
struct video_interface {
video_interface(mem &);
void write16(ircolib::u32, ircolib::u16);
void write32(ircolib::u32, ircolib::u32);
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;
} dcr;
union HTR0 {
struct {
unsigned hlw : 9;
unsigned : 7;
unsigned hce : 7;
unsigned : 1;
unsigned hcs : 7;
unsigned : 1;
};
ircolib::u32 raw;
} htr0;
union HTR1 {
struct {
unsigned hsy : 7;
unsigned hbe : 10;
unsigned hbs : 10;
unsigned : 5;
};
ircolib::u32 raw;
} htr1;
union VTR {
struct {
unsigned equ : 4;
unsigned acv : 10;
unsigned : 2;
};
ircolib::u16 raw;
} vtr;
union VTO {
struct {
unsigned prb : 10;
unsigned : 6;
unsigned psb : 10;
unsigned : 6;
};
ircolib::u32 raw;
} vto, vte;
union BBI {
struct {
unsigned bs1 : 5;
unsigned be1 : 11;
unsigned bs3 : 5;
unsigned be3 : 11;
};
ircolib::u32 raw;
} bbei, bboi;
};
} // namespace weee::core