EN
vcsWrite5(3V)vcsLib manualvcsWrite5(3V)
Name

vcsWrite5

Serves LDA # and STA zp to write a value to a TIA register or to RAM.

Synopsis
#include "vcsLib.h"

void vcsWrite5(uint8_t zeroPage, uint8_t value);
Description

It’s the workhorse of kernels without bus stuffing. Every change of colour, graphics or sound is a vcsWrite5.

At five cycles per write you get about 14 writes per line, and that’s the limit for a kernel without bus stuffing.

On the bus

It serves A9 nn 85 zp and takes 5 cycles of the 6507. This is how it looks on the bus right after a vcsJmp3:

φ2A12–A0D7–D0R/W$1000A9$100184$100285$100309$000984
1 lda #2 value3 sta zp4 COLUBK5 the TIA changes the background

served by the cartridgewritten by the 6507

Example
vcsWrite5(COLUBK, 0x84);
vcsWrite5(GRP0, sprite[line]);
Compatibility

● complete ◐ works with differences ○ exists but does nothing – missing ? no data

ImplementationBy versionNotes
Stella● 7.0● master
Gopher2600● 2022-2023● 2025-04● v0.51.0● v0.53.0● master
Test7800● 2025● v0.8.0 – v0.9.0
PlusCart and UnoCart● 2.3.15 – 2.3.28● git 2025-11● 2.3.32
Chameleon Cart● 2025-10-23
Chameleon Cart, alternative firmware● 2026-11-28
Newbroo Wild Cart and Decker? 2026
VCSIDE ACE adapter● 2026-11
See also

vcsWrite6(3V), vcsWrite3(3V)

vcsLib · December 2026Loads and storesvcsWrite5(3V)