SlideShare a Scribd company logo
1 of 22
Download to read offline
Building the ZoomFloppy




         Nate Lawson
        nate@root.org

        Presented at ECCC
       September 18, 2010
Overview

• Commodore floppy drive architecture
   – How the drive works
   – Copy protection schemes


• The old way to interface a 1541 and PC (printer port)
• USB interfacing: the new way
   – xu1541 (2007)
   – xum1541 (2009)


• Creating the xum1541 firmware
• Building the ZoomFloppy
Commodore floppy drive architecture

• The first dual CPU home computer was not the C128
  (apologies to Bil Herd)

• 2040 dual drive
   – 6502 to talk to the host
   – 6504 to do access the media (GCR encoding)
• IEEE-488 (GPIB) interface to PET
Commodore floppy drive architecture

• 1541 series (1540, 1541-II, etc.)
   – Cost reduction is a kind of performance
   – IEC bus is cheaper serial version of IEEE-488
   – Merged both CPU functions into one with interrupt-driven
     task queue
• 1571 series
   – Multiple floppy formats (MFM)
   – Burst mode using SRQ line
Copy protection schemes

• Best ones depend on the hardware limits of drive

• 1541 limits
   – 2 KB of RAM, 8 KB ROM
   – No index hole sensor (soft-sectored)


• Whole-track custom format (RAM too small)
   – v-max: fully custom encoding, 10-bit sync marks
   – Epyx (newer)
• Track sync (no IHS)
   – Bump head between tracks and verify data found at
     proper location
   – Fat tracks (Activision, EA, RapidLok)
Copying protected floppies

• As opposed to cracking protection schemes
• Hardware mods
   – Maverick 8 KB drive RAM expansion
       – Store entire track at once in drive, stream back to host
       – Detectable by checking mirrored addresses
   – Burst Nibbler parallel cable
       – Attaches to unused 8-bit port on VIA
       – Sends one byte at a time, sufficient for full media bitrate
   – Add an index hole sensor
       – 1571 has one built-in for MFM mode
       – Or clever in-drive timer routines


• nibtools/mnib have support reading and writing
  protected disks
   – Thanks to Peter Rittwage and Markus Brenner
1541 hardware mods




                                     IHS


Parallel port
Interfacing with a PC (old way)

• Printer port (LPT)
   – 8 bits bidirectional plus handshake signals
   – Perfect for IEC bus control + parallel transfer


• Problems
   – XA1541, XM, XE, X, P-variants, too many!
       – Caused by evolving and differing voltages on PC ports
       – Opposing goals of low cost vs. functionality
   – Doesn’t exist on modern PCs and laptops
       – Also Mac hardware
       – Anything non-x86
   – Fast and low-latency, but too slow for some tricks
       – 1 µs per access (1 MB/sec max)
xu1541

• USB floppy interface by Till Harbaum
   – Cheap
   – All through-hole parts so easy to build
   – Open-source and works well


• Limitations
   – Slow
       – Software USB decoding
       – Serial slower than with an X-cable, parallel transfers as slow
         as serial
       – Can’t support parallel nibbling and limited RAM so no copying
         protected floppies
   – USB control transfers only
   – Not readily available


• Good for its time, especially if you just want to
  transfer files to unprotected disks
Enter: me

• In 2005, got an XAP1541 and began archiving
  floppies for C64Preservation.com
   – “Just how did some of those more complicated copy
     protection schemes work anyway?”
   – Reverse-engineered from original image using VICE drive
     monitor
• Contributed some fixes to nibtools

• Then PC with DOS and printer port died
xum1541

• 2008: “Hey, there’s this new Atmel microcontroller
  with hardware USB support”
   – Ported xu1541 firmware to the AT90USB, replacing the
     software USB stack with hardware routines
      – OpenCBM plugin interface so standard tools all work
      – LUFA library by Dean Camera was very helpful
   – AT90USBKEY devel board: $30
      – Built a custom cable to connect to existing XAP1541
      – No PCB design or difficult soldering, just a cable
