64 uint64_t idata = 0, odata = 0;
67 int on, new_cursor_x, new_cursor_y;
78 switch (relative_addr) {
81 debug(
"[ bt431: write to Low Address Byte, " 82 "0x%02x ]\n", (
int)idata);
86 debug(
"[ bt431: read from Low Address Byte: " 87 "0x%0x ]\n", (
int)odata);
92 debug(
"[ bt431: write to High Address Byte, " 93 "0x%02x ]\n", (
int)idata);
97 debug(
"[ bt431: read from High Address Byte: " 98 "0x%0x ]\n", (
int)odata);
103 debug(
"[ bt431: write to BT431 register 0x%04x, " 104 "value 0x%02x ]\n", btaddr, (
int)idata);
110 bt431_sync_xysize(d);
114 debug(
"[ bt431: read from BT431 register 0x%04x, " 115 "value 0x%02x ]\n", btaddr, (
int)odata);
125 debug(
"[ bt431: unimplemented write to address " 126 "0x%x, data=0x%02x ]\n", (
int)relative_addr,
129 debug(
"[ bt431: unimplemented read from address " 130 "0x%x ]\n", (
int)relative_addr);
136 TODO: This is from bt459!
139 new_cursor_x = (d->
bt431_reg[BT431_REG_CXLO] & 255) +
140 ((d->
bt431_reg[BT431_REG_CXHI] & 255) << 8) - 370;
141 new_cursor_y = (d->
bt431_reg[BT431_REG_CYLO] & 255) +
142 ((d->
bt431_reg[BT431_REG_CYHI] & 255) << 8) - 37;
145 on = d->
bt431_reg[BT431_REG_CCR] ? 1 : 0;
174 if (!(d->
bt431_reg[BT431_REG_CCR] & 1)) {
uint64_t memory_readmax64(struct cpu *cpu, unsigned char *buf, int len)
unsigned char cur_addr_lo
struct vfb_data * vfb_data
unsigned char cur_addr_hi
void dev_bt431_init(struct memory *mem, uint64_t baseaddr, struct vfb_data *vfb_data, int planes)
int dev_bt431_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, unsigned char *data, size_t len, int writeflag, void *)
#define CHECK_ALLOCATION(ptr)
void memory_writemax64(struct cpu *cpu, unsigned char *buf, int len, uint64_t data)
uint32_t bt431_reg[DEV_BT431_NREGS]
void memory_device_register(struct memory *mem, const char *, uint64_t baseaddr, uint64_t len, int(*f)(struct cpu *, struct memory *, uint64_t, unsigned char *, size_t, int, void *), void *extra, int flags, unsigned char *dyntrans_data)
void dev_fb_setcursor(struct vfb_data *d, int cursor_x, int cursor_y, int on, int cursor_xsize, int cursor_ysize)