summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-07-17 21:03:35 +1000
committer Vas Crabb <vas@vastheman.com>2016-07-18 01:13:19 +1000
commit63477dd345cde3980372006e6fc229d3338bed18 (patch)
tree7dc394de20f2ad774ffd0c05390551b46b6d14ae /scripts
parent94c6feb56e2c6c802d71f55b1cb2d0fb1699b108 (diff)
HLE serial keybord compatible with Sun Type 4/5/6 connected to sun4/sun4c [Vas Crabb]
The keyboard should communicate at 1,200 Baud, but due to bugs in the SCC it's set to 9,600 Baud. The sun4c machines program the Baud rate generator dividers for the serial ports with 00:0e and the dividers for the keyboard/mouse ports with 00:7e. Therefore the ratio of Baud rates should be (0x7e + 2) / (0x0e + 2) = 128 / 16 = 8. However both the RS232 ports and the keyboard/mouse ports run at 9,600 Baud, when the keyboard/mouse ports should run at 1,200 Baud (which is 1/8 of 9,600 which matches the ratio of the divider values). I've artificially limited the rate the keyboard can transmit at to be no faster than it could at 1,200 Baud using a timer. I can remove this hack once we get correct SCC divider behaviour. I attempted to hook up the SCC interrupts to level 12 as specified in the SPARCstation-1 Programmer's Model in the table on Page 19. No interrupts seem to be generated, so either I've screwed this up somehow, the Sun isn't enabling interrupts, or there's another bug in the SCC emulation. Sorry if I've screwed it up - I won't be offended if someone replaces it wholesale. The keyboard receives the reset commands from the Sun and sends back the self test pass response, but the SCC seems to get a buffer overrun error. So it appears that the received data isn't being read out. I haven't been able to work out why.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/src/bus.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 6029427c8d9..baaaf79eddd 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -1608,6 +1608,8 @@ if (BUSES["RS232"]~=null) then
MAME_DIR .. "src/devices/bus/rs232/pty.h",
MAME_DIR .. "src/devices/bus/rs232/ser_mouse.cpp",
MAME_DIR .. "src/devices/bus/rs232/ser_mouse.h",
+ MAME_DIR .. "src/devices/bus/rs232/sparckbd.cpp",
+ MAME_DIR .. "src/devices/bus/rs232/sparckbd.h",
MAME_DIR .. "src/devices/bus/rs232/terminal.cpp",
MAME_DIR .. "src/devices/bus/rs232/terminal.h",
MAME_DIR .. "src/devices/bus/rs232/xvd701.cpp",