Skip to content

Releases: llvm-mos/llvm-mos-sdk

SDK v17.0.0

22 May 06:05

Choose a tag to compare

Breaking changes

  • __from_ascii now returns an int, and its write callback does as well. This allows it to forward an EOF error code from its internal write function and exit early.
  • fpos_t is now 32-bit for compatibility with cc65. If you need files larger than 2GiB, you probably don't want a 6502.

New features

  • stdio is now feature-complete (parity w/ cc65) for commodore family targets
    • Text mode now converts at runtime from the execution character set (always ASCII) to the platform character set (PETSCII on non-cx16 systems).

Other changes

  • The minimal stdio's FILE pointers are now non-null and all different.
  • The simple ungetc was moved into the minimal stdio and the minimal getchar altered accordingly.

SDK v16.0.0

14 May 16:13

Choose a tag to compare

Breaking changes

  • __from_ascii and __to_ascii now take a void pointer to a context object and pass it though to the read/write callback. This is a trick from dl_iterate_phdr to allow passing general lambdas that refer to an ambient context.

New features

  • Port fwrite from PDCLib; port cc65 file writing backend (write) for commodore
    • Known issue: Doesn't yet support ASCII->PETSCII translation in text mode; outputs as if opened in binary mode

Bug fixes

  • #331 - [Mega65] Fix C++ static assert in ethernet controller - @mlund

SDK v15.3.0

25 Apr 22:05

Choose a tag to compare

New library features

  • All of the below only support the c64. Picked this arbitrarily; other backends will come later.
  • fopen
    • There's not actually much you can do with open files, and if you try to use most stdio functions and fopen in the same project, the link will fail.
  • fclose (with automatic fclose on exit)
  • rename
  • tmpfile
  • tmpnam

SDK v15.2.0

09 Apr 16:13
b61b298

Choose a tag to compare

New features

  • #154 - Add MEGA65 headers for hardware registers - @mlund

Bug fixes

SDK v15.1.0

04 Apr 16:01
becc1c3

Choose a tag to compare

New targets

  • #329 - Initial Atari Lynx support (.bll.o) - mos-lynx-bll-clang - @asiekierka

SDK v15.0.0

27 Mar 17:27
47b35b2

Choose a tag to compare

Breaking changes

  • llvm-mos/llvm-mos#456 - 65816 assembler changes - @asiekierka
    • lda >addr was previously interpreted as lda mos16hi(addr), but now will be interpreted as lda mos24(addr). This is unlikely to break production code.
    • lda <addr8 was previously interpreted as lda mos16lo(addr), but now will be interpreted as lda mos8(addr). As the two relocations are functionally (but not semantically) equivalent, this should not break production code.
    • Likewise, functional (but not semantic) changes involve the relocations emitted by immediate expressions (lda #val).

New features

  • #316 - Add C++ fixed point math library - @jroweboy
    • Supports various fractional and integral bit sizes.
    • Supports user-defined literals for common sizes (e.g., 9.4_12_4 is the 16-bit fixed point number with 12 integral bits and 8 fractional bits that is closest in value to 9.4).

Bug fixes

  • llvm-mos/llvm-mos#456 - 65816 assembler changes - @asiekierka

    • The immediate and address modifiers (#<, #>, #^, <, !, >) now adhere to WDC recommendations as documented in the 65816 datasheet.
    • In particular, this means the behaviour of lda >addr changes, while lda !addr and lda #^addr have been introduced.
      Immediate expressions now emit R_MOS_IMM8 and R_MOS_IMM16, while address expressions now emit R_MOS_ADDR8 and R_MOS_ADDR16 relocations.
    • Some error messages have been adjusted to more accurately represent the assembler's limitations.
    • Bugs/limitations in the SPC700 assembler's handling of addr + X and addr + Y addressing mode syntaxes have been fixed, and a test has been added.
    • S and R can now be used as register names in stack-relative addressing modes instead of SP and RP. This matches WDC 65816 and 65EL02 documentation/recommendations, respectively.
  • dc85a7d - Fix is_floating_pointr_v C++ <type_traits> typo

SDK v14.2.0

12 Mar 16:24
6c4e175

Choose a tag to compare

New targets

New features

  • llvm-mos/llvm-mos#355 - 65816 assembler improvements - @asiekierka
    • Add support for forcing "long" addressing mode with lda mos24(addr).
    • Finish support for $ml, $mh, $xl, $xh mapping symbols. These mark the state of M and X flags required to disassemble a given opcode, allowing tools like llvm-objdump to distinguish between lda #$ea and lda #$eaea. This information is gathered from the instruction itself - .a8/.a16/.i8/.i16 or whatever we end up implementing to set the default instruction encoding can then simply affect which instruction is selected in the parsing process. Tests have been provided to match other architectures with mapping symbols.
    • Add missing BIT #$eaea opcode to 65816.

Optimizations

SDK v14.1.0

05 Mar 04:07

Choose a tag to compare

New features

Bug fixes

Misc

SDK v14.0.0

27 Feb 04:43

Choose a tag to compare

Breaking changes

  • 8a21f34 - Swtich to ISO mode for Commander X16
    • The spirit and letter of the C standard state that the effects of
      printing printable characters in the execution character set (ASCII)
      should produce the corresponding character on the display. Since the
      Commander X16 has full ASCII support, we need to switch to ISO mode if a
      character could ever be output to the screen. This is similar to the
      shifted PETSCII switch now done for other Commodore family targets.
  • 7714ed4 - Translate \b to CURSOR LEFT on Commodore
    • Backspace is specified to move the cursor to the previous position on
      the current line, and that's precisely what CURSOR LEFT performs.
  • 8f468fc - Rename __char_conv to __from_ascii.
  • 90c3977 - Split getchar into __getchar and __to_ascii.
  • getchar is now a library function, and the target-specific hooks are __getchar to get a target character, and __to_ascii to convert a sequence of target characters into an ASCII character.
  • 90c3977 - Correct target to ASCII mappings for getchar
    • atari8, commodore, and cx16 now have analogous mappings for getchar and putchar.
  • 069e059 - errno values now follow Linux.

New features

  • All remaining <stdio.h> functions have been implemented. They only support the files stdin, stdout and stderr, and there's presently no way to redirect them or open other files. This implementation I'm calling the "trivial" <stdio.h>; we'll also have a "full" implementation that gets linked in if a file might possibly be opened or redirected.
    • The scanf doesn't yet support floating point numbers.

Bug fixes

  • #314 - Fix realloc returning memory regions that overlap with previous allocations

SDK v13.0.0

19 Feb 23:48

Choose a tag to compare

Breaking changes

  • f99cf88 - printf %p now prints as if %#x, not %X (i.e., 0xabcd, not ABCD).

New features

  • #303 - Add fmin/fmax functions to <math.h> - @mlund
  • f99cf88 - printf now supports %a to print floating point numbers in hexadecimal

New examples

Optimizations

  • f99cf88 - Rewrite printf using PDCLib
    • Simulator printf("Hello %d\n", 6502)
      • Before
        • Size: 6520
        • Cycles: 8865
      • After
        • Size: 4185
        • Cycles: 6084
    • Simulator printf("Hello %f\n", 6502.0)
      • Before
        • Size: 40482
        • Cycles: 41425
      • After
        • Size: 9772
        • Cycles: 219893

Bug fixes

  • #306 - Make __heap_start relocatable, fixing heap on CP/M-65 - @davidgiven
  • f99cf88
    • printf floating point printing is now correctly rounded
    • printf now displays the full integral part of %f instead of bailing and using %e