Coder's cable: Difference between revisions

From dreamcast.wiki
Jump to navigation Jump to search
m (adapted Linux & MacOS disclaimers with the latest info, after commit of Linux custom baudrates has been added to the repo)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''coder's cable''' is the name given to the serial-based cable some developers use to test and debug code during development. Originally, cables were connected to host devices via serial, but modern cable designs incorporate a USB controller instead. Coder's cables can also be used for other purpose's besides development, such as transferring VMU data back to a PC or dumping GD-ROMs (although quite slowly).
The '''coder's cable''' is the name given to the serial-based cable some developers use to test and debug code during development. Originally, cables were connected to host devices via serial, but modern cable designs incorporate a USB controller instead. Coder's cables can also be used for other purpose's besides development, such as transferring VMU data back to a PC or dumping GD-ROMs (although quite slowly).


== How to build/buy a cable ==
== Buy a pre-made cable ==
* Buy:
* eg: Contact '''darc''' on the [https://dcemulation.org/phpBB/memberlist.php?mode=viewprofile&u=5284 Message Board] or [https://discord.gg/wDEfkUh63h Discord] for a pre-made CP2102N-based cable
** eg [https://www.retroonyx.com/product-page/dreamcast-usb-coders-cable retroonyx cable], FTDI-based cable.
* eg: [https://www.retroonyx.com/product-page/dreamcast-usb-coders-cable retroonyx cable], FTDI-based cable.
** (only mentioned for historical purposes - not sold anymore since long - "Lik-Sang coder's cable" - max speed of 781250)
* (only mentioned for historical purposes - not sold anymore since long - "Lik-Sang coder's cable" - max speed of 781250)
* Build:
 
** DC serial connector:
== Build your own cable ==
*** best connector today is the one used by the [https://www.ebay.com/sch/i.html?_nkw=DC+SD+Adapter+V2 DC SD Adapter V2] (+- 16 USD)
* DC serial connector:
** best connector today is the one used by the [https://www.ebay.com/sch/i.html?_nkw=DC+SD+Adapter+V2 DC SD Adapter V2] (+- 20 USD)
{|
{|
| [[File:DC SD Adapter V2.jpg|thumb|alt=DC SD Adapter V2|DC SD Adapter V2]]
| [[File:DC SD Adapter V2.jpg|thumb|alt=DC SD Adapter V2|DC SD Adapter V2]]
|}
|}
** select a usb-to-serial chip/cable (+- 10 USD)
* select a usb-to-serial chip/cable (+- 15 USD)
*** [https://www.silabs.com/interface/usb-bridges/usbxpress Silicon Labs '''CP2102N''']:
** [https://www.silabs.com/interface/usb-bridges/usbxpress Silicon Labs '''CP2102N''']:
**** Supports 1600000, which is a 2,4% baudrate mismatch with the Dreamcast, which seems acceptable for high speeds. Best chip that can be recommended today. Tests give speeds of 170-190 kByte/sec and more thanks to compression.
*** Supports 1600000, which is a 2,4% baudrate mismatch with the Dreamcast, which seems acceptable for high speeds. Best chip that can be recommended today. Tests give speeds of 170-190 kByte/sec and more thanks to compression.
**** eg [https://www.adafruit.com/product/5335 Adafruit CP2102N Friend (USB-C)]
*** eg [https://www.adafruit.com/product/5335 Adafruit CP2102N Friend (USB-C)]
**** eg [https://www.silabs.com/development-tools/interface/cp2102n-mini-development-kit?tab=overview Silicon Labs CP2102N-MINIEK (mini USB)]
*** eg [https://www.silabs.com/development-tools/interface/cp2102n-mini-development-kit?tab=overview Silicon Labs CP2102N-MINIEK (mini USB)]
**** eg [https://www.amazon.co.uk/DSD-TECH-SH-U09BL-Serial-CP2102N/dp/B08JLRP6YV DSD TECH SH-U09BL USB to TTL Serial Cable with CP2102N Chip]
*** eg [https://www.amazon.co.uk/DSD-TECH-SH-U09BL-Serial-CP2102N/dp/B08JLRP6YV DSD TECH SH-U09BL USB to TTL Serial Cable with CP2102N Chip]
**** eg [https://github.com/cepawiel/dc-serial Colton's custom PCB] - Kicad files to order a custom PCB with a CP2102N, to be soldered to the serial connector of a DC SD Adapter V2
*** eg [https://github.com/cepawiel/dc-serial Colton's custom PCB] - Kicad files to order a custom PCB with a CP2102N, to be soldered to the serial connector of a DC SD Adapter V2


*** FDTI's '''FT232R'''-like chips:
** FDTI's '''FT232R'''-like chips:
**** '''good until 781250''', does not support 1562500.
*** '''good until 781250''', does not support 1562500.
**** 500000 and 1500000 will not work with all chips/on all pc, because of a 4% baud rate mismatch with the baudrates of the Dreamcast.
*** 500000 and 1500000 will not work with all chips/on all pc, because of a 4% baud rate mismatch with the baudrates of the Dreamcast.
***** Even if you're lucky, you won't really get 1500000-worthy speeds - more probably around 130-150 kByte/sec...
**** Even if you're lucky, you won't really get 1500000-worthy speeds - more probably around 130-150 kByte/sec...


** connect the following pins (cfr [[Serial_interface]]):
* connect the following pins (cfr [[Serial_interface]]):
*** GND <-> GND
** GND <-> GND
*** TXD <-> RXD
** TXD <-> RXD
*** RXD <-> TXD
** RXD <-> TXD
*** RTS <-> CTS
** RTS <-> CTS
*** CTS <-> RTS
** CTS <-> RTS


== Software to use ==
== Software to use ==

Latest revision as of 05:10, 10 September 2024

The coder's cable is the name given to the serial-based cable some developers use to test and debug code during development. Originally, cables were connected to host devices via serial, but modern cable designs incorporate a USB controller instead. Coder's cables can also be used for other purpose's besides development, such as transferring VMU data back to a PC or dumping GD-ROMs (although quite slowly).

Buy a pre-made cable

  • eg: Contact darc on the Message Board or Discord for a pre-made CP2102N-based cable
  • eg: retroonyx cable, FTDI-based cable.
  • (only mentioned for historical purposes - not sold anymore since long - "Lik-Sang coder's cable" - max speed of 781250)

Build your own cable

  • DC serial connector:
DC SD Adapter V2
DC SD Adapter V2
    • FDTI's FT232R-like chips:
      • good until 781250, does not support 1562500.
      • 500000 and 1500000 will not work with all chips/on all pc, because of a 4% baud rate mismatch with the baudrates of the Dreamcast.
        • Even if you're lucky, you won't really get 1500000-worthy speeds - more probably around 130-150 kByte/sec...
  • connect the following pins (cfr Serial_interface):
    • GND <-> GND
    • TXD <-> RXD
    • RXD <-> TXD
    • RTS <-> CTS
    • CTS <-> RTS

Software to use

Dcload-serial

Supported Baud Rates

Not all common baudrates work, so the recommendations are:

  • up until 115200, you can use the common baudrates: 9600, 19200, 38400, 57600, 115200
    • if 115200 does not work, you can add the "-e" speedhack option
  • higher baudrates:
    • try first with the dreamcast-specific baudrates (223214, 260416, 312500, 390625, 520833, 781250, 1562500)
      • Disclaimer for Linux only: needs dc-tool-ser (host) changes from 4 september 2023 to select custom baudrates
      • Disclaimer for MacOS only: custom baudrates are not supported yet
    • 230400: use the -e speedhack option if you absolutely need 230400 at pc-side, but the DC will use 223214 or 260416 anyways.
    • 500000 and 1500000: you can try, but that will not work on all pc (the mismatch with the baudrate of the Dreamcast is sometimes too big (4%))


This page is a stub page. It needs to be expanded with more detail. If you know more information about this topic, please sign up and contribute to dreamcast.wiki!