don't click here

Basic Questions & Answers thread

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

  1. Maneo

    Maneo

    Member
    6
    0
    0
    Can someone point me in the direction of a tutorial that might help me make music mods? Preferably more than just a music port, but rather the creation and implementation of original music? For any of the Sonic games for genesis...
     
  2. Thorn

    Thorn

    Tech Member
    335
    19
    18
    Home
    Sonic 2 Retro Remix
    Splitting the ROM treats any file used as a plain ol' Sonic 2 ROM. ESEII moves some code around to make for easier editing -- the issue here is that the palette data and object data didn't move (notice that you can't make objects in ESEII, but you can in SonED2), but the level layout was pushed past the usual end of a Sonic 2 ROM, into added space. The split never looked as far as your layouts. Or at least that's my guess; I haven't used ESEII for level editing in years.

    Notice that ESEII lists the locations of layout, object, palette, and ring data in the ROM. What you can do is take all of the files that did get transferred correctly and save them somewhere, then run split.bat on a plain Sonic 2 ROM, keeping your edited ROM somewhere else. Open the edited ROM in ESEII, and look at the level layout data location for a layout you want to edit. Look at the next act in the list, and see where its layout data is located. Open a hex editor and take all of the data from the start of the layout you want to one byte before the next layout, copy it, make a blank file, and paste the data in there. Have this file overwrite the file from the split, and repeat for all of your layouts. Then move in the files that you kept from your initial split of the edited ROM, and you've got everything. Make a backup so that you don't have to do this ever again.
     
  3. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    Does anyone know where is the location of SetLevelEndType in S3K asm?
     
  4. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    Sorry, I was responding to someone and the quote didn't take.

    I don't use ESE2 anymore cause I couldn't find help on it.

    I solely use SonED2 now.
    The problem I am having is I was editing with SonED2, I finished EHZ1 and went on to edit EHZ2. I tested a few times while editing and it was fine. I got about half way through the level and tried to test, now EHZ2 shows nothing except the background. I was told to remove objects and tiles that don't belong and still no dice. I was then told to make a new fresh disassemblly and copy my levels over and see if it works then. I have made new tiles, there is a new pallet, and a new level layout.

    Which files do I move over into the new disassemblly?

    This is good information though. I will keep it in mind if I pick up ESE2 again.
     
  5. SR212787

    SR212787

    Member
    80
    0
    0
    Gallifrey, TN
    Sonic 2
    Open your .asm and then press CTRL+F. That opens the text find thing. Type the text you want it to find and it will go to it for you within the document.
     
  6. Aka Mekon

    Aka Mekon

    AKA The best Member
    77
    0
    0
    France
    No, I'm just sit on a chair =p
    He wouldn't ask this question if it was so damn easy.

    Anyways, for your question, search for "sub_28C80:", without the quotes . It may be that, as the code is looking like the one in Sonic 2.
     
  7. The Prof

    The Prof

    The Island Professor Member
    107
    0
    16
    Orkney, Scotland
    Sonic 1 Yarmar Edition
    Firstly, to deepen your understanding of SMPS, I'd recommend Tweakers music guide. To make custom music you're going to need to get a tracker and compose some XMs. Then, for implementation of the music, try XM4SMPS. Although it's for XM3SMPS, this guide should help you get to grips with the important parts of XM4SMPS.
     
  8. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    Thanks for your help! Since I'm getting better at learning ASM, I'm trying something new.
     
  9. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    I want to put the walking bomb enemy in Green Hill Zone. But instead of finding any VRAM location I want to make the enemy invisible. Does anyone know how to do it?
     
  10. Afti

    Afti

    ORIGINAL MACHINE Member
    3,521
    0
    0
    It's quick; use this to learn so you don't ask an easy question again if you can help it.

    Code (ASM):
    1.  
    2. Obj5F_Main:             ; XREF: Obj5F_Index
    3.         addq.b  #2,$24(a0)
    4.         move.l  #Map_obj5F,4(a0);Load mappings
    5.         cmpi.w  #$0000,($FFFFFE10).w ; if GHZ1 (00)
    6.                 beq.s       loadartbghz
    7.         cmpi.w  #$0001,($FFFFFE10).w ; if GHZ2 (00)
    8.                 beq.s       loadartbghz
    9.         cmpi.w  #$0002,($FFFFFE10).w ; if GHZ3 (00)
    10.                 beq.s       loadartbghz
    11.         cmpi.w  #$0003,($FFFFFE10).w ; if GHZ4 (unused) (00)
    12.                 beq.s       loadartbghz
    13.                
    14.         move.w  #$400,2(a0) ;Load Art
    15.         bra.s          Conti5FMain
    16. loadartbghz:
    17.         move.w  #$700,2(a0) ;Load Art (assume the blank-bomb is stored at $700)
    18. Conti5FMain:
    19.                 ori.b           #4,1(a0)
    20.         move.b  #3,$18(a0)
    21.         move.b  #$C,$19(a0)
    22.         move.b  $28(a0),d0
    23.         beq.s   loc_11A3C
    24.         move.b  d0,$24(a0)
    25.         rts
    Now, you could also load the invisibomb in Act 1 and a visible one in Act 2 if checking for each Act, rather than the Zone.

    I'm not too good at ASM, but this is simple shit.
     
  11. SMTP

    SMTP

    Tech Member
    Could have used bra.s instead of jmp though...
     
  12. Afti

    Afti

    ORIGINAL MACHINE Member
    3,521
    0
    0
    I've went ahead and did that.

    Anyway... I can't find the routine that pushes you out of walls in Sonic 1. I need to find it because Ray's teleport move makes getting into walls extremely easy- and I can't have collision apply because I want you to be able to get through thin walls with open air on the other side.
    So, I'm going to have any dumbass who warps into a wall die. This should be simple enough, and eliminate S3-style traps, to boot. If you find a bug, you shouldn't have to wait 10 minutes to die.

    Trouble is... I can't find the routine. I'll probably need to revise the detection a bit, too, judging by how it currently works, but I have an idea on how I'm going to do that.
     
  13. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    ObjXX_Main: ; XREF: ObjXX_Index

    A lot of objects are having a label like this. However, the animal object (Obj28) ain't. So my question: Is there any other label, replacing this one?
     
  14. FraGag

    FraGag

    Tech Member
    The "main" routine is called Obj28_Ending (Anml_Ending on the SVN). At the beginning, this routine tests the subtype of the object to determine how the animal should be initialized: most of the time, it will go to Obj28_FromEnemy, but in the ending sequence, the rest of Obj28_Ending will be executed. Animals created by destroying badniks and opening a capsule have a subtype of 0 by default, and animals in the ending sequence are part of the level layout and have a subtype defined.
     
  15. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    I have a problem with is error:

    Code (Text):
    1. s2.macrosetup.asm(201)
    2. s2.sounddriver.asm(2807)
    3. > > >s2.asm(88550): error: symbol undefined
    4. > > > Copy_Listed_Data_To_VRAM
    5. > > >           lea     Copy_Listed_Data_To_VRAM(pc),a1
    6. > > >s2.asm(88550): error: addressing mode not allowed here
    7. > > >           lea     Copy_Listed_Data_To_VRAM(pc),a1
    8. rom size is $400000 bytes (4096 kb). About $6EE71 bytes are padding.
    The code is from s3k asm.
     
  16. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    EDIT: Copy_Listed_Data_To_VRAM is not defined. In other words, the label is not found. Make sure you spelled it correctly.
     
  17. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    Thanks for your help! All I have left now is the Save Screen.
     
  18. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    How can I check if Sonic touched an animal, just like a ring? I tried this:
    Code (ASM):
    1. Obj48_Ending:
    2.         tst.b   $21(a0)     ; has Sonic touched the animal?
    3.         bne.w   Obj48_Collect   ; if yes, branch
    4.         *other coding stuff*
    5.  
    6. Obj48_Collect:
    7.         clr.b   $21(a0)
    8.         bra.w   DeleteObject
    But it didn't worked. What I basically want to do is to make animals collecteable whereever they are. Any ideas?
     
  19. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    It's for the ending right? You may be able just to check its x position and delete it if they are the same as Sonics.
     
  20. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    I'm talking about the ingame enemies. I don't really know how to check those positions, but if I remember correctly I have to use $8(a0) and $C(a0) right?