2 years ago 2 years ago General Coding Share

Conqueror – Pascal Source Code and Details

Play and see the source code and other details of the game Conqueror, which I wrote in Pascal on the Commodore 64 in early-mid high school.

I'll add more info as I get around to it. The version of Pascal is called G-Pascal and I'll write more about that also.

Play Conqueror

You can play Conqueror here in your web browser.

Eventually I'll put up .D64 file of it, and other things also.

The cabinets of the "arcade games" of that era always had spaceship artwork on them, which was the inspiration for the cover photo of this page.

The game has about 1000 lines of source code in Pascal, plus more in machine language which I may also put up on the site if/when I get time (I'll have to disassemble it from the opcodes since that's the only form it still exists in currently).

I still have a copy of the editor I used to make most of the graphics, I'll put that on the website also later. I typed in the entire code of the sprite editor from a (paper) magazine. It was a lot harder to obtain software (and hardware too) until more recently.

I'll indent the source code more fully later (it's about half done currently). It wasn't indented on the original Commodore 64 version, because every space takes up one extra byte which could be a character of actual code. When you only have about 20K of RAM to write in, every byte counts, and there is no place for excessive use of whitespace characters. It's a lot different to coding on a modern (or even a more powerful vintage) computer.

I'll also put up a screenshot of how the code looks in the actual G-Pascal Commodore 64 editing program.

