3.8

From vice-emu
Revision as of 22:47, 28 May 2023 by Gpz (talk | contribs) (→‎Misc)
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.

However, generally do not forget about the regular Todo page, which always contains some low hanging fruit :)

Joystick

The joystick system needs to be modified/extended to properly support custom button mappings. See Joymappings for more information.

Keyboard

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.

SDL UI

  • 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 (moved to Joymappings)
  • SDL1/2 joystick mapping improvements (moved to Joymappings)
    • Make the 'extra joystick options' menu show what they are already mapped to (moved to Joymappings)
    • Add menu joystick actions mapping support to the 'extra joystick options' menu (moved to Joymappings)
  • 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 (in trunk)
  • TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128
  • FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image() (in trunk)
  • FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image() (in trunk)
  • The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)
  • "CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)
  • In the Video menus when changing border size, the menu does not update as it should - however the option IS updated and the effect shows when leaving the menu (fixed in trunk)

GTK UI

  • 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.
    • this should be a generic option (for all UIs)
  • 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.
  • TODO: Make all cartridge widgets use the defines in src/cartridge.h for the cartridge names. (fixed in trunk, some defines might be missing: CARTRIDGE_PLUS4_NAME_DIGIBLASTER and CARTRIDGE_PLUS4_NAME_SIDCARD (although that one is spelled in at least four different ways))
  • FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay
  • FIX: In MMC64 Tab, the "MMC64 BIOS" and "MMC64 Cartridge Image" are the same thing. The save/flush Buttons should be located under the same caption as the filename entry (Primary image only: Flash)
  • FIX: In RAMLink Tab, the "RAMLink RAM Image" (Primary image is a regular ROM, secondary image is RAM). UI looks ok, but should use the new cartridge_flush_secondary_image(), cartridge_save_secondary_image(), cartridge_can_flush_secondary_image() and cartridge_can_save_secondary_image() for the RAM
  • FIX: GMOD2 (Primary image: Flash, secondary image: EEPROM). UI looks ok, but should use the new cartridge_flush_secondary_image(), cartridge_save_secondary_image(), cartridge_can_flush_secondary_image() and cartridge_can_save_secondary_image() for the EEPROM
  • FIX: GMOD2C128 (x128 only) (Primary image: Flash, secondary image: EEPROM) UI is missing the Flush/Save buttons for the EEPROM, should use the new cartridge_flush_secondary_image(), cartridge_save_secondary_image(), cartridge_can_flush_secondary_image() and cartridge_can_save_secondary_image() for the EEPROM
  • FIX: MMC Replay (Primary image: Flash, secondary image: EEPROM). UI is missing the Flush/Save buttons for the EEPROM, should use the new cartridge_flush_secondary_image(), cartridge_save_secondary_image(), cartridge_can_flush_secondary_image() and cartridge_can_save_secondary_image() for the EEPROM
  • FIX: REX RAM-Floppy (Primary image is regular ROM, secondary image is RAM). UI looks ok, but should use the new cartridge_flush_secondary_image(), cartridge_save_secondary_image(), cartridge_can_flush_secondary_image() and cartridge_can_save_secondary_image() for the RAM
  • TODO: On the printer tab, some invalid combinations of options should be prevented:
grey out "graphic" if either ASCII or RAW driver is selected (make sure you cant select "graphic" first, then change the driver to ASCII or RAW)
grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")
  • TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the HotkeyFile resource, in which case the user still has to save their settings to make the hotkeys available after VICE reboot, or if the hotkeys are saved in the default location with the default name, i.e. ~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk and auto-loaded after a VICE reboot. So this distinction has to be made clear to the user by the UI and the UI should provide a way to make the saved hotkeys default on VICE reboot. Perhaps something like "Save hotkeys and set as default" would work?
    • It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows /usr/local/share/vice/C64/gtk3-hotkeys.vhk, so that text will need be to updated on saving as well, but only when to user requests the saved hotkeys to be default ;)
    • The dialog exceeds the limits set on dialog size, so that'll need fixing as well.

Linux/Unix

  • 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)

FFMPEG

Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.

What we want to achieve is: get rid of the breakage every time FFMPEG bumps its version. There are two things we can do (even in parallel):

  • instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (WIP in trunk)
    • a runtime check and UI that warns when the exectable is missing needs to be made
    • needs to be tested and fixed on Windows, macOS
  • TODO: instead of the internal FFMPEG, support internal ZMBV codec (which we can pull into the tree)
