Who is up for a challenge? (Solved! See below) (Patreon)
Content
The Lucas Deeco terminal I'm working on has a PAL between the CPU and ROM address lines designed to scramble the contents of the ROM. This was likely installed to prevent cloning of the system -- but it also has the effect of making it impossible to edit the ROMs or emulate the system.
I dumped the ROMs and created a Github Repo with my notes on what I found. If anyone wants to take a crack and figuring out the scrambling "keys," that would be a fun thing to tackle!
I gave it a try the other night using Google Gemini but without knowing being well versed in x86 assembly, all I could do is decode some of the english language strings in the ROM. The video I posted (Part 1 in the series) shows other strings you will likely find in the ROM code.Oh side note, this is a registered PAL. That means depending on implementation and programming, may not be possible to dump in a conventional way using an external dumper. One surefire way to decode this would be to connect up a logic analyzer with at least 18 inputs to every I/O line on the PAL and take note of it in circuit. (I don't have such a logic analyzer.) Watch the system boot up and observe what it's doing. A project I've been meaning to build up is this: https://github.com/rpocc/PALDump
This might help in decoding this chip if I removed it from the board, although again if it's registered then this likely will not work.
See here for the ROMs and notes:
https://github.com/misterblack1/lucasdeeco/tree/main
https://archive.org/details/lucas-deeco-seal-touchThis problem has been solved by patron Peter Tirsek!!"After a little trial and error, it looks like the "key" is pretty straight forward. I ended up not numbering them the same way you did, but the structure is probably pretty obvious: ``` # Output bit number #0, 1, 2,3, 4,5, 6, 7 [0, 4, 6,7, 1,2, 3, 5], # <-- Input bit number [0, 4, 7,6, 1,2, 3, 5], [0, 4, 6,7, 2,1, 3, 5], [0, 4, 7,6, 2,1, 3, 5], [0, 3, 6,7, 1,2, 4, 5], [0, 3, 7,6, 1,2, 4, 5], [0, 3, 6,7, 2,1, 4, 5], [0, 3, 7,6, 2,1, 4, 5], ``` (Here's hoping that Patreon supports markdown :) ). As you said yourself, the "key" switches every 32 bytes and cycles after 8 keys or 256 bytes total. At least this arrangement gives me something where all strings appear readable, and the disassembled code looks plausible. I'll send an e-mail with the descrambled ROM."The Github Repo is updated with the descrambled ROM. I also turned Peter's C code into a web version for anyone to easily try: https://htmlpreview.github.io/?https://raw.githubusercontent.com/misterblack1/lucasdeeco/refs/heads/main/Lucas%20Deeco%20ROM%20(de)scrambler.html
Thanks everyone who worked on this!