G-Pascal Source Code of Conqueror

   1 (*%a 16384  *)
   2 var kn,t,pp,ew,tp,l,exman,
   3 		bombs,dr,watch,point,plx,ply,bb,
   4  		vv,sc,fl,x,y,ks,a,i,xx,yy,
   5 		bl,me,kf,za1,za2,kk,m,he,
   6 		wall,thingfreq,zeph,w1,w2,dir,
   7  		bp,bc,bcl,tcl,lurk:integer ;
   8  	tc,aw,e,f,seek,wavend,starter,
   9 		frog,concolour,aw2 :char;
  10 	hiall,hinow:array [10] of integer;
  11 	cc:array [8] of char ;
  12 	hiallc,hinowc:array [70] of char ;
  13 	name:array [7] of char ;
  14 procedure conv (x,y);
  15 	begin
  16 	x:=(x - 16)/8;xx:=x;
  17 	y:=(y - 53)/8;yy:=y;
  18 	a:=(y * 40 + x + 1024);
  19 	end ;
  20 procedure print(t);
  21 	begin
  22 	if t < 100000 then write ("0");
  23 	if t <  10000 then write ("0");
  24 	if t <   1000 then write ("0");
  25 	if t <    100 then write ("0");
  26 	if t <     10 then write ("0");
  27 	write (t);
  28 	end ;
  29 procedure spritefly;
  30 	begin
  31	movesprite (1,spritex (1),spritey (1),0,-256,320,
  32 	2,spritex (2),spritey (2),256,-256, 320,
  33 	3,spritex (3),spritey (3),256,0,320,
  34 	4,spritex (4),spritey (4),256,256,320,
  35 	5,spritex (5),spritey (5),0,256,320,
  36 	6,spritex (6),spritey (6),-256,256,320,
  37 	7,spritex (7),spritey (7),-256,0,320,
  38 	8,spritex (8),spritey (8),-256,-256,320);
  39 	for t:=1 to 8 do
  40 		startsprite (t);
  41 	end ;
  42 procedure scrollit;
  43 	begin
  44 	if point <> 0 then thingfreq:=thingfreq / 2;
  45 	if random mod 100 < thingfreq then begin
  46   	 	memc [646]:=tcl;
  47 		if aw = 9 then
  48   			write ("Z..")
  49   		else write (chr (tc));
  50 		end ;
  51 	if point <> 0 then thingfreq:=thingfreq * 2;
  52 	end ;
  53 procedure scrollset;
  54 	begin
  55 	memc [$dc05]:=255;
  56 	t:=memc [$2b1];
  57	 memc [$2b1]:=247;
  58 	mem [$2f7]:=$1db100;
  59 	memc [252]:=0;
  60 	memc [$2b1]:=t;
  61 	memc [$dc05]:=40;
  62 	end ;
  63 procedure scrollclear;
  64	 begin
  65 	memc [$dc05]:=255;
  66 	t:=memc [$2b1];
  67 	memc [$2b1]:=247;
  68 	mem [$2f7]:=$ea3100;
  69 	memc [$2f9]:=$ea;
  70 	memc [$2b1]:=t;
  71 	memc [$dc05]:=40;
  72 	end ;
  73 procedure scoreprint;
  74 	begin
  75 	if aw=6 then memc [646]:=cc [random mod 7+ 1];
  76 	write ("s]]q");print(sc);
  77 	cursor (2,33);
  78 	print(bb);
  79 	end ;
  80 procedure spritecolour(t);
  81 	var c:char ;
  82 	begin
  83 	for c:=1 to 8 do
  84 	sprite (c,1,t);
  85 	end ;
  86 procedure kyset;
  87 	begin
  88 	for t:=1 to 5 do
  89 		begin
  90 		positionsprite (t+ 3,random mod 250+ 40,t*30);
  91 		sprite (t+ 3,3,1,4,1,7,5,1,5,6,1,14,7,1,15,8,1,4);
  92 		animatesprite (t+ 3,8,215,216,217,218,219,220,221,222);
  93 		end ;
  94 	end ;
  95 procedure zephyrdie;
  96 	begin
  97 	sc:=sc+ 1000;
  98 	zeph:=0;
  99 	lurk:= 5- kn;
 100 	sprite (8,1,8,8,4,1,8,5,1);
 101 	animatesprite (8,4,211,212,213);
 102 	movesprite (8,spritex (8)- 12,
 103  	spritey (8)- 10,0,0,60);
 104 	voice (1,11,0,1,12,0,1,13,0,1,14,1
 105      ,1,1,50000,1,4,3,1,5,10,
 106       1,6,0,1,7,0,1,8,0,1,8,1);
 107 	sprite (8,4,0,8,5,0);
 108 	for t:=1 to lurk do begin
 109 		x:=9- t;
 110 		positionsprite (x,spritex (8)+
 111  		random mod 50 - 11 ,
 112 		spritey (8)+
 113  		random mod 50 - 20);
 114 		sprite (x,1,4,x,3,1);
 115 		animatesprite (x,5,203,194,204,
 116                242,241);
 117 		spritefreeze (5);
 118 		end ;
 119 	sprite (8,7,0);
 120 	end ;
 121 procedure explode;
 122 	var ax,ay,radius,effect :integer ;
 123 	begin
 124 	memc [$dc05]:=20;
 125 	radius:=0;
 126 	if frog = 0 then voice (1,1,18000,1,4,5,1,5,12,1,6,0,1,7,0
 127       ,1,13,0,1,11,0,1,12,0
 128          ,1,14,1,1,8,0,1,8,1);
 129 	for t:= 1 to 8 do
 130 		sprite (t,1,1,t,4,0,t,5,0,t,3,0,
 131         t,2,224,t,7,0);
 132 	for t:= 2 to 8 do
 133 		positionsprite (t,spritex (1),spritey (1));
 134 		spritefly;
 135 	repeat
 136 		radius:=radius+ 1;
 137 		scoreprint;
 138 		for t:= 1 to 8 do
 139 		if (spritex (t) > 500) or (spritex (t)
 140     		   < 20) or (spritey (t) > 250) or
 141      		(spritey (t) < 50) then
 142      		sprite (t,7,0);
 143 		if radius =1 then spritecolour(7);
 144 		if radius =2 then spritecolour(8);
 145 		if radius =4 then spritecolour(10);
 146 	until radius = 5;
 147 	if frog=0 then begin
 148 		for t:=1 to 8 do
 149 		sprite (t,7,0);
 150 		kyset;
 151 		for t:=1 to lurk do begin
 152 			x:=9- t;
 153 			sprite (x,1,4);
 154 			positionsprite (x,random mod 280
 155       		+ 54,random mod 80 + 60);
 156 			animatesprite (x,5,242,203,194
 157               ,241,204);
 158    		end ;
 159 		end ;
 160 		memc [$dc05]:=40;
 161 	end ;
 162 procedure wallprint;
 163 	begin
 164 	memc [$dc05]:=255;
 165 	t:=memc [$2b1];memc [$2b1]:=247;
 166    write ("sqqY    Z...........Z............");
 167 	memc [$2b1]:=t;
 168 	memc [$dc05]:=40;
 169 	end ;
 170 procedure bonus;
 171 	var ee,ff:integer ;
 172 	begin
 173 	ee:=random mod 150;
 174 	ff:=random mod 150;
 175 	if random mod 2 then ee:=-ee;
 176 	if random mod 2 then ff:=-ff;
 177 	sprite (2,2,bc+ 140,2,1,bcl,2,3,0);
 178 	if bc =  107 then animatesprite (2,3,247,254,255);
 179 	movesprite (2,random mod 250 + 80,
 180 	 random mod 130 + 40,
 181	 ee,ff,
 182 	 3000);
 183 	end ;
 184 procedure joypause;
 185 	begin
 186 	repeat
 187 		memc [646]:=cc[random mod 7+ 1];
 188 		writeln ("sqqq]]]]]]]]]]hit fire to continueQ");
 189 		if frog=1 then explode;
 190 	until joystick (1)and 16;
 191 	writeln ("]]]]]]]]]]     Q");
 192 	end ;
 193 procedure shipstart; (* *)
 194    begin
 195    stopsprite (1);
 196    positionsprite (1,164,215);
 197    point:=0;
 198    sprite (1,2,192,3,2,199 );
 199    sprite (3,4,0,3,5,1,1,1,3
 200     ,1,4,0,1,5,0);
 201 	plx:=0;ply:=-50;
 202    end ;
 203 procedure memread;
 204 	begin
 205 	if aw > 12 then begin
 206    	aw2:=aw;
 207    	aw:=12;
 208    	end ;
 209 	aw:=aw- 1;
 210 	tc:=(memc [10000+ aw]) + 32;
 211 	tcl:=memc [10016+ aw];
 212 	kn:=memc [10032+ aw];
 213 	thingfreq:=(memc [10064+ aw]) ;
 214 	ew:=memc [10048+ aw] / 2;
 215 	w1:=memc [10096+ aw] / 2;
 216 	w2:=memc [10112+ aw] / 2;
 217 	bp:=memc [10128+ aw];
 218 	bc:=memc [10144+ aw];
 219 	bcl:=memc [10160+ aw];
 220 	aw:=aw+ 1;
 221 	za1:=memc [10176+ aw] / 2;
 222 	if aw = 2 then za1:= 65;
 223 	za2:=memc [10192+ aw] / 2;
 224 	if thingfreq >60 then thingfreq:=
 225      thingfreq - 60;
 226 	if aw2 >12 then begin
 227    	aw:=aw2;
 228    	thingfreq:=random mod 60;
 229 		za1:=random mod 75;
 230 		za2:=random mod 120;
 231 		w1:= random mod 60;
 232 		w2:= random mod 127;
 233    	kn:=random mod 3 + 1;
 234    	end ;
 235 	if aw = 6 then w1:=255;
 236 	if aw = 6 then thingfreq:=0;
 237 	end ;
 238 procedure menprint;
 239 	begin
 240 	write ("s]]]]]      ......");
 241 	if bombs > 0 then
 242 	for t:=1 to bombs do
 243 	if t < 7 then write ("XB");
 244 	cursor (1,35);
 245 	if me  > 1 then
 246 	for t:=1 to me - 1 do
 247 	if t < 7 then write (".C..");
 248 	memc [646]:=concolour;
 249	writeln ("s]]]]]]]]]]].G.HBI.HDSETFU.HFU");
 250 	writeln ( "]]]]]]]]]]]VHVIXJVKZI.M.NVI.N");
 251 	end ;
 252 procedure exlife;
 253 	begin ;
 254 	exman:=exman+ 10000;
 255	 bombs:=bombs+ 1;
 256	 me:=me+ 1;
 257	 menprint;
 258 	end ;
 259 procedure setup;
 260 	begin ;
 261 	sound (1,0);bb:=0;aw2:=0;
 262 	voice (1,15,1,1,15,0);
 263	 cc[1]:=4;cc[2]:=5;cc[3]:=8;cc[4]:=10;
 264 	cc[5]:=3;cc[6]:=14;cc[7]:=7;
 265 	aw:=1;memread;pp:=0;ks:=0;
 266 	me:=5;kf:=0;seek:=0;frog:=0;
 267 	exman:=10000;bombs:=4;
 268 	voice (3,14,1,3,1,3000) ;
 269 	sprite (1,1,3,1,2,192,1,7,1)  ;
 270 	sc:=0;lurk:=0;zeph:=0;
 271 	sprite (3,5,1);
 272 	kyset;wavend:=0;
 273 	spritefreeze (5);
 274 	sprite (2,1,1,2,2,199);e:=0;
 275 	wall:=1000;
 276	 thingfreq:=10;watch:=0;
 277 	sprite (3,2,199,3,1,8);
 278 	graphics (16,10,17,8);
 279 	sprite (4,1,7,5,1,5,6,1,14,7,1,15,8,1,4);
 280 	sound (4,15) ;
 281 	sprite (2,1,1,2,2,199);e:=0;
 282 	sprite (1,7,1);
 283 	for t:=1 to 8 do begin
 284 		sprite (t,4,0,t,5,0,t,7,0  );
 285 		end ;
 286 	memc [$dc05]:=40;
 287 	shipstart;
 288 	positionsprite (1,spritex (1),spritey (1));
 289 	t:=freezestatus ;
 290 	t:=groundcollide ;
 291 	write ("S");
 292 	end ;
 293 procedure comp;
 294 	begin
 295 	memc [646]:=cc[random mod 7+ 1];
 296 	cursor (8,16);
 297 	write ("completed");
 298 	cursor (11,13);
 299 	write ("attack  wave ");
 300 	if aw  < 10 then write ("0");
 301 	write (aw);
 302 	scoreprint;
 303	 cursor (15,13);
 304 	write (".bonus =  ");print(ks*100);
 305	 writeln ("qqqq]]]");
 306 	end ;
 307 procedure wavestop;
 308 	begin
 309 	scrollclear;
 310 	sprite (1,7,0);shipstart;kyset;
 311 	lurk:=0;wavend:=0;
 312 	for t:=1 to 8 do
 313 	sprite (t,7,0);
 314 	write ("S");menprint;
 315 	for t:=1 to ks do begin
 316 		if t < 36 then begin cursor (20,2+t);
 317 			if t mod 2 then write ("YA")
 318   			else write ("YqA");
 319 			end ;
 320 		sc:=sc+ 100;
 321 		comp ;
 322 		if t < 36 then sound (3,8);
 323 		end ;
 324 	for t:=1 to 50 do
 325 	comp;
 326 	memread;
 327 	aw:=aw+ 1;pp:=0;tp:=tp+ 1;
 328 	watch:=0;
 329 	graphics (16,10,17,8);
 330 	memread;
 331 	seek:=0;kf:=0;ks:=0;
 332 	wall:=1000;
 333 	if aw = 2 then wall:=55;
 334 	if aw = 4 then wall:=61;
 335 	if aw = 7 then wall:=28;
 336 	if aw > 12 then wall:=random mod 100 + 10;
 337 	write ("S");
 338 	if ((aw- 1) mod 3)=0 then begin
 339 	scoreprint;menprint;
 340 	for t:=1 to 100 do begin
 341 		cursor (4,15);
 342		 memc [646]:=cc[random mod 7+ 1];
 343 		writeln ("coffee breakQ");
 344 		cursor (6,5);
 345 		writeln ("e conqueror edition 00  originalq");
 346 		writeln (" ] .created & written by simon beer  ^_   q");
 347 		writeln ("  Y1983,84,85,86 - www.codewiz.au");
 348 		end ;
 349 	frog:=1;
 350 	joypause;
 351 	frog:=0;kyset;
 352 	for t:=1 to 8 do
 353 		sprite (t,7,0);
 354 		t:=spritecollide ;
 355 		t:=groundcollide ;
 356 		spritefreeze (5);
 357 		shipstart;write ("S");
 358 		spritefreeze (5);
 359 		end ;
 360 	if aw <> 6 then scrollset;
 361 	menprint;sprite (1,7,1);
 362 	end ;
 363 procedure wavecheck;
 364 	begin
 365  	if wavend = 1 then
 366  	if (kn=0)and (watch=0)and (zeph=0)
 367  	and (lurk=0)then wavestop;
 368 	end ;
 369 procedure smartbomb;
 370 	begin
 371 	if bombs > 0 then begin
 372 		wait (251);
 373 		memc [53280]:=8;memc [53281]:=8;
 374 		write (chr (147));
 375 		wait (251);
 376 		memc [53280]:=0;memc [53281]:=0;
 377 		menprint;scoreprint;
 378 		for t:=2 to 8 do begin
 379 			sprite (t,7,0);
 380 			stopsprite (t);
 381 			end ;
 382 		graphics (16,10,17,8);
 383 		sc:=sc+ 800*seek ;
 384 		sc:=sc+ 500*watch;
 385 		sc:=sc+ 250*lurk;
 386 		seek:=0;watch:=0;lurk:=0;
 387 		if zeph = 1 then zephyrdie;
 388 		t:=groundcollide ;
 389 		spritefreeze (5);
 390 		for t:= 1 to kn do begin
 391 			kf:=kf- 3;
 392 			positionsprite (t+ 3,random mod 280 + 54,50);
 393 			end ;
 394 		voice (1,1,20000,1,13,0,1,12,0,1,11,0,1,14,1,1,4,4,1,5,10,1,6,0,1,7,0
 395 		  	  ,1,8,0,1,8,1);
 396 		bombs:=bombs- 1;
 397 		wavecheck;
 398 		menprint;
 399 		end ;
 400 	end ;
 401 (*ser.no.rev.xxxshtc00*)
 402 procedure fire;
 403 	var a,b:integer ;
 404 	begin
 405 	voice (1,1,25500,1,4,2,1,5,10,
 406        1,13,0,1,11,0,1,12,0,
 407        1,6,0,1,7,0,1,14,1,1,8,0,1,8,1);
 408 	a:=0;b:=0;
 409 	if point =0 then b:=-2048;
 410 	if point >0 then a:=2248;
 411 	if point <0 then a:=-2248;
 412 	if (point =-1)or (point =1)then
 413       b:=-2048;
 414 	positionsprite (3,spritex (1) + plx,spritey (1)  + ply);
 415 	movesprite (3,spritex (3),spritey (3),a,b,19+ abs (point*6));
 416 	end ;
 417 procedure beamclear;
 418 	var kk,count:integer ;
 419 	begin ;
 420 		sprite (3,7,0);
 421 		if freezestatus and 2 then begin
 422 			if seek = 1 then sc:=sc+ 800;
 423	 			seek:=0;
 424 			sprite (2,2,214);
 425 			startsprite (2);
 426 			kf:=kf- (7*kn);
 427 			voice (1,14,0,1,11,0,1,13,0,
 428   	  		   	1,1,500,1,12,1,1,4,5,1,5,9
 429              	,1,6,0,1,7,0,1,8,0,1,8,1);
 430 			sound (3,20);
 431 			sprite (2,7,0);
 432 			end ;
 433 		count:=8;
 434 		for t:=1 to kn do
 435 			begin
 436 			kk:=t+ 3;
 437 			if freezestatus and count then begin
 438 			stopsprite (kk);
 439 			if wavend=1 then begin
 440 			kn:=kn - 1;
 441 			sprite (kn + 1,7,0);
 442 			end ;
 443 		ks:=ks+ 1;
 444 		kf:=kf- 5;
 445 		sprite (kk,2,213);
 446 		voice (2,14,0,2,11,0,2,12,0,
 447       	2,13,1,2,2,2000,2,1,6000,2,4,4,2,5,10,
 448       	2,6,15,2,7,10,2,8,1,2,8,0);
 449 		positionsprite (kk,random mod 250 + 40 ,spritey (t));
 450 		sprite (kk,7,0);
 451 		end ;
 452 	count:=count * 2;
 453 	animatesprite (kk,8,215,216,217,
 454       	218,219,220,221,222);
 455 	end ;
 456 	if (freezestatus and 128 /128 ) and (watch = 1 ) then begin
 457 	sprite (8,2,224,8,1,10);
 458 	voice (1,11,0,1,13,0,1,14,0,1,12,1,
 459       1,1,8000,1,4,3,1,5,11,1,6,0,
 460       1,7,0,1,8,0,1,8,1);
 461 	sc:=sc+ 500;
 462 	graphics (16,10,17,8);
 463 	seek:=0;
 464 	watch:=0;
 465 	sprite (8,7,0,7,7,0);
 466 	end ;
 467 	if (freezestatus and 128/128) and
 468        (zeph=1) then zephyrdie;
 469 	count:=128;
 470 	for t:= 1 to lurk do begin
 471 		if freezestatus and count then
 472  		begin
 473  		sprite (9- t,2,243,9- t,1,8);
 474  		sc:=sc+ 250;
 475  		voice (1,1,12000,1,2,2000,
 476   			 1,4,4,1,5,3,1,6,2,1,7,2,1,14,0
 477    		,1,12,0,1,11,0,1,13,1
 478    		,1,8,1,1,8,0);
 479  			sprite (9- t,7,0);
 480 			sprite (9- t,1,4);
 481		animatesprite (9- t,5,204,194,203
 482                ,242,241);
 483 		positionsprite (9- t,spritex (9-
 484      	lurk),spritey (9- lurk));
 485 		sprite (9- lurk,7,0);
 486 		lurk:=lurk- 1;
 487 			end ;
 488  		count:=count/2;
 489  	end ;
 490  	wavecheck;
 491 	spritefreeze (5);
 492 	end ;
 493 procedure demo;
 494 	var kkk:char ;
 495 	spx,spy :array [8]of integer ;
 496 	clr:array [8]of char ;
 497 	begin
 498 	kkk:=1;
 499 	for t:=1 to 4 do spx [t]:=68;
 500 	for t:=5 to 8 do spx [t]:=276;
 501 	spy [1]:=179;spy [8]:=179;
 502 	spy [2]:=158;spy [7]:=158;
 503 	spy [3]:=134;spy [6]:=134;
 504 	spy [4]:=109;spy [5]:=109;
 505 	clr [1]:= 3;clr [2]:= 7;
 506 	clr [3]:=10;clr [4]:= 8;
 507 	clr [5]:= 4;clr [6]:=14;
 508 	clr [7]:=12;clr [8]:= 8;
 509 	menprint;scoreprint;
 510 	cursor (4,10);graphics (16,10,17,8);
 511 	write (".conquer the creatures");
 512 	cursor (7,12);sound (3,40);
 513 	write ("meet your enemies");
 514 	graphics (16,5);
 515 	for t:=4 to 8 do sprite (t,4,0,4,5,0,t,3,1);
 516 	sprite (4,1,7,5,1,14,6,3,0,6,1,7,7,1,4,8,1,3);
 517 	animatesprite (4,8,215,216,217,218,219,220,221,222);
 518 	animatesprite (5,6,195,196);
 519 	animatesprite (6,8,193,205,206,207);
 520 	animatesprite (8,4,197,200,201,202);
 521 	animatesprite (7,11,203,194,204,242,241);
 522 	positionsprite (4,110,109,5,110,
 523 		134,6,110,158,7,110,179,8,110,207);
 524 	for t:=4 to 8 do
 525 		movesprite (t,spritex (t),spritey (t),0,0,10000);
 526 	cursor (9,16);
 527 	writeln ("Xkylin A    100");
 528 	cursor (12,16);
 529 	write ("Xseeker   Z 800");
 530 	cursor (15,16);
 531 	write ("Xzephyr   . 1000");
 532 	cursor (18,16);
 533 	write ("Xlurker  V  250");
 534 	cursor (21,16);
 535 	write ("Xwatcher Y  500");
 536 	cursor (24,4);
 537 	write ("ZO YP AQ .U .V VX AY eZ.. Z. ^.  .-  the things");
 538 	cursor (2,2);
 539 	t:=0;
 540 	repeat t:=t + 1 ;
 541 		kkk:=kkk + 1;
 542 		if kkk = 9 then kkk:=1;
 543 		sprite (2,1,clr [kkk],
 544 		2,2,kkk+ 245);
 545 		positionsprite (2,spx[kkk],spy[kkk]);
 546 		sprite (2,7,1);
 547 		sound (3,50);
 548 		until (t = 50) or ((joystick (1) and 16) = 16);
 549 	end ;
 550 procedure conqueror;
 551 	var px,py:char ;
 552 	begin
 553 	write ("S");
 554 	if joystick (1) and 16 = 0 then demo;
 555 	write ("S");
 556 	for t:=1 to 8 do begin
 557 		sprite (t,1,7,t,2,t+ 226,t,3,0);
 558 		sprite (t,4,0,t,5,1);
 559 		movesprite (t,(t*24)+ 64,50,0,50,400);
 560 		end ;
 561 	for t:=1 to 8 do
 562 	startsprite (t);
 563 	cursor (17,1);
 564 	writeln ("A written by  simon beer - codewiz.au");
 565 	cursor (19,11);
 566 	writeln ("......copyright ^_ 1984 edition 00");
 567 	writeln ("q]]]]]]Yplease leave  disk in drive");
 568 	writeln (". q rediscovered on an old disk in 2010");
 569 	while (t <220) and (joystick (1)
 570          and 16 = 0) do begin
 571 		t:=t+ 1;
 572 		py:=cc[random mod 7 + 1];
 573 		wait (spritey (1)+ 40);
 574 		spritecolour (py);
 575  		end ;
 576 	end ;
 577 procedure hiprint;
 578 	begin
 579 	write ("S");
 580 	for t:=1 to 8
 581 	do begin
 582 		sprite (t,2,t+ 226,t,1,3,t,4,0,t,5,0,t,3,0);
 583 		positionsprite (t,t*24+ 8,50);
 584 		sprite (t,7,1);
 585		end ;
 586 	writeln ("qeqq]]]today's greatest]]]]]all-time starsq");
 587 	cursor (7,1);write ("Y");
 588 	for t:=1 to 10 do begin
 589 		if t<10 then write ("0");
 590 		write (t," ");
 591 		for x:=1 to 7 do
 592 		write (chr (hinowc[7*(t- 1)+ x]));
 593 		write (" - ");
 594 		print(hinow[t]);write (" >< ");
 595 		for x:=1 to 7 do
 596 		write (chr (hiallc[7*(t- 1)+ x]));
 597 		write (" - ");
 598 		print(hiall[t]);
 599 		if t<10 then writeln (" ");
 600 		end ;
 601 	t:=0;
 602 	repeat
 603 		memc [646]:=cc[random mod 7+ 1];
 604 		writeln ("sq]]]]]]]]]]]]]]]]]]]]]]]]]hall of fame");
 605 		t:=t+ 1;
 606 		until (t=900) or (joystick (1)
 607        	and 16 /16 );
 608 	for t:=1 to 8 do
 609 	sprite (t,7,0);
 610 	end ;
 611 procedure namenter;
 612 begin
 613 write ("S");
 614 memc [198]:=0;
 615 scoreprint;menprint;
 616 cursor (9,11);
 617 write ("Zyou have  qualified");
 618 cursor (11,9);
 619 write ("for the . conqueror hall");
 620 cursor (13,11);
 621 write ("of fame.Z enter your");
 622 cursor (15,18);
 623 write (" name.");
 624 cursor (18,18);
 625 write (".       .......q[[[[[[[]Q........");
 626 for t:=1 to 7 do begin
 627 name[t]:=0;
 628 while (name[t]<32) or (name[t]>90) do begin
 629 get (0);
 630 read (name[t]);
 631 end ;
 632 write (chr (name[t]));
 633 end ;
 634 end ;
 635 procedure gameover;
 636 var seta,flag:char ;
 637 begin
 638 flag:=0;
 639 if starter = 0 then conqueror
 640 else begin
 641 cursor (12,17);
 642 scrollclear;
 643 write ("egame over");
 644 sound (3,100);
 645 end ;
 646 if joystick (1) and 16 = 0 then begin
 647 for t:= 1 to 8 do
 648 sprite (t,7,0) ;
 649 write ("S");
 650 if sc>hiall[10] then begin
 651 flag:=1;
 652 for t:=10 downto 1 do
 653 if sc>hiall[t] then seta:=t;
 654 for t:=10 downto seta+ 1 do begin
 655 hiall[t]:=hiall[t- 1];
 656 for x:=1 to 7 do
 657 hiallc[7*(t- 1)+ x]:=
 658         hiallc[7*(t- 2)+ x];
 659  end ;
 660 namenter;
 661 hiall[seta]:=sc;
 662 for x:=1 to 7 do
 663 hiallc[7*(seta- 1)+ x]:=name[x];
 664 open (1,8,3,"@0:hiscores,s,w");
 665 put (1);
 666 for t:=1 to 10 do
 667 writeln (hiall[t]);
 668 for t:=1 to 70 do beginl
 669 write (chr (hiallc[t]));
 670 put (1);
 671 end ;
 672 put (0);
 673 close (1);
 674 end ;
 675 if sc>hinow[10] then begin
 676 for t:=10 downto 1 do
 677 if sc>hinow[t] then seta:=t;
 678 for t:=10 downto seta+ 1 do begin
 679 hinow[t]:=hinow[t- 1];
 680 for x:=1 to 7 do
 681 hinowc[7*(t- 1)+ x]:=
 682         hinowc[7*(t- 2)+ x];
 683  end ;
 684 if flag =0 then namenter ;
 685 hinow[seta]:=sc;
 686 for x:=1 to 7 do
 687 hinowc[7*(seta- 1)+ x]:=name[x];
 688 end ;
 689 repeat
 690 hiprint;
 691 conqueror;
 692 until joystick (1) and 16;
 693 end ;
 694 for t:=1 to 8 do sprite (t,7,0);
 695 scrollset;
 696 setup;
 697 memc [253]:=5;
 698 end ;
 699 procedure death;
 700 begin ;
 701 me:=me- 1;
 702 explode;
 703 for t:=1 to 8 do
 704 sprite (t,7,0);
 705 if me=0then gameover;
 706 write ("S");
 707 shipstart;
 708 t:=groundcollide ;
 709 t:=spritecollide ;
 710 spritefreeze (5);
 711 sprite (1,7,1);
 712   for x:=1 to 7 do
 713   begin
 714   concolour:=cc[x];
 715 voice (2,4,2,2,5,2,2,6,14,2,14,0,2,12,0,2,13,0,2,11,1,2,1,5000*x,2,8,1);
 716   menprint;
 717   end ;
 718 voice (2,8,0);
 719 end ;
 720 procedure crashcheck;
 721 begin
 722 if groundcollide  and 1 then death;
 723 if freezestatus and 1 then begin
 724 if ((freezestatus and 2 ) /2 ) and (seek = 0 )then begin
 725 sc:=sc+ bp*100;
 726 voice (2,14,0,2,11,0,2,12,0,2,13,1,2,2,2048,2,4,5,2,5,9,2,6,15,2,7,9,
 727 2,1,20000,2,8,0,2,8,1,2,8,0);
 728 sprite (2,2,78 + bc,2,3,0);
 729 movesprite (2,spritex (2),spritey (2),0,256,(255 - spritey (2)));
 730 end else death;
 731 spritefreeze (5);
 732 end ;
 733 end ;
 734 procedure moveship;
 735 begin
 736 crashcheck;
 737 if freezestatus and 4 then beamclear;
 738 memc [251]:=point;
 739 if joystick (1) and 16 then fire;
 740 if joystick (1) and 1 then smartbomb;
 741 if point = 0 then begin
 742 cursor (3,random mod 30 + 5);
 743 scrollit;
 744 movesprite (1,spritex (1),215,((joystick (1) and 8 / 8 ) +
 745  (joystick (1) and 4 / -4 )) * 600,
 746  0,7);
 747 if spritex (1)<38 then begin
 748 point:=1;
 749 sprite (3,2,238,3,4,1,3,5,1);
 750 plx:=25;ply:=-37;
 751 end ;
 752 if spritex (1)>302then begin
 753 point:=-1;
 754 sprite (3,2,239,3,4,1,3,5,1);
 755 plx:=-50;ply:=-41;
 756 end ;
 757 end ;
 758 if point = 2 then begin
 759 cursor (random mod 19 + 3,38);
 760 scrollit;
 761   movesprite (1,38,spritey (1),0,
 762  ((joystick (1) and 8 / 8 ) +
 763  (joystick (1) and 4 / -4 ))* 512
 764   ,7);
 765 if spritey (1)<75 then begin
 766 stopsprite (1);
 767 positionsprite (1,spritex (1),74);
 768 end ;
 769 if spritey (1)>213 then begin
 770 stopsprite (1);
 771 point:=1;
 772 sprite (3,2,238);
 773 plx:=25;ply:=-37;
 774 sprite (3,4,1,3,5,1);
 775 end ;
 776 end ;
 777 if point =-2 then begin
 778 cursor (random mod 19 + 3 ,3);
 779 scrollit;
 780   movesprite (1,302,spritey (1),0,
 781   ((joystick (1) and 8 / -8) +
 782    (joystick (1) and 4 / 4 ))* 512
 783    ,7 );
 784 if spritey (1)<75 then begin
 785 stopsprite (1);
 786 positionsprite (1,spritex (1),74);
 787 end ;
 788 if spritey (1)>213 then begin
 789 stopsprite (1);
 790 point:=-1;
 791 sprite (3,2,239);
 792 plx:=-50;ply:=-41;
 793 sprite (3,4,1,3,5,1);
 794 end ;
 795 end ;
 796 if point = 1 then begin
 797 if random mod 2 then
 798 cursor (random mod 19 + 3 , 38)
 799 else
 800 cursor (3,random mod 30 + 5 );
 801 scrollit;
 802 sprite (1,2, 235);
 803 stopsprite (1);
 804 if joystick (1)and 4 then begin
 805 sprite (1,2,209);
 806 movesprite (1,38,215,0,-450,7);
 807 point:=2;
 808 sprite (3,2,237,3,4,1,3,5,0);
 809 plx:=25;ply:=0;
 810 end ;
 811 if joystick (1) and 8 then begin
 812 sprite (1,2,192);
 813 movesprite (1,38,215,356,0,7);
 814 point:=0;
 815 sprite (3,2,199,3,4,0,3,5,1);
 816 plx:=0;ply:=-44;
 817 end ;
 818 end ;
 819 if point = -1 then begin
 820 if random mod 2 then
 821 cursor (random mod 19 + 3 , 3)
 822 else
 823 cursor (3,random mod 30 + 5 );
 824 scrollit;
 825 sprite (1,2,236);
 826 stopsprite (1);
 827 if joystick (1) and 8 then begin
 828 sprite (1,2,208);
 829 movesprite (1,302,215,0,-450,7);
 830 point:=-2;
 831 sprite (3,2,237,3,4,1,3,5,0);
 832 plx:=-49;ply:=0;
 833 end ;
 834 if joystick (1) and 4 then begin
 835 sprite (1,2,192);
 836 movesprite (1,302,215,-356,0,7);
 837 point:=0;
 838 sprite (3,2,199,3,4,0,3,5,1);
 839 plx:=0; ply:=-44;
 840 end ;
 841 end ;
 842 end ;
 843 procedure kylin;
 844 var ff:char ;
 845 begin
 846 for ff:= 1 to kn do
 847 begin
 848 kk:=ff+ 3;
 849 if spritestatus (kk)=0 then
 850 positionsprite (ff+ 3,spritex (ff+3),50);
 851 if spritex (1) 6 ) and (kn < 3) and
 857    (lurk = 0 ) then begin
 858 he:=kn + 4;
 859 if spritestatus (he) = 0 then begin
 860 sprite (he,1,1,he,2,226,he,3,0);
 861 m:=250 + random mod 372 ;
 862 if random mod 2 then m:= -m;
 863 movesprite (he,spritex (kk),
 864    spritey (kk),m,1024,
 865    (250 - spritey (kk))/4);
 866 end;
 867 end;
 868 end;
 869 end;
 870 procedure seeker;
 871 var n,m,o :integer;
 872 begin
 873 animatesprite (2,2,196,195);
 874 if seek=0then begin seek:=1;
 875 sprite (2,1,14,2,7,1,2,3,1);
 876 positionsprite (2,random mod 512,40);
 877 end;
 878 if spritestatus (2)=0then begin
 879 if spritex (2) < 200 then m:=-550
 880 else m:=550;
 881 if spritex (2) < 200 then n:=(300- spritex (2))
 882 else n:=(spritex (2)- 30);
 883 if spritey (1) < spritey (2) then o:=-110
 884    else o:=110;
 885 movesprite (2,spritex (2),spritey (2),m,o,n);
 886 end;
 887 end;
 888 procedure watcher;
 889 var m:integer ;
 890 begin
 891 if spritestatus (8) = 0 then begin
 892 sprite (8,1,3,8,3,1);
 893 graphics (17,14,16,5);
 894 animatesprite (8,7,197,200,201,202);
 895 movesprite (8,random mod 290 +
 896 24,80,random mod 3- 1,2,32768);
 897 end;
 898 sc:=sc- 1;
 899 seeker;
 900 if spritey (8) < 200 then begin
 901 if spritestatus (7)=0 then begin
 902 if spritex (1)220 then sprite (7,7,0);
 908 end ;
 909 end ;
 910 procedure zephyr;
 911 var m,zx:integer ;
 912 begin
 913 if watch=1 then watch:=0;
 914 if spritestatus (8)=0 then
 915  begin
 916   if point=0 then zx:=spritex (1)
 917   else zx:= random mod
 918    200 + 50 ;
 919 animatesprite (8,8,207,206,205,193);
 920 sprite (8,1,7,8,3,0);
 921   m:=50;
 922   if random mod 2 then m:=-50;
 923   movesprite (8,zx,249,m,-300,400);
 924   end ;
 925 if spritey (8) < 50 then begin
 926   stopsprite (8);
 927   sprite (8,7,0);
 928   end ;
 929   end ;
 930 (* *) procedure lurker;
 931 var m,n:integer ;
 932 begin
 933  for t:=1 to lurk do begin
 934   x:=9- t;
 935   if spritestatus (x)=0 then
 936   begin
 937   m:=(random mod 3 - 1)* random
 938      mod 100;
 939   n:=(random mod 3 - 1)*50 + 100;
 940   movesprite (x,spritex (x),
 941      spritey (x),m,n,100);
 942   end ;
 943  end ;
 944  if (lurk < 3)and (spritestatus (6)
 945  =0)and (kn < 5 - lurk) then begin
 946   sprite (6,1,1,6,2,225,6,3,0);
 947   if lurk=2then x:=random mod 2+ 7
 948       else x:=8;
 949   if spritex (1) < spritex (x) then
 950    m:=-random mod 800
 951                    else
 952    m:= random mod 800 ;
 953   movesprite (6,spritex (x),
 954      spritey (x),m,768,(250 -
 955      spritey (x))/ 3);
 956   end ;
 957   end ;
 958  begin
 959 memc [$54]:=$e2; memc [$55]:=$fc;
 960 open (15,8,15," ");
 961 put (15);
 962 write ("i");
 963 put (0);
 964 close (15);
 965 open (3,8,3,"0:hiscores,s,r");
 966 get (3);
 967 for t:=1 to 10 do begin
 968 hinow [t]:=0;
 969 read   (hiall[t]);
 970 end ;
 971 for t:=1 to 70 do begin
 972 hinowc[t]:=45;
 973 read (hiallc[t]);
 974 get (3);
 975 end ;
 976 close (3);
 977 load (8,11264,0,"assembler") ;
 978 load (8,8192,0,"charset 2");
 979 load (8,9729 ,0,"beer (c) 'xxxx'");
 980 load (8,7168,0,"made  by  simon");
 981 graphics (8,4);
 982 write ("S");graphics (11,0,12,0);
 983 setup;
 984 starter:=0;
 985 gameover;
 986 starter:=1;
 987 setup;
 988 write ("S");
 989 concolour := 7; menprint; sprite (1,7,1);
 990 repeat
 991 pp := pp+ 1; sc:=sc + 1;bb := bb + 1;
 992 kf := kf + 1;
 993 moveship;
 994 kylin;
 995 scoreprint;
 996 if pp=ew  then wavend:=1;
 997 moveship;
 998 if (bb mod 40 = 0) and (seek = 0) then bonus;
 999 moveship;
