Basic Questions & Answers thread

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

  1. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    Sorry, I read Sega_GotoTitle to be the same as Sega_WaitEnd when referring to your first code snippet. This is what I meant (though I didn't test), with some commentary:

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;"> <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF614</span> <span style="color: #adadad; font-style: italic;">; initialize counter with $200</span>
    Sega_Wait:
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">2</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF62A</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; use the VBlank routine that reads the joypads and decreases the counter</span>
    <span style="color: #00bfff;">bsr</span>.<span style="color: #00bfff;">w</span> DelayProgram <span style="color: #adadad; font-style: italic;">; wait until VBlank interrupt (î.e. the 'end' of this frame). The aforementioned routine will be executed during the interrupt</span>
    <span style="color: #00bfff;">tst</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF614</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; has the counter reached zero?</span>
    <span style="color: #00bfff;">bne</span>.<span style="color: #00bfff;">s</span> Sega_Wait</pre><!--gc2--><!--CW1vdmUudwkjJiMwMzY7MjAwLCYjMDM2O0ZGRkZGNjE0IDsgaW5pdGlhbGl6ZSBjb3VudGVyIHdpdGgg
    JiMwMzY7MjAwClNlZ2FfV2FpdDoKCW1vdmUuYgkjMiwoJiMwMzY7RkZGRkY2MkEpLncgOyB1c2UgdGhlI
    FZCbGFuayByb3V0aW5lIHRoYXQgcmVhZHMgdGhlIGpveXBhZHMgYW5kIGRlY3JlYXNlcyB0aGUgY291bn
    RlcgoJYnNyLncJRGVsYXlQcm9ncmFtIDsgd2FpdCB1bnRpbCBWQmxhbmsgaW50ZXJydXB0ICjDri5lLiB
    0aGUgJiMzOTtlbmQmIzM5OyBvZiB0aGlzIGZyYW1lKS4gVGhlIGFmb3JlbWVudGlvbmVkIHJvdXRpbmUg
    d2lsbCBiZSBleGVjdXRlZCBkdXJpbmcgdGhlIGludGVycnVwdAoJdHN0LncJKCYjMDM2O0ZGRkZGNjE0K
    S53IDsgaGFzIHRoZSBjb3VudGVyIHJlYWNoZWQgemVybz8KCWJuZS5zCVNlZ2FfV2FpdA==--><!--egc2--><!--g2--></div><!--eg2-->
     
  2. GT Koopa

    GT Koopa

    Member
    2,007
    0
    16
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    So making a start button skip to the title screen. I made this after a few minutes and it works, although it is a little unresponsive. Is there a way to make it better? Is there some unforseen side effects in my code that I should be worried about?

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;"><span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF614</span> <span style="color: #adadad; font-style: italic;">; initialize counter with $200</span>
    Sega_Wait:
    <span style="color: #00bfff;">andi</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">80</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF605</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; is Start button pressed?</span>
    <span style="color: #00bfff;">beq</span>.<span style="color: #00bfff;">s</span> Sega_Waite <span style="color: #adadad; font-style: italic;">; if not, branch</span>
    <span style="color: #00bfff;">bsr</span>.<span style="color: #00bfff;">w</span> Fizz2
    <span style="color: #00bfff;">rts</span>
    &nbsp;
    Sega_Waite:
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">2</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF62A</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; use the VBlank routine that reads the joypads and decreases the counter</span>
    <span style="color: #00bfff;">bsr</span>.<span style="color: #00bfff;">w</span> DelayProgram <span style="color: #adadad; font-style: italic;">; wait until VBlank interrupt (î.e. the 'end' of this frame). </span>
    <span style="color: #adadad; font-style: italic;">;The aforementioned routine will be executed during the interrupt</span>
    &nbsp;
    <span style="color: #00bfff;">tst</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF614</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; has the counter reached zero?</span>
    <span style="color: #00bfff;">bne</span>.<span style="color: #00bfff;">s</span> Sega_Wait
    &nbsp;
    &nbsp;
    &nbsp;
    Fizz2:
    <span style="color: #00bfff;">move</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2700</span>,sr
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">40000001</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">C00004</span><span style="">)</span>.<span style="color: #00bfff;">l</span>
    <span style="color: #adadad; font-style: italic;">;......</span>
    &nbsp;</pre><!--gc2--><!--bW92ZS53CSMmIzAzNjsyMDAsJiMwMzY7RkZGRkY2MTQgOyBpbml0aWFsaXplIGNvdW50ZXIgd2l0aCAm
    IzAzNjsyMDAKCVNlZ2FfV2FpdDoKCWFuZGkuYgkjJiMwMzY7ODAsKCYjMDM2O0ZGRkZGNjA1KS53IDsga
    XMJU3RhcnQgYnV0dG9uIHByZXNzZWQ/CgliZXEucwkgICBTZWdhX1dhaXRlCTsgaWYgbm90LCBicmFuY2gKCWJzci53ICAJRml6ejIKCXJ0cwoJ
    CglTZWdhX1dhaXRlOgkKCW1vdmUuYgkjMiwoJiMwMzY7RkZGRkY2MkEpLncgOyB1c2UgdGhlIFZCbGFua
    yByb3V0aW5lIHRoYXQgcmVhZHMgdGhlIGpveXBhZHMgYW5kIGRlY3JlYXNlcyB0aGUgY291bnRlcgoJYn
    NyLncJRGVsYXlQcm9ncmFtIDsgd2FpdCB1bnRpbCBWQmxhbmsgaW50ZXJydXB0ICjDri5lLiB0aGUgJiM
    zOTtlbmQmIzM5OyBvZiB0aGlzIGZyYW1lKS4gCgk7VGhlIGFmb3JlbWVudGlvbmVkIHJvdXRpbmUgd2ls
    bCBiZSBleGVjdXRlZCBkdXJpbmcgdGhlIGludGVycnVwdAoKCXRzdC53CSgmIzAzNjtGRkZGRjYxNCkud
    yA7IGhhcyB0aGUgY291bnRlciByZWFjaGVkIHplcm8/CglibmUucyAJU2VnYV9XYWl0CgkJCgkJCgkJCglGaXp6MjoJCgkJbW92ZQkjJiMwMzY7MjcwMCxzcgoJ
    CW1vdmUubAkjJiMwMzY7NDAwMDAwMDEsKCYjMDM2O0MwMDAwNCkubAogICAgICAgICAgICAgICAgOy4uL
    i4uLgo=--><!--egc2--><!--g2--></div><!--eg2-->
     
  3. Azu

    Azu

    I must be stupid. Member
    <!--quoteo(post=501382:date=Sep 5 2010, 07:34 AM:name=Azu)--><div class='quotetop'>QUOTE (Azu @ Sep 5 2010, 07:34 AM) <a href="index.php?act=findpost&pid=501382">[​IMG]</a></div><div class='quotemain'><!--quotec-->Going back to the S3K Debug List. I've Kind of get the jist of adding it. However, it doesn't seem to work.

    Also, is there a list for the object name? Like how is the asm? Obj_HCZLargeFan"
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;"> <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">6C31A</span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">362608</span>+<span style="color: #ff0000;">$</span><span style="color: #ff0000;">1000000</span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">43FF</span></pre><!--gc2--><!--CQlkYy5sICYjMDM2OzZDMzFBCgkJZGMubCAmIzAzNjszNjI2MDgrJiMwMzY7MTAwMDAwMAoJCWRjLncg
    JiMwMzY7NDNGRg==--><!--egc2--><!--g2--></div><!--eg2-->

    I'm trying to add MGZ's boss to the debug list.<!--QuoteEnd--></div><!--QuoteEEnd-->


    Just wondering if anyone over looked it.
     
  4. E-122-Psi

    E-122-Psi

    Member
    2,118
    304
    63
    What method would you guys advise for editing Sonic 1's demos (if any)?
     
  5. FeliciaVal

    FeliciaVal

    Member
    <!--quoteo(post=502228:date=Sep 7 2010, 07:13 AM:name=E-122-Psi)--><div class='quotetop'>QUOTE (E-122-Psi @ Sep 7 2010, 07:13 AM) <a href="index.php?act=findpost&pid=502228">[​IMG]</a></div><div class='quotemain'><!--quotec-->What method would you guys advise for editing Sonic 1's demos (if any)?<!--QuoteEnd--></div><!--QuoteEEnd-->
    I kinda fixed the demos by following this: <a href="http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback" target="_blank">http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback</a> Is not perfect but is much better than having a crazy character going out of control and spamming jumpdashes and whatnot XD
     
  6. MarkeyJester

    MarkeyJester

    A D V A N C E Resident Jester
    2,080
    211
    43
    Japan
    Here's a question I hope can be answered, it's not too important but is something I'm curious of...

    "OscillateNumDo"

    What is that subroutine used for? (Or better yet, what is it's purpose?)

    I assume it to be something similar to a random number generator, but it seems to be unused from what I've seen, can anyone shed some light on this?

    Edit: Please note I'm referring to the Sonic 1 Hivebrain 2007 disassembly source in which it came from.
     
  7. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=502491:date=Sep 7 2010, 06:35 PM:name=MarkeyJester)--><div class='quotetop'>QUOTE (MarkeyJester @ Sep 7 2010, 06:35 PM) <a href="index.php?act=findpost&pid=502491">[​IMG]</a></div><div class='quotemain'><!--quotec-->Here's a question I hope can be answered, it's not too important but is something I'm curious of...

    "OscillateNumDo"

    What is that subroutine used for? (Or better yet, what is it's purpose?)

    I assume it to be something similar to a random number generator, but it seems to be unused from what I've seen, can anyone shed some light on this?

    Edit: Please note I'm referring to the Sonic 1 Hivebrain 2007 disassembly source in which it came from.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Unless I'm stupid and blind, it is used in End_MainLoop. It's used a few times throughout the game actually. A quick search revealed that. As for the purpose - it might have something to do with animating the rings or something, since it is right above ChangeRingFrame.
    My real idea of what this shit is - I just think it's a random number generator initialization, or like a randomizer for the random number generator.


    <!--quoteo(post=502266:date=Sep 7 2010, 08:15 AM:name=FeliciaVal)--><div class='quotetop'>QUOTE (FeliciaVal @ Sep 7 2010, 08:15 AM) <a href="index.php?act=findpost&pid=502266">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=502228:date=Sep 7 2010, 07:13 AM:name=E-122-Psi)--><div class='quotetop'>QUOTE (E-122-Psi @ Sep 7 2010, 07:13 AM) <a href="index.php?act=findpost&pid=502228">[​IMG]</a></div><div class='quotemain'><!--quotec-->What method would you guys advise for editing Sonic 1's demos (if any)?<!--QuoteEnd--></div><!--QuoteEEnd-->
    I kinda fixed the demos by following this: <a href="http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback" target="_blank">http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback</a> Is not perfect but is much better than having a crazy character going out of control and spamming jumpdashes and whatnot XD
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    A pure HEX editor. Might take forever, but I'm pretty sure that's how they did it back when Sonic 1 was originalyl coded. Or make use of that unused subroutine to record demos:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">; ---------------------------------------------------------------------------</span>
    <span style="color: #adadad; font-style: italic;">; Subroutine to move Sonic in demo mode</span>
    <span style="color: #adadad; font-style: italic;">; ---------------------------------------------------------------------------</span>
    &nbsp;
    <span style="color: #adadad; font-style: italic;">; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||</span>
    &nbsp;
    &nbsp;
    MoveSonicInDemo: <span style="color: #adadad; font-style: italic;">; XREF: Level_MainLoop; et al</span>
    <span style="color: #00bfff;">tst</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFFF0</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; is demo mode on?</span>
    <span style="color: #00bfff;">bne</span>.<span style="color: #00bfff;">s</span> MoveDemo_On <span style="color: #adadad; font-style: italic;">; if yes, branch</span>
    <span style="color: #00bfff;">rts</span>
    <span style="color: #adadad; font-style: italic;">; ===========================================================================</span>
    &nbsp;
    <span style="color: #adadad; font-style: italic;">; This is an unused subroutine for recording a demo</span>
    &nbsp;
    MoveDemo_Record:
    <span style="color: #00bfff;">lea</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">80000</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="font-weight:bold;">a1</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF790</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">adda</span>.<span style="color: #00bfff;">w</span> <span style="font-weight:bold;">d0</span>,<span style="font-weight:bold;">a1</span></pre><!--gc2--><!--OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
    LS0tLS0tLS0tLS0tLS0tLS0KOyBTdWJyb3V0aW5lIHRvCW1vdmUgU29uaWMgaW4gZGVtbyBtb2RlCjsgL
    S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS
    0tLS0tLS0tLS0tLS0tCgo7IHx8fHx8fHx8fHx8fHx8fCBTIFUgQglSIE8gVSBUCUkgTiBFIHx8fHx8fHx
    8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fAoKCk1vdmVTb25pY0luRGVtbzoJCQk7IFhSRUY6
    IExldmVsX01haW5Mb29wOyBldCBhbAoJCXRzdC53CSgmIzAzNjtGRkZGRkZGMCkudwk7IGlzIGRlbW8gb
    W9kZSBvbj8KCQlibmUucwlNb3ZlRGVtb19Pbgk7IGlmIHllcywgYnJhbmNoCgkJcnRzCQo7ID09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
    9PT09PT09PQoKOyBUaGlzIGlzIGFuIHVudXNlZCBzdWJyb3V0aW5lIGZvciByZWNvcmRpbmcgYSBkZW1v
    CgpNb3ZlRGVtb19SZWNvcmQ6CgkJbGVhCSgmIzAzNjs4MDAwMCkubCxhMQoJCW1vdmUudwkoJiMwMzY7R
    kZGRkY3OTApLncsZDAKCQlhZGRhLncJZDAsYTE=--><!--egc2--><!--g2--></div><!--eg2-->
    I have no idea how you'd use it, though.
     
  8. theocas

    theocas

    Tech Member
    346
    0
    16
    OK, so I am trying to get GEMS running, I initialize it and stuff, no crash. I play a sound, and an Illegal Instruction happens, followed by Line 1010 and Line 1111 Emulator, but the sound keeps playing as GEMS (apparently) runs on the Z80.
    Apparently the driver is screwing up the stack. Anyone have any idea what might cause this? I'm trying to play GENS audio for specific tracks, and use SMPS for others.
     
  9. E-122-Psi

    E-122-Psi

    Member
    2,118
    304
    63
    <!--quoteo(post=502531:date=Sep 8 2010, 12:23 AM:name=theocas)--><div class='quotetop'>QUOTE (theocas @ Sep 8 2010, 12:23 AM) <a href="index.php?act=findpost&pid=502531">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=502266:date=Sep 7 2010, 08:15 AM:name=FeliciaVal)--><div class='quotetop'>QUOTE (FeliciaVal @ Sep 7 2010, 08:15 AM) <a href="index.php?act=findpost&pid=502266">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=502228:date=Sep 7 2010, 07:13 AM:name=E-122-Psi)--><div class='quotetop'>QUOTE (E-122-Psi @ Sep 7 2010, 07:13 AM) <a href="index.php?act=findpost&pid=502228">[​IMG]</a></div><div class='quotemain'><!--quotec-->What method would you guys advise for editing Sonic 1's demos (if any)?<!--QuoteEnd--></div><!--QuoteEEnd-->
    I kinda fixed the demos by following this: <a href="http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback" target="_blank">http://info.sonicretro.org/SCHG_How-to:Fix_demo_playback</a> Is not perfect but is much better than having a crazy character going out of control and spamming jumpdashes and whatnot XD
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    A pure HEX editor. Might take forever, but I'm pretty sure that's how they did it back when Sonic 1 was originalyl coded. Or make use of that unused subroutine to record demos:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">; ---------------------------------------------------------------------------</span>
    <span style="color: #adadad; font-style: italic;">; Subroutine to move Sonic in demo mode</span>
    <span style="color: #adadad; font-style: italic;">; ---------------------------------------------------------------------------</span>
    &nbsp;
    <span style="color: #adadad; font-style: italic;">; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||</span>
    &nbsp;
    &nbsp;
    MoveSonicInDemo: <span style="color: #adadad; font-style: italic;">; XREF: Level_MainLoop; et al</span>
    <span style="color: #00bfff;">tst</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFFF0</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; is demo mode on?</span>
    <span style="color: #00bfff;">bne</span>.<span style="color: #00bfff;">s</span> MoveDemo_On <span style="color: #adadad; font-style: italic;">; if yes, branch</span>
    <span style="color: #00bfff;">rts</span>
    <span style="color: #adadad; font-style: italic;">; ===========================================================================</span>
    &nbsp;
    <span style="color: #adadad; font-style: italic;">; This is an unused subroutine for recording a demo</span>
    &nbsp;
    MoveDemo_Record:
    <span style="color: #00bfff;">lea</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">80000</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="font-weight:bold;">a1</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF790</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">adda</span>.<span style="color: #00bfff;">w</span> <span style="font-weight:bold;">d0</span>,<span style="font-weight:bold;">a1</span></pre><!--gc2--><!--OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
    LS0tLS0tLS0tLS0tLS0tLS0KOyBTdWJyb3V0aW5lIHRvCW1vdmUgU29uaWMgaW4gZGVtbyBtb2RlCjsgL
    S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS
    0tLS0tLS0tLS0tLS0tCgo7IHx8fHx8fHx8fHx8fHx8fCBTIFUgQglSIE8gVSBUCUkgTiBFIHx8fHx8fHx
    8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fAoKCk1vdmVTb25pY0luRGVtbzoJCQk7IFhSRUY6
    IExldmVsX01haW5Mb29wOyBldCBhbAoJCXRzdC53CSgmIzAzNjtGRkZGRkZGMCkudwk7IGlzIGRlbW8gb
    W9kZSBvbj8KCQlibmUucwlNb3ZlRGVtb19Pbgk7IGlmIHllcywgYnJhbmNoCgkJcnRzCQo7ID09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
    9PT09PT09PQoKOyBUaGlzIGlzIGFuIHVudXNlZCBzdWJyb3V0aW5lIGZvciByZWNvcmRpbmcgYSBkZW1v
    CgpNb3ZlRGVtb19SZWNvcmQ6CgkJbGVhCSgmIzAzNjs4MDAwMCkubCxhMQoJCW1vdmUudwkoJiMwMzY7R
    kZGRkY3OTApLncsZDAKCQlhZGRhLncJZDAsYTE=--><!--egc2--><!--g2--></div><!--eg2-->
    I have no idea how you'd use it, though.
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    I think I may have found out an alternate way to get demos to work though this might be worth looking to in case it doesn't work out (that's an odd little subroutine, wonder how it's implemented).

    Obj41 (the springs in Sonic 1) are causing me problems right now. I've managed to work out a code so as to extend the spring height via a move:

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">Obj41_BounceUp: <span style="color: #adadad; font-style: italic;">; XREF: Obj41_Up</span>
    <span style="color: #00bfff;">addq</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">2</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">24</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    <span style="color: #00bfff;">addq</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">8</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">C</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    <span style="color: #00bfff;">tst</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFFA4</span><span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00bfff;">beq</span>.<span style="color: #00bfff;">s</span> NonHammer_BounceUp
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span>-<span style="color: #ff0000;">$</span><span style="color: #ff0000;">D00</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">30</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    <span style="color: #00bfff;">jmp</span> Obj41_NHBounceUp
    NonHammer_BounceUp:
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span>-<span style="color: #ff0000;">$</span><span style="color: #ff0000;">A00</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">30</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    Obj41_NHBounceUp:
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">30</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">12</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span> <span style="color: #adadad; font-style: italic;">; move Sonic upwards</span>
    <span style="color: #00bfff;">bset</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">22</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    <span style="color: #00bfff;">bclr</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">3</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">22</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span></pre><!--gc2--><!--T2JqNDFfQm91bmNlVXA6CQkJCTsgWFJFRjogT2JqNDFfVXAKCQlhZGRxLmIJIzIsJiMwMzY7MjQoYTAp
    CgkJYWRkcS53CSM4LCYjMDM2O0MoYTEpCgkJdHN0LmIJKCYjMDM2O0ZGRkZGRkE0KS53CgkJYmVxLnMJT
    m9uSGFtbWVyX0JvdW5jZVVwCQkKCQltb3ZlLncJIy0mIzAzNjtEMDAsJiMwMzY7MzAoYTApCgkJam1wCU
    9iajQxX05IQm91bmNlVXAKTm9uSGFtbWVyX0JvdW5jZVVwOgoJCW1vdmUudwkjLSYjMDM2O0EwMCwmIzA
    zNjszMChhMCkKT2JqNDFfTkhCb3VuY2VVcDoKCQltb3ZlLncJJiMwMzY7MzAoYTApLCYjMDM2OzEyKGEx
    KQk7IG1vdmUgU29uaWMgdXB3YXJkcwoJCWJzZXQJIzEsJiMwMzY7MjIoYTEpCgkJYmNscgkjMywmIzAzN
    jsyMihhMSk=--><!--egc2--><!--g2--></div><!--eg2-->

    There are just a couple odd problems:

    * I don't know how to differenciate the red and yellow springs meaning both are changed to have the same height. Any coding or branching to notice a red or yellow spring?

    * The spring code has problems recognising jump animations or flags. eg. If I activate a hammer with a flag while jumping, the spring does a degraded little bounce, this change can't be edited suggesting it somehow works differently with normal jumping or ground based flags used on the spring (though oddly I can get the height change to work properly if I jump normally on the spring and then use the attack flag on a second bounce, supposedly meaning it only has problems activating the spring initially with it rather than using it altogether). Any idea what's causing the problem?
     
  10. ColinC10

    ColinC10

    Tech Member
    <!--quoteo(post=502491:date=Sep 8 2010, 02:35 AM:name=MarkeyJester)--><div class='quotetop'>QUOTE (MarkeyJester @ Sep 8 2010, 02:35 AM) <a href="index.php?act=findpost&pid=502491">[​IMG]</a></div><div class='quotemain'><!--quotec-->Here's a question I hope can be answered, it's not too important but is something I'm curious of...

    "OscillateNumDo"

    What is that subroutine used for? (Or better yet, what is it's purpose?)<!--QuoteEnd--></div><!--QuoteEEnd-->
    This subroutine keeps altering a set of numbers, stored at $FFFFFE60 onwards. Each number changes according to a set pattern, and certain parts of the game use these numbers in different ways. The most common one is moving platforms. There are lots of types of platforms that move back and forth, not at a set speed, but so that they move slowly at the edges and quickly in the middle. Rather than each platform individually calculating this speed change, they just pick one of the oscillating numbers that fits the desired speed and range and use this when calculating the position. This also has the advantage of synchronising the platforms' movements.
     
  11. MarkeyJester

    MarkeyJester

    A D V A N C E Resident Jester
    2,080
    211
    43
    Japan
    Aha of course, that would explain why the platforms never go out of sync regardless of the time they're loaded, thanks for that, much appreciated.
     
  12. GT Koopa

    GT Koopa

    Member
    2,007
    0
    16
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    [​IMG]

    So I used the "splitting the ghz tiles from the title screen" tutorial a long while back. However, My ending screen looks like the above. I tested and it calls up neither the title screen tiles nor the GHZ tiles. What does it call up?
     
  13. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    Today I've been screwing around with some deformation code. Well, to be honest, I've just copyed a line and pasted it a few times to get this:

    [​IMG]

    Now, if you look at the very left on this image, you will notice, that you can see the background. Of course, it's not a big issue, but it still annoys. So, is it possible to move the entire layout one col to the right without needing to redo everything?

    EDIT: Fixed myself, after a one hour job. ._.
     
  14. I've been looking to put in a character that has a slightly longer name than Sonic, and I tried to alter the name on his life icon to account for more tiles. I inserted the tiles, altered the mappings and everything, and all I seem to get is some bars of junk when I reference the new tiles. The mappings still seem to work with the older tiles though.

    [​IMG]

    My point being, is it possible, or reasonable, to make the name on the life icon to read extra tiles, or am I better off scrapping the name or abbreviating it?
     
  15. You'd need to make extra VRAM space. It appears that it is trying to load something that is mappings, or some other data.



    Edit: Have a question of my own : )




    I need some assistance fixing this Knuckles bug.


    If you grab onto a wall from a glide, and have an object (Most noticably CNZ's block thingy) push you down to the ground and there's no room, you get forced into the floor instead of dying. I checked the 'wall meets floor' routines but haven't found anything. Can anyone help? :(
     
  16. ColinC10

    ColinC10

    Tech Member
    <!--quoteo(post=504074:date=Sep 11 2010, 01:03 AM:name=KarrotKonvoy)--><div class='quotetop'>QUOTE (KarrotKonvoy @ Sep 11 2010, 01:03 AM) <a href="index.php?act=findpost&pid=504074">[​IMG]</a></div><div class='quotemain'><!--quotec-->I've been looking to put in a character that has a slightly longer name than Sonic, and I tried to alter the name on his life icon to account for more tiles. I inserted the tiles, altered the mappings and everything, and all I seem to get is some bars of junk when I reference the new tiles. The mappings still seem to work with the older tiles though.

    [​IMG]

    My point being, is it possible, or reasonable, to make the name on the life icon to read extra tiles, or am I better off scrapping the name or abbreviating it?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The area of VRAM you're using is reserved for the Horizontal Scroll Table, so whenever the camera moves, anything you put in there will be overwritten by the weird stripes you're seeing. Here are the reserved areas that you have to avoid (divide by $20 to get the tile number):

    $C000 - $CFFF Plane A pattern name table
    $E000 - $EFFF Plane B pattern name table
    $F800 - $FA7F Sprite attribute table
    $FC00 - $FFFF Horizontal scroll table

    All you have to do is find another area of VRAM and point your mappings at that. I'm sure there must be some free space around there somewhere (directly after the checkpoint art, perhaps?). Using Gens KMod's debug mode is a useful way to see what's happening in VRAM while you're playing. Quick tip: when you find what looks like a suitable space, check it doesn't get overwritten by the title card or act clear text!
     
  17. Spanner

    Spanner

    The Tool Member
    3,306
    109
    43
    United Kingdom
    Sonic Hacking Contest
    I'm having a few issues with implementing the Giant Ring's art in Sonic 2. It seems that the way that it's done in Sonic 1 can't be applied here. Can anyone help me with implementing the art?
     
  18. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=504300:date=Sep 11 2010, 06:04 AM:name=SOTI)--><div class='quotetop'>QUOTE (SOTI @ Sep 11 2010, 06:04 AM) <a href="index.php?act=findpost&pid=504300">[​IMG]</a></div><div class='quotemain'><!--quotec-->I'm having a few issues with implementing the Giant Ring's art in Sonic 2. It seems that the way that it's done in Sonic 1 can't be applied here. Can anyone help me with implementing the art?<!--QuoteEnd--></div><!--QuoteEEnd-->
    So what exactly is the problem? The art not loading?
     
  19. ColinC10

    ColinC10

    Tech Member
    <!--quoteo(post=504300:date=Sep 11 2010, 02:04 PM:name=SOTI)--><div class='quotetop'>QUOTE (SOTI @ Sep 11 2010, 02:04 PM) <a href="index.php?act=findpost&pid=504300">[​IMG]</a></div><div class='quotemain'><!--quotec-->I'm having a few issues with implementing the Giant Ring's art in Sonic 2. It seems that the way that it's done in Sonic 1 can't be applied here. Can anyone help me with implementing the art?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The giant ring's art in Sonic 1 is loaded from the AniArt_GiantRing subroutine, which is called from AniArt_Load. If you port this subroutine over with a few minor tweaks it should work the same way. Have you tried to do this yet, or is it the "minor tweaks" part that is causing the problem?
     
  20. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=504311:date=Sep 11 2010, 06:38 AM:name=ColinC10)--><div class='quotetop'>QUOTE (ColinC10 @ Sep 11 2010, 06:38 AM) <a href="index.php?act=findpost&pid=504311">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--quoteo(post=504300:date=Sep 11 2010, 02:04 PM:name=SOTI)--><div class='quotetop'>QUOTE (SOTI @ Sep 11 2010, 02:04 PM) <a href="index.php?act=findpost&pid=504300">[​IMG]</a></div><div class='quotemain'><!--quotec-->I'm having a few issues with implementing the Giant Ring's art in Sonic 2. It seems that the way that it's done in Sonic 1 can't be applied here. Can anyone help me with implementing the art?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The giant ring's art in Sonic 1 is loaded from the AniArt_GiantRing subroutine, which is called from AniArt_Load. If you port this subroutine over with a few minor tweaks it should work the same way. Have you tried to do this yet, or is it the "minor tweaks" part that is causing the problem?
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    Why does the art have to be uncompressed? Wouldn't Nemesis compressed art do the same thing?