(Help) How to add Icons to HDLoader/KERMIT Games on PS2 HDD-OSD

I thought that it was 4MB... since it's 0x2000 sectors large (0x2000-8, where the reserved area for the APA partition header is 8 sectors long.. even though the header is only 2 sectors long).

HDL has the game data stored at sector 0x800, after the area reserved for the APA header.
Upps, double post!
First of all, hello and a big, big respect for your work, silverbull!


To complete the said it's possible to use animated icons, too.
Here, the crazy taxi icon is a good example.

And, i think leonard's stripped opl is a better way to start game images from hdd.
Sorry of.
:friendly_wink:

Possible. For me it's too long ago and i currently have not the time to refresh my infos...



Rgds.
You are right, I mixed that up. Its been too long since I last worked on this stuff...


You're welcome :smile-new:.

The icon format is actually identical between memory cards and HDD partitions, even including the limit on the number of triangles, depending on the number of keyframes in the icon. The only thing that differs is the icon.sys file, which uses a text format for the HDD and a binary one for MC saves. I have no idea why they did this, though.

No problem, that's what alternatives are for. And you are right, storing the CDVD emulator on the partition itself is the better method from a technical point of view as well; not to speak of OPL's overall better compatibility. But nonetheless, I'm happy if ODEM can be of any use, at least to someone, even if its just debugging odd game freezes on a TOOL (which was my main motivation when reversing HDL and coding a TOOL-compatible CDVD emulator :loyal:).
I would really appreciate if you were to resume work on ODEM or at least fork it out from KERMIT so it can be used standalone... :D

While it suffers from compatibility issues it's like a brute gem which need to be cut and polished. Too bad the artisan is busy with another projects. -_-
I love using it, even though I use it on only the games I buy. That why I'm tying to add the MC Save icon to it, I was doing so much of it wrong and now thanks to all the help I may get it working right.

also so, 0x49, 0x20, 0x41, 0x4d, 0x20, to see it I'm doing it right. All that in hex is 49, 20, 41, 4D, 20 is that right? I know you all helped me a lot but... can someone give me a example on updating the length field (I don't use a hex editor to much and I'm not sure on how to look for this.)
Is there a problem with the integration into Kermit? ODEM also needs some kind of resident EE module, and as Kermit's DBGCORE already does most of what's needed, I thought it would be a good idea to couple the two :loyal:. Forking ODEM out of Kermit would require duplicating parts of DBGCORE... and it would result in a compatibility nightmare if you ever wanted to use both programs at the same time.

Thanks. I would really like to spend some more time extending it (I still want to implement that in-game disk swap), but unfortunately there are other things to do with much higher priority.

Yes, that is correct.

The notation "0x49" actually comes from C (as in: the programming language), and means "interpret the sequence of characters following the '0x' as a hexadecimal number". That is, if you want to enter the hexadecimal number 49 in C, you write "0x49". The prefix "0x" is needed to distinguish such numbers from decimal ones, because just the character sequence itself is ambiguous: suppose you enter "49". How can the compiler know what you wanted? Is it 4*10+9 (decimal 49), or 4*16+9 ("0x49", hexadecimal 49, decimal 73)? Answer for C: if something starts with "0x", it is hexadecimal. If it starts with 1-9, it is decimal. If it starts with 0, it is octal (so "049" is not the same as "49", and even produces an error, because 9 is not a valid octal digit).

Now for the next issue: numbers that do not fit into a single byte. With two hex digits (that is, one byte), you can encode decimal values of up to 255 (=15*16+15, or "0xFF"). If your number is greater than that, you need more than one byte, which brings up the question in which order to store them in memory. Suppose your icon file has 15488 bytes (this is a completely arbitrary number, just to prove the point). This is 0x3C80, so you need two bytes: 0x3C is the "upper" one, 0x80 the "lower" one. For the length field in the partition attribute header, you store these bytes in reverse order: "80 3C 00 00" would appear in the hex editor (even higher bytes filled up with zeros). This order is called "little endian", and is used by the MIPS processors (both EE+IOP) of the PS2, as well as all current PC processors (x86, x64).
Ehre, wem Ehre gebührt.
:friendly_wink:


Thanks for this info.
So the maximum number of the triangles limit includes the animation, too.
I never recognize that. Impressive!


Hi!

0x4d or 4d is the same, a hex double byte.

For your icon editing thing you have to understand hex and the 4 double hex bytes value.
And with that it should be no problem to edit the values and to get a running partition icon.
All you need is a science calculator to get the correct hex values and the understanding how to use them.
All is in this thread.

Take a look at this:
[​IMG]


Feel free to ask any question.


Rgds.
I mast not be understanding this at all, I'm tring to find the hex values for the new icon but so far it not working out to good. I'm only getting the blue cube... I must be doing the valuse for the length wrong as I'm not getting how to get the correct hex values.

