THE SEUCK VAULT
Main | Menus | Archive | Tips | Links | Contact

SECRET OF SEUCKCESS
BY JON WELLS - PART 3

Shortcuts
Part one | Part two | Part three
MAJOR LOCATIONS | PLAYER OPTIONS | SCORES AND ROUTINES | I LIKE TO SCORE
High-score listing 1 | High-score listing 2 | High-score listing 3

Download
All the listings

This article was first published in Commodore Format issue 45.


If you've got the Shoot-'Em-Up Construction Kit you've got a programming tool that makes writing vertically scrolling blasters a doddle. But getting it to produce really good vertically scrolling blasters takes more skill. Stick with Jon Wells, though, and you'll develop the skill.


Blimey, I bet you're thinking, look at all those figures. Let's skip this. But hold on, because these tables are your key to complete control when it comes to setting up in-game features in SEUCK games. This time we're going to look at the memory map which features the locations of some large chunks of game code, as well as the all-important in-game values you'll find within SEUCK. For instance, if you wanted to change the amount of lives player one has, you'd just POKE the new value into the memory address you'll find in the following tables.

MEMORY MAP 1 - MAJOR SECTIONS

DESCRIPTION Decimal location (BASIC) Hex location (machine code)
Spare memory1024-2303$0400-$08FF
Map background scroll data 2304-6399 $0900-$18FF
Block colours (128 bytes) 6400-6527 $1900-$197F
Spare memory 6528-6655 $1980-$19FF
Block data 6656-9727 $1A00-$267F
Scrolling machine code 9728-11391 $2680-$2C7F
Object pointers 11392-12803 $2C80-$3203
SEUCK title screen 12804-13283 $3204-$33DF
Attack wave patterns 13284-16383 $33E0-$3FFF
Main game machine code 16384-25855 $4000-$657F
SEUCK editor machine code 25856-46719 $6580-$B67F
Sound FX data 46720-49151 $B680-$BFFF
Sprite graphicsv 49152-57343 $C000-$DFFF
SEUCK editor text 57344-59391 $E000-$E7FF
Game screen page 1 59392-60415 $E800-$EBFF
Game screen page 2 60416-61439 $EC00-$EFFF
Scroll and score panel code 61440-62463 $F000-$F3FF
SEUCK editor charsets 62464-63487 $F400-$F7FF
Game background charset 63488-65527 $F800-$FFF7

There are also some very important locations dealing with the controls of the two players:

MEMORY MAP 2 - PLAYER OPTIONS

DESCRIPTION Player 1  Player 2
Player enabled 16559 / $40AF  16578 / $40C2
Amount of lives 16557 / $40AD  16575 / $40C0
Speed of player 16550 / $40A6  16569 / $40B9
Player main colour 11411 / $2C93  11471 / 2$CCF
Amount of bullets 16551 / $40A7  16570 / $40BA
Bullet speed 16553 / $40A9  16572 / $40BC
Directional fire 16552 / $40A8  16571 / $40BB
Bullet duration 16554 / $40AA  16573 / $40BB
Character collision 16556 / $40AC  16575 / $40BF
Die or stop (0/1) 16555 / $40AB  16574 / $40BE
Extra life at 10,000 16558 / $40AE  16577 / $40C1
Horizontal start position 16547 / $40A3  16566 / $40B6
Horizontal 256 bit point 16548 / $40A4  16567 / $40B7
Vertical start position 16549 / $40A5  16568 / $40B8
Play area up stop 16543 / $409F  16562 / $40B2
Play area down stop 16546 / $40A2  16565 / $40B5
Play area left position 16541 / $409D  16560 / $40B0
Left 256 bit point 16542 / $409E  16561 / $40B1
Play area right position 16544 / $40A0  16563 / $40B3
Right 256 bit point 16545 / $40A1  16564 / $40B4

Extra important SEUCK addresses include:

MEMORY MAP 3 - SCORES AND ROUTINES

