Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Boulder Dash (NES)/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<div id="catlinks">[[Image:Chip_tiny.png]]The following article is a [[ROM map]] for [[Boulder Dash]].</div>
{{rommap|game=Boulder Dash}}
{{clear}}
==Addresses==
* <tt>0x2773</tt> = Rockford Palette Selection
* <tt>0x2931-0x2938 = </tt>World 1 Password Data
* <tt>0x2939-0x2940 = </tt>World 2 Password Data
* <tt>0x2941-0x2948 = </tt>World 3 Password Data
* <tt>0x2948-0x2950 = </tt>World 4 Password Data
* <tt>0x2951-0x2958 = </tt>World 5 Password Data
* <tt>0x2959-0x2960 = </tt>World 6 Password Data
* <tt>0x2961-0x2968 = </tt>World 7 Password Data
* <tt>0x2969-0x2970 = </tt>World 8 Password Data
* <tt>0x2971-0x2978 = </tt>World 9 Password Data
* <tt>0x2979-0x2980 = </tt>World 10 Password Data
* <tt>0x2981-0x2988 = </tt>World 11 Password Data
* <tt>0x2989-0x2990 = </tt>World 12 Password Data
* <tt>0x2991-0x2998 = </tt>World 13 Password Data
* <tt>0x2999-0x29A0 = </tt>World 14 Password Data
* <tt>0x29A1-0x29A8 = </tt>World 15 Password Data
* <tt>0x29A9-0x29B0 = </tt>World 16 Password Data
* <tt>0x29B1-0x29B8 = </tt>World 17 Password Data
* <tt>0x29B9-0x29C0 = </tt>World 18 Password Data
* <tt>0x29C1-0x29C8 = </tt>World 19 Password Data
* <tt>0x29C9-0x29D0 = </tt>World 20 Password Data
* <tt>0x29D1-0x29D8 = </tt>World 21 Password Data
* <tt>0x29D9-0x29E0 = </tt>World 22 Password Data
* <tt>0x29E1-0x29E8 = </tt>World 23 Password Data
* <tt>0x29E9-0x29F0 = </tt>World 24 Password Data
* <tt>0x3876 = </tt>World 1-1 CHR Bank for Level Data
* <tt>0x3877-0x3878 = </tt>World 1-1 Level Data Pointers
* <tt>0x3879 = </tt>World 1-2 CHR Bank for Level Data
* <tt>0x387A-0x387B = </tt>World 1-2 Level Data Pointers
* <tt>0x387C = </tt>World 1-3 CHR Bank for Level Data
* <tt>0x387D-0x387E = </tt>World 1-3 Level Data Pointers
* <tt>0x387F = </tt>World 1-4 CHR Bank for Level Data
* <tt>0x3880-0x3881 = </tt>World 1-4 Level Data Pointers
* <tt>0x3882 = </tt>World 2-1 CHR Bank for Level Data
* <tt>0x3883-0x3884 = </tt>World 2-1 Level Data Pointers
* <tt>0x3885 = </tt>World 2-2 CHR Bank for Level Data
* <tt>0x3886-0x3887 = </tt>World 2-2 Level Data Pointers
* <tt>0x3888 = </tt>World 2-3 CHR Bank for Level Data
* <tt>0x3889-0x388A = </tt>World 2-3 Level Data Pointers
* <tt>0x388B = </tt>World 2-4 CHR Bank for Level Data
* <tt>0x388C-0x388D = </tt>World 2-4 Level Data Pointers
* <tt>0x388E = </tt>World 3-1 CHR Bank for Level Data
* <tt>0x388F-0x3890 = </tt>World 3-1 Level Data Pointers
* <tt>0x3891 = </tt>World 3-2 CHR Bank for Level Data
* <tt>0x3892-0x3893 = </tt>World 3-2 Level Data Pointers
* <tt>0x3894 = </tt>World 3-3 CHR Bank for Level Data
* <tt>0x3895-0x3896 = </tt>World 3-3 Level Data Pointers
* <tt>0x3897 = </tt>World 3-4 CHR Bank for Level Data
* <tt>0x3898-0x3899 = </tt>World 3-4 Level Data Pointers
* <tt>0x389A = </tt>World 4-1 CHR Bank for Level Data
* <tt>0x389B-0x389C = </tt>World 4-1 Level Data Pointers
* <tt>0x389D = </tt>World 4-2 CHR Bank for Level Data
* <tt>0x389E-0x389F = </tt>World 4-2 Level Data Pointers
* <tt>0x38A0 = </tt>World 4-3 CHR Bank for Level Data
* <tt>0x38A1-0x38A2 = </tt>World 4-3 Level Data Pointers
* <tt>0x38A3 = </tt>World 4-4 CHR Bank for Level Data
* <tt>0x38A4-0x38A5 = </tt>World 4-4 Level Data Pointers
* <tt>0x38A6 = </tt>World 5-1 CHR Bank for Level Data
* <tt>0x38A7-0x38A8 = </tt>World 5-1 Level Data Pointers
* <tt>0x38A9 = </tt>World 5-2 CHR Bank for Level Data
* <tt>0x38AA-0x38AB = </tt>World 5-2 Level Data Pointers
* <tt>0x38AC = </tt>World 5-3 CHR Bank for Level Data
* <tt>0x38AD-0x38AE = </tt>World 5-3 Level Data Pointers
* <tt>0x38AF = </tt>World 5-4 CHR Bank for Level Data
* <tt>0x38B0-0x38B1 = </tt>World 5-4 Level Data Pointers
* <tt>0x38B2 = </tt>World 6-1 CHR Bank for Level Data
* <tt>0x38B3-0x38B4 = </tt>World 6-1 Level Data Pointers
* <tt>0x38B5 = </tt>World 6-2 CHR Bank for Level Data
* <tt>0x38B6-0x38B7 = </tt>World 6-2 Level Data Pointers
* <tt>0x38B8 = </tt>World 6-3 CHR Bank for Level Data
* <tt>0x38B9-0x38BA = </tt>World 6-3 Level Data Pointers
* <tt>0x38BB = </tt>World 6-4 CHR Bank for Level Data
* <tt>0x38BC-0x38BD = </tt>World 6-4 Level Data Pointers