xum1541

• More debugging and announced Jan. 2009
• Problems
   – Works fine but have to replug if USB transfer interrupted
     (^C)
   – No nibbler support, control messages too small for USB
     overhead (8 bytes each)
   – Only two people built cable (Womo and Christian V.)
xum1541

• New USB protocol
   – USB bulk transfers (32 or 64 bytes)
   – Inline byte handling (no bucket brigade in RAM)
   – Start/end markers to detect interruptions and reset
     cleanly
• Finished on train in Europe (fall 2009)
   – Fast d64copy
   – nibtools works!


• Problems
   – Infinite listener hold-off
       – To support printers or other slow devices, you have to wait
         forever for drive to respond
   – 3.3v level mismatch gave some idle current but still safe
   – Still only two users
Building the ZoomFloppy

• Daughtercard approach
   – New Bumble-B board: $15
   – Would have plugged into this IEC/parallel adapter
   – 7406 for bus isolation




• Assembled several prototypes and works well
   – “Anyone want to build this thing?”
      – Jim Brain: “ok”
Building the ZoomFloppy

• Fully custom PCB by Jim Brain
   –   Connectors for IEC, parallel (multiple)
   –   Connectors for future IEEE-488 support
   –   Fits in a nice enclosure
   –   Packaged and for sale (hopefully, soon)
IEEE-488 future support

• Implemented in the XS-1541 currently
   – Thomas Winkler created this device


• Future support planned in xum1541
   – XS-1541 is open source so we can use its routines
   – Autodetect for different cables already designed in
   – ZoomFloppy has connector pads for it
Teaching the 1571 new tricks

• 1571 is quite an interesting device
   – Multi-mode like a C128
      – 1541 compatible (1 MHz, 2 VIAs)
      – 1571 (2 MHz, 2 VIAs, 1 CIA)
      – MFM (WD 1770)
   – Index hole sensor


• Burst mode
   – SRQ is previously unused IEC line
   – Reads at 3.5 KB/s over serial bus but only to C128, writes
     at old 400 bytes/s rate
   – Backwards-compatible with original transfers
   – Looks interesting, but we need 40 KB/s to keep up with
     the drive’s raw bitrate
Is it possible?

• We need 40 KB/s (25 µs per byte)
   – Plus a few clock cycles to read a byte from the shift
     register, toggle handshake lines, loop


• Max CIA transfer rate
   – “Theoretically it is even possible to realize bus transfers at
     up to 60,000 bytes per second with the C-128’s fast bus
     hardware.” (1571 Internals, p. 148)
   – Max parameters
       – External clock: 2 MHz
       – Count down timer: start at 1, toggle output on 0
       – 500 Kbits/s (2 µs period)


• Theoretically, it is possible to transfer at 62.5 KB/s,
  leaving some overhead room
Apparently this is possible
Implementing SRQ nibbling

• A lot more work to do before ready to release
   – Implement drive code
      – Lots of changes needed in 1571 mode like different sync
        detection
      – Want to keep index hole sensor support also
   – Modify nibtools to load separate IO routines based on
     drive capabilities
      – Need to autodetect missing SRQ line
      – Fall back to parallel mode automatically


• In the end, all Commodore protected floppies could
  be archived and remastered with a ZoomFloppy +
  1571
   – No hardware mods
Thwarted by Playstation 3 hacking

• Final PCB almost complete, looking for parts suppliers
• Then PS3 USB exploit released
   – Just happened to use the same Atmel chips as us
   – Supply went from “great” to “none” in weeks
      – AT90USB162: Dec 5 2010 delivery
      – ATmega16U2: Nov 15 2010 delivery
• Hey, pirates, there are other exploit delivery methods
   – D2groove: D2Prog (PIC18F)
   – Dingoo A320 console
   – TI-84+/SE calculator
• Note: we don’t condone piracy
   – But get off my lawn!
