vdp_sync - Kyuchumimo/Micro-Joy-Home-Video-Computer GitHub Wiki
🧩🧠 This is a general-purpose memory-related function.
vdp_sync(mask=0, asset=0)
To switch between assets, vdp_sync can be used to load contents from an asset to runtime.
Parameters
- mask : mask of sections you want to switch:
Colorset Chunk -> 1<<0
Character Chunk -> 1<<1
Sprite Chunk -> 1<<2
Map Data -> 1<<3
0 - will switch all the sections
1 | 2 | 4 - will switch only COLORSET, CHARACTER and SPRITE sections, for example
- asset : asset (0..n)
Description
Use vdp_sync() to restore runtime data from the assets. For example, if you have manipulated the runtime memory (e.g. by using vdp_mset), you can reset the active state by calling vdp_sync(0,0). This resets the whole of runtime to the contents of assets 0.