RAM: Bank 0x7E: Pages 0x10 to 0x1F

From TLoZ: ALTTP Hacking Resources
Revision as of 23:32, 20 December 2016 by Superskuj (talk | contribs) (Superskuj moved page Rom/Pages 0x10 to 0x17 to RAM: Bank 0x7E: Pages 0x10 to 0x1F)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • $1000[0x02] = For transfers that use variable $14, this indicates the current length written into the buffer starting at
  • {{$|1002

Seems to be addresses used for blitting graphics onto the screen after a room or area has already loaded.

  • $1002[0x02] = Big endian representation of the VRAM target address (word address)
  • $1004[0x02] = dma configuration

ssssssss wftttttt f - If set, DMA source address is fixed. Otherwise it auto increments. s, t - One less(!) the 14-bit size of the DMA transfer, as expressed in bytes. This value is composed of the 's' and 't' bits thusly: 00ttttttssssssss w - If not set, vram target address increments on writes to $2118. Otherwise, it increments on writes to $2119. ^ This documention is not 100% correct. I'll fix it when I have time. Basically it determines whether or not to increment vram address by 1 or 32 words after each adjustment (write to $2118 or $2119)

  • $1006[0x??] = First word of data for the transfer. Many more may follow.

Setup for making overlaid tiles appear (word addresses): Notes on converting in game tile positions into VRAM positions: In game layout: (u = unused?) uuddaaaa abcccccc Translated into VRAM base address: uuuddbaa aaaccccc

  • $1100[0x02] = Target VRAM address for the transfer
  • $1102[0x01] = The value that will be written to VMAIN ($2115) before the transfer.

Typically this controls whether the DMA transfer is intended to write words or alternating bytes to VRAM.

  • $1103[0x01] = Number of bytes to transfer to VRAM.

Note: Putting 0 here would transfer 0x10000 bytes, which could be really crazy.

  • $1104[0x??] = Local portion of the source address for the DMA transfer. The source bank is forced to zero by the code.

584$1100 - Contains two chunks of data for blitting an extra tile to the screen. The hex values indicate where each portion lies in the memory address. 0x8000 - indicates whether to use 2 byte or 64 byte increment when doing the DMA 0x4000 - ? not used? 0x3FFF - Contains the number of bytes to transfer

  • $1102[0x02] = VRAM target address for the tile setup.
  • $1104[0x02] = $1183 - The bytes that get blitted to VRAM
  • $1980[0x20] = Low Byte: Door type (Take HM door type number, convert to hex, and multiply by 2)

High Byte: Door direction (0 = up, 2 = down, 4 = right, 6 = left)

  • $19A0[0x10] = Door tilemap address
  • $19B0[0x10] = For doors that have two halves, this is the tilemap address for the other half
  • $19C0[0x20] = Door direction. 0 - up, 1 - down, 2 - left, 3 - right
  • $19E0[0x02] = current door index when loading doors
  • $19E2[0x08] = Seems to store the addresses of up to 4 different exit doors.
  • $19EA[0x16] = free ram
  • $1A00[0x14] = These $1AXX addresses seem to be related to tagalongs, that's the best I can tell so far
  • $1A14[0x{{{1}}}[0x01] = Used to save the value of $1CE8 when the save and continue box comes up
  • $1CF5[0x0B] = free ram
  • $1D00[0x10] = Cache for $0DD0
  • $1D10[0x10] = Cache for $0E20
  • $1D20[{{0x|10]
  • $1D30[{{0x|10]
  • $1D40[{{0x|10]
  • $1D50[{{0x|10]

- - - - Cache for $0D10 Cache for $0D30 Cache for $0D00 Cache for $0D20

  • $1D60[0x10] = Cache for $0DC0
  • $1D70[{{0x|10] -
  • $1D80[{{0x|10] -
  • $1D90[{{0x|10] -
  • $1DA0[{{0x|10] -
  • $1DB0[{{0x|10] -
  • $1DC0[{{0x|10] -
  • $1DD0[{{0x|10] -
  • $1DE0[{{0x|10] -
  • $1DF0[{{0x|10] -

Cache for $0D90 Cache for $0EB0 Cache for $0F50 Cache for $0B89 Cache for $0DE0 Cache for $0E40 Cache for $0F20 Cache for $0D80 Cache for $0E60

  • $1E00[0x01] = Step counter during the Triforce sequence at the beginning.
  • $1E08[0x01] = see module 0x14
  • $1E09[0x01] = see module 0x14
  • $1E0A[0x01] = Seems to be a frame counter (loops at 0xFF) used for various delays and timing

of events during the Triforce or Crystal sequences

  • $1E10[{{0x|01] -
  • $1E68[0x98] = free ram???
  • $1F00[0x01] = Flag that when set, tells IRQ to activate
  • {{$|1F0A - Use to swap out the two different stacks. (the $1F00 region and the $1FF region)
  • {{$|1F0C - Related to IRQs?
  • {{$|1F32-$1F3F - Contains data to use when coming out of the IRQ. Including a return address, the Data Bank Register, the

Direct Page register (gets set to $1F00), and various other data. It took a while to figure this out, believe me.