Jump to content
IGNORED

Donkey Kong (NES) Level 133 Fix?


Recommended Posts

Having gotten myself acquainted with the logic for what triggers the "kill screen" on both the arcade and NES versions of Donkey Kong, may I ask you how you guys have managed to come up with a fix for Level 133 on the latter version?

 

For your information, these are the links I visited to get this info:

http://www.donhodges.com/how_high_can_you_get.htm

(arcade version)

 

http://metopal.com/2012/03/24/porting-the-kill-screen/

(NES version)

 

What I wish to do to correct the kill screen for the NES DK is to make a similar fix as to what Don Hodges did for the arcade version.

 

Here's the original NES version code for the kill screen:
 

CB7E  A4 54     LDY $54      ; loads current level number into Y

CB80  C8        INY          ; increment level number by 1

CB81  20 D1 F4  JSR $F4D1    ; jump to subroutine to calculate level number tile

CB84  A9 00     LDA #$00     ; set sign of bonus number as positive

CB86  85 2C     STA $2C      ; store this number in variable

CB88  A9 80     LDA #$80     ; load A with max bonus timer value (8000 bonus points)

CB8A  88        DEY          ; decrement variable in Y by 1

CB8B  C0 04     CPY #$04     ; check if level number < 5

CB8D  10 03     BPL $CB92    ; check for negative flag
                                                        
CB8F  B9 07 C2  LDA $C207,Y  ; load bonus timer value from memory                                                        

CB92  85 2E     STA $2E      ; store in bonus timer value queue

 

My proposed fix for this, based on Hodges' fix for the arcade version:
 

CB7E  A4 54     LDY $54      ; loads current level number into Y

CB80  C0 03     CPY #$03     ; check if level number >= 4

CB82  90 02     BCC $CB86    ; if level 1, 2 or 3 (variables $00 thru $02), continue with code normally

CB84  A0 03     LDY #$03     ; otherwise, load Y with #$03 (level 4)

CB86  C8        INY          ; increment level number by 1 (only if for level variables $00 thru $02)

CB87  20 D1 F4  JSR $F4D1    ; jump to subroutine to calculate level number tile

CB8A  A9 00     LDA #$00     ; set sign of bonus number as positive

CB8C  85 2C     STA $2C      ; store this number in variable

CB8E  B9 07 C2  LDA $C207,Y  ; load bonus timer value from memory

CB91  85 2E     STA $2E      ; store in bonus timer value queue

What I want to do is make it check the level number right after it's loaded into the variable that is stored at $0054 in the game's RAM. We want to compute the bonus timer based on the level number, so that level 4 and up will always start with 8000 points on the bonus timer. If the level number is 4 or higher, then we set a carry flag for, and this means we also only want it to increment the level number if we're on levels 1, 2 or 3 (variables $00 thru $02). The subroutine jump to $F4D1, which follows the INY, must also be modified for a check to see if the level number is 9 or higher, and if we're at level 9, to keep it there via a similar carry flag.

 

~Ben

Edited by ColecoFan1981
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...