Conclusion

• xum1541 firmware already available (GPL)
     –   Fast IEC transfers
     –   Even faster transfers and nibbling with parallel cable
     –   Easy to build if you have some soldering skills
     –   Stable and well-tested
• New firmware features on the way
     – SRQ nibbling on the 1571
     – IEEE-488 drive support
• ZoomFloppy should be available for sale soon!
     http://root.org/~nate/c64/xum1541
     http://jbrain.net/


•   Many thanks to: Wolfgang Moser, Christian Vogelsgang,
    Jim Brain, Peter Rittwage, Spiro Trikaliotis, Thomas Winkler,
    Joe Forster, Till Harbaum, C64Preservation.com, OpenCBM

More Related Content

What's hot

Linux Cluster next generation
Linux Cluster next generationLinux Cluster next generation
Linux Cluster next generationsamsolutionsby
 
IPv6 Fundamentals & Securities
IPv6 Fundamentals & SecuritiesIPv6 Fundamentals & Securities
IPv6 Fundamentals & SecuritiesDon Anto
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingThe Linux Foundation
 
Bh usa-01-kaminsky
Bh usa-01-kaminskyBh usa-01-kaminsky
Bh usa-01-kaminskyDan Kaminsky
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelPeter Hlavaty
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageKernel TLV
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxWO Community
 
XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15The Linux Foundation
 
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...The Linux Foundation
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Blockoscon2007
 
Memory Corruption: from sandbox to SMM
Memory Corruption: from sandbox to SMMMemory Corruption: from sandbox to SMM
Memory Corruption: from sandbox to SMMPositive Hack Days
 
Vigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startVigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startJimmy Tu
 
PostgreSQL: Welcome To Total Security
PostgreSQL: Welcome To Total SecurityPostgreSQL: Welcome To Total Security
PostgreSQL: Welcome To Total SecurityRobert Bernier
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMDevOps.com
 
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...NoSQLmatters
 
Linux-HA with Pacemaker
Linux-HA with PacemakerLinux-HA with Pacemaker
Linux-HA with PacemakerKris Buytaert
 

What's hot (20)

Linux Cluster next generation
Linux Cluster next generationLinux Cluster next generation
Linux Cluster next generation
 
IPv6 Fundamentals & Securities
IPv6 Fundamentals & SecuritiesIPv6 Fundamentals & Securities
IPv6 Fundamentals & Securities
 
Lock free programming- pro tips
Lock free programming- pro tipsLock free programming- pro tips
Lock free programming- pro tips
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debugging
 
Bh usa-01-kaminsky
Bh usa-01-kaminskyBh usa-01-kaminsky
Bh usa-01-kaminsky
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows Kernel
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
Back to the CORE
Back to the COREBack to the CORE
Back to the CORE
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS Linux
 
XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15
 
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Block
 
Memory Corruption: from sandbox to SMM
Memory Corruption: from sandbox to SMMMemory Corruption: from sandbox to SMM
Memory Corruption: from sandbox to SMM
 
Vigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick startVigor 3910 docker firmware quick start
Vigor 3910 docker firmware quick start
 
PostgreSQL: Welcome To Total Security
PostgreSQL: Welcome To Total SecurityPostgreSQL: Welcome To Total Security
PostgreSQL: Welcome To Total Security
 
Linux Kernel Live Patching
Linux Kernel Live PatchingLinux Kernel Live Patching
Linux Kernel Live Patching
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
 
Linux-HA with Pacemaker
Linux-HA with PacemakerLinux-HA with Pacemaker
Linux-HA with Pacemaker
 
Linux Kernel Debugging
Linux Kernel DebuggingLinux Kernel Debugging
Linux Kernel Debugging
 

Similar to Building the ZoomFloppy (ECCC 2010)

Computer architecture
Computer architectureComputer architecture
Computer architectureRishabha Garg
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsFrank Hunleth
 
