aik002 / RSBypass

Rocksmith 2014 Remastered Edition dylib patch for loading and playing CDLC
112 stars 16 forks source link

Dynamic Segment Length to fix Sonoma issues #8

Closed zwhitten closed 1 year ago

zwhitten commented 1 year ago

Couple of changes to hopefully get the bypass working for Sonoma. It seems to work for me but I'm unsure about the build/multi-architecture packaging

aik002 commented 1 year ago

I compiled your code and it still crashes for me on Intel Sonoma. Log here: https://pastebin.com/raw/mvm5wEQL

I will reply to you on Discord with the same message and the compiled dylib so you can try it on your Mac (assuming you. have an Apple Silicon Mac).

mehabox commented 1 year ago

Yeah, I tried compiling yesterday, too (Apple Silicon). The game launches fine, but the CDLCs wouldn't get past amps. I have a ton of (C)DLC borrowed somewhere else with their content ids changed to Cherub Rock which I own, and they used to work fine previously. Now they are displayed and their previews are audible while scrolling through, but they would not play.

aik002 commented 1 year ago

@mehabox Did you have a load order? And the right filename and directory? "Stuck on amps" means that there's no patch, and with patch it crashes on Sonoma.

mehabox commented 1 year ago

@aik002 i'm a newbie to this whole process, so probably I did something wrong. I'd be happy to help if you guide me.

What I did: found the dylib in the "DerivedData" folder on my machine, replaced the file in the "ARM" directory of the 1.7 release, run the .command. Saw the dylib in the .app folder.

What I did with the attachment you posted on Discord: just replaced the dylib in the .app folder

image

The thing I don't understand is the "load order", it's a new thing to me.

Will re-download RS files through steam, replace the file in the ARM directory again and post the output

mehabox commented 1 year ago
image image

Yeah, the same result. I also made sure the file has the executable bit in its chmod, doesn't get past amps.

aik002 commented 1 year ago

The insert_dylib executable adds the load order to the Rocksmith2014 executable. The .command does this and also copies the .dylib from the appropriate architecture folder (ARM, x64, etc.) next to the Rocksmith 2014 executable.

The load order is "inside" the Rocksmith2014 executable telling it to load the libRSBypass.dylib after everything else loads. Only this way the .dylib actually "does something" and lets us access the memory of the app.

Edit: you can check the load order by running otool -l ./Rocksmith2014 in the Rocksmith2014.app/Contents/MacOS/ folder (make sure to target the Rocksmith2014 executable itself, the executable is the file without a file ending!!)

mehabox commented 1 year ago

@aik002 thanks. I just did that and it says it's there:

Load command 33
          cmd LC_LOAD_DYLIB
      cmdsize 152
         name /Users/true/Library/Application Support/Steam/steamapps/common/Rocksmith2014/Rocksmith2014.app/Contents/MacOS/libRSBypass.dylib (offset 24)
   time stamp 0 Thu Jan  1 07:00:00 1970
      current version 0.0.0
compatibility version 0.0.0
aik002 commented 1 year ago

Alright thanks a lot for checking.