SCUMM Notes From The C64

Aug 06, 2014

More crap that is quickly becoming a fire hazard. Some of my notes from building SCUMM on the C64 for Maniac Mansion.

I'm not sure who's phone number that is on the last page. I'm afraid to call it.



Rum Rogers
That's astonishing!
My house for those notes! Deal?

Rum Rogers
That's astonishing!
My house for those notes! Deal?

Rum Rogers
Oops, sorry for double posting.
Guess I'll have to give you two houses, then.

enthusi
Wow, I love you :)
Great to see it after much of it was reversed, hehe.

Fuz

Derrick R.
Now, if only someone would come up with Data Structures: The Video Game...

Ben
Please dont tell me that by "fire hazzard" you mean that you are going to burn this stuff ?!

Daniel Bernardes
Did you program it in assembly or C? I see a "pointer to code" there so I guess it was C64 assembly...

Ron Gilbert
The C64 was all 6502. There was no real way to compile c on the C64, and it was so slow and memory so limited that every instruction was hand optimized.

When SCUMM was ported to the PC, we switch to c.

Demetris Thoupis
We are seeing a lot of interesting things going on. Sierra is teasing a return  www.sierra.com (whatever that means!). Double Fine is reisuing Grim Fandango. Ron what's going on????

Daniel Bernardes
I learned some basic assembly in college and also built my own processor with a limited instruction set, but I have no idea how to make a large scale project like the SCUMM VM in assembly. Did you "compile" the SCUMM VM code into native code beforehand or you interpreted the code on the C64 itself? The lexical parsing alone would drive me crazy.

Ron Gilbert
The SCUMM code was compiled into byte code that was then interpreted by the SCUMM engine running on the platform. That allowed us to build the game and the run the same code on many platforms.

The SCUMM compiler was written in Yacc, Lex and C. The C64 SCUMM engine was 6502 ASM and the engines on other platforms were in C.

Daniel Bernardes
That is pretty cool, did you publish any papers at the time? You were doing something truly innovative for the time, Java only became popular in the end of the 90s. I didn't even knew that bytecode was a thing back then.

Godzil
That's funny, it's likes I'm looking at my own design notes :) From what I see it's nearly like I would do for a similar engine :)

Thanks Ron for all the material you share, it's really interesting :)

Daniel: Bytecode is in use since a really long time. For example, Microsoft BASIC use bytecode, Pascal use pcode which is basicaly bytecode, smalltalk use bytecode... and lots of other languages I'm not aware.

Daniel Bernardes
Hm, for some reason I thought that bytecode was something more recent. I was aware of smalltalk using bytecode, but I was not aware of any pascal implementations also used it. I guess I was just surprised to see a game use it.

Godzil
Daniel: I would recommend this lecture:
http://en.wikipedia.org/wiki/P-code_machine

Also in early 198x there were a C toolchain named Amsterdam Compiler Kit, that a bit like modern LLVM used a VM (named EM) as it's intermediate code. (Funnily, this 30 year old project is still active!)
More here: http://tack.sourceforge.net/ (I've started to work on sanitizing the source, but this is a really huge work)

CJM
According to the FCC, (415) 662-1799 is (or was) the phone number for Lucas Digital Limited DBA Lucas Film Ltd.  Perhaps you got some help direct from the source?

(Source: http://wireless2.fcc.gov/UlsApp/ApplicationSearch/applMain.jsp?applID=2463713)

DxB
Do you still use graph paper?
what is one + one?