Howcome no one has made a internet cable for dreamcast?

This is a forum for discussing the feasibility of getting emulators, games, or other applications that have had their source released ported to the Dreamcast. Please read the Porting FAQ before starting a topic in this forum!
Post Reply
DrNicholas
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 31
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Oct 02, 2011 5:33 pm
Has thanked: 0
Been thanked: 0

Howcome no one has made a internet cable for dreamcast?

Post by DrNicholas »

By that I mean, look at the SD adapter, someone had to have made that for the DC to register it as an SD card. Howcome no one has made a cable to fit there and output to ethernet (or USB, with a driver and a a program to use it, anything is possible) to work with some online games? Im sure its possible since a coders cable can transfer files back and forth (same as the SD adapter). I challenge a dc modder to drop everything their doing and attempt at makin one, even if it can only play phantasy star online.
Ayla
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Howcome no one has made a internet cable for dreamcast?

Post by Ayla »

The Dreamcast already has a modem, and can be equipped with a BBA. What else do you need?
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Howcome no one has made a internet cable for dreamcast?

Post by Chilly Willy »

There's a HUGE difference between hacking a USB SD card interface to allow SPI serial communication with the SD card on the serial port of the DC and making an ethernet interface to connect to the same port. The SD interface merely bypasses the USB controller and connects the SD serial interface to the DC serial port. That's why the transfer rates are slow, by the way. You cannot do something similar for a USB Ethernet addapter. Ethernet is not a simple serial interface to connect directly to the DC serial port, so you would need to do something like hack a serial to USB interface, then chain that with the USB to ethernet adapter. That's probably oversimplifying things a bit as well.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Howcome no one has made a internet cable for dreamcast?

Post by Ex-Cyber »

I'm pretty sure I've seen SPI Ethernet chips, but they probably expect to be on a 10-20MHz SPI bus. Even if they could work at DC serial port speeds, I think performance wouldn't be very good. IIRC, they're intended for things like low-throughput polling of sensors and the like (e.g. replacing RS-422/485 networks with Ethernet)
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Howcome no one has made a internet cable for dreamcast?

Post by Chilly Willy »

Ex-Cyber wrote:I'm pretty sure I've seen SPI Ethernet chips, but they probably expect to be on a 10-20MHz SPI bus. Even if they could work at DC serial port speeds, I think performance wouldn't be very good. IIRC, they're intended for things like low-throughput polling of sensors and the like (e.g. replacing RS-422/485 networks with Ethernet)
Actually, the DC SD interface is even worse than I implied... it handles the serial port in GPIO mode... one bit at a time. It's no wonder it's as slow as it is. We don't even have built in SPI handling - we have to mimic it with the CPU. :(

Here's how you write and read a byte on the SD card:

Code: Select all

void spi_w(register unsigned char data)
{
  register unsigned short _pwork;
  
  _pwork = pwork;
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
   CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1);
  CTS_OFF;		/* SPI clock OFF */
}

unsigned char spi_r(void)
{
  register unsigned char data;
  register unsigned short _pwork;
  
  _pwork = pwork;
  data = 0xff;
  TX_BIT;
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  CTS_ON;		/* SPI clock ON */
  data = (data << 1) | (unsigned char)(*((volatile unsigned short *)SCSPTR2) & 0x0001);	/* SPI data input */
  CTS_OFF;		/* SPI clock OFF */
  return(data);
}
Given the CPU is doing everything, that should probably be changed into hand-coded assembly to squeeze every last cycle possible from the transfer.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Howcome no one has made a internet cable for dreamcast?

Post by Ex-Cyber »

Ouch. I assumed it was using a synchronous serial mode at ~500 Kbps or thereabouts.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Howcome no one has made a internet cable for dreamcast?

Post by Chilly Willy »

Ex-Cyber wrote:Ouch. I assumed it was using a synchronous serial mode at ~500 Kbps or thereabouts.
Me too. It probably IS rather fast - the SH4 is a fast CPU, but it's got a LOT of CPU overhead, obviously. I'm going to assume they did it this way because the DC serial was SLOWER than using the CPU, and most of the time you're just waiting on the data when loading. It's not good for streaming from the SD card.
Post Reply