From vice-emu
Jump to navigation Jump to search

Things we want to do for the 3.7.2 release:

Rationale: After 3.7.1 we want to merge Fabbo's joystick mapping stuff asap, and then fix the fallout - which perhaps includes what is listed below.


The joystick system needs to be modified/extended to properly support custom button mappings.

  • Change the resources "JoyDevice{N}" to use strings with device identifiers instead of an index of the predefined and connected devices. So for example a Logitech F710 controller would be "001:006:046d:c21f" (usb-bus 1, device-no 6, vendor-Id 046d, product-Id c21f). We'll need archdep code to translate the strings into something the underlying arch driver can use, so at least handlers for Windows, MacOS, Linux and the various BSDs.
Relying on the device product/model ID won't be enough: a user can have multiple controllers of the same model.
  • Provide a joymap file per device identifier that can be loaded/edited/deleted, perhaps auto-load when JoyDevice{N} contains such an identifier.
  • Make the joymap files use (UI) action identifiers instead of the "menu paths" SDL does.
  • Make the joymap files human-readable by not doing what SDL does: for example: don't use 0-3 for input type, use ["axis", "button", "hat", "ball"], don't use 0-6 for the 'action' row, use "none" (or leave it out)", "joystick", "keyboard", "ui-action, "pot".
  • keep in mind there needs to be a way to map both "paddles" and "joysticks"
  • Dialogs need to written to handle all of this.

Branch fabrizio/3.7-joystick-mapping

Joymappings (WIP) contains details about what this does

The SVN branch branches/fabrizio/3.7-joystick-mapping contains code implementing custom joystick button mapping that isn't SDL-specific. Unfortunately the branch doesn't merge with trunk. As a workaround checking out the branch and doing a diff between the branch and trunk appears to generate a diff that can be applied with patch to "merge" the branch into trunk.

The following instructions assume VICE SVN root to be at $HOME/src/vice, with $HOME/src/vice/trunk being our trunk and $HOME/src/vice/branches/fabrizio/3.7-joystick-mapping being the branch to merge. Doing a make distclean will help with avoiding diff processing autohell files.

A little script like this will do the diff'ing: (Might be an idea to add -q to the diff invocation first to see the changed files and spot any files/patterns that need to excluded with -x [glob])





cd ${SVN_ROOT}
diff --strip-trailing-cr -U 3 -r ${A} ${B} -x configure.in -x .automake.out -x autom4te.cache -x *.swp -x gtk3
cd $CWD

The script excludes src/arch/gtk3 because the gtk3/ directory in the branch is far behind trunk, leading to a lot of noise, and massive merge conflicts using svn merge.

Then run:

$ ./script.sh > ~/me-patch.diff
$ cd $HOME/src/vice
$ patch -p0 <~/me-patch.diff

And pray VICE compiles after that.

UPDATE 2023-01-29: Applied above in r42972.
UPDATE II 2023-1-30: Branch and diff are fucked, reverted in trunk. UPDATE III 2023-2-1: New branch made, waiting for merge


Analogous to the joystick mappings, we'll need to implement separate joystick keyset files. Currently the keymap files can (and do, in the case of keyrah), contain definitions for keysets. The issue is that the vkm files are loaded after vicerc, meaning any keyset definitions of the user in vicerc are overridden. This has the unfortunate result of the user configuring a keyset and it working until the user restarts vice.
See bug #1797 for some additional info.


  • the SDL "menu actions" should use fixed numeric IDs for the mapping to keys/joystick instead of "menu pathes" which break when the menu is rearranged
  • SDL1/2 joystick mapping improvements
    • Make the 'extra joystick options' menu show what they are already mapped to
    • Add menu joystick actions mapping support to the 'extra joystick options' menu
  • TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)
    • the host window should change size/ratio
  • TODO: in x128 support enabling the statusbar separately for each window


  • add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource)
Added in trunk, with command line options -<CHIP>showstatusbar and +<CHIP>showstatusbar. Needs more work to properly handle the window resizing when toggling the visibility of the status bar.
  • make autostarting disk images dragged onto the window optional (see the "Doubleclick for autostart" option for attach dialogs, perhaps extend the option to also cover drag'n'drop.
  • add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working
  • TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y)
  • TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)
    • the host window should change size/ratio
  • TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892
  • Find out why the CRT control widgets take so long to show up.
  • Implement CHIPAspectRatio widget as a spin button. (fixed in trunk)
  • Add support for setting the LogFileName resource, including setting it to "-" to redirect to stdout. Perhaps use the "Host" => "Current directory" node and rename to "Environment"? (fixed in trunk)
  • Add support for opening the directory containing vice.log with the default file manager, or perhaps open vice.log with the default editor for .txt files.
Works on Linux and Windows, no idea about MacOS.
  • Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).
  • Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.
