< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > DavidJCobb Conversation Between DavidJCobb and Spherical Ice


Conversation Between DavidJCobb and Spherical Ice
Showing Visitor Messages 1 to 9 of 9
  1. DavidJCobb
    March 18th, 2012 5:15 PM
    I see...

    The requisite tiles DO exist in the tileset you're using, yes? When you mouseover the block palette in AdvanceMap, you can see the hex ID of that block in the tileset (lower-left corner of the window: "Block: $number"). For each tile hex number referred to in my script, does your tileset have a number for that block?

    My random guess right now is that you're using my routine but with a tileset lacking the requisite blocks. My routine MIGHT be trying to change one tile into another, but the "target" tile doesn't exist in your tileset. You should only need the tile hex numbers referred to by the "CANVAS" labels at the bottom of my code.

    If that doesn't work, add JPAN's hack if you haven't already. I have no idea if he touched anything to do with maps, tile loading, tile changing, or CmdA6; if he did, it would've affected the code I developed, and if that happened and you're not using his hack, it'd explain why your code's dead.
  2. Spherical Ice
    March 18th, 2012 12:44 PM
    Spherical Ice
    Sorry, idk why I put faceplayer there, it's a trigger event, not a person/signpost.

    The routine I used was the one in your post here. Unless of course I've completely misunderstood and that routine was for something separate?
  3. DavidJCobb
    March 18th, 2012 12:16 PM
    My best guess, then, is that there is something wrong with the ASM routine you wrote.

    Based on the use of "faceplayer", I'm assuming that your script runs when talking to an OW or signpost, rather than running when you step on a tile. If that's a correct assumption, then the fact that the routine only freezes when you step on a tile (as opposed to freezing the instant CmdA6 activates it) means that the issue occurs when your routine detects that the player has moved.

    Focus on the general part of your routine that does something if the player's position has changed. The problem is probably somewhere inside of there, and a debugger might help you to narrow it down. My best guess is that your routine ends up not returning, or not returning properly (unshift the stack pointer and pop the registers prior to returning, and in that order).

    All of this, of course, is assuming that you're not doing anything particularly out-of-the-box with your routine. (For example, trying to call a script from inside of your CmdA6 ASM routine could cause a freeze even if the routine itself works perfectly -- the new script would cause the old one to terminate before "release" is run, leaving the OWs locked forever.)
  4. Spherical Ice
    March 18th, 2012 2:16 AM
    Spherical Ice
    Alright, so what I did was assemble the asm code, inserted it at free space (82b270), went to 3A7310, replaced the second pointer at that offset to my asm code (70 b2 82 08), saved my ROM, and in a script I put:

    #dynamic 0x800000

    #org @start
    cmda6 0x1

    I put 0x1 as I assume 0x0 would be Slot 0. When I step on this tile, however, the game freezes.
  5. DavidJCobb
    March 17th, 2012 9:03 PM
    'Kay. I'm assuming that you read my post here. If you haven't, do so; it contains most of the information you'll need. To summarize:

    There are eight "slots" for CmdA6 walking routines -- that is, eight pointers in a table starting at 0x083A7310. So you need to replace one of those pointers with a pointer to your ASM. Then, with script, you call "cmda6" passing it the slot number for your code. This will get the game to run your code on every frame (overworld only -- not in menus).

    Word of advice: don't replace Slot 0. You can't ever really turn off the CmdA6 functionality; you can only activate a slot that points to a no-op routine. (Only one slot can be active at a time; enabling one disables all others.) All but three of the slots point to the same no-op routine, and of those slots, I think Slot 0 is the one Nintendo uses to disable their own CmdA6 routines.

    If seven routines isn't enough for your purposes (and given the huge potential of CmdA6, it might not be if you really get creative!)... Well, I don't think I ever gave specific details on how, but I have extended the CmdA6 table to 255 slots (not including Slot 0 as a no-op), so it's definitely possible. I'm 99% sure that there is only one pointer in the entire game that points to this table, so it's just a matter of creating a new table elsewhere in the ROM and changing that single pointer.
  6. DavidJCobb
    March 17th, 2012 8:53 PM
    Sorry for the late reply, I don't check here as often as I used to...

    Gimme a sec to look up my thread. I think I have an idea of what you haven't done, but I gotta get my reference so I can help you out
  7. Spherical Ice
    March 11th, 2012 8:42 AM
    Spherical Ice
    Hey, could you help me out with your cmda6 research? I'm not exactly sure how to get it functioning. What I've done is compiled the ASM, called it in a script and then tried, using the same tile numbers etc., but it didn't seem to work...I know I'm missing something, haha.
  8. DavidJCobb
    August 3rd, 2011 5:10 PM
    Thank ya kindly.

    And yeah, that advanced eval can be a tricky thing to get the hang of. If you have any questions, feel free to message me or post in its thread.
  9. Spherical Ice
    August 3rd, 2011 3:06 AM
    Spherical Ice
    Just saying I appreciate your tutorials. It's always great to see innovation such as yours. :D

    ...now I just need to wrap my head around the advanced eval part...

  All times are GMT -8. The time now is 8:34 PM.

Contact Us Archive Privacy Statement Terms of Service Top