Skip to content

CPC4MEGA65 v1.0

Choose a tag to compare

@dfernande132 dfernande132 released this 24 Sep 11:04
· 13 commits to master since this release

An Amstrad CPC 6128 for the MEGA65, built on the
MiSTer2MEGA65 framework and the
MiSTer-devel Amstrad core.

What makes this port unusual is that the MEGA65's internal 3.5" floppy drive
works as a real CPC drive
. It reads genuine CPC disks, formats them, writes
.DSK images onto physical disks and writes changed tracks back. All of it is
verified in both directions against a real CPC 6128: a disk formatted on the
MEGA65 is read by the CPC, and a game copied on the MEGA65 boots on the CPC.

Which file do I download?

Your MEGA65 File
R6 CPC4MEGA65-CoreCPC-v1.0_r6.cor
R3 CPC4MEGA65-CoreCPC-v1.0_r3.cor

R3 is confirmed working by an external tester. R4 and R5 are untested.

You need three ROM files. The core does not boot without them.

Create a folder /cpc4mega65/ on your SD card and put these in it:

File Size
os6128.rom 16 KB
basic6128.rom 16 KB
amsdos.rom 16 KB

They are Amstrad firmware and are not mine to distribute, so they are not
included here. If one is missing, the core tells you which file it could not
find rather than failing silently. Copy the m2mcfg file from this release into
the same folder.

GETTING-STARTED.md walks through all of it from scratch, and assumes you have
never used a CPC. MANUAL-floppy.md is the technical manual for the floppy
drive.

The real floppy drive

Set Internal floppy to Drive A: or Drive B: in the Options menu and that
drive stops being an image and becomes the physical drive in your MEGA65.

Menu item What it does
Read disk now Reads the whole disk into an image the CPC then uses as a normal drive. About 26 seconds, no file needed on the SD card.
FORMAT WHOLE DISK !! Formats 40 tracks in CPC DATA format. A real CPC reports 178 KB free. Destroys the disk.
COPY IMAGE TO DISK !! Writes the .DSK mounted in the other drive onto the physical disk. Destroys the disk.
WRITE BACK TO DISK !! Writes back only the tracks the CPC has modified.
Auto write-back The same, automatically, one second after the CPC stops writing.

The drive LED is the feedback channel: green for success, amber for a bad result
or an empty drive, red for a refusal, and steady amber while modified tracks
are still waiting to be written — do not eject while it is amber.

The whole source image is validated before the write gate opens once, so a disk
is either copied or left untouched. It is never left half-overwritten because a
problem turned up on track 30.

Known limits

  • The copier reproduces what it can reproduce exactly, and refuses the rest
    rather than writing a disk that looks finished and is not. It handles sector
    sizes from 128 to 8192 bytes, up to ten sectors per track, tracks with no
    index mark, and what copy-protected originals use: deleted data marks,
    sectors with no data field, and deliberately wrong data CRCs. In a test
    collection of 29 images, 27 copy and 2 are refused — one whose own signature
    has bit flips, and one with a track whose sector headers share a single
    physical data area, which no .DSK file can describe.
  • Reading a physical disk supports the standard DATA format only. Serving
    tracks straight off the disk, which removes the 26-second pre-read entirely,
    is on the roadmap.
  • The CPC runs at its authentic 50.08 Hz while HDMI outputs exactly 50.000 Hz,
    so one frame is dropped every 12.5 seconds. Fixing this is the first item in
    1.1.
  • Only the CPC 6128. No tape yet. The 464, the 664 and tape are on the
    roadmap.

Credits

The Amstrad CPC hardware is Amstrad plc's, the emulation core is the MiSTer
Development Team's, the framework is MiSTer2MEGA65's, and the MEGA65 port is
mine. See AUTHORS. No Amstrad ROMs are included.

Two framework bugs found during this port were reported upstream rather than
worked around silently, and doc/m2m/exceptions.md documents every change made
to shared framework files with the reasoning behind it.