oscar64
| oscar64 | ||
|---|---|---|
| Developer | ||
| Company | Dr. Mortal Wombat | |
| Publisher | Dr. Mortal Wombat | |
| Release | 2021 | |
| Licence | Open Source | |
| Platform | PC (Windows, Mac, Linux | |
| Genre | Cross-Development | |
| Operation | ||
| Media | - | |
| Language(s) | ||
| Information |
| |
Oscar64 is a C/C++ cross compiler running on a modern system (such as a Windows PC, Mac or Linux machine) and targets the classic 6502 family of processors. It is mainly focused on Commodore systems such as the C64, PET or VIC-20. The compiler supports C99 and many C++ features up to variadic templates and lambda functions.
The purpose of this compiler is to eliminate the need to write 6502 assembler code to achieve high code density and fast execution speed. It continues to improve with all the games, demos and tools written by it. It supports disk overlays and banked cartridges for larger projects.
C64 Games[edit | edit source]

Following free C64 games were developed by Dr. Mortal Wombat with the compiler Oscar64:
- Ball and Chain
- Balls like a Frog
- Corescape
- MetalMayhem
- Mineshaft Gap
- Minotrace
- Missile Defence
- Portal Buster
- Roguebot
- Shallow Domains
- Veggies vs Undead
Benchmarks[edit | edit source]
One of the traditional concerns of using C/C++ on 6502 architectures is whether it can come close to the performance of using hand coded assembler, especially in high performance game code, therefore performance of the compiled code is important.
Some work was done on "C" compiler comparison by gglabs (via web.archive.org) in 2022.
At that time neither llvm-mos nor oscar64 were mature enough to be benchmarked.
Using the same gglabs benchmarks across the actively maintained C cross-compilers, here are some updated results:
| Benchmark | oscar64 | llvm-mos | cc65** |
|---|---|---|---|
| crc8 | 0.8 | 1.0 | 3.3 |
| crc16 | 1.7 | 2.3 | 4.6 |
| crc32 | 2.5 | 3.8 | 38.9 |
| sieve | 9.5 | 16.7 | 23.1 |
| sieve-bit | 16.3 | 19.6 | 70.7 |
| pi | 50.9 | 64.3 | 104.7 |
| fact | 66.0*** | 50.7*** | 238.2 |
| pow | 3.3 | 19.2 | -- |
| puff2 | 7.4 | 48.8* | 53.4 |
| dhrystone | 1.4 | 1.9 | 10.0 |
| aes256 | 12.5 | 10.1 | 195.4 |
- * without optimisation, because optimised builds fail
- ** cc65 results are from the original 2022 gglabs article
- *** oscar64 and llvm-mos will compute this entirely at compile time, so the actual execution time is now meaningless.
Manfred Hantschel maintains a 6502 compiler benchmark project, which facilitates automated compiling, running and reporting of these benchmarks for the above three compilers plus VBCC. It show the relative performance for size and performance optimised binaries using attractive graphs.
https://thred.github.io/c-bench-64/