Announcement

Collapse
No announcement yet.

Sega Mega CD ISO Hacks & Editors

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • First off, when you used Gens Tracer, did you use the "hook_log_cd.txt" and the "hook_cd.txt"? Also, if you make an assembly trace log, make sure you look at both trace logs (trace.log and trace_cd.log) I've used Gens Tracer before with a couple different types of Sega CD RAM addresses and didn't have any problems.

    As far as Lee4's method, maybe you should try the game he uses in his example (I think it's Mortal Kombat) and follow along with that. That might help you understand how everything works. I've never tried Lee's method, so I can't help you much with that.

    I'm working on a Sega CD program that will let you enter any type of Sega CD RAM address (PRG RAM, Word RAM, etc), and it will search for possible ROM addresses that it can patch so you will have the cheats/codes in your game. I just tried it with one of the RAM addresses for Lethal Enforcers (P1 bullet) from the site, and it found a match on the first try. I should have it done it a week or two.
    Last edited by Tony H; 02-22-2022, 02:13:24 PM.
    The Code Hut: http://codehut.gshi.org/

    Comment


    • Great News!
      i will check "hook_log_cd.txt" and the "hook_cd.txt" and am waiting for your Sega CD program~

      Comment


      • Here's a screenshot of it searching for the RAM address for missiles (07FFD0) in The Adventures of Batman & Robin (Sega CD). It found 12 matches in the ROM that are subtracting from that address, 12 matches that are adding to that address, and one address moving a value of 3 to that address. I think there are 12 levels and each one has it's own programing (this is common with Sega CD games). Now that the program found this info, you can use it to patch the ROM so that you have infinite missiles in all 12 levels, make it so that missile pickups are worth more in all 12 levels (you can use the tool to adjust how many you want), and you can adjust how many missiles you start the game with.

        Remember that this is just a rough version, and I still have a lot of work left to do. There is a patch menu, and a dump menu that you can see by clicking on the tabs. You can choose between having it search for everything at once and show you the results, or you can have it step through each match one at a time. It shows you how many matches it found for each type of search it did, and it shows you if certain matches are 16 or 32 bit. You can also dump all of the ROM addresses to a text file, along with other info. This is useful if you want to save the info for later, or if you want to look at the addresses with a hex editor.

        Click image for larger version  Name:	SegaCDPatchTool.png Views:	0 Size:	52.7 KB ID:	217166
        Last edited by Tony H; 02-22-2022, 11:28:30 PM.
        The Code Hut: http://codehut.gshi.org/

        Comment


        • It looks so cool!
          Two questions:
          1. As i know, cue+bin, cue+iso+wave, ccd+img, different iso format has different offsets on binary data? In your tool, will it be compatible to all formats? or just support ccd+img?
          2. If i select "Find all matches at once", will it list all addresses in ROM/ISO?

          Comment


          • Originally posted by Markle666 View Post
            It looks so cool!
            Two questions:
            1. As i know, cue+bin, cue+iso+wave, ccd+img, different iso format has different offsets on binary data? In your tool, will it be compatible to all formats? or just support ccd+img?
            2. If i select "Find all matches at once", will it list all addresses in ROM/ISO?
            Question 1): To the best of my knowledge, there are 3 main types of Sega CD file extensions that have the actual game programming in them, bin, img, and iso. Out of those 3, bin and img have ROM offsets that are 0x10 higher than iso types. In other words, if you had two ROMs of the same game and one is iso and the other is img, and the address for infinite lives was at 0x4000 in the iso ROM, the address for infinite lives would be at 0x4010 in the img ROM. This happens because iso ROMs have a 0x10 byte string at the very beginning of the ROM that the other two don't have. The program uses a pattern search, so different offsets don't matter at all.

            The program checks to see if the file it is opening has the string 44495343 at the correct location in the ROM. 44495343 = DISC is ascii. The program knows if it's the correct type of file or not. If you open up any Sega CD file with a hex editor, you will see this as ascii text on the right side: SEGADISCSYSTEM. I just use the "DISC" part as a convenient way to check. Since the program will probably work on Sega Genesis (and maybe 32x) as well, I've included the option to open any kind of file you want, but it will give you a warning message if it's not the correct type of Sega CD file. In short, the program should work on any Sega CD file type.

            Question 2): I only have it so that it lists 10 ROM addresses. It will find every match in the ROM, but will only put the first 10 in the list. If you want to see all of them, you can select to view them one at a time, and it will show you each ROM address individually in a separate box, along with the value at that address (in both hex and decimal). Games like Sonic CD will have 73 different matches with many RAM addresses, for 73 different levels in the game, so I had to draw the line somewhere. I just added a new filtered searching feature today that helps to deal with games that have more than 10 matches. For a game like Sonic CD, you would find 73 matches, and patch 10 addresses into the ROM. Then use the filtered search and since it would no longer find the 10 addresses that were just patched, it would only find 63 matches. Keep patching 10 at a time until they're all patched. It searches and patches very quickly (in one to two seconds), so wouldn't take long at all. But Sonic CD is probably the worst as far as how many matches it has. Most games would have only one, or definitely way less than 73. You'll find that RPG type games usually only have one match, while games with levels will have more than one.
            Last edited by Tony H; 02-24-2022, 09:50:16 PM.
            The Code Hut: http://codehut.gshi.org/

            Comment


            • Qustion1: clearly understood ! we can ignore the difference.
              Qustoin2: Just a little confusing, as you mentioned methodology, if there is 73 matches, it sounds even withtout "filtering search", i still can patch 73 matches with following steps:
              1) normal searching: find 10 results
              2) patch the rom, then close the tool(this time 10 matching results are patched, left 63 results not patched)
              3) since rom file has been updated, i reopen to tool and load the patehed rom again.
              4) normal searching: find next 10 results, go back to step 2), repeat until not find any results
              Maybe the "filtering search" can bring more convenient operations(don't need to reload rom again)?

              Comment


              • Originally posted by Markle666 View Post
                Qustion1: clearly understood ! we can ignore the difference.
                Qustoin2: Just a little confusing, as you mentioned methodology, if there is 73 matches, it sounds even withtout "filtering search", i still can patch 73 matches with following steps:
                1) normal searching: find 10 results
                2) patch the rom, then close the tool(this time 10 matching results are patched, left 63 results not patched)
                3) since rom file has been updated, i reopen to tool and load the patehed rom again.
                4) normal searching: find next 10 results, go back to step 2), repeat until not find any results
                Maybe the "filtering search" can bring more convenient operations(don't need to reload rom again)?
                That's a good point so I just checked to make sure, and you don't need to close and reopen the program for it to see the newly modified ROM. Every time you click on any of the search buttons, it loads the ROM from scratch, so any changes that it just made will show up in the new search. You can leave all of the info you entered (RAM address, values, etc) as it is so you don't have to re-enter it. It should take less than one minute to patch all 73 matches in the Sonic CD ROM. I'm including a "patch without making a backup copy" option to make this even easier. No need to make a backup copy every time. You can just make a backup copy on the first patching (to keep you original ROM safe), then use the newly modified copy to continue patching without making a backup copy. In short, you can leave the program open for the entire process.

                EDIT: I take that back, the best way to do that is to manually make your own backup copy, and make changes to that. I forgot that when the program opens a new file, it resets all of your info you entered. But once you start patching the backup copy you made, the info you entered will stay intact. I will look at this some a bit later and see if I can improve on this.

                EDIT2: Had it right the first time. No need to manually make a backup copy. See post below.
                Last edited by Tony H; 02-25-2022, 07:09:43 PM.
                The Code Hut: http://codehut.gshi.org/

                Comment


                • I had it right the first time. lol. When you click on the "Patch and make a backup copy" button, the program lets you select a new name for the copy it's going to make of your original file. So let's say your original (unmodified) ROM is called "SonicCD.bin", you could re-name it to something like "SonicCDunmodified.bin". When you click the Save button, the file you just renamed is actually your original ROM, and will be safe. The file/ROM that remains open in the program after saving, is the one that was just patched. If you're trying to patch all 73 matches into the Sonic CD ROM, just go back to the Search Menu and click "Search" again, since all the information you entered before (RAM address, etc) is still there. It won't find the 10 ROM addresses you just patched, because they have been changed and won't match the search string. It will only find 63 matches the second time. When you go back to patch the next 10 matches/ROM addresses, you should use the "Patch without making a backup copy" button, since you already have your original ROM safe and sound. As I mentioned before, the whole process of patching all 73 addresses for Sonic CD should take less than one minute. And remember that most games will have way less than 73 matches.
                  The Code Hut: http://codehut.gshi.org/

                  Comment


                  • Originally posted by Tony H View Post
                    I had it right the first time. lol. When you click on the "Patch and make a backup copy" button, the program lets you select a new name for the copy it's going to make of your original file. So let's say your original (unmodified) ROM is called "SonicCD.bin", you could re-name it to something like "SonicCDunmodified.bin". When you click the Save button, the file you just renamed is actually your original ROM, and will be safe. The file/ROM that remains open in the program after saving, is the one that was just patched. If you're trying to patch all 73 matches into the Sonic CD ROM, just go back to the Search Menu and click "Search" again, since all the information you entered before (RAM address, etc) is still there. It won't find the 10 ROM addresses you just patched, because they have been changed and won't match the search string. It will only find 63 matches the second time. When you go back to patch the next 10 matches/ROM addresses, you should use the "Patch without making a backup copy" button, since you already have your original ROM safe and sound. As I mentioned before, the whole process of patching all 73 addresses for Sonic CD should take less than one minute. And remember that most games will have way less than 73 matches.
                    Good, this method is very clear !
                    When the tool is release, don't forget attach a tutorial doc

                    Comment


                    • Markle, I've got the Sega CD program finished. I'm only going to post it here for now, and hopefully you can test it and let me know if you find any bugs. I tested it with Sonic CD and the RAM address for rings and it worked fine, but I may have missed something. Let me know if you have any problems. Thanks.

                      There are three tabs to choose from, so I've included a screen shot for each one.

                      Click image for larger version

Name:	SegaCDToolSearch.png
Views:	339
Size:	52.5 KB
ID:	217268Click image for larger version

Name:	SegaCDToolPatch.png
Views:	325
Size:	54.1 KB
ID:	217269Click image for larger version

Name:	SegaCDToolDump.png
Views:	312
Size:	53.5 KB
ID:	217270


                      SegaCDPatchToolV10.zip
                      The Code Hut: http://codehut.gshi.org/

                      Comment


                      • The Sega CD Search/Patch tool is now available on RHDN with a full description, and will have it on my site shortly: https://www.romhacking.net/utilities/1670/
                        Last edited by Tony H; 03-02-2022, 06:55:02 PM.
                        The Code Hut: http://codehut.gshi.org/

                        Comment


                        • Tony, thank you for the work!
                          I am working overtime recently, i will spend time in this weekend to test the tool in some game and let you know if any problem.

                          Comment


                          • Hi Tony:
                            I start test with "Lethal Enforcers (JP) [T-95014] [498-8602-61224-0] cue+bin", i use "gens_r57shell_mod_r665" to get "continue/credit" RAM address: 00238403

                            Click image for larger version  Name:	tony1.png Views:	0 Size:	162.1 KB ID:	217311

                            it is odd address, so i should fill in with "00238402" right?

                            i open the bin with the tool and fill in "00238402" first, i both search "for substract" and "Number types match (intial value should be 5 continues)", but failed to find any results.

                            Click image for larger version  Name:	tony2.png Views:	0 Size:	45.3 KB ID:	217312

                            I also tried "00008402"("00238402" - "00230000"), "00038402"("00238402" - "00200000"), still failed, nothing happened.

                            I suspect if the ram address is correct or not? so i use "funcion + artMoney" to check again, "00238402" is right.

                            Click image for larger version  Name:	tony3.png Views:	0 Size:	130.9 KB ID:	217313

                            Did i missed somthing?
                            Last edited by Markle666; 03-04-2022, 11:27:31 AM.

                            Comment


                            • The program won't work on every RAM address, and this looks like it's one of them.

                              A couple things, if you have an odd numbered address, you should try searching for the odd address first and if you don't get any matches, then subtract 1 and try the even address.

                              In your example above, you are subtracting 0x200000 instead of 0x20000. It doesn't matter in this case since it looks like the RAM address for continues won't work with the program anyways, but you should remember that for future RAM addresses.

                              There is still a lot I'm not sure about when it comes to Sega CD RAM addresses. The part about subtracting 0x20000 may only apply to RAM addresses found with some emulators, and may not apply to all Sega CD RAM addresses. RAM addresses in the range of your continue address (00238402) may not need to have 0x20000 subtracted, but I'm not sure. Sega CD RAM addresses in the lower range (ie 000381A8) are the ones that I tested, and needed to have 0x20000 subtracted for the search process to work in the program. And of course RAM addresses in the "FFxxxx" range don't need to have anything subtracted.

                              The RAM address in the db for Lethal Enforcers (US, by Lee4) for bullets (000181A8) looks like it will work with the program (should give you infinite bullets), but not sure about the rest.

                              EDIT: The RAM addresses in the db for the US version will probably work on the JP version as well, since the code Lee4 found for continues is the same as the one you found.

                              EDIT 2: It looks like you were using the filtered search for number type matches. In general, you should use the regular, unfiltered search first since that will find every possible match. There are instructions in the program that will give you more info on this.
                              Last edited by Tony H; 03-04-2022, 03:45:24 PM.
                              The Code Hut: http://codehut.gshi.org/

                              Comment


                              • Tony, now i can edit infinite bullet "000181A8" successfully!
                                Thank you for your work on the tool, wish the tool can support searching more types of RAM address~

                                Comment

                                Working...
                                X