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

Author Topic: Removing Functions in an Options Menu (Streets of Rage 2) [SOLVED]  (Read 1072 times)

eskayelle

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
I'm looking to limit what the cursor will point to in the SoR2 (Genesis/Mega Drive) menu such that, when pressing up or down, it will only highlight these two lines:

Code: [Select]
1 PLAYER
2 PLAYERS

Currently, players can select from the following:

Code: [Select]
1 PLAYER
2 PLAYERS
DUEL
OPTIONS

I can run a tracelog at the screen to log movements, but I'm not sure what lines are the up/down cursor movements or how I might restrict then to only the first two lines.  Would anyone be able to provide some guidance?
« Last Edit: December 10, 2019, 08:25:26 pm by eskayelle »

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 285
  • I am the baldest romhacker
    • View Profile
Re: Removing Functions in an Options Menu (Streets of Rage 2)
« Reply #1 on: December 10, 2019, 06:52:06 am »
No idea how did you manage to make several sega hacks if you can't figure out such a simple task.

Find an address in ram that holds cursor position. Should be easy enough since it probably has 00 01 02 03 values only when you move cursor. Then set a write breakpoint to it and study code (or log) when it hits after you move cursor.
iromhacker.ru - NES ROM hacking tutorials for beginners

peixemacaco

  • Jr. Member
  • **
  • Posts: 37
  • 70 65 69 78 65 6d 61 63 61 63 6f
    • View Profile
    • Old peixemacaco site found
Re: Removing Functions in an Options Menu (Streets of Rage 2)
« Reply #2 on: December 10, 2019, 11:29:59 am »
eskayelle, I´d seeing all your great work on many games.

I really don't know how to , but as Cyneprepou4uk said, there must be a sequence.

In fact , I´m curious why you want to remove access to Options and other submenus.

Of course, only if you want to tell..  lol

Nelson
Super Monaco GP... It garnered an at-the-time unprecedented 10–10–9–9 rating from Electronic Gaming Monthly's Review and wasn`t a F Indy title.

eskayelle

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Removing Functions in an Options Menu (Streets of Rage 2) [SOLVED]
« Reply #3 on: December 10, 2019, 08:24:31 pm »
Thanks, and solved.

Run a RAM search in Gens mod.
Cursor over "Options".
Assume this is #$03 (#$00 being "1 Player").
Search on specific value of 3.
Note the RAM change at $FFFC19.
 
Set a breakpoint on $FFFC19.
Move the cursor.
Note the break.
 
Each cursor down from "1 Player" triggers 3 addq.w’s.  Then get to bottom ("Options") and press down, and it does a clr.w.

Code: [Select]
00:67FA  4A 38  TST.B   ($FC6D)                  A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnZvc
00:67FE  67 04  BEQ     #$04 [00:6804]           A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnZvc
00:6804  52 78  ADDQ.W  #1,($FC18)               A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnZvc
00:6808  0C 78  CMPI.W  #$0004,($FC18)           A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnzvc
00:680E  65 04  BCS     #$04 [00:6814]           A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnZvc
00:6810  42 78  CLR.W   ($FC18)                  A0=FFFFFC1A A1=00021D76 A2=FFFFFCFC A3=FFFFFCFA A4=FFFFFCE0 A5=FFFFF700 A6=FFFFEC80 A7=FFFFFFFC D0=00000000 D1=00000000 D2=00000001 D3=0080878B D4=940DFFFF D5=5000FFFF D6=0000FFFF D7=00000000 xnZvc

Going up, it'll do a subq.w.
 
The move.w #$0003 is the bottom option.

For player 1’s controller, to limit the cursor to the first two options, change $680B to 02 and $683B to 01.
Now try player 2’s controller.
 
Change $67AB to 02 and $67D3 to 01.
After all this, go to 746D and use “20” bytes (the space key) to replace the text for DUEL/BATTLE and OPTIONS.

 :beer: