Jump to content
IGNORED

Raiders of the Lost Ark


Recommended Posts

  • 3 years later...
  • 4 weeks later...

That is correct. Although the practice of re-initializing the system has undesirable effects (such as a possible screen roll caused by throwing timing, etc. out the window), there are a LOT of games that do it simply because it's a quick'n'dirty (and often completely unnecessary) solution.

 

 

LD3FB:
       sta    WSYNC
       bit    $9C
       bpl    LD409 ; branch if game already initialized
       ror    SWCHB ; game reset -> carry
       bcs    LD409 ; branch if not pressed
       jmp    LDD68 ; cold start

 

The game will also cold start when pressing the right controller trigger after a game has been lost/won.

 

Stella has the ability to startup in the debugger from commandline at the very first executed instruction (rather than setting a breakpoint)...since the start vector address is the same in any 2600 game.

 

stella -break "* ($fffc)" mygame.bin

(substitute your program name for "mygame.bin"...and use correct spacing)

 

IIRC you can add that text to Stella.ini (without the "stella -" program specification) to have the launcher do it automatically.

Link to comment
Share on other sites

  • 1 month later...

If I win the game and find the ark the reset switch no longer works because RAM location $9C set to a positive number which is between $00 to $7F. When Indy reaches the bottom of the pedestal at the start of a new game RAM location $9C is set to $80 and the ark disappears. The game uses the negative bit of this RAM location to skip drawing the ark at the top of the screen. Finding the ark causes the game to detect as already initialized and not allow the reset to work.

Edited by Keith Weisshar
Link to comment
Share on other sites

  • 2 weeks later...

$9C is just a temp counter, really. The "score" screen uses the location to decide whether or not to draw the ark. HSW figured that as long as it was doing that, he could check that ram location when looking for a game reset (otherwise, doing so would place the program into an endless loop when the switch is held down). This is not necessary if the switch routine is moved to just below where VSYNC and TIM64T are set for a new display. Altering the cold start routine slightly makes it clear user ram only any other time than the initial powerup sequence. Here's how ya do it.

LD3FB:
sta WSYNC ;3
;removed lines...
; bit $9C ;3
; bpl LD409 ;2
; ror SWCHB ;6
; bcs LD409 ;2
; jmp LDD68 ;3
;LD409:
sta WSYNC ;3
lda #$00 ;2
ldx #$2C ;2
sta WSYNC ;3
sta VSYNC ;3
stx TIM64T ;4
;new lines...
lda SWCHB ;4
ror ;2
bcs Skip_Reset ;2
jmp Warm_Start ;3
.byte 0,0,0 ; leftovers
Skip_Reset:
Reset_Done:

That takes care of the switch so it happens AFTER Vsync. Alter the trigger press jump a bit further down too...

;       jmp    LDD68      ;2
jmp Warm_Start ;3
LD45B:

 

 

Then, alter the powerup code to include a "warm start", which clears only the user ram portion after the initial powerup.

LDD68:
sei ;2
cld ;2

;removed lines...
; ldx #$FF ;2
; txs ;2
; inx ;2
; txa ;2
;LDD6F:
; sta VSYNC,X ;4
; dex ;2
; bne LDD6F ;2
; dex ;2
; stx $9E ;3

;added lines...
ldx #$00 ;2
.byte $2C ;4
Warm_Start:
ldx #$80 ;2
lda #$00 ;2
Clear_Loop:
txs ;2
stx $9E ;3
inx ;2
sta VSYNC,X ;4
bne Clear_Loop ;2

And finally, the jump to take you back to the program...

;       jmp    LD3DD      ;3
jmp Reset_Done ;3
LDDA6:

Rock-steady @262 lines. The new routine is 2 bytes larger than the old one, but there are some unused bytes @DDF8-$DDFF you can steal from.

Link to comment
Share on other sites

  • 3 weeks later...

And neither one of those miss a scanline like Yars' Revenge! He could have gotten better ;) But seriously, it's not possible to use a cold start as reset in E.T. (or Yars' either), because that would wipe out your game selection. Raiders only has the one game, so that method was not a problem. It wasn't seen as such a big deal at the time...many games before and after reused the cold start routine.

Link to comment
Share on other sites

I went into Stella debugger while Indy was descending and noticed that $9C is still #$00 and then I resumed emulation and when I waited until the Ark disappeared after Indy reaches the bottom of the pedestal I went rechecked $9C and it is now #$80. This is when the game resets again when the switch is held down. The counter is actually in $CF and is also compared against $9E or #$7C whichever comes first. The code that moves Indy down the pedestal starts at $D45B

Link to comment
Share on other sites

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...