From aff63a211e9b1e397adb9dce726d8153beb96dcd Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 30 Dec 2020 16:55:06 +0100 Subject: - 7seg is a subdevice of the VIA 6522 now, registering to a small sub-bus --- emu/7seg.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'emu/7seg.h') diff --git a/emu/7seg.h b/emu/7seg.h index 0256f83..f6e1e98 100644 --- a/emu/7seg.h +++ b/emu/7seg.h @@ -6,6 +6,10 @@ #include #include +#ifdef WITH_GUI +#include +#endif + // VIA connected on PORTA to 3 wires leading to the 3 coupled 74HC595 // shift register which enable the ROM address lines to read the LED // segment data (cells 0-15 contain the encoded 7 segments of 16 hexdigits) @@ -16,9 +20,6 @@ // +---- RCLK // +----- SRCLK enum { - PORTA = 0x01, - DDRA = 0x03, - SER = 0x01, RCLK = 0x02, SRCLK = 0x04 @@ -27,17 +28,14 @@ enum { typedef struct seg7_t { device_t base; - - uint16_t addr; - - uint8_t ddr; + uint16_t shift; uint16_t latch; bool debug; } seg7_t; -void seg7_init( seg7_t *seg, uint16_t addr, bool initialize ); +void seg7_init( seg7_t *seg, bool initialize ); uint8_t seg7_read( void *obj, uint16_t addr ); void seg7_write( void *obj, uint16_t addr, uint8_t data ); -- cgit v1.2.3-54-g00ecf