Users browsing this thread: 1 Guest(s)
Event Bits vs. Memory Address

#4
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
yes, some of those are outside the scope of his document:

Quote:This document contains a full listing of the event bits in the game, with the
exception of activation flags for non-player characters, which are detailed in
a separate document.

[...]

Further note that the event bits are
stored in 96 bytes of RAM from address $1E80 to $1EDF in bank $7E.

but both types are addressed via the same class of instruction:

http://www.angelfire.com/al2/imzogelmo/E...mmands.txt

see Commands D0 thru DD.

how it works:
1) there are multiple commands, each tackling different 32-byte ranges.
2) the 1-byte parameter is the BIT count from Bit 0 of Byte 0 within that 32-byte range.  say we wanted the fourth bit of the second byte.  that'd be Byte 1, Bit 3.  with there being 8 bits in a byte, our parameter would be (1 * 8) + 3 = 11d = 0Bh.

now, putting those together.  say we want overall event Byte 65d, Bit 3 (or an overall bit index of 520d or 208h).  we'd feed Parameter 0Bh to Event Command D4h or D5h.
Quote  
[-] The following 1 user says Thank You to assassin for this post:
  • PowerPanda (12-02-2017)



Messages In This Thread
Event Bits vs. Memory Address - by PowerPanda - 12-01-2017, 12:55 PM
RE: Event Bits vs. Memory Address - by m06 - 12-01-2017, 01:13 PM
RE: Event Bits vs. Memory Address - by PowerPanda - 12-01-2017, 07:24 PM
RE: Event Bits vs. Memory Address - by m06 - 12-01-2017, 11:38 PM
RE: Event Bits vs. Memory Address - by assassin - 12-01-2017, 09:38 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite