We're using cookies to ensure you get the best experience on our website. More info
Understood
@catadorRegistered June 30, 2020Active 2 years, 10 months ago
1 Reply made

Thanks for the lead, this will certainly help.

That is correct, ISAS can target multiple architectures just fine: 65816 (IS65), SPC700 (ISSND), Super FX (ISSFX), V810 (ISV810)

The main problem with reverse-engineering this file format is that these are extremely old DOS programs, which I have no experience in reversing. I did understand that they use a “DOS Extender 4GW”, but that was about it.
And looking at the .CL files in a hex editor didn’t help… The only noticeable thing I did find is that every byte in the .CL files has its MSB set (0x80). Getting rid of the MSB and opening it as a text file also doesn’t reveal any text strings, so I really don’t know where to go next…

I’m not really familiar with Lisp, but does it operate on some sort of VM with its own bytecode? And even if that was the case, that wouldn’t make much sense as there’s absolutely no text strings in these files…

EDIT: My double-post reply with everything I learned about “.CL” files and the VUCC link to the C compiler used in MOTHER 2 seemed to have gone to limbo, so I’ll just put it here with an edit…

I know this is a very old topic and a double-post but… I didn’t want to leave a forum post unanswered for eternity when I finally got my question.

So, whoever might be searching about this, for whatever reason it may be, I finally know how to read the “.CL” files, and there’s new concrete evidence that VUCC was derived from the C compiler used for MOTHER 2

The answer was really simple all along: Just XOR every byte with 0xFF then add 0x20. You get fully readable LISP source code in ASCII (although no line breaks whatsoever, so you have to format the code yourself for better readability)

This simple Python script does the trick:
(please let this code block work… I don’t really know html for this)
´
# Very hackily put together

import sys

for filename in sys.argv[1:]:
cl_file = open(f'{filename}.CL’, ‘rb’)
out_file = open(f’out/{filename}.txt’, ‘wb’)

out_data = []
for c in cl_file.read():
c = (c ^ 0xFF) + 0x20

# Needs & 0xFF because some bytes end up as 0x0116. What’s up with that?
out_data.append(c & 0xFF)

out_file.write(bytes(out_data))

cl_file.close()
out_file.close()
print(f’Done with {filename}!’)

print(‘\nDone with every file!!!!’)
´

Regarding the supposed existence of “LD-816.CL” and “MD-816.CL” and link to MOTHER 2, evidence has been finally found!!

Excerpt from “CPARSE.CL”:
´
(defun sfcp (ccodef &optional debugger)
(test-parser ccodef “ld-65816.cl” debugger)
)
´

Excerpt from “CGRIND.CL”:
´
(defun sfcc (ccodef)
(test-cgrind ccodef “cparse-65816” “md-65816.cl” “-usefulenum”)
)
´

Evidence of link to the compiler used in MOTHER 2:
https://web.archive.org/web/20070317223659/http://jp.franz.com/base/seminar/2005-11-18/SeminarNov2005-Abe.pdf
https://web.archive.org/web/20170531070139/http://cl-www.msi.co.jp/reports/wblcl.pdf
https://www.4gamer.net/games/999/G999905/20151225009/

  • This reply was modified 2 years, 11 months ago by Catador. Reason: edit instead of double-post
  • This reply was modified 2 years, 11 months ago by Catador. Reason: test markup. was replaced with "`", so might as well try triple ```