x16-emulator

Émulateur vRelease 48

x16-emulator est un émulateur open-source dédié au Commander X16, un ordinateur néo-rétro inspiré du Commodore 64 mais doté d’architecture moderne. Il reproduit fidèlement son matériel, incluant le processeur 65C02/65C816, la carte graphique VERA (avec sprites et effets raster), le son (PCM, PSG, YM2151), et des périphériques comme la carte SD, le clavier, et les ports joystick. L’émulation est quasi-cycle-exacte, garantissant une compatibilité optimale avec les logiciels conçus pour la plateforme.

Disponible pour macOS 10.15 et versions ultérieures, il dépend de SDL2 pour son fonctionnement. Bien que les binaires officiels ne ciblent pas explicitement Apple Silicon, il peut fonctionner sur ces architectures via SDL2 natif. Une ROM compatible (rom.bin) est requise pour démarrer l’émulateur, disponible dans les releases ou compilable depuis le dépôt source. L’outil s’adresse aux développeurs, collectionneurs et passionnés souhaitant explorer ce système rétro-moderniste.

Dernière mise à jour :

Plateformes

Ordinateur

Architecture

Mac OS X - macOS Mac OS X - macOS Intel x86 Intel x86 Apple Silicon Apple Silicon 64 bits 64 bits SDL Library SDL Library

Téléchargement et liens

Historique des versions

v49
  • Nouveauté majeure : Ajout du support pour un système expérimental -gs avec 24 bits d’adressage RAM et un processeur 65C816, en prévision du futur X16 GS (corrections des instructions MVN et MVP pour le 65C816).

  • Améliorations matérielles :

    • VERA : Précision accrue du temps d’occupation SPI et corrections des registres d’écriture/lecture (alertes pour accès invalides).
    • VERA : Correction du comportement des sprites en 8bpp avec décalage de palette non nul.
    • VERA PSG : Correction de la fréquence du bruit (doublée dans la version précédente).
    • VIA : Correction du gestionnaire de flags IFR.
  • Fonctionnalités utilisateur :

    • Ajout de l’émulation MIDI série via FluidSynth (exclu du build WebAssembly).
    • Optimisation majeure de la performance du système de fichiers hôte (HostFS) pour les appels MACPTR, XMACPTR et XMCIOUT (compatibilité avec CMDR-DOS).
  • Corrections critiques :

    • Bug connu dans X16EDIT : Ctrl+F suivi de B échoue à compiler avec BASLOAD (contournable via BASLOAD "" depuis BASIC).
    • Sortie de l’émulateur possible avec Alt+F4 même si SDL ne gère pas la clé (sous Windows/Linux/macOS).
  • Spécifique macOS :

    • Builds officiels :
      • Version Intel : macOS 15 (Sequoia) minimum (fonctionne sur macOS 15+).
      • Version Apple Silicon (M1/M2/M3) : macOS 14 (Sonoma) minimum (fonctionne sur macOS 14+).
    • Note : Les builds ne sont pas garantis compatibles avec des versions antérieures aux OS de compilation (GitHub runner).