'''Addresses:'''
==Disassembly==
 
===Password Comparison Routine===
* '''<tt>(2931-2938) = </tt>'''World 1 Password Data
This fragment of code compares the input password with the passwords of all 24 levels of the game.
* '''<tt>(2939-2940) = </tt>'''World 2 Password Data
<pre>
* '''<tt>(2941-2948) = </tt>'''World 3 Password Data
00:A8BA:A9 00    LDA #$00
* '''<tt>(2948-2950) = </tt>'''World 4 Password Data
00:A8BC:85 67    STA $0067  // Reset level counter
* '''<tt>(2951-2958) = </tt>'''World 5 Password Data
loop:
* '''<tt>(2959-2960) = </tt>'''World 6 Password Data
00:A8BE:A5 67    LDA $0067  // Load level counter
* '''<tt>(2961-2968) = </tt>'''World 7 Password Data
00:A8C0:0A        ASL
* '''<tt>(2969-2970) = </tt>'''World 8 Password Data
00:A8C1:0A        ASL
* '''<tt>(2971-2978) = </tt>'''World 9 Password Data
00:A8C2:0A        ASL
* '''<tt>(2979-2980) = </tt>'''World 10 Password Data
00:A8C3:AA        TAX        // Level password character counter X:= A * 8
* '''<tt>(2981-2988) = </tt>'''World 11 Password Data
00:A8C4:A0 00    LDY #$00    // Reset input password character counter
* '''<tt>(2989-2990) = </tt>'''World 12 Password Data
passwordCompare:
* '''<tt>(2991-2998) = </tt>'''World 13 Password Data
00:A8C6:B9 4D 00  LDA $004D,Y // Load Ath character from input password at $004D
* '''<tt>(2999-29A0) = </tt>'''World 14 Password Data
00:A8C9:DD 27 A9  CMP $A927,X // Compare to level passwords at $A927.
* '''<tt>(29A1-29A8) = </tt>'''World 15 Password Data
                              // Data structure: [Lvl 1 password (8bytes)][Lvl 2 password (8bytes)]…