I attachments what I'm tring to edit as .txt (but are not .txt) named "PP.HDL.Gundam Battle Assault 3.txt" as you may know by it's name it's the ATA Name to the end of the 3D Icon and "New PP.HDL.GBA3 Icon.txt" is the 3D Save Icon for the game that I'm tring to add.
Yes, this is at first heavy to understand.

Do you have a working icon?
I mean a working partition data block to learn from?

If yes, try to extract the single blocks AND take a look at the hex file size.
You should notice equal values... -> Flipped double hex bytes.

Maybe anyone hand the needed pdf over or post the infos here...
I am too busy. Sorry of.



Rgds.
I just got it to work, thanks for all the help. (I was using the wrong hex value) It's funny how I got the right hex value, I open HexEdit and was making a new file and I looked down and see "Specified" Decimal: 1 bytes = Hex: 1. My icon was 64,724 bytes and thanks to the specified in HexEdit I got FCD4 and reverse it to D4FC, then I just add at to the length for the icon to "D4 FC 00 00" and worked.

Edit: I see how it all works now, thank you all.
Coool! :biggrin-new:
ATAD alteration a.k.a Corruption Point

Hi,

Mmmm, I started brute force attacking all my ATAD enabled KELFs in order to make a dictionary of all patterns and a patcher. Here's a first release :
ATADpatcher_0_00.zip

It's supposed to allow the use of an unofficial HDD with the following suff :
PlayStation BB Navigator Version 0.10, PSBBN, osdboot.elf (Unpacked ELF)
PlayStation BB Navigator Version 0.10, PSBBN, fsck.elf (KELF)
PlayStation BB Navigator Version 0.10, PSBBN, MBR (KELF)
PlayStation BB Navigator Version 0.10, HDDOSD, hosdsys.elf (KELF)
PlayStation BB Navigator Version 0.10, HDDOSD, fsck.elf (KELF)
PlayStation BB Navigator Version 0.10, HDDOSD, MBR (KELF)
PlayStation BB Navigator Version 0.10, OSD for PS2 Memory Card, osd110.elf & osd130.elf (KELFs)
PlayStation BB Navigator Version 0.20, PSBBN, osdboot.elf (Unpacked ELF)
PlayStation BB Navigator Version 0.20, PSBBN, fsck.elf (KELF)
PlayStation BB Navigator Version 0.20, PSBBN, MBR (KELF)
PlayStation BB Navigator Version 0.20, OSD for PS2 Memory Card, osd110.elf & osd130.elf (KELFs)
PlayStation BB Navigator Version 0.30, PSBBN, osdboot.elf (Unpacked ELF)
PlayStation BB Navigator Version 0.30, PSBBN, fsck.elf (KELF)
PlayStation BB Navigator Version 0.30, PSBBN, hdfill.elf (KELF)
PlayStation BB Navigator Version 0.30, PSBBN, MBR (KELF)
PlayStation BB Navigator Version 0.31, PSBBN, osdboot.elf (Unpacked ELF)
PlayStation BB Navigator Version 0.31, PSBBN, fsck.elf (KELF)
PlayStation BB Navigator Version 0.31, PSBBN, hdfill.elf (KELF)
PlayStation BB Navigator Version 0.31, PSBBN, MBR (KELF)
PlayStation BB Navigator Version 0.32, PSBBN, osdboot.elf (Unpacked ELF)
PlayStation BB Navigator Version 0.32, PSBBN, fsck.elf (KELF)
PlayStation BB Navigator Version 0.32, PSBBN, hdfill.elf (KELF)
PlayStation BB Navigator Version 0.32, PSBBN, MBR (KELF)
PlayStation BB Navigator Version 0.32, OSD for PS2 Memory Card, osd110.elf & osd130.elf (KELFs)
HDD Utility Disc Version 1.00 USA, HDDOSD, hosdsys.elf (KELF)
HDD Utility Disc Version 1.00 USA, HDDOSD, fsck.elf (KELF)
HDD Utility Disc Version 1.00 USA, HDDOSD, MBR (KELF)
HDD Utility Disc Version 1.00 JPN, HDDOSD, hosdsys.elf (KELF)
HDD Utility Disc Version 1.00 JPN, HDDOSD, fsck.elf (KELF)
HDD Utility Disc Version 1.00 JPN, HDDOSD, MBR (KELF)
HDD Utility Disc Version 1.00 JPN, OSD for PS2 Memory Card, osd110.elf & osd130.elf (KELFs)
HDD Utility Disc Version 1.10 USA, HDDOSD, hosdsys.elf (KELF)
HDD Utility Disc Version 1.10 USA, HDDOSD, fsck.elf (KELF)
HDD Utility Disc Version 1.10 USA, HDDOSD, MBR (KELF)

