don't click here

Basic Questions & Answers thread

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

  1. MEGAGEN

    MEGAGEN

    Level 3
    20
    0
    0
    England
    Optimizing Sonic Franchise
    Hello.

    If I am working with a few friends on this then its perfectly reasonable with all due respect to use the term 'we'

    Also spamming 'I' all the time sounds ignorant if you are working with a few friends doesn't it?

    The grammar is completely acceptable, also yes indeed one person is using this account.

    Were here to try and study and learn how to optimize the Sonic franchise for modern hardware.

    We just require alittle assistance from the SonicRetro experts then we will leave you alone and stop bothering you.

    Thankyou for your time.
     
  2. MEGAGEN

    MEGAGEN

    Level 3
    20
    0
    0
    England
    Optimizing Sonic Franchise
    Hello Sonic Retro community hope everyone is good.

    Sorry for asking but does anyone know where exactly this string is located in the disassembled Sonic 1 ROM? "loc_120A2"

    Link for stage 1.

    http://info.sonicretro.org/SCHG_How-to:Fix_Scattered_Rings_Underwater_Physics#Sonic_1_Git_fix

    We have input the parameters for the first stage which is the underwater physics but are having slight difficulty locating the next string? The link for the second stage is here. We are starting from Step 1.

    http://info.sonicretro.org/SCHG_How-to:Speed_Up_Ring_Loss_Process_(With_Underwater)

    Quote

    "Step 1

    (Change the max amount of rings to spill)

    In the scattered rings object, go to "loc_120A2:" and the first line you should see is this:

    moveq #$20,d0"

    We have tried to search for the string 'Scattered Rings' and also searched through many .asm files to try and locate the parameters. The guide states its written for Sonic 2 but shouldn't be that difficult to follow the instructions for Sonic 1?

    Thanks again.
     
  3. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,373
    93
    your mom
    To be clear here, "Sonic-The-Hedgehog-Owari-master" was an old attempt at a Sonic 1 disassembly involving Natsumi, me, and a few others I forgot from 2015. It has been abandoned since and will not be updated ever.

    My question is, how on earth did you end up attempting to use THAT...?
     
  4. MEGAGEN

    MEGAGEN

    Level 3
    20
    0
    0
    England
    Optimizing Sonic Franchise
    Hello and thankyou for the update.

    Honestly I'm not sure but the trail of research led to your disassembly and we completely missed the new version, still having difficulties locating the "loc_120A2" string for the original Sonic.

    May I ask do you have any idea where the 'Scattered Rings' code is located in the Sonic 1 disassembly?

    Thankyou for your time and hope to speak soon.
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    _incObj\25 & 37 Rings.asm, label RingLoss:
     
  6. Digimaks

    Digimaks

    Member
    4
    0
    0
    My first Sonic 1 hack
    Hey guys!
    I was looking through How-To's guides, and one of them interested me, Adding a New Zone in Sonic 1. To say the least- this is some in-depth guid. Unfortunately the whole guide is written only for Hivebrain disassembly, which looks different to me in comparison to Github s1disasm which I am using for my hack. :rolleyes:

    Is it possible to adopt this hivebrain guide to github disasembly? Or they have very different kind of write-up and structuring?
    Or maybe there is a guide somewhere specially for github disasm?

    Bare in mind I am newbie in terms of coding, and not familiar with variety of ways it can be written.
     
  7. MEGAGEN

    MEGAGEN

    Level 3
    20
    0
    0
    England
    Optimizing Sonic Franchise
    Hello MainMemory and thankyou for the reply.

    So it looks like the string 'loc_120A2' is actually converted to 'RingLoss'?

    Looking at the script update are you sure it isn't 'RLoss_Count:'? The segments look the same on that parameter, I'm not 100% sure but this parameter has cmp.w, bcs.s and move.w which the Ringloss hasn't? The link the step 1 is here.

    http://info.sonicretro.org/SCHG_How-to:Speed_Up_Ring_Loss_Process_(With_Underwater)

    No wonder why we couldn't find those strings, I can now see where the updates need to be applied but still it looks complicated in other segments?

    I have tried to convert the strings with only a logical theory based on your update, before we build the ROM could you kindly take alook at the comparison if you don't mind that is?

    1. 'loc_120A2' = RingLoss or RLoss_Count:?

    2. 'loc_120AA' = @belowmax:

    3. 'loc_12132' = @loc_9D62

    4. Now, using your emulator, go to the RAM viewer and go to $FFFFAA00 = Would this be possible with Retroarch? We cannot get any other emulator working at all in modern OS?

    5. SpillRingData: = Is it possible to use the provided strings instead of loading the Ram Viewer at all in this stage? Can we take the parameters already setup for the new table?

    6. loc_120BA = @makerings:

    7. DisplaySprite: = Ring_Main:

    8. loc_121B8: = RLoss_Bounce:

    This is extremely complicated attempting to convert these strings, we are sorry about this.

    I will quite happily write a new guide if we can successfully update the optimizations.

    Thankyou very much for your time and hope to speak soon.
     
  8. Tanman Tanner

    Tanman Tanner

    Member
    10
    0
    1
    Another question regarding the _smps2asm_inc and the Z80 Sound Driver in Sonic 3.
    I want to play a DAC sample outside of a song, in this case, the "Yeah!" sound effect from Sonic CD, called dYeah.
    However, I wanted to ask; Is what I'm asking possible without requiring MegaPCM?

    If it's required, here's a different question: what would the code be for an .ASM sound effect file that has this DAC sample in it?
     
  9. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,373
    93
    your mom
    What you need requires modification of the sound driver. SMPS in general from what I've seen doesn't support DAC in SFX, at least in the mainline Sonic games.
     
  10. Tanman Tanner

    Tanman Tanner

    Member
    10
    0
    1
    Thank you for the help, Ralakimus. I'm not sure it's worth the effort compared to just using Sonic 3's default 1UP song, but I'll definitely look into it and see what I can do.
     
  11. I'm trying to port Sonic 2's HUD system to Sonic 1 but I get this:
    [​IMG]

    Can someone help me? Here's the code:

    [68k]; ---------------------------------------------------------------------------
    ; Subroutine to convert HUD mappings to proper Megadrive sprites
    ; ---------------------------------------------------------------------------

    ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||


    BuildHUD:
    tst.w ($FFFFFE20).w
    beq.s loc_40820
    moveq #0,d1
    btst #3,($FFFFFE05).w
    bne.s BranchTo_loc_40836
    cmpi.b #9,($FFFFFE23).w
    bne.s BranchTo_loc_40836
    addq.w #2,d1

    BranchTo_loc_40836
    bra.s loc_40836
    ; ===========================================================================

    loc_40820:
    moveq #0,d1
    btst #3,($FFFFFE05).w
    bne.s loc_40836
    addq.w #1,d1
    cmpi.b #9,($FFFFFE23).w
    bne.s loc_40836
    addq.w #2,d1

    loc_40836:
    move.w #$90,d3
    move.w #$108,d2
    lea (Map_Obj21).l,a1
    movea.w #$86CA,a3
    add.w d1,d1
    adda.w (a1,d1.w),a1
    move.w (a1)+,d1
    subq.w #1,d1
    bmi.s return_40858
    bsr.w sub_D762

    return_40858:
    rts
    ; End of function h[/68k]
     
  12. MEGAGEN

    MEGAGEN

    Level 3
    20
    0
    0
    England
    Optimizing Sonic Franchise
    So it looks like the string 'loc_120A2' is actually converted to 'RingLoss'?

    Looking at the script update it could be 'RLoss_Count:'? The segments look the same on that parameter, I'm not 100% sure but this parameter has cmp.w, bcs.s and move.w which the Ringloss hasn't? The link the step 1 is here.

    http://info.sonicretro.org/SCHG_How-to:Speed_Up_Ring_Loss_Process_(With_Underwater)#Step_1

    No wonder why we couldn't find those strings, I can now see where the updates need to be applied but still it looks complicated in other segments?

    I have tried to convert the strings with only a logical theory based on this update, before we build the ROM could anyone kindly take alook at the comparison if you don't mind that is?

    1. 'loc_120A2' = RingLoss or RLoss_Count:?

    2. 'loc_120AA' = @belowmax:

    3. 'loc_12132' = @loc_9D62

    4. Now, using your emulator, go to the RAM viewer and go to $FFFFAA00 = Would this be possible with Retroarch? We cannot get any other emulator working at all in modern OS?

    5. SpillRingData: = Is it possible to use the provided strings instead of loading the Ram Viewer at all in this stage? Can we take the parameters already setup for the new table?

    6. loc_120BA = @makerings:

    7. DisplaySprite: = Ring_Main:

    8. loc_121B8: = RLoss_Bounce:

    This is extremely complicated attempting to convert these strings, we are sorry about this.

    I will quite happily write a new guide if we can successfully update the optimizations.

    Thankyou very much for your time and hope to speak soon.
     
  13. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,373
    93
    your mom
    Code (Text):
    1. move.w  (a1)+,d1
    Assuming Map_Obj21 is in Sonic 1 format, the ".w" should be a ".b", since S1 mappings use a byte for the sprite piece count.
     
  14. That worked, thanks!

    Also, if anyone's going to use this, change this line:

    [68k] movea.w #$86CA,a3[/68k]

    To this:

    [68k] movea.w #$6CA,a3[/68k]

    This stops the GHZ trees from showing above the HUD.

    I implemented S2's HUD system to stop rings from appearing in-front of the HUD with S3K's Ring and Object Managers.
     
  15. EmeraldHog

    EmeraldHog

    Member
    7
    0
    1
    So I've been currently trying to make a rom hack off sonic 2 but I am having a few problems. What I'm attempting to make is Sonic 2 Hard Edition, and the differences are to the main game that the level designs are different and there are more enemies and obstacles. But the main issue I'm having is trying to make Tails' AI different, which is whenever tails gets hurt, you lose rings as well. I know there is a beta room of sonic 2 that does this but I'm wondering if I can make the game do the same thing as the beta. I am also having a problem with the designing. I managed to get used to using SonicED 2 but when play the edited level in game, it crashes when I jump, land, or run on certain areas of the level (illegal instruction). Is there something I'm doing wrong? Do I need to use a different level editor? To I need to use a hex editor or coding editor to make the game know that the level is different?
     
  16. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,077
    176
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    To answer your question on the level editor, SonicED2 is outdated now I recommend you using SonLVL for level edits. For the Tails AI code, you could download the disassembly for the Nick Arcade prototype which is on the wiki. From there, you can port his code over to the final game's disassembly, if you're familiar with 68k assembler that is. Also your questions are better suited for the Basic Questions and Answers thread which is a stickied topic.
     
  17. EmeraldHog

    EmeraldHog

    Member
    7
    0
    1
    Wow. Thanks! That was actually very helpful! And I will make sure that I will most my future topics onto Basic Questions as well.
     
  18. Super Egg

    Super Egg

    Master of MS Paint. Member
    313
    0
    16
    Tomball, TEXAS
    Sonic 2 beta 3 hoax
    What you're looking for isn't in the Tails AI. You're gonna have to go into the HurtPlayer routine and remove a lot of the second player mode checking.
     
  19. EmeraldHog

    EmeraldHog

    Member
    7
    0
    1
    I actually think that might work better since I don't have to grab 2 ROMs and put them together, but do I use 68k I'm guessing to remove Tails' hurtplayer codes?
     
  20. EmeraldHog

    EmeraldHog

    Member
    7
    0
    1
    So I realized to have tails lose rings whenever he gets hit (1 player sonic and tails game in sonic 2) I have to delete some of tails code, I know how to use EASy68k but I'm wondering if anyone knows what certain line of codes I need to delete for that to work. I have already tried taking tails code from the Nick arcade rom and replace it into the final games code but when I try to reassemble the rom, the Build.dat says "Build error" and cannot rebuild the rom.