Dynamic Z
Dynamic Z is a patch for Super Mario World that allows performing a variety of actions during V-Blank. It was made by anonimzwx. Dynamic Z is meant to be a replacement for DSX as both allow coding dynamic sprites.
Dynamic Z does not require a buffer for coding dynamic sprites, which significantly reduces the slowdown caused by these type of sprites. Additionally, it can create sprites with a 30FPS animation synchronized with each other; this allows having twice as many dynamic sprites on-screen compared to DSX.
Features
- Graphic changes
- Color palette changes
- Color palette and graphic changes on the player
- Tile changes
- Support for Dynamic, Semi-Dynamic and Giga-Dynamic sprites
- A special DMA mode, which grants 50% more transfer capacity by removing the game's original DMA code
- Player DMA optimizations that gives more time during NMI and slightly curbs slowdown
- Compatibility with DSX sprites
How it works?
Dynamic Sprite Support
Dynamic Z have tables to define transfers to VRAM between #7400 and #8000. Every Table have 1 slot for each space of 16x8:
- DMA Resource: This Table is used to know in what RAM Address starts the source that will be transfer to the VRAM.
- DMA BNK: This Table is used to know in what Bank starts dma must find the DMA Resource.
- DMA Length: This Table is used to know how much data must send to VRAM.
Each slot of the tables is mapped to a value on the VRAM, the first slot start at #7400 and the last starts at #7FE0, Between 2 consecutive slots, there are 20 address of diference on the VRAM (40 bytes of difference).
To know what slots read of the tables, Dynamic Z use a table called DMA Next, each slot on this table indicates a link between a slot and another slot, for example, if slot #$00 have the value #$20, then after load slot #$00 on the VRAM, the patch will loads slot #$20, if a Slot have the value #$FF, if the patch read that slot, will finish the transfer to VRAM.
To know what is the first slot, there is a RAM Address called First Slot, if this address is #$FF, then Dynamic Z won't load anything on the VRAM.
With the table DMA Next, Dynamic Z create a data structure called Linked List. To add DMA Transfers at the end of the list, there is a RAM Address called Last Slot that have the last slot that will be loaded on the VRAM.