* '''<tt>(29A9-29B0) = </tt>'''World 16 Password Data
                              // Only the first 6 bytes are used, see below.
* '''<tt>(29B1-29B8) = </tt>'''World 17 Password Data
00:A8CC:D0 09    BNE $A8D7  // If not equal, goto nextLevel
* '''<tt>(29B9-29C0) = </tt>'''World 18 Password Data
00:A8CE:E8        INX        // Increment level password character counter
* '''<tt>(29C1-29C8) = </tt>'''World 19 Password Data
00:A8CF:C8        INY        // Increment input password character counter
* '''<tt>(29C9-29D0) = </tt>'''World 20 Password Data
00:A8D0:C0 06    CPY #$06    // Check if password length of $06 characters is reached
* '''<tt>(29D1-29D8) = </tt>'''World 21 Password Data
00:A8D2:90 F2    BCC $A8C6  // If not, goto passwordCompare
* '''<tt>(29D9-29E0) = </tt>'''World 22 Password Data
00:A8D4:4C E2 A8  JMP $A8E2  // Comparison finished, current level password matches input password. Goto passwordCorrect.
* '''<tt>(29E1-29E8) = </tt>'''World 23 Password Data
nextLevel:
* '''<tt>(29E9-29F0) = </tt>'''World 24 Password Data
00:A8D7:E6 67    INC $0067  // Increment level counter
* '''<tt>(3876) = </tt>'''World 1-1 CHR Bank for Level Data
00:A8D9:A5 67    LDA $0067
* '''<tt>(3877-3878) = </tt>'''World 1-1 Level Data Pointers
00:A8DB:C9 18    CMP #$18    // Check if last level was reached
* '''<tt>(3879) = </tt>'''World 1-2 CHR Bank for Level Data
00:A8DD:90 DF    BCC $A8BE  // If not, goto loop
* '''<tt>(387A-387B) = </tt>'''World 1-2 Level Data Pointers
⋮                ⋮
* '''<tt>(387C) = </tt>'''World 1-3 CHR Bank for Level Data
</pre>
* '''<tt>(387D-387E) = </tt>'''World 1-3 Level Data Pointers
{{Internal Data|game=Boulder Dash}}
* '''<tt>(387F) = </tt>'''World 1-4 CHR Bank for Level Data
* '''<tt>(3880-3881) = </tt>'''World 1-4 Level Data Pointers
* '''<tt>(3882) = </tt>'''World 2-1 CHR Bank for Level Data
* '''<tt>(3883-3884) = </tt>'''World 2-1 Level Data Pointers
* '''<tt>(3885) = </tt>'''World 2-2 CHR Bank for Level Data
* '''<tt>(3886-3887) = </tt>'''World 2-2 Level Data Pointers
* '''<tt>(3888) = </tt>'''World 2-3 CHR Bank for Level Data
* '''<tt>(3889-388A) = </tt>'''World 2-3 Level Data Pointers
* '''<tt>(388B) = </tt>'''World 2-4 CHR Bank for Level Data
* '''<tt>(388C-388D) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(388E) = </tt>'''World 3-1 CHR Bank for Level Data
* '''<tt>(388F-3890) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(3891) = </tt>'''World 3-2 CHR Bank for Level Data
* '''<tt>(3892-3893) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(3894) = </tt>'''World 3-3 CHR Bank for Level Data
* '''<tt>(3895-3896) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(3897) = </tt>'''World 3-4 CHR Bank for Level Data
* '''<tt>(3898-3899) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(389A) = </tt>'''World 4-1 CHR Bank for Level Data
* '''<tt>(389B-389C) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(389D) = </tt>'''World 4-2 CHR Bank for Level Data
* '''<tt>(389E-389F) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38A0) = </tt>'''World 4-3 CHR Bank for Level Data
* '''<tt>(38A1-38A2) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38A3) = </tt>'''World 4-4 CHR Bank for Level Data
* '''<tt>(38A4-38A5) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38A6) = </tt>'''World 5-1 CHR Bank for Level Data
* '''<tt>(38A7-38A8) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38A9) = </tt>'''World 5-2 CHR Bank for Level Data
* '''<tt>(38AA-38AB) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38AC) = </tt>'''World 5-3 CHR Bank for Level Data
* '''<tt>(38AD-38AE) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38AF) = </tt>'''World 5-4 CHR Bank for Level Data
* '''<tt>(38B0-38B1) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38B2) = </tt>'''World 6-1 CHR Bank for Level Data
* '''<tt>(38B3-38B4) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38B5) = </tt>'''World 6-2 CHR Bank for Level Data
* '''<tt>(38B6-38B7) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38B8) = </tt>'''World 6-3 CHR Bank for Level Data
* '''<tt>(38B9-38BA) = </tt>'''World 1-1 Level Data Pointers
* '''<tt>(38BB) = </tt>'''World 6-4 CHR Bank for Level Data
* '''<tt>(38BC-38BD) = </tt>'''World 1-1 Level Data Pointers
 
