Mosaicus
Contents›Exporting and running›Running on a C64

Running on a C64

The Run menu shows the picture on a C64 in one keystroke: in VICE, or on a real C64 Ultimate or Ultimate 64 over your network. Mosaicus makes the same program as File ▸ Export… ▸ C64 program, from the picture as it is now (your hand edits included), and starts it there. Nothing is saved to a file you have to find.

Command Key Runs the picture
Run ▸ In VICE F5 in VICE: x64sc, or xscpu64 for the SuperCPU format
Run ▸ On C64 Ultimate Shift+F5 on a C64 Ultimate or Ultimate 64, over the network

Which one a format can use:

Format In VICE On C64 Ultimate
Standard and enhanced formats, logos and sprites yes (x64sc) yes
C64 Ultimate formats no: they race the beam in turbo mode, which VICE doesn't emulate yes
SuperCPU format yes (xscpu64) no: the Ultimate has no SuperCPU

A command a format can't use is disabled, and its menu label says why: In VICE (not for Ultimate formats), On C64 Ultimate (not for SuperCPU formats). For the SuperCPU format the VICE item reads In VICE (xscpu64, SuperCPU).

In VICE

Mosaicus needs VICE 3.5 or later, installed separately.

Press F5:

  • The first time, Mosaicus starts VICE with the picture. The status bar says VICE is starting with the picture (its window opens in the background).
  • After that, it sends each new picture to the same VICE window, which resets and runs it: Sent to VICE. No new window opens.
  • If you close VICE's window, the next F5 starts it again.

VICE never takes the focus

VICE starts in the background, and sending it a new picture doesn't bring it to the front: you keep typing and painting in Mosaicus while it shows the picture. On Windows, Mosaicus starts VICE in a way that can't take the foreground from the app you're working in.

Which VICE, and how it's started

Mosaicus looks for VICE's x64sc in this order:

  1. the path in File ▸ Preferences… (a program file, or a VICE folder);
  2. a MOSAICUS_VICE environment variable;
  3. the folders on your PATH;
  4. the usual install places: on Windows, GTK3VICE-…, WinVICE-… and other VICE folders in Program Files, your user folders and the drives' top folders; on macOS, /Applications and Homebrew; on Linux, /usr/bin, /usr/local/bin and /snap/bin. On Windows, when it finds several VICE folders, the newest version wins.

For the SuperCPU format, it runs xscpu64, VICE's C64 with a SuperCPU, from the same VICE folder.

When it can't find one, the run says so: VICE (x64sc) wasn't found: set VICE's path in the settings, or put x64sc on the PATH.

How Mosaicus starts VICE:

  • with your own VICE settings (window size, palette and the rest), but without saving any changes back to them;
  • with VICE's standard ROMs, whatever your settings name;
  • with the program put straight into memory and run, in warp speed while it loads;
  • with no confirmation when you close it;
  • with its binary monitor on, on a port of its own on your computer only (6564 for x64sc, 6565 for xscpu64). That's how the next picture reaches the same window. A VICE you started yourself isn't taken over (unless you gave it a binary monitor on that port), and an x64sc and an xscpu64 can be open side by side.

PAL or NTSC comes from VICE runs in Preferences (PAL at first). If you change it, the next F5 closes the running VICE and starts one with the other standard.

On C64 Ultimate

Mosaicus sends the program to a C64 Ultimate or Ultimate 64 over the network, through its REST API.

What you need:

  • the machine on your network, with Web Remote Control Service enabled in its Network Settings (it is unless someone turned it off) and no Network Password set;
  • its address in File ▸ Preferences… ▸ C64 Ultimate, such as 192.168.1.64.

Press Shift+F5. Since this resets the machine, Mosaicus asks first: This resets the C64 Ultimate at 192.168.1.64 and runs the picture. Whatever it is running now stops. Choose Reset and run. The machine resets, loads the program and runs it; the status bar says Running on the Ultimate at ….

With no address set yet, it asks for one: Preferences opens.

Mosaicus sends no password. If the machine doesn't answer within a few seconds, the run stops with a message naming its address.

The C64 Ultimate formats

The formats made for the Ultimate run at 64 or 48 MHz, and need its turbo:

  • Turbo Control must be set to C64U Turbo Registers (U64 Turbo Registers on an Ultimate 64 Elite-II), in the machine's U64 Specific Settings. It powers up Off unless you save the setting there.
  • After the reset, the screen stays black for a few seconds while the turbo starts; then the picture shows.
  • If the machine isn't running at the speed the picture needs, the program says so on the screen instead of showing it.
  • The 64 MHz formats need a C64 Ultimate or Ultimate 64 Elite-II. The 48 MHz ones were made for the C64 Ultimate and tested on it; the Ultimate 64 Elite-II should run them but hasn't been tested.

Test in Preferences checks that the machine answers at that address and how Turbo Control is set, before you run (below).

Preferences

File ▸ Preferences… (Ctrl+,) holds what running needs.

Setting What it does
VICE Where x64sc is. Leave it empty to find it automatically. The line below says which VICE will run (Using …), or that none was found, with where to get it.
VICE runs PAL or NTSC: the video standard VICE emulates. PAL at first. It also decides which standard the status bar's raster time is shown for.
C64 Ultimate The address of your C64 Ultimate or Ultimate 64. Test asks the machine and says what it found: its product name and firmware, and whether Turbo Control is set for the Ultimate formats.

All the preferences are described in Preferences.

Raster time in the status bar

For the formats whose viewer programs time what they do to the raster beam, the status bar shows how much of each frame the viewer's display code takes, such as Raster 41.3% PAL. What's left is yours: for music, or code of your own in the viewer source.

The formats that show it:

  • Hires FLI (AFLI) and Multicolor FLI;
  • the FLI + sprites formats;
  • Multicolor + sprites and Hires + sprites;
  • the sprite sheet;
  • the C64 Ultimate formats;
  • the SuperCPU format.

The Koala, hires, character and charset logo viewers time nothing, so they have no raster time to show.

Hover over it for the details, on both standards: the display code's cycles out of each frame's, the cycles left for other code, and on the 1 MHz formats the cycles the VIC takes from the CPU (badlines and sprite fetches). The cycles are the CPU's own: a stock C64's, the Ultimate's turbo cycles (63 to a C64 cycle at 64 MHz, 47 at 48 MHz), or the SuperCPU's.

The standard it shows:

  • the picture's pixel aspect, if it's set to PAL or NTSC;
  • both, for the C64 Ultimate formats (VICE can't run them, and the Ultimate may run either);
  • else the standard VICE runs is set to in Preferences.

The numbers come from the viewer's own code, not an estimate. The 1 MHz viewers are run, cycle by cycle, on a model of the C64 for a frame; the Ultimate viewers are counted from their structure; the SuperCPU viewer holds raster lines 51-250 (the whole picture area) by construction.

Beside it, the formats with sprites show the sprites the viewer uses, such as 8 sprites · 24 placed when sprites are used again further down the screen. Hover over it for each sprite's role and the number of sprites on each line.