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...
Hi,
That's a very good project !
I'm also want to do a simple project ( Led Bliking with the I/O port)
Did you have some docs about Megadrive I/O i have read the Gen.hw.txt from Charles Mc Donald , good docs but i don't have enough information.
I'm also interested on how to set up the MD ports to use them as UARTs. 2400 bps is a very low baud rate (that's around 4 bytes per frame), but can be enough for some simple input/output devices.
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.
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)?
doragasu wrote:Thanks a lot for the info. It's a pity the port isn't full duplex and has no Tx interrupt
Yeah, but consider when it was made... you're lucky it has interrupts at all, and goes a HIGH as 4800 baud!
If I want to use controller port 1, then registers are 0xA1000F (TxData), 0xA10011 (RxData) and 0xA10013 (S-Ctrl), right?
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)?
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.
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.
Is that some kind of leaked document? Sounds interesting
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.
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.