Gens4all RC4 Loaded Iso for SD

Place for discussing homebrew games, development, new releases and emulation.

Moderators: pcwzrd13, deluxux, VasiliyRS

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: Gens4all RC4 Loaded Iso for SD

Post#11 » Wed Apr 13, 2022 10:25 am

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 ?

MastaG
Quad Damage
Posts: 204

Re: Gens4all RC4 Loaded Iso for SD

Post#12 » Wed Apr 13, 2022 12:05 pm

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)

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: Gens4all RC4 Loaded Iso for SD

Post#13 » Wed Apr 13, 2022 12:29 pm

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..

MastaG
Quad Damage
Posts: 204

Re: Gens4all RC4 Loaded Iso for SD

Post#14 » Thu Apr 14, 2022 4:11 am

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.

User avatar
MoeFoh
Uber
Posts: 1045

Re: Gens4all RC4 Loaded Iso for SD

Post#15 » Thu Apr 14, 2022 2:03 pm

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?
Last edited by MoeFoh on Sat Apr 16, 2022 9:26 am, edited 2 times in total.
“The problem with the world is that the intelligent people are full of doubts, while the stupid ones are full of confidence.”
- Charles Bukowski

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: Gens4all RC4 Loaded Iso for SD

Post#16 » Thu Apr 14, 2022 2:13 pm

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

User avatar
Ian Micheal
Developer
Posts: 6005
Contact:

Re: Gens4all RC4 Loaded Iso for SD

Post#17 » Thu Apr 14, 2022 2:24 pm

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..

User avatar
MoeFoh
Uber
Posts: 1045

Re: Gens4all RC4 Loaded Iso for SD

Post#18 » Thu Apr 14, 2022 2:26 pm

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.
“The problem with the world is that the intelligent people are full of doubts, while the stupid ones are full of confidence.”
- Charles Bukowski

User avatar
megavolt85
Developer
Posts: 1828

Re: Gens4all RC4 Loaded Iso for SD

Post#19 » Thu Apr 14, 2022 3:21 pm

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

MastaG
Quad Damage
Posts: 204

Re: Gens4all RC4 Loaded Iso for SD

Post#20 » Fri Apr 15, 2022 4:22 am

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 :)

  • Similar Topics
    Replies
    Views
    Last post

Return to “New Releases/Homebrew/Emulation”

Who is online

Users browsing this forum: No registered users