Changes
Added picture of the decapped ACID chip
[[Image:Inside GX4000 cart 1.jpg|frame|right|ACID protection chip within a cartridge (bottom)]]
The '''ACID''' ('''A'''mstrad '''C'''artridge '''I'''dentification '''D'''eviceAmstrad Cartridge Identification Device) protection chip is used in the [[GX4000 cartridge|cartridges]] of the [[Plus]] series and the [[GX4000]] game console. It is labeled with "Amstrad 40908". Because this chip was a custom creation by Amstrad After Nocash decrypted the internal algorithms it is currently not possible to replace this the protection chip nor to build new cartridges, because it is not known how it workswith a complex programmable logic device (CPLD).
if PinCCLR=0 then ShiftReg=1FFFFh ;\done at falling CLK edge
PinSIN=ShiftRegBit0 ;/
;Mind that above is a software example - a hardware solution obviously
;wouldn't require CmpVal and XorVal registers - instead, hardware would
;directly deal with the PinAx (or NOT PinAx) signals.
Replacing or overwriting the EPROM in existing cartridges is easy, so the ACID doesn't prevent piracy or homebrew programming. However, it prevents commercial developers from producing unlicensed cartridges.
== Timings ==
Although the functionatlity of the ACID chip is known. The timings of the signals coming from the computer is still unknown (reverse-engineering was done on a ACID chip, without owning a CPC+/GX4000).
* CLK is known to be 4MHz, and SIN is known to be updated on falling edge of CLK, as seen on [[Media:ACID-SIN.jpg|this picture]].
* Judging from the ACID chip, /CCLR is checked on falling edge of CLK. However, juding from [[Media:ACID-CCLR.png| this picture]], /CCLR is ''changing'' on falling edge of CLK. If this is true (the picture resolution isn't perfect), then it's unclear how the ACID can interprete /CCLR in a stable way while it's changing. Possibly, it can't do that at all (ie. it might act unstable, and the CPC+ might need to retry sending /CCLR several times).
** '''WANTED:''' A picture showing CLK and /CCLR without ACID connected (at better resolution) would help!
** A picture showing CLK and /CCLR with ACID connected is [[Media:ACID Init by Grim.png|found here]].
* The /CE timing is still unknown, too. The ACID might check A0-A7 on raising or falling edge of /CE. Or, on raising or falling edge of CLK while /CE being LOW. Or at whatever other time.
** '''WANTED:''' A picture showing CLK and /CE would help!
** '''WANTED:''' Best also showing one or more of the A0-A7 signals.
<gallery>
Image:ACID Init by Grim.png|/RESET, CLK, CCLR, SIN (init sequence)
Image:ACID-SIN.jpg|CLK and SIN
Image:ACID-CCLR.png|CLK and CCLR (and some offtopic signals) (from CPC, without ACID connected)
</gallery>
== Pinout ==
<pre>
+--()--+
GND |1 16| +5V AMSTRAD 40908 A7 |2 15| A6 1L03P1003 CLK4|3 14| A5 JAPAN
NC |4 13| A4
CCLR|5 12| A3
Note: The two GND pins are interconnected with each other (inside of the chip). The NC pin seems to be always high.
==InvestigationsClones ==
*An ACID replacement using a Xilinx XC9536 CPLD and some [[Verilog implementation of the ACID chip|Verilog code]] based on nocash's reverse engineering work has been built by [[Octoate]] and [[Nilquader]].* Miguel Angel (aka mcleod_ideafix) has published all the info about his implementation of the ACID in a CPLD, verilog sources included [http://amstradcpcwww.mforoszxprojects.com/305097index.php/7723493analisis-quedel-hacechip-exactamenteacid/62-analisis-eldel-chip-acid-dedel-losamstrad-cartuchoscpcgx4000]* It's possible to use the CPC+ without ACID by exploiting a timing bug in the CPC+/ GX4000-ASIC Chip. (Spanish languageDeveloped by [[Nilquader]])<gallery caption="Running CPC+ without ACID">Image:NoAcid.jpg|GX4000 running without ACIDImage:NoAcid_sch.png|Schematics</gallery>
==Investigations==
*[http://www.vieuzordiland.fr/index.php?option=com_content&task=view&id=23&Itemid=34 Vieuxzordiland''For twenty years, s page on the once glorious Amstradom struggled and was about to loose it to the might of the Commodore's legions and Nintendorks hordes, a fight It wouldn't winmatter.''In French]
[[Category:Hardware]][[Category:Cartridges| ]][[Category:CPC Plus]][[Category:CPC Internal Components]][[Category:Amstrad Products]][[Category:Electronic Component]]