Skip to content

CPCSyntaxError v0.16.0

Choose a tag to compare

@WacKEDmaN WacKEDmaN released this 14 Nov 12:38
· 1 commit to main since this release

CPCSyntaxError v0.16.0

Fast disc loading

Two new settings in the Discs window and the Media menu. Both are off until you turn them on.

  • Turbo: while the disc drive works, the whole CPC runs faster (up to 20 times, or as fast as your computer goes). When the program starts, it runs at normal speed again. Every loader works, protected loaders too. The status bar shows "DISC TURBO".
  • Instant loading:
    • The files and sectors that AMSDOS reads go into memory at once: LOAD, RUN", CAT, |CPM, and loaders that use AMSDOS's sector command. There is no wait for the motor and no wait for a seek. A 20 KB LOAD" takes 0.1 s instead of 5 s.
    • Loaders that drive the disc controller themselves get each sector without a wait for the disc to turn. The bytes still come at the speed of a real drive, so their read loops work as on a real CPC.
    • Protected sectors (CRC errors, deleted data, weak sectors) keep the timing of the disc.
    • It works with AMSDOS on the 464, 664, 6128 and the Plus, and with ParaDOS. Other DOS ROMs load at the normal speed (use Turbo).
    • Command line: --disc-instant.

Security audit

A full audit of the code added since the last one, with new fuzz tests and AddressSanitizer and UBSan builds.

  • Albireo (CH376): a program on the CPC could create a file such as ..\..\NAME and so write outside the folder of the USB stick or SD card. It could also create files with the names of Windows devices (CON, AUX). This is fixed. The file layer of the M4, IDE, SYMBiFACE and Albireo cards now refuses every name that could reach outside its folder.
  • Albireo (CH376): a program could ask for a file of 4 GB, and the emulator then tried to make it in memory. A file is now at most 256 MB ("disc full" after that).
  • BASIC window: a number such as 1E999 gave an undefined value. It is now kept as text, as BASIC itself keeps it.
  • Smaller changes: cartridge pages are always 16 KB, the MCP and command API servers take at most 32 connections at once, and the flow-control queue of the Albireo UART has a limit.

Machine profiles ask before they change folders

A machine profile can name the folders of the M4, IDE, Albireo and SYMBiFACE III cards and the HD20 image. A program on the CPC can write to those folders. If a profile names folders that are not yours, the emulator now asks: keep your folders, use the folders of the profile, or cancel. On the command line, --machine keeps your folders, and --machine-folders uses the folders of the profile.