Skip to content

set_write_address

Kyuchumimo edited this page Aug 13, 2024 · 8 revisions

🧩🖼️ This is a low-level video-related function.

set_write_address(address)

Parameters

  • address: 16k VRAM memory address space offset

Description

This function is used to point to a memory address in the VRAM of the TMS9918 in order to write data sequentially.

When you boot the system or initialize a video mode, global constants are created that contain memory addresses that you can use so that you don't have to remember them, as they change their value depending on the video mode.

Constants are always capitalized. These are some of them related to memory addresses:

  • PATTERN_TABLE
  • SPRITE_PATTERNS
  • COLOR_TABLE
  • NAME_TABLE
  • SPRITE_ATTRIBUTES

In MicroPython there is no concept of constants, so technically you can write data to them. Don't do it, or you might break the system.

Clone this wiki locally