Picocomputer 6502 - specific information for cc65

Ullrich von Bassewitz

An overview over the Picocomputer 6502 and its interfaces to the cc65 C compiler.

1. Overview

2. Binary format

3. Memory layout

4. Platform-specific header files

5. License

1. Overview

The Picocomputer 6502 is a modern W65C02S computer with a custom operating system designed to be POSIX-like. The reference design includes a W65C02S, W65C22S, RP6502-RIA, and optionally a RP6502-VGA. Peripheral devices like keyboards, mice, and flash storage are connected by USB to the RP6502-RIA. Audio is generated by the RP6502-RIA. Video is generated by the RP6502-VGA.

2. Binary format

The standard binary output format generated by the linker for the RP6502 target is a plain machine language program without any prefix or postfix.

The RP6502 Integrated Development Environment, based on Visual Studio Code, will convert the cc65 binary output into RP6502 ROM files that can be loaded directly from the RP6502 monitor or installed on the RIA to be loaded at boot.

3. Memory layout


The C run-time stack is located at $FEFF, and grows downward.


The C heap is located at the end of the program, and grows toward the C run-time stack.


RAM is located at $0000 - $FEFF. Default binaries load and start at $0200.


The RP6502 is designed with no ROM in the 6502 address space.


A Versatile Interface Adapter (6522) is 16 registers located at $FFD0.


The RP6502 Interface Adapter is 32 registers located at $FFE0.


User I/O expansion is from $FF00 to $FFCF.

4. Platform-specific header files

Programs containing RP6502-specific code may use the rp6502.h or rp6502.inc include files.

5. License

This software is provided "as-is", without any expressed or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated, but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.