Changelog complet
### Release R49 ("Pyrite") * **KNOWN BUGS** * from X16EDIT, pressing Ctrl+F and then B fails to compile the program with BASLOAD. To work around the bug, exit X16EDIT back to BASIC and run `BASLOAD ""` * Features/Fixes * VERA: Add warnings when reading to write-only and when writing to read-only registers [irmen] * VERA: Make SPI busy time more true to hardware * VERA: Fix wrong behavior of 8bpp sprites when palette offset is nonzero * VERA PSG: Fix noise frequency being double that of hardware * SDCARD: add READ_MULTIPLE_BLOCK support [stople] * VIA: Fix for IFR flag handling [catharinejm] * Let emulator exit with Alt+F4 even if SDL does not handle it [JimmyDansbo] * Only free clipboard memory buffer when it comes from SDL's paste handler * Added serial MIDI emulation via FluidSynth * Exclude threading (needed for FluidSynth) in wasm build * Added `-gs` support, which implements a system with 24-bit addressable RAM and a 65C816 processor, in anticipation of the planned X16 GS with this feature. [Fulgen301] * Vastly improved performance of the HostFS's implementation of MACPTR * Added HostFS implementations of XMACPTR and XMCIOUT to mirror the CMDR-DOS implementations * 65C816 emulation fixes for MVN, MVP [Fulgen301, cnelson20] * Move from C99 to C11, some C syntax and header fixes [skeeto] * Additional web emulator options, including those to support CPU type and speed [JimmyDansbo] * Emulator debugger fixes, including support for GS, and pressing F9 a second time to clear the breakpoint * More changes in the [ROM](https://github.com/X16Community/x16-rom/tree/r49#release-49-pyrite). Due to the availability of GitHub runner images, the release builds published here may not work on versions of the OS older than what they were built on. * macOS Intel version is built on macOS 15 Sequoia (works on MacOS 15 or newer) * macOS ARM/M1/Apple Silicon version is built on macOS 14 Sonoma (works on MacOS 14 or newer) * Linux x86_64 version is built on Ubuntu 22.04 (works with glibc 2.35 or newer) However, x16-emulator can be built from source on older versions of the OS.
v48
  • Correction majeure sur le matériel VERA : la fréquence du SPI émulée est désormais alignée sur la moitié de la vitesse du VERA (au lieu du CPU), améliorant la compatibilité matérielle.

  • Nouveauté pour les développeurs : prise en charge du débogage des banques ROM 13-15 (utilisées par x16edit et Basload), ainsi qu’un affichage corrigé des valeurs non bornées dans le débogueur.

  • Précision technique sur le VERA PSG : implémentation fidèle du comportement du modèle 47.0.2 pour les ondes saw et triangle (XOR inverse de la largeur d’impulsion).

  • Améliorations CPU 65C816 :

    • Correction des calculs d’adressage indirect relatif (stack relative indirect) et des modes indirects via page directe ([dp]).
    • Nettoyage des octets hauts de .X et .Y après PLP/RTI si x=1.
    • Suppression de la page wraparound incorrecte dans l’instruction PEI.
  • Fonctionnalités utilisateur :

    • Ajout d’un outil de statistiques mémoire et d’un support du DOS "T"ell dans HostFS.
    • Affichage du temps CPU écoulé depuis le dernier point d’arrêt dans le débogueur.
