Changes

C't 512 KB internal RAM expansion

354 bytes added, 14:10, 19 July 2023
[[Category:DIY]] [[Category:Memory expansions]]A project to upgrade a CPC6128 to 512K RAM (total), done by replacing the CPC6128's RAM chips, and its PAL banking chip, the project was released 1987 in german IT magazine '''c'tMagazin'''. == Technical == The memory is accessed via Port 7Fxxh, as on [[Standard Memory Expansions]]. Since the internal RAM is removed, its total capacity is only 512K (unlike standard 512K expansions which provide 64K internal plus 512K external memory, ie. 576K total). Altogether, the c't expansion works like a 448K dk'tronics expansion (leaving the banks selected via OUT [7Fxxh],FCh..FFh unused). One half (256K) of the total (512K) expansion memory can be accessed as Video RAM (with normal expansions, only 64 KB are accessible as VRAM). This is making the expansion slightly incompatible with the dk'tronics standard. However, usually expansion memory is mapped to 4000h-7FFFh, whilst VRAM is usually mapped to C000h-FFFFh. So, most existing software may work with it, without accidently displaying garbage on the screen.
== The Circuit ==
* RAMDIS is not supported, not a problem in most cases, but won't work with some special types of expansion hardware, like [[Multiface II]].
* The bank selection for CPU address expansion seems to have been designed independently of [[Standard Memory Expansions]] like the dk'tronics one. So, there is no (intended) compatibility. However, both c't and dk'tronics are designed around the CPC6128 banking mechanism, so they do work similar in some ways. Namely, both can map expansion banks to 4000h..7FFFh does also affect bank bits0-1 for VRAM at , but there are several differences:** For the mapping to 4000h..7FFFh; thus the CRTC may see bank 0-3 , dk'tronics uses values CCh..CFh, D4h..C7h, DCh..DFh, ... FCh..FFh whilst c't uses values C8h..DFh. Some of these values do overlap, resulting in that region some (whilstunintended) semi-compatibility, as far as knownbut there's still one big difference: along with the above values, on a normal CPCdk'tronics maps bank 3 to C000h..FFFFh, it should always see whilst c't maps bank 1 in 7 to that region).
== Missing Info Memory Configurations ==
* Unknown which banks are usable as VRAM** The first four 16K bank memory is controlled by OUT [7Fxxh],C0h..DFh instructions. Values C0h..C7h are (probably) usuable as VRAM (working same as on all 64K CPC models)** The next four 16K bank are (hopefully) not usuable as VRAM (for CP/M+ compatibility, which uses them as Work normal CPC6128s. Values C8h..DFh do access the additional RAM)** For further banks it's totally unknown if they are used as VRAM or not* Unknown if it's fully dk'tronics compatible, or more like incompletely implemented Inicron (C8h..D3h when using the cut-down 320K upgrade variant* Unknown what happens on accessing the unused region via OUT [7Fxxh],FCh.).FFh == Memory Configurations ==
OUT [7Fxxh],C0h+... 0 1 2 3 4 5 6 7 8..31
== PAL Source Code ==
 
Below is a typed-up and commented copy of the PALASM source code from the original article.
D7D6 D0 D3 D4 D1 D2 NCAS A15 A14 GND ;pin 1..10
IF (GND) /IOWR=/IOWR ;dummy (do not output anything on this pin)
== Newer Info == Having a short look at the article, it seems to be all different as than expected'''Note* There is no dk'tronics compatibility intended - however, c't and dk'tronics For VRAM access, bank bits 2,3,4 are based on the CPC6128 banking mechanismforced to zero (by above formulas), so they work similarbank bit 0, and 1 are coming from the CRTC, passed directly to some level there is some IC109 (unintendedwithout going through the PAL) compatibility. Namely, ONE HALF of so, the RAM banking affects only the CPU's memory can be accessed in dkaccesses, not the CRTC'tronics style fashions video memory accesses.
Some notes on the syntax:* There seems to The first two lines assign the pin-outs. Observe that leading "/" slashes are omitted here. For example, "/CPU" (in schematic) becomes "CPU" (in source code). Accordingly "/CPU" (in source code) would be no hardware based double-negated "Video RAM//CPU" support at allaka "CPU" (in schematic). However* The "IF (condition) signal=" part means that "signal" becomes an output when condition is true. In the above source code, there's some unspectacular software based example included condition is always true (VCC), or, for the last 2 lines, always false (GND).* The "*" and "+" operators are meaning "* = AND", "+ = OR". The idea behind that copies expansion RAM confusing syntax was to VRAM via LDIR opcodemake it "easier" to learn for people who are trained only in basic maths (the formulas do also work when treating *=multiply, and +=plus. For example: 1+0+1+1 = 3 = nonzero = true).* There must be some priority ordering in the formulas: Either * before +, or operations inside of a line before merging the results of the separate lines (in above examples, both ordering methods do work).
== Scanned Article / Schematics ==
== Related hardware modifications ==
* [http[CPC_6320_/_CPC_6512_-_internal_320K_/_512K_for_CPC_6128|CPC 6320 / CPC 6512 (by eto) - similar logic, but fully standards compatible]]* [https://cpcwiki.eu/forum/index.php/topic,662.msg7113.html#msg7113 Bank Swapper by Khany/Cherry-T] (less complex: bank-exchanging toggle, no memory expansion; 1993)
* [[CPC4MB| CPC4MB memory upgrade by Yarek]] (more advanced; 2005/2006)
144
edits