Nodes and Networks for HPC computing
Nodes and Networks for HPC computingNodes and Networks for HPC computing
Nodes and Networks for HPC computingrinnocente
 
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...Kieran Kunhya
 
Computer Main Comppponents.pdf
Computer Main Comppponents.pdfComputer Main Comppponents.pdf
Computer Main Comppponents.pdfthinalost
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaumeurobsdcon
 
introduction to computer hardware
 introduction to computer hardware introduction to computer hardware
introduction to computer hardwareBikramjeet Sidhu
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...PROIDEA
 
Presentation for architecture
Presentation for architecturePresentation for architecture
Presentation for architectureShamim Hossain
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.pptMrZeke1
 
Ahsan by computer component information
Ahsan by computer component informationAhsan by computer component information
Ahsan by computer component informationAhsanUbaidi
 
PC Components.pptx
PC Components.pptxPC Components.pptx
PC Components.pptxElmerPogoy
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.pptRoyTari
 

Similar to Building the ZoomFloppy (ECCC 2010) (20)

Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBots
 
Nodes and Networks for HPC computing
Nodes and Networks for HPC computingNodes and Networks for HPC computing
Nodes and Networks for HPC computing
 
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
 
Computer Main Comppponents.pdf
Computer Main Comppponents.pdfComputer Main Comppponents.pdf
Computer Main Comppponents.pdf
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 
introduction to computer hardware
 introduction to computer hardware introduction to computer hardware
introduction to computer hardware
 
21PSP13
21PSP1321PSP13
21PSP13
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
10. compute-part-1
10. compute-part-110. compute-part-1
10. compute-part-1
 
Presentation for architecture
Presentation for architecturePresentation for architecture
Presentation for architecture
 
The Motherboard
The MotherboardThe Motherboard
The Motherboard
 
serial.ppt
serial.pptserial.ppt
serial.ppt
 
serial.ppt
serial.pptserial.ppt
serial.ppt
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.ppt
 
Ahsan by computer component information
Ahsan by computer component informationAhsan by computer component information
Ahsan by computer component information
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.ppt
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.ppt
 
PC Components.pptx
PC Components.pptxPC Components.pptx
PC Components.pptx
 
PC Components.ppt
PC Components.pptPC Components.ppt
PC Components.ppt
 

More from Nate Lawson

TLS Optimization
TLS OptimizationTLS Optimization
TLS OptimizationNate Lawson
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006Nate Lawson
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Nate Lawson
 
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Nate Lawson
 
TLS/SSL MAC security flaw
TLS/SSL MAC security flawTLS/SSL MAC security flaw
TLS/SSL MAC security flawNate Lawson
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol DesignNate Lawson
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Nate Lawson
 
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Nate Lawson
 
ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)Nate Lawson
 
ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)Nate Lawson
 
Foundations of Platform Security
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform SecurityNate Lawson
 
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Nate Lawson
 
Designing and Attacking Virtual Machines (RSA 2004)
Designing and Attacking Virtual Machines (RSA 2004)Designing and Attacking Virtual Machines (RSA 2004)
Designing and Attacking Virtual Machines (RSA 2004)Nate Lawson
 

More from Nate Lawson (13)

TLS Optimization
TLS OptimizationTLS Optimization
TLS Optimization
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)
 
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
 
TLS/SSL MAC security flaw
TLS/SSL MAC security flawTLS/SSL MAC security flaw
TLS/SSL MAC security flaw
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
 
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)
 
ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)
 
ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)
 
Foundations of Platform Security
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform Security
 
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
 
Designing and Attacking Virtual Machines (RSA 2004)
Designing and Attacking Virtual Machines (RSA 2004)Designing and Attacking Virtual Machines (RSA 2004)
Designing and Attacking Virtual Machines (RSA 2004)
 

