Skip to content

mre/mos6532

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOS 6532

A pure Rust implementation of the MOS 6532 processor (also known as PIA or RIOT).

It is a Peripheral Interface Adaptor which has three functions: a programmable timer, 128 bytes of RAM, and two 8 bit parallel I/O ports.

It was used in the Atari 2600 as a coprocessor to read pedal input.

(Adapted from the Stella Programming Manual)

In the Atari 2600, the PIA uses the same clock as the microprocessor so that one PIA cycle occurs for each machine cycle. The PIA can be set for one of four different "intervals", where each interval is some multiple of the clock (and therefore machine cycles).

A value from 1 to 255 is loaded into the PIA which will be decremented by one at each interval . The timer can now be read by the microprocessor to determine elapsed time for timing various software operations and keep them synchronized with the hardware (TIA chip). (Source)

Resources