Jump to content
IGNORED

Raiders of the Lost Ark


Keith Weisshar

Recommended Posts

I have one that just breaks down the scoring routine (at $DDDB). The variables involved are all described...but changing them isn't advisable (since many of the "point" values are ones that are already existing in a register at those times in the game before being passed to a score variable).

Edited by Nukey Shay
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...
Why is the reset switch disabled when the Ark is visible and only enabled when the Ark disappears? It's also disabled at the final scoring screen once the Ark is sucessfully found?

 

Because the line that checks the switch status is skipped completely when the ped. is in motion. This could be in place so that the same ram location responsible for displaying the screen is also used to keep track of ped. height. The ped reaches the bottom and falls negative - it's no longer in motion. I never looked into it closely, but it seems reasonable.

 

;the only place that reset is checked...
LD3FB:
   sta	WSYNC				  ;3
   bit	$9C					;3
   bpl	LD409				  ;2 branch if ped. is moving (positive)?
   ror	SWCHB				  ;6 move reset switch to carry
   bcs	LD409				  ;2 branch if reset not pressed
   jmp	Cold_Start			 ;3 do cold start

 

 

Why does the gun stop working if I buy more than 128 bullets from the black market? The only workaround for this problem is to reset the game and this will overwrite all the RAM variables since it goes through a cold start routine.

 

A single byte of ram can hold a value from 0 to 255. The ram address used to keep track of the number of bullets is $A0. Half of these values can be treated as "negative" values (128 to 255 - the high bit is set). The gun's bullets are counted as you shoot them...firing the last bullet places the counter in the "negative" range - to instruct the game that there are no more bullets available to shoot. If the number of bullets bought causes this negative range to be reached through addition, it has the same effect. Negative number = no more bullets to shoot. It's possible to hack the game so that negative values are not used to decide this (rather, check if the value is zero), but you would end up with the same result if the number of bullets bought causes the variable to reach zero. In practical use, it doesn't matter...because you should never need to buy bullets at all in the game (using them to shoot a thief causes you to lose points in the final tally anyway). Even without that fact being considered, 128 bullets would last quite a while...much more than you should ever need even if you are using the gun to shoot away playfield blocks near the treasure room.

 

NOTE: buying an additional 128 bullets should correct the problem also...moving from negative to positive through addition ;)

 

;in the cold start routine...
   lda	#$0D				   ;2
   sta	$81					;3
   lsr						   ;2 A = 6
   sta	$A0					;3 store initial number of bullets

 

;shooting the gun...
LD71E:
   lda	SWCHA				  ;4
   and	#$0F				   ;2
   cmp	#$0F				   ;2
   beq	LD777				  ;2 branch if not moving the stick
   cpx	#$0D				   ;2 is current object the gun?
   bne	LD747				  ;2  ...branch if not
   bit	$8F					;3
   bmi	LD777				  ;2
   ldy	$A0					;3 check bullets
   bmi	LD777				  ;2  branch if none (negative count)
   dec	$A0					;5 gun fired...subtract a bullet

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...