Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Messing with search and replace

  1. #1

    Default Messing with search and replace

    I was sick and bored today, and with no access to the computer, I tried messing with search and replace. I wanted to check if what I figured out is right... so here goes

    Code:
    94000130 FCFF0000
    this is, of course, the activator. this one checks L+R

    Code:
    D3000000 021E3122
    this is one space before the space to start from, right? in 1.0 the first space in the top left corner is 021E3124, so you start at 021E3122. And to make this code work with different game version, you just need to change the second half to fit with the version of the game?

    Code:
    C0000000 00000FFF
    this is how many times to increment and check the offset again? in this case 4095, plus the first run through, making 4096, the entire 64 x 64 map. Right?

    Code:
    DC000000 00000002
    Adds 2 to the offset

    Code:
    F2000000 00000002
    copies the item for checking what you put in to search for

    Code:
    92000000 0000XXXX
    of course this is just what it's searching for... and it can be replaced with
    Code:
    82000000 0000XXXX
    72000000 0000ZZZZ
    to replace a range, where XXXX is one less than the first hex in the range and ZZZZ is one more than the last? like for all weeds you'd do XXXX=0020 and ZZZZ=0025.

    if you wanted to replace every spot in a loop, would just completely skipping this line work? it seemed to when I tried, but I don't know if that's a bad thing or not...

    Code:
    10000000 0000YYYY
    this is just what's being placed in the spot being replaced

    Code:
    D2000000 00000000
    the "terminator" (not the movie one though)


    So if someone who knows more about this than me could tell me, am I right about this? And also tell me what exactly the 0xDC line does?

    I think at least for 1.0 this seems right (I don't know why it wouldn't be right for another version except for the 0xD3 line possibly)

    I made a code that worked fine to entirely remove everything in the first acre and it came out like this:
    Code:
    94000130 FCFF0000
    D3000000 021E3122
    C0000000 000000FF
    DC000000 00000002
    10000000 0000FFF1
    D2000000 00000000
    and I did a replace all weeds with blue roses that seemed to work, too. It came out like this:
    Code:
    94000130 FCFF0000
    D3000000 021E3122
    C0000000 00000FFF
    DC000000 00000002
    F2000000 00000002
    82000000 00000020
    72000000 00000025
    10000000 00000019
    D2000000 00000000
    This is my siggy. I'll make it better when I stop being lazy

  2. #2

    Default Re: Messing with search and replace

    Code:
    D2000000 00000000
    That's the "terminator"

  3. #3

    Default Re: Messing with search and replace

    oh, thanks


    any help yet on:
    Code:
    DC000000 00000002
    This is my siggy. I'll make it better when I stop being lazy

  4. #4
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default Re: Messing with search and replace

    Quote Originally Posted by itsmeGames
    oh, thanks


    any help yet on:
    Code:
    DC000000 00000002
    Adds 2 to the offset register or 021E3122 thus giving you the the next spot on the map.

    Say what you mean, mean what you say, and let your actions speak for you.


  5. #5

    Default Re: Messing with search and replace

    so then what's this one for?
    Code:
    F2000000 00000002
    This is my siggy. I'll make it better when I stop being lazy

  6. #6
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default Re: Messing with search and replace

    Quote Originally Posted by itsmeGames
    so then what's this one for?
    Code:
    F2000000 00000002
    Copies two bytes from the offset register to 2000000

    Say what you mean, mean what you say, and let your actions speak for you.


  7. #7

    Default Re: Messing with search and replace

    um... ok... but what does that mean?
    This is my siggy. I'll make it better when I stop being lazy

  8. #8
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default Re: Messing with search and replace

    Basically it copies the item from the map (021E3124, by the time it gets here the first time around, because we added 2 to 021E3122) to 2000000

    Say what you mean, mean what you say, and let your actions speak for you.


  9. #9

    Default Re: Messing with search and replace

    oh, ok, i get that now. so if you don't wanna search, you can take that line out, too then (if you wanna delete everything)
    This is my siggy. I'll make it better when I stop being lazy

  10. #10
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default Re: Messing with search and replace

    I re-worded my post above btw.

    Say what you mean, mean what you say, and let your actions speak for you.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •