oscar64(1)
π NAME π
okay bestie, this is oscar64(1) from the User Commands manual, and the NAME line is literally: oscar64 β optimizing C/C++ cross-compiler for 6502 systems. Thatβs the whole vibe. β¨
π SYNOPSIS π
oscar64 [-h] [-v[1|2|3]] {-i=includePath} [-ii=includePath]
[-o=output.prg] [-rt=runtime.c] [-tf=format] [-tm=machine] [-pp]
[-strict] [-psci] [-n|-bc] [-e[p|t|b|a|i]] [-g[p]] [-O(0|1|2|3|s)]
[-O(i|ii|a|z|p|o|x|g|m)] [-dSYMBOL[=value]] [-DSYMBOL[=value]] [-xz]
[-rmp] [-d64=diskname] [-f=file] [-fz=file] [-fi=n] [-cid=n] [-csub=n]
[-cname=name] {source.c} {source.cpp}
π DESCRIPTION π
oscar64 is a C/C++ compiler for the 6502 processor family. It is designed to generate high-performance 8-bit code targeting platforms such as the Commodore 64, VIC-20, PET, Commander X16, NES, Atari 8-bit, and Mega65. High-performance 8-bit code, bestie β thatβs the whole point. π
β¨ OPTIONS β¨
π«Ά General Options
-hβ Print help text and exit. Like a little βwhat do I do now?β button. π-i=includePathβ Set the include file search path.-ii=includePathβ Set the default include path (overrides built-in path).-o=output.prgβ Specify output file name.-rt=runtime.cβ Use a custom runtime startup source (or empty for none).-ppβ Compile in C++ mode (automatically enabled for.cppfiles).-strictβ Use strict ANSI C parsing (no C++ extensions).-psciβ Use PETSCII encoding for all string literals without prefix.-xzβ Extended zero page usage. Provides more zero page space but disables return to BASIC. More space, but no cozy return-to-BASIC moment β noted.-rmpβ Generate error files (.error.mapand.error.asm) when the linker fails.
π§ Symbol Definitions
-dSYMBOL[=value]β Define a preprocessor symbol (like-Din other compilers).-DSYMBOL[=value]β Define a symbol in a gcc-compatible way (e.g.,-D NAME=VALUEas a separate argument).
π₯ Code Generation
-nβ Create pure native code for all functions (now the default).-bcβ Create byte code for all functions (disables native code generation).-eβ Execute the result in the integrated emulator after compilation.-epβ Execute and profile the result in the integrated emulator.-etβ Execute with trace output in the integrated emulator.-ebβ Execute with break trace in the integrated emulator.-eaβ Execute with asserts enabled in the integrated emulator.-eiβ Execute with I/O range checking in the integrated emulator.
π Optimization
-O0β Disable all optimizations.-O1or-Oβ Default optimizations.-O2β Aggressive speed optimizations (includes auto-inline of small functions).-O3β Aggressive optimization for speed (includes all sub-optimizations).-Osβ Optimize for code size.-Oiβ Enable auto-inline of small functions (part of O2/O3).-Oiiβ Enable aggressive auto-inline of all suitable functions.-Oaβ Optimize inline assembler (part of O2/O3).-Ozβ Enable auto-placement of global variables in zero page (part of O3).-Opβ Optimize constant parameters.-Ooβ Optimize size using"outliner"(extract repeated code sequences into functions).-Oxβ Optimize pointer arithmetic by blocking shorter arrays from crossing page boundaries.-Ogβ Enable global optimization.-Omβ Enable merge calls optimization.
πΈ Debug and Diagnostics
-vβ Enable verbose output for diagnostics.-v2β More verbose output.-v3β Even more verbose output (implies v2).-gβ Create source-level debug info and add source line numbers to.asmlisting.-gpβ Create source-level debug info and static profile data.
π¦ Target Format
-tf=formatβ Set the output target format.prgβ Standard Commodore PRG format (default).crtβ EasyFlash cartridge format.crt8β Generic 8KB cartridge (0x8000-0xa000).crt16β Generic 16KB cartridge (0x8000-0xc000).binβ Raw binary format.lzoβ LZO-compressed PRG output.
π Target Machine
-tm=machineβ Specify the target machine.c64β Commodore C64 (0x0800..0xa000, default).c128β Commodore C128 (0x1c00..0xfc00).c128bβ C128 first 16KB only (0x1c00..0x4000).c128eβ C128 first 48KB only (0x1c00..0xc000).plus4β Commodore Plus/4 (0x1000..0xfc00).vic20β VIC-20, no expansion (0x1000..0x1e00).vic20+3β VIC-20 +3K RAM (0x0400..0x1e00).vic20+8β VIC-20 +8K RAM (0x1200..0x4000).vic20+16β VIC-20 +16K RAM (0x1200..0x6000).vic20+24β VIC-20 +24K RAM (0x1200..0x8000).petβ Commodore PET, 8K RAM (0x0400..0x2000).pet16β Commodore PET, 16K RAM (0x0400..0x4000).pet32β Commodore PET, 32K RAM (0x0400..0x8000).nesβ NES NROM, 32K ROM, no mirror.nes_nrom_hβ NES NROM, 32K ROM, horizontal mirror.nes_nrom_vβ NES NROM, 32K ROM, vertical mirror.nes_mmc1β NES MMC1 mapper, 256K PROM, 128K CROM.nes_mmc3β NES MMC3 mapper, 512K PROM, 256K CROM.atariβ Atari 8-bit systems (0x2000..0xbc00).x16β Commander X16 (0x0800..0x9f00).mega65β Mega65 (0x2000..0xc000).
π Disk Image
-d64=disknameβ Create a.d64disk image with the specified name.-f=file.xxxβ Add a binary file to the disk image.-fz=file.xxxβ Add a compressed binary file to the disk image.-fi=nβ Set sector interleave for data files on disk image (default: 10).
π Cartridge Options
-cid=nβ Set cartridge type ID (used by VICE emulator).-csub=nβ Set cartridge sub-type.-cname=nameβ Set cartridge name string.
π RUNTIME LIBRARY DEFINES π
-dNOLONGβ Disable support for long integers inprintf.-dNOFLOATβ Disable floating-point support inprintf.-dHEAPCHECKβ Enable heap allocation/free checking; jam if heap is full or free out of range.-dNOBSSCLEARβ Do not clear BSS segment on startup.-dNOZPCLEARβ Do not clear zero-page BSS segment on startup.
π EXAMPLES π
Compile a program with optimizations:
oscar64 -i=include -O2 -o=demo.prg demo.c
Compile with emulator execution and custom runtime:
oscar64 -e -rt=startup.c -f=assets.dat game.c
Create a disk image with compiled output:
oscar64 -d64=mydisk.d64 -f=demo.prg demo.c
Compile in C++ mode with maximum optimization:
oscar64 -pp -O3 -o=demo.prg demo.cpp
π§ FILES π§
/nix/store/3ja2prlv2pld7z2khswfy7lpwaq4riwx-oscar64-1.32.273/bin/oscar64β Main compiler executable./nix/store/3ja2prlv2pld7z2khswfy7lpwaq4riwx-oscar64-1.32.273/include/oscar64β Headers and startup runtime source.
π SEE ALSO π
llvm-mos(1)
mwah π thatβs the whole page, bestie. This was oscar64(1), Version 1.32, dated June 2026 β version 1.32, June 2026, oscar64(1), periodt. π«Άβ¨π
π¦ where this page comes from
- nixpkgs unstable: oscar64 1.32.273
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms