News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: [TECHNICAL/ASM] Streets of Rage 2 End "Photos" Screens  (Read 2136 times)

eskayelle

  • Full Member
  • ***
  • Posts: 182
  • NBA Jam 2KTE / TMNT of Rage / Pong de las TMNT Dev
    • View Profile
[TECHNICAL/ASM] Streets of Rage 2 End "Photos" Screens
« on: October 03, 2019, 08:51:52 pm »
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:
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 someone with 68k ASM experience who can provide 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 ; within the file for my notes.



tl;dr version of the text file:


October 09, 2019, 01:04:08 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I do have some title screen and display code I was provided while working on the TMNT of Rage hack.  Would any 68k experts mind taking a peek?  Can any of this be re-purposed and used to re-point to / display new ending sequence photos/screens?

Code: [Select]
40 E7 46 FC 27 00 48 E7 38 22 45 F8 A9 02 4D F9
00 C0 00 04 24 08 34 FC 97 00 24 BC 96 00 95 00
05 CA FF FD 2C 92 3C AA FF FE 3C BC 81 14 61 0C
3C BC 81 24 4C DF 44 1C 46 DF 4E 75 D4 40 64 22
90 42 D0 C0 61 1C D2 40 D2 40 30 02 24 08 34 FC
97 00 24 BC 96 00 95 00 05 CA FF FD 2C 92 3C AA
FF FE 24 BC 94 00 93 00 01 8A 00 01 2C 92 26 01
E5 9B E4 5B 3C 83 24 83 3C 92 4E 75

From tracelog, TMNT of Rage v1.25.29:
Code: [Select]
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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

Appreciate any thoughts you guys can provide!
« Last Edit: October 09, 2019, 01:05:59 pm by eskayelle »
I once wrote a blog.  Maybe you'll find something in it useful?  https://www.romhacking.net/forum/index.php?topic=30593.0

eskayelle

  • Full Member
  • ***
  • Posts: 182
  • NBA Jam 2KTE / TMNT of Rage / Pong de las TMNT Dev
    • View Profile
Re: [TECHNICAL/ASM] Streets of Rage 2 End "Photos" Screens
« Reply #1 on: October 13, 2019, 09:47:23 am »
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.

(Save state works in Gens and Fusion.)

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

Will definitely credit in the game anyone who can provide a solution.
I once wrote a blog.  Maybe you'll find something in it useful?  https://www.romhacking.net/forum/index.php?topic=30593.0

eskayelle

  • Full Member
  • ***
  • Posts: 182
  • NBA Jam 2KTE / TMNT of Rage / Pong de las TMNT Dev
    • View Profile
Re: [TECHNICAL/ASM] Streets of Rage 2 End "Photos" Screens
« Reply #2 on: March 12, 2020, 04:50:20 pm »
Hi there! Sorry for the bump on the seemingly necro post. I've been working through tile editing and some minor ASM edits, plus experimenting a bit with MD+. I never quite got this bit solved with respect to how I might be able to bypass the compression at $30C0 and insert 5 or 6 alternate ending credits screens and then point back to each of them. I was able to find palettes and maps, as per the screen above, but I couldn't quite get to the finish line with a consistent solution.

Would anyone be interested in taking a look at what I've got and provide a bit of guidance?  The screenshot in the posts above give the best summary.
I once wrote a blog.  Maybe you'll find something in it useful?  https://www.romhacking.net/forum/index.php?topic=30593.0