Changelog complet
### Release R48 ("Cadmium") * Features/Fixes * Emulated VERA SPI clock has been updated to half of the VERA clock speed rather than the CPU clock. * Trace for ROM banks 13-15 (x16edit and Basload) is now supported [stefan-b-jakobsson] * Fixed debug reads from the stack and a few unbounded values in the debugger display * VERA PSG: for the saw and triangle waves, the inverse of the pulse width value is XORed with the value of the wave. This is the behavior of VERA 47.0.2 on hardware. [m00dawg] * Allow setting the amount of RAM in the web version of the emulator [JimmyDansbo] * Windows 11: Rounded corners should no longer cut off the lower left and lower right of the emulator window. * New memory statistics feature [irmen] * HostFS: Implement DOS "T"ell command * Debugger now includes elapsed cpu clocks since the last breakpoint or step * 65C816: Fixed stack relative indirect address calulation wrongly using the direct page [Fulgen301] * 65C816: high bytes of .X and .Y are now cleared when PLP or RTI set x=1 [cnelson20] * 65C816: PEI no longer does improper page wraparound, `[dp]` indirect modes now properly read the address. [Fulgen301] * More changes in the [ROM](https://github.com/X16Community/x16-rom/tree/r48#release-48-cadmium).
v47
  • Nouveauté majeure :

    • Ajout du support optionnel du processeur 65C816, activable via la nouvelle option en ligne de commande -c816 (et -c02 pour forcer le mode 65C02).
  • Corrections et améliorations techniques :

    • Correction d’un bug dans BASIC : les expressions de pointeurs dans le troisième argument de VPOKE écrivaient à la mauvaise adresse VRAM (ex. VPOKE 1,$B000,PEEK($400)).
    • Prise en charge native pour Apple Silicon (M1/M2/M3) via un build officiel compilé sur les runners GitHub macOS ARM.
  • Améliorations matérielles (VERA, SMC, PSG) :

    • Correction d’un bug d’adressage dans VERA FX (remplissage de cache non aligné en 4bpp).
    • Correction du retard d’une trame pour DC_VSTOP sur VERA.
    • Mise à jour de la logique de l’activité light du SMC (correction de la documentation erronée sur les niveaux PWM).
    • Mise à jour de la table de volume PSG de VERA pour correspondre à la version 47.0.0 (suppression de doublons de niveaux sonores).
  • Flexibilité du système de fichiers HostFS :

    • Ajout de l’option -hostfsdev pour configurer un numéro de périphérique non standard.
    • Meilleure gestion des chemins absolus et syntaxes DOS/CMD (ex. MD//:TEST crée bien le dossier à la racine).
  • Améliorations audio et performances :

    • Adaptation dynamique du nombre de buffers audio (-abufs) selon l’utilisation de HostFS (32 buffers par défaut si HostFS actif, 8 sinon) pour réduire les stutters.
Changelog complet
### Release 47 ("Roswell") This is a major release with numerous bugfixes, as well as introducing 65C816 support. * Known bugs * in BASIC, pointer expressions in the third argument of `VPOKE` will cause the system to write to the wrong VRAM address. For example: `VPOKE 1,$B000,PEEK($400)`. The workaround is to use a variable assignment, such as `N=PEEK($400):VPOKE 1,$B000,N`. - Fixed in git master. * Features/Fixes. * Optionally emulate a 65C816 CPU, selectable via a new command line switch `-c816`. There is also a `-c02` command line switch to explicitly select 65C02 mode. [Fulgen301] * In order to make room for the full 65C816 vector table, the R47 ROM relocates the "MIST" KERNAL signature from 0xFFF6 to 0xC008. Emulator has been updated to check for the signature in the newer location. [Fulgen301] * Made IEC device addressing more flexible by preventing the HostFS from consuming every device number [DragWx] * Improved timing calculations for HostFS operations to translate wall clock time to elapsed CPU ticks * If HostFS is in use, the default `-abufs` audio buffer count is 32, otherwise 8. This should reduce audio stuttering for games which load assets from disk while sound is playing. * HostFS can be changed to respond to a non-default device number. New command line option `-hostfsdev`. Using this option in conjunction with `-sdcard` allows both devices to appear on the system. * Matching the VERA hardware feature, the layer config T256 bit can be used as a palette switch in tile and bitmap modes. Most useful in 2bpp and 4bpp depths, setting this bit on the layer forces the resolved high bit of the palette entry index to 1. For instance, in 4bpp mode, a tile pixel with index 1, on a tile configured with palette offset 6 would normally resolve to palette entry 0x61 (or 97 decimal), having this layer bit set will cause this pixel to resolve to palette entry 0xE1 (or 225 decmial). * Copying VERA hardware behavior, the LINE IRQ can happen in the non-visible vertical blanking area. * HostFS: empty filename now returns an error as appropriate * IO2, the YM2151 range, is partially decoded on hardware. Emulator behavior now matches this so that the YM2151 is mirrored throughout the $9F42-$9F5F range. * New command line switch `-nokeyboardcapture` causes capture mode to operate without intercepting OS-level keystrokes such as Alt+Tab. * Improvements to `-wuninit` warnings to show the appropriate opcode and location of uninitialized accesses. * Recognize the INTL1 key code, which exists on some keyboard layouts such as pt-BR. * Update the 65C02 opcode table to properly handle multi-byte NOPs and update cycle counts. * `-trace` output has been updated and enhanced, showing banks for effective addresses. Add listings for new banks. * new `-longpwron` option to match SMC 47 long power button press behavior at power on. * VERA FX: fix address resolution bug with 4bpp unaligned cache filling. * VERA: DC_VSTOP was taking effect one scanline too late. * SMC: update activity light logic. Hardware was mistakenly documented as allowing 255 PWM intensity levels, while in fact it is binary on/off. * VERA PSG: update PSG volume table from VERA 47.0.0. Prior to this change, there were multiple PSG volume values at the low end that resulted in the same output level. * SDL2: Set the application name to "Commander X16 Emulator", which shows up in the audio mixer, and in the screensaver inhibit application list on Linux desktop environments. This should be a bit more informative than "My SDL application". * New `-pastewarp` command line switch that warps the emulator when receiving paste data either from the clipboard or from the `-bas` command line switch. * HostFS: improve path parsing with both CMD and unix path syntax, particularly with absolute path names. DOS"MD//:TEST" now creates the directory in the FS root rather than erroneously in the current directory. * VERA: DC_HSCALE and DC_VSCALE values > 0x80 now render as they do on hardware. * SMC 47.0.0 fast PS/2 read support * Now with native build for Apple Silicon (built on the GitHub MacOS ARM runner) * More changes in the [ROM](https://github.com/X16Community/x16-rom/tree/r47#release-47-roswell).