1000 if pp = wall     then wallprint;
1001 if kf > 10 then seeker ;
1002 moveship;
1003 if ( pp = w1 ) or ( pp = w2 ) then watch:=1;
1004 if (pp=za1)or (pp=za2)then begin
1005 zeph := 1;
1006 stopsprite (8);
1007 end ;
1008 moveship;
1009 if (watch = 1)and (lurk=0)then watcher;
1010 moveship;
1011 if zeph =1 then zephyr;
1012 moveship;
1013 if lurk > 0 then lurker;
1014 if sc >= exman then exlife;
1015 until 0;
1016 end.

I wrote most of Conqueror in a version of the language Pascal called "G-Pascal" a very long time ago, beginning at age 12 or 13, and finishing not long after I turned 14.

I also wrote an earlier (and much less fully-developed) version of Conqueror in BASIC on a VIC-20. I had the VIC before the Commodore 64. Unfortunately, I no longer have the code of this version, which would have been stored on cassette, and not floppy disk.

I'll write more about G-Pascal on this website later on, and also about the nerd/coding side of game Conqueror itself, including the Pascal and 6502 Machine Language source code, and how it works internally, and how the graphics were made.

Conqueror uses a short machine language program I wrote to scroll the screen, since Pascal was too slow for this. It's really "machine language", and not even assembly language – since I didn't have an assembler and had to convert all the 6502 opcodes to their actual numerical codes, (and then from hexadecimal to decimal), and enter them in to memory that way, and then save them to a separate disk file.

