Users browsing this thread: 1 Guest(s)
Excluding Weapons from Use With Genji Glove

#36
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
another key function is C1/89D5.  my comments are a little off, in that they should parallel C1/4B73's more.  that is, $7B39 and $7B3A are not the current hand, but the candidate gear from the Item list.

inserting checks right after C1/89EC and C1/4B8D to see if the candidate gear and the other hand's gear both possess your new 2-hand flag and if not, jumping to C1/89FD or C1/4B9E, respectively, should work in theory.  now, i don't see where Bank C1 ever loads the $D850NN item data.  so i'm seeing a couple options:

1) use the loaded Item ID, multiply by 30 (e.g. via C1/18CA; or maybe 4 ASLs, a SEC + subtract, then another ASL, but that might not even be any faster, given the need to enter and exit 8-bit Accumulator mode.), and read your flag from ROM Item data.  it won't be fast code, and could be prohibitive in C1/4B73, which lights/grays multiple items every time you scroll.  in contrast, i don't see it being an issue for C1/89D5, which i think is just called in response to manual cursor selections.

2) expand Function C2/54DC to read your custom flag from ROM Item data, and store its result in a variable that IS regularly loaded in Bank C1.  i'm thinking that the top 4 bits of $2E76 or perhaps the bottom 3 bits of $2E73 are free.  those are or would be read in the relevant Bank C1 functions via:

a. C1/4B73 (Candidate Item and Current Hand):
$2E73: $2D and $890E
$2E76: $268A,Y and ($2B8A,char_index or $2B9E,char_index [where char_index = $62CA * 5], based on an unknown hand selector)

b. C1/89D5 (Candidate Item and Current Hand):
$2E73: $7B3A and $7B3C
$2E76: $268A,X and ($2B8A,Y or $2B9E,Y .  depending on how the function is reached, the hand selector is $7B00 , or LDA $894B,Old_Y , where Old_Y probably equals Var $62CA .)

the $2E76 route looks uglier, but i'm actually more confident in it having free bits than $2E73, and things shouldn't be that hard once we nail down the hand selector.

-----

what were the limitations you were running into after investigating C1/4B73 several weeks ago?
Quote  



Messages In This Thread
RE: Excluding Weapons from Use With Genji Glove - by assassin - 04-08-2021, 07:52 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite