EXP port as UART? For MD/GENNY soundcard project...
EXP port as UART? For MD/GENNY soundcard project...
My HW friend developed FM board for arduino. FM emulation runs on modern 32bit MCU. He sends data and rest do PCB board (stereo song replay).
It is based on OPL emulation (soundblaster16,adlib).
So my question is can EXP port works as UART? When yes we will have 8euro soundcard which doesnt consume 68000 or Z80 time for music.
So YM2612 can be used for effects only (guns, kicking, explosions etc etc)... So we can have massive soundsystem like on arcade maschines was...
Here is board:
It is based on OPL emulation (soundblaster16,adlib).
So my question is can EXP port works as UART? When yes we will have 8euro soundcard which doesnt consume 68000 or Z80 time for music.
So YM2612 can be used for effects only (guns, kicking, explosions etc etc)... So we can have massive soundsystem like on arcade maschines was...
Here is board:
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
All 3 ports got up to 2400 baud serial mode. No hardware handshake though
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Parallel arrangement will result in a lot greates speeds on MD. 4bits for data I/O and 2 for handshake got me ~60KB/sec comms to PC over LPT port.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Actually, it's 4800 baud. All three controller ports (the two normal control ports + the exp port on the MD1) can be used for serial. There are three registers for each port, starting at 0xA1000F:
TxData - write a byte to send
RxData - read a byte received
S-Ctrl - controls serial:
b7-6: baud rate = 00 = 4800, 01 = 2400, 10 = 1200, 11 = 300
b5: serial in enable = 0 = no serial in, 1 = serial in from TL
b4: serial out enable = 0 = no serial out, 1 = serial out on TL
b3: read int enable = 0 = no int, 1 = int on input byte ready
b2: read error status = 0 = no err, 1 = error on RxD
b1: read ready status = 0 = no byte, 1 = input byte ready
b0: transmit buffer full status = 0 = not full, 1 = TxD full
So if you were using EXP for serial, the registers would be 0xA1001B, 0xA1001D, and 0xA1001F. Note that the serial is not full duplex - you should enable reading or writing, not both. Use the other parallel bits for control lines, like CTS and RTS. If you enable the read byte ready int, that will be INT2 just like for lightguns.
TxData - write a byte to send
RxData - read a byte received
S-Ctrl - controls serial:
b7-6: baud rate = 00 = 4800, 01 = 2400, 10 = 1200, 11 = 300
b5: serial in enable = 0 = no serial in, 1 = serial in from TL
b4: serial out enable = 0 = no serial out, 1 = serial out on TL
b3: read int enable = 0 = no int, 1 = int on input byte ready
b2: read error status = 0 = no err, 1 = error on RxD
b1: read ready status = 0 = no byte, 1 = input byte ready
b0: transmit buffer full status = 0 = not full, 1 = TxD full
So if you were using EXP for serial, the registers would be 0xA1001B, 0xA1001D, and 0xA1001F. Note that the serial is not full duplex - you should enable reading or writing, not both. Use the other parallel bits for control lines, like CTS and RTS. If you enable the read byte ready int, that will be INT2 just like for lightguns.
Thanks a lot for the info. It's a pity the port isn't full duplex and has no Tx interrupt
If I want to use controller port 1, then registers are 0xA1000F (TxData), 0xA10011 (RxData) and 0xA10013 (S-Ctrl), right? What's the pinout for TX and RX pins? Does it use standard DB-9 pinout (e.g. pins 2 and 3 for Rx and Tx)?
If I want to use controller port 1, then registers are 0xA1000F (TxData), 0xA10011 (RxData) and 0xA10013 (S-Ctrl), right? What's the pinout for TX and RX pins? Does it use standard DB-9 pinout (e.g. pins 2 and 3 for Rx and Tx)?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Yeah, but consider when it was made... you're lucky it has interrupts at all, and goes a HIGH as 4800 baud!doragasu wrote:Thanks a lot for the info. It's a pity the port isn't full duplex and has no Tx interrupt
Right.If I want to use controller port 1, then registers are 0xA1000F (TxData), 0xA10011 (RxData) and 0xA10013 (S-Ctrl), right?
Slight goof on my info above... serial in is on the TR line, and serial out is on the TL line. The info above incorrectly states serial in was also on TL.What's the pinout for TX and RX pins? Does it use standard DB-9 pinout (e.g. pins 2 and 3 for Rx and Tx)?
TR and TL are the button lines on the DB9 - TR = C, and TL = B.
I put them both on TL in the previous post because there's an error in the figure on pg 105 of the Genesis Software Manual showing TL being both out and in. So that means that a correction to the S-Ctrl is needed - b5 controls the serial in on TR, not TL.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
You can cause an interrupt on a transfer by pulsing the TH line from the other side.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
It's been out for many years now. You can find links to a PDF version on the boards here somewhere... just click the search button at the top of the page.doragasu wrote:Genesis software manual?
Is that some kind of leaked document? Sounds interesting
The original had some missing pages, and there have been corrections to some of the info. I seem to remember a couple of threads on the manual and mistakes in it.