?

Log in

No account? Create an account
Deunan
Improving the hardware 
25th-Apr-2009 01:40 am
Serial link: poor man's answer to broadband adapter shortage (and pricing). It's a cheap way to transfer data between PC and Dreamcast (including dumping your own BIOS and FLASH) and pretty much the only option if you're considering homebrew software. Sure, demos and emulators can be burned onto CDs but for testing your own code you'll need a more robust delivery method :)

Some time ago I mentioned that most serial link projects out there are overly complicated. Perhaps it's because many were conceived years ago when every PC had at least one RS232 port and USB chips were expensive. I'm about to show you it can be made really simple.

I'm going to skip all the technical details and going to assume you already know:
- what is RS232 and it's limitations
- why we should stick to low-voltage signaling
- what is USB and why use it

First you'll need FT232 chip from FTDI. It's exactly what we want, a simple yet fast USB to serial converter with low-voltate I/O. And by "chip" I actually mean a ready-made interface like this one:



It can be powered from USB line and has internal 3.3V low drop regulator - so all it takes to make it work is two short wires: one to route power supply, one to connect LDO output with voltage reference pin for I/O.

Now for the Dreamcast part. I found it impossible to purchase a connector that would fit the serial port so it had to go. You won't miss it, trust me.
First cut the connector assembly in two, with a small saw blade or a file. Take your time, you don't want to damage anything on the board (hence the black tape by the way). Pay attention to where exactly are you placing the cutting point, you will want both sides of the video connector intact so that the screws will hold it well in place.



Cut the connector legs with precise cutters. And I do mean precise, too big will rip them off the board, possibly damaging the traces as well. The alternative is to insert a small, flat head screwdriver (or something like that) under the pin and pry it up as you heat the soldering point with iron tip. Again, do not apply any force before melting the solder. The pins on right were cut, ones on the left were lifted.



Now desolder the shield and remove unwanted connector part completly. Don't throw it away yet, you'll need to cut off the other side mounting wing too, to provide a proper spacing for metal heat exchanger. Well you can always use a couple of small washers for that if need be.



And here's a picture of the pads cleaned, with any leftover pin remains removed.



Now you just need to solder 5 wires (RxD, TxD, RTS, CTS and ground) to the pads. I used one of the shield pads for ground, that makes it easier to fit the other four. That can be somewhat challenging with thicker wire but it pays off to have it durable and safe to twist around. Glue gun does the rest, just don't overdo it or you'll have problems fitting the covering plate/heat exchanger.



Ready to rock :) You can even see the wire I used to route USB power and I/O reference. All you need to do now is put it all back together and get friendly with dcload-serial tool.



So, does it work? Hell yes, on 3 Dreamcasts already. Same technique in every case. Works like a charm up to 1.5Mbps too. Just keep the wires to FT chip as short as possible (already long board traces and protective RC elements not helping any). If you have problems with higher speeds you can try using 5V instead of 3.3V for I/O. I belive this to be pretty safe (run it for hours on my Dreamcasts) but make no guarantees.
Some people say even 3Mbps can be achieved when protection RCs are removed but that will open a direct line to SH4 pins and you risk permanent damage to it. Obviously, no 5V in that case.

There's no galvanic separation here, wouldn't make much sense with common ground, so even if DC power supply is floating (I think) make sure you connect everything to the same AC phase. Or suffer the consequences.

Oh, and yes, the wires just stick out of the back of Dreamcast. Hey, it's cheap and works :)



UPDATE: Few more details, should be more useful now :)

First, here's a simplified pinout (only the required signals shown):



