Skip to the content
2 layers119.6 × 123.9 mmCpc6128 rom board, the printed circuit board in 3D

A ROM Board for the Amstrad CPC 6128 capable of loading two expansion ROMs simultaneously from an SD card.

Size
119.6 × 123.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
44
Nets
101
Pads
304
Tracks, vias
889, 31
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
4 Oct 2021
Updated
25 Jun 2023

Overview

Cpc6128 rom board is an open-source printed circuit board by bmpc, from the bmpc/amstrad_cpc6128_romboard repository on GitHub. It is a 2-layer board of 119.6 × 123.9 mm with 44 parts on 101 nets, routed with 889 tracks and 31 vias.

It is built around the ATMEGA328-PU, SN74HC126N and SN74HC595N, with the SN74HC21N, SN74HC02N and SN74HC74N among its other parts. Its parts include 14 capacitors, 10 ICs, 6 resistors, 5 switches and 2 connectors. It belongs with the retro computing and games boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

6

README

README.md

Amstrad CPC 6128 ROM Board

A ROM Board for the Amstrad CPC 6128 capable of loading two expansion ROMs simultaneously from an SD card.

Nowadays, there are plenty of ROMS available for the Amstrad CPC. This board allows you to load any ROM present on an SD card as an expansion ROM on the Amstrad CPC 6128. You can bank up to two ROMs at the same time since there are many programs and games that require two ROMs loaded concurrently. In order to select which expansion ROMs should be made available for the Amstrad CPC, the ROM Board provides a small OLED display and buttons that allow the user to browse the SD card files and choose the Upper and Lower ROM specifically.

The ROM board connects to the expansion port of the Amstrad CPC6128. Here is a picture of the assembled board:

rom_board_1

 

User interface

Upon startup, the selected ROMs for the upper and lower positions are loaded to the SRAM. The display shows the loading progress of each ROM. Once the ROMS are loaded, the display shows the ROM names that are currently loaded.

In order to select ROMs from the SD card, five buttons are provided so that the user can:

  • SELECT a given ROM for the upper or lower ROM position
  • CANCEL the selected action and return to the loaded ROMs initial screen.
  • Move UP and DOWN the ROM root folder on the SD card
  • RESET the Amstrad CPC and the ROM Board

Browsing ROMs:

  • From the main screen, click on the UP or DOWN buttons to enter the browsing mode.
  • In browsing mode, navigate using the UP and DOWN buttons to choose a ROM file from the SD card.

Selecting a ROM:

  • Once the desired ROM is chosen, press the SELECT button.
  • A new screen will appear, prompting the user to select the ROM bank position: Lower or Upper.
  • Switch between the lower and upper bank by using the UP and DOWN buttons.

Saving the ROM:

  • Press the SELECT button to save the ROM file on the selected bank.
  • To complete the process, restart the Amstrad CPC. This can be done by turning off and on the computer or using the RESET button on the ROM Board.

Canceling ROM Selection:

  • If you wish to cancel the ROM selection, press the CANCEL button.
  • You will be returned to the main screen.

Demonstration video

Amstrad CPC ROM Board

The circuit

The circuit can be divided into two parts:

  1. ROM loading, browsing and selection
  2. ROM expansion interface with the Amstrad CPC

The common part between them is the address bugs, the data bus and the SRAM that holds the loaded ROMs.

Ensuring that only one device assumes control of the bus at all times is a crucial aspect to consider. Because we are using the same address and data bus of the Amstrad CPC, when the Amstrad CPC is accessing the bus, the ROM Board shift registers must be tri-stated. Likewise, whenever the ROM Board is accessing the bus in order to load the ROMs, the Amstrad CPC must release control of the bus. This is accomplished by requesting control of the bus through the BUSREQ line being pulled low.

ROM loading, browsing and selection

The ROM board is based on a atmega328p microcontroller, the same microcontroller that you can find on development boards such as the Arduino Uno. The atmega328p is responsible for loading the selected ROMs (upper and lower) from the SD card into a 32K SRAM (AS6C62256A) when the Amstrad CPC boots up.

