The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
ASM coding - Checking battle command in use

#1
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I'm working on a command rewrite. Since I'm trying to use one set of code to work two different commands, I need to check which command the code was executed from. I've only chamged pointers to the code, I didn't change the graphic pointers for the new command and that part works seperate. In other words, the game still knows the difference at that point in C1/.

Looking at several other lines, I should have been able to:

Code:
B2 76      LDA $76     (Used other places to load command number)
C9 19      CMP 19       (Should be checking for the "Summon" command)
D0 06      BNE           (branch if not Summon)

Problem being, using the debugger at that point, from the Magitek command I get a value of ... not Magitek's number... using the Summon command, I get a value of FF( definatly not Summon's number). Even then if I change it to check for FF, it still branches.

I do have a plan B, not to fond of it though. Would rather figure out why this isn't doing what I ask it to, or the proper way to check what command is being used.

All of this is during battle and executing in C1 btw. Least this part of it, not sure how much that matters.

Any advice would be great.

*Edit*
For the records: at C1/7CC8 starts a block of code for loading the command in battle and uses it for the following table. It looks to load this value at line C1/7CD4, however doing a LDA $202E will not load the value while in the middle of drawing a command's window. The next line however: STA $2BAF does help.

So in my case,

AD AF 2B LDA $2BAF

Loaded the proper command number, consistantly. Still not sure why $B5 only held a value sometimes and not every time, but problem solved.


The only true wisdom is knowing you know nothing.
  Find
Quote  



Messages In This Thread
ASM coding - Checking battle command in use - by Catone - 11-28-2015, 03:05 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite