Skip to content

Commit 80f147d

Browse files
authored
Update README.md
1 parent e4896d0 commit 80f147d

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

src/README.md

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
11
## Matrix for the VIC 20 and Commodore 64
22

3-
Matrix was originally written for the Vic 20 in 1983 and later ported to the C64 in 3 days. You can
4-
read more about each implementation in the notes for each of the ports, but here we collect some observations
5-
on the differences between the two versions.
6-
7-
### A small bug in the C64 port
8-
![zapper](https://user-images.githubusercontent.com/58846/109517849-9ac72d80-7aa1-11eb-954d-3b93cf39dd84.gif)
9-
10-
Minter converted the Vic 20 to C64 in a hurry and left at least one small bug behind in the process. The
11-
original Vic 20 version animates the tail of the 'zappers' as they move across the screen. This is achieved
12-
by a neat trick which bitshifts one of the bytes that makes up the 8-byte character set definition for the
13-
'zapper' glyph.
14-
15-
```asm
16-
;-------------------------------------------------------------------------
17-
; AnimateZapperTail
18-
;-------------------------------------------------------------------------
19-
AnimateZapperTail
20-
LDA charsetLocation + $0109
21-
ROL
22-
ADC #$00
23-
STA charsetLocation + $0109
24-
RTS
25-
```
26-
27-
When porting to C64 he forgot to update the 'STA' statement to refer to the new location of the character
28-
set:
29-
30-
```asm
31-
; AnimateZapperTail
32-
;-------------------------------------------------------------------------
33-
AnimateZapperTail
34-
LDA charSetLocation + $0109
35-
ROL
36-
ADC #$00
37-
;FIXME: should this be charSetLocation + $0109 like in Vic20?
38-
STA f1509
39-
RTS
40-
```
41-
42-
Instead of storing the updated, bit-shifted byte to its original location of $2109, he instead stores it
43-
to the equivalent location of the byte in the Vic 20 version ($1509). The result is that the animation
44-
doesn't happen. It's very hard to notice this bug in practice as the characters are much smaller on a C64
45-
screen and the effect is too subtle in C64 to notice its absence.
46-
3+
To learn more about the source code for Matrix, Gridrunner and other games in the Gridrunner series, checkout [Gridrunner:The Little Black Book](https://github.com/mwenge/llamaSource/blob/main/GridrunnerTheLittleBlackBook.md), a work in progress dissecting the internals of these Llamasoft games.

0 commit comments

Comments
 (0)