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

SECRET OF SEUCKCESS
BY JON WELLS - PART 2

Shortcuts
Part one | Part two | Part three
BEFORE WE START | STARTING THE GAME | A BASIC DEMONSTRATION
Listing 2a | Listing 2b | Listing 2c | Title screen listing

Download
All the listings

This article was first published in Commodore Format issue 41,
and reprinted in issue 43.


In part 1 we covered the basics of getting into our SEUCKed games. Now we'll go one step further - incorporating BASIC into the finished games. This will enable us to use the 64's BASIC programming language to display better title screens, add high score tables and end sequences or even incorporate intro sequences, get ready and game over parts. Before we start though, you will need the hack listings from part 1.


BEFORE WE START

First of all, use the Hack listing and load in your SEUCKed game. If you remember, hitting RESTORE will exit you to BASIC. At this point we will now install the BASIC driver.

When a finished SEUCK game is saved, the editor is saved with it, but the finished program does not use it. The SEUCK editor is over 20K from locations $6500 to $8680. What a waste of memory. If there was only some way to use this memory for extra presentation... Well, that's exactly what these next few listings do.

Now enter the following fab listing:

Before we type them in though, enter POKE 21745,87. This POKE moves the random fire from a routine in the editor to a part of the main code.

LISTING 2A (Click to download the PRG file)

5 FOR A=25856 TO 25873:READ B:POKE A,B:NEXT A
10 DATA 162,0,189,0,9,157,0,105,189,0
11 DATA 10,157,0,106,232,208,241,96

SAVE it for future use, RUN it and enter SYS 25856. Type NEW and this gives us a bit more BASIC space to enter a bigger listing as follows:

LISTING 2B (Click to download the PRG file)

5 C=0:FOR A=25856 TO 25983:READ B:POKE A,B
6 C=C+B:NEXT A
7 IFC<>14459 THEN PRINT"DATA ERROR!":END
10 DATA169,0,141,90,94,141,16,72,141
11 DATA131,72,141,51,73,169,128,141,21
12 DATA72,141,126,72,141,46,73,164,224
13 DATA141,91,94,141,17,72,141,22,72
14 DATA141,127,72,141,132,72,141,47,73
15 DATA141,52,73,169,121,141,27,72,141
16 DATA122,72,141,212,73,169,122,141
17 DATA89,94,169,105,141,215,72,141,227
18 DATA71,141,187,73,160,11,162,0,140
19 DATA94,101,140,102,101,152,24,105,96
20 DATA141,97,101,189,0,37,157,0,133
21 DATA169,0,157,0,37,232,208,242,200
22 DATA192,38,208,222,189,0,38,157,0
23 DATA134,169,0,157,0,38,232,224,128
24 DATA208,240,96

Remember to SAVE this listing as well. RUN it and type SYS 25856 again. This amazing listing has just relocated all of the map, colour and block data over the editor, and also changed the pointers in memory to read this. One more listing to go and we're nearly there. Enter NEW again and type in this listing:

LISTING 2C (Click to download the PRG file)

5 C=0:FOR A=25856 TO 26031:READ B:POKE A,B
6 C=C+B:NEXT A
7 IFC<>20475 THEN PRINT"DATA ERROR!":END
10 DATA162,0,189,0,0,157,0,225,232
11 DATA208,247,169,0,141,32,208,169,51
12 DATA141,94,66,169,101,141,95,66,169
13 DATA96,141,0,65,32,211,64,32,3,96
14 DATA32,41,66,32,233,67,169,208,141
15 DATA231,67,76,96,66,32,211,64,169
16 DATA129,141,13,220,169,240,141,26,208
17 DATA169,127,141,13,221,169,151,141
18 DATA0,221,169,63,141,2,221,169,4,141
19 DATA136,2,169,21,141,24,208,169
20 DATA8,141,22,208,162,2,189,0,225,157
21 DATA0,0,232,208,247,169,127,141,0
22 DATA220,169,255,141,2,220,141,7,220
23 DATA141,4,221,141,5,221,141,6,221
24 DATA141,7,221,169,8,141,14,221,141
25 DATA15,221,169,55,141,18,208,169
26 DATA113,141,25,208,169,27,141,17,208
27 DATA169,55,133,1,88,96,169,127,133
28 DATA51,133,53,133,55,169,38,133
29 DATA52,133,54,133,56,96

Once that's all typed in, SAVE it and RUN it. Then you must enter SYS26015, which allocates the original map locations into BASIC locations and installs BASIC into SEUCK.

STARTING THE GAME

From now on you must enter SYS 25856 to run your SEUCK game without the normal title screen. If you quit or die, the SEUCK game will return back to BASIC from where it left off.

If you are playing about with one of the SEUCK demo games, enter POKE 16964,0 to stop the game from returning to the editor when the Space bar is pressed.

And from now on you won't need the reset hack, so enter POKE 24593,0 to disable it.

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.

As we no longer need the data listing, type NEW to clear the program. Now let's check to see how much BASIC memory we've got. To do this type the following:

PRINT FRE(0)-(FRE(0)<0)*65536

If all goes well you should have about 7800 bytes, which is about 8K of BASIC RAM; more than enough for what we want. There's still plenty of memory left from the editor - 5.5K from $A000-$B6B0 which can be used for music, and 7K from $6600-$6900/$8680-$A000 which we can use for add-on machine code.

A BASIC DEMONSTRATION

Now for a small BASIC program to demonstrate how you can add to the game. Type this in and RUN it.

TITLE SCREEN LISTING (Click to download the PRG file)

1 REM ** TITLE AND GAME OVER DEMO **
2 PRINTCHR$(147);CHR$(19);CHR$(5);
3 FORA=0TO200:NEXTA
4 PRINTTAB(2);"MONSTER MASH COPYRIGHT 1993 C-FORMAT"
5 GOSUB10
6 PRINTCHR$(147);CHR$(152):SYS25856
7 PRINT"{down}{down}{down}{down}{down}{down}{down}{down}{down}"
8 PRINTTAB(16);"GAME OVER"
9 GOSUB10:GOTO2
10 PRINT:PRINT:PRINTCHR$(150);
11 PRINTTAB(9);"PRESS SPACE TO CONTINUE"
12 GET A$:IFA$<>CHR$(32) THEN GOTO12
13 RETURN

(Replace the {down} in line 7 with CRSR downs; there should be 9 of them.)

Nothing special I know, but it should give you a rough idea of how it all works.

In part 3 we'll look at the memory map and adding a high score table.


Back to the top