Releases: llvm-mos/llvm-mos-sdk
Releases · llvm-mos/llvm-mos-sdk
SDK v6.4.0
New targets
- #231 -- Add Commodore VIC-20 target (
mos-vic20-clang
) -- @asiekierka - #233 -- Add Commodore 128 target (
mos-c128-clang
) -- @asiekierka
New features
- #395 -- Wrap
od65
andld65
to link xo65 object files- This is a pretty landmark feature (IMO); you can now use ca65 object files (i.e. xo65 files) in a llvm-mos link more-or-less as if they were ELF. This allows linking against existing ca65 libraries without converting them to work with the llvm assembler.
- See https://llvm-mos.org/wiki/Cc65_integration for details
- See https://github.com/mysterymath/llvm-pently for an example project that links the NES "pently" auto library assembled with
ca65
against a demo application in llvm-mos C.
New libraries
- #231 -- Add cc65-compatible header files for PET -- @asiekierka
Bug fixes
- llvm-mos/llvm-mos#392 -- Fixed issue where a function that only called
__attribute__((leaf))
inline asm could be incorrectly optimized out - #233 -- Minor
volatile
fixes for Commodore PET -- @asiekierka
SDK v6.3.1
Bug fixes
-- [NES] Fix neslib by correcting .aligned_buffers
to .aligned.
SDK v6.3.0
Optimizations
- [NES] Moved aligned buffers to
.aligned
section at beginning of RAM.- NES noinit buffers commonly require high alignment, which then would make
.noinit
require high alignment..noinit
isn't traditionally the first thing in the C enclave, so this could waste too much of the NES's 2K of ram aligning the buffers. Traditionally these buffers are placed at 0x200; accordingly, we've created an.aligned
section that is the first thing placed in NES RAM.
- NES noinit buffers commonly require high alignment, which then would make
SDK v6.2.0
Optimizations
- llvm-mos/llvm-mos#378 -- Emit more efficient DEC/CMP patterns; use DCP (illegal opcode) when available -- @asiekierka
- llvm-mos/llvm-mos#372 -- Emit indexed-indirect JMP-based jump tables for 65CO2/SPC700 -- @asiekierka , @jackoalan
- llvm-mos/llvm-mos#376 -- Support MOVImag8 logical opcode on SPC700 for imaginary/imaginary copies -- @asiekierka
Bug fixes
- #226 -- Fix zeropage declarations for NES MMC3 mapper -- @cogwheel
- Add default printf implementation for NES
- Writes to 0x401B; provided
printf-mesen1.lua
andprintf-mesen2.lua
scripts for Mesen1 and Mesen2 to redirect this to the debug console.
- Writes to 0x401B; provided
- #227 -- (CP/M-65) Fix some problems with relocation conversion -- @davidgiven
SDK v6.1.0
New features
- llvm-mos/llvm-mos#357 -- SCP700 (SNES sound coprocessor) support -- @asiekierka
Bug fixes
-
llvm-mos/llvm-mos#369 -- Fix various issues with zero page pointers (e.g., llvm-mos/llvm-mos#366, llvm-mos/llvm-mos#363) -- @asiekierka
-
Use
__builtin_bit_cast
to allowconstexpr
initialization of struct of array arrays.- This was thought to work, but the previous implementation invoked
reinterpret_cast
, which isn't legal in constexpr. The new version works so long as the types don't contain pointers. For those that do, there's intrinsically no way to statically initialize them in C++; this has to instead be done in an assembly file using#<ptr
and#>ptr
.
- This was thought to work, but the previous implementation invoked
Optimization
-
Loop induction variable canonicalization now prefers narrower types instead of wider ones. This can replace 16-bit loop counters with zero-extensions of 8-bit ones. Doesn't come up tremendously often, but when it does, the previous behavior absolutely killed performance.
-
#222 - Make
neslib
/nesdoug
buffers weak so they can be moved by the user; move PAL_BUF out of hardware stack by default -- @cogwheel -
Fix C++-invalid cast in
nes.h
SDK v6.0.0
Breaking changes
- #220 -- NES -- Rename
bank.h
tomapper.h
-- @asiekierka- These were originally shortenings of
bank_helpers.h
fromnesdoug
, but as they gained more mapper-related functionality they were increasingly inaccurately named. Backwards incompatible changes like this are better to happen earlier, before too many NES projects depend on the API in the wild.
- These were originally shortenings of
New features
- llvm-mos/llvm-mos#348 -- Zero page pointers -- @asiekierka
- Variables can now be annotated with
__zeropage
or__zp
to change their address space, e.g.,char __zeropage value
. These variables are automatically placed in.zp.noinit
,.zp.data
, or.zp.bss
, as appropariate. What separates this from regular explicit section annotations is that pointers can also be annotated as pointing to zero page variables, e.g.,char __zeropage *ptr
. These pointers only take 8 bits, and arbitrary constant offsets backwards and forwards from them can be referenced using thezp,x
orzp,y
addressing modes. For example, ifx
is a zero page pointer stored inX
, a read fromx[2]
can be done usinglda 2,x
, and a load fromx[-2]
can be done usinglda 254,x
. This should be the preferred way of manually placing values in the zero page going forward.
- Variables can now be annotated with
- #211 -- NES MMC3 -- Add macros to set four-screen nametables -- @cogwheel
- #207 -- Commander X16 -- Add VERA FX register to
cx16.h
-- @ToboterXP - #212 -- NES -- Improve NMI performnace for
multi_vram_buffer
operations -- @cogwheel - #218 -- NES -- Add
.ram
output section to explicitly place input sections in NES RAM -- @cogwheel
Optimizations
- #217, #221 -- Split
neslib
andnesdoug
components out so they are only linked in as used.- These libraries were previously fairly monolithic, so using any of them tended to link in a large amount of data and NMI handlers. These have now been broken up, so largely only NMI handlers for the used portion of the library are brought into the program.
Bug fixes
SDK v5.0.0
Breaking changes
- The NES MMC1 mapper target no longer needs to have its PRG-ROM size specified by including a custom linker script. Instead, the default linker script is now directly responsive to the
__prg_rom_size
symbol, like the other mappers, and the previous linker script fragments to set this have been removed from the SDK. - Removed CHR-ROM shadow accessors from the NES Action53 mappers. These are difficult to keep up-to-date in the face of NMI, and they were argued to have limited utility.
New targets
- #191 --
nes-unrom-512
-- NES UNROM-512 mapper -- @asiekierka - #199 --
nes-gtrom
-- NES GTROM mapper -- @asiekierka- Notably, this is the first time we've supported a mapper with full 32KiB banking. To allow for this, the C sections are automatically placed in a simulated fixed region; this is duplicated in every bank at the same fixed offset at the start of each bank. The fixed region can grow or shrink dynamically, and code/rodata can still be explicitly placed in a named bank to remove it from the fixed region.
New features
- #197 -- Array of Structs library
- This provides a C++ library that automatically lays out an array of multi-byte types in a byte-wise fashion. That is, this turns an array of structs into a structure of arrays of bytes, one for each byte of the wrapped type. This allows accessing the contents of the array elements using the absolute indexed addressing mode, rather than doing expensive pointer arithmetic. See examples/struct-of-arrays.cc and mos-platform/common/include/soa.h for details.
- #201 -- C++ user-defined literal support for translating to Atari 8-bit and Commodore X16 character sets -- @asiekierka
- #203 -- NES -- Added ines.h header containing C macros to easily set linker script configuration -- @asiekierka
Bug fixes
- #194, #196 -- Safely handle bus conflicts on affected NES mappers -- @asiekierka
- #198 -- Safely handle NMI conflicts in CNROM, UNROM, and UNROM-512 -- @asiekierka
- #202 -- Correct LTO zero page available in Atari 8-bit targets -- @asiekierka
SDK v4.0.0
Breaking changes
- The compiler now defaults to the behavior of
-fshort-enums
.enum
types without explicitly specified types now take on the smallest integer type in which they will fit. This generally decreases the space and time overhead ofenum
s, and this choice is common on embedded targets. The old behavior is still available through-fno-short-enums
, but it now represents a non-standard ABI, and translation units using this option cannot be guaranteed compatible with those using the default, e.g., the SDK. The new default also comes with a few additional points of care:- Changes to the set of
enum
values can break ABI in more cases than previously - Since
short
andint
are the same size on our platform, but are not the same type, a pointer to an enumerator that contains values that only fit inint
is now only compatible with a pointer toshort
, not a pointer toint
. Even though these are effectively the same type on our platform, the C standard still rules it undefined behavior to access such anenum
through a pointer toint
, or to use them in a context where compatible types are expected, e.g., on two branches of the ternary operator.
- Changes to the set of
New targets
- #190 --
nes-unrom
-- NES UNROM mapper -- @asiekierka
New features
- llvm-mos/llvm-mos#344 -- Preprocessor macros to indicate CPU types containing currently available features -- @asiekierka
- llvm-mos/llvm-mos#345 -- Implement
llvm-objdump --symbolize-operands
to show symbolic names for operands in disassembly -- @asiekierka
Bug fixes
- llvm-mos/llvm-mos#342 -- Fix build when using LLVM/Clang 16 -- @asiekierka
- llvm-mos/llvm-mos#345 -- Fix 65816
BRL
behavior -- @asiekierka - NES MMC3's
.reset
and.vector
section sizes are now accurately reported in the linker map file (previously they contained fill bytes).
SDK v3.1.0
New targets
Bug fixes
- #179 -- Fix MSVC compile error in PCE util -- @jroweboy
- #182 -- Changes to platform object files in the SDK now correctly trigger a
re-install of that object.
Optimizations
- #181 -- Change
oam_spr
to take 2 fewer clock cycles -- @Andrew900460
SDK v3.0.0
Breaking changes
c.ld
now places read-only sections and initializer LMAs intoc_readable
. It also now places writeable sections and their VMAs inc_writeable
. These need to be defined explicitly now, rather than defaulting toram
. ROM targets are now just as numerous as RAM targets, so this removes duplication by allowingc.ld
to be used by both.
New features
- Add C++20 custom string literals for Commodore 64/PET PETSCII/Video character sets
- See https://llvm-mos.org/wiki/Character_set for details
Bug fixes
- #163 - Fix initialization of
T2
ineater
systick
code -- @rweather - Make
INC A
/DEC A
actually changeA
on the 65C02 simulator. - Quote
clang
command name in Windows.bat
wrappers, allowing the SDK to be used from a path containing spaces.
Optimizations
- Prefer selecting CMOS
INC
/DEC
over NMOS versions.