don't click here

Basic Questions & Answers thread

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

  1. nineko

    nineko

    I am the Holy Cat Tech Member
    6,309
    486
    63
    italy
    1) in misc\sloc_lev.bin
    4 bytes per level (XX YY), including act 4s, arranged per internal order (GHZ1, GHZ2, GHZ3, GHZ4, LZ1, etc). This includes also the mini GHZ thing at the end, which is located after SBZ: the first 4 bytes are for the good ending, the other 4 bytes for the bad ending (Sonic starts from farther in the bad ending, to take in account the time needed to show the emeralds).
    2) The signpost is a normal object, so objpos\xxx.bin where xxx.bin is the zone you're interested into
    3) misc\lvl_size.bin, keep in mind that SonED2 ignores this file (afaik), you have to update it by hand. There are 12 bytes per level, in the same order as the starting locations. I don't know the exact meaning of all of them, though
     
  2. FraGag

    FraGag

    Tech Member
    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Level size array and ending start location array
    3. ; ---------------------------------------------------------------------------
    4. LevelSizeArray: incbin  misc\lvl_size.bin
    5.         even
    6.  
    7. EndingStLocArray:
    8.         incbin  misc\sloc_end.bin
    9.         even
    Code (ASM):
    1. ; ---------------------------------------------------------------------------
    2. ; Sonic start location array
    3. ; ---------------------------------------------------------------------------
    4. StartLocArray:  incbin  misc\sloc_lev.bin
    5.         even
    LevelSizeArray tells the boundaries of the camera. StartLocArray and EndingStLocArray tell the starting locations in the levels and in the ending demos. The actual level of a level map is stored at the very beginning of the map's data.

    As for your last questions, this is handled by the DSR/DLE (dynamic screen resizing/dynamic level events; located at DynScrResizeLoad), which is code that is run to change some variables in RAM that control the camera boundaries. GHZ1's routine is short and commented, so you might want to check it out if you want to start messing with them.
     
  3. Mairtrus

    Mairtrus

    Get a load of this!! Tech Member
    27
    0
    0
    Mendoza, Argentina
    Sonic Z. The Z DOESN'T means nothing.
    Thanks to both, guys!!
    I am an anus. I can't understand how I could ignore these files.
    Also, nineko, as I checked, it is not enough to change the signpost of place. Apparently you have to change some lines in DynScrResizeLoad. That was referred to my original question, but thanks anyway.

    I found something funny: change the start position of GHZ1 and the title screen will change his initial position too!! :(
     
  4. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I am adding a new object to my hack, yet the art seems to do strange things to my rom.

    Here is the art_tile my object calls for:
    Code (Text):
    1. move.w  #$39E,art_tile(a0)
    here is the plreq I have for the art:
    Code (Text):
    1. plreq $73C0, ArtUnc_dashring
    Here is what the art and mappings looks like in SonMapED, in S2 format:
    [​IMG]

    Here is what happens when I try to start the level the object is placed in:
    [​IMG]


    Does anybody know why this happens? :X
     
  5. Ollie

    Ollie

    DIGGY DIGGY HOLE Member
    Doesn't the Purple Screen mean out of memory or something? do you have enough Vram space? Or it's trying to load something which it can't find like in Sonic 2 NA when you go into Final Zone (Hill Top) for a while.
     
  6. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I am most likely not out of VRAM space, I removed the coconuts enemy to add this one. I have no real clue why it is doing this.
     
  7. Anthall

    Anthall

    Spambot Member
    235
    0
    0
    Leicester, UK
    Sonic the Hedgehog - The Final Showdown
    Thanks Nineko for the help, I have got the monitor working now thanks for your help (And because of the Work with Motorola 68000 assembly guide).

    I have added two diffrent jump routines, one with the monitor effect and one without.

    P.S. Don't worry. My jump monitor is diffrent from yours : )
     
  8. SMTP

    SMTP

    Tech Member
    Did you recompress the art file to Nemesis compression? :P

    If so, did you align the file to an even byte in the disasm?
     
  9. Mikel

    Mikel

    Member
    Ok, I'm in need of some help, it's related to music slots for the Sonic 1 Sound Driver/Sonic 2 Clone Driver in Sonic 2.

    For those that want to know the problem, I've been trying to extend the music slots to 01 to 1F, but it seems that when I add music slots 01 to 1F and add it to the Zone music list for act 2 of any zone, the music doesn't play, what I'm doing is adding music for act two of zones like CPZ, ARZ, OOZ, and MTZ. Whenever I add the songs like 01 for CPZ to the Zone music for act 2, the new music doesn't play or start.

    If anyone wants the code, here it is:

    From the Sound Driver:
    Code (ASM):
    1.         cmpi.b  #$1F,d7
    2.         ble.w   Sound_01To1F
    3.  
    4. Sound_01to1F:
    5.         jsr sub_725CA(pc)
    6.         movea.l (off_719A0).l,a4
    7.         subi.b  #$1,d7
    8.         move.b  (a4,d7.w),$29(a6)
    9.         movea.l (Go_MusicIndex_01to1F).l,a4
    10.                   jmp Music_Continue
    11.  
    12. MusicIndex_01to1F:
    13.                      dc.l Music01, Music02
    14.         dc.l Music03, Music04
    15.         dc.l Music05, Music06
    16.         dc.l Music07, Music08
    17.         dc.l Music09, Music0A
    18.         dc.l Music0B, Music0C
    19.         dc.l Music0D, Music0E
    20.         dc.l Music0F, Music10
    21.         dc.l Music11, Music12
    22.         dc.l Music13, Music14
    23.         dc.l Music15, Music16
    24.         dc.l Music17, Music18
    25.         dc.l Music19, Music1A
    26.         dc.l Music1B, Music1C
    27.         dc.l Music1D, Music1E
    28.         dc.l Music1F
    And from MusicList2, for CPZ:

    Code (ASM):
    1.     dc.b  $81-$80   ; 0D
    So, if anyone can help me, that would be appreciated.
     
  10. Fluffy Clouds

    Fluffy Clouds

    WAS A KID. Member
    45
    0
    0
    San Fernando Valley, California
    GTA San Andreas trainer SCM hook.
    I need help on layer deformation. I have no idea on where to start, and I have no idea on how it works. Help? I already tried porting from one level to another, but it was pretty bad because I never edited it.

    EDIT: This is in Sonic 1.
     
  11. LordOfSquad

    LordOfSquad

    bobs over baghdad Member
    5,202
    243
    43
    Winnipeg, MB
    making cool music no one gives a shit about
    This is more of a request than anything, but what program do you guys use to convert midi files to the XM format? Every program I've used so far just produces files that have no sound.
     
  12. Fluffy Clouds

    Fluffy Clouds

    WAS A KID. Member
    45
    0
    0
    San Fernando Valley, California
    GTA San Andreas trainer SCM hook.
    ModPlugTracker can convert midis into XM. Just try googling it.

    I remember there being a topic that had the link.
     
  13. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    SonMapED won't compress it, and I tried with the compressor tools, and the art comes out scrambled... x.X

    Edit: Disregard all that... I had the older SonMapED. :eng101:
     
  14. LordOfSquad

    LordOfSquad

    bobs over baghdad Member
    5,202
    243
    43
    Winnipeg, MB
    making cool music no one gives a shit about
    Still no luck, I can't even find the option to convert with this thing. O_O
     
  15. nineko

    nineko

    I am the Holy Cat Tech Member
    6,309
    486
    63
    italy
    [​IMG]
    Click on that button. Look for the midi you want to convert. Alternatively, drag and drop will work as well.
    Yes, Mod Plug Tracker can load midi files.

    [​IMG]
    Click on that button.

    [​IMG]
    Select "FastTracker XM" and then click on OK.

    [​IMG]
    Click on that button.

    Now your midi is in XM format. But your conversion will suck if you do nothing else. You should spend some time in Mod Plug Tracker to properly arrange the song, e.g. the number of channels and so on.
    A midi to xm to smps conversion can be done in less than 1 minute, but it takes up to some hours to make it awesome.
     
  16. LordOfSquad

    LordOfSquad

    bobs over baghdad Member
    5,202
    243
    43
    Winnipeg, MB
    making cool music no one gives a shit about
    Alright, thanks for the advice! And I never got around to thanking you for that help with Camtasia either, so thanks for that as well. It ends up I couldn't follow your instructions for it because I'm running on Vista, so I ended up using a male-to-male audio cable. =P
     
  17. Twilight

    Twilight

    Member
    51
    0
    6
    Michigan
    A Sonic the Hedgehog hack
    How do I edit the title cards in Hivebrain's 2007 Sonic the Hedgehog disassembly?

    EDIT: I found it myself.
     
  18. Anthall

    Anthall

    Spambot Member
    235
    0
    0
    Leicester, UK
    Sonic the Hedgehog - The Final Showdown
    I have been messing around with ASM again, and I have been modifying the possible items I can spawn via the Debug Mode, which I have done successfully, but there is one thing I can't seem to be able to do.

    You know when you spawn a monitor in debug mode, and you hit the monitor, any successive monitors you spawn are always broken. How do you make it so that you can spawn working monitors after breaking a debug-made monitor?

    thanks again!
     
  19. In Obj26_Main, you have
    Code (ASM):
    1.         move.b  $23(a0),d0
    2.         bclr    #7,2(a2,d0.w)
    Change that to
    Code (ASM):
    1.         move.b  $23(a0),d0
    2.         beq.s   Obj26_NotBroken
    3.         bclr    #7,2(a2,d0.w)
    (Edit: The following step is wrong and should not be done, my mistake.)

    Similarly, in Obj26_SetBroken, you have
    Code (ASM):
    1.         move.b  $23(a0),d0
    2.         bset    #0,2(a2,d0.w)
    Change that to
    Code (ASM):
    1.         move.b  $23(a0),d0
    2.         beq.w   DisplaySprite
    3.         bset    #0,2(a2,d0.w)
    What this does is checks if the monitor's respawn ID is set before running the breaking/broken routines. A monitor placed in the level normally would have a unique respawn ID assigned to it, which is how it would keep track of whether it was broken or not. A monitor placed with debug mode, however, would have an ID of 0. Since each monitor placed with debug mode would have the same respawn ID, once you broke one every other one would be spawned broken. By making the game specifically check for respawn ID 0 and skipping the breaking/broken routines for this special case we can fix this issue.
     
  20. Anthall

    Anthall

    Spambot Member
    235
    0
    0
    Leicester, UK
    Sonic the Hedgehog - The Final Showdown
    Thanks shobiz it works now.

    The second piece of code you told me to add is not needed. With it, when I hit the monitor, it left an image of the monitor behind, but without it, it works perfectly.