sdloader.bin start address?

support for the powerpc toolchain
Post Reply
Samson
Posts: 35
Joined: Mon May 19, 2008 8:05 am

sdloader.bin start address?

Post by Samson » Tue Aug 17, 2010 8:14 pm

I'm sorry that this is slightly off-topic, but this seems to be the best place: Does anyone remember what the start address for SDLoader.bin is? I'd like to convert it into a DOL to launch with a max drive pro...

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: sdloader.bin start address?

Post by WinterMute » Thu Aug 26, 2010 10:41 pm

Sorry to take so long, I think it's either 0x81300000 or 0x81200000 - Costis can't remember either :roll:

The stage 2 loader is in the sdpatch source code if you still have that, could always run it through objdump & figure it that way.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Samson
Posts: 35
Joined: Mon May 19, 2008 8:05 am

Re: sdloader.bin start address?

Post by Samson » Fri Aug 27, 2010 1:17 pm

I should say sorry for not RTFM... I just remembered that I still have the installer on my HD and the readme even mentions the start address for people who want to replace sdloader.bin: 0x81700000
This small python script will slurp in sdloader.bin and produce a shiny sdloader.dol:

Code: Select all

import struct

f = open("sdloader.bin", "rb")
dol = f.read()
f.close()

text_file_pos = [0x100] + [0] * 6
data_file_pos = [0] * 11
text_mem_pos = [0x81700000] + [0] * 6
data_mem_pos = [0] * 11
text_size = [len(dol)] + [0] * 6
data_size = [0] * 11
bss_mem_pos = 0
bss_size = 0
entry = 0x81700000

f = open("sdloader.dol", "wb")
f.write(struct.pack(">IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIxxxxxxxxxxxxxxxxxxxxxxxxxxxx", *(text_file_pos + data_file_pos + text_mem_pos + data_mem_pos + text_size + data_size + [bss_mem_pos, bss_size, entry])))
f.write(dol)
f.close()
I was a bit afraid that sdloader conflicts with the max drive software, but I just tried it and it works! The software is confused if the sd card is in a slot during startup, but you can put the card in once the menu is drawn.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 9 guests