I couldn't test each patched KELF. Use with caution.
osdboot KELFs ATAD is packed twice. Is is not possible to alter the KELF packed data directly. It must be first decrypted, unpacked then patched.


Regarding the ENG/JPN patched HDD-OSD, it has been released within SUDC3 (Pastie #5553792 or Google search for "08E877AD") and labeled "Hacked Build B4".
The LBA48 patched HDD-OSD can be found on Pastie #5577891 (or Google search for "0A0748A8" to find the Pastie). Keep in mind that's riskware.
At the time I write this message, my server is down:mad-new:, so both SUDC3 and HDDOSD links might be temporarily down.
Hi and happy new year!


As always great work, thank you for this and for spreading.
:D


Greets.
ATADpatcher v0.01

ATADpatcher_0_01.zip

Added patches for :
PSX Update Disc Ver1.10, xosdmain.elf (KELF)
PSX Update Disc Ver1.20, xosdmain.elf (KELF)
PSX Update Disc Ver1.31, xosdmain.elf (KELF)
PSX Update Disc Ver2.11, xosdmain.elf (KELF)
PSX Update Disc Ver2.11, djboxmini.elf (KELF)
PP.SLPM-65197.KOEI.NOBUON, dnasload.elf (KELF)
PP.BLJA-00003, dnasload.elf (KELF)
PP.SLBB-00001, dnasldnk.elf (KELF)
Raw ATA Device Drivers (IRX/ELF/Any Data)

I couldn't nop the AtaSecIdentify jal of "PSX Update Disc Ver2.11, xosdmain.elf (KELF)". Altering more than 1 byte caused garbage in unpacked data, so the call points to another function. Not tested, may crash/hang/freeze... I'm not sure such ATAD patch is worth for a DESR anyway, and xosdmain.elf loads another obfuscated ATAD.IRX that the patcher can't patch.
Other xosdmain KELFs can be properly patched (the AtaSecIdentify jal will be completely NOPed).

I see no point in patching DNAS loaders, but thought some of you would like to have fun...

"Raw ATA Device Drivers (IRX/ELF/Any Data)" = ATAD.IRX from games, not packed nor crypted in any way.

If you have another ATAD enabled KELF and want me to patch it, please send me a PM.

You're welcome.

I'm a bit late but happy new year to you and yours too.
ATADpatcher_0.02.zip
Fixed incorrect patch data for "HDD Utility Disc Version 1.10 USA, HDDOSD, hosdsys.elf (KELF)" in the CodeFusion Wizard patch. Patterns described in the text file were OK.


By the way, conan14 found a way to emulate commercial game dumps with the POPS emu last week... It was apparently simplier than messing up with the rude ass virtual CD-ROM integrity checks, oh well...
What they did ? they did edit the elf to read /diss/disc0. So the elf first mounts /disc/disc0 then proceeds to check /diss/disc0 (which is the original 8MB bishi bashi image) ...

After checking the original ISO, the emulator reads the new ISO and boots it up. Now we need to study that header and see if it supports CD-DA and a few other things ...

I tested Tokimeki Memorial with it and besides SPU glitches which made the music not play correctly the game ran perfectly fine. ;)

Clever bunch, eh ? ;)
crash team racing (all versions including japanese) doesn't wok
crash bash freeze when entering the game
xploder 9000 doesn't work (v2 and v4)
gameshark doesn't work
Game Guru 9 works
Net Yaroze 83-in-1 works
Silent Hill works
Final Fantasy 9 works.
Pops Header:
f104542e0376.jpg
This is beginning of Header file (1Mb) combined by 10 bytes.
At offset 400h there is word SPOP and Bishi Bashi image size in sectors (doubled twice). All other bytes are ZERO.

For loading iso/bin images we need to change first 11 sectors of CD image to Japanese version or change POPS BIOS to our region iso BIOS (better use 4.5E and 4.5A bioses)...
The main reason why it is so difficult to test - it is veeeeeeery long copying from usb flash into HDD. Maybe someone can tell me if there fastest way?
Maybe it's best to use a OLD USA BIOS (SCPH-1001) without regional lock ?
I finally found the time to try it, with 峠MAX G (SLPS-02361) :
http://youtu.be/2u2vk1ll2SU?t=2m54s Full of glitches. Music (XA), SFX and menus are OK. The emulator has crashed when I pressed Select+Start+R1.
I'm gonna test a dump of Ridge Racer Type 4 (SCES-01706)...

Hmmm, I don't know why but the HDD-OSD is completely mute when launched from the MBR (hosdsys written to __mbr and executed by HDDLOAD).

Original thread: https://assemblergames.com/threads/help-how-to-add-icons-to-hdloader-kermit-games-on-ps2-hdd-osd.42308/