Interfacing the MD's Serial Ports to a PC

For hardware talk only (please avoid ROM dumper stuff)
MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Interfacing the MD's Serial Ports to a PC

Post by MintyTheCat » Tue Jun 18, 2013 8:14 pm

Hello all,

does anyone have a Schematic that I could use to 'safely' connect my MD 1 up to my Linux Machine over 232?

Thanks.

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Tue Jun 18, 2013 8:39 pm

I don't have a schematic, but you probably want to look into the MAX232 level translator IC. That said, the max baud rate is really low. You can get better throughput with a 4-bit parallel protocol.

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Tue Jun 18, 2013 8:58 pm

Mask of Destiny wrote:I don't have a schematic, but you probably want to look into the MAX232 level translator IC. That said, the max baud rate is really low. You can get better throughput with a 4-bit parallel protocol.
I've used MAX232 and its relatives in the past, I was wondering how the lines should be pulled and what value resistors and capacitors I should use though. Art transfer speed I really just wanted to pass very small amounts of data back and forth but I could use parallel too later. Do you have any ideas for safe values at all?

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Tue Jun 18, 2013 10:00 pm

I don't have any direct experience using the MAX232, but based on a quick perusal of the datasheet, some example schematics and what I know about the gamepad ports, I don't think you'll need any resistors. The datasheet suggests you should use 1.0 uF capacitors for the 232. Other variants require different values.

This thread has some information about which pins and registers to use for serial operation: viewtopic.php?p=18483

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Jun 19, 2013 12:46 am

If you really want to do this via serial, get a USB to TTL serial cable. That will connect directly to the controller port without any level shifting.

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Thu Jun 20, 2013 10:49 am

Yes, I actually bought a USB-RS232 converter and a couple of TeensyUSBs and forgot that I had them.

I had a look at the MD's Schematic and I can see that the Serials are connect to EM1X Ports on IC315-5309. My question: are these standard RS232 level lines at +-11V ? Also, am I being too paranoid in wanting to use opto-isolators on the port?

Cheers.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Jun 20, 2013 10:57 am

They are 0 to 5V
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

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Thu Jun 20, 2013 11:39 am

TmEE co.(TM) wrote:They are 0 to 5V
I see, so we must use the level-shifter to get the +-11V on the PC side down to 0 to 5V.

Thanks for the Info.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Jun 20, 2013 1:10 pm

That is what you need the MAX232 or equivalent for. It'll work as is.
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

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Fri Jun 21, 2013 5:49 pm

TmEE co.(TM) wrote:That is what you need the MAX232 or equivalent for. It'll work as is.
I have my MAX232 here and I started to draw up my Schematic. However, I wanted to have confirmed that the Pins connected to 315-5309's EM3X are correct as I have no Oscilloscope to check the Output at this time and worry about damaging the Pins. Can someone confirm that Pins for RS232 Serial are as:

1,2,3,4 : UP, DOWN, LEFT, RIGHT
5: VCC
6: TL (Serial Send TX)
7: TH (Serial Interrupt)
8: GND
9: TR (Serial Receive RX)

I will put my Schematic together along with a Test-Program to help out anyone who is starting to work with Real MD Hardware :wink:

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Fri Jun 28, 2013 7:15 pm

Hello Blokes,

in case anyone will read this and would like to know:

[MD Ext.-Port Set to Serial-Mode]

SCTRL = 0xB0 : Baud=1200bps, Serial-In, Serial-Out, No-Interrupt.

Pins:

TX = TL = 6
RX = TR = 9

Make sure that you Ground Pin 8

I also pulled the TL and TR up to +5V using 10K Resistors.

I wrote a quick Test to send alternating Bytes over the Port to my Bus-Pirate v3 in UART-Mode set to automatic update for all Data received.

I need to take the MD's 5V down to something that my Teensy3 can use, so around 3.3V. I'll update you once I've sorted the Hardware out.

Cheers.

mder
Newbie
Posts: 2
Joined: Wed Jul 03, 2013 1:32 am

Post by mder » Wed Jul 03, 2013 3:38 am

How about using Sweet Rammy?
http://68000.web.fc2.com/sram.html
This tool can perform reading and writing of SRAM,FRAM,EEPROM or FlashROM using a serial port.
Of course, reading of a commercial game can also be performed.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Wed Jul 03, 2013 9:42 am

WOW! Sweet Rammy seems to be exactly what I was looking for !!

mder
Newbie
Posts: 2
Joined: Wed Jul 03, 2013 1:32 am

Post by mder » Wed Jul 03, 2013 10:53 am

The present correspondence procedure is transmitted and received by HEX data using terminal software.(HyperTerm,Teraterm,etc.)
It is necessary to change into BIN from HEX data.

Supplement: With the present version, Reading and Writing of EEPROM correspond only MODE1(7bitsWORD).

All the Megadrive games put on the market in Japan can be read.
The following games also correspond.
*Phantasy Star - Hukkokuban (SMS Game)
*Virtua Racing (SVP used)
*Super Street Fighter II - The New Challengers (Memory mapper used)
*Sonic and Knuckles & Sonic 2 (Include Extra data)

The writing of FlashROM of 29Fxxx series is made.
Creation of an original Flash cartridge can be performed.

I think that it is useful also to those who study Megadrive(Genesis) since Sweet Rammy can carry out operation of the address directly.

Please try.

MintyTheCat
Very interested
Posts: 484
Joined: Sat Mar 05, 2011 11:11 pm
Location: Berlin, Germany

Post by MintyTheCat » Fri Jul 05, 2013 4:45 pm

konnichiwa MDer, ogenki desuka?

I had a look at your Schematic and your Idea for using the M68K's HALT Pin. Yes, this was used all the way back to the 6800 uCs for single-stepping. My only concern was that by removing the M68K that the MD's Custom ICs would fail although I had wished to try it out in the future - cheers.

I tried your SRAM.bin using my Mega Everdrive but I get a flickering Screen.

Machine: MD #1
PAL, German

It might be that your Program is built for NTSC Machines.

We are actually putting a Project together to give the MD Developer a Command-Monitor. If you'd like to have more Information then please Message me.

Cheers.

Post Reply