Also either delete the "ROM sets" stuff or properly fix it.


  • The path for vice.log is incorrect: currently we use $XDG_CONFIG_HOME (default: .~/config/vice/vice.log), this should become $XDG_STATE_HOME (default: ~/.local/state/vice/vice.log). (fixed in trunk, on Windows we still stuff everything in %APPDATA%\Roaming\vice)


  • Fix C128 cartridge system
    • snapshots are not supported yet
    • cartridges that work in C64 _and_ C128 mode are not supported yet
    • comal80 does not work correctly
  • implement CBM2 cartridge system
  • it is not possible to reset hotkeys to default (via UI) (fixed in trunk)
    • -default on cmdline should skip loading system files such as kernal from ~/.local/share/vice/$EMU/.
  • Add some simple checksum algorithm to common code (CRC32 is probably fine) - right now eg the kernal loading uses simple additive checksum, which is really bad :)
  • DTV should use different flash images for PAL, NTSC, Hummer
  • The list of available palette files (.vpl) should get generated from the available files found in the data directory
  • FFMPEG: many distributions are -- or will be -- providing only the 5.x version of FFMPEG, with no fallback packages for 4.x. This means VICE's ffmpeg code needs to be updated to use 4.x AND 5.x. The current code is based on ffmpeg 3.x with some fixes for 4.x, so it'll involve some work. Alternatively we could decide to finally ditch FFMEPG and use a single lossless audio/video codec.
  • Fix Videochip options (also see below)
    • we need to add a member to video_chip_cap_t that lets us determine whether we need PAL/NTSC options or not, then we can use this to remove -CRTCcrtdelaylinetype and -VDCcrtdelaylinetype (and the respective resources)


  • README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way
  • make bindist is currently broken for USE_HEADLESSUI. (fixed only for Windows/msys2)
  • Too many files are installed in $PREFIX/share/doc/vice when doing make install (example from Linux):

Github Actions

A .deb is generated for headless, sdl2 and gtk3 (both amd64), with non-stripped binaries.

  • Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)

The GHA should produce the html documentation and upload it to the website

  • perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)
  • also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically

The SDL1 port should also get checked


disable non working things in the GUI

  • REU does not work (yet) in x64sc, for the time being it should get removed from the UIs, the commandline options, the resources (in x64sc) (fixed in trunk)
  • vdrive via opencbm ("real device") does not work in xvic (disabled in trunk for gtk3)
  • Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) (disabled in trunk for gtk3)
  • Mirror/Flip X/Y and Rotate 90 degrees, should they still not be implemented at release time

TODO: make a list of all those things (here or elsewhere) since obviously those are open ends and need to be fixed

Archdep cleanup

  • there are still various bits of archdep things dangling around in common code (and some newly added *sigh*) - use ./src/findhacks.sh archdep to find such code - a lot of this (if not all) should live in arch/shared
    • remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code
  • the functions in src/arch/macOS-util.c should be renamed to archdep_... instead of vice_macos..., empty functions created for non macos, header renamed to archdep_... , and then called unconditionally from common code
  • Remove support for 'classic' BeOS, only support Haiku.
Change the make bindist method for Haiku into make install.

Compiler-dependent ifdefs cleanup

  • use ./src/findhacks.sh ccarchdep to find such code, most things should be removed
    • remaining cases should always come with a comment telling why there has to be compiler specific stuff

Debug and log messages cleanup

We have a lot of noise on the terminal, it might be a good idea to clean that up.

  • use ./src/findhacks.sh printf to find printf calls that need to turned into log_debug calls (log_debug adds a newline, keep that in mind to avoid lots of empty lines in the log when changing printf to log_debug!).
  • decide if we really need that message in the log, perhaps it can be surrounded with #ifdef DEBUG / #endif so the messages are only shown when compiling with --enable-debug?
  • also check disabled (commented-out) printf/log_debug calls, will we ever need them again?
  • a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)


  • many things that currently live in the archdep ui.h could be moved to the generic uiapi.h


There are a bunch of resources that have different names in SDL or GTK3 UIs, or which are specific to one of them. We should name those that do the same thing the same, and - as far as possible - get rid of the specific ones (by implementing the same feature in the other UI)

  • the same applies to the related commandline options, of course
  • NOTE: CHIPxyz resources should be registered in video-resources.c and the related variables go into the video_render_config_s struct (unless they fit into the video_resources_s struct)

A bunch of resources have to be handled per video chip:

GTK3 Resources
Resource Action
VSync Rename to CHIPVSync (in trunk)
GTKFilter Rename to CHIPGLFilter (in trunk)
KeepAspectRatio, TrueAspectRatio Rework into one resource: CHIPAspectMode (0: off, 1: custom 2: true) (in trunk)
CHIPAspectRatio should be used with "custom" mode, see above (in trunk)
CHIPFlipX (in trunk) To be implemented in GUI
CHIPFlipY (in trunk) To be implemented in GUI
CHIPRotate (in trunk) To be implemented in GUI
JoyMapFile, JoyThreshold, JoyFuzz Use these when implementing the joystick mapping stuff
SDL Resources
Resource Action
VSync Rename to CHIPVSync (in trunk)
AspectRatio Rename to CHIPAspectRatio (in trunk)
SDLGLAspectMode Rename to CHIPAspectMode (in trunk)
SDLGLFlipX Rename to CHIPFlipX (in trunk)
SDLGLFlipY Rename to CHIPFlipY (in trunk)
SDLGLFilter Rename to CHIPGLFilter (in trunk)
CHIPRotate (in trunk) To be implemented in UI
SDLStatusbar Rename to CHIPShowStatusbar (in trunk)
SDLCustomWidth Rename to CHIPFullscreenCustomWidth (in trunk)
SDLCustomHeight Rename to CHIPFullscreenCustomHeight (in trunk)
  • There should be non port specific cmdline options that set Window0Height, Window0Width etc

Resources without UI support

Resource Emulators Status
BoardType x64, x64sc, xscpu64, x128 set implicitly by "model" API


  • split vice.texi into smaller files
    • CAUTION: various scripts use vice.texi as input
  • various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere
  • Write a HOWTO for running Github Actions locally using act.


  • Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:
    • C128 ROMs: kernalfi, kernalfr, kernalit, kernalno
      • when ROMs have been identified, fix the code/checksums in c128rom.h/.c
    • Printer ROMs: mps801.bin, mps803.bin, nl10.bin
    • SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)
    • PET ROMs: chargen.de

3.7 Feedback threads