Page 2 of 3

Re: Gens4all RC4 Loaded Iso for SD

Posted: Wed Apr 13, 2022 10:25 am
by Ian Micheal
MastaG wrote:So I gave it a shot, but your releases don't seem to be running from IDE drive using loader 0.6.x.
Gens4All starts but freezes after pressing start on the title screen.
NesterDC, Snes4All and GNUBoyLoaded boot into a black screen.

For compatibility with IDE (HDD/CF) you'll need to:
- Unscramble the boot binary (usually 1ST_READ.BIN)
- Hex patch the boot binary and replace: E4745FA0 with: EC745FA0
In Linux I usually just do: sed -i 's/\xE4\x74\x5F\xA0/\xEC\x74\x5F\xA0/g' 1ST_READ.BIN
- Make sure to append the bootloader (IP.BIN) when building with mkisofs and use LBA 0
mkisofs -C 0,0 -V Gens4All -G IP.BIN -rock -l -o gens4all.iso gens4all_directory

Then the resulting iso file should boot from SD but also from IDE :)
Could you try this and test it on this.. for us ?

Re: Gens4all RC4 Loaded Iso for SD

Posted: Wed Apr 13, 2022 12:05 pm
by MastaG
Ian Micheal wrote:
MastaG wrote:So I gave it a shot, but your releases don't seem to be running from IDE drive using loader 0.6.x.
Gens4All starts but freezes after pressing start on the title screen.
NesterDC, Snes4All and GNUBoyLoaded boot into a black screen.

For compatibility with IDE (HDD/CF) you'll need to:
- Unscramble the boot binary (usually 1ST_READ.BIN)
- Hex patch the boot binary and replace: E4745FA0 with: EC745FA0
In Linux I usually just do: sed -i 's/\xE4\x74\x5F\xA0/\xEC\x74\x5F\xA0/g' 1ST_READ.BIN
- Make sure to append the bootloader (IP.BIN) when building with mkisofs and use LBA 0
mkisofs -C 0,0 -V Gens4All -G IP.BIN -rock -l -o gens4all.iso gens4all_directory

Then the resulting iso file should boot from SD but also from IDE :)
Could you try this and test it on this.. for us ?
Sure :)
I'll try to build it tomorrow, but I'll need to know if the boot executable is already scrambled or not.

I'm actually writing a script which takes care of building SD images from cdi files.
Only things left are:
- finding a way to detect whether a Dreamcast executable is katana, wince, or homebrew
- in case homebrew, finding out wether it's already scrambled (if it's a selbooting cdi, then it probably is, but I'm adding the possibility to build from plain files as well, in this case I need to know)

Re: Gens4all RC4 Loaded Iso for SD

Posted: Wed Apr 13, 2022 12:29 pm
by Ian Micheal
MastaG wrote:
Ian Micheal wrote:
MastaG wrote:So I gave it a shot, but your releases don't seem to be running from IDE drive using loader 0.6.x.
Gens4All starts but freezes after pressing start on the title screen.
NesterDC, Snes4All and GNUBoyLoaded boot into a black screen.

For compatibility with IDE (HDD/CF) you'll need to:
- Unscramble the boot binary (usually 1ST_READ.BIN)
- Hex patch the boot binary and replace: E4745FA0 with: EC745FA0
In Linux I usually just do: sed -i 's/\xE4\x74\x5F\xA0/\xEC\x74\x5F\xA0/g' 1ST_READ.BIN
- Make sure to append the bootloader (IP.BIN) when building with mkisofs and use LBA 0
mkisofs -C 0,0 -V Gens4All -G IP.BIN -rock -l -o gens4all.iso gens4all_directory

Then the resulting iso file should boot from SD but also from IDE :)
Could you try this and test it on this.. for us ?
Sure :)
I'll try to build it tomorrow, but I'll need to know if the boot executable is already scrambled or not.

I'm actually writing a script which takes care of building SD images from cdi files.
Only things left are:
- finding a way to detect whether a Dreamcast executable is katana, wince, or homebrew
- in case homebrew, finding out wether it's already scrambled (if it's a selbooting cdi, then it probably is, but I'm adding the possibility to build from plain files as well, in this case I need to know)
It's unscrambled
has to be scrambled does not boot on serial port ether..

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 4:11 am
by MastaG
Alright I've created an iso file for testing:
https://mega.nz/file/D1ViiSqI#cM9C5pJD1 ... ilExoPCzWI

Steps I took:

Code: Select all

