
Fdshield
yas-sim/floppy_disk_shield_2d
This is a project to retain 2D/2DD floppy disk data as a raw bit-stream data. The project includes both HW and SW.

This is a project to retain 2D/2DD floppy disk data as a raw bit-stream data. The project includes both HW and SW.
Fdshield is an open-source printed circuit board by yas-sim, from the yas-sim/floppy_disk_shield_2d repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 68.6 × 53.3 mm with 30 parts on 56 nets, routed with 336 tracks and 109 vias.
It is built around the 74LS125DC, 74HCU04D and 74LS74PC. Its parts include 7 resistors, 6 capacitors, 5 ICs, 5 connectors and 1 diode. It belongs with the retro computing and games and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
23-Sep 2022 : Preview release - Feature to write back the floppy images to FD is supported. Use duplicate.py to write the *.raw floppy image data to a floopy disk. Arduino firmware update and closing JP5 on the fd-capture shield are required to enable the feature.
23-Sep 2022 : Preview release - イメージの書き戻しもできるようになりました。Arduinoファームウエアの更新とJP5ジャンパーのショートをすると書き込みができるようになります。
This is a project to develop a system for preserving old 2D/2DD floppy disk data.
The system can preserve entire floppy disk data regardless whether it's normal or not. That means the system can read and preserve copy protect information in the bit-stream file as it is.
The recorded bit-stream file can be decoded and restore the contents anytime later.
The system includes a bit-stream data to D77/D88 emulator disk image converter. You can read the floppy disk with this tool and generate the disk images.
これは古い2D/2DDフロッピーディスクのデータを保存するためのシステムを作るプロジェクトです。
このシステムを使うことで仕様にのっとった正しい信号も非正規の信号も全てそのまま保存することが可能です。つまり、このシステムではコピープロテクトのための情報まで含めてビットストリームデータとして保存することが可能です。
記録されたビットストリームデータは後でデコード、解読を行うことで情報を取り出すことが可能です。
このシステムにはビットストリームデータからエミュレータ互換のイメージファイル(D77/D88)を生成するためのコンバーターも含んでいます。実際のフロッピーを読み取り、ディスクイメージを生成することが可能です。
The system consists of the hardware and software:
システムはハードウエアとソフトウエアから構成されます:
Hardware
| Item | Description |
|---|---|
| Arduino UNO | Arduino UNO. The firmware uses ATMega328 specific regiter. The other Arduino board may not work |
| Floppy disk shield for Arduino | Design data is included. Both schematics and PCB data are available (./kicad/*)Rev.A design has bugs. Rev.B and beyond are basically comatible and has same function. KiCAD用のPCBの設計データも提供されています(./kicad/*) Rev.A and Rev.Fにはバグがあります。Rev.B以降は基本的に同じ機能です |
| Floppy disk drive | 2D/2DD/2HD FDD. 3.5" or 5.25" FDD (+ power supply and ribbon cable). 300rpm drive is recommended but 360rpm 2HD drive will work as a 2DD drive. The FD-shield can detect the track density (2D or 2DD/2HD, 80 tracks or 160 tracks) and spindle spin speed (300rpm or 360rpm) |
Software
| Name | Description |
|---|---|
fdcapture.ino | Arduino firmware (sketch) for the floppy shield ( ./fdcapture/fdcapture.ino) |
capture.py | Floppy image capture tool (FD->image). Transfers raw bitstream data from Arduino to a PC (foremerly, transfer.py) |
duplicate.py | Floppy image write back tool (image->FD). Transfers raw bitstream data from a PC to Arduino. Close ' JP5' jumper pad on the FD capture shield to enable the write feature. |
bs2d77.py | Bit-stream data (.raw) to emulator disk image (D77/D88) converter. The program generates modified D77 image data (D77mod). D77mod specification is here. The D77mod uses some reserved bytes in the header but it is designed to keep backward compatibility with the standard D77 disk images. The D77mod image should work with emulators which supports regular D77/D88 disk images. |
bs2hfe | Bit-stream data (.raw) to .HFE floppy image format. The .hfe disk image format is used for the HxC FDD emulator device. |
bs_inspect.py | Data inspection/analyze tool for bit-stream data |
d77_inspect.py | Data inspection/analyze tool for D77/D88 disk image data |
floppylib.py | A library which provides fundamental floppy disk functions. This library is including data-separator, digital VFO, MFM decoder and IBM format parser |
d77dec.py | Convert a D77/D88 disk image data to a JSON (plane text) file |
d77enc.py | Generate a D77/D88 disk image data from a JSON file |
d77lib.py | A libray which provides basic D77/D88 floppy disk image manipulation functions |
kfx2bs.py | KyroFlux raw-bitstream data to fd-shield bit-stream data converter. You can capture FD image with KryoFlux and use it. |
| Date | Description |
|---|---|
| Sep 2022 | Updated PCB design. Changed the 'Write Gate' jumper from jumper pad to jumper pin header for easy setting. |
| Sep 2022 | Added support for the image write back feature (image->fd). Arduino firmware update and closing JP5 on the fd-capture shield are required to enable the feature. |
| Sep 2022 | Added RAW to HFE file converter (bs2hfe.py) |
| Aug 2022 | Backported data-separator and VFO algorithm from fdc_bitstream project. The latest VFO algorithm improved the accuracy of the data reading / decoding. |
The fdc_bitstream is my project that provides a bit-accurate C++ software FDC library. The fdc_bitstream project includes a disk image converter and image analyzer. Those software are written in C++, so they are faster than the converters in this project. Also, they are developed recently and have better algorithms for format conversion. Please try image_converter in the fdc_bitstream project as well.
fdc_bitstreamはビット精度で正確なソフトウエアFDCを開発するプロジェクトです。fdc_bitstreamプロジェクトにもイメージ変換ツールとイメージ解析ツールが含まれています。これらのツールはC++でかかれており、より高速です。またこちらのほうが開発が後なのでより良いアルゴリズムが使われており、イメージ変換の正確性も上がっています。fdc_bitstreamプロジェクトのimage_converterもお試しください。



bs_inspect.pyYou can check the address marks and sector body overlap status with this feature. The entire track data is shown in the window. The yellow vertical line indicates the position of the index hole (it appears when you capture the track data with --read_overlap option). This feature can show the decoded MFM data at the point of the mouse cursor.
Legend:
Example of a normal track

Example of a protected track

You can check how VFO follows the variation of pulse pitch with the bitstream visualizer.
The VFO tries to keep the data pulse be the center of the bit cell as much as possible by tweaking the oscillation frequency (= the bit cell width).



You can check the pulse pitch fluctuation throughout a track with the pulse pitch visualizer. The stabler pitch, the easier MFM decode or data read.


./kicad directoryfdcapture.inopython capture.py -o image_name.raw --read_overlap 5 [--media_type 2D|2DD]capture.py will search COM port for Arduino UNO and use it.--read_overlap option specifies how much data to read on the 2nd lap in percent.--media_type option specifies the media type to read. 2D or 2DD are available.fdcapture.ino can identify the drive type (2D or 2DD) but not the media type.python bs2d77.py -i image_name.raw --abort_idimage_name.d77 will be generated.--abort_id option enables abort reading track image when the same sector ID is detected. The FD-shield can read the top of the 2nd lap with --read_overlap option. This overlapped track data may contain the same sector data twice. This option will prevent from generating the same sector in a track.fdcapture.ino firmware works for both `capture.py' and 'duplicate.y' but updating to the latest firmware is required. Use Arduino IDE to update the firmware (Arduino program).JP5 jumper pad on the fd-capture shield.duplicate.py' to write back a '*.raw' floppy image to a floppy disk.python duplicate.py -i disk_image.raw| File | Description |
|---|---|
| pcb_mfg_data/fdshield-dip-rev-h.zip | PCB manufacturing data. DIP version. Rev.H (Write Gate pin header) |
| kicad/fdshield-dip/fdshield/fdshield.kicad_pro | KiCad v6 design file (DIP) |
| kicad/fdshield-sop/fdshield/fdshield.kicad_pro | KiCad v6 design file (SOP) |
fdcapture shield - Connect Arduino UNO, fdcapture shield, and FDD.spindle_calibration_tool.pyDone:
| P/N | Mfg | FF | Description |
|---|---|---|---|
| YD-580 1354 | YE-Data | 5.25" | 2D, 300rpm, for Fujitsu FM-7 |
| MD5201 | Canon | 5.25" | 2D, 300rpm |
| FD-55B-01-U 19307110-01 | TEAC | 5.25" | 2D, 300rpm |
| FD55-GFR 19307673-93 | TEAC | 5.25" | 2DD/2HD, 360rpm, for DOS/V |
| YD625-1525 | YE-Data | 3.5" | 2D, 300rpm, for Fujitsu FM-77 |
| FD-235HG 19307773-04 | TEAC | 3.5" | 2DD/2HD, 300/360rpm, Fixed to DS1 |
| OSD E26J | Citizen | 3.5" | 2DD/2HD, 300/360rpm, for PX9821Xa? |
| JU-256A236P | Panasonic | 3.5" | 2DD/2HD, 300/360rpm, for DOS/V |
| FD1231T 134-506790-011-0 | NEC | 3.5" | 2DD/2HD, 300/360rpm, for PC9821 |
| DF354H068C | ALPS | 3.5" | 2DD/2HD, 300/360rpm, for DOS/V |





Y1 (Xtal) = 4MHz X'tal.
U6 must be '74HCU04' (unbuffered type). The standard '74HC04' doesn't work.
The other logic ICs can be either one of '74LS' or '74HC'.
PDF
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 150 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R1, R2, R3, R4, R5 |
| 4 | 0.1u | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1, C2, C3, C4 |
| 4 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mm | DS0, DS1, DS2, DS3 |
| 2 | 22p | Capacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mm | C5, C6 |
| 1 | 1M | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R7 |
| 1 | 23LCxxx | Package_DIP:DIP-8_W7.62mm | U5 |
| 1 | 470 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R6 |
| 1 | 74HCU04 | Package_DIP:DIP-14_W7.62mm | U6 |
| 1 | 74LS08 | Package_DIP:DIP-14_W7.62mm | U3 |
| 1 | 74LS125 | Package_DIP:DIP-14_W7.62mm | U4 |
| 1 | 74LS74 | Package_DIP:DIP-14_W7.62mm | U1 |
| 1 | Analog | Socket_Arduino_Uno:Socket_Strip_Arduino_1x06 | P2 |
| 1 | Conn_02x17_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x17_P2.54mm_Vertical | J1 |
| 1 | Crystal | Crystal:Crystal_HC49-U_Vertical | Y1 |
| 1 | Digital | Socket_Arduino_Uno:Socket_Strip_Arduino_1x08 | P4 |
| 1 | Digital | Socket_Arduino_Uno:Socket_Strip_Arduino_1x10 | P3 |
| 1 | LED | LED_THT:LED_D3.0mm | D1 |
| 1 | Power | Socket_Arduino_Uno:Socket_Strip_Arduino_1x08 | P1 |
| 1 | WRITE GATE | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP5 |
It measures 68.6 × 53.3 mm and has 2 copper layers, 1.6 mm thick.
30 parts, built around the 74LS125DC, 74HCU04D and 74LS74PC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the yas-sim/floppy_disk_shield_2d repository on GitHub, at the commit this page was made from: the board is kicad/fdshield-dip/fdshield/fdshield.kicad_pcb and its schematic kicad/fdshield-dip/fdshield/fdshield.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

yas-sim/floppy_disk_shield_2d
This is a project to retain 2D/2DD floppy disk data as a raw bit-stream data. The project includes both HW and SW.



hkzlab/CGA_Redux
The Color Graphics Adapter Redux board is a more or less faithful clone of the original IBM CGA, based on the original schematics

skiselev/zeta_sbc
Zeta SBC is an Zilog Z80 based single board computer. It is inspired by Ampro Little Board Z80 and N8VEM project. Zeta SBC is software compatible with RomWBW Firmware



lynchaj/rhyophyre
Single Board Computer featuring Zilog Z180 processor and NEC µPD7220 Graphics Display Controller
