Skip to content

CPC4MEGA65 v1.0.1

Latest

Choose a tag to compare

@dfernande132 dfernande132 released this 05 Oct 19:36

A bug-fix release. One fix, no new features.

Version 1.0 reported 192 KB of RAM instead of 128 KB, and real CPC diagnostic
software hung when it tested the upper RAM bank. Found and reported by joe65 on Discord, running
CPC Doctor and
Amstrad-Diagnostics on a released 1.0 core - which is exactly the kind of report
that is worth more than any amount of my own testing - neither tool is something
I would have thought to run.

Should you update?

If you only play games and use CP/M, 1.0 was already behaving correctly for
you.
Ordinary CPC software uses the base 64 KB and the single expansion bank,
and both of those were right. What was broken only showed up when something
asked for expansion bank 1 or higher - which on a 6128 means diagnostic tools
and software written for 512 KB expansions.

Update anyway if you want the machine to answer honestly when asked what it is.

What was wrong

A real 6128 does not decode the bank-select bits of its RAM paging register: its
single 64 KB expansion is mirrored across all eight bank values, so C4, CC,
D4 and so on all reach the same memory.

The MiSTer core this port is built on does decode them, and correctly so - in
6128 mode it is deliberately a 576 KB machine, backed by 8 MB of SDRAM. This
port gives it 128 KB of block RAM and was truncating the address to fit, which
left only the parity of the page number reaching memory. Expansion bank 1
therefore did not mirror bank 0 as the hardware does: it landed on the machine's
own base RAM.

Two consequences. Diagnostics counted that as a genuine third 64 KB block and
reported 192 KB. And any program that then tested the block wrote over itself
while it was running, which is why CPC Doctor hung and Amstrad-Diagnostics
dropped back to BASIC.

Expansion accesses now all reach the one expansion block, as on real hardware.
.research/tb_rampage.vhd is a GHDL testbench that checks all 32 page values and
fails against the old code.

Verified

RAM : 128KB in CPC Doctor, its upper RAM test completes, and CP/M Plus - which
uses the full 128 KB through the expansion bank - still boots and runs. Timing
closes at WNS +0.206 ns on R6 and +0.246 ns on R3.

Nothing else changed. The floppy subsystem is untouched.

Installing

Unchanged from 1.0. The
v1.0 release notes
have the full instructions: which .cor goes with which board, the three Amstrad
ROM files the core will not boot without, and where they go on the SD card.