The loading duration for both ROMs is approximately 5 seconds. Therefore, we need a way to hold the CPC6128 until the ROMs finish loading. This can be achieved using the BUSREQ and BUSACK lines on the Z80. When the Amstrad CPC starts up, the ROM Board will immediately pull the BUSREQ LOW with a pull low resistor. Once the BUSACK line is LOW, the Z80 is signaling that control of the address bus, data bus and output signals has been released, and our ROM Board can take control and it starts loading the ROMs. When the atmega328p finishes loading the ROMS, it will pull the BUSREQ HIGH and the Z80 resumes processing.

In order to copy the ROM data from the SD card into the SRAM memory, three 8-bit shift registers are used as there aren't enough GPIO pins on the atmega328p for the 15 address lines, 8 data lines and multiple other control signals needed for the ROM board.

Once the ROMs are loaded and the Amstrad CPC has completed the boot process, the user can interact with the ROM Board in order to configure additional ROMs by browsing the SD card and selecting the Upper and Lower ROM. The selected ROMs will be saved within the atmega328p internal EEPROM. In order to load the newly selected ROMs, the Amstrad CPC and the ROM Board must be restarted.

ROM expansion interface with the Amstrad CPC

Whenever the CPC wants to communicate with the Upper ROM, it will first write a byte with the selected Upper ROM bank number into port $DF00. There can be up to 252 expansion ROMS mapped over the top 16K of memory, starting at #C000. After this, the ROMEN signal will go LOW, and the CPC will start addressing the Upper ROM.

We must guarantee that there is a unique Upper ROM enabled at any given time. Therefore, whenever an expansion ROM is active, the internal CPC Upper ROM must be disabled. This is done by bringing the ROMDIS line LOW, a signal conveniently provided by the CPC for this purpose. After this, any memory requests to the ROM’s address space will be handled solely by the selected expansion ROM.

The CPC does not store the selected ROM Bank number anywhere. Peripheral devices are responsible for latching the selected ROM bank whenever the bank number is written to port $DF00.

Our ROM Board supports up to two ROMs mapped for the Amstrad CPC Upper ROM bank. These ROMs are located at positions #14 and #15 (that we call Upper and Lower ROMS on the ROM Board).