# create empty directory
mkdir gens
cd gens
# unpack Slaminger's iso
7z x /home/mastag/Downloads/gens4all_v4_3.iso
# Patch 1ST_READ.BIN
sed -i 's/\xE4\x74\x5F\xA0/\xEC\x74\x5F\xA0/g' 1ST_READ.BIN
# Go one directory up and create the iso file
cd ..
mkisofs -C 0,0 -G gens/IP.BIN -rock -l -o gens4all_v4_3.iso gens
# Compress
zip gens4all_v4_3.zip gens4all_v4_3.iso
So assuming that the 1ST_READ.BIN was already unscrambled and the IP.BIN is meant for homebrew (no katana stuff added by binhack), it should work.

But I can only test it tomorrow.

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 2:03 pm
by MoeFoh
Ian Micheal wrote:I will have to try it but so far any hex patched bin for IDE has failed to load on sd serial port for me.. Good thing is serial port you can go over the 2gb limit of the gdemu have up to 32gb iso.. cant do that on gdemu ..
Didn't I read somewhere (megavolt85?), SQ's won't work with SD Serial?

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 2:13 pm
by Ian Micheal
MoeFoh wrote:
Ian Micheal wrote:I will have to try it but so far any hex patched bin for IDE has failed to load on sd serial port for me.. Good thing is serial port you can go over the 2gb limit of the gdemu have up to 32gb iso.. cant do that on gdemu ..
Didn't I read somewhere (megavolt85), SQ's won't work SD Serial?
IM using the same on Snes4all build i did and it's working on serial port.. Same way TapamN is where i got the example.. This is working fine i tested it on serial the other day.. can have 4gb iso ..

So every rom every made far better then gdemu or such limit

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 2:24 pm
by Ian Micheal
MoeFoh wrote:
Ian Micheal wrote:I will have to try it but so far any hex patched bin for IDE has failed to load on sd serial port for me.. Good thing is serial port you can go over the 2gb limit of the gdemu have up to 32gb iso.. cant do that on gdemu ..
Didn't I read somewhere (megavolt85), SQ's won't work with SD Serial?
He is talking about MMU..

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 2:26 pm
by MoeFoh
Ian Micheal wrote:
MoeFoh wrote:
Ian Micheal wrote:I will have to try it but so far any hex patched bin for IDE has failed to load on sd serial port for me.. Good thing is serial port you can go over the 2gb limit of the gdemu have up to 32gb iso.. cant do that on gdemu ..
Didn't I read somewhere (megavolt85), SQ's won't work SD Serial?
IM using the same on Snes4all build i did and it's working on serial port.. Same way TapamN is where i got the example.. This is working fine i tested it on serial the other day.. can have 4gb iso ..

So every rom every made far better then gdemu or such limit
Another bonus point for the wrongly bad-mouthed SD Serial Mod.

Re: Gens4all RC4 Loaded Iso for SD

Posted: Thu Apr 14, 2022 3:21 pm
by megavolt85
MoeFoh wrote:Didn't I read somewhere (megavolt85), SQ's won't work with SD Serial?
I said that when the MMU is enabled, you cannot read data in RAM, it doesn’t matter if you just read data or using SQ, the only way to access is DMA

Re: Gens4all RC4 Loaded Iso for SD

Posted: Fri Apr 15, 2022 4:22 am
by MastaG
MastaG wrote:Alright I've created an iso file for testing:
https://mega.nz/file/D1ViiSqI#cM9C5pJD1 ... ilExoPCzWI

Steps I took:

Code: Select all

# create empty directory
mkdir gens
cd gens
# unpack Slaminger's iso
7z x /home/mastag/Downloads/gens4all_v4_3.iso
# Patch 1ST_READ.BIN
sed -i 's/\xE4\x74\x5F\xA0/\xEC\x74\x5F\xA0/g' 1ST_READ.BIN
# Go one directory up and create the iso file
cd ..
mkisofs -C 0,0 -G gens/IP.BIN -rock -l -o gens4all_v4_3.iso gens
# Compress
zip gens4all_v4_3.zip gens4all_v4_3.iso
So assuming that the 1ST_READ.BIN was already unscrambled and the IP.BIN is meant for homebrew (no katana stuff added by binhack), it should work.

But I can only test it tomorrow.
It works now :)
It's only missing out on Sonic 3 + Knuckles :P (naughty naughty!)
Amazing how well it runs everything, even Sonic 3D is silky smooth.
This build seems to be a lot more refined as it also asks me to save to VMU when exiting a game, very nice!

I guess for IDE HDD/CF, all homebrew needs to be patched (and unscrambled in case it's being extracted from a selfboot image).
I hope a future update of DreamShell will detect homebew and auto-patch it upon loading :)

I'll finish my script and release it here for easy converting cdi images to iso for SD/IDE.
I'll make sure it will also work when pointing to a directory containing plain files.
Just need to add some logic to detect homebrew vs katana and scrambled vs unscrambled.
Then somebody can take care of converting everything :)