<includeonly>[[Category:ROM maps]][[Category:Boulder Dash|ROM map]]</includeonly>

Latest revision as of 21:06, 28 January 2024

Chip tiny.png The following article is a ROM map for Boulder Dash (NES).

Addresses

  • 0x2773 = Rockford Palette Selection
  • 0x2931-0x2938 = World 1 Password Data
  • 0x2939-0x2940 = World 2 Password Data
  • 0x2941-0x2948 = World 3 Password Data
  • 0x2948-0x2950 = World 4 Password Data
  • 0x2951-0x2958 = World 5 Password Data
  • 0x2959-0x2960 = World 6 Password Data
  • 0x2961-0x2968 = World 7 Password Data
  • 0x2969-0x2970 = World 8 Password Data
  • 0x2971-0x2978 = World 9 Password Data
  • 0x2979-0x2980 = World 10 Password Data
  • 0x2981-0x2988 = World 11 Password Data
  • 0x2989-0x2990 = World 12 Password Data
  • 0x2991-0x2998 = World 13 Password Data
  • 0x2999-0x29A0 = World 14 Password Data
  • 0x29A1-0x29A8 = World 15 Password Data
  • 0x29A9-0x29B0 = World 16 Password Data
  • 0x29B1-0x29B8 = World 17 Password Data
  • 0x29B9-0x29C0 = World 18 Password Data
  • 0x29C1-0x29C8 = World 19 Password Data
  • 0x29C9-0x29D0 = World 20 Password Data
  • 0x29D1-0x29D8 = World 21 Password Data
  • 0x29D9-0x29E0 = World 22 Password Data
  • 0x29E1-0x29E8 = World 23 Password Data
  • 0x29E9-0x29F0 = World 24 Password Data
  • 0x3876 = World 1-1 CHR Bank for Level Data
  • 0x3877-0x3878 = World 1-1 Level Data Pointers
  • 0x3879 = World 1-2 CHR Bank for Level Data
  • 0x387A-0x387B = World 1-2 Level Data Pointers
  • 0x387C = World 1-3 CHR Bank for Level Data
  • 0x387D-0x387E = World 1-3 Level Data Pointers
  • 0x387F = World 1-4 CHR Bank for Level Data
  • 0x3880-0x3881 = World 1-4 Level Data Pointers
  • 0x3882 = World 2-1 CHR Bank for Level Data
  • 0x3883-0x3884 = World 2-1 Level Data Pointers
  • 0x3885 = World 2-2 CHR Bank for Level Data
  • 0x3886-0x3887 = World 2-2 Level Data Pointers
  • 0x3888 = World 2-3 CHR Bank for Level Data
  • 0x3889-0x388A = World 2-3 Level Data Pointers
  • 0x388B = World 2-4 CHR Bank for Level Data
  • 0x388C-0x388D = World 2-4 Level Data Pointers
  • 0x388E = World 3-1 CHR Bank for Level Data
  • 0x388F-0x3890 = World 3-1 Level Data Pointers
  • 0x3891 = World 3-2 CHR Bank for Level Data
  • 0x3892-0x3893 = World 3-2 Level Data Pointers
  • 0x3894 = World 3-3 CHR Bank for Level Data
  • 0x3895-0x3896 = World 3-3 Level Data Pointers
  • 0x3897 = World 3-4 CHR Bank for Level Data
  • 0x3898-0x3899 = World 3-4 Level Data Pointers
  • 0x389A = World 4-1 CHR Bank for Level Data
  • 0x389B-0x389C = World 4-1 Level Data Pointers
  • 0x389D = World 4-2 CHR Bank for Level Data
  • 0x389E-0x389F = World 4-2 Level Data Pointers
  • 0x38A0 = World 4-3 CHR Bank for Level Data
  • 0x38A1-0x38A2 = World 4-3 Level Data Pointers
  • 0x38A3 = World 4-4 CHR Bank for Level Data
  • 0x38A4-0x38A5 = World 4-4 Level Data Pointers
  • 0x38A6 = World 5-1 CHR Bank for Level Data
  • 0x38A7-0x38A8 = World 5-1 Level Data Pointers
  • 0x38A9 = World 5-2 CHR Bank for Level Data
  • 0x38AA-0x38AB = World 5-2 Level Data Pointers
  • 0x38AC = World 5-3 CHR Bank for Level Data
  • 0x38AD-0x38AE = World 5-3 Level Data Pointers
  • 0x38AF = World 5-4 CHR Bank for Level Data
  • 0x38B0-0x38B1 = World 5-4 Level Data Pointers
  • 0x38B2 = World 6-1 CHR Bank for Level Data
  • 0x38B3-0x38B4 = World 6-1 Level Data Pointers
  • 0x38B5 = World 6-2 CHR Bank for Level Data
  • 0x38B6-0x38B7 = World 6-2 Level Data Pointers
  • 0x38B8 = World 6-3 CHR Bank for Level Data
  • 0x38B9-0x38BA = World 6-3 Level Data Pointers
  • 0x38BB = World 6-4 CHR Bank for Level Data
  • 0x38BC-0x38BD = World 6-4 Level Data Pointers

