don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. I just copied off what was given for both the invincibility and the speed shoes, not knowing what to take away.

    As for the Obj2E_Goggles part, did you mean I should have it be this
    Code (Text):
    1. Obj2E_Goggles:
    2.                 cmpi.b    #8,d0; is it a goggles monitor?
    3.         bra        Obj2E_ChkEnd
    or this
    Code (Text):
    1. Obj2E_Goggles:
    2.         bra        Obj2E_ChkEnd
    ?

    For reference, heres the current form of what should happen when the 'S' Monitor is opened
    Code (ASM):
    1. Obj2E_ChkS:
    2.         cmpi.b  #7,d0
    3.         bne.s       Obj2E_Goggles
    4.         move.b  #1,($FFFFFE2D).w ; make Sonic invincible
    5.         move.w  #$4B0,($FFFFD032).w ; time limit for the power-up
    6.         move.b  #$38,($FFFFD200).w ; load stars object ($3801)
    7.         move.b  #1,($FFFFD21C).w
    8.         move.b  #$38,($FFFFD240).w ; load stars object ($3802)
    9.         move.b  #2,($FFFFD25C).w
    10.         move.b  #$38,($FFFFD280).w ; load stars object ($3803)
    11.         move.b  #3,($FFFFD29C).w
    12.         move.b  #$38,($FFFFD2C0).w ; load stars object ($3804)
    13.         move.b  #4,($FFFFD2DC).w
    14.         tst.b   ($FFFFF7AA).w   ; is boss mode on?
    15.         bne.s   Obj2E_ChkEnd    ; if yes, branch
    16.         move.w  #$87,d0
    17.         move.b  #1,($FFFFFE2E).w ; speed up the BG music
    18.         move.w  #$4B0,($FFFFD034).w ; time limit for the power-up
    19.         move.w  #$C00,($FFFFF760).w ; change Sonic's top speed
    20.         move.w  #$18,($FFFFF762).w
    21.         move.w  #$80,($FFFFF764).w
    22.         move.w  #$E2,d0
    23.         jmp (PlaySound).l   ; play Speed up invincibility music (?)
    24.  
    Edit: Changed 'S' Monitor code.
    No, I do not what a barrier added, I only want a combination of the 'Super Shoes' Monitor and the 'Invincivility' Monitor. I will point this out now. I am a novice when it comes to coding.

    Also... has anyone even found a way to solve my third question, the one for the goggles monitor making sonic act normal underwater, changing some of his sprites, and removing the effect of the goggles when sonic would take any damage?
     
  2. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    Well let's hope you get more familiar with sonic's engine after all this then :P

    The second one, there's no check necessary since you aren't having the goggles monitor do anything at this point, plus it's the last monitor, so it's somewhat of a moot thing. If you were to add extra monitors however, you would need to add a cmpi.b #8,d0 followed with a bne.s NewMonitor


    As previously said, that

    Code (Text):
    1.         jmp    (PlaySound).l; play invincibility music
    prevents the code from getting any further (note I'm mentioning the invincibility music, not the speed shoes, since that's the one buried in your code) so until someone who knows better comes along and corrects me, just comment it out (put a ; at the beginning of the line) and change

    Code (Text):
    1.         bne.s        Obj2E_NoMusic
    to

    Code (Text):
    1.         bne.w    Obj2E_NoMusic
    Let me know how you get on.

    EDIT: Lol, edits.
     
  3. It still seems to error out, after I remodified the code so that I could work on what you gave.
    Currently, I have this for the 'S' Monitor
    Code (ASM):
    1. Obj2E_ChkS:
    2.         cmpi.b  #7,d0
    3.         bne.s       Obj2E_Goggles
    4.         move.b  #1,($FFFFFE2D).w ; make Sonic invincible
    5.         move.w  #$4B0,($FFFFD032).w ; time limit for the power-up
    6.         move.b  #$38,($FFFFD200).w ; load stars object ($3801)
    7.         move.b  #1,($FFFFD21C).w
    8.         move.b  #$38,($FFFFD240).w ; load stars object ($3802)
    9.         move.b  #2,($FFFFD25C).w
    10.         move.b  #$38,($FFFFD280).w ; load stars object ($3803)
    11.         move.b  #3,($FFFFD29C).w
    12.         move.b  #$38,($FFFFD2C0).w ; load stars object ($3804)
    13.         move.b  #4,($FFFFD2DC).w
    14.         tst.b   ($FFFFF7AA).w   ; is boss mode on?
    15.         bne.w   Obj2E_NoMusic   ; if yes, branch
    16.         move.w  #$87,d0
    17.         move.b  #1,($FFFFFE2E).w ; speed up the BG music
    18.         move.w  #$4B0,($FFFFD034).w ; time limit for the power-up
    19.         move.w  #$C00,($FFFFF760).w ; change Sonic's top speed
    20.         move.w  #$18,($FFFFF762).w
    21.         move.w  #$80,($FFFFF764).w
    22.         move.w  #$E2,d0
    23.         jmp (PlaySound).l   ; play Speed up invincibility music (?)
    24.  
    Also, note that I put the two jmp (PlaySound).l together, since I understood what you said about the speedup being buried.

    (I don't think I'll edit this one... :objection:
    not sure how I would, but I'm getting the feeling I will...)
     
  4. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    When I put that code into my rom I get no errors. What happens with you?

    EDIT: The invincibility music doesn't come on, but the music speeds up, but I'm not sure how to fix that.
     
  5. Here is the exact error I get while building the rom
    Code (Text):
    1.         bsr.w   MvSonicOnPrfm
    2. s1comb.asm<21843> : Error 06054 : Branch offset <0Xffff7ffc> out of range
    Does this mean anything to you?

    Also, I don't have a seperate music set up for when the speed shoes are used. If you plan on using this, you might want to put the 'speed' part on the top.
     
  6. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    Can't say I know s1comb.asm very well, but try changing that bsr.w to jsr
     
  7. I used these tutorials to get started on how to hack a sonic game. Not sure if thats where I had to get it, since I don't think going through all of them again will help solve anything.

    Also, I couldn't find MvSonicOnPrfm...
     
  8. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    I would try opening s1comb.asm in wordpad, making sure word wrap is not ticked, then press CTRL+G and type in 21843, since that is where the error is at

    I'm aware that you can't post any more, so feel free to pm me or go to #retro on IRC.
     
  9. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,091
    187
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    When I go to build my rom, I get this error:
    Code (Text):
    1. C:\USERS\DAVIS\DESKTOP\SONIC 1 PROJECT\_INCOBJ\89 ENDING SEQUENCE STH.ASM(37) : Error : Branch (32790 bytes) is out of range
    Can someone tell me what went wrong? I didn't even mess with this object, I added some code to the Monitor ASM, that's it. (I'm pretty much trying to do what EggRoboFail is doing with his hack, only difference is that I'm using the SVN disassembly. And I'm only trying to add the effect for the 's' monitor, not the goggles monitor.)
     
  10. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    Basically you have a branch (bxx.w) which is out of range. If it's a bra.w, change it to a jmp; if it's a bsr.w, change it to a jsr. If it's anything else (e.g. beq.w or bne.w), you have either to branch to a nearer label and have it jump to the real label, or shift the code around.
    This gets mentioned at least one time per month, someone should pin a "how to fix the out of range errors" guide or something.

    edit: a couple of relevant posts.
    http://forums.sonicretro.org/index.php?s=&...st&p=244474
    http://forums.sonicretro.org/index.php?s=&...st&p=283229
     
  11. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    brbmakingguide.
     
  12. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    Already made, though it's not a very good guide (imo)
     
  13. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    Damn, what am I gonna do with this then?

    http://forums.sonicretro.org/index.php?showtopic=17016

    D:
     
  14. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    Hey there. I'm still having that problem with SonED2 where the level doesn't show in the game. I have tried taking all objects out and still no dice. I have taken out the tiles that don't belong. There is nothing wrong with the other tiles since the same tiles work in the first act.

    Do I have to start over again :( Or is there a way anyone knows of that I can fix this?
     
  15. HighFrictionZone

    HighFrictionZone

    Hi. Member
    855
    0
    16
    Katy, Texas
    Nothing
    When you run build.bat, what output do you get. Perhaps there is an error there that explains this?
     
  16. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Alright, since I'm trying to use *.WAV voices in my hack, I figured I'd use Sonic 65's PCM Driver.

    I followed the instructions into installing it carefully, and used the newer compiled z80 driver, along with the ASM source.

    Now, after fixing a few branch errors here and there, and making the songs 16000hz, I figured it'd work, except for the fact my regular DAC samples aren't working at all (wtf) and I'm getting nothing but noise!

    I *think* the problem lies within the fact I'm using jman's Z80 driver, modified to use with ASM (fairly easier, afterall).

    I could always change all references to the z80 driver to mine, allough, I'm not sure on where to turn. :S
     
  17. SMTP

    SMTP

    Tech Member
    You can always try to import the level data into a new disasm.
     
  18. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    I don't get an Error. It just does it's thing and shuts off like it's supposed to.

    I would just make a new one and replace that level in it? I will go try it.

    If I do that will I lose the tiles that I have changed? If so what else should I move?
     
  19. LSD

    LSD

    Member
    12
    0
    0
    I get levels edited with ESE fine. They disassemble, and SonED2 can read them.

    Depending on what you've changed, will determine what you'll want to move. If you want to keep modified tiles, move the art files as well.
     
  20. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    I was using ESE2 and love it, but when I had trouble no one could help me and told me to use SonED2. When I tried to disassemble my ESE2 rom with SonED2, object placement and pallets transferd but the level layout did not.

    So what do I do to transfer what I have into a new disassemblly? I make a fresh one and split the rom, then I move the levels I have changed, art files, what else?

    I have changed the tiles, pallets, and level layout.