don't click here

Basic Questions & Answers thread

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

  1. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Another occasional post here, asking for help :(

    Alright, this is what I'm trying to do.

    After 9 minutes have elapsed, I'm trying to get the music to speed up. Knowing the ID that makes that, I attempted, and took it to Obj21_Flash2:

    Code (ASM):
    1.  
    2. Obj21_Flash2:
    3.         moveq   #0,d0
    4.         btst    #3,($FFFFFE05).w
    5.         bne.s   Obj21_Display
    6.         addq.w  #1,d0       ; make ring counter flash red
    7.         cmpi.b  #9,($FFFFFE23).w ; have 9 minutes elapsed?
    8.         bne.s   Obj21_Display   ; if not, branch
    9.         addq.w  #2,d0       ; make time counter flash red
    10.         move.w  #$E2,d0
    11.         jmp (PlaySound).l   ; Speed up the music
    12.  
    Now, instead, the whole HUD flashes if I have no rings, and the music does speed up. What I am wanting is to make the TIME in the HUD flash red, while the music speeds up. As said, the whole HUD flashes (I.e. dissapear for a frame) and if I collect a ring, nothing flashes, but the music is still sped up.

    What am I doing wrong? If I remove the...
    Code (ASM):
    1.  
    2.         move.w  #$E2,d0
    3.         jmp (PlaySound).l   ; Speed up the music
    ...then it works as normal.

    I'm absoulutely confused. :psyduck:
     
  2. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    For one, you have to fix this bug, otherwise the HUD won't flash red even in the 9th minute.
    Also, once that is fixed, you should call PlaySound with a jsr if there is any code after it (jmp is ok if there's only an rts after it).

    edit: bah, you're cool enough in my book, I'll give you the code :)
    The bugfix is straight from my hack, there might be easier/better ways to do it, but it works. And I'll add the playsound as well :)
    Code (Text):
    1. Obj21_Flash:
    2.         tst.w    ($FFFFFE20).w; do you have any rings?
    3.         beq.s    Obj21_Flash2; if not, branch
    4.         moveq    #0,d2
    5.         btst    #3,($FFFFFE05).w
    6.         bne.s    Obj21_Display
    7.         cmpi.b    #$9,($FFFFFE23).w; have    9 minutes elapsed?
    8.         bne.s    Obj21_Display; if not, branch
    9.         addq.w    #2,d2; make time counter flash red
    10.         move.w  #$E2,d0
    11.         jsr    (PlaySound).l; Speed    up the music
    12.         bra.s    Obj21_Display
    13.  
    14. Obj21_Flash2:
    15.         moveq    #0,d2
    16.         btst    #3,($FFFFFE05).w
    17.         bne.s    Obj21_Display
    18.         addq.w    #1,d2; make ring counter flash red
    19.         cmpi.b    #$9,($FFFFFE23).w; have    9 minutes elapsed?
    20.         bne.s    Obj21_Display; if not, branch
    21.         addq.w    #2,d2; make time counter flash red
    22.         move.w  #$E2,d0
    23.         jsr    (PlaySound).l; Speed    up the music
    24.  
    25. Obj21_Display:
    26.         move.b    d2,$1A(a0)
    27.         jmp    DisplaySprite
    Replace the 3 above subroutines with this code. It should work (though I didn't test it).

    edit: fixed a thing I overlooked. Copy the code again.
     
  3. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    It's working without problem now nineko, thanks!
     
  4. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    Hi,

    I am having trouble with ESE2. Every time I try to edit the tiles in the tile editor, it does not matter what I draw on them, when I save and start the game my changes do not show up. I would like to redraw a few things so my game looks different then the others.

    Thanks
     
  5. Emerald Spirit

    Emerald Spirit

    Newfound Potential Member
    Crap, need help with VRAM. In CPZ, the VRAM address for diagonal springs is the same as the jumping blue droplet snake thing. Any workarounds?
     
  6. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    okay! I'm about to pull my hair out... I figured out the tile editor so that's not the problem.

    I go to play my edit and in the first stage I can't see anything except 3 of tile 0F and 1 of tile A1 in a row looping. There is a break in the loop one 8x8 thick every 4 tiles. I can see sonic and the level behind the wall loop through that 8x8 line. The loop seems to be in the foreground but I don't know how I did that. I have checked the background area and I did not paste over it. I when back and undid the changes I made prior to the problem and still no dice.

    I'm editing Sonic 2 using ESE2.

    Please help. I don't know what I did and I don't know how to just extract that one level so I can start over without losing the information on the other levels I have already changed.
     
  7. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    478
    1
    18
    Is there a way to extract the game data for Sonic CD from the PC version?
     
  8. SMTP

    SMTP

    Tech Member
    I'm sorry to say but, now you know why we don't recommend using ESE....
     
  9. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,077
    176
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    I have a problem. Every time I run built.bat after I'm done editing my rom, I get a rom file that is only 1Kb in size and is unplayable. Can someone tell me why this happened? I've tried it multiple times, and every time I get the same unusable file. And I'm using Hivebrain's S1 disassembly. (I'm working on a Sonic 1 hack as well as a Sonic 2 hack xP)
     
  10. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    Can I disassemble with SonED2, replace the messed up level, reassemble, then put it back into ESE2?

    I'm sure that's a dumb question but I am a newb.

    Is there no way to fix it in ESE2?
     
  11. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    I'm guessing you're using SNASM68k? If so, you need to make an empty file called s1comb.asm. If not, well, I dunno.
     
  12. Aka Mekon

    Aka Mekon

    AKA The best Member
    77
    0
    0
    France
    No, I'm just sit on a chair =p
    Why don't you use Soned 2 ? It's waaaaay better than ESE2.
     
  13. Hivebrain

    Hivebrain

    Administrator
    3,047
    154
    43
    53.4N, 1.5W
    Github
    Or use the proper disassembly, instead of the 4-year-old one that contains several large mistakes (such as the s1comb problem).
     
  14. SephyUK

    SephyUK

    WHY SO CURIOUS? Member
    597
    0
    0
    Qatar
    Some Freakishly Long Anime
    So, I'm having a problem with my menu here.
    [​IMG]
    It doesn't seem to be loading the correct artwork. Or any artwork for that matter, so does anyone have any idea how I could fix this?
     
  15. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    I tried porting what I have already done in ESE2 into SonED2 and all I got was the object placement. It didn't show the new level I put in. I also tried using ESE2's importar and imported a clean version of Emerald Hill over my version of Emerald Hill and when I tested it it still came up retarded. I think it may be an object messing up the code but I have gone back and undid all changes I made prior to the glitch up.

    I would use SonED2 but ESE2 is a lot simpler and easier to understand and use. I get to confused using SonED2.
     
  16. Tamashii

    Tamashii

    Fulfilled Collector Member
    29
    0
    0
    Pereira, CO
    Sonic Network Crash
    Coming from the Hivebrain himself, that is such good advice. Actually, I enjoy using the Community disassembly, albeit some code could use some good comments and annotations (which I could contribute, but the process is too long with debugging).
     
  17. iojnekns

    iojnekns

    trouble keeps you runnin' faster Member
    148
    0
    16
    As the resident SonED2 cheerleader, I'm going to don my pom-poms and implore you to persevere. SonED2 may be a fickle beast, but its the finest and most powerful editor out there. There is a learning curve, yeah, but its just one of those things - if you want to produce something cool, you are going to have to put in some hard work. If you find yourself struggling, there are detailed help files, numerous resources on the wiki and plenty of people (me included) on here that won't mind pushing you in the right direction.
     
  18. Spanner

    Spanner

    The Tool Member
    You don't need s1comb.asm for ASM68K or the ASW disasm.
    Also, I still use the 2005 disasm and I don't intend to convert to the SVN disasm because of the fact that previous labels weren't referenced, compared to the S2 disassembly which does have that.
     
  19. sonicrules

    sonicrules

    Banned
    2
    0
    0
    I was wondering how do you switch what palette row PlaneEd uses for a tile?
     
  20. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    Do you mean tile? (Don't know what title would refer to).

    Quoting from the ReadMe: "F1-F4: Change palette line of tile under cursor (and of selector viewer)"
    I.e. F1 for palette line 1, analogous for palette line 2-4.

    Palette line 1 are the first 0x20 bytes in the palette line, palette line 2-4 the next sets of 0x20 bytes respectively.

    If for some odd reason your palette file doesn't start with the first palette line, you can set the 'Palette Offset' parameter in the PlaneEd project file so the specified offset points to the first palette line in the file.