vdp_init - Kyuchumimo/Micro-Joy-Home-Video-Computer GitHub Wiki
🧩🖼️ This is a general-purpose video-related function.
vdp_init(mode, color=VDP_BLACK, big_sprites=False, magnify=False)
Parameters
- mode: video mode. See: Video modes
- color: backdrop color. See: Color palette
- big_sprites: 8x8 or 16x16 sprite size select.
- magnify: x2 sprite magnify option.
Description
This function is used to initialize the VDP.
Depending on the parameters provided, this function is responsible for clearing the VRAM memory, initializing the 7 registers of the TMS9918 with the appropriate values and memory addresses to enter a desired video mode and creating global constants.
This function must be called once at the top of the program.
You can change video mode on the fly as many times as you wish.