DESCRIPTION Decimal (BASIC) Hex (machine code)
Score player 1 24227-24232 $5EA3-$5EA8
Score player 2 24233-24238 $5EA9-$5EAE
Score clear 17446-17466 $4426-$443A
Score sprite plot 23077-23253 $5A25-$5AD5
Player 1 lives plot 23253-23357 $5AD5-$5B3D
Player 2 lives plot 23357-23461 $5B3D-$5BA5
Score add routine 23461-23561 $5BA5-$5C09
Clear and set SID chip 23561-23603 $5C09-$5C33
SFX initialise 23603-23700 $5C33-$5C94
SFX play 23700-23906 $5C94-$5D62
Player 1 char collision 19083-19192 $4A8B-$4AF8
Player 2 char collision 19866-19975 $4D9A-$4E07

I LIKE TO SCORE

The player's score pointers are stored in a 6-byte series; from 24227-24232 decimal ($5EA3-$5EA8) for player 1, and 24233-24238 ($5EA9-$5EAE) for player 2.

To convert this into BASIC you can use the following routine:

HIGH-SCORE LISTING 1 (click to download the PRG file)

1 S1=0:S2=0:FOR A=24227 TO 24232
2 READ B:S1=S1+(PEEK(A)*B)
3 S2=S2+(PEEK(A+6)*B):NEXTA
4 PRINT"PLAYER 1 = ";S1:PRINT"PLAYER 2 = ";S2
5 DATA 100000,10000,1000,100,10,1


Note: this is how the listing appeared originally in Commodore Format, what follows below is an updated version directly from Jon himself - Andrew.

1 S1=0:S2=0:B=100000:FOR A=24227 TO 24232
2 S1=S1+(PEEK(A)*B):S2=S2+(PEEK(A+6)*B):B=B/10:NEXTA
3 PRINT"PLAYER 1 = ";S1:PRINT"PLAYER 2 = ";S2


If you are using a two-player game, then POKE 16578,0 or 1 starts a one or two player game respectively. Also, in one player mode, you may notice that pressing the fire button on player two's joystick results in no second player appearing.

When using this program, S1 and S2 refer to the two players' scores. You could use these figures to calculate a high-score table if you wanted to, using something a little bit like this:

HIGH-SCORE LISTING 2 (click to download the PRG file)

10 B=9:DIM H1(10),N1$(10): REM FOR 1 PLAYER
11 IF S1>>H1(B) THEN B=B-1:GOTO10
12 B=B+1:FOR A=9TOBSTEP-1:H1(A)=H1(A+1)
13 N1$(A)=N1$(A+1):NEXTA
14 H1(B)=S1:N1$(B)=NAME$

This might be a little difficult to follow, so let's go through the program line by line:

10 - Here we set up an array to hold 10 different names (N1$) and scores (H1)
11 - Next we compare our new score (S1) with the old ones (H1), to find out whether the next score in the table
        is higher than our new score (in Dave Golder's case, it's usually lower).
12 -
13 - These lines then move the scores and names down one position in the list,
         to make room for our new score.
14 - Finally we store the new name (NAME$) and score (S1) into the array.
        This name would be obtained by asking the user to enter it (as with just about any other game ever -
        what do you expect them to do, communicate with the game telepathically?).

The original scores and names would be set up first with DATA statements. The DIM in line 10 simply tells the computer to allocate memory to hold the values and names. If that all seems complicated, then here is an example of setting up the table:

HIGH-SCORE LISTING 3 (click to download the PRG file)

20 FORB=1TO10
30 READN$,S
40 H1(B)=S:N1$(B)=N$
50 NEXT B
55 FORC=1TO10:PRINTN1$(C),H1(C):NEXT
60 DATA "JON",50000
70 DATA "DAVE",40000
80 DATA "ANDREW",30000
90 DATA "WAYNE",20000
100 DATA "RICHARD",10000
110 DATA "ALLAN",5000
120 DATA "SHAUN",2500
130 DATA "NIGEL",1250
140 DATA "SIMON",675
150 DATA "PLAYER 1",0

Remember to put your names inside quotes so any spaces can be handled.
(This is an extra listing added by Andrew.)


That completes the three parts of the article originally published in Commodore Format, updated and edited here to remove some printing mistakes, and to place the debugged listings from part 3 into part 1.


Back to the top