USB Super Magic Drive

For hardware talk only (please avoid ROM dumper stuff)
User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

USB Super Magic Drive

Post by KanedaFr » Wed Jul 21, 2010 8:23 am

Ok, this time I'll fight to find a valid solution:

I have a Super Magic Drive I use(d) to test all my dev.
It's still working but, like a lot of people, I changed my PC for a laptop...without LPT port nor floppy drive.

Since I learnt a lot about electronics (thanks to a lot of people here), I plan to make my own usb to SMD cable and software.
To do this, I plan to use Teensy and connect it to the parallel port of the SMD.
Using Charles's SMD technical document and ucon64 source code, I have the protocol used to talk with the SMD.
The parallel port is well described onBeyondLogic website

So here come my questions before I jump on soldering and coding:
1/ what port should I use : SSP/EPP/ECP ? I assume it's EPP but I would like to be sure
2/ can you confirm me it the !data and !address strobe which select if you're sending an address or a data ?
3/ what is the delay between each pin state change (see The EPP Handshake) ?
4/ do you think it is a valid project ? ;)

I know I could buy an ExpressCard or a usb2lpt but
- it's hard to find a TRUE lpt (not only for printing)
- the true one are expensive (+40€)

I'm also waiting for a reply from Usb2Lptto see if it's a valid solution

i can't wait to fix it so I could work on my light gun stuff...

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Wed Jul 21, 2010 5:36 pm

Forget about LPT. Use some thing from FTDI. For example, I use FT245BM, wich from PC side can be as high speed COM port or FT2xx device with throughput very close to 1MByte/s. And from other side it has 8bit data port, WR and RD strobe and statuses: RXFull, TXEmpty. PowerEnable. Also, it has bitbang mode (yes, you can toggle pins by hand over USB or read pin state). ;)

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Wed Jul 21, 2010 9:44 pm

Actually I want to forget LPT, I'm using a high speed USB Atmel IC which I could configure to anu class I want
My question is how to simulate the parallel access to the SMD

PC->USB->IC->parallel->SMD

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jul 22, 2010 3:20 am

Ah. OK. You can use for example AT90USB162, realize on it full LPT emulation. But this not so hard. You must write driver, wich will intercept access to "virtual" LPT IO ports. For example, write to BASE+0x00 must transmit that byte to device via USB and device will set outputs according to that byte. And vice versa: reading from BASE+0x00 will cause exception, wich read device status and update "virtual" IO port state. That is hard. So, your choice: make full true LPT emulator or make your own data transport, wich much easer.

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Thu Jul 22, 2010 7:46 am

HardWareMan wrote:Ah. OK. You can use for example AT90USB162,
Teensy is based on the AT90USB1286, so no problem for the usb part ;)
or make your own data transport, wich much easer.
it's my goal....


Teensy is 8 or 16MHz so I think I must add some delay...
I read bouncing could occurs if you're too fast
got some info on this delay ?

About connection, I wonder if I really need to protect my data pins like this
Image

EDIT : talk about EPP which is not needed
Last edited by KanedaFr on Thu Jul 22, 2010 8:15 am, edited 2 times in total.

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Thu Jul 22, 2010 8:12 am

making more research...it seems I just need to use a SPP...
so no addr/data read/write
I only need BUSY, STROBE, Data...

For more detail, see this link

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Thu Jul 22, 2010 8:30 am

I've got it. OK. You want IEEE1284 specifications? Take it. Don't forget, that EPP/ECP device reguire proper handshake, before LPT port will switch to EPP/ECP mode (without this handshake it will stay in SPP/BiDi mode). Protocol and timings are descripted in this pdf too. Go on.

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Sun Jul 25, 2010 10:01 am

Thanks for the spec, got more details than I found.
It seems I actually need some pull up resistor, etc... on the lines
It's not a simple pin-to-cable connection (I thought it was done on device side)....

I'll perhaps use a "IEEE1284 TRANSCEIVER" fro Fairchild, STPhilips or TI

Why everything is complex on electronics!?
Why can't I only use wire? :lol:

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sun Jul 25, 2010 6:53 pm

KanedaFr wrote:Why everything is complex on electronics!?
Why can't I only use wire? :lol:
SPP and BiDi mode uses open collector as output. So, it must be pulled up (in port it pulled up by 4,7k resistors). That scheme cannot use high frequences, so bandwidth will be limited approximately 50-70KBytes per second. But, if you made correct handshake for EPP or ECP mode, port will involve complementary output buffers, wich no require pull up/down and drive wire with strong signal. So, upper frequency become much higher, and you will get about 1MByte per second. So, what you choose? I think, ECP mode is ideal (DMA - strong thing :3), but EPP not bad too. And not so hard to implement to controller or CPLD (all protocol use acknowledge signal, so port will be correctly operate at the speed of the slowest device).

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Sun Jul 25, 2010 8:15 pm

I saw how much it should be "easy" to make for someone experimented (even half-experimented) but, while i think it should something easy to do, i was wrong....
I was about to use SPP, basic busy-data-ack solution...

If I understood, all I have to do is use this kind of transeiver between my IC and the DB25, it will handle pull up and buffer for me.
If it's the case, I'll go with this method! :)

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Mon Jul 26, 2010 4:56 am

Yes. I already done this, about 16 years ago. ;)
Image
I think main idea is clear.

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Mon Jul 26, 2010 7:45 am

wow!
you plugged the genny to LPT ? :)

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Mon Jul 26, 2010 8:42 am

KanedaFr wrote:wow!
you plugged the genny to LPT ? :)
Yeah. In early 90s. And my program saves SRAM in file, and use DBF file as BD. ;)
This is it (no hardware attached, sorry - it is in the past):
Image
And this is DBF file:
Image
Image
First version was SCSI8, I had ISA PCB from old scanner, 8 bit SCSI. Then, that PCB was burned and I switch to LPT (there was a strong slowdown!). Choice of LPT was argumented: there are no ISA on my newer PC's...

And moreover. Before I had IBM PC, I was made homebrew 8bit computer Orion.128, and use it till end of 90s. And my first MD was connected to Orion via... ...Z80 bus! Yes, I cut BUSRQ signal and use some logic to take Z80 bus in MD, then control this bus by hand with Orion. First my readed program was "Battle Toads and Double Dragon" sound driver, wich prompted me bankswitching method. And then... Then I made some crazy stuff, which did not survive to the present days... OK, too much letters, I'm done.

User avatar
KanedaFr
Administrateur
Posts: 1118
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Mon Jul 26, 2010 3:08 pm

I just read the AT90USB1286 has internal pull-up resistors ...
So perhaps I could use direct wire connection (SPP mode of course) no ?

I'm not the only one who is trying to do this....
This guy made it work with direct wire connection

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Mon Jul 26, 2010 6:06 pm

Wait. You trying emulate PC side, right? So, you do not need any buffers. AVR have quite enough strong outputs. But, what about target device? What you know about it? Can I see some docs about it (if you have it)?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests