[Guidance Request] End Sequence Screens in SoR2

Discussion in 'Engineering & Reverse Engineering' started by eskayelle, Oct 4, 2019.

  1. eskayelle

    eskayelle

    NBA Jam 2K20 TE Developer Member
    15
    0
    1
    Hello all. Looking for someone to help provide guidance with respect to changing the 6 ending screens in SoR2. I currently have (I think) the offsets for the palettes and the pictures themselves, plus the offsets for the byte sizes for the DMA transfers and the VRAM and RAM addresses. Here's what I think I'm missing, based on my work on the title screen and the help you guys gave me (particularly MarkeyJester):
    1) The offsets for the commands that set the number of horizontal and vertical tiles (I think, in decimal, the picture sizes are 18x12 tiles, but not 100% certain)
    2) The location I need to NOP and replace in order to bypass the decompression routine and point instead to new screens in expanded rom (I believe I'm close here).
    3) The code needed to actually display the new screens. I have the code for the title screen replacement, but I'm not sure it will work here. The method by which the screens are displayed appears very different, though the decompression scheme is the same (at offset $30C0).

    Looking for some guidance as to next steps. For reference, I have here the tracelog that'll provide my starting point and what I've learned with respect to palettes, screen offsets, etc. (Warning: It's a large (13MB) file.)

    https://files.catbox.moe/sdpd42.txt

    Please search on ; with the txt file for my notes.
     
    Last edited: Oct 8, 2019
  2. eskayelle

    eskayelle

    NBA Jam 2K20 TE Developer Member
    15
    0
    1
    Quick summary of findings so far... 6 end credits screens... compression routine is at $30C0... VRAM offset is $5B80...

    [​IMG]

     
    Last edited: Oct 5, 2019
  3. eskayelle

    eskayelle

    NBA Jam 2K20 TE Developer Member
    15
    0
    1
    Continuing my read through of the code...

    Here's code MarkeyJester had provided for the title screen. Would it also work for each of the 6 ending credits screens if I add it to expanded ROM and point over to it? If yes, what code should be NOP'd and replaced to properly jump there?

    Code (Text):
    1. 02:4C50  40 E7  MOVE    SR,-(SP)                 A0=0016D460 A1=00005A42 A2=000233B2 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=FFFFEC86 A7=FFFFFFF8 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    2. 02:4C52  46 FC  MOVE    #$2700,SR                A0=0016D460 A1=00005A42 A2=000233B2 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=FFFFEC86 A7=FFFFFFF6 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    3. 02:4C56  48 E7  MOVEM.L {d0-a7}[38 22],-(SP)     A0=0016D460 A1=00005A42 A2=000233B2 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=FFFFEC86 A7=FFFFFFF6 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    4. 02:4C5A  45 F8  LEA     ($A902),A2               A0=0016D460 A1=00005A42 A2=000233B2 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=FFFFEC86 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    5. 02:4C5E  4D F9  LEA     ($00C00004),A6           A0=0016D460 A1=00005A42 A2=FFFFA902 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=FFFFEC86 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    6. 02:4C64  24 08  MOVE.L  A0,D2                    A0=0016D460 A1=00005A42 A2=FFFFA902 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=00000C10 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    7. 02:4C66  34 FC  MOVE.W  #$9700,(A2)+             A0=0016D460 A1=00005A42 A2=FFFFA902 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    8. 02:4C6A  24 BC  MOVE.L  #$96009500,(A2)          A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    9. 02:4C70  05 CA  MOVEP.L D2,#$FFFD(A2)            A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    10. 02:4C74  2C 92  MOVE.L  (A2),(A6)                A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    11. 02:4C76  3C AA  MOVE.W  $FFFE(A2),(A6)           A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    12. 02:4C7A  3C BC  MOVE.W  #$8114,(A6)              A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    13. 02:4C7E  61 0C  BSR     #$0C [02:4C8C]           A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFE2 D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    14. 02:4C8C  D4 40  ADD.W   D0,D2                    A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016D460 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    15. 02:4C8E  64 22  BCC     #$22 [02:4CB2]           A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    16. 02:4CB2  24 BC  MOVE.L  #$94009300,(A2)          A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    17. 02:4CB8  01 8A  MOVEP.W D0,#$0001(A2)            A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    18. 02:4CBC  2C 92  MOVE.L  (A2),(A6)                A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    19. 02:4CBE  26 01  MOVE.L  D1,D3                    A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00000003 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xNzvc
    20. 02:4CC0  E5 9B  ROL.L   #2,D3                    A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=40200000 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    21. 02:4CC2  E4 5B  ROR.W   #2,D3                    A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00800001 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvC
    22. 02:4CC4  3C 83  MOVE.W  D3,(A6)                  A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00804000 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    23. 02:4CC6  24 83  MOVE.L  D3,(A2)                  A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00804000 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    24. 02:4CC8  3C 92  MOVE.W  (A2),(A6)                A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00804000 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    25. 02:4CCA  4E 75  RTS                              A0=0016D460 A1=00005A42 A2=FFFFA904 A3=FFFFEC80 A4=00C00004 A5=FFFFF500 A6=00C00004 A7=FFFFFFDE D0=00002110 D1=40200000 D2=0016F570 D3=00804000 D4=940D8134 D5=50000083 D6=00000000 D7=0000FFFF xnzvc
    Code (Text):
    1. 40 E7 46 FC 27 00 48 E7 38 22 45 F8 A9 02 4D F9
    2. 00 C0 00 04 24 08 34 FC 97 00 24 BC 96 00 95 00
    3. 05 CA FF FD 2C 92 3C AA FF FE 3C BC 81 14 61 0C
    4. 3C BC 81 24 4C DF 44 1C 46 DF 4E 75 D4 40 64 22
    5. 90 42 D0 C0 61 1C D2 40 D2 40 30 02 24 08 34 FC
    6. 97 00 24 BC 96 00 95 00 05 CA FF FD 2C 92 3C AA
    7. FF FE 24 BC 94 00 93 00 01 8A 00 01 2C 92 26 01
    8. E5 9B E4 5B 3C 83 24 83 3C 92 4E 75
    Or... is a different set of code needed to be written for the end credits screens? Appreciate any thoughts you guys can provide!
     
  4. eskayelle

    eskayelle

    NBA Jam 2K20 TE Developer Member
    15
    0
    1
    Hey, there. For anyone interested in providing advice, I've attached here a link to a save state that will go straight to the end of the game. No playthrough needed.

    https://files.catbox.moe/ssnkuq.gsx

    (Save state works in Gens and Fusion.)

    Will definitely credit in the game anyone who can provide a solution.
     
  5. Aerosol

    Aerosol

    FML and FU2 Member
    10,362
    3
    18
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    I feel bad that I can't help, but you've definitely done the leg work here and I hope you get help soon
     
  6. eskayelle

    eskayelle

    NBA Jam 2K20 TE Developer Member
    15
    0
    1
    Definitely appreciate the sentiment! I tried to find as much data as I could so that anyone interested in helping with that last code bit wouldn't have to take too much time out of their day looking into this. It's definitely been interesting running through the code and figuring out what some of it means, and I've been able to test to verify that (short of any typos I wrote) the tile maps, pictures, and palettes offsets are indeed accurate.

    @MarkeyJester has a really helpful 68k tutorial that I located through this site; I've been reading through the first few sections, and - while I'm not sophisticated in my understanding enough to see how the mnemonics make pictures display on screen, I was able to see some familiar ones from when I was working with the 65c816 and my NBA Jam TE hack. Plus, the tutorial's been helpful in explaining the data versus address registers, so I was able to use it to create some rudimentary code that "speeds up" the end credits by increasing what looks like a frame increment counter. That, plus those palette offsets I had found, and some creative swaps of BNEs/BEQs/BRAs in the original code, has given me an alternative ending sequence, just in case folks aren't available to take a peek at the data above. That alternative sequence gives the appearance of just end credits (no first 5 ending screens), followed by the very last screen with all the Ragers waving at a helicopter. I then tweaked the code so that it would display text not only if the game were on the hardest difficulty setting, but if it were on ANY difficulty setting. That allowed me to leave a nice little ending message.

    Thanks for reading!
     
    Last edited: Oct 15, 2019