All in one documents updated 20/12/2012 working with extinfo.dat and infolib.dat fixing errcode=-4 Warning not for the faint of heart. http://uploadmirrors.com/download/01WJG48J/How_to_fix_errcode_-4_for_DSTT_YSMenuR4.rar Spoiler: Part 1: TUTORIAL How to fix errcode=-4 for DSTT / YSMenu - The Real way My Documents: Download them hear http://www.mirrorcreator.com/files/BN6SSDHP/ Tools required All Tools needed - You can Download from hear: http://www.mirrorcreator.com/files/EUCLYRKD/ CrystalTile2: http://www.mediafire.com/?ku6uoby9dq693u6 How to use TTdT.exe - TUTORIAL]Amateur's Guide : How To Use TTDT.exe and R4CCE.exe http://forum.romulation.net/index.php?topic=56257.0 (Note) GameID for extinfo.dat and infolib.dat needs to be the encrypted Game ID, See eNDryptS Advanced in the topic ^ , Are the r4patch.dat LIB Generator will give you the true GameCode and ID in the LIB folder. (Note) If ROM loads itself then extinfo.dat is not required Finding the extinfo.dat first offset First type data to search for 38 40 2D E9 00 0C A0 E1 21 24 80 E1 Extinfo.dat Patch data to apply 00 0C A0 E1 21 04 80 E1 00 10 A0 E3 1. Do a RAM search / Tick all shown on image 2. Reverse DATA to search in RAM: E1802421 - Need to search lest offset used in RAM <- But need's to start from 38 in RAM 3. Type the Address in view memory and bubble check for 38 40 2D E9 00 0C A0 E1 21 24 80 E1 - start from 38 <- from here will be your first required offset 4. And the first offset to use in extinfo.dat is for this game 0x020353DC with patched data 00 0C A0 E1 21 04 80 E1 00 10 A0 E3 (Note) For this set of data we + 0C in infolib.dat for the first offset used for extinfo.dat in reverse (Note) If don't exists then use this Second type data to search for F0 B4 0A 0A Extinfo.dat Patch data to apply 00 06 09 0A 08 43 00 21 1. Do a RAM search / Tick all shown on image 2. Reverse DATA to search in RAM: 0A 0A B4 F0 - Need to search lest offset <- But need's to start from F0 B4 0A 0A in RAM 3. Type the Address in view memory and bubble check form F0 B4 0A 0A 00 06 16 1C - start from F0 4. And the first offset to use in extinfo.dat for this game is 0x020B8434 with patched data 00 06 09 0A 08 43 00 21 (Note) For this set of data we + 09 in infolib.dat for the first offset used for extinfo.dat in reverse (Also Note) The first offset to use in extinfo.dat is different for each ROM in RAM memory Offset Layout for extinfo.dat (Note) infolib.dat data has to be 100% correct in the first place - are it will cause problems with extinfo.dat 0xXXXXXXX <- First offset to locate from a both ^ extinfo.dat 0xXXXXXXXX - Locate your offset to use with DeSmuME as the first offset, Now this is useful part of the infolib.dat offset also 0x0233a1a8 - fixes minor AP leave as is 04 4A BA 42 02 D1 80 22 92 00 BF 18 01 A2 17 60 4F 60 0D E1 FF FF FF FF FF FF FF FF 0x0233a3d4 - fixes minor AP leave as is 0A 60 E7 E6 0x02339fa8 - fixes minor AP leave as is 94 E8 3F 02 0x0233a2d8 - fixes minor AP leave as is 85 42 3A E0 0x0233a228 - fixes minor AP leave as is B8 20 00 23 88 60 CB 60 01 4A 01 3B 13 60 01 E0 B8 E8 3F 02 0x023806b8 - Could change address explained about ^ - to 0x02380668 <- are may not be required, See extinfo.dat second needed offset idea below 00 00 A0 E1 0xc2339e40 - fixes minor AP leave as is F8 B5 04 1C 0x02339e50 - fixes minor AP leave as is 09 E0 55 4F 0x02339e70 - fixes minor AP leave as is 4B 48 53 21 0x02339ed0 - fixes minor AP leave as is 43 1C 03 E0 0x0233a50c - fixes minor AP leave as is 03 E0 00 21 0xd0000000 - Stop address AP Game Fixes after 0xd0000000, If needed. ------------------------------------------------------- Working out 100% of infolib.dat data for games with errcode=-4 and errcode=-6 1. First you will need the r4patch.dat offset's generator that you downloaded, are ttpatch.dat offsets generator 2. In r4patch.dat generator patch offset 0001D33C 07 -> 02 and save the r4patch.dat Generator 3. Place it into the TTMenu folder of your R4 card 4. Make LIB folder in caps in the root of your micro SD chip , (Note) also a good idea to make a new infolib.dat and place it into the TTMenu folder using TTdT.exe 5. Turn off DMA and Reset and run your game – once bypassed errorcodes – Turn of DS , Plug micro SD into the reader and look in the LIB folder they will be a generated file 6. You can open this file using TTdT.exe in infolib.dat mode 7. The true remain parts for infolib.dat is on bypassing error code, C4 77 00 00, 30 09 00 00 , EC FB 00 00 , We Patch 01 00 00 00 0C 04 00 00 with FFs , FF FF FF FF FF FF FF FF 8. Now to get the rest of arm7 offsets we do a search for EC FB 00 00 in the full infolib.dat file open the full infolib.dat with a Hex-editor and find EC FB 00 00 9. The rest of Arm7 offsets I have highlighted in blue this is the offsets we need from EC FB 00 00 10. So the pick and mix of the offsets is in this image 11. Now how to get the main loading offsets for the part highlighted in blue ?, Hear is how to. 12. The first offset used for extinfo.dat is how, In reverse mode + 0C on the first offset!, Are + 09 for certian games 13. You see the first offset is 02 01 0B 10, we don’t count 02 in infolib.dat offsets, we reverse this offset 10 0B 01 02 , then we use 10 and + 0C in hex calculator = 1C 14. This make the loading offset to be 1C 0B 01 00 <- not 02 as shown in this image! (Note) With TTdT.exe just save the file as is, "Do Not" save as are it may corrupt the file 15. And congratulations this is how it’s done! (Note) extinfo.dat second needed offset idea 0x023806b8 04 19 00 EB 04 10 A0 E1 0x02380778 91 0D 00 EB 04 10 A0 E1 0x02380668 50 00 00 EB 00 40 A0 E1 Correct Address 4 bytes befour 04 10 A0 E1 or 00 40 A0 E1 i found these differnt codes in retros files 0x02380614 00 00 A0 E1 RAM = CE0E00EB ROM 5555 0x02380664 00 00 A0 E1 RAM = 4E0000EB ROM 5185 0x02380694 00 00 A0 E1 RAM = 500000EB ROM 4799 0x02380710 00 00 A0 E1 RAM = 981900EB ROM 4763 0x02380768 00 00 A0 E1 RAM = 2B1B00EB ROM 5577 0x02380778 00 00 A0 E1 RAM = 8F0D00EB ROM 5265 Spoiler: Part 2: Example infolib match from uncompressed ARM9 First how to dump uncompressed ARM9 using CrystalTile2, From NDS ROM Download CrystalTile2 from hear http://loda.jp/dsm/?id=473 1. Run CT2, File, and Open, locate your ROM and Open it! 2. Go to Tools , NDS File System – open if FSI.CT/arm9.bin has a LZ on it then ARM9 is compressed , Right click on it and Extract(U), Save ARM9 to desktop, then you ARM9 will be uncompressed Example 5423 - Ghost Trick - Phantom Detective (EUR), Dump ARM9 though CT2 uncompressed TTdT.exe opened infolib.dat a match with ARM9 uncompressed Compare data ? <- a match for most games with errcode=-5 the second byte is always slightly changed – second within the byte is the same In the blue where ROM is the text-string area to find the location of where the offset is around about, are where ROM is we search for Not all games are a spot on match but very close indead Take FIFA11 You will see the second byte is slight different in infolib 29 ARM9 uncompressed is 69 We do this by 30 69 0E – 4000 = 30 29 0E , (Note) 02 is not counted in infolib.dat just 00 That’s the only diffrents Spoiler: Part 3: Anti Piracy Fixing Latest class decoding breaking search Such code is basic no brain can find out! We also use a ROM to explain, the ROM is 5596-Sports Collection (e) (En,Fr,De,It). 16 Opens the binary editor ROM File, find data: 37 B4 AA E0 Modify the value as follows: B4 → B3 E0 → 36 This is to modify the good result. Next, continue to search for data 6A E1 AA E0 Modify the value as follows: E1 → E0 E0 → 36 Renderings: In this way, we'll give that ROM To modify the good! The next step is testing, testing done after patches sth Of course, but also to modify the code to write out: 000F9E4E:B4 → B3 000F9E50:E0 → 36 000F9EED:E1 → E0 000F9EEF:E0 → 36 ROM to RAM AP fixing ROM AA E0 A2 -> A9 39 A2 BF AA E0 -> BE AA 36 RAM 1C 00 9F E5 00 10 90 E5 18 20 9F E5 02 00 51 E1 14 10 9F 05 08 10 80 05 10 10 9F 05 B4 10 80 05 1E FF 2F E1 XX XX XX 02 F0 95 5F E1 56 A7 A9 39 3E BE AA 36 Look out for F0 95 5F E1 in RAM memory as reverse search E1 5F 95 F0 XX XX XX 02 is the offset is at 02 XX XX XX in RAM view memory --------------------- ROM 8F AA E0 -> 8E AA 36 45 AA E0 -> 44 AA 36 1A AA E0 -> 19 AA 36 9C AA E0 -> 9B AA 36 RAM 2C 00 9F E5 00 10 90 E5 28 20 9F E5 02 00 51 E1 24 10 9F 05 08 10 80 05 20 10 9F 05 A8 10 80 05 1C 10 9F 05 48 11 80 05 18 10 9F 05 E8 11 80 05 1E FF 2F E1 XX XX XX 02 D3 4E 5F E1 FD 8E AA 36 15 44 AA 36 B8 19 AA 36 60 9B AA 36 Look out for D3 4E 5F E1 in RAM memory as reverse search E1 5F 4E D3 XX XX XX 02 is the offset is at 02 XX XX XX in RAM view memory ---------------------- ROM B4 AA E0 -> B3 AA 36 E1 AA E0 -> E0 AA 36 RAM 24 00 9F E5 00 10 90 E5 20 20 9F E5 02 00 51 E1 1C 10 9F 05 08 10 80 05 48 11 80 05 14 10 9F 05 A8 10 80 05 E8 11 80 05 1E FF 2F E1 XX XX XX 02 4F 03 5F E1 37 B3 AA 36 6A E0 AA 36 Look out for 4F 03 5F E1 in RAM memory as reverse search E1 5F 03 4F XX XX XX 02 is the offset it's at 02 XX XX XX in RAM memory AP fixing images Spoiler: Part 4: Infolib.dat Matching (Note) At 0x02380000 pause DeSmuME when data is shown - sometimes you have to be very fast. 0x0238XXXX<- ARM7 Offset DeSmuME, Search for this data in RAM search Equal to, 4 bytes , Hexadecimal Specific Value reverse data/hex worked out First set of ?? ?? ?? <- extinfo.dat first offset reverse + 02 is counted as 00 Second set of ?? ?? ?? <- Uncompressed ARM9 search for ROM in text-straing area find it underneath the first set of FF FF FF FF ------------------------------------------------- Pause Game very quickly on startup Games with errcode=-5 9CEE = Reverse search data E59FC010 @ offset 0x0238EE9C Code: 00 00 00 00 00 00 00 00 9C EE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F4 EE 00 00 18 F0 00 00 60 EF 00 00 D0 F0 00 00 00 00 00 00 58 F1 00 00 90 F2 00 00 84 F3 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF 4CEE = Reverse search data E59FC010 @ offset 0x0238EE4C Then infolib is Code: 00 00 00 00 00 00 00 00 4C EE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A4 EE 00 00 C8 EF 00 00 10 EF 00 00 80 F0 00 00 00 00 00 00 08 F1 00 00 40 F2 00 00 34 F3 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF F0 09 00 00 EC 13 01 00 FF FF FF FF FF FF FF FF 59BD = Reverse search data E58B8008 @ offset 0x0238BD58 + 1 = 59 Then infolib is Code: 00 00 00 00 00 00 00 00 59 BD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 91 BD 00 00 55 BE 00 00 D5 BD 00 00 D5 BE 00 00 00 00 00 00 31 BF 00 00 F1 BF 00 00 00 00 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF F0 09 00 00 00 00 00 00 FF FF FF FF FF FF FF FF E8ED = Reverse Search data E59FC010 @ offset 0x0238EDE8 Then infolib is Code: 00 00 00 00 00 00 00 00 E8 ED 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 EE 00 00 64 EF 00 00 AC EE 00 00 1C F0 00 00 00 00 00 00 A4 F0 00 00 DC F1 00 00 D0 F2 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF F0 09 00 00 D4 12 01 00 FF FF FF FF FF FF FF FF ------------------------------------------------- Pause Game very quickly on startup Games with errrcode=-4 40E3 = Reverse search data E35200FF @ offset 0x0238E340 Then infolib is Code: 00 00 00 00 00 00 00 00 40 E3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 98 E3 00 00 BC E4 00 00 04 E4 00 00 74 E5 00 00 00 00 00 00 FC E5 00 00 34 E7 00 00 28 E8 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 E0 FB 00 00 FF FF FF FF FF FF FF FF 44E3 = Reverse search data E35200FF @ offset 0x0238E344 Then infolib is Code: 00 00 00 00 00 00 00 00 44 E3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9C E3 00 00 C0 E4 00 00 08 E4 00 00 78 E5 00 00 00 00 00 00 00 E6 00 00 38 E7 00 00 2C E8 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 88 FB 00 00 FF FF FF FF FF FF FF FF 48EB = Reverse search data E1A02004 @ offset 0x0238EB48 Then infolib is Code: 00 00 00 00 00 00 00 00 48 EB 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A0 EB 00 00 C4 EC 00 00 0C EC 00 00 7C ED 00 00 00 00 00 00 0C EE 00 00 44 EF 00 00 38 F0 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 D8 03 01 00 FF FF FF FF FF FF FF FF 39C0 = Reverse search data F0001B64 @ offset 0X0238C038 + 1 = 39 Then infolib is Code: 00 00 00 00 00 00 00 00 39 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 71 C0 00 00 35 C1 00 00 B5 C0 00 00 B5 C1 00 00 00 00 00 00 11 C2 00 00 D1 C2 00 00 00 00 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 E4 D2 00 00 FF FF FF FF FF FF FF FF 3CE3 = Reverse search data E35200FF @ offset 0x0238E33C Then infolib is Code: 00 00 00 00 00 00 00 00 3C E3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 E3 00 00 B8 E4 00 00 00 E4 00 00 70 E5 00 00 00 00 00 00 F8 E5 00 00 30 E7 00 00 24 E8 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 D8 FA 00 00 FF FF FF FF FF FF FF FF 3CEC = Reverse search data E1A02004 @ offset 0X0238EC3C Then infolib is Code: 00 00 00 00 00 00 00 00 3C EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 EC 00 00 B8 ED 00 00 00 ED 00 00 70 EE 00 00 00 00 00 00 F4 EE 00 00 2C F0 00 00 20 F1 00 00 ?? ?? ?? 00 ?? ?? ?? 00 ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 0C 0F 01 00 FF FF FF FF FF FF FF FF 88EC = Reverse search data E1A02004 @ offset 0x0238EC88 Then infolib is Code: 00 00 00 00 00 00 00 00 88 EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 EC 00 00 04 EE 00 00 4C ED 00 00 BC EE 00 00 00 00 00 00 44 EF 00 00 7C F0 00 00 70 F1 00 00 ?? ?? ?? 00 FF FF FF FF ?? ?? ?? 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 58 10 01 00 FF FF FF FF FF FF FF FF 3CEC = Reverse search data E1A02004 @ offset 0X0238EC3C Then infolib is Code: 00 00 00 00 00 00 00 00 3C EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 EC 00 00 B8 ED 00 00 00 ED 00 00 70 EE 00 00 00 00 00 00 F4 EE 00 00 2C F0 00 00 20 F1 00 00 XX XX XX 00 FF FF FF FF XX XX XX 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 0C 0F 01 00 FF FF FF FF FF FF FF FF 3DC0 = Reverse search data F0001B64 @ offset 0x0238C03C + 1 Then infolib is Code: 00 00 00 00 00 00 00 00 3D C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 C0 00 00 39 C1 00 00 B9 C0 00 00 B9 C1 00 00 00 00 00 00 15 C2 00 00 D5 C2 00 00 00 00 00 00 XX XX XX 00 FF FF FF FF XX XX XX 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 84 D2 00 00 FF FF FF FF FF FF FF FF 90 EC = Reverse search data E1A02004 @ offset 0238EC90 Then infolib is Code: 00 00 00 00 00 00 00 00 90 EC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E8 EC 00 00 0C EE 00 00 54 ED 00 00 C4 EE 00 00 00 00 00 00 4C EF 00 00 84 F0 00 00 78 F1 00 00 XX XX XX 00 FF FF FF FF XX XX XX 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 AC 12 01 00 FF FF FF FF FF FF FF FF A0 C8 = Reverse search data E5920000 @ offset 0238C8A0 (NOTE) First offset can cause white screens, so use seciond offset Then infolib is Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A0 C8 00 00 C4 C9 00 00 0C C9 00 00 7C CA 00 00 00 00 00 00 04 CB 00 00 XX XX XX 00 30 CD 00 00 XX XX XX 00 FF FF FF FF 64 EE 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 30 09 00 00 74 E6 00 00 FF FF FF FF FF FF FF FF Spoiler: Part 5: Entry Address Indeed its 00 26 00 02 or 00 66 00 02 , But turn them around and you will get this: 02002600 ndsgame arm entry adres 02000800 with 1e00 = 02002600 02006600 dsi game arm entry adres 02004800 with 1e00 = 02006600 (games that have id VXXX , or dsi ) some strange ones are 10 66 00 02 and 40 26 00 02 but both JAP but 0000B177 is the best shot to find the 2 offset that are needed then the other ofset is 00004EA4: 1E FF 2F E1 - 9B FE FF EA eu/us 000049F8: 1E FF 2F E1 - C6 FE FF EA eu 000049F8: 1E FF 2F E1 - C6 FE FF EA jap 000049F8: 1E FF 2F E1 - D6 FE FF EA jap most dsi games will begin with the letter Vxxx also found out why 10 26 00 20 is the fix is then also at an adres that starts at 00004510 in rom 40 26 00 02 start at 00004540 in rom 00 66 00 02 start at 00004500 in rom (DSI) so that has only to do with the startadres when you put it in rom Spoiler: Part 6: Infolib.dat idea and Grid Part 7: The End Happy learning Spoiler: Part 8: How to identify if a Game Has AP the easy way CrystalTile2: http://www.mediafire.com/?ku6uoby9dq693u6 1. We use CrystalTile2 - If the Game shows this then they is no known AP in the ROM 2. If the game shows it has a FSI.CT/overlay9_xxxx.bin layer's then the Game is most likely to have AP, (Note) xxxx is numbers <, See a bove topic for AP fixing- the RAM Adderss can tell you where the the AP is in RAM, Normaly the last FSI.CT/overlay9_xxxx.bin should be where are close to the AP that needs fixing, If not close then check each FSI.CT/overlay9_xxxx.bin untill you find the AP match from ROM Address to RAM Address Spoiler: Part 9: How to locate the infolib offset in Red Open the ROM using CT2 uncompressed the ARM9 - open it with hex-editor Search for data ARM9 uncompressed in Blue -> 01 00 A1 B8 FC FF FF BA 1E FF 2F E1 10 40 2D E9 Start from 10 40 2D E9 then use the offset in arm9 in RED in reverse for infolib.dat offset (Note) Check DeSmuME memory if the same data in visible then use for infolib.dat , If don't exists then defalt the offset in RED for infolib.dat with FF FF FF FF Also Note in RAM we use x02 and ROM 0x00 Understanding infolib.dat better Microsoft Document http://www.mediafire.com/?bph1f7dxog94d6p
Re: [TUTORIAL] How to fix Games with extinfo.dat and infolib.dat for DSTT / YSMenu Wow...this tutorial sure is the most advanced. No one will ever beat this. Glad you re-up them. Anyway, if you noticed, all my images in all of my topics and post been temporarily locked until 1st of Sept by the image host. I had accidentally exceeded the max allocation in photobucket. They'll restore it automatically in 3 days when I get another 10Gb space. Anyway, back on topic. Is the above method shown based on a single game rom, or more than one? Would be easier if its based on one single game fixing process, that way it'll make it easier to try replicating the steps and see if I did it correctly.
Re: [TUTORIAL] How to fix Games with extinfo.dat and infolib.dat for DSTT / YSMenu From reading your tutorial I can understand it very well. There are spelling mistakes, but the rest does not need any changings. Adres --> Address straing --> string seciond --> second errrcode -->error code hear --> here
Re: [TUTORIAL] How to fix errcode=-4 for DSTT / YSMenu - The real way D.I.Y! Re-edited first post some slight mistakes corrected.
Re: [TUTORIAL] How to fix errcode=-4 for DSTT / YSMenu - The real way D.I.Y! I advise maybe spoilers? Otherwise the post is sooo long :O
Re: [TUTORIAL] How to fix errcode=-4 for DSTT / YSMenu - The Real way. A good tip is, read the whole tutorial agian cuz you write how you would say it and some parts are mentioned here. I am not insluting you but I know not many people will enjoy reading a text where many mistakes are in
Re: [TUTORIAL] How to fix errcode=-4 for DSTT / YSMenu R4's . First post updated, As download documents only. Documents updated also.
Re: [TUTORIAL] How to fix errcode=-4 for DSTT / YSMenu R4's . Updated: 01/12/2012 First post documents.