getting closer and closer to the xfb copy loop in panda

This commit is contained in:
2026-05-13 11:27:28 +02:00
parent fc26f75118
commit 9c3a6789f6
9 changed files with 319 additions and 82 deletions
+74 -17
View File
@@ -2,25 +2,82 @@
#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 mem;
struct video_interface {
void write(ircolib::u32, ircolib::u16);
video_interface(mem &);
void write16(ircolib::u32, ircolib::u16);
void write32(ircolib::u32, ircolib::u32);
private:
DCR dcr{};
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