don't click here

Dreamcast Code Breaker illogical problem

Discussion in 'Engineering & Reverse Engineering' started by samourai23, Mar 12, 2011.

Thread Status:
Not open for further replies.
  1. samourai23

    samourai23

    Member
    20
    0
    0
    Paris
    Oh hey ! Well as I said in my validation topic (which seems to have been accepted, thanks :)), I said we fell on a problem which seems unsolvable.

    I recently burnt a code breaker loader and a code breaker, as well as a Sonic Adventure 2 to see if Cheat Engine/Emulator hacking and Code Breaker could share their codes.
    And it appeared that it worked perfectly. My friend sent me some of his adresses, to have codes like "infinite time for route 101/280" or "Always ONE screen" and they worked really well !

    Then he sent me an "infinite 2p special power lvl 1 for P1" (which gives unlimited "Speed up" for racers etc), and it worked as well.

    But then we tried to make it for the P2, and BING ! For no reason, as soon as I close the lid and launch SA2 after selectionning the code, the game freezes even before we could make it to the first "Licensed by SEGA" thing.

    The adresse for that, is : 010DB23B + 00000001

    THEN, we changed it to : 010DB23C + 00000001 and guess what ? It worked, by making P2 always have Chaos Spear/Sonic Wind.

    So we tried to have infinite time stop by putting a "D" and same thing as for "B", it froze the game the same way <_<

    It's really weird, some codes work, and some others doesn't work. We couldn't find a logical explaination for this... How can some codes work, and some really alike others don't ?

    For example the debug fly I found on your site works perfectly, the "P2 infinite Rings" works as well, but the "P1 Press Y for instant turbo" doesn't work...??



    I precise that every codes that doesn't work for me, work for my friend on his emulator.


    Since we are running out of idea to make this work, (we tried everything, with another mastercode, with both mastercode, without memory card....) nothing takes effect, it always freezes the game right after I close the lid and launch the game.... (You know an infinite black screen), except when I do it without mastercode, in this case it doesn't freeze but send me back to the Dreamcast's main menu.... Which.. isn't better >_<

    So if anyone has the answer, or could try this on his own code breaker to check if it freezes as well, then thank you very much, every help will be appreciated.

    Thanks to everyone.

    Regards, samourai23
     
  2. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    You're trying to use codes that aren't aligned to a proper 32-bit boundary. 010DB23B is a 32-bit code type, therefore the only valid values for the last digit are 0, 4, 8, and C. Codes must be aligned to proper boundaries or they will crash the real system. If it works in the emulator, it's a bug in the emulator. Likewise, for a 16-bit code type, you wouldn't be able to use odd numbers. If you use an 8-bit code type, you can use any location because it only writes a single byte.

    You should be using the proper code type for the amount of data you wish to write. For some reason, I can't find any documentation on the code types to provide you.... <snip>

    Edit:
    As I said, I can't find the code types documented anywhere, but after looking at some existing codes here is what I believe they are. I think the first 2 digits are the code type:
    00 = 32 bit write
    01 = 16-bit write
    02 = 8-bit write

    But on the other hand, I've found codes that start with 1 as the first digit, so I'm not entirely sure what that means. Either way, the problem still stands.
     
  3. samourai23

    samourai23

    Member
    20
    0
    0
    Paris
    So if I clearly understood, (but I think I didn't), if I set 210DB23B + 00000001, it shouldn't make the game crash ? Is that it ? (Because it did :s )
    And could you explain what you mean by "overwriting the wrong area" exactly please ? I mean, 010DB23C does give infinite chaos spear for p2, so doesn't that prove it's the right adress ? Am I wrong ?


    Edit: My mistake, you said the first digit, so I write something that's totally wrong, I'll try with 00 now ! Maybe it will solve the problem, who knows ?
     
  4. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    Codebreaker codes are more than just
    <Address> + <Value>

    The first 2 digits of the Address tell the codebreaker what the code needs to do.
    00 as the first 2 digits of the address means that you will write all 4 bytes (00 00 00 00) of <Value> to that address.

    When you are writing 4 bytes, (32-bit) the <Address> must be evenly divisible by 4. That means the last digit can only be 0, 4, 8 or C.
    When you are writing 2 bytes, (16-bit) the <Address> must be evenly divisible by 2. That means the last digit can only be 0, 2, 4, 6, 8, A, or C and the <Value> can only be 0000xxxx where xxxx is anything.
    When you are writing 1 bytes (8-bit) the <Address> can be any value. But the <Value> can only be 000000xx, where xx is anything.

    If you don't follow these rules, the system will crash.
    Change the first 2 digits of address to 02 to write 1 byte, 01 to write 2 bytes, or 00 to write 4 bytes.
     
  5. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
  6. samourai23

    samourai23

    Member
    20
    0
    0
    Paris
    Yes ! It worked ! Thank you so much ! It's funny though, I could never have thought that changing the number of byte writing could freeze the game. I thought it could just, well, do nothing.

    Anyway, thank you very much :)

    But all I have to do now is to write "00" everytime isn't it ?

    (By the way, I saw that the joker adresses are "0D" so what is this ?
     
  7. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
  8. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
    I haven't messed with DC memory editing for a year or so, but I used that as reference and every one of my codes worked so I have no idea.
     
  9. samourai23

    samourai23

    Member
    20
    0
    0
    Paris
    Anyway, thank you very much mate :)
     
Thread Status:
Not open for further replies.