this can always work, even if FFMPEG executable is not available
if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording
might even be possible to pipe ZMBV to external programs (such as OBS) directly

Misc

  • Fix Userport system
    • The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:
      • Instead of trying to figure out what device works on a machine by using various flags, use a simple bit field that directly gives this info
      • All devices should be registered in a central function, not per emulator as it is now.
    • Currently the user port hooks/functions are not representing the actual user port pins. as a consequence eg user port devices that would not actually work at a real Plus4 would suddenly work on it in the emulation. This should NOT happen - only if the physical device would actually work in a machine, it should work in the emulation.
      • an acceptable exception to the above are the "internal" user ports, ie C64DTV and CBM2. However, the "rewiring" that is used should be fixed, ie using a theoretical adapter that every user port device uses.
    • many functions are called by what they do in the context of the C64 emulator, this can be very confusing. Perhaps some can be renamed to refer to the actual user port pins instead.
    • after the rework, the PET diag pin can be converted into a regular userport device
  • archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [1] (fixed in trunk)
  • Fix C128 cartridge system
    • snapshots are not supported yet
    • cartridges that work in C64 _and_ C128 mode are not supported yet
      • RAMLink, MMC Replay, LTK (what else?)
        • Warpspeed is basically "two cartridges in one" (with a physical switch) and is implemented as if it was two individual cartridges because of this
    • comal80 does not work correctly
  • implement CBM2 cartridge system
  • Fix C64 cartridge system
    • implement functions for GMod2 EEPROM save-as/flush. (fixed in trunk)
    • a generic API for saving and flushing EEPROM data for carts should be implemented. (fixed in trunk)
    • IDE64 should save its config into a separate file rather than writing a binary string into vice.ini (in trunk)
  • 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 :) (in trunk)
  • DTV should use different flash images for PAL, NTSC, Hummer (fixed in trunk)
  • The list of available palette files (.vpl) should get generated from the available files found in the data directory (fixed in trunk)
  • 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) (fixed in trunk)

Buildsystem

  • when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 (fixed in trunk)
  • 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 (fixed in trunk)
  • The configure switch to enable lame mp3 support needs to be renamed to --with-lame, currently it is called --enable-lame, a remnant of when there was an in-tree lame source. (fixed in trunk)

Github Actions

A .deb is generated for headless, sdl1, 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

Cleanup

  • get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)

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 (fixed in trunk)
  • Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) (disabled in trunk for gtk3)
  • "IEC-Device" does not work in xvic and the IEEE machines (disabled in trunk)
  • diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)
  • WiC64 emulation is not working well (and disabled, unless experimental devices are enabled in userport.h) (fixed in trunk)
  • Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)
  • IEEE machines have no virtual device ("device traps")
  • Paperclip 64 dongle emulation is broken
  • DTL Basic Dongle emulation is broken
  • 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, and keep it here, since obviously those are open ends and need to be fixed!)

Codestyle cleanup

  • Apparently some files that do not respect the common codestyle sneaked in. Remember we removed the rule that archdep files can ignore codestyle rules long ago!
    • opengl_renderer_unix.c, render_thread.c, render_queue.c, opengl_renderer.c ...

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
  • TODO: 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
  • TODO: Remove support for 'classic' BeOS, only support Haiku.
Change the make bindist method for Haiku into make install.

Compiler-dependent ifdefs cleanup

vice.h is the only file where ifdefs are allowed that check for a specific compiler.

  • Use ./src/findhacks.sh ccarchdep to find occurances elsewhere in the code, they should be removed in almost all cases.
    • remaining cases should always come with a comment telling why there has to be compiler specific stuff
the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack

Codebase seems to be clean now Gpz (talk) 16:43, 25 March 2023 (CET)

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)

Headers

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

Resources

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

Some resources exist internally but should not be used by the UI. For the time being, make a list of these here (and keep it here).

Resource Emulators Status
BoardType x64, x64sc, xscpu64, x128 set implicitly by "model" API
CartridgeFile x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 set implicitly by cartride API

Docs

  • 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.

Data

  • 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, 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

even later

see Roadmap for the long term plan


After a release was made: copy this page to a new X.Y.Z page. Move this page to Category:DONE. Remove all crossed-out stuff from new page. Update Todo and Category:TODO. Update Roadmap