Recently uploaded

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Building the ZoomFloppy (ECCC 2010)

  • 1. Building the ZoomFloppy Nate Lawson nate@root.org Presented at ECCC September 18, 2010
  • 2. Overview • Commodore floppy drive architecture – How the drive works – Copy protection schemes • The old way to interface a 1541 and PC (printer port) • USB interfacing: the new way – xu1541 (2007) – xum1541 (2009) • Creating the xum1541 firmware • Building the ZoomFloppy
  • 3. Commodore floppy drive architecture • The first dual CPU home computer was not the C128 (apologies to Bil Herd) • 2040 dual drive – 6502 to talk to the host – 6504 to do access the media (GCR encoding) • IEEE-488 (GPIB) interface to PET
  • 4. Commodore floppy drive architecture • 1541 series (1540, 1541-II, etc.) – Cost reduction is a kind of performance – IEC bus is cheaper serial version of IEEE-488 – Merged both CPU functions into one with interrupt-driven task queue • 1571 series – Multiple floppy formats (MFM) – Burst mode using SRQ line
  • 5. Copy protection schemes • Best ones depend on the hardware limits of drive • 1541 limits – 2 KB of RAM, 8 KB ROM – No index hole sensor (soft-sectored) • Whole-track custom format (RAM too small) – v-max: fully custom encoding, 10-bit sync marks – Epyx (newer) • Track sync (no IHS) – Bump head between tracks and verify data found at proper location – Fat tracks (Activision, EA, RapidLok)
  • 6. Copying protected floppies • As opposed to cracking protection schemes • Hardware mods – Maverick 8 KB drive RAM expansion – Store entire track at once in drive, stream back to host – Detectable by checking mirrored addresses – Burst Nibbler parallel cable – Attaches to unused 8-bit port on VIA – Sends one byte at a time, sufficient for full media bitrate – Add an index hole sensor – 1571 has one built-in for MFM mode – Or clever in-drive timer routines • nibtools/mnib have support reading and writing protected disks – Thanks to Peter Rittwage and Markus Brenner
  • 7. 1541 hardware mods IHS Parallel port
  • 8. Interfacing with a PC (old way) • Printer port (LPT) – 8 bits bidirectional plus handshake signals – Perfect for IEC bus control + parallel transfer • Problems – XA1541, XM, XE, X, P-variants, too many! – Caused by evolving and differing voltages on PC ports – Opposing goals of low cost vs. functionality – Doesn’t exist on modern PCs and laptops – Also Mac hardware – Anything non-x86 – Fast and low-latency, but too slow for some tricks – 1 µs per access (1 MB/sec max)
  • 9. xu1541 • USB floppy interface by Till Harbaum – Cheap – All through-hole parts so easy to build – Open-source and works well • Limitations – Slow – Software USB decoding – Serial slower than with an X-cable, parallel transfers as slow as serial – Can’t support parallel nibbling and limited RAM so no copying protected floppies – USB control transfers only – Not readily available • Good for its time, especially if you just want to transfer files to unprotected disks
  • 10. Enter: me • In 2005, got an XAP1541 and began archiving floppies for C64Preservation.com – “Just how did some of those more complicated copy protection schemes work anyway?” – Reverse-engineered from original image using VICE drive monitor • Contributed some fixes to nibtools • Then PC with DOS and printer port died
  • 11. xum1541 • 2008: “Hey, there’s this new Atmel microcontroller with hardware USB support” – Ported xu1541 firmware to the AT90USB, replacing the software USB stack with hardware routines – OpenCBM plugin interface so standard tools all work – LUFA library by Dean Camera was very helpful – AT90USBKEY devel board: $30 – Built a custom cable to connect to existing XAP1541 – No PCB design or difficult soldering, just a cable
  • 12. xum1541 • More debugging and announced Jan. 2009 • Problems – Works fine but have to replug if USB transfer interrupted (^C) – No nibbler support, control messages too small for USB overhead (8 bytes each) – Only two people built cable (Womo and Christian V.)
  • 13. xum1541 • New USB protocol – USB bulk transfers (32 or 64 bytes) – Inline byte handling (no bucket brigade in RAM) – Start/end markers to detect interruptions and reset cleanly • Finished on train in Europe (fall 2009) – Fast d64copy – nibtools works! • Problems – Infinite listener hold-off – To support printers or other slow devices, you have to wait forever for drive to respond – 3.3v level mismatch gave some idle current but still safe – Still only two users
  • 14. Building the ZoomFloppy • Daughtercard approach – New Bumble-B board: $15 – Would have plugged into this IEC/parallel adapter – 7406 for bus isolation • Assembled several prototypes and works well – “Anyone want to build this thing?” – Jim Brain: “ok”
  • 15. Building the ZoomFloppy • Fully custom PCB by Jim Brain – Connectors for IEC, parallel (multiple) – Connectors for future IEEE-488 support – Fits in a nice enclosure – Packaged and for sale (hopefully, soon)
  • 16. IEEE-488 future support • Implemented in the XS-1541 currently – Thomas Winkler created this device • Future support planned in xum1541 – XS-1541 is open source so we can use its routines – Autodetect for different cables already designed in – ZoomFloppy has connector pads for it
  • 17. Teaching the 1571 new tricks • 1571 is quite an interesting device – Multi-mode like a C128 – 1541 compatible (1 MHz, 2 VIAs) – 1571 (2 MHz, 2 VIAs, 1 CIA) – MFM (WD 1770) – Index hole sensor • Burst mode – SRQ is previously unused IEC line – Reads at 3.5 KB/s over serial bus but only to C128, writes at old 400 bytes/s rate – Backwards-compatible with original transfers – Looks interesting, but we need 40 KB/s to keep up with the drive’s raw bitrate
  • 18. Is it possible? • We need 40 KB/s (25 µs per byte) – Plus a few clock cycles to read a byte from the shift register, toggle handshake lines, loop • Max CIA transfer rate – “Theoretically it is even possible to realize bus transfers at up to 60,000 bytes per second with the C-128’s fast bus hardware.” (1571 Internals, p. 148) – Max parameters – External clock: 2 MHz – Count down timer: start at 1, toggle output on 0 – 500 Kbits/s (2 µs period) • Theoretically, it is possible to transfer at 62.5 KB/s, leaving some overhead room
  • 19. Apparently this is possible
  • 20. Implementing SRQ nibbling • A lot more work to do before ready to release – Implement drive code – Lots of changes needed in 1571 mode like different sync detection – Want to keep index hole sensor support also – Modify nibtools to load separate IO routines based on drive capabilities – Need to autodetect missing SRQ line – Fall back to parallel mode automatically • In the end, all Commodore protected floppies could be archived and remastered with a ZoomFloppy + 1571 – No hardware mods
  • 21. Thwarted by Playstation 3 hacking • Final PCB almost complete, looking for parts suppliers • Then PS3 USB exploit released – Just happened to use the same Atmel chips as us – Supply went from “great” to “none” in weeks – AT90USB162: Dec 5 2010 delivery – ATmega16U2: Nov 15 2010 delivery • Hey, pirates, there are other exploit delivery methods – D2groove: D2Prog (PIC18F) – Dingoo A320 console – TI-84+/SE calculator • Note: we don’t condone piracy – But get off my lawn!
  • 22. Conclusion • xum1541 firmware already available (GPL) – Fast IEC transfers – Even faster transfers and nibbling with parallel cable – Easy to build if you have some soldering skills – Stable and well-tested • New firmware features on the way – SRQ nibbling on the 1571 – IEEE-488 drive support • ZoomFloppy should be available for sale soon! http://root.org/~nate/c64/xum1541 http://jbrain.net/ • Many thanks to: Wolfgang Moser, Christian Vogelsgang, Jim Brain, Peter Rittwage, Spiro Trikaliotis, Thomas Winkler, Joe Forster, Till Harbaum, C64Preservation.com, OpenCBM