And just in case someone needs this extra bit of info, the whole serial port carries these signals on B10 down to B1 (looking at the picture above that's left to right): 3.3V, /RESET, GND, CTS, RTS, TxD, RxD, GND, SCK, 5V. And as you can see the big pads on both sides (connector shield) are also tied to ground.

This particular serial to USB converter was bought here: http://www.propox.com/products/t_93.html
It's a pretty common design but there's a manual with schematics for download on that page if you need them.

Pins VPO, VEX and VIO are connected together in my photo. That's PORTVCC, EXTVCC and IOVCC - and that means 5V on the I/O pins. This is actually by mistake, I'm short on these modules and when I swap it around I often forget to re-wire it properly for Dreamcast. As I said, it will work like this but that's unsafe.
You should connect IOVCC to 3V3OUT instead. With this module you'd just put a jumper on pins 24 and 23 and connect 22 with 18 using a short, insulated wire.

And don't forget it's a null-modem so TxD from the board goes to RxD pin on the FT chip and vice versa. Same for RTS/CTS control signals.

Hope that helps!
Comments 
13th-Feb-2011 12:19 am (UTC) - Re: Alternative USB for mass storage (Pen drive/Card reader/HDD ect)
First of all, if you would please read my blog entry again. This is about connecting DC to a PC via a serial link, but without having either true serial port on the PC side or the necessary connector on DC side. Also, easier than most other projects out there and faster too (with some modifications to dc-load tools I get stable 1.5Mbps).

You want to add USB host to a Dreamcast. You picked a pretty nice one, it's designed to be easy to use so it handles all the USB-specific stuff internally when it comes to mass storage devices. You still need to write proper support for it on the DC side though. This solution will most likely be incompatbile with code alredy written (for SD cards). Are you going to rewrite all that by yourself, because it's not exactly certain that authors of all that software will see things your way.

So... why bother, exactly? Give me one good reason. PC uplink is possible (with some new code on DC side) with just a simple USB to serial converter and SD cards are easiest to interface with DC (and working). This is how I see it. You will get the same thing but with more expensive chip and much more complicated DC code, which might actually not fit in the limited RAM space to allow booting games. So this will have another downside - homebrew only. And it does not solve any of the fundamental problems with the SD approach, that is it's still slow (maybe even slower!) and can't replace GD-drive.

Well, if that's what you want to try I'm not going to stop you. Just saying it has little use other than being fun hobby project.
So, for the connections you'll need to make, you are about right. Not too sure how much power you can draw from that 5V line, that can be a problem if you need more than some 100mA. Also, you need to create a "null-modem" here so you connect RxD with TxD and vice versa. Same with RTS/CTS pair. Look up serial port connections and you will understand why. You won't be able to use RI signal without additional logic so no suspend. It might need to be tied permanently to ground, see the datasheet.

SCK is serial clock, for synchronous transmission. You won't need it. RES is reset line, best not to mess with it :)
13th-Feb-2011 05:21 pm (UTC) - Re: Alternative USB for mass storage (Pen drive/Card reader/HDD ect)
Anonymous
1 reason would be, PC not in accessable location in relation to dreamcast other reasons OS compat, though I admit a bootable linux (or linux based OS) CD/DVD would possibly help

Why stop at just one method when others could be made, though if speed is even more an issue/DC side code too big, it would be pointless, apart from the convenience for developers on actual hardware, though the emulation of the Dreamcast is at a reasonable point now for some testing, plus has a nice debug feature

Unfortionatly I am not a coder, last time I done any sort of programming was back on the olde ZX/Acorn using basic :D

I may see if anyone else would like to look at this, the info you have given though is great and has saved me rushing out on something that I would probobly just end up destroying anyway.

What is the actual speed of the Dreamcasts serial port out of interest?

Wish I could get in touch with jj1odm, this is just one thing, that has yet to be looked at, though I guess cost could very well be one part of the issue though it's not overly expensive but it's not the cheapest either no (£17.50 for that, though it does come in it's own shell, made for easy internal install even external would look ok).

It was kinda wishfully thinking, it seems that the USB drive idea would be a nice easy fast way of uploading data including iso's especially with the last get-up I spotted with it having speciallised chips for usb storage, to help make it simple to make like your own.

Serial port
LAN
SD
USB-B PC link
Original Coders Cable

G2 Bus mods (on Dreamcasts modem port)
LAN (homebrew version)
USB-B PC link
BBA (homebrew version)

Anyway thank you for your help
14th-Feb-2011 12:33 pm (UTC) - Re: Alternative USB for mass storage (Pen drive/Card reader/HDD ect)
You can get about 150kB/s from the serial, and possibly 300 with some rather dangerous modifications - all RC protection elements must be removed and that opens a direct line to SH4 CPU. You touch that wrong way and it's bye-bye motherboard (unless you fancy BGA replacement).

Compression might help but that has to be supported on both sides, add latency, and depends on data. Chances are it's not going to help at all. Not to mention it eats up SH4 time that should be used to run the game/program rather than looking at serial data.

GD-ROM can do about 600-1200kB/s. So you see, it's much slower... SD cards use SPI rather than TTL-RS232, with some decent clock you can get more than 150kB/s that way, but still way slower than GD. True SD speed it only avaiable through it's native 4-bit protocol. That USB chip does have SPI as well but I'm not sure the speed and latency would be good enough - something to test I suppose.

Anyway, as I said I'm more interested in replacing the GD drive. I think it's better solution.
14th-Feb-2011 03:22 pm (UTC) - Re: Alternative USB for mass storage (Pen drive/Card reader/HDD ect)
Anonymous
A relpacement for the GD drive would be great, if possible...

I did give jj1odm a quick email, though I don't realy expect a reply about that.

The GD-Rom running CD's also seems to be slower at getting the data than an actual GD-Rom disc, but this is expected anyway from R media, compared to original media

I will be keeping an eye out on development and wish you all the luck in your project
This page was loaded Nov 14th 2018, 10:36 pm GMT.