|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
Yeah, that's the problem, the fifo doesn't work as expected so when more than one character is still in the DART device the order is reversed as it implements a stack rather than a FIFO. So as long as the Rainbow reads out the characters "fast enough" the board driver should work but if the characters are arriving too fast, eg little time between the characters, big confusion may happen.
My change fixes that and it should potentially also fix a lot of other board drivers that relies on polled serial routines or that has lots of higher level interrupts delaying the readout. Also try higher bit rates as it may increase the space between the characters, depending on your typing speed.
You can cherry pick my PR and see if it helps, I think it will.
Because I can
|
|
|
|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
I just merged the new fifo code in z80dart driver, please test it and see if it makes a difference.
Because I can
|
|
|
|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
I have decoded the 7201 setup: http://pastebin.com/6eRL5kU5It resets the 7201 a lot and it even touches synchronous modes for a while which is not supported by the z80dart but settles as follows: - CLOCK BIT: 00
* :upd7201:chaB 00 <- 18 Channel Reset command (011b)
* :upd7201:chbB 04 <- 4d Odd Parity enabled, Async mode 2 stop bits, 16x clock
* :upd7201:chbB 03 <- 41 Receiver enabled, 7 bit
* :upd7201:chbB 05 <- 28 Transmitter enabled, 7 bit, DTR inactive
* :upd7201:chbB 01 <- 15 Interrupt on received character, Ext Status, status affect vector
* :upd7201:chbB 02 <- 00 No DMA, Non vectored interrupts D4 D3 D2, p10=RTSB
* :upd7201:chaA 00 <- 18 Channel Reset command (011b)
* :upd7201:chaA 02 <- 10 Interrupt vector
* :upd7201:chaA 04 <- 45 Odd Parity enabled, Async mode 1 stop bit, 16x clock rate
* :upd7201:chaA 03 <- 41 Receiver enabled, 7 bit
* :upd7201:chaA 05 <- 28 Transmitter enabled, 7 bit, DTR inactive
* :upd7201:chaA 01 <- 10 Interrupt on received character
ff to COMM.CONTROL REGISTER
* :upd7201:chaA 00 <- 01 As you can see it expects 7 bit communications with odd parity enabled on both channels but only 1 stop bit on channel A, so try that. Handshakes should hookup RTSB and this is already done in the rainbow driver. I didn't try the terminal, what does your command line look like?
Because I can
|
|
|
|
Joined: Apr 2012
Posts: 193
Senior Member
|
Senior Member
Joined: Apr 2012
Posts: 193 |
I use the bit banger on Windows with a cmd.line like mess64 -bitbngr socket.127.0.0.1:10000 Then, i connect to 127.0.0.1 with Putty/Windows. I actually cant get a connection at other speeds than 9600, plus i have to disable handshake everywhere (via our GUI, and in PuTTY/Windows, where i selected 8,N,1, 9600 and XON/OFF software handshake). Additionally, i must set FDXA (no flow control) in Rainbow SETUP (press F3, page down, set 8N, 9600 for both directions, ESC to leave, then please perform a full reset cycle). I can send text from the Rainbow to Putty in Terminal Mode (T), but as soon as the Rainbow _receives_ text sent from Putty, transmission stops (nothing can be typed anymore).FDXB (full modem control) does lockup (no transmission, and printf on the console goes crazy while the Rainbow BIOS tries to poke register $06 [comm_bitrate_w] repeatedly... which seems incorrect). I could not get hardware handshake on a real machine either (KERMIT/Rainbow <-> KERMIT/W95)...
Part of the problem could be that no handshake (FDXA) is less than ideal, and full handshake (FDXB) requires a modem like setup (Carrier Detect and all) from a BIOS perspective.
Last edited by Bavarese; 11/06/16 01:56 PM.
|
|
|
|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
I need the exact command line to be able to duplicate what you are doing, and instructions on how to manage the machine, eg how do I enter the "Rainbow setup"? Are you talking about the MAME menu or a menu in the Rainbow graphical UI?
8N9600 is the same number of bits as 7O9600 so it would seem to work until you get parity error where the 7201 would do need to issue a Error reset command.
Last edited by Edstrom; 11/06/16 02:37 PM.
Because I can
|
|
|
|
Joined: Apr 2012
Posts: 193
Senior Member
|
Senior Member
Joined: Apr 2012
Posts: 193 |
Rainbow SET-UP can be invoked by hitting key F3 (*), page down TWICE, set 8N, 9600 for both directions. Navigate from setup page to setup page with PAGE DOWN, use cursor keys, change values with UP and DOWN. Finally save all parameters with SHIFT-S (quit SET-UP by pressing F3).(*) You may want to reassign F3 to another key. See DEC_LK201.CPP and this one A full reset cycle is required according to the manual if anything is changed beyond TX or RX baud rates. You could also use the NVRAM file here The bitbanger setup was described by "Rfka01" in the DMV thread. He also used XON/OFF btw. The difference to DMV is that the Rainbow does not have slots (and i also do not use a virtual port). So the command line really is: mess64 -window -debug rainbow -frameskip 10 -bitbngr socket.127.0.0.1:10000Full documentation for the DEC Rainbow 100 B is at http://www.os2site.com/dec/rainbow/doc2/index.html Let me recommend two manuals: a. Technical Documentation from April 1985 b. Technical Addendum for 100-A and 100-B Putty is not invoked via command line. Instead, it is set to match the parameters used in SET-UP. My system is Win 7 Pro 64 bit. If other questions arise, it might be easier to ask Shattered. He helped me with the baud rate generator.
Last edited by Bavarese; 11/06/16 04:55 PM.
|
|
|
|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
Thanks, so let me guess that you are using this command line:
mame64.exe rainbow -rs232_a null_modem -bitbngr socket.127.0.0.1:1234 -window
The information in this line that I needed is that you use the 'rainbow' model, not rainbow100a or rainbow190 and that you connect to rs232_a not the rs232_b, and that is why I asked.
Because I can
|
|
|
|
Joined: Mar 2006
Posts: 1,079 Likes: 6
Very Senior Member
|
Very Senior Member
Joined: Mar 2006
Posts: 1,079 Likes: 6 |
Technically the rainbow does have one slot: the fixed disk WD1010 controller card is optional inside. Its afaik the only card which can fit in said slot.
LN
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
|
|
|
|
Joined: Aug 2015
Posts: 406
Senior Member
|
Senior Member
Joined: Aug 2015
Posts: 406 |
Like the Mac SE Nubus slot, with room for a single Nubus card, but there were different cards of course.
I think I have the right hookup now, what am I expected to do at the putty terminal? I poke it and I get no characters going either way.
Because I can
|
|
|
|
Joined: Apr 2012
Posts: 193
Senior Member
|
Senior Member
Joined: Apr 2012
Posts: 193 |
Oops, the section -rs232_a null_modem is missing in my invocation. Instead, i see 4 lines in Rainbow.cpp saying
MCFG_DEVICE_MODIFY("rs232_a")
MCFG_SLOT_DEFAULT_OPTION("null_modem")
MCFG_DEVICE_MODIFY("rs232_b")
MCFG_SLOT_DEFAULT_OPTION("printer")
Putty connects directly to the bitbanger at 10000. You may also have to specify "local echo" both in Putty and in Rainbow SETUP (on second screen after 1st Page Down). This is also the place where the more obscure comms. features are hidden (Carrier Detect length, BREAK ...) --- @Edstrom: if both machines are properly connected, you should be able to see what is typed on the other end.
(Putty requires an additional carriage return / line feed before it sends anything).
BUG: had to toggle "Handshake" On and Off in MESS' GUI (invoked by TAB) from time to time in my experiments (...).
Last edited by Bavarese; 11/06/16 06:38 PM.
|
|
|
2 members (AJR, Kale),
273
guests, and
1
robot. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,320
Posts121,923
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|