Table of Contents

C compilers

Official compiler

SunPlus released sources for the C compiler. It doesn't include the assembler and is based on GCC 2.95 so quite hard to compile: https://github.com/vsmile-dev/unsp-gcc

VBCC

Work in progress port of vbcc: http://pulkomandy.tk/gerrit/plugins/gitiles/vbcc/+/refs/heads/unsp

This uses the very latest version of vasm and vlink.

The code generation is unoptimized at the backend level currently. This means the frontend of the compiler can do some general, high level optimizations, but it is not able to make use of any of the CPU advanced features.

See VBCC for info on how to set up a development environment.

Here is a TODO list for optimizations:

Assemblers

XASM

XASM is the original assembler provided by the µ'nSP IDE. It uses an unusual syntax compared to assemblers for other systems. For example, an addition to a register is written in this form:

R1 += 7

This is the syntax also used in the MAME debugger and some other disassemblers, but it is not convenient to include in other tools. For this reason, other assemblers use a more standardized syntax.

un-asm

un-asm implements the original XASM syntax. It is a very simple assembler (no macros, no expression evaluation) but it is usable when you need to have the XASM syntax.

naken_asm

naken_asm has support for µ'nSP and provides a standard include file for SPG200 registers.

This is a simple assembler that directly provides a binary file. It is not possible to use it to generate multiple object files to feed into a linker. But other than that, it is a well-tested and well documented assembler and works reliably.

vasm

vasm is a retargettable assembler. It is part of the vbcc compiler suite but usable separately.

It can emit binaries directly, or also generate temporary object files (in its custom vobj format) for use with the vlink linker. This allows to use the assembler in the context of a C compiler toolchain. Of course the assembler can be used standalone or together with the linker as well.

Due to the 16-bit-only addressing of the µ'nSP architecture, several changes were needed in vasm to handle it correctly. This will be released in vasm 2.0 when it is fully tested and stabilized. Until then, vasm with µ'nSP support is available:

Others

This early homebrew experiment took an interesting approach of not using an assembler at all.

Emulators

Graphics