From b43047a20feba0ff1eaf6a49007e2d5402df3d46 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Sun, 26 May 2019 00:50:04 +0200 Subject: escc: introduce a selector for the register bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Sparc and PowerMac, the bit 0 of the address selects the register type (control or data) and bit 1 selects the channel (B or A). On m68k Macintosh and NeXTcube, the bit 0 selects the channel and bit 1 the register type. This patch introduces a new parameter (bit_swap) to the device interface to indicate bits usage must be swapped between registers and channels. For the moment all the machines use the bit 0, but this change will be needed to emulate the Quadra 800 or NeXTcube machine. Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau [thh: added NeXTcube to the patch description] Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190831074519.32613-5-huth@tuxfamily.org> Signed-off-by: Thomas Huth --- include/hw/char/escc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/char/escc.h b/include/hw/char/escc.h index d5196c5..794b653 100644 --- a/include/hw/char/escc.h +++ b/include/hw/char/escc.h @@ -51,6 +51,7 @@ typedef struct ESCCState { struct ESCCChannelState chn[2]; uint32_t it_shift; + bool bit_swap; MemoryRegion mmio; uint32_t disabled; uint32_t frequency; -- cgit v1.1