Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/Temp VRAM DMA Data Block

From Data Crystal
Jump to navigation Jump to search

This is a sub-page of EarthBound.

Block of WRAM that can be dynamically allocated for temporary storage for data to be transferred to VRAM using DMA. Reset after each completed VRAM DMA.

Auxiliary Data

  • $7E00A1: #$200 more than the next unallocated section, meaning the entire 512 byte block is unallocated when $7E00A1 is equal to $7E00A3.
  • $7E00A3: End of data block.

Usage

Memory is allocated by the Allocate temporary WRAM for VRAM DMA routine, which updates $7E00A1 accordingly. Memory is deallocated after each VRAM DMA transfer by the Perform DMA transfer routine or the VBLANK Interrupt Routine by resetting $7E00A1 to the value of $7E00A3.

Additionally, the VBLANK Interrupt Routine seems to flip $7E00A3 each frame between #$2000 and #$2200. It would seem that this would rotate the entire Temp VRAM DMA Data Block between $7e1e00-$7e1fff and $7e2000-$7e21ff, but it is unclear if the allocation routine is ever called while $7E00A3 is set to #$2000.