In questa terza puntata dedicata al Commodore 64 ci dedichiamo al reverse engineering di AMC e cioè 'Attack of the mutants camels', il classicone sparatutto del grande Jeff Minter pubblicato nel 1983. Smantelleremo insieme il cammello pezzo per pezzo utilizzando le tecniche proprie della pir@teri@ di un tempo (ma usando strumenti moderni), raccontando storie, aneddoti e chicche del codice, rigorosamente assembly del glorioso 6510.
29. C64 CHAR AND SCREEN MAP
$D018 = %xxxx000x -> charmem is at $0000
$D018 = %xxxx001x -> charmem is at $0800
$D018 = %xxxx010x -> charmem is at $1000
$D018 = %xxxx011x -> charmem is at $1800
$D018 = %xxxx100x -> charmem is at $2000
$D018 = %xxxx101x -> charmem is at $2800
$D018 = %xxxx110x -> charmem is at $3000
$D018 = %xxxx111x -> charmem is at $3800
Character memory Screen memory
$D018 = %0000xxxx -> screenmem is at $0000
$D018 = %0001xxxx -> screenmem is at $0400
$D018 = %0010xxxx -> screenmem is at $0800
$D018 = %0011xxxx -> screenmem is at $0c00
$D018 = %0100xxxx -> screenmem is at $1000
$D018 = %0101xxxx -> screenmem is at $1400
$D018 = %0110xxxx -> screenmem is at $1800
$D018 = %0111xxxx -> screenmem is at $1c00
$D018 = %1000xxxx -> screenmem is at $2000
$D018 = %1001xxxx -> screenmem is at $2400
$D018 = %1010xxxx -> screenmem is at $2800
$D018 = %1011xxxx -> screenmem is at $2c00
$D018 = %1100xxxx -> screenmem is at $3000
$D018 = %1101xxxx -> screenmem is at $3400
$D018 = %1110xxxx -> screenmem is at $3800
$D018 = %1111xxxx -> screenmem is at $3c00
$18 = %00011000
So here I am a total idot in love with somthing from the past
Here in italy we call it Il biscottone
For English speaker is called Breadbin
Don’t know how it’s called elsewhere
But we re talking about the fantastic Commodore 64
Let me introduce you Massimiliano. Another old idiot like me. But he is a fucking genius.
He used to be a gamedeveloper. He wrote games for c64, c128, amiga, pc and xbox, and nintedo DS.
He used to be a pirate, an hacker a security expert. What else… a fucking genius.
And for this talk he reversed and commented the entire assembly code of AMC getting it from a binary dump.
AMC was the first game I ever played on C64, and the first game totally written in assembly on C64 by Jeff.
Before AMC Jeff developed ROX 64 that was written in BASIC.
This is the tape I bought in 1983, as you can see is not so official. But this was the habit of that time. Sorry Jeff. I can say that I bought it from a very serious company in a very elegant office. They were selling professional Commodore PET computer, VIC 20 and C64 as well and in a hidden corner (not so hidden) they copied games from floppies to tape.
Now I would like to introduce Jeff and his life philosophy
The same philosophy that he puts in their games.
I thnk that the best way is to have a look to a couple of pictures of Jeff and Ivan at work
Or look at Jeff Tweets
Probably Jeff is thinking about a new game with of space chickens VS a Giant cock
And explain which was the inspiration for AMC
In the 1982 Empire strikes back for Atari VCS was issued, and Jeff appreciated it, he also loved Defender and there is something similar,
Then he look at the review from C&VG
they called the walkers "giant mechanical camels“.
And he said: I love camels, why not put camels in the game?
So this is Jeff (or better my idea about him), the inspiration can come out from anything around him, just few and simple elements, bur very well fitted inside the gameplay.
I invite you to try AMC, or other games from Llamasoft, Iridis alpha, tempest or Gridrunner they look so simple. But I can assure you that you cannot stop to play. Every time you start something looks like a bit different, you’ll be totally engaged.
I would like to invite Jeff to come on stage and just tell few words about the story of AMC.
CPU VIC SID CIA
Making looking good videogames means to use assembly language
sono tutti memory mapped
Parliamo di assembly.
Il linguaggio permette solo si scrivere numeri in certe locazioni di memoria, fare delle operazioni logico/matemitiche, testare certe condizioni e fare dei salti.
Brief info about C64 hw architecture VIC e SID
E’ tutto memory mapped.
Ogni cosa fa rifemimento ad una locazione di memoria.
I pixel dello schermo sono in memoria (1kbyte si sposta col banco del VIC insieme ai puntatori agli sprite)
I dati dei caratteri e degli sprite ovviamente sono in memoria
Non c’e’ harddisk. Il SO (kernal) e le utility sono caricate in ROM sovrapposta alla RAM
47 registri MEMORY MAPPED
47 registri MEMORY MAPPED
Curioso l’indirizzamento indiretto indicizzato per fare STA $D018
Da modificare il commento per la posizione X degli sprite è sbagliato