Here are some short instructions: Your spaceship can move up the sides of the screen also, and sit in the corners in a diagonal. Imagine the path your spaceship can move as like a very square-cornered letter "U" shape, where the "U" makes up three sides of the screen (everything except the top) and it will make more sense. Most of the time it's best to stay on the bottom of the screen.

Basically, everything that moves will kill you if it crashes into you or shoots you – except for the "bonuses" which appear occasionally, and float around very slowly. Crash into these to get lots of points. The longer your ship stays in contact with them, the more points you get. In the higher levels the bonuses are worth a lot more points, and you can get a crazy high score this way with some practice. I think you get an extra life every 10000 points (like the game Defender which was my favourite "real arcade" video game of that era).

When I get around to it, I'll add some more detailed instructions about how to play Conqueror on this website also.

You can play Conqueror here in your web browser.

HOW TO PLAY IT: If the joystick option is turned "on" (I think it will turn on automatically), you can play Conqueror with the arrow keys, and the space bar is the fire button. On a phone or a tablet, without a keyboard, it's still sort-of playable using the buttons which appear on the screen and/or the ones below the emulator window.

Once the program is running in the emulator, press "fire" or "space" to start the game. You might have to press it a few times. Make sure the sound is turned on if you want to hear the early-80s-quality sound effects.

Cover image by Shutterstock

Byte.Yoga Homepage - Australian Cyber Security Web Magazine

Share This Page

If you liked this page, please share it with others! You can use the links to share on Facebook, Twitter, LinkedIn, Pinterest, and Email. Ther is also an RSS feed to get updates for the website.