dc's serial <-> pc's parallel
-
- Mental DCEmu
- Posts: 399
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sun May 12, 2002 4:18 pm
- Has thanked: 0
- Been thanked: 0
dc's serial <-> pc's parallel
I'm just thinking that a circuit based on something like this would be very possible and cheap: http://www.pablin.com.ar/electron/circu ... /index.htm .
This works taking the serial data and converting it to parallel using a PIC16F84
The PIC16F84 costs about 6 euros where I live and the rest of the components cost near nothing, lol. The idea is to have a parallel interface for all those computers (mainly laptops ) that don't have a serial port. The .asm program for the PIC is also on the site. Perhaps we could also have better speed rates than using an standar dc's serial to pc's serial because we know that the dreamcast serial port is not an standard rs-232 Seems something very cheap and that should be easy. We have even the program made, you only have to compile it and flash your PIC
Has anyone tried to make something similar? What do you think? Anyone interested in trying?
This works taking the serial data and converting it to parallel using a PIC16F84
The PIC16F84 costs about 6 euros where I live and the rest of the components cost near nothing, lol. The idea is to have a parallel interface for all those computers (mainly laptops ) that don't have a serial port. The .asm program for the PIC is also on the site. Perhaps we could also have better speed rates than using an standar dc's serial to pc's serial because we know that the dreamcast serial port is not an standard rs-232 Seems something very cheap and that should be easy. We have even the program made, you only have to compile it and flash your PIC
Has anyone tried to make something similar? What do you think? Anyone interested in trying?
- semicolo
- Mental DCEmu
- Posts: 328
- Joined: Mon Apr 25, 2005 1:02 pm
- Location: Three-rivers canada
- Has thanked: 0
- Been thanked: 0
- Contact:
it could work but you'd need a faster microcontroller to sustain the 1.56 Mbps of the dreamcast, maybe a scenix @ 50Mhz would be a better choice since the clock matches the baud base rate of the dreamcast and you'd get enough power to compute higher rates.
It needs adding RTS/CTS and serial out too.
what about hooking an uart to the parallel port directly ?
It needs adding RTS/CTS and serial out too.
what about hooking an uart to the parallel port directly ?
I have really no idea, but that seems really better, lol. I have worked with some PICs a while ago but much better if one of you, hardware/software guys can have a look at something about this
It could be like a very cheap way to have perhaps something interesting and speaking with some people, I know that I'm not the only one who does not have an rs-232 in his laptop too
But there's not much interest I guess
cheers
It could be like a very cheap way to have perhaps something interesting and speaking with some people, I know that I'm not the only one who does not have an rs-232 in his laptop too
But there's not much interest I guess
cheers
No. This is about a serial to parallel. Is just that seems a very cheap thing and that it could be interesting for all the people out there with a laptop, most of actual laptops (if not all) do not have an rs232, USB is just far better. Axlen was working on something but there was not much interest. I think this is really cheap perhaps. It's not the same but it could be nice .
About laptops, mine it's a Compaq Presario R3000z with an amd64. Same seems to happen with HP Pavillions. I think that the Alienwares had a serial, but the new versions do not have one either , sigh . Really, a serial port is something that you won't need with something like the USB, unless you have to connect an unusual/custom device or something old, lol
There's a serial to usb adapter. The linux kernel supports them but I have heard that does not work connecting the dreamcast, it would be slow too, but that is secondary perhaps
About laptops, mine it's a Compaq Presario R3000z with an amd64. Same seems to happen with HP Pavillions. I think that the Alienwares had a serial, but the new versions do not have one either , sigh . Really, a serial port is something that you won't need with something like the USB, unless you have to connect an unusual/custom device or something old, lol
There's a serial to usb adapter. The linux kernel supports them but I have heard that does not work connecting the dreamcast, it would be slow too, but that is secondary perhaps
Just a question. Has anyone tried an USB-> RS232 adaptor like http://www.micropik.com/provisional/ima ... ECABLE.gif ? Someone told me that this thing does not work for the dreamcast but I don't remember the reason.
dc-tool-serial-1.0.3-linux has also an option to choose the port, and the linux kernel makes a serial port in /dev/ttyUSBx for this kind of adaptors. With slip in the kernel and the device working in linux, giving the device name that we need to dc-tool-serial should work , I think
It's just that I have seen an adapter that costs about 22 euro and that I think that is linux compatible. I know, is slow but is also pretty cheap, lol
dc-tool-serial-1.0.3-linux has also an option to choose the port, and the linux kernel makes a serial port in /dev/ttyUSBx for this kind of adaptors. With slip in the kernel and the device working in linux, giving the device name that we need to dc-tool-serial should work , I think
It's just that I have seen an adapter that costs about 22 euro and that I think that is linux compatible. I know, is slow but is also pretty cheap, lol
There's one problem. I can send the data only once with dc-tool. Then I need to reboot the system to get it to work again. Looking at my processes, I don't see anything strange, perhaps unloading the module and loading it again. Don't know...this is probably a problem of dc-tool, but hey, it works
The device is the Aten UC-232A ( http://www.aten.com ) and the linux kernel module is the pl2303, according to the kernel doc (archive usb-serial.txt).
The box in which the device came, says PC or MAC, so it is MAC compatible. Does not say anything about linux but there's a driver for redhat in the cd (i'm using the kernel driver though)...really when a device works in win & mac, usually works in linux too, is not sure of course .
It has a 96byte buffer, lol and seems that is valid to connect all kind of serial devices. Does not need an IRQ. I'm also using a 64 bit linux system, perhaps that could be a problem for a dc-tool compiled for 32 bits, I don't know
The linux kernel options are:
USB Serial Converter Support -->
[*] USB Serial Console device support (EXPERIMENTAL)
[*] USB Generic Serial Driver
<M> USB Prolific 2303 Single Port Serial Driver
The serial Console device support makes a /dev/ttyUSB0 node for the device. We just need to say to dc-tool that our device is that one
Another thing. dc-tool only supports 115200bauds but this device supports over 230kbps. I don't know if the max232 of the coders cable is a limitation or just changing the source code we could have higher transfer rates
The device is the Aten UC-232A ( http://www.aten.com ) and the linux kernel module is the pl2303, according to the kernel doc (archive usb-serial.txt).
The box in which the device came, says PC or MAC, so it is MAC compatible. Does not say anything about linux but there's a driver for redhat in the cd (i'm using the kernel driver though)...really when a device works in win & mac, usually works in linux too, is not sure of course .
It has a 96byte buffer, lol and seems that is valid to connect all kind of serial devices. Does not need an IRQ. I'm also using a 64 bit linux system, perhaps that could be a problem for a dc-tool compiled for 32 bits, I don't know
The linux kernel options are:
USB Serial Converter Support -->
[*] USB Serial Console device support (EXPERIMENTAL)
[*] USB Generic Serial Driver
<M> USB Prolific 2303 Single Port Serial Driver
The serial Console device support makes a /dev/ttyUSB0 node for the device. We just need to say to dc-tool that our device is that one
Another thing. dc-tool only supports 115200bauds but this device supports over 230kbps. I don't know if the max232 of the coders cable is a limitation or just changing the source code we could have higher transfer rates
If you can try it on a linux machine.... just in case. You need the driver but also some kind of a serial dispositive node, something like the /dev/ttys . I don't know how does this thing work on macs
The driver for the device seems to work since last 2.4.x kernels but you also need the 'USB Serial Console device support' and this is as experimental on a 2.6.12-gentoo-sources . I'm going to upgrade to 2.6.15-gentoo-sources just now
The driver for the device seems to work since last 2.4.x kernels but you also need the 'USB Serial Console device support' and this is as experimental on a 2.6.12-gentoo-sources . I'm going to upgrade to 2.6.15-gentoo-sources just now
but dc-tool only lets me to choose 57600 and 115200 bauds, I think. How much is a baud in bytes? lol
I'm still having that problem of needing to reboot everything to send the data again, weird. There are not processes I could kill I think
On the other side, I have tried to upload many examples of different sizes and all seem to work fine
I'm still having that problem of needing to reboot everything to send the data again, weird. There are not processes I could kill I think
On the other side, I have tried to upload many examples of different sizes and all seem to work fine
- semicolo
- Mental DCEmu
- Posts: 328
- Joined: Mon Apr 25, 2005 1:02 pm
- Location: Three-rivers canada
- Has thanked: 0
- Been thanked: 0
- Contact:
download and compile the latest dc-tool, it's been patched bye axlen for higher bitrates (but I don't remember if he added 230Kbps too)
just tell dctool you want 230400, it's easy to patch if needed.
what bitrates can your cable do ?
don't worry about bits per second or bauds (but use bps to be exact).
just tell dctool you want 230400, it's easy to patch if needed.
what bitrates can your cable do ?
don't worry about bits per second or bauds (but use bps to be exact).
The only version I seem to be able to find is the old one : http://adk.napalm-x.com/dc/dcload-serial/index.html
I have also been at Axlen's site: http://www.geocities.com/pboese@sbcglobal.net/ , but there are not files there
The old version of dcload does not compile for me :
About the transfer rates, it only says ' Over 230 Kbps' . Perhaps I could check at the website of email Aten asking about?
Edit: Found this: http://www.dcemu.co.uk/vbulletin/showthread.php?t=14034 . Is that the version I need?
Edit again: Is only the dreamcast image and the windows bin. No source or linux binary.
Now reading this super thread, lol: http://www.dcemu.co.uk/vbulletin/showth ... tool+1.0.4
+Edit: Found it here: http://sourceforge.net/cvs/?group_id=23791 . I think that's the last version, Axlen is the last commiter name
++Edit: Compiles, lol. Trying...
I have also been at Axlen's site: http://www.geocities.com/pboese@sbcglobal.net/ , but there are not files there
The old version of dcload does not compile for me :
Code: Select all
bender@darkstar ~/dctool/dcload-1.0.3 $ make
make -C host-src
make[1]: Entering directory `/home/bender/dctool/dcload-1.0.3/host-src'
make -C misc
make[2]: Entering directory `/home/bender/dctool/dcload-1.0.3/host-src/misc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bender/dctool/dcload-1.0.3/host-src/misc'
make -C tool
make[2]: Entering directory `/home/bender/dctool/dcload-1.0.3/host-src/tool'
gcc -O2 -DBAUD_RATE=57600 -DSERIALDEVICE="\"/dev/ttyUSB0\"" -DHAVE_GETOPT -I../../minilzo.106 -I/usr/local/dc/sh-elf/include -o dc-tool.o -c dc-tool.c
dc-tool.c: In function `recv_data':
dc-tool.c:295: warning: use of cast expressions as lvalues is deprecated
dc-tool.c:309: warning: use of cast expressions as lvalues is deprecated
dc-tool.c: In function `upload':
dc-tool.c:596: error: structure has no member named `_raw_size'
dc-tool.c:597: error: structure has no member named `_raw_size'
dc-tool.c:598: error: structure has no member named `_raw_size'
dc-tool.c:599: error: structure has no member named `_raw_size'
dc-tool.c:600: error: structure has no member named `_raw_size'
dc-tool.c:607: error: structure has no member named `_raw_size'
dc-tool.c:609: error: structure has no member named `_raw_size'
make[2]: *** [dc-tool.o] Error 1
make[2]: Leaving directory `/home/bender/dctool/dcload-1.0.3/host-src/tool'
make[1]: *** [tool] Error 2
make[1]: Leaving directory `/home/bender/dctool/dcload-1.0.3/host-src'
make: *** [host-src] Error 2
Edit: Found this: http://www.dcemu.co.uk/vbulletin/showthread.php?t=14034 . Is that the version I need?
Edit again: Is only the dreamcast image and the windows bin. No source or linux binary.
Now reading this super thread, lol: http://www.dcemu.co.uk/vbulletin/showth ... tool+1.0.4
+Edit: Found it here: http://sourceforge.net/cvs/?group_id=23791 . I think that's the last version, Axlen is the last commiter name
++Edit: Compiles, lol. Trying...
Nice.
Tried the cvs version of dctool. It only lets me to choose between 57600 and 115200 bauds too but there are some changes Axlen made there for faster transfer rates. I'm also having the same problem as with the 1.0.3, needing to reboot everything to send the data again .
I'm still using dcload 1.0.3 with the cvs version of dctool, burnt my last 2 cdr's and did not work any, lol. Perhaps, that's a problem too
Changing the baud rate in the Makefile.cfg for one higher, is says that is unsupported. There's a 'case' in the dc-tool.c file that could be changed for higher baud rates. I've tried changing a bit but did not compile.
The nice thing is that is very possible to make this thing work perfectly and with pretty nice transfer rates at low cost. Nobody else has tried this? I think that the 230kbps are at least worth a look
Going to look at the kernel a bit...
Edit: compiled dc-tool.c adding 230400 support but did not work. Something is sent because the screen flashed about a milisecond but then dc-tool hanged. Perhaps is just I'm using dc-load 1.0.3 or that I need to send the 223kbps, I think
Tried the cvs version of dctool. It only lets me to choose between 57600 and 115200 bauds too but there are some changes Axlen made there for faster transfer rates. I'm also having the same problem as with the 1.0.3, needing to reboot everything to send the data again .
I'm still using dcload 1.0.3 with the cvs version of dctool, burnt my last 2 cdr's and did not work any, lol. Perhaps, that's a problem too
Changing the baud rate in the Makefile.cfg for one higher, is says that is unsupported. There's a 'case' in the dc-tool.c file that could be changed for higher baud rates. I've tried changing a bit but did not compile.
The nice thing is that is very possible to make this thing work perfectly and with pretty nice transfer rates at low cost. Nobody else has tried this? I think that the 230kbps are at least worth a look
Going to look at the kernel a bit...
Edit: compiled dc-tool.c adding 230400 support but did not work. Something is sent because the screen flashed about a milisecond but then dc-tool hanged. Perhaps is just I'm using dc-load 1.0.3 or that I need to send the 223kbps, I think
It does run without rebooting!!!! yeah, I'm happy.
I just discovered that unplugging the usb cable, typing 'dc-tool -t /dev/ttyUSB0' in the shell without the cable, pluging the cable and running dc-tool again, it works
Now if I could make the thing work for 230kbps
cheers
Edit: Tried a lot and this is rocking, lol. It really works fine.
Now, it's only working for 57600bps but I think this is a good thing(we know that 230400 does not work but neither the 115200), something related to my ttys config I think. In FreeBSD, I know the file of the ttys in /etc for adding the /dev/ttyUSB0 and the baud rate but in gentoo I can't find it, lol. It should be one somewhere in /etc ...
I just discovered that unplugging the usb cable, typing 'dc-tool -t /dev/ttyUSB0' in the shell without the cable, pluging the cable and running dc-tool again, it works
Now if I could make the thing work for 230kbps
cheers
Edit: Tried a lot and this is rocking, lol. It really works fine.
Now, it's only working for 57600bps but I think this is a good thing(we know that 230400 does not work but neither the 115200), something related to my ttys config I think. In FreeBSD, I know the file of the ttys in /etc for adding the /dev/ttyUSB0 and the baud rate but in gentoo I can't find it, lol. It should be one somewhere in /etc ...
I have tried the -e but is not a problem related to the dreamcast<->pc connection. I changed the source code, it was just to add the 'case' option for the 230400, but nothing. The new baud rate is allowed but I have the same problem as with 115200. dc-tool starts but hangs after the 'Console enabled'
The weekends I live in a place where I connect through dial-up using a pcmcia modem, I know, this connection is prehistoric, lol. I have a serial port modem, so I have attached it to the cable an it works but is very slow, a lot more than the pcmcia one (and that modem should work fine because it does on the other computer).
Looking at the source code of the kernel driver for the pl2303, is see:
So I should be able to connect at 115200 and 230400 according to the hardware vendor. I could also try the 460800 despite of not working just with my USB<->Serial cable, lol. Perhaps, is another driver what I need, but the kernel doc says that is that driver and the real thing is that it works
Is there anyway to change the baud rate of a serial port? 'setserial' does not work for the /dev/ttyUSB* . In *BSD, I know that I just need to edit one file for this
Edit: On kppp I can select the baud rate but it has no effect at all, I don't know if this matters perhaps the real problem is the kernel driver I'm using
The weekends I live in a place where I connect through dial-up using a pcmcia modem, I know, this connection is prehistoric, lol. I have a serial port modem, so I have attached it to the cable an it works but is very slow, a lot more than the pcmcia one (and that modem should work fine because it does on the other computer).
Looking at the source code of the kernel driver for the pl2303, is see:
Code: Select all
baud = 0;
switch (cflag & CBAUD) {
case B0: baud = 0; break;
case B75: baud = 75; break;
case B150: baud = 150; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default:
...
Is there anyway to change the baud rate of a serial port? 'setserial' does not work for the /dev/ttyUSB* . In *BSD, I know that I just need to edit one file for this
Edit: On kppp I can select the baud rate but it has no effect at all, I don't know if this matters perhaps the real problem is the kernel driver I'm using