Whenever the Amstrad CPC tries to select a given ROM through the IO port, if the ROM being selected is provided by the ROM Board (#14 or #15) then a latch is used to store this information. Another latch is used to store which of the ROMs was selected: #14 or #15. A Dual D-Type flipflop (SN74HC74N) was used for these latches.

The Tristate buffer (SN74HC126N) is used to tie the A14 line to the selected upper or lower ROM stored in the previous latch. The A14 line must be tri-stated from the Amstrad CPC bus whenever the ROMS are being loaded.

You can find more detail information regarding the build of this ROM Board in the following post: https://bmpc.github.io/amstrad-cpc-rom-board.

Schematic

schematic_1

BOM

  • Atmega328 x1
  • 74HC595N x3 (shift registers)
  • 74HC74N x1 (D FlipFlop)
  • 74HC21N x2 (Dual 4-input AND gate)
  • 74HC126N x1 (3-state bus buffer)
  • 74HC02N x1 (Quad 2-input NOR gate)
  • AS6C62256A x1 (32k sram)
  • 10kΩ resistor x1
  • 1.8Ω resistor x1
  • 1Ω resistor x5
  • 220Ω resistor x1
  • 1N4148 x1 (Standard Diode 300mA 75V)
  • 22pF 50V capacitor x2
  • Push Buttons x5
  • Cristal 16Mhz x1
  • MicroSD card breakout x1 (adafruit)
  • 0.96inch OLED x1 (0.96inch OLED 128X64 w/ SPI/I2C interfaces and vertical pinheader 4pin - White)
  • 02x25 socket x1 (expansion port)

References

Disclaimer

I'm a software engineer with no background in electronics. Please don't consider what you read here to be best practice. Use at your own risk.

Nevertheless, feedback is always welcome.

Parts

44
QtyValueFootprintReferences
10C_SmallCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC3, C4, C7, C8, C9, C10, C11, C12, C13, C14
51KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3, R4, R6
4MountingHole_3mmMountingHole:MountingHole_3mmHole1, Hole2, Hole3, Hole4
3SN74HC595NPackage_DIP:DIP-16_W7.62mm_SocketU4, U6, U8
222pFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC5, C6
2C_PolarizedCapacitor_THT:CP_Radial_D4.0mm_P2.00mmC1, C2
2SN74HC21NPackage_DIP:DIP-14_W7.62mm_SocketU5, U9
10.96inchOLED128x64CPC6128_ROM_BOARD:0.96inchOLED128x64DS1
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR5
1AS6C62256ACPC6128_ROM_BOARD:DIP-28_W15.24mmU1
1ATmega328-PPackage_DIP:DIP-28_W7.62mmU2
1CPC Expansion PortConnector_IDC:IDC-Header_2x25_P2.54mm_VerticalJ1
1CancelButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW5
1ConfirmButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW4
1Crystal 16MhzCrystal:Crystal_HC18-U_VerticalY1
1DDiode_THT:D_A-405_P7.62mm_HorizontalD1
1DownButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW3
1Micro_SD_CardCPC6128_ROM_BOARD:Micro_SD_Card_breakout_boardJ2
1ResetButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW1
1SN74HC02NPackage_DIP:DIP-14_W7.62mm_SocketU7
1SN74HC126NPackage_DIP:DIP-14_W7.62mm_SocketU10
1SN74HC74NPackage_DIP:DIP-14_W7.62mm_SocketU3
1UpButton_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716SW2

Similar boards

  • 2 layers170 × 105 mmSsio check, the printed circuit board in 3D

    Ssio check

    paulbruneau/ssio-check

    A bench tester for the Bally/Midway MCR Sound I/O family: the 90908 Sound I/O and the 90913 / 91483 / 91657 Super Sound I/O (Z80, two AY-3-8910s, and all of the game's input ports).

    72 parts
  • 2 layers134.6 × 101.6 mmJamieMotorControl, the printed circuit board in 3D

    JamieMotorControl

    shareresearchteam/SAMI-Robot

    Software and Hardware resources and development of the SAMI humanoid robot

    43 parts5MIT
  • 2 layers152.9 × 74.9 mmClock, the printed circuit board in 3D

    Clock

    erikvanzijst/clock

    24H digital quartz clock from scratch

    82 parts21
  • 2 layers80 × 90 mmPico datalogger, the printed circuit board in 3D

    Pico datalogger

    bablokb/pcb-datalogger-v1

    Pico board for data-logging with power-management and micro-sd storage

    37 partsCC-BY-SA-4.0
  • 2 layers56 × 70 mmPico datalogger v2, the printed circuit board in 3D

    Pico datalogger v2

    bablokb/pcb-datalogger-v2

    Pico board for data-logging with power-management and XTSD storage

    41 partsCC-BY-SA-4.0
  • 2 layers53.1 × 61.5 mmPico app base, the printed circuit board in 3D

    Pico app base

    bablokb/pcb-pico-app-base

    Generic application base PCB for the Raspberry Pi Pico(W)

    41 partsCC-BY-SA-4.0
  • 2 layers98 × 56 mmPicowater, the printed circuit board in 3D

    Picowater

    locked/picowater

    cmake -DPICOBOARD=picow -DWIFISSID=" " -DWIFIPASSWORD=" " -DSERVERIP=" " -DSERVERPORT= ..

    56 parts

Questions

How big is the Cpc6128 rom board PCB?

It measures 119.6 × 123.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Cpc6128 rom board use?

44 parts, built around the ATMEGA328-PU, SN74HC126N, SN74HC595N and SN74HC21N. 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.

Where can I download the Cpc6128 rom board KiCad files?

From the bmpc/amstrad_cpc6128_romboard repository on GitHub, at the commit this page was made from: the board is KiCad/cpc6128_rom_board/cpc6128_rom_board.kicad_pcb and its schematic KiCad/cpc6128_rom_board/cpc6128_rom_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cpc6128 rom board design in my own project?

Its repository states no licence, so its author keeps all rights: ask bmpc before reusing the design.