# The floppy: images, tracks and what is unknown System 24's floppy games boot a shared BIOS on the main 68000, which loads the game from a disk into RAM and then releases the sub 68000 ([boards.md](boards.md)). The disk "has its own format": this page records what can be learned without opening MAME. ## The images (MAME's `floppy` region, OBSERVED from sizes) MAME carries each disk as one raw file in the romset (`ds3-5000-NN*.img`), loaded as a ROM region; no header (both sizes divide exactly into the track arithmetic below). | Format | Sets | Image | / 160 | Sum of power-of-two sectors that fits | | --- | --- | ---: | ---: | --- | | early | Hot Rod (4 sets), `sspiritj` (with BIOS `epr-11338/11339`) | 1,925,120 | **12,032** | 8,192 + 2,048 + 1,024 + 512 + 256 | | later | 15 sets (with BIOS `epr-12186/12187`) | 1,843,200 | **11,520** | 8,192 + 2,048 + 1,024 + 256 | 160 tracks is 80 cylinders on two sides (HYPOTHESIS: the common 3.5-inch geometry). Each track's byte count is a sum of distinct power-of-two sector sizes, the sizes a uPD765-style floppy controller's size codes N = 1..6 allow (256 << ... up to 8,192). That reading, **one sector of each size per track**, fits both formats exactly and is a HYPOTHESIS (FITTED to the image sizes only); MAME's floppy model would say, unopened. ## The arithmetic of the track A high-density 3.5-inch drive at 300 rpm and 500 kbit/s (HYPOTHESIS: the drive is not identified) passes 500,000 x 0.2 = 100,000 bit cells a revolution, 12,500 bytes of MFM. A format holding 12,032 data bytes a track leaves **468 bytes** for every sector's address mark, ID field, CRCs, sync runs and gaps; IBM's standard layout spends about 60-100 bytes a sector on those, so five sectors with minimal gaps is about the most a track can carry (arithmetic). The early format is close to the medium's limit; the later one gives back 512 bytes, perhaps for drive tolerance (HYPOTHESIS). This is why a standard PC cannot read these disks, which is what "its own format" means in practice. ## What a board needs, and what is unknown | # | Question | Status | | --- | --- | --- | | F1 | the floppy controller chip and its registers on the main 68000's bus | U3: MAME declares no FDC device (its own model inside the driver) | | F2 | the on-disk order of sectors, the image's byte order relative to the disk (the first 16 KB of `gground`'s image are all one value while Hot Rod's are not) | U3 | | F3 | load timing: MAME releases the sub CPU after 8.9 s (`hotrod`) and 11.1 s (`gground`) | OBSERVED in MAME; hardware unknown | | F4 | whether the disk is read again after the load (MAME keeps `floppy_nvram`) | U3 | | F5 | MAME's `.img` as the player's input format | the only dumps in the library; a flux-level dump (Kryoflux, Greaseweazle) would be tier 1 for the format, none found | ## Recommendation for the specification The board loads MAME's `.img` through a `FloppyImage` class that maps (track, side, sector) to bytes by the layout the specification adopts, and an FDC model whose timing is a named choice. Until F1-F4 are settled from a document (MacDonald's s24tech.txt by decision 1, or MAME's BSD-3 `segas24.cpp` read for facts by decision 2), milestone 1 can run the ROM-board sets (`dcclub`, the quiz games) and the BIOS up to its floppy access, and the floppy sets later.