SRAM Support in Sonic 1?

Discussion in 'Engineering & Reverse Engineering' started by theocas, Apr 19, 2010.

Thread Status:
Not open for further replies.
  1. theocas

    theocas

    Tech Member
    346
    0
    16
    I know that this is possible since I modified the Header of my ROM to this:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    SRAMSupport: <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">5241E020</span> <span style="color: #adadad; font-style: italic;">; change to $5241E020 to create SRAM</span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202020</span> <span style="color: #adadad; font-style: italic;">; SRAM start</span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">202020C0</span> <span style="color: #adadad; font-style: italic;">; SRAM end</span>
    &nbsp;</pre><!--gc2--><!--ClNSQU1TdXBwb3J0OglkYy5sICYjMDM2OzUyNDFFMDIwCTsgY2hhbmdlIHRvICYjMDM2OzUyNDFFMDIw
    IHRvIGNyZWF0ZQlTUkFNCgkJZGMubCAmIzAzNjsyMDIwMjAyMAkJOyBTUkFNIHN0YXJ0CgkJZGMubCAmI
    zAzNjsyMDIwMjBDMAkJOyBTUkFNIGVuZAo=--><!--egc2--><!--g2--></div><!--eg2-->
    I tried doing this in the Lamppost Save routine:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    <span style="color: #adadad; font-style: italic;">; and now to the SRAM:</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">28</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202020</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lamppost number</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE30</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202021</span><span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">8</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202022</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; x-position</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">C</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202023</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; y-position</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;">FFFFFE20</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202026</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rings</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE1B</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202040</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lives</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE22</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020204F</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; time</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF742</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202055</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; routine counter for dynamic level mod</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;">FFFFF72E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202065</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lower y-boundary of level</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;">FFFFF700</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202067</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen x-position</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;">FFFFF704</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202069</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen y-position</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;">FFFFF708</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206A</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF70C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206C</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF710</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206E</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF714</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202070</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF718</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202072</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF71C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202074</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF648</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202076</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water height</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64D</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202078</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rountine counter for water</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202080</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water direction</span>
    &nbsp;</pre><!--gc2--><!--CjsgYW5kIG5vdyB0byB0aGUgU1JBTToKCQltb3ZlLmIJJiMwMzY7MjgoYTApLCgmIzAzNjsyMDIwMjAy
    MCkudyAJCTsgbGFtcHBvc3QgbnVtYmVyCgkJbW92ZS5iCSgmIzAzNjtGRk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CW1vdmUudwkoJiMwMzY7RkZGRkY3MT
    QpLncsKCYjMDM2OzIwMjAyMDcwKS53IAk7IGJnIHBvc2l0aW9uCgkJbW92ZS53CSgmIzAzNjtGRkZGRjc
    xOCkudywoJiMwMzY7MjAyMDIwNzIpLncgCTsgYmcgcG9zaXRpb24KCQltb3ZlLncJKCYjMDM2O0ZGRkZG
    NzFDKS53LCgmIzAzNjsyMDIwMjA3NCkudyAJOyBiZyBwb3NpdGlvbgoJCW1vdmUudwkoJiMwMzY7RkZGR
    kY2NDgpLncsKCYjMDM2OzIwMjAyMDc2KS53IAk7IHdhdGVyIGhlaWdodAoJCW1vdmUuYgkoJiMwMzY7Rk
    ZGRkY2NEQpLncsKCYjMDM2OzIwMjAyMDc4KS53IAk7IHJvdW50aW5lIGNvdW50ZXIgZm9yIHdhdGVyCgk
    JbW92ZS5iCSgmIzAzNjtGRkZGRjY0RSkudywoJiMwMzY7MjAyMDIwODApLncgCTsgd2F0ZXIgZGlyZWN0
    aW9uCg==--><!--egc2--><!--g2--></div><!--eg2-->
    But get an Invalid Value error (Just what I expected) I think this is the right approach, but I haven't looked at a Sonic 3 disasembly to see how S3 did it( I can't find a S3 disasembly) Can anyone give me some pointers or explain how Sonic 3 saves data to it's SRAM from ASM? Sorry if I am asking all the obvious questions, but Thanks for any help!
     
  2. Hanoch

    Hanoch

    Also known as TheKnock, Birashot Member
    491
    0
    0
    Israel
    everything
    20202020 Isn't a valid sram start/end, you need to change it to 200000 for Sram start and 2003FF for sram end.
     
  3. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    From what I can tell by lookind at it (even though I don't know how SRAM works):
    <!--quoteo(post=444396:date=Apr 19 2010, 04:22 PM:name=ts230)--><div class='quotetop'>QUOTE (ts230 @ Apr 19 2010, 04:22 PM) <a href="index.php?act=findpost&pid=444396">[​IMG]</a></div><div class='quotemain'><!--quotec--><!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    <span style="color: #adadad; font-style: italic;">; and now to the SRAM:</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">28</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202020</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lamppost number</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE30</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202021</span><span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">8</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202022</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; x-position</span>
    -> <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">C</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202023</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; y-position</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;">FFFFFE20</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202026</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rings</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE1B</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202040</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lives</span>
    -> <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE22</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020204F</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; time</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF742</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202055</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; routine counter for dynamic level mod</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;">FFFFF72E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202065</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lower y-boundary of level</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;">FFFFF700</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202067</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen x-position</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;">FFFFF704</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202069</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen y-position</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;">FFFFF708</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206A</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF70C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206C</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF710</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">2020206E</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF714</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202070</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF718</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202072</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF71C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202074</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF648</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202076</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water height</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64D</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202078</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rountine counter for water</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202080</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water direction</span>
    &nbsp;</pre><!--gc2--><!--CjsgYW5kIG5vdyB0byB0aGUgU1JBTToKCQltb3ZlLmIJJiMwMzY7MjgoYTApLCgmIzAzNjsyMDIwMjAy
    MCkudyAJCTsgbGFtcHBvc3QgbnVtYmVyCgkJbW92ZS5iCSgmIzAzNjtGRkZGRkUzMCkudywoJiMwMzY7M
    jAyMDIwMjEpLncKCQltb3ZlLncJOChhMCksKCYjMDM2OzIwMjAyMDIyKS53CQk7IHgtcG9zaXRpb24KCS
    0mZ3Q7CW1vdmUudwkmIzAzNjtDKGEwKSwoJiMwMzY7MjAyMDIwMjMpLncJCTsgeS1wb3NpdGlvbgoJCW1
    vdmUudwkoJiMwMzY7RkZGRkZFMjApLncsKCYjMDM2OzIwMjAyMDI2KS53IAk7IHJpbmdzCgkJbW92ZS5i
    CSgmIzAzNjtGRkZGRkUxQikudywoJiMwMzY7MjAyMDIwNDApLncgCTsgbGl2ZXMKCS0mZ3Q7CW1vdmUub
    AkoJiMwMzY7RkZGRkZFMjIpLncsKCYjMDM2OzIwMjAyMDRGKS53IAk7IHRpbWUKCQltb3ZlLmIJKCYjMD
    M2O0ZGRkZGNzQyKS53LCgmIzAzNjsyMDIwMjA1NSkudyAJOyByb3V0aW5lIGNvdW50ZXIgZm9yIGR5bmF
    taWMgbGV2ZWwgbW9kCgktJmd0Owltb3ZlLncJKCYjMDM2O0ZGRkZGNzJFKS53LCgmIzAzNjsyMDIwMjA2
    NSkudyAJOyBsb3dlciB5LWJvdW5kYXJ5IG9mIGxldmVsCgktJmd0Owltb3ZlLncJKCYjMDM2O0ZGRkZGN
    zAwKS53LCgmIzAzNjsyMDIwMjA2NykudyAJOyBzY3JlZW4geC1wb3NpdGlvbgoJLSZndDsJbW92ZS53CS
    gmIzAzNjtGRkZGRjcwNCkudywoJiMwMzY7MjAyMDIwNjkpLncgCTsgc2NyZWVuIHktcG9zaXRpb24KCQl
    tb3ZlLncJKCYjMDM2O0ZGRkZGNzA4KS53LCgmIzAzNjsyMDIwMjA2QSkudyAJOyBiZyBwb3NpdGlvbgoJ
    CW1vdmUudwkoJiMwMzY7RkZGRkY3MEMpLncsKCYjMDM2OzIwMjAyMDZDKS53IAk7IGJnIHBvc2l0aW9uC
    gkJbW92ZS53CSgmIzAzNjtGRkZGRjcxMCkudywoJiMwMzY7MjAyMDIwNkUpLncgCTsgYmcgcG9zaXRpb2
    4KCQltb3ZlLncJKCYjMDM2O0ZGRkZGNzE0KS53LCgmIzAzNjsyMDIwMjA3MCkudyAJOyBiZyBwb3NpdGl
    vbgoJCW1vdmUudwkoJiMwMzY7RkZGRkY3MTgpLncsKCYjMDM2OzIwMjAyMDcyKS53IAk7IGJnIHBvc2l0
    aW9uCgkJbW92ZS53CSgmIzAzNjtGRkZGRjcxQykudywoJiMwMzY7MjAyMDIwNzQpLncgCTsgYmcgcG9za
    XRpb24KCQltb3ZlLncJKCYjMDM2O0ZGRkZGNjQ4KS53LCgmIzAzNjsyMDIwMjA3NikudyAJOyB3YXRlci
    BoZWlnaHQKCQltb3ZlLmIJKCYjMDM2O0ZGRkZGNjREKS53LCgmIzAzNjsyMDIwMjA3OCkudyAJOyByb3V
    udGluZSBjb3VudGVyIGZvciB3YXRlcgoJCW1vdmUuYgkoJiMwMzY7RkZGRkY2NEUpLncsKCYjMDM2OzIw
    MjAyMDgwKS53IAk7IHdhdGVyIGRpcmVjdGlvbgo=--><!--egc2--><!--g2--></div><!--eg2--><!--QuoteEnd--></div><!--QuoteEEnd-->
    The lines with a -> are moving either a word or a longword to an odd value (RAM address ending with 1, 3, 5, 7, 9, B, D or F). Don't ask me why, but this doesn't work. You need to find an even address (RAM address ending with 0, 2, 4, 6, 8, A, C or E).

    But, as already mentioned, I'm not sure if this works at all.
     
  4. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=444401:date=Apr 19 2010, 07:38 AM:name=Hanoch)--><div class='quotetop'>QUOTE (Hanoch @ Apr 19 2010, 07:38 AM) <a href="index.php?act=findpost&pid=444401">[​IMG]</a></div><div class='quotemain'><!--quotec-->20202020 Isn't a valid sram start/end, you need to change it to 200000 for Sram start and 2003FF for sram end.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Thanks, I will try that out.
    Selbi: I will change all odd RAM adresses to even ones and see how it works.
     
  5. MarkeyJester

    MarkeyJester

    A D V A N C E Resident Jester
    2,083
    215
    43
    Japan
    <!--quoteo(post=444402:date=Apr 19 2010, 02:39 PM:name=Selbi)--><div class='quotetop'>QUOTE (Selbi @ Apr 19 2010, 02:39 PM) <a href="index.php?act=findpost&pid=444402">[​IMG]</a></div><div class='quotemain'><!--quotec-->The lines with a -> are moving either a word or a longword to an odd value (RAM address ending with 1, 3, 5, 7, 9, B, D or F). Don't ask me why, but this doesn't work. You need to find an even address (RAM address ending with 0, 2, 4, 6, 8, A, C or E).

    But, as already mentioned, I'm not sure if this works at all.<!--QuoteEnd--></div><!--QuoteEEnd-->
    The thing is, I've been told that they need to be odd addresses, and you cannot hold code on the even addresses, of course I don't think that's 100% true, though games that use SRam all seem to move only a byte of data to it, but in odd addresses too, so I would asume it would be safe to keep it on an odd address and not to move words or long-words of data too and from it. I set it this way for BroTro, and it's been tested with special carts on HW that allow SRam support, and apparently it all works fine, so I would asume so.
     
  6. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    Save ram on the Genesis MUST be on odd addresses only. 0x200001, 0x200003, 0x200005, etc. This is because the 68000 uses a word bus, and the save ram only sits on the odd byte leaving the even byte unsupported. The 68000 has a special command for transferring data to/from peripherals or memory that only sits on one byte of the word - MOVEP (move peripheral).

    The 68000 cannot read/write words or longs to odd addresses (you get an odd address exception if you do). MOVEP instead breaks word and long read/writes into bytes, and does each byte of the word/long to addresses two bytes apart. For example

    move.w #0x1234,d0
    lea 0x200000,a0
    movep.w d0,1(a0)

    stores 0x12 into 0x200001, and 0x34 into 0x200003. movep.l works the same way, but doing longs as four bytes. So when reading/writing sram, you either need to do everything yourself as byte moves to/from odd addresses starting at 0x200001, or use movep instructions for words and longs.

    Note that movep only allows for the Dn,d16(Am) and d16(An),Dm addressing modes.
     
  7. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=444461:date=Apr 19 2010, 10:44 AM:name=Chilly Willy)--><div class='quotetop'>QUOTE (Chilly Willy @ Apr 19 2010, 10:44 AM) <a href="index.php?act=findpost&pid=444461">[​IMG]</a></div><div class='quotemain'><!--quotec-->Save ram on the Genesis MUST be on odd addresses only. 0x200001, 0x200003, 0x200005, etc. This is because the 68000 uses a word bus, and the save ram only sits on the odd byte leaving the even byte unsupported. The 68000 has a special command for transferring data to/from peripherals or memory that only sits on one byte of the word - MOVEP (move peripheral).

    The 68000 cannot read/write words or longs to odd addresses (you get an odd address exception if you do). MOVEP instead breaks word and long read/writes into bytes, and does each byte of the word/long to addresses two bytes apart. For example

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">#</span>0x1234,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">lea</span> 0x200000,<span style="font-weight:bold;">a0</span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="font-weight:bold;">d0</span>,<span style="color: #ff0000;">1</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    &nbsp;</pre><!--gc2--><!--Cm1vdmUudyAjMHgxMjM0LGQwCmxlYSAweDIwMDAwMCxhMAptb3ZlcC53IGQwLDEoYTApCg==--><!--egc2--><!--g2--></div><!--eg2-->

    stores 0x12 into 0x200001, and 0x34 into 0x200003. movep.l works the same way, but doing longs as four bytes. So when reading/writing sram, you either need to do everything yourself as byte moves to/from odd addresses starting at 0x200001, or use movep instructions for words and longs.

    Note that movep only allows for the Dn,d16(Am) and d16(An),Dm addressing modes.<!--QuoteEnd--></div><!--QuoteEEnd-->

    OK, you lost me there. So what I need to do is replace all the MOVE.P and all MOVE.W instructions with MOVEP or do I have to copy all data into another address and then do a MOVEP?
     
  8. SegaLoco

    SegaLoco

    W)(at did you say? Misfit
    Not to get off topic a bit, but something that has always bugged me is that, the SRAM section in the header really isn't just a random value. You could also write:

    Code (Text):
    1. ExRAMSupport:&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;'RA', %11111000, %00100000
    2. ExRAMAddr:&nbsp;&nbsp;&nbsp;&nbsp;dc.l&nbsp;&nbsp;&nbsp;&nbsp;$00200000, $002003FF
    The general form for this section is
    Code (Text):
    1. ExRAMSupport:&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;'RA', %1x1yz000, %00100000
    2. ExRAMAddr:&nbsp;&nbsp;&nbsp;&nbsp;dc.l&nbsp;&nbsp;&nbsp;&nbsp;StartAddr, EndAddr
    where x = 1 for backup ram, x = 0 for external work ram.

    yz = 10 for even addressed SRAM, and yz = 11 for odd addressed SRAM, as ChillyWilly there was saying.

    (If you all like memorizing that number, fine by me, I personally think this is easier :v: )

    Edit: Oh, for no ExRAM do

    Code (Text):
    1. ExRAMSupport:&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;', %00100000, %00100000
    2. ExRAMAddr:&nbsp;&nbsp;&nbsp;&nbsp;dc.l&nbsp;&nbsp;&nbsp;&nbsp;$20202020, $20202020
     
  9. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    When you reference SRAM addresses, you have to use .l instead of .w after the parentheses. So:
    <!--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;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202080</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water direction</span></pre><!--gc2--><!--bW92ZS5iCSgmIzAzNjtGRkZGRjY0RSkudywoJiMwMzY7MjAyMDIwODApLncgCTsgd2F0ZXIgZGlyZWN0
    aW9u--><!--egc2--><!--g2--></div><!--eg2-->
    Should be:
    <!--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;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20202080</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; water direction</span></pre><!--gc2--><!--bW92ZS5iCSgmIzAzNjtGRkZGRjY0RSkudywoJiMwMzY7MjAyMDIwODApLmwgCTsgd2F0ZXIgZGlyZWN0
    aW9u--><!--egc2--><!--g2--></div><!--eg2-->

    Hope this helps.
     
  10. theocas

    theocas

    Tech Member
    346
    0
    16
    I have convertet the Lamppost code to this:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    Obj79_StoreInfo: <span style="color: #adadad; font-style: italic;">; XREF: Obj79_HitLamp</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">28</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200000</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; lamppost number</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE30</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200002</span><span style="">)</span>.<span style="color: #00bfff;">l</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">8</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200008</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; x-position</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">C</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20000B</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; y-position</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;">FFFFFE20</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20000F</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; rings</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE1B</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200014</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; lives</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE22</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200018</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; time</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF742</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20001B</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; routine counter for dynamic level mod</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;">FFFFF72E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20001F</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; lower y-boundary of level</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;">FFFFF700</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200024</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; screen x-position</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;">FFFFF704</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200028</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; screen y-position</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;">FFFFF708</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20002B</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF70C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20002F</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF710</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200034</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF714</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200038</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF718</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20003B</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF71C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20003F</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">FFFFF648</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200044</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; water height</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64D</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200048</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; rountine counter for water</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20004B</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; water direction</span>
    <span style="color: #00bfff;">rts</span>
    &nbsp;
    Obj79_LoadInfo: <span style="color: #adadad; font-style: italic;">; XREF: LevelSizeLoad</span>
    &nbsp;
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">28</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200000</span><span style="">)</span>.<span style="color: #00bfff;">l</span> <span style="color: #adadad; font-style: italic;">; lamppost number</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200002</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE30</span><span style="">)</span>.<span style="color: #00bfff;">w</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200008</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFD008</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; x-position</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;">20000B</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFD00C</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; y-position</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;">20000F</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE20</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rings</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200014</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE1B</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lives</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200018</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE22</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; time</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20001B</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF742</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; routine counter for dynamic level mod</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;">20001F</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF72E</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; lower y-boundary of level</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;">200024</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF700</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen x-position</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;">200028</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF704</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; screen y-position</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;">20002B</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF708</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">20002F</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF70C</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">200034</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF710</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">200038</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF714</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">20003B</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF718</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">20003F</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF71C</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; bg position</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;">200044</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF648</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water height</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200048</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64D</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rountine counter for water</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">20004B</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water direction</span>
    &nbsp;</pre><!--gc2--><!--Ck9iajc5X1N0b3JlSW5mbzoJCQk7IFhSRUY6IE9iajc5X0hpdExhbXAKCQltb3ZlLmIJJiMwMzY7Mjgo
    YTApLCgmIzAzNjsyMDAwMDApLmwgCQk7IGxhbXBwb3N0IG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iCSgmIzAzNjsyMDAwNDgpLmwsKCYjMDM2O0ZGRkZGNjREKS53IAk7IHJvdW50
    aW5lIGNvdW50ZXIgZm9yIHdhdGVyCgkJbW92ZS5iCSgmIzAzNjsyMDAwNEIpLmwsKCYjMDM2O0ZGRkZGN
    jRFKS53IAk7IHdhdGVyIGRpcmVjdGlvbgo=--><!--egc2--><!--g2--></div><!--eg2-->
    But once I pass a lamp post and die, I just get put back at the beginning of the Level. Am I just using the wrong adresses, or is my header off:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    ExRAMSupport: <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #CC33CC;">'RA'</span>, %111000, %00100000
    ExRAMAddr: <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">200000</span>, <span style="color: #ff0000;">$</span><span style="color: #ff0000;">200000</span>
    &nbsp;</pre><!--gc2--><!--CkV4UkFNU3VwcG9ydDogICBkYy5iICAgICYjMzk7UkEmIzM5OywgJTExMTAwMCwgJSYjNDg7JiM0ODsx
    MDAwMDAKRXhSQU1BZGRyOiAgICAgIGRjLmwgICAgJiMwMzY7MjAwMDAwLCAmIzAzNjsyMDAwMDAK--><!--egc2--><!--g2--></div><!--eg2-->
     
  11. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    Well... erm, yeah. You're not specifying a range—you're just putting the start there twice. If you've used all the bytes you're going to, then I suggest making $200100 the end or something like that.
     
  12. theocas

    theocas

    Tech Member
    346
    0
    16
    I did that and I still get the same result as before. Something is telling me the data is not being written to SRAM...
     
  13. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    move.b can stay move.b
    move.w -> movep.w
    move.l -> movep.l

    Remember that sram is every other byte, so a byte takes two bytes of space, a word takes four bytes of space, and a long takes eight bytes.

    So, more like this

    Code (Text):
    1. Obj79_StoreInfo:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; XREF: Obj79_HitLamp
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#1,($A130F1).l; enable save ram
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($200001).l,a1&nbsp;&nbsp;&nbsp;&nbsp;; base of sram
    4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;$28(a0),0(a1) &nbsp;&nbsp;&nbsp;&nbsp;; lamppost number
    5. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE30).w,2(a1)
    6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;8(a0),4(a1)&nbsp;&nbsp;&nbsp;&nbsp;; x-position
    7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;$C(a0),d0&nbsp;&nbsp;&nbsp;&nbsp;; y-position
    8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,6(a1)
    9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE20).w,d0 ; rings
    10. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,10(a1)
    11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE1B).w,14(a1) ; lives
    12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.l&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE22).w,d0 ; time
    13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.l&nbsp;&nbsp;&nbsp;&nbsp;d0,16(a1)
    14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF742).w,24(a1) ; routine counter for dynamic level mod
    15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF72E).w,d0 ; lower y-boundary of level
    16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,26(a1)
    17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF700).w,d0 ; screen x-position
    18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,30(a1)
    19. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF704).w,d0 ; screen y-position
    20. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,34(a1)
    21. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF708).w,d0 ; bg position
    22. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,38(a1)
    23. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF70C).w,d0 ; bg position
    24. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,42(a1)
    25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF710).w,d0 ; bg position
    26. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,46(a1)
    27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF714).w,d0 ; bg position
    28. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,50(a1)
    29. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF718).w,d0 ; bg position
    30. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,54(a1)
    31. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF71C).w,d0 ; bg position
    32. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,58(a1)
    33. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF648).w,d0 ; water height
    34. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,62(a1)
    35. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF64D).w,66(a1) ; rountine counter for water
    36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF64E).w,68(a1) ; water direction
    37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#0,($A130F1).l; disable save ram
    38. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rts
    The load from sram is the same, but the moves are the other direction. And the header should be like this

    Code (Text):
    1. ExRAMSupport:
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;'RA'&nbsp;&nbsp;&nbsp;&nbsp;; external ram
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;$F8&nbsp;&nbsp;&nbsp;&nbsp;; don't clear + odd bytes
    4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;$20&nbsp;&nbsp;&nbsp;&nbsp;; sram
    5. ExRAMAddr:
    6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.l&nbsp;&nbsp;&nbsp;&nbsp;$200001, $203FFF; start, end
    $200001 to $203FFF is 16KB of space, but only every other byte is used, so it's 8KB of sram. Assuming you intend this for an emulator or flash cart, 8KB of flash is nothing. Note in the save routine that only a little of that is used. Ideally, instead of setting a1 to $200001 in the save routine, you'd pass in a value so you could do multiple save states. $200001 -> first save, $200101 -> second save, $200201 -> third save, etc.
     
  14. SegaLoco

    SegaLoco

    W)(at did you say? Misfit
    You aren't writing that quite right. For odd addressed SRAM you want:
    Code (Text):
    1. ExRamSupport: dc.b 'RA', %11111000, %00100000
    2. ExRamBounds: dc.l $00200000, $00203FFF
    Edit: Dang, ChillyWilly beat me to it, albeit I prefer my binary version, there is no difference...
     
  15. theocas

    theocas

    Tech Member
    346
    0
    16
    <!--quoteo(post=444797:date=Apr 19 2010, 09:13 PM:name=Chilly Willy)--><div class='quotetop'>QUOTE (Chilly Willy @ Apr 19 2010, 09:13 PM) <a href="index.php?act=findpost&pid=444797">[​IMG]</a></div><div class='quotemain'><!--quotec-->move.b can stay move.b
    move.w -> movep.w
    move.l -> movep.l

    Remember that sram is every other byte, so a byte takes two bytes of space, a word takes four bytes of space, and a long takes eight bytes.

    So, more like this

    Code (Text):
    1. Obj79_StoreInfo:; XREF: Obj79_HitLamp
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#1,($A130F1).l; enable save ram
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($200001).l,a1; base of sram
    4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;$28(a0),0(a1); lamppost number
    5. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE30).w,2(a1)
    6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;8(a0),4(a1); x-position
    7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;$C(a0),d0; y-position
    8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,6(a1)
    9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE20).w,d0; rings
    10. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,10(a1)
    11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE1B).w,14(a1); lives
    12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.l&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE22).w,d0; time
    13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.l&nbsp;&nbsp;&nbsp;&nbsp;d0,16(a1)
    14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF742).w,24(a1); routine counter for dynamic level mod
    15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF72E).w,d0; lower y-boundary of level
    16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,26(a1)
    17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF700).w,d0; screen x-position
    18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,30(a1)
    19. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF704).w,d0; screen y-position
    20. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,34(a1)
    21. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF708).w,d0; bg position
    22. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,38(a1)
    23. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF70C).w,d0; bg position
    24. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,42(a1)
    25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF710).w,d0; bg position
    26. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,46(a1)
    27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF714).w,d0; bg position
    28. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,50(a1)
    29. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF718).w,d0; bg position
    30. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,54(a1)
    31. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF71C).w,d0; bg position
    32. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,58(a1)
    33. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF648).w,d0; water height
    34. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;d0,62(a1)
    35. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF64D).w,66(a1); rountine counter for water
    36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF64E).w,68(a1); water direction
    37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#0,($A130F1).l; disable save ram
    38. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rts
    The load from sram is the same, but the moves are the other direction. And the header should be like this

    Code (Text):
    1. ExRAMSupport:
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;'RA'; external ram
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;$F8; don't clear + odd bytes
    4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.b&nbsp;&nbsp;&nbsp;&nbsp;$20; sram
    5. ExRAMAddr:
    6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dc.l&nbsp;&nbsp;&nbsp;&nbsp;$200001, $203FFF; start, end
    $200001 to $203FFF is 16KB of space, but only every other byte is used, so it's 8KB of sram. Assuming you intend this for an emulator or flash cart, 8KB of flash is nothing. Note in the save routine that only a little of that is used. Ideally, instead of setting a1 to $200001 in the save routine, you'd pass in a value so you could do multiple save states. $200001 -> first save, $200101 -> second save, $200201 -> third save, etc.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I have replaced the Save Routine with this, but I still get the same behavior for some reason. I simply switched the numbers in the movep and move.b instructions to the SRAM. Here is what I have in the save routine:

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">1</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">A130F1</span><span style="">)</span>.<span style="color: #00bfff;">l</span><span style="color: #adadad; font-style: italic;">; enable save ram</span>
    <span style="color: #00bfff;">lea</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">200001</span><span style="">)</span>.<span style="color: #00bfff;">l</span>,<span style="font-weight:bold;">a1</span> <span style="color: #adadad; font-style: italic;">; base of sram </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">0</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="color: #ff0000;">$</span><span style="color: #ff0000;">28</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> <span style="color: #adadad; font-style: italic;">; lamppost number </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE30</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="color: #ff0000;">2</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">4</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="color: #ff0000;">8</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> <span style="color: #adadad; font-style: italic;">; x-position </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">C</span><span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; y-position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">6</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFFE20</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; rings </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">10</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE1B</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="color: #ff0000;">14</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span> <span style="color: #adadad; font-style: italic;">; lives </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">l</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFFE22</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; time </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">16</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF742</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="color: #ff0000;">24</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span> <span style="color: #adadad; font-style: italic;">; routine counter for dynamic level mod </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;">FFFFF72E</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; lower y-boundary of level </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">26</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF700</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; screen x-position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">30</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF704</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; screen y-position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">34</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF708</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">38</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF70C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">42</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF710</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">46</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF714</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">50</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF718</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">54</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF71C</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; bg position </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">58</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</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;">FFFFF648</span><span style="">)</span>.<span style="color: #00bfff;">w</span>,<span style="font-weight:bold;">d0</span> <span style="color: #adadad; font-style: italic;">; water height </span>
    <span style="color: #00bfff;">movep</span>.<span style="color: #00bfff;">w</span> <span style="color: #ff0000;">62</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">66</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64D</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; rountine counter for water </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">68</span><span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">FFFFF64E</span><span style="">)</span>.<span style="color: #00bfff;">w</span> <span style="color: #adadad; font-style: italic;">; water direction </span>
    <span style="color: #00bfff;">move</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">#</span><span style="color: #ff0000;">0</span>,<span style="">(</span><span style="color: #ff0000;">$</span><span style="color: #ff0000;">A130F1</span><span style="">)</span>.<span style="color: #00bfff;">l</span><span style="color: #adadad; font-style: italic;">; disable save ram </span>
    <span style="color: #00bfff;">rts</span>
    &nbsp;</pre><!--gc2--><!--CiAgICAgICAgICAgICAgICBtb3ZlLmIgICAgIzEsKCYjMDM2O0ExMzBGMSkubDsgZW5hYmxlIHNhdmUg
    cmFtCiAgICAgICAgICAgICAgICBsZWEgICAgICAgICgmIzAzNjsyMDAwMDEpLmwsYTEgICAgOyBiYXNlI
    G9mIHNyYW0gICAgICAgIAogICAgICAgICAgICAgICAgbW92ZS5iICAgIDAoYTEpLCYjMDM2OzI4KGEwKS
    AgICAgOyBsYW1wcG9zdCBudW1iZXIgICAgICAgIAogICAgICAgICAgICAgICAgbW92ZS5iICAgICgmIzA
    zNjtGRkZGRkUzMCkudywyKGExKSAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlLmIgICAgNChhMSks
    OChhMCkgICAgOyB4LXBvc2l0aW9uICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmUudyAgICAmIzAzN
    jtDKGEwKSxkMCAgICA7IHktcG9zaXRpb24gICAgICAgIAogICAgICAgICAgICAgICAgbW92ZXAudyAgIC
    A2KGExKSxkMCAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmUudyAgICAoJiMwMzY7RkZGRkZ
    FMjApLncsZDAgOyByaW5ncyAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlcC53ICAgIDEwKGExKSxk
    MCAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmUuYiAgICAoJiMwMzY7RkZGRkZFMUIpLncsM
    TQoYTEpIDsgbGl2ZXMgICAgICAgIAogICAgICAgICAgICAgICAgbW92ZS5sICAgICgmIzAzNjtGRkZGRk
    UyMikudyxkMCA7IHRpbWUgICAgICAgIAogICAgICAgICAgICAgICAgbW92ZXAubCAgICAxNihhMSksZDA
    gICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlLmIgICAgKCYjMDM2O0ZGRkZGNzQyKS53LDI0
    KGExKSA7IHJvdXRpbmUgY291bnRlciBmb3IgZHluYW1pYyBsZXZlbCBtb2QgICAgICAgIAogICAgICAgI
    CAgICAgICAgbW92ZS53ICAgICgmIzAzNjtGRkZGRjcyRSkudyxkMCA7IGxvd2VyIHktYm91bmRhcnkgb2
    YgbGV2ZWwgICAgICAgIAogICAgICAgICAgICAgICAgbW92ZXAudyAgICAyNihhMSksZDAgICAgICAgIAo
    gICAgICAgICAgICAgICAgbW92ZS53ICAgICgmIzAzNjtGRkZGRjcwMCkudyxkMCA7IHNjcmVlbiB4LXBv
    c2l0aW9uICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmVwLncgICAgMzAoYTEpLGQwICAgICAgICAKI
    CAgICAgICAgICAgICAgIG1vdmUudyAgICAoJiMwMzY7RkZGRkY3MDQpLncsZDAgOyBzY3JlZW4geS1wb3
    NpdGlvbiAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlcC53ICAgIDM0KGExKSxkMCAgICAgICAgCiA
    gICAgICAgICAgICAgICBtb3ZlLncgICAgKCYjMDM2O0ZGRkZGNzA4KS53LGQwIDsgYmcgcG9zaXRpb24g
    ICAgICAgIAogICAgICAgICAgICAgICAgbW92ZXAudyAgICAzOChhMSksZDAgICAgICAgIAogICAgICAgI
    CAgICAgICAgbW92ZS53ICAgICgmIzAzNjtGRkZGRjcwQykudyxkMCA7IGJnIHBvc2l0aW9uICAgICAgIC
    AKICAgICAgICAgICAgICAgIG1vdmVwLncgICAgNDIoYTEpLGQwICAgICAgICAKICAgICAgICAgICAgICA
    gIG1vdmUudyAgICAoJiMwMzY7RkZGRkY3MTApLncsZDAgOyBiZyBwb3NpdGlvbiAgICAgICAgCiAgICAg
    ICAgICAgICAgICBtb3ZlcC53ICAgIDQ2KGExKSxkMCAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlL
    ncgICAgKCYjMDM2O0ZGRkZGNzE0KS53LGQwIDsgYmcgcG9zaXRpb24gICAgICAgIAogICAgICAgICAgIC
    AgICAgbW92ZXAudyAgICA1MChhMSksZDAgICAgICAgIAogICAgICAgICAgICAgICAgbW92ZS53ICAgICg
    mIzAzNjtGRkZGRjcxOCkudyxkMCA7IGJnIHBvc2l0aW9uICAgICAgICAKICAgICAgICAgICAgICAgIG1v
    dmVwLncgICAgNTQoYTEpLGQwICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmUudyAgICAoJiMwMzY7R
    kZGRkY3MUMpLncsZDAgOyBiZyBwb3NpdGlvbiAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlcC53IC
    AgIDU4KGExKSxkMCAgICAgICAgCiAgICAgICAgICAgICAgICBtb3ZlLncgICAgKCYjMDM2O0ZGRkZGNjQ
    4KS53LGQwIDsgd2F0ZXIgaGVpZ2h0ICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmVwLncgICAgNjIo
    YTEpLGQwICAgICAgICAKICAgICAgICAgICAgICAgIG1vdmUuYiAgICA2NihhMSksKCYjMDM2O0ZGRkZGN
    jREKS53IDsgcm91bnRpbmUgY291bnRlciBmb3Igd2F0ZXIgICAgICAgIAogICAgICAgICAgICAgICAgbW
    92ZS5iICAgIDY4KGExKSwoJiMwMzY7RkZGRkY2NEUpLncgOyB3YXRlciBkaXJlY3Rpb24gICAgICAgIAo
    gICAgICAgICAgICAgICAgbW92ZS5iICAgICMwLCgmIzAzNjtBMTMwRjEpLmw7IGRpc2FibGUgc2F2ZSBy
    YW0gICAgICAgIAogICAgICAgICAgICAgICAgcnRzCg==--><!--egc2--><!--g2--></div><!--eg2-->
    And yes, my initial idea was to have 4 different save slots.
     
  16. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    You need to swap the word and long moves around as well.

    Code (Text):
    1. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#1,($A130F1).l; enable save ram
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($200001).l,a1&nbsp;&nbsp; ; base of sram&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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FFFF742).w,24(a1); routine counter for dynamic level mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;26(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF72E).w; lower y-boundary of level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;30(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF700).w; screen x-position&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;34(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    19. &nbsp;&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sp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;68(a1),($FFFFF64E).w; water direction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#0,($A130F1).l; disable save ram&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rts
     
  17. theocas

    theocas

    Tech Member
    346
    0
    16
    My emulator is still not even writing an SRAM file. I have uploaded the rom here: <a href="http://uploadrobots.com/sWqhe4" target="_blank">Link</a>. I have the lamp post's save and read routine set to read/write to the SRAM. My header seems to be fine too:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    ExRAMSupport:
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #CC33CC;">'RA'</span> <span style="color: #adadad; font-style: italic;">; external ram </span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">F8</span> <span style="color: #adadad; font-style: italic;">; don't clear + odd bytes </span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">20</span> <span style="color: #adadad; font-style: italic;">; sram</span>
    ExRAMAddr:
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">200001</span>, <span style="color: #ff0000;">$</span><span style="color: #ff0000;">203FFF</span><span style="color: #adadad; font-style: italic;">; start, end</span>
    &nbsp;</pre><!--gc2--><!--CkV4UkFNU3VwcG9ydDogICAKICAgICAgICAgICAgICAgIGRjLmIgICAgJiMzOTtSQSYjMzk7ICAgIDsg
    ZXh0ZXJuYWwgcmFtICAgICAgICAKICAgICAgICAgICAgICAgIGRjLmIgICAgJiMwMzY7RjggICAgOyBkb
    24mIzM5O3QgY2xlYXIgKyBvZGQgYnl0ZXMgICAgICAgIAogICAgICAgICAgICAgICAgZGMuYiAgICAmIz
    AzNjsyMCAgICA7IHNyYW0KRXhSQU1BZGRyOiAgICAgICAgCiAgICAgICAgICAgICAgICBkYy5sICAgICY
    jMDM2OzIwMDAwMSwgJiMwMzY7MjAzRkZGOyBzdGFydCwgZW5kCg==--><!--egc2--><!--g2--></div><!--eg2-->
    Can someone please test if they get the same result, because right now I'm thinking my emulator is not working...

    EDIT: I have checked the ROM on Kega Fusion on Mac OS X as well, but I get the same result as Gens/GX on Windows7
     
  18. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    <!--quoteo(post=444929:date=Apr 20 2010, 07:41 AM:name=ts230)--><div class='quotetop'>QUOTE (ts230 @ Apr 20 2010, 07:41 AM) <a href="index.php?act=findpost&pid=444929">[​IMG]</a></div><div class='quotemain'><!--quotec-->My emulator is still not even writing an SRAM file. I have uploaded the rom here: <a href="http://uploadrobots.com/sWqhe4" target="_blank">Link</a>. I have the lamp post's save and read routine set to read/write to the SRAM. My header seems to be fine too:
    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm" style="font-family:monospace;">&nbsp;
    ExRAMSupport:
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #CC33CC;">'RA'</span> <span style="color: #adadad; font-style: italic;">; external ram </span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">F8</span> <span style="color: #adadad; font-style: italic;">; don't clear + odd bytes </span>
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">b</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">20</span> <span style="color: #adadad; font-style: italic;">; sram</span>
    ExRAMAddr:
    <span style="color: #00bfff;">dc</span>.<span style="color: #00bfff;">l</span> <span style="color: #ff0000;">$</span><span style="color: #ff0000;">200001</span>, <span style="color: #ff0000;">$</span><span style="color: #ff0000;">203FFF</span><span style="color: #adadad; font-style: italic;">; start, end</span>
    &nbsp;</pre><!--gc2--><!--CkV4UkFNU3VwcG9ydDogICAKICAgICAgICAgICAgICAgIGRjLmIgICAgJiMzOTtSQSYjMzk7ICAgIDsg
    ZXh0ZXJuYWwgcmFtICAgICAgICAKICAgICAgICAgICAgICAgIGRjLmIgICAgJiMwMzY7RjggICAgOyBkb
    24mIzM5O3QgY2xlYXIgKyBvZGQgYnl0ZXMgICAgICAgIAogICAgICAgICAgICAgICAgZGMuYiAgICAmIz
    AzNjsyMCAgICA7IHNyYW0KRXhSQU1BZGRyOiAgICAgICAgCiAgICAgICAgICAgICAgICBkYy5sICAgICY
    jMDM2OzIwMDAwMSwgJiMwMzY7MjAzRkZGOyBzdGFydCwgZW5kCg==--><!--egc2--><!--g2--></div><!--eg2-->
    Can someone please test if they get the same result, because right now I'm thinking my emulator is not working...

    EDIT: I have checked the ROM on Kega Fusion on Mac OS X as well, but I get the same result as Gens/GX on Windows7<!--QuoteEnd--></div><!--QuoteEEnd-->

    When I run this on KEGA in Ubuntu, I get an s1built.srm file in the ".Kega Fusion" directory where all the srm files are. It has these contents:

    ff02 ff00 ff19 ff03 ff73 ff00 ff09 ff00 ff00 ff01
    ff24 ff2f ff00 ff03 ff70 ff18 ffd6 ff03 ff13 ff09
    ff50 ff00 ff0e ff0c ff6b ff00 ff0e ff00 ff00 ff00
    ff00 ff00 ff00 ff00 ff00

    That data appears to be consistent with the code. It's not clear under what circumstances the data will be saved or restored. Does it save when you hit a lamppost? How do you restore?
     
  19. theocas

    theocas

    Tech Member
    346
    0
    16
    The data should be saved when a lamp post is activated and restored when you die after hitting a lamp post. My initial idea was to first get something like this working, and then convert it to have 4 different save slots. But like I said again, I just can not get it to work on both of my machines.
     
  20. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    Well, either you're missing something on the save, or you aren't restoring in the proper place. It IS saving the data - the srm file is proof of that. So it's just a matter of making sure you are saving everything you need, and then restoring at the proper place.

    EDIT: I did notice something... some moves weren't turned around in the restore

    Code (Text):
    1. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#1,($A130F1).l; enable save ram
    2. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($200001).l,a1&nbsp;&nbsp;; base of sram&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;0(a1),$28(a0)&nbsp;&nbsp; ; lamppost number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE30).w,2(a1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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10. ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFFE1B).w,14(a1); lives&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*****************************************************
    11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move.b&nbsp;&nbsp;&nbsp;&nbsp;14(a1),($FFFFFE1B).w; lives&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.l&nbsp;&nbsp;&nbsp;&nbsp;16(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.l&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFFE22).w; time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    14. ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;($FFFFF742).w,24(a1); routine counter for dynamic level mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*************************************************
    15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;24(a1),($FFFFF742).w; routine counter for dynamic level mod&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;26(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF72E).w; lower y-boundary of level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    18. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;30(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    19. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF700).w; screen x-position&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    20. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF718).w; bg position&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    32. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;58(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    33. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF71C).w; bg position&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    34. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;movep.w&nbsp;&nbsp;&nbsp;&nbsp;62(a1),d0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    35. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.w&nbsp;&nbsp;&nbsp;&nbsp;d0,($FFFFF648).w; water height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;66(a1),($FFFFF64D).w; rountine counter for water&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;68(a1),($FFFFF64E).w; water direction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    38. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move.b&nbsp;&nbsp;&nbsp;&nbsp;#0,($A130F1).l; disable save ram&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    39. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rts
     
Thread Status:
Not open for further replies.