Disassembly

Password Comparison Routine

This fragment of code compares the input password with the passwords of all 24 levels of the game.

00:A8BA:A9 00     LDA #$00
00:A8BC:85 67     STA $0067   // Reset level counter
loop:
00:A8BE:A5 67     LDA $0067   // Load level counter
00:A8C0:0A        ASL
00:A8C1:0A        ASL
00:A8C2:0A        ASL
00:A8C3:AA        TAX         // Level password character counter X:= A * 8
00:A8C4:A0 00     LDY #$00    // Reset input password character counter
passwordCompare:
00:A8C6:B9 4D 00  LDA $004D,Y // Load Ath character from input password at $004D
00:A8C9:DD 27 A9  CMP $A927,X // Compare to level passwords at $A927.
                              // Data structure: [Lvl 1 password (8bytes)][Lvl 2 password (8bytes)]…
                              // Only the first 6 bytes are used, see below.
00:A8CC:D0 09     BNE $A8D7   // If not equal, goto nextLevel
00:A8CE:E8        INX         // Increment level password character counter
00:A8CF:C8        INY         // Increment input password character counter
00:A8D0:C0 06     CPY #$06    // Check if password length of $06 characters is reached
00:A8D2:90 F2     BCC $A8C6   // If not, goto passwordCompare
00:A8D4:4C E2 A8  JMP $A8E2   // Comparison finished, current level password matches input password. Goto passwordCorrect.
nextLevel:
00:A8D7:E6 67     INC $0067   // Increment level counter
00:A8D9:A5 67     LDA $0067
00:A8DB:C9 18     CMP #$18    // Check if last level was reached
00:A8DD:90 DF     BCC $A8BE   // If not, goto loop
⋮                 ⋮