Sometimes sad things happen and it is hard to write about it. This sunday our friend and CPC community member Nilquader of SPRING died after a long fight against cancer. It was always great to talk to him about CPC hardware or electronics and meet him on several meetings over the last years, where I also had the pleasure to work with him on the Verilog ACID protection chip implementation. He was always very helpful, motivating and productive, so we will miss him a lot for sure. Life can be unfair…
Kangaroo and Nilquader released a new hardware for the Amstrad CPC, which is available for ordering now: the MegaFlash NG ROM box. It is based on the MegaFlash ROM box by Bryce and additionally features a reset button and a “pause” switch. But the best above all – it is available as a construction kit, which means, it will bring the “maker spirit” to you :). Order your kit, heat your soldering iron, have fun with building this new hardware for the Amstrad CPC and after all of that – enjoy your new hardware, e.g. with the games of the 16k ROM competition on the real machine :D. You can order the MegaFlash NG from the Spielquader shop for 24,95 EUR (look out for the “Ready” T-Shirts as well :-)).
Nilquader and I decided to release our Verilog code (based on Nocash’s decryption of the algorithm) to “emulate” the ACID protection chip of the Amstrad Plus. So, you can now find it in the [[Amstrad Cartridge Identification Device|ACID article]] of the CPCWiki and right here in this posting:
`timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: Octoate, Nilquader // ACID Reverse engineering by nocash // // Create Date : 00:45:53 09/03/2010 // Design Name : amsacid // Module Name : amsacid // Project Name : // Target Devices: Xilinx XC9572 // Tool versions : // Description : Reverse engineered Amstrad 40908 "ACID" Chip // // Revision: // Revision 0.05 // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// module amsacid(PinCLK, PinA, PinOE, PinCCLR, PinSIN); input PinCLK; input [7:0]PinA; input PinOE; input PinCCLR; output [7:0]PinSIN; wire PinCLK; reg [16:0]ShiftReg = 17'h1FFFF; wire [16:0]CmpVal; wire [16:0]XorVal; assign CmpVal = 17'h13596 ^ (PinA ? 17'h0000c : 0) ^ (PinA ? 17'h06000 : 0) ^ (PinA ? 17'h000c0 : 0) ^ (PinA ? 17'h00030 : 0) ^ (PinA ? 17'h18000 : 0) ^ (PinA ? 17'h00003 : 0) ^ (PinA ? 17'h00600 : 0) ^ (PinA ? 17'h01800 : 0); assign XorVal = 17'h0C820 ^ (PinA ? 17'h00004 : 0) ^ (PinA ? 17'h06000 : 0) ^ (PinA ? 17'h00080 : 0) ^ (PinA ? 17'h00020 : 0) ^ (PinA ? 17'h08000 : 0) ^ (PinA ? 17'h00000 : 0) ^ (PinA ? 17'h00000 : 0) ^ (PinA ? 17'h00800 : 0); always@(negedge PinCLK) begin if (PinCCLR) // not in reset state begin if (!PinOE && ((ShiftReg | 17'h00100) == CmpVal)) begin ShiftReg <= (ShiftReg ^ XorVal) >> 1; ShiftReg <= ShiftReg ^ ShiftReg ^ ShiftReg ^ ShiftReg ^ XorVal; // hier xorval mit berüchsichtigen end else begin ShiftReg <= ShiftReg >> 1; ShiftReg <= ShiftReg ^ ShiftReg ^ ShiftReg ^ ShiftReg; end end else begin ShiftReg <= 17'h1FFFF; end end //assign PinSIN = ShiftReg[7:0] ^ 8'hff; assign PinSIN = ShiftReg[7:0]; //assign PinSIN = PinCLK; endmodule
But this isn’t everything about the ACID. We also found a timing problem during the investigation with a logic analyzer, which you can see here:
You will find glitches on the /CCLR line which show that the SIN contact should be changed… All in all it is possible to use a fast flip-flop to change the SIN signal when such a glitch occurs (see picture below).
You see, this is a very simple schematic, but it isn’t much cheaper than a CPLD, which emulates the full ACID and it comes with a disadvantage: it won’t work with a reset, so you always have to switch the CPC off and on again.
So, have fun with it – maybe Bryce will change his cartridge design and support this solution in the future :-).
Do you know Simon or Senso? No? It is the music game with 4 buttons in different colors where you have to follow sequences and you have to replay them. Nilquader and Kangaroo Musique wrote a small BASIC game which is called “CPCMon”. Like in the original game, you have to follow the sequences and replay them, too. If you want to play the game, use the T, U, V and N key to press the buttons. You can download it from the thread in the german CPC forum .
You can play the game online, with Devilmarkus’ Java CPC emulator applet, on Kangaroos and Nilquaders homepage.
Nilquader had some free time during the Z-Fest and patched the game Arkanoid so that it now works with a mouse which is connected with the Symbiface II. You can download it from the CPC Forum: http://www.cpc-forum.de/phpbb/download.php?id=106.