http://vice-emu.pokefinder.org/api.php?action=feedcontributions&user=Compyx&feedformat=atomvice-emu - User contributions [en]2024-03-28T21:26:01ZUser contributionsMediaWiki 1.40.1http://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6238Joymappings2024-03-18T16:50:02Z<p>Compyx: /* Milestone 4 */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* <s>TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names</s> Cannot be implemented, best we can do is USB vendor+product ID (which falls apart when two or more of the same controllers are attached, e.g. PS3 controllers) or a device node provided by the OS (which will change for a device once the order of plugging controllers in changes between runs of VICE).<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || Compyx (Linux, Windows, FreeBSD, NetBSD), ??? (MacOS) ||style="background-color:orange;"|25% || ||The preferred way would be to use the GUIDs used by SDL's mapping (see https://github.com/gabomdq/SDL_GameControllerDB), a 128-bit unsigned integer composed of device <i>bus-type</i>, <i>vendor</i>, product</i> and version</i>. Some test code generating this GUID for Linux with <tt>libevdev</tt> is available at https://github.com/Compyx/evdev-js-test. See the function <tt>dev_info_get_guid()</tt> in the file <tt>joystick.c</tt> for details.<br />
Some new work is being done at [https://github.com/Compyx/vice-joydriver-test Compyx/vice-joydriver-test], along with updated drivers for Linux, BSD and Windows.<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK3 joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx ||style="background:yellow;"|50% || ? ||Basic things like buttons work, but axes and hats need work. The shared code also needs updating to allow for non-sequential, non-zero based button/axis/hat codes, and codes that are larger than <tt><b>uint8_t</b></tt>.<br />
See [https://github.com/Compyx/vice-joydriver-test Compyx/vice-joydriver-test] for a new implementation (WIP) of the driver and mapping code (and hopefully calibration as well, soon).<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx ||style="background-color:orange;"|20% || ? ||Joymap files now use UI action names instead of "menu paths" for all ports and the parser has been updated to actually validate its input and log warnings on errors in joymap files. Still needs a ton of work.<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
* "JoyMapFile", "JoyThreshold", "JoyFuzz" - Use these when implementing the joystick mapping stuff<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
<ol><br />
<li>Joystick number (zero-based index of the hardware joystick)</li><br />
<li>Input type (enum <tt>joystick_input_type_t</tt>)<br />
<ol start="0"><br />
<li>Axis (<tt>JOY_INPUT_AXIS</tt>)</li><br />
<li>Button (<tt>JOY_INPUT_BUTTON</tt>)</li><br />
<li>Hat (<tt>JOY_INPUT_HAT</tt>)</li><br />
<li>Ball (<tt>JOY_INPUT_BALL</tt>)</li><br />
</ol><br />
</li><br />
<li>Input index<br />
<ul><br />
<li>For buttons, it is the zero-based index of the button</li><br />
<li>For axes:<br />
* if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
* otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.</li><br />
<li>for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.</li><br />
</ul><br />
</li><br />
<li>Action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. A string argument (unquoted) indicating the UI action to trigger. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/shared/uiactions.c src/arch/shared/uiactions.c] for a list of action names.<br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6235Joymappings2024-02-26T18:37:52Z<p>Compyx: /* Actions */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || Compyx (Linux, Windows, FreeBSD, NetBSD), ??? (MacOS) ||style="background-color:orange;"|25% || ||The preferred way would be to use the GUIDs used by SDL's mapping (see https://github.com/gabomdq/SDL_GameControllerDB), a 128-bit unsigned integer composed of device <i>bus-type</i>, <i>vendor</i>, product</i> and version</i>. Some test code generating this GUID for Linux with <tt>libevdev</tt> is available at https://github.com/Compyx/evdev-js-test. See the function <tt>dev_info_get_guid()</tt> in the file <tt>joystick.c</tt> for details.<br />
Some new work is being done at [https://github.com/Compyx/vice-joydriver-test Compyx/vice-joydriver-test], along with updated drivers for Linux, BSD and Windows.<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK3 joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx ||style="background:yellow;"|50% || ? ||Basic things like buttons work, but axes and hats need work. The shared code also needs updating to allow for non-sequential, non-zero based button/axis/hat codes, and codes that are larger than <tt><b>uint8_t</b></tt>.<br />
See [https://github.com/Compyx/vice-joydriver-test Compyx/vice-joydriver-test] for a new implementation (WIP) of the driver and mapping code (and hopefully calibration as well, soon).<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx ||style="background-color:orange;"|20% || ? ||Joymap files now use UI action names instead of "menu paths" for all ports and the parser has been updated to actually validate its input and log warnings on errors in joymap files. Still needs a ton of work.<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
* "JoyMapFile", "JoyThreshold", "JoyFuzz" - Use these when implementing the joystick mapping stuff<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
<ol><br />
<li>Joystick number (zero-based index of the hardware joystick)</li><br />
<li>Input type (enum <tt>joystick_input_type_t</tt>)<br />
<ol start="0"><br />
<li>Axis (<tt>JOY_INPUT_AXIS</tt>)</li><br />
<li>Button (<tt>JOY_INPUT_BUTTON</tt>)</li><br />
<li>Hat (<tt>JOY_INPUT_HAT</tt>)</li><br />
<li>Ball (<tt>JOY_INPUT_BALL</tt>)</li><br />
</ol><br />
</li><br />
<li>Input index<br />
<ul><br />
<li>For buttons, it is the zero-based index of the button</li><br />
<li>For axes:<br />
* if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
* otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.</li><br />
<li>for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.</li><br />
</ul><br />
</li><br />
<li>Action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. A string argument (unquoted) indicating the UI action to trigger. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/shared/uiactions.c src/arch/shared/uiactions.c] for a list of action names.<br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8.1&diff=62303.8.12024-01-13T20:59:57Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.8 release, but are now going to be in the 3.8.1 release:<br />
<br />
Rationale: After 3.8 we want to fix the remaining joystick/controller/mapping related things, and also merge the SDL multithread stuff. Plus fix the resulting fallout, and the remaining issues below.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
** TODO: check on al OSs.<br />
** TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
=== GTK UI ===<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>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.<br />
** this should be a generic option (for all UIs)</s><br />
:: (<b>added in trunk</b>: integer resource "AutostartDropMode" was added to configure autostart behaviour on dropping an image onto the emulator window. Three modes: 0: attach-only, 1: attach and load, 2: attach, load and run (Default). The Gtk3 UI implements the behaviour, the resource and command line switch are generic, for future use by other UIs.<br />
<br />
* <s>Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.</s> (<b>fixed in trunk</b>, <tt>rommanager.{c,h}</tt> were renamed to <tt>settings_rom.{c,h}</tt> and the old ROM (set/archive) UI files were deleted)<br />
<br />
* Check ReSID sliders: there's a good chance switching between FastSID and ReSID doesn't enable/disable the filter sliders (and reset button) properly. Both the normal emus and VSID need to be checked.<br />
<br />
* Fix hotkeys UI: The dialog exceeds the limits set on dialog size<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
* TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* TODO: Window resizing needs more work to properly handle the resizing when toggling the visibility of the status bar.<br />
<br />
=== Video capturing ===<br />
<br />
FFMPEG (library) support is deprecated and disabled by default. We are developing two alternatives:<br />
<br />
==== ffmpeg.exe ====<br />
Instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (via web sockets).<br />
* a runtime check and UI that warns when the exectable is missing needs to be made<br />
* needs to be tested and fixed on Windows, macOS<br />
* FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
<br />
==== ZMBV ====<br />
Internal support for the [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec<br />
* TODO: might even be possible to pipe ZMBV to external programs (such as OBS, or ffmpeg?) directly. <br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing, this needs to be handled in the general log system somehow<br />
** right now color codes end up in the regular log file too, because color codes are fed into the log_ calls. Instead the log_ calls should *produce* the color codes, and omit them when writing to a file.<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors. Generally coloring terminal output correctly is more complex that it seems on first look :)<br />
** +wic64colorizetrace is undocumented. this should be a global option too, not wic64 specific<br />
** "WIC64LogLevel" resource is not documented<br />
<br />
* WiC64 implementation has some weird "WIC64_CMD_IS_HARDWARE" command, which reports "we are an emulator". This is very much against what we want VICE to work like - it should behave like the real hardware, period. There is no reason for this kind of command, other than encouraging people to use it and somehow behave different in emulation. That's just a terrible idea, we removed all "emulator id" stuff long ago for the same reason.<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* Fix VIC20 cartridge system<br />
** cartridge_get_info_list is not implemented<br />
** CRT saver are missing<br />
*** writeback with crt file is not implemented<br />
** GUI elements for "save/flush cartridge" are missing<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** MMC Replay is broken in C128 mode<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
=== Buildsystem ===<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?) -- This one appears to be added by autoconf itself, we don't set anything of the kind in <tt>configure.ac</tt>. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]])<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
* we'll have to decide: do we want to keep the --without-zlib option? if yes, then we need an option to disable the GUI monitor (because vte needs zlib) and force it on when zlib is not available<br />
<br />
==== Github Actions ====<br />
<br />
* <s>make-release.yml shows:<br />
:: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/</s> (<b>fixed in trunk</b>)<br />
<br />
* make sure both build-main-on-push.yml and make-release.yml (and perhaps others in the future) can "include" a common file that contains eg all configure options to use<br />
<br />
* we need to somehow make sure that ideally 3 different configurations are tested (compiled and linked) at least once:<br />
** "everything" disabled. this makes sure we don't forget any stubs.<br />
** "everything" enabled. this makes sure all options actually work.<br />
*** the actual posted "releases" should probably use something close to the former<br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Code streamlining ===<br />
<br />
* In xvic the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
<br />
* write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==== Headers ====<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
TODO: '''for the time being, make a list of all those things here''', and keep it here, since obviously those are open ends and need to be fixed!<br />
<br />
Some things must be enabled in the code:<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Drives:<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
<br />
For development of certain devices, you can use --enable-experimental-devices, which defines HAVE_EXPERIMENTAL_DEVICES, to enable WIP code:<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
==== Codestyle cleanup ====<br />
<br />
Please make sure no files that do not respect the common code style sneak in again. <b>Remember we removed the rule that "archdep files can ignore codestyle rules" long ago!</b><br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
<br />
There are still various bits of archdep things dangling around in common code<br />
<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
==== Resources without UI support ====<br />
<br />
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)'''.<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
====Build instructions====<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
====other====<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.8 Feedback threads ==<br />
<br />
* https://csdb.dk/release/index.php?id=238034<br />
* https://www.lemon64.com/forum/viewtopic.php?t=83718<br />
* https://www.forum64.de/index.php?thread/143010-vice-3-8-has-been-released/<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8.1&diff=62253.8.12023-12-31T09:29:29Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.8 release, but are now going to be in the 3.8.1 release:<br />
<br />
Rationale: After 3.8 we want to fix the remaining joystick/controller/mapping related things, and also merge the SDL multithread stuff. Plus fix the resulting fallout, and the remaining issues below.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
** TODO: check on al OSs.<br />
** TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
=== GTK UI ===<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>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.<br />
** this should be a generic option (for all UIs)</s><br />
:: (<b>added in trunk</b>: integer resource "AutostartDropMode" was added to configure autostart behaviour on dropping an image onto the emulator window. Three modes: 0: attach-only, 1: attach and load, 2: attach, load and run (Default). The Gtk3 UI implements the behaviour, the resource and command line switch are generic, for future use by other UIs.<br />
<br />
* <s>Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.</s> (<b>fixed in trunk</b>, <tt>rommanager.{c,h}</tt> were renamed to <tt>settings_rom.{c,h}</tt> and the old ROM (set/archive) UI files were deleted)<br />
<br />
* Fix hotkeys UI: The dialog exceeds the limits set on dialog size<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
* TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* TODO: Window resizing needs more work to properly handle the resizing when toggling the visibility of the status bar.<br />
<br />
=== Video capturing ===<br />
<br />
FFMPEG (library) support is deprecated and disabled by default. We are developing two alternatives:<br />
<br />
==== ffmpeg.exe ====<br />
Instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (via web sockets).<br />
* a runtime check and UI that warns when the exectable is missing needs to be made<br />
* needs to be tested and fixed on Windows, macOS<br />
* FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
<br />
==== ZMBV ====<br />
Internal support for the [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec<br />
* TODO: might even be possible to pipe ZMBV to external programs (such as OBS, or ffmpeg?) directly. <br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing, this needs to be handled in the general log system somehow<br />
** right now color codes end up in the regular log file too, because color codes are fed into the log_ calls. Instead the log_ calls should *produce* the color codes, and omit them when writing to a file.<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors. Generally coloring terminal output correctly is more complex that it seems on first look :)<br />
** +wic64colorizetrace is undocumented. this should be a global option too, not wic64 specific<br />
** "WIC64LogLevel" resource is not documented<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* Fix VIC20 cartridge system<br />
** cartridge_get_info_list is not implemented<br />
** CRT saver are missing<br />
*** writeback with crt file is not implemented<br />
** GUI elements for "save/flush cartridge" are missing<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** MMC Replay is broken in C128 mode<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
=== Buildsystem ===<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?) -- This one appears to be added by autoconf itself, we don't set anything of the kind in <tt>configure.ac</tt>. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]])<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
* we'll have to decide: do we want to keep the --without-zlib option? if yes, then we need an option to disable the GUI monitor (because vte needs zlib) and force it on when zlib is not available<br />
<br />
==== Github Actions ====<br />
<br />
* <s>make-release.yml shows:<br />
:: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/</s> (<b>fixed in trunk</b>)<br />
<br />
* make sure both build-main-on-push.yml and make-release.yml (and perhaps others in the future) can "include" a common file that contains eg all configure options to use<br />
<br />
* we need to somehow make sure that ideally 3 different configurations are tested (compiled and linked) at least once:<br />
** "everything" disabled. this makes sure we don't forget any stubs.<br />
** "everything" enabled. this makes sure all options actually work.<br />
*** the actual posted "releases" should probably use something close to the former<br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Code streamlining ===<br />
<br />
* In xvic the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
<br />
* write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==== Headers ====<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
TODO: '''for the time being, make a list of all those things here''', and keep it here, since obviously those are open ends and need to be fixed!<br />
<br />
Some things must be enabled in the code:<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Drives:<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
<br />
For development of certain devices, you can use --enable-experimental-devices, which defines HAVE_EXPERIMENTAL_DEVICES, to enable WIP code:<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
==== Codestyle cleanup ====<br />
<br />
Please make sure no files that do not respect the common code style sneak in again. <b>Remember we removed the rule that "archdep files can ignore codestyle rules" long ago!</b><br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
<br />
There are still various bits of archdep things dangling around in common code<br />
<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
==== Resources without UI support ====<br />
<br />
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)'''.<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
====Build instructions====<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
====other====<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.8 Feedback threads ==<br />
<br />
* https://csdb.dk/release/index.php?id=238034<br />
* https://www.lemon64.com/forum/viewtopic.php?t=83718<br />
* https://www.forum64.de/index.php?thread/143010-vice-3-8-has-been-released/<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8.1&diff=62243.8.12023-12-31T09:16:09Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.8 release, but are now going to be in the 3.8.1 release:<br />
<br />
Rationale: After 3.8 we want to fix the remaining joystick/controller/mapping related things, and also merge the SDL multithread stuff. Plus fix the resulting fallout, and the remaining issues below.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
** TODO: check on al OSs.<br />
** TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
=== GTK UI ===<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>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.<br />
** this should be a generic option (for all UIs)</s><br />
:: (<b>added in trunk</b>: integer resource "AutostartDropMode" was added to configure autostart behaviour on dropping an image onto the emulator window. Three modes: 0: attach-only, 1: attach and load, 2: attach, load and run (Default). The Gtk3 UI implements the behaviour, the resource and command line switch are generic, for future use by other UIs.<br />
<br />
* <s>Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.</s> (<b>fixed in trunk</b>, <tt>rommanager.{c,h}</tt> were renamed to <tt>settings_rom.{c,h}</tt> and the old ROM (set/archive) UI files were deleted)<br />
<br />
* Fix hotkeys UI: The dialog exceeds the limits set on dialog size<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
* TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* TODO: Window resizing needs more work to properly handle the resizing when toggling the visibility of the status bar.<br />
<br />
=== Video capturing ===<br />
<br />
FFMPEG (library) support is deprecated and disabled by default. We are developing two alternatives:<br />
<br />
==== ffmpeg.exe ====<br />
Instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (via web sockets).<br />
* a runtime check and UI that warns when the exectable is missing needs to be made<br />
* needs to be tested and fixed on Windows, macOS<br />
* FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
<br />
==== ZMBV ====<br />
Internal support for the [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec<br />
* TODO: might even be possible to pipe ZMBV to external programs (such as OBS, or ffmpeg?) directly. <br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing, this needs to be handled in the general log system somehow<br />
** right now color codes end up in the regular log file too, because color codes are fed into the log_ calls. Instead the log_ calls should *produce* the color codes, and omit them when writing to a file.<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors. Generally coloring terminal output correctly is more complex that it seems on first look :)<br />
** +wic64colorizetrace is undocumented. this should be a global option too, not wic64 specific<br />
** "WIC64LogLevel" resource is not documented<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* Fix VIC20 cartridge system<br />
** cartridge_get_info_list is not implemented<br />
** CRT saver are missing<br />
*** writeback with crt file is not implemented<br />
** GUI elements for "save/flush cartridge" are missing<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** MMC Replay is broken in C128 mode<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
=== Buildsystem ===<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?) -- This one appears to be added by autoconf itself, we don't set anything of the kind in <tt>configure.ac</tt>. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]])<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
* we'll have to decide: do we want to keep the --without-zlib option? if yes, then we need an option to disable the GUI monitor (because vte needs zlib) and force it on when zlib is not available<br />
<br />
==== Github Actions ====<br />
<br />
* make-release.yml shows:<br />
:: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/<br />
<br />
* make sure both build-main-on-push.yml and make-release.yml (and perhaps others in the future) can "include" a common file that contains eg all configure options to use<br />
<br />
* we need to somehow make sure that ideally 3 different configurations are tested (compiled and linked) at least once:<br />
** "everything" disabled. this makes sure we don't forget any stubs.<br />
** "everything" enabled. this makes sure all options actually work.<br />
*** the actual posted "releases" should probably use something close to the former<br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Code streamlining ===<br />
<br />
* In xvic the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
<br />
* write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==== Headers ====<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
TODO: '''for the time being, make a list of all those things here''', and keep it here, since obviously those are open ends and need to be fixed!<br />
<br />
Some things must be enabled in the code:<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Drives:<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
<br />
For development of certain devices, you can use --enable-experimental-devices, which defines HAVE_EXPERIMENTAL_DEVICES, to enable WIP code:<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
==== Codestyle cleanup ====<br />
<br />
Please make sure no files that do not respect the common code style sneak in again. <b>Remember we removed the rule that "archdep files can ignore codestyle rules" long ago!</b><br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
<br />
There are still various bits of archdep things dangling around in common code<br />
<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
==== Resources without UI support ====<br />
<br />
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)'''.<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
====Build instructions====<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
====other====<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.8 Feedback threads ==<br />
<br />
* https://csdb.dk/release/index.php?id=238034<br />
* https://www.lemon64.com/forum/viewtopic.php?t=83718<br />
* https://www.forum64.de/index.php?thread/143010-vice-3-8-has-been-released/<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8.1&diff=62233.8.12023-12-31T08:31:06Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.8 release, but are now going to be in the 3.8.1 release:<br />
<br />
Rationale: After 3.8 we want to fix the remaining joystick/controller/mapping related things, and also merge the SDL multithread stuff. Plus fix the resulting fallout, and the remaining issues below.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
** TODO: check on al OSs.<br />
** TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
=== GTK UI ===<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>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.<br />
** this should be a generic option (for all UIs)</s><br />
:: (<b>added in trunk</b>: integer resource "AutostartDropMode" was added to configure autostart behaviour on dropping an image onto the emulator window. Three modes: 0: attach-only, 1: attach and load, 2: attach, load and run (Default). The Gtk3 UI implements the behaviour, the resource and command line switch are generic, for future use by other UIs.<br />
<br />
* <s>Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.</s> (<b>fixed in trunk</b>, <tt>rommanager.{c,h}</tt> were renamed to <tt>settings_rom.{c,h}</tt> and the old ROM (set/archive) UI files were deleted)<br />
<br />
* Fix hotkeys UI: The dialog exceeds the limits set on dialog size<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
* TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* TODO: Window resizing needs more work to properly handle the resizing when toggling the visibility of the status bar.<br />
<br />
=== Video capturing ===<br />
<br />
FFMPEG (library) support is deprecated and disabled by default. We are developing two alternatives:<br />
<br />
==== ffmpeg.exe ====<br />
Instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (via web sockets).<br />
* a runtime check and UI that warns when the exectable is missing needs to be made<br />
* needs to be tested and fixed on Windows, macOS<br />
* FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
<br />
==== ZMBV ====<br />
Internal support for the [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec<br />
* TODO: might even be possible to pipe ZMBV to external programs (such as OBS, or ffmpeg?) directly. <br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing, this needs to be handled in the general log system somehow<br />
** right now color codes end up in the regular log file too, because color codes are fed into the log_ calls. Instead the log_ calls should *produce* the color codes, and omit them when writing to a file.<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors. Generally coloring terminal output correctly is more complex that it seems on first look :)<br />
** +wic64colorizetrace is undocumented. this should be a global option too, not wic64 specific<br />
** "WIC64LogLevel" resource is not documented<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* Fix VIC20 cartridge system<br />
** cartridge_get_info_list is not implemented<br />
** CRT saver are missing<br />
*** writeback with crt file is not implemented<br />
** GUI elements for "save/flush cartridge" are missing<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** MMC Replay is broken in C128 mode<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
=== Buildsystem ===<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?)<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
* we'll have to decide: do we want to keep the --without-zlib option? if yes, then we need an option to disable the GUI monitor (because vte needs zlib) and force it on when zlib is not available<br />
<br />
==== Github Actions ====<br />
<br />
* make-release.yml shows:<br />
:: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/<br />
<br />
* make sure both build-main-on-push.yml and make-release.yml (and perhaps others in the future) can "include" a common file that contains eg all configure options to use<br />
<br />
* we need to somehow make sure that ideally 3 different configurations are tested (compiled and linked) at least once:<br />
** "everything" disabled. this makes sure we don't forget any stubs.<br />
** "everything" enabled. this makes sure all options actually work.<br />
*** the actual posted "releases" should probably use something close to the former<br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Code streamlining ===<br />
<br />
* In xvic the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
<br />
* write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==== Headers ====<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
TODO: '''for the time being, make a list of all those things here''', and keep it here, since obviously those are open ends and need to be fixed!<br />
<br />
Some things must be enabled in the code:<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Drives:<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
<br />
For development of certain devices, you can use --enable-experimental-devices, which defines HAVE_EXPERIMENTAL_DEVICES, to enable WIP code:<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
==== Codestyle cleanup ====<br />
<br />
Please make sure no files that do not respect the common code style sneak in again. <b>Remember we removed the rule that "archdep files can ignore codestyle rules" long ago!</b><br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
<br />
There are still various bits of archdep things dangling around in common code<br />
<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
==== Resources without UI support ====<br />
<br />
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)'''.<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
====Build instructions====<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
====other====<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.8 Feedback threads ==<br />
<br />
* https://csdb.dk/release/index.php?id=238034<br />
* https://www.lemon64.com/forum/viewtopic.php?t=83718<br />
* https://www.forum64.de/index.php?thread/143010-vice-3-8-has-been-released/<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8.1&diff=62223.8.12023-12-28T11:17:17Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.8 release, but are now going to be in the 3.8.1 release:<br />
<br />
Rationale: After 3.8 we want to fix the remaining joystick/controller/mapping related things, and also merge the SDL multithread stuff. Plus fix the resulting fallout, and the remaining issues below.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
** TODO: check on al OSs.<br />
** TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
=== GTK UI ===<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* <s>Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.</s> (<b>fixed in trunk</b>, <tt>rommanager.{c,h}</tt> were renamed to <tt>settings_rom.{c,h}</tt> and the old ROM (set/archive) UI files were deleted)<br />
<br />
* Fix hotkeys UI: The dialog exceeds the limits set on dialog size<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
* TODO: check/fix mouse and lightpen emulation when screen is rotated/mirrored<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* TODO: Window resizing needs more work to properly handle the resizing when toggling the visibility of the status bar.<br />
<br />
=== Video capturing ===<br />
<br />
FFMPEG (library) support is deprecated and disabled by default. We are developing two alternatives:<br />
<br />
==== ffmpeg.exe ====<br />
Instead of using FFMPEG via API and linking to the libraries, we use the ffmpeg executable and pipe the data to it (via web sockets).<br />
* a runtime check and UI that warns when the exectable is missing needs to be made<br />
* needs to be tested and fixed on Windows, macOS<br />
* FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
<br />
==== ZMBV ====<br />
Internal support for the [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec<br />
* TODO: might even be possible to pipe ZMBV to external programs (such as OBS, or ffmpeg?) directly. <br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing, this needs to be handled in the general log system somehow<br />
** right now color codes end up in the regular log file too, because color codes are fed into the log_ calls. Instead the log_ calls should *produce* the color codes, and omit them when writing to a file.<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors. Generally coloring terminal output correctly is more complex that it seems on first look :)<br />
** +wic64colorizetrace is undocumented. this should be a global option too, not wic64 specific<br />
** "WIC64LogLevel" resource is not documented<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* Fix VIC20 cartridge system<br />
** cartridge_get_info_list is not implemented<br />
** CRT saver are missing<br />
*** writeback with crt file is not implemented<br />
** GUI elements for "save/flush cartridge" are missing<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** MMC Replay is broken in C128 mode<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
=== Buildsystem ===<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?)<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
* we'll have to decide: do we want to keep the --without-zlib option? if yes, then we need an option to disable the GUI monitor (because vte needs zlib) and force it on when zlib is not available<br />
<br />
==== Github Actions ====<br />
<br />
* make-release.yml shows:<br />
:: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/<br />
<br />
* make sure both build-main-on-push.yml and make-release.yml (and perhaps others in the future) can "include" a common file that contains eg all configure options to use<br />
<br />
* we need to somehow make sure that ideally 3 different configurations are tested (compiled and linked) at least once:<br />
** "everything" disabled. this makes sure we don't forget any stubs.<br />
** "everything" enabled. this makes sure all options actually work.<br />
*** the actual posted "releases" should probably use something close to the former<br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Code streamlining ===<br />
<br />
* In xvic the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
<br />
* write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==== Headers ====<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
TODO: '''for the time being, make a list of all those things here''', and keep it here, since obviously those are open ends and need to be fixed!<br />
<br />
Some things must be enabled in the code:<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Drives:<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
<br />
For development of certain devices, you can use --enable-experimental-devices, which defines HAVE_EXPERIMENTAL_DEVICES, to enable WIP code:<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
==== Codestyle cleanup ====<br />
<br />
Please make sure no files that do not respect the common code style sneak in again. <b>Remember we removed the rule that "archdep files can ignore codestyle rules" long ago!</b><br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
<br />
There are still various bits of archdep things dangling around in common code<br />
<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
==== Resources without UI support ====<br />
<br />
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)'''.<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
====Build instructions====<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
====other====<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.8 Feedback threads ==<br />
<br />
* https://csdb.dk/release/index.php?id=238034<br />
* https://www.lemon64.com/forum/viewtopic.php?t=83718<br />
* https://www.forum64.de/index.php?thread/143010-vice-3-8-has-been-released/<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61793.82023-12-15T15:05:52Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.</s> (<b>added in trunk</b>, I'll assume it works on MacOS, no arch-specific code involved from our side)<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
::: A new ROM settings interface is in trunk, hidden behind <tt>--enable-debug-gtk3ui</tt>: with that configure switch a new settings node "Machine" -> "ROM Manager (WIP!)" will expose the new interface. The new interface actually implements saving and loading ROM set (.vrs) files, and allows users to revert a single ROM or all ROMs to default. The ROM set <i><b>archive</b></i> handling isn't implemented since that is a complicated mess and marked for deletion. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/gtk3/widgets/rommanager.c src/arch/gtk3/widgets/rommanager.c] for details.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing<br />
** right now color codes end up in the regular log file too<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* <s>we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
::: use the same config options etc in both, not just update build-main-on-push :) [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 21:20, 3 December 2023 (CET)</s><br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61783.82023-12-15T14:55:01Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.</s> (<b>added in trunk</b>, I'll assume it works on MacOS, no arch-specific code involved from our side)<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing<br />
** right now color codes end up in the regular log file too<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* <s>we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
::: use the same config options etc in both, not just update build-main-on-push :) [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 21:20, 3 December 2023 (CET)</s><br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61773.82023-12-15T14:52:11Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing<br />
** right now color codes end up in the regular log file too<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* <s>we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
::: use the same config options etc in both, not just update build-main-on-push :) [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 21:20, 3 December 2023 (CET)</s><br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Todo&diff=6176Todo2023-12-14T08:26:26Z<p>Compyx: /* Documentation */</p>
<hr />
<div><br />
This is the list of known problems. also look at [https://sourceforge.net/tracker/?limit=100&func=&group_id=223021&atid=1057617&assignee=&status=4&category=&artgroup=&keyword=&submitter=&artifact_id=&assignee=&status=1&category=&artgroup=&submitter=&keyword=&artifact_id=&submit=Filter&mass_category=&mass_priority=&mass_resolution=&mass_assignee=&mass_artgroup=&mass_status=&mass_cannedresponse= Tracker: open Bugs]<br />
<br />
This list always refers to the status of the last major release version, which was '''3.7'''. Items that have been fixed by the time of a major release will be removed, items fixed after that will be marked as fixed and stay until the next major version. New items will be added as noticed.<br />
<br />
==Prime Directive==<br />
<br />
* '''All developers shall subscribe to the [https://sourceforge.net/p/vice-emu/mailman/ vice-emu-mail mailinglist]''' and perhaps join #vice-dev on freenode too (highly recommended).<br />
* Please '''respect the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/coding-guidelines.txt coding guidelines]'''.<br />
* '''Document your code''' so other people than you are able to understand and fix it in a decade or two.<br />
* When adding/changing stuff that needs (G)UI items/changes, '''all developers should update the SDL and GTK3 UIs themselves''', and immediately following their respective changes.<br />
* When adding/changing command-line options and/or resources, adding a new feature or change the behavior of an existing feature, '''please update the documentation'''.<br />
* After fixing a bug or implementing a new feature, '''update''' its status on '''the [https://sourceforge.net/tracker/?limit=50&group_id=223021&atid=1057617&status=1&submit=Filter Bug Tracker] and''' mark it as fixed in '''the TODO list''' below.<br />
:: Only remove a bug/feature from this list when it was fixed/implemented in the latest stable release.<br />
* And most importantly...<br />
<pre><br />
<@_tlr> Please at least test the issue you were trying to fix before committing.<br />
</pre><br />
: That means: '''you break it, you fix it.''' Do not commit deal breaking changes without communicating it with the rest of the team. '''Generally regressions are not acceptable and respective commits are subject to be reverted.'''<br />
<br />
==Code cleanup and streamlining==<br />
<br />
* remove compiler- and platform- specific hacks (IFDEFS) in common code<br />
$ ./src/findhacks.sh ccarchdep<br />
$ ./src/findhacks.sh archdep<br />
<br />
* <s>replace readline and our fallback implementation with linenoise (https://github.com/antirez/linenoise), or perhaps linenoise-ng (https://github.com/arangodb/linenoise-ng) which appears to support Windows and UTF-8.</s><br />
** write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==Documentation==<br />
===Technical===<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
===Content===<br />
The documentation is partly outdated and/or incomplete, in particular:<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
===Build instructions===<br />
* Update MSYS2 instructions to only use the <tt>pacman</tt> package manager, not a mix of <tt>pacman</tt> and <tt>pacboy</tt>. Although <tt>pacboy</tt> enables a user to not have to type the arch/repo prefix for packages (e.g. "mingw-w64-x86_64-"), it is highly confusing to use two package managers with different syntaxes.<br />
:: See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/building/Windows-MinGW-GTK3-Howto.txt Windows-MinGW-GTK3-Howto.txt]<br />
<br />
==Testbench==<br />
<br />
* many test programs (mostly for vic20) are not yet integrated into the automatic testing<br />
* '''TODO''': fix the reference screenshots and/or the scripts so they dont rely on the "normal" rendering mode anymore<br />
* '''TODO''': make a test program to determine visible screen dimensions<br />
* '''TODO''': make a test program to determine the type of delay line used for a PAL screen (UV or U only)<br />
=== autostart problems ===<br />
<br />
* x128 does not autostart prg files correctly when also a cartridge is attached (that forces c64 mode)<br />
<br />
==Emulators==<br />
<br />
===Subsystems===<br />
<br />
====Keyboard====<br />
<br />
* When a key which is shifted on the real machine but unshifted on the PC or Unix keyboard you are using is pressed, the virtual shift is pressed together (i.e. at the same clock cycle) with the main key; this could not work with some keyboard routines.<br />
<br />
: '''Workaround''': If you have to use the function keys, press the (real) shift key manually (e.g. F2 = Shift + F1, F4 = Shift + F3 and so on); this also works with other keys. In any case, using a positional keymap will remove much of this problem.<br />
<br />
* Some ports/emulators/keyboard-types do not have all required keymaps (and a fallback will used) - look at [[Keymaps]] for details<br />
<br />
* Although "shift lock" can be mapped to a key, not all ports and/or emulators support it due to missing keymaps and/or implementation details.<br />
: '''TODO''': check ports and fix or at least add a comment in the keymaps<br />
<br />
* contact-bounce is not emulated <br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick====<br />
<br />
WIP [[Joymappings]]<br />
<br />
* contact-bounce is not emulated<br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick port devices====<br />
<br />
* Paperclip 64 dongle emulation is broken<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
<br />
====Userport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in userport.h)<br />
<br />
====Tapeport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
<br />
====Monitor====<br />
<br />
* TODO: Breakpoints/watchpoints should consider banks, and perhaps PLA/MMU config<br />
* banking should somehow work also with cartridges. for this some generic interface in the cartridge system needs to be created<br />
<br />
===== Profiler =====<br />
<br />
The new profiler feature is still incomplete ( https://sourceforge.net/p/vice-emu/patches/350/ )<br />
<br />
* support for banking (main CPU) is only implemented in x64(sc) right now<br />
** banking should somehow consider cartridge banks, once we have generic support for it in the monitor<br />
* perhaps additional stats for "stolen cycles" (cycles used by the VICII) can be added<br />
* branch taken / not taken statistics<br />
* support for drive CPUs is missing<br />
* support for other CPUs than 6502 is missing<br />
* binary remote monitor commands need to be implemented (perhaps once more of the above works, so we know how these must look like)<br />
<br />
===== Binary Interface =====<br />
<br />
The binary interface has a few design issues that should be fixed<br />
<br />
* Command 0x84 (get display) has several issues:<br />
** The first parameter should probably not be a boolean ("is this VICII?"), but "videochip number", with 0 being VICII and 1 being VDC on C128. Further Videochips could be added then (eg if we ever implement the BTX cartridge). Perhaps for compatibility reasons we start counting at 1, and make "0" a special parameter for "current one" '''I'm not sure what to do with this so I'm leaving it alone for the time being.'''<br />
<br />
Also, the Documentation has some issues:<br />
<br />
* At some places it uses &foo and *bar to refer to "length" and a block of data(?). This is really weird and should be removed / replaced by something that is more clear.<br />
<br />
Last not least the binmontest program needs cleanup, so it can serve as an example program:<br />
<br />
* Magic values are used for offsets at various places. It should use constants instead. Ideally, a common header file is used for both the test-program and the VICE code itself<br />
* More comments are needed in place of the various checks<br />
<br />
====History Recording====<br />
<br />
* history recording currently breaks on a lot of user actions, such as using autostart or attaching a cartridge.<br />
: '''Workaround''': make sure to start up with a bog standard c64, and then load/run the program in question manually<br />
* recording/playing back histories was broken in 2.2 ( https://sourceforge.net/tracker/?func=detail&aid=2925410&group_id=223021&atid=1057617 )<br />
note: since history recording is very error prone and hard to debug, we depend on feedback (on either failure or success) on this topic very much. if you still have problems with the current release, please report them including testcases.<br />
<br />
====Screenshots / Media Recording====<br />
* Screenshots with activated video filter (CRT emulation / Scale2x) do not deliver the expected (filtered) result.<br />
<br />
====Rendering====<br />
<br />
* some things are still shared by videochips although they shouldnt be, resulting in conflicts for eg the color generation (visible in x128 in ports that show two windows at a time, when crt emulation is enabled, eg adjusting brightness affects also the other window)<br />
* '''TODO''' add a 4:3 fixed aspect ratio scaling mode<br />
* '''TODO''' when a test program has been written, adjust the "normal" border mode accordingly (CAUTION: fix testsuite first)<br />
* '''TODO''' put all border mode parameters into arrays, make a global function to query the parameters and modes (for UIs) and then add "TV" mode (like "normal", but not centered)<br />
<br />
=====CRT Emulation=====<br />
<br />
* the rf-modulator output characteristics are not emulated, which means the so called "black bleeding" effect does not work (emusux0r, http://www.csdb.dk/release/?id=81780)<br />
* artefact color and luma/chroma crosstalk are not emulated (eg the "red/green stripes")<br />
<br />
see http://hitmen.c02.at/temp/palstuff/ for some further info on this topic.<br />
<br />
====Drive Emulation====<br />
<br />
* G64 image support is incomplete, the speedzone definitions are completely ignored<br />
: ''Note: this is no problem in practise, so far not a single title (game) could be located that would actually require this kind of support to work''. Incase you find a program that needs this kind of support, please let us know.<br />
* RPM and Wobble settings have currently no effect when P64 images are used<br />
<br />
=====virtual Devices=====<br />
<br />
* handling of CBM style sub partitions is incomplete, write operations on sub partitions may give unexpected results.<br />
* RELative files are only supported when using disk images ( https://sourceforge.net/p/vice-emu/bugs/703/ )<br />
* support for double sided disk images is very shaky, since no concept of disk sides exists and the tracks on the second side are referenced by an offset into the image, the handling of images with different number of tracks is needlessly hard and complicated (and thus broken).<br />
* the IEEE machines use the "virtual devices" for something slightly different than the IEC machines, for the IEEE machines its more like what "IEC Device" means for the IEC machines. This should be handled with a seperate resource similar to "IEC Device" in the other emulators.<br />
<br />
=====True Drive Emulation=====<br />
* serial timing latency is not implemented. due to their physical properties, it takes about half a cycle for a value to show up at the respective output pin after it has been written to the register. and respectivly, it takes about half a cycle from changing an input pin until the value in the respective register changes.<br />
* mechanical delays (such as head stepping and motor spinup) are not emulated yet.<br />
* accessing device #7 on the IEC bus works (only real devices), but it only works if True Drive Emulation is OFF, even though this has nothing to do with drives. This needs to be fixed in TDE somehow.<br />
: generally the way device #7 is implemented as a special case that is different to devices 4-6 is questionable and should be made the same<br />
======1571======<br />
* 2mhz mode of the 1571 is not handled correctly<br />
** drive CPUs always run at 1Mhz for all drives (hardcoded 1000000 at a few places)<br />
** 1571 has extra delay on on reading sync inside the drive, ("you cannot use BVC in 2mhz mode!")<br />
* 1571CR (MOS5710) emulation is incomplete<br />
** extra FDC2 registers are not implemented<br />
* double sided 1571 images do not work correctly<br />
** regular (70 tracks) vs extended (80 or 84 tracks) d71 images are not handled at all (vdrive problem)<br />
** creating (formatting) G71 does not work correctly, the second BAM block will be wrong (vdrive problem)<br />
** double sided P64 can be used, but can not be created from within VICE (see patch #122, r32586). since these are non existant "in the wild" and probably not needed for anything - not a big problem :) to handle this properly, a seperate image format should get created (at least internally)<br />
<br />
=====Extensions=====<br />
* when using dolphin dos 3 emulation, the state of the mc6821 is not saved to/restored from snapshots<br />
* when using supercard+ emulation, the optional additional index hole sensor (for the IHS nibbler) is not emulated<br />
=====Drive Noise=====<br />
* since the current implementation is a very simple sample player, things like "drive composer" will not work<br />
<br />
====Datasette Emulation====<br />
<br />
* unlike with a real datasette, the emulated counter will stop counting when no tape/image is present<br />
* when a t64 image is attached, the datasette status will incorrectly say "no image".<br />
: ''Note: since t64 is currently only accessable via kernal traps, the datasette emulation actually treats this case as if no image is present. The respective code must be updated so the datasette emulation actually "knows" about when t64 is in use.''<br />
* motor noise is not emulated<br />
<br />
====Tape port devices====<br />
<br />
* DTL Basic Dongle emulation is broken<br />
<br />
====Printer Emulation====<br />
<br />
* not really a bug: the printer output file is always created in the current working directory. ( https://sourceforge.net/tracker/?func=detail&aid=3305650&group_id=223021&atid=1057617 )<br />
: ''there perhaps should be a way to explicitly set a directory for printer output files'' [[User:Gpz|Gpz]] 01:24, 4 July 2011 (UTC)<br />
* printer noise is not emulated<br />
<br />
====RS232====<br />
<br />
* the RING signal is not emulated (there is exactly one code path where it appears to be handled - a) windows b) userport c) physical rs232 port)<br />
** an "invert" option for this is needed too<br />
<br />
----<br />
<br />
===Cores===<br />
<br />
{| class="wikitable"<br />
! Core !! used in !!<br />
|-<br />
| VIA || VIC20, PET, various drives ||<br />
|-<br />
| CIA || C64, C128, 1570/71 ||<br />
|-<br />
| SID || C64, C128, CBM2, (VIC20, PLUS4, PET: SID cart) ||<br />
|-<br />
| TED || Plus4 || snapshots are broken<br />
|-<br />
| VDC || C128 || snapshots are broken<br />
|-<br />
| VIC || VIC-20 ||<br />
|-<br />
| VIC-II || C64, CBM2 ||<br />
|-<br />
| VIC-IIe || C128 ||<br />
|-<br />
| t6721a || Magic Voice, Plus4 (V364) || snapshot support is missing<br />
|-<br />
| mc6821 || Formel64, Magic Formel, Dolphin-DOS 3 ||<br />
|-<br />
| CS8900a || RR-Net/TFE || snapshot support is missing<br />
|-<br />
| RIOT || 2040/3040/4040/1001/8050/8250 ||<br />
|-<br />
| PC8477/DP8473 || FD4000/FD2000 ||<br />
|-<br />
| WD1770 || 1570/1571/1581 ||<br />
|-<br />
| ACIA (6551)|| Swiftlink ||<br />
|-<br />
| spi-sdcard || MMC64, MMC Replay || snapshot support is missing<br />
|-<br />
| ser-eeprom || MMC Replay || snapshot support is missing<br />
|-<br />
| midi || C64, VIC-20 || snapshot support is missing<br />
|}<br />
<br />
====VIA====<br />
<br />
* MYVIA_NEED_LATCHING option is possibly broken, but in any case untested<br />
* the code doesn't actually notify anything outside the chip when PB7 toggles<br />
** Same so far for the output from the shift register and its handshaking<br />
<br />
====CIA====<br />
<br />
* the case when CIA1 port A and port B are both in output mode, port A outputs low, port B outputs high, both are connected via the keyboard matrix and a value is read from port B is not handled correctly ( testprogs/CIA/ciaports ; http://noname.c64.org/csdb/release/?id=5375 ) (has been improved but is not perfect)<br />
* the various analog side effects that must be considered when pressing two or more keys are not emulated correctly, so this will currently not produce the correct results in some corner cases.<br />
* Shift Register IRQ triggers one cycle too early (see [http://sourceforge.net/p/vice-emu/bugs/599/ this] bug)<br />
<br />
====SID====<br />
<br />
* POTX/POTY sampling jitter is not emulated<br />
* only one mouse or pair of paddles can be emulated at a time<br />
<br />
====TED====<br />
<br />
* FLI does not work ( https://sourceforge.net/tracker/?func=detail&aid=3205787&group_id=223021&atid=1057617 )<br />
<br />
====VDC====<br />
<br />
* Some basic features of the VDC are missing:<br />
** Registers 34/35 (horizontal blanking position) not implemented<br />
** $d600 bit 7 STATUS flag is only approximately implemented. Fixing requires emulating the internal timing of the VDC.. (partially implemented in r35456, also see testprogs/VDC/vdctiming)<br />
** Differences between 8563 and 8568 are not all emulated, eg. register 38<br />
* Clock calculation for lightpen is incorrect (?)<br />
* Can't resize the screen enough to fit all video modes, e.g. vdcmodemania high resolution modes. Aspect ratio needs to change on the fly too.<br />
* Screen position is not always correct, e.g. vdcmodemania FLI parts<br />
<br />
====VIC====<br />
<br />
* Idle fetch (or the lack of it) needs investigation<br />
* "Screen mixup" is not emulated<br />
* COLS=0 can lead to negative width in raster/ causing segfaults if not checked for in archdep video code<br />
* NTSC bugs:<br />
** raster line register values are incorrect near the end of frame (see testprogs/VIC20/split-tests/lightpen)<br />
** lightpen values are off (see testprogs/VIC20/split-tests/lightpen, http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=4870 )<br />
** some glitches when XPOS is 0, breaks (at least) Vicual MMIX credits part (http://www.cs.tut.fi/~albert/Pu-239/vicual-mmix/)<br />
<br />
====VIC-II====<br />
<br />
* the handling of MCBASE at power-on is incorrect (see testprogs/VICII/spritemcbase)<br />
*: note: this should only be visible directly after power-cycle on a 6569<br />
* DMA delay artifacts are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325466&group_id=223021&atid=1057617 )<br />
* Sprite fetch bugs in sideborder are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325426&group_id=223021&atid=1057617 )<br />
* DMA delay does not affect idle byte correctly [https://sourceforge.net/p/vice-emu/bugs/1855/ bug#1855]<br />
* 6569R1 sprite oddity at X-position $163 is not emulated correctly [https://sourceforge.net/p/vice-emu/bugs/1857/ bug #1857]<br />
<br />
====VIC-IIe====<br />
<br />
* The test bit is not emulated, which results in things like 'real interlace' ([http://sites.google.com/site/h2obsession/CBM/C128/Interlace]) and the $D030 new VIC-IIe color palette hack ([http://www.commodore128.org/index.php?topic=3665.0]) not working.<br />
<br />
====t6721a====<br />
<br />
* 48bit frames support is incorrect/broken<br />
* synthesizer condition 2 loss-effect-, shape- and repeat- bits have no effect<br />
* reading from the speach rom is not emulated (which is not really an issue since neither magic voice nor v364 have one)<br />
<br />
====mc6821====<br />
<br />
* interrupts are not implemented<br />
* implementation of C2 output modes is incomplete<br />
<br />
====RIOT====<br />
<br />
* I/O "peek" function is broken<br />
<br />
----<br />
<br />
===Machines===<br />
<br />
====x64sc====<br />
<br />
Note: [[x64_Bugs|x64]] is deprecated.<br />
<br />
=====general=====<br />
<br />
* some C64 models are not emulated 100% correctly (for details see [[C64models]])<br />
** the memory layout for "Max Machine" is not yet correct<br />
** when SX-64 is selected, the tick for the CIA TOD clocks should always be 60Hz (regardless of PAL/NTSC)<br />
** The Japanese C64 has "C= lock" instead of "Shift Lock" (the keyboard is physically different)<br />
<br />
=====Cartridge System=====<br />
<br />
''note: the detailed todo list/status is [[cartsystem|here]].''<br />
<br />
* some carts have no snapshot support yet (still broken: Magic Voice, MMC Replay, RR-Net MK3, Ethernet.)<br />
** IDE64 & ATA system can only handle "readonly" snapshots now. Somehow the image file must be matched to the snapshot to prevent corruption.<br />
** MMC64 snapshots do not include the SD-card<br />
* some carts do not work 100% yet (still broken: Magic Voice, MMC Replay.)<br />
** Magic Voice: emulation of the speech chip is incomplete (see [[Todo#t6721a]]), this breaks some words included in the magic voice rom and the "a-bee-c" cartridge. Memory mapping is incomplete/broken (which however affects no known software/testcase).<br />
** MMC Replay: only the BIOS mode works right now; the monitor may incorrectly access cartridge memory (even) if "bank cart" is explicitly set<br />
* the (very strange, and incompatible with most cartridges) passthrough port of the SFX sound expander is not emulated<br />
* various cartridges have no support for verbose i/o dump in the monitor<br />
* Passthrough port functionality depends on ordering of cartridge attaches, especially visible from the command line. (e.g. MMC64+RR ok, RR+MMC64 not)<br />
* '''TODO:''' IDE64 is missing a "make HD image read only" resource<br />
* '''TODO:''' IDE64 saves its config data into vicerc - it should use a bin image like every other cartridge<br />
<br />
----<br />
====x128====<br />
<br />
* Support for fast mode (2MHz) is implemented but incomplete, detailed information about the stealing of cycles by the VICII when switching back from fast mode is missing and therefor the emulation of it is incorrect.<br />
* support for c128 specific expansion port handling/mapping is missing in the c64/c128 cartridge system (MMC Replay, FastLoad128, MACH128, other?)<br />
* the relative speed and details like cycle-stealing of the z80 is inaccurate ( https://sourceforge.net/tracker/?func=detail&aid=3476760&group_id=223021&atid=1057617 )<br />
: xmx provided a test program, see testprogs/c128/z80/cycletimer<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6510 "sc" core<br />
<br />
----<br />
====xvic====<br />
<br />
* programs that do not work for unknown reason:<br />
** "Grave Cave" ( https://sourceforge.net/tracker/?func=detail&aid=3297561&group_id=223021&atid=1057617 )<br />
* the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
* xvic does not use iecbus/iecbus.c, which is why "IEC Device" stuff does not work with it<br />
<br />
===== Cartridge System =====<br />
<br />
* cartridge_get_info_list is not implemented<br />
* CRT/BIN saver are missing<br />
** writeback with crt file is not implemented<br />
** GUI elements for "save cartridge" are missing<br />
<br />
----<br />
====x64dtv====<br />
<big>The DTV emulator is very inaccurate and is in need of a partial rewrite. Maintainer wanted!</big><br />
<br />
* Misery 3: (http://noname.c64.org/csdb/release/?id=83196)<br />
** fails emudetect<br />
** plasma part is missing badlines<br />
* switching VICII border mode resets x64dtv ( https://sourceforge.net/tracker/?func=detail&aid=3004255&group_id=223021&atid=1057620 )<br />
* CPU history (chist) implementation is incomplete<br />
* the "PS/2 Mouse at Userport" should get refactored to be a regular Userport device in the common Userport system<br />
* "enable Userport Joystick" vs "Hummer Userport Joystick" is strange and confusing, especially since in the DTV emulator we dont even have a "UserportJoyType" selection. the regular "DTV Joystick on Userport" should become a regular Userport device.<br />
<br />
----<br />
====xplus4====<br />
<big>The plus4 emulator is generally work in progress and not yet "ready". Maintainer wanted!</big><br />
* support for Snapshots is incomplete/broken (TED, PIA, V364 Speech, ...) ( https://sourceforge.net/tracker/?func=detail&aid=2878220&group_id=223021&atid=1057617 )<br />
* emulation of the V364 speech chip is incomplete (see [[Todo#t6721a]])<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
=====Cartridge System=====<br />
* handling of the c0/c1/c2 roms is weak<br />
** cartridges share the same roms as internal roms<br />
** roms are not removed from the memory map if not present (just cleared)<br />
* "mmu" memory translation table handling is not implemented for cartridges<br />
* snapshot implementations are completely untested<br />
* .crt support is missing<br />
<br />
----<br />
====xcbm2====<br />
<br />
* The CBM-II emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture<br />
* when running the burn-in diagnostic tests, the CIA is reported as bad ( https://sourceforge.net/tracker/?func=detail&aid=3102493&group_id=223021&atid=1057617 )<br />
: ''note: run like this: xcbm2 -model 610 -ntsc -drive8type 8050 -virtualdev +truedrive -8 cbm2-burnin.d80''<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xcbm5x0====<br />
* The emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture.<br />
* In the C510 emulation the VIC-II timing is not exact, i.e. the stopping of the CPU during bad lines is wrong.<br />
* The C510 emulation uses the old VIC-II core which means no cycle exact sprite collisions, no inline gfx changes, and probably more. See [[x64_Bugs|here]] for details.<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xpet====<br />
* When running the "8296d diagnostic" test of the 8296 system disk on "xpet -model 8296" some tests fail:<br />
** when TDE is enabled, the program will hang. when TDE is disabled, the IEEE interface status will be reported as bad<br />
** the userport is reported as bad (perhaps some dongle is needed?)<br />
: ''note: run like this: "xpet -model 8296 -drive8type 8050 -8 8296d-systemdisk.d82 -editor edit-4-80-b-50Hz.901474-04.bin". the "burnin8296" program seems to be an older version of the "8296d diagnostic" program. it runs when TDE is enabled, but the 50Hz irq test fails.''<br />
* some combinations of selected keymap and keyboard model do not work because of missing keymaps<br />
** also the keymaps must match the "editor" ROM - currently only the UK (Business) ROM in included in VICE<br />
** the keymaps for US (host) keymap need to be checked and fixed<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
<br />
----<br />
===SC Rewrites===<br />
<br />
As a long term goal, everything should be rewritten to use the new "sc" cpu cores (and the non sc cores removed):<br />
<br />
* Migrate emulators to the cycle based CPU core (6510dtvcore.c, should be renamed), which allows:<br />
** cycle based hooks for complex hardware expansions (SCPU)<br />
** in-line graphics data change emulation (see testprogs/VICII/gfxfetch)<br />
** cycle exact Blitter/DMA vblank start and proper LinearA/B counter handling on x64dtv<br />
** cycle based drawing<br />
* ...and requires (at least):<br />
** rewrite video chip modules to use:<br />
*** cycle based fetch/etc (VIC & VICII done, VICII-DTV in progress)<br />
*** cycle based drawing (VICII done)<br />
** remove 1 clock write offsets (at least CIA/VIA already handled)<br />
** an insane amount of regression testing (preferably with new testprogs where needed)<br />
<br />
----<br />
<br />
== Tools ==<br />
=== c1541 ===<br />
<br />
* handling of .d81 CBM sub partitions and CMD DIR subdirectories is broken due to the way disk images are handled.<br />
** accessing files does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367519&group_id=223021&atid=1057617 )<br />
** listing directories does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367517&group_id=223021&atid=1057617 )<br />
: ''unfortunately to fix this a lot of c1541 will have to be rewritten (mount image only once, not for each operation)'' [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 23:57, 13 December 2012 (UTC)<br />
* since virtual drive emulation does not support REL files on the host filesystem, c1541 can not extract them to R00 files ( https://sourceforge.net/p/vice-emu/bugs/702/ )<br />
<br />
* <s>Remove optional dependency on libreadline once linenoise-ng has been tested properly.</s><br />
:: See if linenoise-ng can be made to work with the MSYS2 shell, which would help with debugging c1541.<br />
<br />
----<br />
==Ports==<br />
<br />
Some of the mess isn't ours! See here for [[Upstream bugs]].<br />
<br />
===archdep===<br />
<br />
* '''TODO:''' allow browsing of archives (zip etc) ( https://sourceforge.net/tracker/index.php?func=detail&aid=2942868&group_id=223021&atid=1057620 )<br />
<br />
====Windows====<br />
<br />
* '''TODO:''' the native (console based) monitor does not work in windows<br />
<br />
----<br />
<br />
===GTK3 UI===<br />
<br />
This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: <code>grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`</code>, and be amazed.<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''TODO:''' Add support for non-ASCII characters in the various file/path dialogs (snapshot, maybe even the various cartridge image/eeprom paths and the machine/drive ROM paths) (fixed?)<br />
<br />
The list of covered resources is [[Gtk3_Resource_Coverage|here]]<br />
<br />
==== Main window(s) ====<br />
<br />
* '''TODO:''' make sure both hard- and software rendering match whats described in [[Scaling_cleanup]] - if so, the page can be cleaned out<br />
:: Implemented, but only for a single display, no multi-display support yet. GDK seem to support multi-display setup querying, but we'd actually have to write code and test this to see how GDK handles this, if at all. (fixed?)<br />
** do not forget the VDC and the Monitor windows (fixed?)<br />
:: VDC is handled, the monitor windows isn't, there aren't any resource for the monitor window, nor any event handlers. Another wish seems to be to put the VICII and VDC window next to each other for x128, which will probably mean introducing yet another resource to control this and override the Window1* resources. Probably some enum: USE_WINDOW1* = -1, ABOVE, BELOW, LEFT, RIGHT. And hope the Window Manager actually listens to our requests to move said window.<br />
<br />
* '''BUG:''' mouse grab (when mouse emulation is enabled) is not perfect. eg when the emulator is started with mouse enabled, the pointer is not initially moved into the emulator window.<br />
<br />
==== Statusbar ====<br />
<br />
* '''BUG:''' On MacOS and Windows, the slider popup widget is hidden behind the rendered canvas, on Linux this works as it should. So currently the volume widget is disabled on MacOS and Windows<br />
<br />
==== Dialogs ====<br />
* '''TODO''': Polish the keyset dialog: <s>at there very least split the UI into a 3x3 grid for the directions and a 4x2 grid for the fire buttons</s>. Maybe use icons for the direction if they're in the default Gtk icon set.<br />
:: Only arrow icons for North, West, South and East are available. Gtk3 used to have a [https://docs.gtk.org/gtk3/class.Arrow.html GtkArrow] class, but that has been deprecated since 3.14 and removed from 4.x. So we'll have to write our own (which should also prove useful for joystick mapping widgets).<br />
<br />
==== Settings ====<br />
<br />
* '''TODO:''' HardSID settings are missing<br />
<br />
=====ROMsets=====<br />
<br />
* a generic function should be created which scans the data directory of the emulator and returns a list of all .vrs files for the UI<br />
** then the UI can use said list in a dropdown list for quick selection<br />
<br />
* '''TODO:''' ROM-set manager/settings need to be reworked and fixed. ROMset "archives" should be removed completely. see [[#ROMsets]]<br />
<br />
===== CBM2 model (xcbm2/xcbm5x0) =====<br />
<br />
* '''TODO:''' Check model settings glue logic.<br />
:: Mostly works, the 50/60Hz switch is a problem. I'll need someone with some actual CBM-II knowledge to help me out here. [[User:Compyx|Compyx]] 2020-01-08<br />
<br />
===== Joysticks =====<br />
<br />
see [[Joymappings]]<br />
<br />
==== vsid ====<br />
<br />
* '''BUG:''' Fix drag-n-drop behaviour, dragging multiple SID files onto the playlist widget works, but on Linux at least, dropping a SID file on the STIL view widget doesn't work (specifically the GtkTextView), this works on Windows oddly enough.<br />
<br />
* <s>'''TODO:''' Implement "goto-next-SID" when having SLDB support enabled.</s> ('''added in trunk''')<br />
<br />
* '''BUG:''' STIL view: some tunes (for example Last Ninja 2) print empty "tune #x" entries, so you'll get "Tune #1" in blue and a few empty lines, in the case of LN2 this goes on until tune #6. Most likely a bug in the use of hvsclib, not the lib itself.<br />
<br />
* '''TODO:'''Playlist: allow keyboard navigation. Perhaps also multi-select via Ctrl or Shift to delete multiple entries?<br />
<br />
* <s>Implement a playlist for VSID (partly done)</s> ('''added in trunk''': VSID playlists use the <tt>m3u</tt> format and can be created, edited, loaded and saved.)<br />
<br />
* Add some sort of tree-based file browser (preferably using the HVSC as the default dir) to allow quick tune selection and help with building a playlist (ie via drag-n-drop)<br />
<br />
* Add HVSC BUGlist support to VSID<br />
:: Support for this is available in src/hvsc, but there are very few actual entries in the BUGList.txt file. Maybe skip this one?<br />
<br />
* Update mixer sliders to use proper units etc like the mixer sliders in the other emus<br />
<br />
==== Monitor ====<br />
<br />
The GUI based monitor currently uses a mercylessly hacked VTE library. When we looked for a way to put the monitor into a console window that works with GTK3, this seemed to be the only way to do it. The ugly hacks were required to make VTE compile and work on windows. This is also why we cant use a more modern version of the VTE library.<br />
<br />
* '''TODO:''' On the long run, we will have to write a custom renderer for a monitor window, which supports all the things we need to implement a classic "fullscreen editor" like ml monitor.<br />
* '''TODO:''' Again as a long term goal, we might want to support transparent support for native charsets<br />
<br />
for some info on the monitor ui see: [[MonitorUI]].<br />
<br />
==== macOS ====<br />
<br />
* '''TODO:''' joystick_ui_get_next_device_name should return the detected joysticks instead of the predefined list (fixed?)<br />
<br />
* '''TODO:''' Make the GTK UI create/use the macOS style "top menubar"<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
<br />
==== OpenGL ====<br />
* '''TODO:''' The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (fixed?)<br />
** Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing.<br />
* '''TODO:''' Do-not-scale option. Important for Cairo renderer, possible for OpenGL.<br />
<br />
==== Stretch goals ====<br />
<br />
* Make 'smart cartridge attach' dialog smarter when attaching .bin images, show only valid cartridge types when selecting a cart image.<br />
** '''TODO''': this needs a new API call that returns the valid sizes for a given type<br />
* make an option to force display size to 1x/2x/3x/4x<br />
* make a GUI based editor for keymaps<br />
* add statusbar indicators for cartridge LEDs.<br />
<br />
----<br />
<br />
===SDL UI===<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''BUG:''' FFmpeg media recording behaves unexpected when entering the menu [https://sourceforge.net/p/vice-emu/bugs/898/]<br />
* '''TODO''': get rid of fullscreenarch.h and fullscreen.c - its no more required because SDL can do all of the features fine.<br />
<br />
====Menus====<br />
* '''TODO:''' some menu items need status text to show that the action has been done.<br />
** Drive>Fliplist settings>Add current image to fliplist<br />
** Drive>Fliplist settings>Remove current image from fliplist<br />
** Drive>Fliplist settings>Attach next image in fliplist<br />
** Drive>Fliplist settings>Attach previous image in fliplist<br />
* '''BUG:''' at a lot of places "inactive" (as in "cant be selected") menu items are missing the "N/A" on the right<br />
* '''TODO:''' A better way of showing filenames (maybe using contraction) needs to be made<br />
<br />
====Datasette====<br />
<br />
*'''TODO:''' add menu items for "Reset datasette counter" (UI action handlers have been added in the "compyx/sdl-uiactions" branch)<br />
<br />
====Joysticks====<br />
<br />
see [[Joymappings]]<br />
<br />
====Monitor====<br />
* '''TODO:''' implement a scrollback buffer<br />
<br />
====File Selector====<br />
* '''TODO:''' add filtering in file requester<br />
<br />
====Virtual Keyboard====<br />
* '''TODO:''' shift/cbm/ctrl should be "sticky" (right now shifted keys are entered using backspace/cancel - which is odd)<br />
* '''TODO:''' the virtual keyboard handling of the SDL port must be updated/fixed to support all PET keyboards<br />
<br />
==== VSID ====<br />
* '''TODO:''' Implement a playlist for VSID<br />
* '''TODO:''' Add HVSC song length database (SLDB) support to VSID (<s>both .txt and</s> .md5 file format)<br />
* '''TODO:''' Add HVSC sid tune information list (STIL) support to VSID<br />
* '''TODO:''' Add HVSC BUGlist support to VSID<br />
<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61753.82023-12-14T07:53:21Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* Implement "MachinePowerFrequency" (and -power50/-power60) for all emulators (code is already prepared for this in ifdefs), update the model-setting code accordingly, add GUI items to set power grid frequency in the model dialogs.<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* WiC64 logging stuff needs to be cleaned up, and all the WiC64 specific stuff removed and made generic<br />
** in the WiC64 code there shouldnt be any code related to logging, except the log_error, log_warning, log_message etc calls<br />
** colorizing shouldn't be a WiC64 specific thing<br />
** right now color codes end up in the regular log file too<br />
** when coloring terminal output, _always_ set both foreground _and_ background colors<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
** don't forget to update crt.c, crtpreviewwidget.c, uicart.c<br />
** we might have to create 2 crt types for 5x0 and 6x0 machines<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* <s>we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
::: use the same config options etc in both, not just update build-main-on-push :) [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 21:20, 3 December 2023 (CET)</s><br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61713.82023-12-04T18:59:47Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
* configure switch <tt>--enable-parsid</tt> should be removed and building of ParSID should be enabled when <tt>--with-libieee1284</tt> is used.<br />
:: Update the help message for <tt>--with-libieee1284</tt> to mention ParSID building.<br />
* configure switch <tt>--with-libieee1284</tt> should cause an error when used on MacOS.<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
::: use the same config options etc in both, not just update build-main-on-push :) [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 21:20, 3 December 2023 (CET)<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Todo&diff=6168Todo2023-11-28T13:31:27Z<p>Compyx: /* vsid */</p>
<hr />
<div><br />
This is the list of known problems. also look at [https://sourceforge.net/tracker/?limit=100&func=&group_id=223021&atid=1057617&assignee=&status=4&category=&artgroup=&keyword=&submitter=&artifact_id=&assignee=&status=1&category=&artgroup=&submitter=&keyword=&artifact_id=&submit=Filter&mass_category=&mass_priority=&mass_resolution=&mass_assignee=&mass_artgroup=&mass_status=&mass_cannedresponse= Tracker: open Bugs]<br />
<br />
This list always refers to the status of the last major release version, which was '''3.7'''. Items that have been fixed by the time of a major release will be removed, items fixed after that will be marked as fixed and stay until the next major version. New items will be added as noticed.<br />
<br />
==Prime Directive==<br />
<br />
* '''All developers shall subscribe to the [https://sourceforge.net/p/vice-emu/mailman/ vice-emu-mail mailinglist]''' and perhaps join #vice-dev on freenode too (highly recommended).<br />
* Please '''respect the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/coding-guidelines.txt coding guidelines]'''.<br />
* '''Document your code''' so other people than you are able to understand and fix it in a decade or two.<br />
* When adding/changing stuff that needs (G)UI items/changes, '''all developers should update the SDL and GTK3 UIs themselves''', and immediately following their respective changes.<br />
* When adding/changing command-line options and/or resources, adding a new feature or change the behavior of an existing feature, '''please update the documentation'''.<br />
* After fixing a bug or implementing a new feature, '''update''' its status on '''the [https://sourceforge.net/tracker/?limit=50&group_id=223021&atid=1057617&status=1&submit=Filter Bug Tracker] and''' mark it as fixed in '''the TODO list''' below.<br />
:: Only remove a bug/feature from this list when it was fixed/implemented in the latest stable release.<br />
* And most importantly...<br />
<pre><br />
<@_tlr> Please at least test the issue you were trying to fix before committing.<br />
</pre><br />
: That means: '''you break it, you fix it.''' Do not commit deal breaking changes without communicating it with the rest of the team. '''Generally regressions are not acceptable and respective commits are subject to be reverted.'''<br />
<br />
==Code cleanup and streamlining==<br />
<br />
* remove compiler- and platform- specific hacks (IFDEFS) in common code<br />
$ ./src/findhacks.sh ccarchdep<br />
$ ./src/findhacks.sh archdep<br />
<br />
* <s>replace readline and our fallback implementation with linenoise (https://github.com/antirez/linenoise), or perhaps linenoise-ng (https://github.com/arangodb/linenoise-ng) which appears to support Windows and UTF-8.</s><br />
** write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==Documentation==<br />
===Technical===<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
===Content===<br />
The documentation is partly outdated and/or incomplete, in particular:<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
==Testbench==<br />
<br />
* many test programs (mostly for vic20) are not yet integrated into the automatic testing<br />
* '''TODO''': fix the reference screenshots and/or the scripts so they dont rely on the "normal" rendering mode anymore<br />
* '''TODO''': make a test program to determine visible screen dimensions<br />
* '''TODO''': make a test program to determine the type of delay line used for a PAL screen (UV or U only)<br />
=== autostart problems ===<br />
<br />
* x128 does not autostart prg files correctly when also a cartridge is attached (that forces c64 mode)<br />
<br />
==Emulators==<br />
<br />
===Subsystems===<br />
<br />
====Keyboard====<br />
<br />
* When a key which is shifted on the real machine but unshifted on the PC or Unix keyboard you are using is pressed, the virtual shift is pressed together (i.e. at the same clock cycle) with the main key; this could not work with some keyboard routines.<br />
<br />
: '''Workaround''': If you have to use the function keys, press the (real) shift key manually (e.g. F2 = Shift + F1, F4 = Shift + F3 and so on); this also works with other keys. In any case, using a positional keymap will remove much of this problem.<br />
<br />
* Some ports/emulators/keyboard-types do not have all required keymaps (and a fallback will used) - look at [[Keymaps]] for details<br />
<br />
* Although "shift lock" can be mapped to a key, not all ports and/or emulators support it due to missing keymaps and/or implementation details.<br />
: '''TODO''': check ports and fix or at least add a comment in the keymaps<br />
<br />
* contact-bounce is not emulated <br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick====<br />
<br />
WIP [[Joymappings]]<br />
<br />
* contact-bounce is not emulated<br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick port devices====<br />
<br />
* Paperclip 64 dongle emulation is broken<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
<br />
====Userport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in userport.h)<br />
<br />
====Tapeport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
<br />
====Monitor====<br />
<br />
* TODO: Breakpoints/watchpoints should consider banks, and perhaps PLA/MMU config<br />
* banking should somehow work also with cartridges. for this some generic interface in the cartridge system needs to be created<br />
<br />
===== Profiler =====<br />
<br />
The new profiler feature is still incomplete ( https://sourceforge.net/p/vice-emu/patches/350/ )<br />
<br />
* support for banking (main CPU) is only implemented in x64(sc) right now<br />
** banking should somehow consider cartridge banks, once we have generic support for it in the monitor<br />
* perhaps additional stats for "stolen cycles" (cycles used by the VICII) can be added<br />
* branch taken / not taken statistics<br />
* support for drive CPUs is missing<br />
* support for other CPUs than 6502 is missing<br />
* binary remote monitor commands need to be implemented (perhaps once more of the above works, so we know how these must look like)<br />
<br />
===== Binary Interface =====<br />
<br />
The binary interface has a few design issues that should be fixed<br />
<br />
* Command 0x84 (get display) has several issues:<br />
** The first parameter should probably not be a boolean ("is this VICII?"), but "videochip number", with 0 being VICII and 1 being VDC on C128. Further Videochips could be added then (eg if we ever implement the BTX cartridge). Perhaps for compatibility reasons we start counting at 1, and make "0" a special parameter for "current one" '''I'm not sure what to do with this so I'm leaving it alone for the time being.'''<br />
<br />
Also, the Documentation has some issues:<br />
<br />
* At some places it uses &foo and *bar to refer to "length" and a block of data(?). This is really weird and should be removed / replaced by something that is more clear.<br />
<br />
Last not least the binmontest program needs cleanup, so it can serve as an example program:<br />
<br />
* Magic values are used for offsets at various places. It should use constants instead. Ideally, a common header file is used for both the test-program and the VICE code itself<br />
* More comments are needed in place of the various checks<br />
<br />
====History Recording====<br />
<br />
* history recording currently breaks on a lot of user actions, such as using autostart or attaching a cartridge.<br />
: '''Workaround''': make sure to start up with a bog standard c64, and then load/run the program in question manually<br />
* recording/playing back histories was broken in 2.2 ( https://sourceforge.net/tracker/?func=detail&aid=2925410&group_id=223021&atid=1057617 )<br />
note: since history recording is very error prone and hard to debug, we depend on feedback (on either failure or success) on this topic very much. if you still have problems with the current release, please report them including testcases.<br />
<br />
====Screenshots / Media Recording====<br />
* Screenshots with activated video filter (CRT emulation / Scale2x) do not deliver the expected (filtered) result.<br />
<br />
====Rendering====<br />
<br />
* some things are still shared by videochips although they shouldnt be, resulting in conflicts for eg the color generation (visible in x128 in ports that show two windows at a time, when crt emulation is enabled, eg adjusting brightness affects also the other window)<br />
* '''TODO''' add a 4:3 fixed aspect ratio scaling mode<br />
* '''TODO''' when a test program has been written, adjust the "normal" border mode accordingly (CAUTION: fix testsuite first)<br />
* '''TODO''' put all border mode parameters into arrays, make a global function to query the parameters and modes (for UIs) and then add "TV" mode (like "normal", but not centered)<br />
<br />
=====CRT Emulation=====<br />
<br />
* the rf-modulator output characteristics are not emulated, which means the so called "black bleeding" effect does not work (emusux0r, http://www.csdb.dk/release/?id=81780)<br />
* artefact color and luma/chroma crosstalk are not emulated (eg the "red/green stripes")<br />
<br />
see http://hitmen.c02.at/temp/palstuff/ for some further info on this topic.<br />
<br />
====Drive Emulation====<br />
<br />
* G64 image support is incomplete, the speedzone definitions are completely ignored<br />
: ''Note: this is no problem in practise, so far not a single title (game) could be located that would actually require this kind of support to work''. Incase you find a program that needs this kind of support, please let us know.<br />
* RPM and Wobble settings have currently no effect when P64 images are used<br />
<br />
=====virtual Devices=====<br />
<br />
* handling of CBM style sub partitions is incomplete, write operations on sub partitions may give unexpected results.<br />
* RELative files are only supported when using disk images ( https://sourceforge.net/p/vice-emu/bugs/703/ )<br />
* support for double sided disk images is very shaky, since no concept of disk sides exists and the tracks on the second side are referenced by an offset into the image, the handling of images with different number of tracks is needlessly hard and complicated (and thus broken).<br />
* the IEEE machines use the "virtual devices" for something slightly different than the IEC machines, for the IEEE machines its more like what "IEC Device" means for the IEC machines. This should be handled with a seperate resource similar to "IEC Device" in the other emulators.<br />
<br />
=====True Drive Emulation=====<br />
* serial timing latency is not implemented. due to their physical properties, it takes about half a cycle for a value to show up at the respective output pin after it has been written to the register. and respectivly, it takes about half a cycle from changing an input pin until the value in the respective register changes.<br />
* mechanical delays (such as head stepping and motor spinup) are not emulated yet.<br />
* accessing device #7 on the IEC bus works (only real devices), but it only works if True Drive Emulation is OFF, even though this has nothing to do with drives. This needs to be fixed in TDE somehow.<br />
: generally the way device #7 is implemented as a special case that is different to devices 4-6 is questionable and should be made the same<br />
======1571======<br />
* 2mhz mode of the 1571 is not handled correctly<br />
** drive CPUs always run at 1Mhz for all drives (hardcoded 1000000 at a few places)<br />
** 1571 has extra delay on on reading sync inside the drive, ("you cannot use BVC in 2mhz mode!")<br />
* 1571CR (MOS5710) emulation is incomplete<br />
** extra FDC2 registers are not implemented<br />
* double sided 1571 images do not work correctly<br />
** regular (70 tracks) vs extended (80 or 84 tracks) d71 images are not handled at all (vdrive problem)<br />
** creating (formatting) G71 does not work correctly, the second BAM block will be wrong (vdrive problem)<br />
** double sided P64 can be used, but can not be created from within VICE (see patch #122, r32586). since these are non existant "in the wild" and probably not needed for anything - not a big problem :) to handle this properly, a seperate image format should get created (at least internally)<br />
<br />
=====Extensions=====<br />
* when using dolphin dos 3 emulation, the state of the mc6821 is not saved to/restored from snapshots<br />
* when using supercard+ emulation, the optional additional index hole sensor (for the IHS nibbler) is not emulated<br />
=====Drive Noise=====<br />
* since the current implementation is a very simple sample player, things like "drive composer" will not work<br />
<br />
====Datasette Emulation====<br />
<br />
* unlike with a real datasette, the emulated counter will stop counting when no tape/image is present<br />
* when a t64 image is attached, the datasette status will incorrectly say "no image".<br />
: ''Note: since t64 is currently only accessable via kernal traps, the datasette emulation actually treats this case as if no image is present. The respective code must be updated so the datasette emulation actually "knows" about when t64 is in use.''<br />
* motor noise is not emulated<br />
<br />
====Tape port devices====<br />
<br />
* DTL Basic Dongle emulation is broken<br />
<br />
====Printer Emulation====<br />
<br />
* not really a bug: the printer output file is always created in the current working directory. ( https://sourceforge.net/tracker/?func=detail&aid=3305650&group_id=223021&atid=1057617 )<br />
: ''there perhaps should be a way to explicitly set a directory for printer output files'' [[User:Gpz|Gpz]] 01:24, 4 July 2011 (UTC)<br />
* printer noise is not emulated<br />
<br />
====RS232====<br />
<br />
* the RING signal is not emulated (there is exactly one code path where it appears to be handled - a) windows b) userport c) physical rs232 port)<br />
** an "invert" option for this is needed too<br />
<br />
----<br />
<br />
===Cores===<br />
<br />
{| class="wikitable"<br />
! Core !! used in !!<br />
|-<br />
| VIA || VIC20, PET, various drives ||<br />
|-<br />
| CIA || C64, C128, 1570/71 ||<br />
|-<br />
| SID || C64, C128, CBM2, (VIC20, PLUS4, PET: SID cart) ||<br />
|-<br />
| TED || Plus4 || snapshots are broken<br />
|-<br />
| VDC || C128 || snapshots are broken<br />
|-<br />
| VIC || VIC-20 ||<br />
|-<br />
| VIC-II || C64, CBM2 ||<br />
|-<br />
| VIC-IIe || C128 ||<br />
|-<br />
| t6721a || Magic Voice, Plus4 (V364) || snapshot support is missing<br />
|-<br />
| mc6821 || Formel64, Magic Formel, Dolphin-DOS 3 ||<br />
|-<br />
| CS8900a || RR-Net/TFE || snapshot support is missing<br />
|-<br />
| RIOT || 2040/3040/4040/1001/8050/8250 ||<br />
|-<br />
| PC8477/DP8473 || FD4000/FD2000 ||<br />
|-<br />
| WD1770 || 1570/1571/1581 ||<br />
|-<br />
| ACIA (6551)|| Swiftlink ||<br />
|-<br />
| spi-sdcard || MMC64, MMC Replay || snapshot support is missing<br />
|-<br />
| ser-eeprom || MMC Replay || snapshot support is missing<br />
|-<br />
| midi || C64, VIC-20 || snapshot support is missing<br />
|}<br />
<br />
====VIA====<br />
<br />
* MYVIA_NEED_LATCHING option is possibly broken, but in any case untested<br />
* the code doesn't actually notify anything outside the chip when PB7 toggles<br />
** Same so far for the output from the shift register and its handshaking<br />
<br />
====CIA====<br />
<br />
* the case when CIA1 port A and port B are both in output mode, port A outputs low, port B outputs high, both are connected via the keyboard matrix and a value is read from port B is not handled correctly ( testprogs/CIA/ciaports ; http://noname.c64.org/csdb/release/?id=5375 ) (has been improved but is not perfect)<br />
* the various analog side effects that must be considered when pressing two or more keys are not emulated correctly, so this will currently not produce the correct results in some corner cases.<br />
* Shift Register IRQ triggers one cycle too early (see [http://sourceforge.net/p/vice-emu/bugs/599/ this] bug)<br />
<br />
====SID====<br />
<br />
* POTX/POTY sampling jitter is not emulated<br />
* only one mouse or pair of paddles can be emulated at a time<br />
<br />
====TED====<br />
<br />
* FLI does not work ( https://sourceforge.net/tracker/?func=detail&aid=3205787&group_id=223021&atid=1057617 )<br />
<br />
====VDC====<br />
<br />
* Some basic features of the VDC are missing:<br />
** Registers 34/35 (horizontal blanking position) not implemented<br />
** $d600 bit 7 STATUS flag is only approximately implemented. Fixing requires emulating the internal timing of the VDC.. (partially implemented in r35456, also see testprogs/VDC/vdctiming)<br />
** Differences between 8563 and 8568 are not all emulated, eg. register 38<br />
* Clock calculation for lightpen is incorrect (?)<br />
* Can't resize the screen enough to fit all video modes, e.g. vdcmodemania high resolution modes. Aspect ratio needs to change on the fly too.<br />
* Screen position is not always correct, e.g. vdcmodemania FLI parts<br />
<br />
====VIC====<br />
<br />
* Idle fetch (or the lack of it) needs investigation<br />
* "Screen mixup" is not emulated<br />
* COLS=0 can lead to negative width in raster/ causing segfaults if not checked for in archdep video code<br />
* NTSC bugs:<br />
** raster line register values are incorrect near the end of frame (see testprogs/VIC20/split-tests/lightpen)<br />
** lightpen values are off (see testprogs/VIC20/split-tests/lightpen, http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=4870 )<br />
** some glitches when XPOS is 0, breaks (at least) Vicual MMIX credits part (http://www.cs.tut.fi/~albert/Pu-239/vicual-mmix/)<br />
<br />
====VIC-II====<br />
<br />
* the handling of MCBASE at power-on is incorrect (see testprogs/VICII/spritemcbase)<br />
*: note: this should only be visible directly after power-cycle on a 6569<br />
* DMA delay artifacts are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325466&group_id=223021&atid=1057617 )<br />
* Sprite fetch bugs in sideborder are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325426&group_id=223021&atid=1057617 )<br />
* DMA delay does not affect idle byte correctly [https://sourceforge.net/p/vice-emu/bugs/1855/ bug#1855]<br />
* 6569R1 sprite oddity at X-position $163 is not emulated correctly [https://sourceforge.net/p/vice-emu/bugs/1857/ bug #1857]<br />
<br />
====VIC-IIe====<br />
<br />
* The test bit is not emulated, which results in things like 'real interlace' ([http://sites.google.com/site/h2obsession/CBM/C128/Interlace]) and the $D030 new VIC-IIe color palette hack ([http://www.commodore128.org/index.php?topic=3665.0]) not working.<br />
<br />
====t6721a====<br />
<br />
* 48bit frames support is incorrect/broken<br />
* synthesizer condition 2 loss-effect-, shape- and repeat- bits have no effect<br />
* reading from the speach rom is not emulated (which is not really an issue since neither magic voice nor v364 have one)<br />
<br />
====mc6821====<br />
<br />
* interrupts are not implemented<br />
* implementation of C2 output modes is incomplete<br />
<br />
====RIOT====<br />
<br />
* I/O "peek" function is broken<br />
<br />
----<br />
<br />
===Machines===<br />
<br />
====x64sc====<br />
<br />
Note: [[x64_Bugs|x64]] is deprecated.<br />
<br />
=====general=====<br />
<br />
* some C64 models are not emulated 100% correctly (for details see [[C64models]])<br />
** the memory layout for "Max Machine" is not yet correct<br />
** when SX-64 is selected, the tick for the CIA TOD clocks should always be 60Hz (regardless of PAL/NTSC)<br />
** The Japanese C64 has "C= lock" instead of "Shift Lock" (the keyboard is physically different)<br />
<br />
=====Cartridge System=====<br />
<br />
''note: the detailed todo list/status is [[cartsystem|here]].''<br />
<br />
* some carts have no snapshot support yet (still broken: Magic Voice, MMC Replay, RR-Net MK3, Ethernet.)<br />
** IDE64 & ATA system can only handle "readonly" snapshots now. Somehow the image file must be matched to the snapshot to prevent corruption.<br />
** MMC64 snapshots do not include the SD-card<br />
* some carts do not work 100% yet (still broken: Magic Voice, MMC Replay.)<br />
** Magic Voice: emulation of the speech chip is incomplete (see [[Todo#t6721a]]), this breaks some words included in the magic voice rom and the "a-bee-c" cartridge. Memory mapping is incomplete/broken (which however affects no known software/testcase).<br />
** MMC Replay: only the BIOS mode works right now; the monitor may incorrectly access cartridge memory (even) if "bank cart" is explicitly set<br />
* the (very strange, and incompatible with most cartridges) passthrough port of the SFX sound expander is not emulated<br />
* various cartridges have no support for verbose i/o dump in the monitor<br />
* Passthrough port functionality depends on ordering of cartridge attaches, especially visible from the command line. (e.g. MMC64+RR ok, RR+MMC64 not)<br />
* '''TODO:''' IDE64 is missing a "make HD image read only" resource<br />
* '''TODO:''' IDE64 saves its config data into vicerc - it should use a bin image like every other cartridge<br />
<br />
----<br />
====x128====<br />
<br />
* Support for fast mode (2MHz) is implemented but incomplete, detailed information about the stealing of cycles by the VICII when switching back from fast mode is missing and therefor the emulation of it is incorrect.<br />
* support for c128 specific expansion port handling/mapping is missing in the c64/c128 cartridge system (MMC Replay, FastLoad128, MACH128, other?)<br />
* the relative speed and details like cycle-stealing of the z80 is inaccurate ( https://sourceforge.net/tracker/?func=detail&aid=3476760&group_id=223021&atid=1057617 )<br />
: xmx provided a test program, see testprogs/c128/z80/cycletimer<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6510 "sc" core<br />
<br />
----<br />
====xvic====<br />
<br />
* programs that do not work for unknown reason:<br />
** "Grave Cave" ( https://sourceforge.net/tracker/?func=detail&aid=3297561&group_id=223021&atid=1057617 )<br />
* the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
* xvic does not use iecbus/iecbus.c, which is why "IEC Device" stuff does not work with it<br />
<br />
===== Cartridge System =====<br />
<br />
* cartridge_get_info_list is not implemented<br />
* CRT/BIN saver are missing<br />
** writeback with crt file is not implemented<br />
** GUI elements for "save cartridge" are missing<br />
<br />
----<br />
====x64dtv====<br />
<big>The DTV emulator is very inaccurate and is in need of a partial rewrite. Maintainer wanted!</big><br />
<br />
* Misery 3: (http://noname.c64.org/csdb/release/?id=83196)<br />
** fails emudetect<br />
** plasma part is missing badlines<br />
* switching VICII border mode resets x64dtv ( https://sourceforge.net/tracker/?func=detail&aid=3004255&group_id=223021&atid=1057620 )<br />
* CPU history (chist) implementation is incomplete<br />
* the "PS/2 Mouse at Userport" should get refactored to be a regular Userport device in the common Userport system<br />
* "enable Userport Joystick" vs "Hummer Userport Joystick" is strange and confusing, especially since in the DTV emulator we dont even have a "UserportJoyType" selection. the regular "DTV Joystick on Userport" should become a regular Userport device.<br />
<br />
----<br />
====xplus4====<br />
<big>The plus4 emulator is generally work in progress and not yet "ready". Maintainer wanted!</big><br />
* support for Snapshots is incomplete/broken (TED, PIA, V364 Speech, ...) ( https://sourceforge.net/tracker/?func=detail&aid=2878220&group_id=223021&atid=1057617 )<br />
* emulation of the V364 speech chip is incomplete (see [[Todo#t6721a]])<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
=====Cartridge System=====<br />
* handling of the c0/c1/c2 roms is weak<br />
** cartridges share the same roms as internal roms<br />
** roms are not removed from the memory map if not present (just cleared)<br />
* "mmu" memory translation table handling is not implemented for cartridges<br />
* snapshot implementations are completely untested<br />
* .crt support is missing<br />
<br />
----<br />
====xcbm2====<br />
<br />
* The CBM-II emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture<br />
* when running the burn-in diagnostic tests, the CIA is reported as bad ( https://sourceforge.net/tracker/?func=detail&aid=3102493&group_id=223021&atid=1057617 )<br />
: ''note: run like this: xcbm2 -model 610 -ntsc -drive8type 8050 -virtualdev +truedrive -8 cbm2-burnin.d80''<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xcbm5x0====<br />
* The emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture.<br />
* In the C510 emulation the VIC-II timing is not exact, i.e. the stopping of the CPU during bad lines is wrong.<br />
* The C510 emulation uses the old VIC-II core which means no cycle exact sprite collisions, no inline gfx changes, and probably more. See [[x64_Bugs|here]] for details.<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xpet====<br />
* When running the "8296d diagnostic" test of the 8296 system disk on "xpet -model 8296" some tests fail:<br />
** when TDE is enabled, the program will hang. when TDE is disabled, the IEEE interface status will be reported as bad<br />
** the userport is reported as bad (perhaps some dongle is needed?)<br />
: ''note: run like this: "xpet -model 8296 -drive8type 8050 -8 8296d-systemdisk.d82 -editor edit-4-80-b-50Hz.901474-04.bin". the "burnin8296" program seems to be an older version of the "8296d diagnostic" program. it runs when TDE is enabled, but the 50Hz irq test fails.''<br />
* some combinations of selected keymap and keyboard model do not work because of missing keymaps<br />
** also the keymaps must match the "editor" ROM - currently only the UK (Business) ROM in included in VICE<br />
** the keymaps for US (host) keymap need to be checked and fixed<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
<br />
----<br />
===SC Rewrites===<br />
<br />
As a long term goal, everything should be rewritten to use the new "sc" cpu cores (and the non sc cores removed):<br />
<br />
* Migrate emulators to the cycle based CPU core (6510dtvcore.c, should be renamed), which allows:<br />
** cycle based hooks for complex hardware expansions (SCPU)<br />
** in-line graphics data change emulation (see testprogs/VICII/gfxfetch)<br />
** cycle exact Blitter/DMA vblank start and proper LinearA/B counter handling on x64dtv<br />
** cycle based drawing<br />
* ...and requires (at least):<br />
** rewrite video chip modules to use:<br />
*** cycle based fetch/etc (VIC & VICII done, VICII-DTV in progress)<br />
*** cycle based drawing (VICII done)<br />
** remove 1 clock write offsets (at least CIA/VIA already handled)<br />
** an insane amount of regression testing (preferably with new testprogs where needed)<br />
<br />
----<br />
<br />
== Tools ==<br />
=== c1541 ===<br />
<br />
* handling of .d81 CBM sub partitions and CMD DIR subdirectories is broken due to the way disk images are handled.<br />
** accessing files does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367519&group_id=223021&atid=1057617 )<br />
** listing directories does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367517&group_id=223021&atid=1057617 )<br />
: ''unfortunately to fix this a lot of c1541 will have to be rewritten (mount image only once, not for each operation)'' [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 23:57, 13 December 2012 (UTC)<br />
* since virtual drive emulation does not support REL files on the host filesystem, c1541 can not extract them to R00 files ( https://sourceforge.net/p/vice-emu/bugs/702/ )<br />
<br />
* <s>Remove optional dependency on libreadline once linenoise-ng has been tested properly.</s><br />
:: See if linenoise-ng can be made to work with the MSYS2 shell, which would help with debugging c1541.<br />
<br />
----<br />
==Ports==<br />
<br />
Some of the mess isn't ours! See here for [[Upstream bugs]].<br />
<br />
===archdep===<br />
<br />
* '''TODO:''' allow browsing of archives (zip etc) ( https://sourceforge.net/tracker/index.php?func=detail&aid=2942868&group_id=223021&atid=1057620 )<br />
<br />
====Windows====<br />
<br />
* '''TODO:''' the native (console based) monitor does not work in windows<br />
<br />
----<br />
<br />
===GTK3 UI===<br />
<br />
This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: <code>grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`</code>, and be amazed.<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''TODO:''' Add support for non-ASCII characters in the various file/path dialogs (snapshot, maybe even the various cartridge image/eeprom paths and the machine/drive ROM paths) (fixed?)<br />
<br />
The list of covered resources is [[Gtk3_Resource_Coverage|here]]<br />
<br />
==== Main window(s) ====<br />
<br />
* '''TODO:''' make sure both hard- and software rendering match whats described in [[Scaling_cleanup]] - if so, the page can be cleaned out<br />
:: Implemented, but only for a single display, no multi-display support yet. GDK seem to support multi-display setup querying, but we'd actually have to write code and test this to see how GDK handles this, if at all. (fixed?)<br />
** do not forget the VDC and the Monitor windows (fixed?)<br />
:: VDC is handled, the monitor windows isn't, there aren't any resource for the monitor window, nor any event handlers. Another wish seems to be to put the VICII and VDC window next to each other for x128, which will probably mean introducing yet another resource to control this and override the Window1* resources. Probably some enum: USE_WINDOW1* = -1, ABOVE, BELOW, LEFT, RIGHT. And hope the Window Manager actually listens to our requests to move said window.<br />
<br />
* '''BUG:''' mouse grab (when mouse emulation is enabled) is not perfect. eg when the emulator is started with mouse enabled, the pointer is not initially moved into the emulator window.<br />
<br />
==== Statusbar ====<br />
<br />
* '''BUG:''' On MacOS and Windows, the slider popup widget is hidden behind the rendered canvas, on Linux this works as it should. So currently the volume widget is disabled on MacOS and Windows<br />
<br />
==== Dialogs ====<br />
* '''TODO''': Polish the keyset dialog: <s>at there very least split the UI into a 3x3 grid for the directions and a 4x2 grid for the fire buttons</s>. Maybe use icons for the direction if they're in the default Gtk icon set.<br />
:: Only arrow icons for North, West, South and East are available. Gtk3 used to have a [https://docs.gtk.org/gtk3/class.Arrow.html GtkArrow] class, but that has been deprecated since 3.14 and removed from 4.x. So we'll have to write our own (which should also prove useful for joystick mapping widgets).<br />
<br />
==== Settings ====<br />
<br />
* '''TODO:''' HardSID settings are missing<br />
<br />
=====ROMsets=====<br />
<br />
* a generic function should be created which scans the data directory of the emulator and returns a list of all .vrs files for the UI<br />
** then the UI can use said list in a dropdown list for quick selection<br />
<br />
* '''TODO:''' ROM-set manager/settings need to be reworked and fixed. ROMset "archives" should be removed completely. see [[#ROMsets]]<br />
<br />
===== CBM2 model (xcbm2/xcbm5x0) =====<br />
<br />
* '''TODO:''' Check model settings glue logic.<br />
:: Mostly works, the 50/60Hz switch is a problem. I'll need someone with some actual CBM-II knowledge to help me out here. [[User:Compyx|Compyx]] 2020-01-08<br />
<br />
===== Joysticks =====<br />
<br />
see [[Joymappings]]<br />
<br />
==== vsid ====<br />
<br />
* '''BUG:''' Fix drag-n-drop behaviour, dragging multiple SID files onto the playlist widget works, but on Linux at least, dropping a SID file on the STIL view widget doesn't work (specifically the GtkTextView), this works on Windows oddly enough.<br />
<br />
* <s>'''TODO:''' Implement "goto-next-SID" when having SLDB support enabled.</s> ('''added in trunk''')<br />
<br />
* '''BUG:''' STIL view: some tunes (for example Last Ninja 2) print empty "tune #x" entries, so you'll get "Tune #1" in blue and a few empty lines, in the case of LN2 this goes on until tune #6. Most likely a bug in the use of hvsclib, not the lib itself.<br />
<br />
* '''TODO:'''Playlist: allow keyboard navigation. Perhaps also multi-select via Ctrl or Shift to delete multiple entries?<br />
<br />
* <s>Implement a playlist for VSID (partly done)</s> ('''added in trunk''': VSID playlists use the <tt>m3u</tt> format and can be created, edited, loaded and saved.)<br />
<br />
* Add some sort of tree-based file browser (preferably using the HVSC as the default dir) to allow quick tune selection and help with building a playlist (ie via drag-n-drop)<br />
<br />
* Add HVSC BUGlist support to VSID<br />
:: Support for this is available in src/hvsc, but there are very few actual entries in the BUGList.txt file. Maybe skip this one?<br />
<br />
* Update mixer sliders to use proper units etc like the mixer sliders in the other emus<br />
<br />
==== Monitor ====<br />
<br />
The GUI based monitor currently uses a mercylessly hacked VTE library. When we looked for a way to put the monitor into a console window that works with GTK3, this seemed to be the only way to do it. The ugly hacks were required to make VTE compile and work on windows. This is also why we cant use a more modern version of the VTE library.<br />
<br />
* '''TODO:''' On the long run, we will have to write a custom renderer for a monitor window, which supports all the things we need to implement a classic "fullscreen editor" like ml monitor.<br />
* '''TODO:''' Again as a long term goal, we might want to support transparent support for native charsets<br />
<br />
for some info on the monitor ui see: [[MonitorUI]].<br />
<br />
==== macOS ====<br />
<br />
* '''TODO:''' joystick_ui_get_next_device_name should return the detected joysticks instead of the predefined list (fixed?)<br />
<br />
* '''TODO:''' Make the GTK UI create/use the macOS style "top menubar"<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
<br />
==== OpenGL ====<br />
* '''TODO:''' The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (fixed?)<br />
** Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing.<br />
* '''TODO:''' Do-not-scale option. Important for Cairo renderer, possible for OpenGL.<br />
<br />
==== Stretch goals ====<br />
<br />
* Make 'smart cartridge attach' dialog smarter when attaching .bin images, show only valid cartridge types when selecting a cart image.<br />
** '''TODO''': this needs a new API call that returns the valid sizes for a given type<br />
* make an option to force display size to 1x/2x/3x/4x<br />
* make a GUI based editor for keymaps<br />
* add statusbar indicators for cartridge LEDs.<br />
<br />
----<br />
<br />
===SDL UI===<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''BUG:''' FFmpeg media recording behaves unexpected when entering the menu [https://sourceforge.net/p/vice-emu/bugs/898/]<br />
* '''TODO''': get rid of fullscreenarch.h and fullscreen.c - its no more required because SDL can do all of the features fine.<br />
<br />
====Menus====<br />
* '''TODO:''' some menu items need status text to show that the action has been done.<br />
** Drive>Fliplist settings>Add current image to fliplist<br />
** Drive>Fliplist settings>Remove current image from fliplist<br />
** Drive>Fliplist settings>Attach next image in fliplist<br />
** Drive>Fliplist settings>Attach previous image in fliplist<br />
* '''BUG:''' at a lot of places "inactive" (as in "cant be selected") menu items are missing the "N/A" on the right<br />
* '''TODO:''' A better way of showing filenames (maybe using contraction) needs to be made<br />
<br />
====Datasette====<br />
<br />
*'''TODO:''' add menu items for "Reset datasette counter" (UI action handlers have been added in the "compyx/sdl-uiactions" branch)<br />
<br />
====Joysticks====<br />
<br />
see [[Joymappings]]<br />
<br />
====Monitor====<br />
* '''TODO:''' implement a scrollback buffer<br />
<br />
====File Selector====<br />
* '''TODO:''' add filtering in file requester<br />
<br />
====Virtual Keyboard====<br />
* '''TODO:''' shift/cbm/ctrl should be "sticky" (right now shifted keys are entered using backspace/cancel - which is odd)<br />
* '''TODO:''' the virtual keyboard handling of the SDL port must be updated/fixed to support all PET keyboards<br />
<br />
==== VSID ====<br />
* '''TODO:''' Implement a playlist for VSID<br />
* '''TODO:''' Add HVSC song length database (SLDB) support to VSID (<s>both .txt and</s> .md5 file format)<br />
* '''TODO:''' Add HVSC sid tune information list (STIL) support to VSID<br />
* '''TODO:''' Add HVSC BUGlist support to VSID<br />
<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61613.82023-11-22T07:49:04Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
:: This is used to copy the ffmpeg DDLs into the bindist. Linking to ffmpeg is on its way out, replaced by using the (user-provided) ffmpeg executable, so I've '''removed''' the logic from the '''Windows''' scripts. The same should probably happen on MacOS, but I do not have a Mac to test this. --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 08:49, 22 November 2023 (CET)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61523.82023-11-21T09:03:40Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** <s>HAVE_READLINE (seems to be used in makefiles all over the place)</s> ('''fixed in trunk''')<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61513.82023-11-21T08:47:13Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
:: Please define "'''the right thing'''" --[[User:Compyx|Compyx]] ([[User talk:Compyx|talk]]) 09:47, 21 November 2023 (CET)<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61503.82023-11-21T08:46:00Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, <s>HAVE_FULLSCREEN</s>, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61493.82023-11-21T08:28:10Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, <s>HAVE_HARDSID_IO</s>, HAVE_FULLSCREEN, <s>HAVE_CATWEASELMKIII_IO</s><br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61483.82023-11-21T08:07:12Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), <s>BSD_JOYSTICK</s>, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61473.82023-11-21T07:22:56Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), BSD_JOYSTICK, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''fixed in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* <s>TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284</s> ('''fixed in trunk''')<br />
** <s>for capabilities support to work, sys/capability.h must be available on the build system</s> ('''fixed in trunk''')<br />
** <s>also use --enable-portaudio ? (needed for sampler input)</s> ('''fixed in trunk''', <tt>--enable-portaudio</tt> has changed to <tt>--with-portaudio</tt>)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61443.82023-11-17T06:03:05Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), BSD_JOYSTICK, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* <s>TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123</s> ('''added in trunk''', <tt>--enable-libieee1284</tt> has changed to <tt>--with-libieee1284</tt>)<br />
** <s>libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)</s> ('''added in trunk''')<br />
** <s>also use --enable-portaudio (needed for sampler input)</s> ('''added in trunk''', switch has changed to <tt>--with-portaudio</tt>)<br />
* TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284 ('''enabled''' in <tt>build-main-on-push.yml</tt>)<br />
** for capabilities support to work, sys/capability.h must be available on the build system ('''enabled''' in <tt>build-main-on-push.yml</tt> (installs libcap-dev))<br />
** also use --enable-portaudio ? (needed for sampler input)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61433.82023-11-16T07:46:27Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), BSD_JOYSTICK, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* <s>configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt></s> ('''fixed in trunk''')<br />
* <s>configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt></s> ('''fixed in trunk''')<br />
<br />
<br />
==== Github Actions ====<br />
<br />
* TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123<br />
** libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)<br />
** also use --enable-portaudio (needed for sampler input)<br />
* TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284 ('''enabled''' in <tt>build-main-on-push.yml</tt>)<br />
** for capabilities support to work, sys/capability.h must be available on the build system ('''enabled''' in <tt>build-main-on-push.yml</tt> (installs libcap-dev))<br />
** also use --enable-portaudio ? (needed for sampler input)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
* Consider using a separate workflow for creating the matrices used for configure switches: right now the configure switches used for the various builds are spread over the jobs in two workflows (<tt>build-main-on-push</tt> and <tt>make-release</tt> and a shell script (<tt>build/github-actions/build-shared.sh</tt>). Using a single file for all the configure switches would make adding, editing and validating build options a lot easier.<br />
:: See https://github.com/ch007m/test-github-action/blob/main/.github/workflows/reusable-config.yml for an example of how we could implement this.<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61423.82023-11-16T06:52:37Z<p>Compyx: /* Buildsystem */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), BSD_JOYSTICK, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
* configure switch <tt>--enable-portaudio</tt> should be changed to <tt>--with-portaudio</tt><br />
* configure switch <tt>--enable-libieee1284</tt> should be changed to <tt>--with-libieee1284</tt><br />
<br />
<br />
==== Github Actions ====<br />
<br />
* TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284, --with-mpg123<br />
** libieee1284 must be installed/built from git (./bootstrap && ./configure --without-python && make && make install)<br />
** also use --enable-portaudio (needed for sampler input)<br />
* TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284 ('''enabled''' in <tt>build-main-on-push.yml</tt>)<br />
** for capabilities support to work, sys/capability.h must be available on the build system ('''enabled''' in <tt>build-main-on-push.yml</tt> (installs libcap-dev))<br />
** also use --enable-portaudio ? (needed for sampler input)<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61383.82023-11-13T21:35:17Z<p>Compyx: /* Github Actions */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
* some symbols appear in config.h that are not used anywhere (so they can be removed): AC_APPLE_UNIVERSAL_BUILD (?), BSD_JOYSTICK, HAVE_HARDSID_IO, HAVE_FULLSCREEN, HAVE_CATWEASELMKIII_IO<br />
** EXTERNAL_FFMPEG (win32 and osx bindist greps for this in config.h!)<br />
** HAVE_EXTERNAL_LAME (osx bindist greps for this in config.h!)<br />
** HAVE_READLINE (seems to be used in makefiles all over the place)<br />
<br />
==== Github Actions ====<br />
<br />
* TODO: the windows build should use --enable-catweasel, --enable-parsid, --enable-libieee1284 (perhaps?), --with-mpg123<br />
<br />
* TODO: the linux build should use --enable-catweasel, --enable-parsid, --enable-libieee1284 ('''enabled''' in <tt>build-main-on-push.yml</tt>)<br />
** for capabilities support to work, sys/capability.h must be available on the build system ('''enabled''' in <tt>build-main-on-push.yml</tt> (installs libcap-dev))<br />
<br />
<br />
* we need to make sure both build-main-on-push.yml and make-release.yml do the right thing<br />
<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* TODO: VICE_USE_LIBNET_1_1 should probably get removed alltogether, unless we need to support some ancient libnet API for whatever reason<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* <s>various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere</s> ('''in trunk''')<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61313.82023-11-13T13:10:29Z<p>Compyx: /* Resources without UI support */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>EventEndSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventImageInclude</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>EventStartSnapshot</tt> || all except VSID || Probably command line only?<br />
|-<br />
| <tt>ExitScreenshotName</tt> || all except VSID || Command line only<br />
|-<br />
| <tt>ExitScreenshotName1</tt> || x128 || Command line only<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* <s>Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)</s> ('''in trunk''')<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61293.82023-11-13T12:55:19Z<p>Compyx: /* Resources without UI support */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>DTVFlashRevision</tt> || x64dtv || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|-<br />
| <tt>WIC64IPAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64MACAddress</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|-<br />
| <tt>WIC64SecToken</tt> || x64, x64sc, xscpu64, x128, xvic || set implicitly by WIC64 emulation<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=61273.82023-11-13T10:16:51Z<p>Compyx: /* Cleanup */</p>
<hr />
<div>Things we wanted to do for the 3.7.2 release, but are now going to be in the 3.8 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* <s>TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128</s> (seems to work just fine '''in trunk''')<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)</s> ('''in trunk''')<br />
<br />
* <s>"CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)</s> ('''in trunk''')<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** FIXME: the texture should rotate and scale to the window. This is handled in video_canvas_refresh(), but doesn't work correctly :/<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate) (enable in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* <s>add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource, command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>)</s> ('''in trunk''')<br />
:: TODO: Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* <s>"CB2 Sound" should get an enable tickbox under "Machine" settings</s> (no, we assume it is always present)<br />
** <s>not sure if this should also be a userport device</s><br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** <s>cartridges that work in C64 _and_ C128 mode are not supported yet</s> ('''in trunk''')<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
Things that don't actually work, and can't be fixed easily, should be disabled in the UI by default.<br />
<br />
<s>TODO: make a configure option --enable-experimental-devices which defines HAVE_EXPERIMENTAL_DEVICES</s> ('''in trunk''')<br />
<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
TODO: make sure the UIs use the following symbols to enable/disable the respective UI items: '''DRIVE_EXPERIMENTAL_DEVICES''' (drive.h), '''JOYPORT_EXPERIMENTAL_DEVICES''' (joyport.h), '''TAPEPORT_EXPERIMENTAL_DEVICES''' (tapeport.h), '''USERPORT_EXPERIMENTAL_DEVICES''' (userport.h) - use --enable-experimental-devices to enable experimental devices at configure time.<br />
<br />
Drives:<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''', unless '''DRIVE_EXPERIMENTAL_DEVICES''' is defined in drive.h)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* IEEE machines have no virtual device ("device traps") ('''disabled in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
<br />
Joystick port:<br />
* Gun Stick lightpen emulation is not working (and disabled, unless '''JOYPORT_EXPERIMENTAL_DEVICES''' is defined in joyport.h)<br />
* <s>Paperclip 64 dongle emulation is broken (which exactly?)</s> (it actually works)<br />
<br />
Tape port:<br />
* diag 586220 harness emulation is not working (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
* DTL Basic Dongle emulation is broken (and disabled, unless '''TAPEPORT_EXPERIMENTAL_DEVICES''' is defined in tapeport.h)<br />
<br />
User port:<br />
* <s>WiC64 emulation is not working well (and disabled, unless '''USERPORT_EXPERIMENTAL_DEVICES''' is defined in userport.h)</s> ('''fixed in trunk''')<br />
<br />
Rendering:<br />
* GTK3 UI: Mirror/Flip X/Y and Rotate 90 degrees is not working (disabled in canvasrendermirrorwidget.c:canvas_render_mirror_widget_create())<br />
<br />
Misc:<br />
* <s>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)</s> ('''fixed in trunk''')<br />
<br />
==== Codestyle cleanup ====<br />
Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
* <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
: Status: this must be generally clear (checked by github builder)<br />
<br />
* use '''./src/checkstyle.sh all''' to run some more style checks, in particular those that always produce some false positives<br />
: Status: code should be clean of C++ comments - please keep it that way!<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
==== static buffers cleanup ====<br />
It should be good practise to allocate and use memory dynamically, instead of using global static buffers - especially if those are considerably large. However, this is still being done all over the place.<br />
* use eg <tt>'''./src/findarrays.sh list x64sc'''</tt> to show a list of all static arrays.<br />
** the largest 10 (or so) are always good candidates to be converted into dynamically allocated buffers.<br />
** besides the obvious few large ones, there are also many other buffers that could be dynamic (eg drive ROMs, which could be allocated and loaded only when actually used)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* <s>There should be non port specific cmdline options that set Window0Height, Window0Width etc</s> ('''in trunk''')<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|}<br />
<br />
=== Docs ===<br />
<br />
vice.texi:<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* <s>Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us</s> ('''in trunk''')<br />
<br />
* Find out how to include high resolution images in the pdf that are scaled to page width (instead of included at a fixed width)<br />
<br />
other:<br />
<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
=== Data ===<br />
<br />
==== Keymaps ====<br />
<br />
* Some keymaps need to be checked: cbm2-symbolic-de(gtk/sdl), cbm2-symbolic-us(gtk/sdl), plus4-symbolic-de(gtk/sdl), plus4-symbolic-us(gtk/sdl)<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Todo&diff=6126Todo2023-11-11T19:00:53Z<p>Compyx: /* vsid */</p>
<hr />
<div><br />
This is the list of known problems. also look at [https://sourceforge.net/tracker/?limit=100&func=&group_id=223021&atid=1057617&assignee=&status=4&category=&artgroup=&keyword=&submitter=&artifact_id=&assignee=&status=1&category=&artgroup=&submitter=&keyword=&artifact_id=&submit=Filter&mass_category=&mass_priority=&mass_resolution=&mass_assignee=&mass_artgroup=&mass_status=&mass_cannedresponse= Tracker: open Bugs]<br />
<br />
This list always refers to the status of the last major release version, which was '''3.7'''. Items that have been fixed by the time of a major release will be removed, items fixed after that will be marked as fixed and stay until the next major version. New items will be added as noticed.<br />
<br />
==Prime Directive==<br />
<br />
* '''All developers shall subscribe to the [https://sourceforge.net/p/vice-emu/mailman/ vice-emu-mail mailinglist]''' and perhaps join #vice-dev on freenode too (highly recommended).<br />
* Please '''respect the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/coding-guidelines.txt coding guidelines]'''.<br />
* '''Document your code''' so other people than you are able to understand and fix it in a decade or two.<br />
* When adding/changing stuff that needs (G)UI items/changes, '''all developers should update the SDL and GTK3 UIs themselves''', and immediately following their respective changes.<br />
* When adding/changing command-line options and/or resources, adding a new feature or change the behavior of an existing feature, '''please update the documentation'''.<br />
* After fixing a bug or implementing a new feature, '''update''' its status on '''the [https://sourceforge.net/tracker/?limit=50&group_id=223021&atid=1057617&status=1&submit=Filter Bug Tracker] and''' mark it as fixed in '''the TODO list''' below.<br />
:: Only remove a bug/feature from this list when it was fixed/implemented in the latest stable release.<br />
* And most importantly...<br />
<pre><br />
<@_tlr> Please at least test the issue you were trying to fix before committing.<br />
</pre><br />
: That means: '''you break it, you fix it.''' Do not commit deal breaking changes without communicating it with the rest of the team. '''Generally regressions are not acceptable and respective commits are subject to be reverted.'''<br />
<br />
==Code cleanup and streamlining==<br />
<br />
* remove compiler- and platform- specific hacks (IFDEFS) in common code<br />
$ ./src/findhacks.sh ccarchdep<br />
$ ./src/findhacks.sh archdep<br />
<br />
* <s>replace readline and our fallback implementation with linenoise (https://github.com/antirez/linenoise), or perhaps linenoise-ng (https://github.com/arangodb/linenoise-ng) which appears to support Windows and UTF-8.</s><br />
** write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==Documentation==<br />
===Technical===<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
===Content===<br />
The documentation is partly outdated and/or incomplete, in particular:<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
==Testbench==<br />
<br />
* many test programs (mostly for vic20) are not yet integrated into the automatic testing<br />
* '''TODO''': fix the reference screenshots and/or the scripts so they dont rely on the "normal" rendering mode anymore<br />
* '''TODO''': make a test program to determine visible screen dimensions<br />
* '''TODO''': make a test program to determine the type of delay line used for a PAL screen (UV or U only)<br />
=== autostart problems ===<br />
<br />
* x128 does not autostart prg files correctly when also a cartridge is attached (that forces c64 mode)<br />
<br />
==Emulators==<br />
<br />
===Subsystems===<br />
<br />
====Keyboard====<br />
<br />
* When a key which is shifted on the real machine but unshifted on the PC or Unix keyboard you are using is pressed, the virtual shift is pressed together (i.e. at the same clock cycle) with the main key; this could not work with some keyboard routines.<br />
<br />
: '''Workaround''': If you have to use the function keys, press the (real) shift key manually (e.g. F2 = Shift + F1, F4 = Shift + F3 and so on); this also works with other keys. In any case, using a positional keymap will remove much of this problem.<br />
<br />
* Some ports/emulators/keyboard-types do not have all required keymaps (and a fallback will used) - look at [[Keymaps]] for details<br />
<br />
* Although "shift lock" can be mapped to a key, not all ports and/or emulators support it due to missing keymaps and/or implementation details.<br />
: '''TODO''': check ports and fix or at least add a comment in the keymaps<br />
<br />
* contact-bounce is not emulated <br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick====<br />
<br />
WIP [[Joymappings]]<br />
<br />
* contact-bounce is not emulated<br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick port devices====<br />
<br />
* Paperclip 64 dongle emulation is broken<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
<br />
====Userport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in userport.h)<br />
<br />
====Tapeport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
<br />
====Monitor====<br />
<br />
* TODO: Breakpoints/watchpoints should consider banks, and perhaps PLA/MMU config<br />
* banking should somehow work also with cartridges. for this some generic interface in the cartridge system needs to be created<br />
<br />
===== Profiler =====<br />
<br />
The new profiler feature is still incomplete ( https://sourceforge.net/p/vice-emu/patches/350/ )<br />
<br />
* support for banking (main CPU) is only implemented in x64(sc) right now<br />
** banking should somehow consider cartridge banks, once we have generic support for it in the monitor<br />
* perhaps additional stats for "stolen cycles" (cycles used by the VICII) can be added<br />
* branch taken / not taken statistics<br />
* support for drive CPUs is missing<br />
* support for other CPUs than 6502 is missing<br />
* binary remote monitor commands need to be implemented (perhaps once more of the above works, so we know how these must look like)<br />
<br />
===== Binary Interface =====<br />
<br />
The binary interface has a few design issues that should be fixed<br />
<br />
* Command 0x84 (get display) has several issues:<br />
** The first parameter should probably not be a boolean ("is this VICII?"), but "videochip number", with 0 being VICII and 1 being VDC on C128. Further Videochips could be added then (eg if we ever implement the BTX cartridge). Perhaps for compatibility reasons we start counting at 1, and make "0" a special parameter for "current one" '''I'm not sure what to do with this so I'm leaving it alone for the time being.'''<br />
<br />
Also, the Documentation has some issues:<br />
<br />
* At some places it uses &foo and *bar to refer to "length" and a block of data(?). This is really weird and should be removed / replaced by something that is more clear.<br />
<br />
Last not least the binmontest program needs cleanup, so it can serve as an example program:<br />
<br />
* Magic values are used for offsets at various places. It should use constants instead. Ideally, a common header file is used for both the test-program and the VICE code itself<br />
* More comments are needed in place of the various checks<br />
<br />
====History Recording====<br />
<br />
* history recording currently breaks on a lot of user actions, such as using autostart or attaching a cartridge.<br />
: '''Workaround''': make sure to start up with a bog standard c64, and then load/run the program in question manually<br />
* recording/playing back histories was broken in 2.2 ( https://sourceforge.net/tracker/?func=detail&aid=2925410&group_id=223021&atid=1057617 )<br />
note: since history recording is very error prone and hard to debug, we depend on feedback (on either failure or success) on this topic very much. if you still have problems with the current release, please report them including testcases.<br />
<br />
====Screenshots / Media Recording====<br />
* Screenshots with activated video filter (CRT emulation / Scale2x) do not deliver the expected (filtered) result.<br />
<br />
====Rendering====<br />
<br />
* some things are still shared by videochips although they shouldnt be, resulting in conflicts for eg the color generation (visible in x128 in ports that show two windows at a time, when crt emulation is enabled, eg adjusting brightness affects also the other window)<br />
* '''TODO''' add a 4:3 fixed aspect ratio scaling mode<br />
* '''TODO''' when a test program has been written, adjust the "normal" border mode accordingly (CAUTION: fix testsuite first)<br />
* '''TODO''' put all border mode parameters into arrays, make a global function to query the parameters and modes (for UIs) and then add "TV" mode (like "normal", but not centered)<br />
<br />
=====CRT Emulation=====<br />
<br />
* the rf-modulator output characteristics are not emulated, which means the so called "black bleeding" effect does not work (emusux0r, http://www.csdb.dk/release/?id=81780)<br />
* artefact color and luma/chroma crosstalk are not emulated (eg the "red/green stripes")<br />
<br />
see http://hitmen.c02.at/temp/palstuff/ for some further info on this topic.<br />
<br />
====Drive Emulation====<br />
<br />
* G64 image support is incomplete, the speedzone definitions are completely ignored<br />
: ''Note: this is no problem in practise, so far not a single title (game) could be located that would actually require this kind of support to work''. Incase you find a program that needs this kind of support, please let us know.<br />
* RPM and Wobble settings have currently no effect when P64 images are used<br />
<br />
=====virtual Devices=====<br />
<br />
* handling of CBM style sub partitions is incomplete, write operations on sub partitions may give unexpected results.<br />
* RELative files are only supported when using disk images ( https://sourceforge.net/p/vice-emu/bugs/703/ )<br />
* support for double sided disk images is very shaky, since no concept of disk sides exists and the tracks on the second side are referenced by an offset into the image, the handling of images with different number of tracks is needlessly hard and complicated (and thus broken).<br />
* the IEEE machines use the "virtual devices" for something slightly different than the IEC machines, for the IEEE machines its more like what "IEC Device" means for the IEC machines. This should be handled with a seperate resource similar to "IEC Device" in the other emulators.<br />
<br />
=====True Drive Emulation=====<br />
* serial timing latency is not implemented. due to their physical properties, it takes about half a cycle for a value to show up at the respective output pin after it has been written to the register. and respectivly, it takes about half a cycle from changing an input pin until the value in the respective register changes.<br />
* mechanical delays (such as head stepping and motor spinup) are not emulated yet.<br />
* accessing device #7 on the IEC bus works (only real devices), but it only works if True Drive Emulation is OFF, even though this has nothing to do with drives. This needs to be fixed in TDE somehow.<br />
: generally the way device #7 is implemented as a special case that is different to devices 4-6 is questionable and should be made the same<br />
======1571======<br />
* 2mhz mode of the 1571 is not handled correctly<br />
** drive CPUs always run at 1Mhz for all drives (hardcoded 1000000 at a few places)<br />
** 1571 has extra delay on on reading sync inside the drive, ("you cannot use BVC in 2mhz mode!")<br />
* 1571CR (MOS5710) emulation is incomplete<br />
** extra FDC2 registers are not implemented<br />
* double sided 1571 images do not work correctly<br />
** regular (70 tracks) vs extended (80 or 84 tracks) d71 images are not handled at all (vdrive problem)<br />
** creating (formatting) G71 does not work correctly, the second BAM block will be wrong (vdrive problem)<br />
** double sided P64 can be used, but can not be created from within VICE (see patch #122, r32586). since these are non existant "in the wild" and probably not needed for anything - not a big problem :) to handle this properly, a seperate image format should get created (at least internally)<br />
<br />
=====Extensions=====<br />
* when using dolphin dos 3 emulation, the state of the mc6821 is not saved to/restored from snapshots<br />
* when using supercard+ emulation, the optional additional index hole sensor (for the IHS nibbler) is not emulated<br />
=====Drive Noise=====<br />
* since the current implementation is a very simple sample player, things like "drive composer" will not work<br />
<br />
====Datasette Emulation====<br />
<br />
* unlike with a real datasette, the emulated counter will stop counting when no tape/image is present<br />
* when a t64 image is attached, the datasette status will incorrectly say "no image".<br />
: ''Note: since t64 is currently only accessable via kernal traps, the datasette emulation actually treats this case as if no image is present. The respective code must be updated so the datasette emulation actually "knows" about when t64 is in use.''<br />
* motor noise is not emulated<br />
<br />
====Tape port devices====<br />
<br />
* DTL Basic Dongle emulation is broken<br />
<br />
====Printer Emulation====<br />
<br />
* not really a bug: the printer output file is always created in the current working directory. ( https://sourceforge.net/tracker/?func=detail&aid=3305650&group_id=223021&atid=1057617 )<br />
: ''there perhaps should be a way to explicitly set a directory for printer output files'' [[User:Gpz|Gpz]] 01:24, 4 July 2011 (UTC)<br />
* printer noise is not emulated<br />
<br />
====RS232====<br />
<br />
* the RING signal is not emulated (there is exactly one code path where it appears to be handled - a) windows b) userport c) physical rs232 port)<br />
** an "invert" option for this is needed too<br />
<br />
----<br />
<br />
===Cores===<br />
<br />
{| class="wikitable"<br />
! Core !! used in !!<br />
|-<br />
| VIA || VIC20, PET, various drives ||<br />
|-<br />
| CIA || C64, C128, 1570/71 ||<br />
|-<br />
| SID || C64, C128, CBM2, (VIC20, PLUS4, PET: SID cart) ||<br />
|-<br />
| TED || Plus4 || snapshots are broken<br />
|-<br />
| VDC || C128 || snapshots are broken<br />
|-<br />
| VIC || VIC-20 ||<br />
|-<br />
| VIC-II || C64, CBM2 ||<br />
|-<br />
| VIC-IIe || C128 ||<br />
|-<br />
| t6721a || Magic Voice, Plus4 (V364) || snapshot support is missing<br />
|-<br />
| mc6821 || Formel64, Magic Formel, Dolphin-DOS 3 ||<br />
|-<br />
| CS8900a || RR-Net/TFE || snapshot support is missing<br />
|-<br />
| RIOT || 2040/3040/4040/1001/8050/8250 ||<br />
|-<br />
| PC8477/DP8473 || FD4000/FD2000 ||<br />
|-<br />
| WD1770 || 1570/1571/1581 ||<br />
|-<br />
| ACIA (6551)|| Swiftlink ||<br />
|-<br />
| spi-sdcard || MMC64, MMC Replay || snapshot support is missing<br />
|-<br />
| ser-eeprom || MMC Replay || snapshot support is missing<br />
|-<br />
| midi || C64, VIC-20 || snapshot support is missing<br />
|}<br />
<br />
====VIA====<br />
<br />
* MYVIA_NEED_LATCHING option is possibly broken, but in any case untested<br />
* the code doesn't actually notify anything outside the chip when PB7 toggles<br />
** Same so far for the output from the shift register and its handshaking<br />
<br />
====CIA====<br />
<br />
* the case when CIA1 port A and port B are both in output mode, port A outputs low, port B outputs high, both are connected via the keyboard matrix and a value is read from port B is not handled correctly ( testprogs/CIA/ciaports ; http://noname.c64.org/csdb/release/?id=5375 ) (has been improved but is not perfect)<br />
* the various analog side effects that must be considered when pressing two or more keys are not emulated correctly, so this will currently not produce the correct results in some corner cases.<br />
* Shift Register IRQ triggers one cycle too early (see [http://sourceforge.net/p/vice-emu/bugs/599/ this] bug)<br />
<br />
====SID====<br />
<br />
* POTX/POTY sampling jitter is not emulated<br />
* only one mouse or pair of paddles can be emulated at a time<br />
<br />
====TED====<br />
<br />
* FLI does not work ( https://sourceforge.net/tracker/?func=detail&aid=3205787&group_id=223021&atid=1057617 )<br />
<br />
====VDC====<br />
<br />
* Some basic features of the VDC are missing:<br />
** Registers 34/35 (horizontal blanking position) not implemented<br />
** $d600 bit 7 STATUS flag is only approximately implemented. Fixing requires emulating the internal timing of the VDC.. (partially implemented in r35456, also see testprogs/VDC/vdctiming)<br />
** Differences between 8563 and 8568 are not all emulated, eg. register 38<br />
* Clock calculation for lightpen is incorrect (?)<br />
* Can't resize the screen enough to fit all video modes, e.g. vdcmodemania high resolution modes. Aspect ratio needs to change on the fly too.<br />
* Screen position is not always correct, e.g. vdcmodemania FLI parts<br />
<br />
====VIC====<br />
<br />
* Idle fetch (or the lack of it) needs investigation<br />
* "Screen mixup" is not emulated<br />
* COLS=0 can lead to negative width in raster/ causing segfaults if not checked for in archdep video code<br />
* NTSC bugs:<br />
** raster line register values are incorrect near the end of frame (see testprogs/VIC20/split-tests/lightpen)<br />
** lightpen values are off (see testprogs/VIC20/split-tests/lightpen, http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=4870 )<br />
** some glitches when XPOS is 0, breaks (at least) Vicual MMIX credits part (http://www.cs.tut.fi/~albert/Pu-239/vicual-mmix/)<br />
<br />
====VIC-II====<br />
<br />
* the handling of MCBASE at power-on is incorrect (see testprogs/VICII/spritemcbase)<br />
*: note: this should only be visible directly after power-cycle on a 6569<br />
* DMA delay artifacts are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325466&group_id=223021&atid=1057617 )<br />
* Sprite fetch bugs in sideborder are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325426&group_id=223021&atid=1057617 )<br />
* DMA delay does not affect idle byte correctly [https://sourceforge.net/p/vice-emu/bugs/1855/ bug#1855]<br />
* 6569R1 sprite oddity at X-position $163 is not emulated correctly [https://sourceforge.net/p/vice-emu/bugs/1857/ bug #1857]<br />
<br />
====VIC-IIe====<br />
<br />
* The test bit is not emulated, which results in things like 'real interlace' ([http://sites.google.com/site/h2obsession/CBM/C128/Interlace]) and the $D030 new VIC-IIe color palette hack ([http://www.commodore128.org/index.php?topic=3665.0]) not working.<br />
<br />
====t6721a====<br />
<br />
* 48bit frames support is incorrect/broken<br />
* synthesizer condition 2 loss-effect-, shape- and repeat- bits have no effect<br />
* reading from the speach rom is not emulated (which is not really an issue since neither magic voice nor v364 have one)<br />
<br />
====mc6821====<br />
<br />
* interrupts are not implemented<br />
* implementation of C2 output modes is incomplete<br />
<br />
====RIOT====<br />
<br />
* I/O "peek" function is broken<br />
<br />
----<br />
<br />
===Machines===<br />
<br />
====x64sc====<br />
<br />
Note: [[x64_Bugs|x64]] is deprecated.<br />
<br />
=====general=====<br />
<br />
* some C64 models are not emulated 100% correctly (for details see [[C64models]])<br />
** the memory layout for "Max Machine" is not yet correct<br />
** when SX-64 is selected, the tick for the CIA TOD clocks should always be 60Hz (regardless of PAL/NTSC)<br />
** The Japanese C64 has "C= lock" instead of "Shift Lock" (the keyboard is physically different)<br />
<br />
=====Cartridge System=====<br />
<br />
''note: the detailed todo list/status is [[cartsystem|here]].''<br />
<br />
* some carts have no snapshot support yet (still broken: Magic Voice, MMC Replay, RR-Net MK3, Ethernet.)<br />
** IDE64 & ATA system can only handle "readonly" snapshots now. Somehow the image file must be matched to the snapshot to prevent corruption.<br />
** MMC64 snapshots do not include the SD-card<br />
* some carts do not work 100% yet (still broken: Magic Voice, MMC Replay.)<br />
** Magic Voice: emulation of the speech chip is incomplete (see [[Todo#t6721a]]), this breaks some words included in the magic voice rom and the "a-bee-c" cartridge. Memory mapping is incomplete/broken (which however affects no known software/testcase).<br />
** MMC Replay: only the BIOS mode works right now; the monitor may incorrectly access cartridge memory (even) if "bank cart" is explicitly set<br />
* the (very strange, and incompatible with most cartridges) passthrough port of the SFX sound expander is not emulated<br />
* various cartridges have no support for verbose i/o dump in the monitor<br />
* Passthrough port functionality depends on ordering of cartridge attaches, especially visible from the command line. (e.g. MMC64+RR ok, RR+MMC64 not)<br />
* '''TODO:''' IDE64 is missing a "make HD image read only" resource<br />
* '''TODO:''' IDE64 saves its config data into vicerc - it should use a bin image like every other cartridge<br />
<br />
----<br />
====x128====<br />
<br />
* Support for fast mode (2MHz) is implemented but incomplete, detailed information about the stealing of cycles by the VICII when switching back from fast mode is missing and therefor the emulation of it is incorrect.<br />
* support for c128 specific expansion port handling/mapping is missing in the c64/c128 cartridge system (MMC Replay, FastLoad128, MACH128, other?)<br />
* the relative speed and details like cycle-stealing of the z80 is inaccurate ( https://sourceforge.net/tracker/?func=detail&aid=3476760&group_id=223021&atid=1057617 )<br />
: xmx provided a test program, see testprogs/c128/z80/cycletimer<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6510 "sc" core<br />
<br />
----<br />
====xvic====<br />
<br />
* programs that do not work for unknown reason:<br />
** "Grave Cave" ( https://sourceforge.net/tracker/?func=detail&aid=3297561&group_id=223021&atid=1057617 )<br />
* the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
* xvic does not use iecbus/iecbus.c, which is why "IEC Device" stuff does not work with it<br />
<br />
===== Cartridge System =====<br />
<br />
* cartridge_get_info_list is not implemented<br />
* CRT/BIN saver are missing<br />
** writeback with crt file is not implemented<br />
** GUI elements for "save cartridge" are missing<br />
<br />
----<br />
====x64dtv====<br />
<big>The DTV emulator is very inaccurate and is in need of a partial rewrite. Maintainer wanted!</big><br />
<br />
* Misery 3: (http://noname.c64.org/csdb/release/?id=83196)<br />
** fails emudetect<br />
** plasma part is missing badlines<br />
* switching VICII border mode resets x64dtv ( https://sourceforge.net/tracker/?func=detail&aid=3004255&group_id=223021&atid=1057620 )<br />
* CPU history (chist) implementation is incomplete<br />
* the "PS/2 Mouse at Userport" should get refactored to be a regular Userport device in the common Userport system<br />
* "enable Userport Joystick" vs "Hummer Userport Joystick" is strange and confusing, especially since in the DTV emulator we dont even have a "UserportJoyType" selection. the regular "DTV Joystick on Userport" should become a regular Userport device.<br />
<br />
----<br />
====xplus4====<br />
<big>The plus4 emulator is generally work in progress and not yet "ready". Maintainer wanted!</big><br />
* support for Snapshots is incomplete/broken (TED, PIA, V364 Speech, ...) ( https://sourceforge.net/tracker/?func=detail&aid=2878220&group_id=223021&atid=1057617 )<br />
* emulation of the V364 speech chip is incomplete (see [[Todo#t6721a]])<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
=====Cartridge System=====<br />
* handling of the c0/c1/c2 roms is weak<br />
** cartridges share the same roms as internal roms<br />
** roms are not removed from the memory map if not present (just cleared)<br />
* "mmu" memory translation table handling is not implemented for cartridges<br />
* snapshot implementations are completely untested<br />
* .crt support is missing<br />
<br />
----<br />
====xcbm2====<br />
<br />
* The CBM-II emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture<br />
* when running the burn-in diagnostic tests, the CIA is reported as bad ( https://sourceforge.net/tracker/?func=detail&aid=3102493&group_id=223021&atid=1057617 )<br />
: ''note: run like this: xcbm2 -model 610 -ntsc -drive8type 8050 -virtualdev +truedrive -8 cbm2-burnin.d80''<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xcbm5x0====<br />
* The emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture.<br />
* In the C510 emulation the VIC-II timing is not exact, i.e. the stopping of the CPU during bad lines is wrong.<br />
* The C510 emulation uses the old VIC-II core which means no cycle exact sprite collisions, no inline gfx changes, and probably more. See [[x64_Bugs|here]] for details.<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xpet====<br />
* When running the "8296d diagnostic" test of the 8296 system disk on "xpet -model 8296" some tests fail:<br />
** when TDE is enabled, the program will hang. when TDE is disabled, the IEEE interface status will be reported as bad<br />
** the userport is reported as bad (perhaps some dongle is needed?)<br />
: ''note: run like this: "xpet -model 8296 -drive8type 8050 -8 8296d-systemdisk.d82 -editor edit-4-80-b-50Hz.901474-04.bin". the "burnin8296" program seems to be an older version of the "8296d diagnostic" program. it runs when TDE is enabled, but the 50Hz irq test fails.''<br />
* some combinations of selected keymap and keyboard model do not work because of missing keymaps<br />
** also the keymaps must match the "editor" ROM - currently only the UK (Business) ROM in included in VICE<br />
** the keymaps for US (host) keymap need to be checked and fixed<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
<br />
----<br />
===SC Rewrites===<br />
<br />
As a long term goal, everything should be rewritten to use the new "sc" cpu cores (and the non sc cores removed):<br />
<br />
* Migrate emulators to the cycle based CPU core (6510dtvcore.c, should be renamed), which allows:<br />
** cycle based hooks for complex hardware expansions (SCPU)<br />
** in-line graphics data change emulation (see testprogs/VICII/gfxfetch)<br />
** cycle exact Blitter/DMA vblank start and proper LinearA/B counter handling on x64dtv<br />
** cycle based drawing<br />
* ...and requires (at least):<br />
** rewrite video chip modules to use:<br />
*** cycle based fetch/etc (VIC & VICII done, VICII-DTV in progress)<br />
*** cycle based drawing (VICII done)<br />
** remove 1 clock write offsets (at least CIA/VIA already handled)<br />
** an insane amount of regression testing (preferably with new testprogs where needed)<br />
<br />
----<br />
<br />
== Tools ==<br />
=== c1541 ===<br />
<br />
* handling of .d81 CBM sub partitions and CMD DIR subdirectories is broken due to the way disk images are handled.<br />
** accessing files does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367519&group_id=223021&atid=1057617 )<br />
** listing directories does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367517&group_id=223021&atid=1057617 )<br />
: ''unfortunately to fix this a lot of c1541 will have to be rewritten (mount image only once, not for each operation)'' [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 23:57, 13 December 2012 (UTC)<br />
* since virtual drive emulation does not support REL files on the host filesystem, c1541 can not extract them to R00 files ( https://sourceforge.net/p/vice-emu/bugs/702/ )<br />
<br />
* <s>Remove optional dependency on libreadline once linenoise-ng has been tested properly.</s><br />
:: See if linenoise-ng can be made to work with the MSYS2 shell, which would help with debugging c1541.<br />
<br />
----<br />
==Ports==<br />
<br />
Some of the mess isn't ours! See here for [[Upstream bugs]].<br />
<br />
===archdep===<br />
<br />
* '''TODO:''' allow browsing of archives (zip etc) ( https://sourceforge.net/tracker/index.php?func=detail&aid=2942868&group_id=223021&atid=1057620 )<br />
<br />
====Windows====<br />
<br />
* '''TODO:''' the native (console based) monitor does not work in windows<br />
<br />
----<br />
<br />
===GTK3 UI===<br />
<br />
This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: <code>grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`</code>, and be amazed.<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''TODO:''' Add support for non-ASCII characters in the various file/path dialogs (snapshot, maybe even the various cartridge image/eeprom paths and the machine/drive ROM paths) (fixed?)<br />
<br />
The list of covered resources is [[Gtk3_Resource_Coverage|here]]<br />
<br />
==== Main window(s) ====<br />
<br />
* '''TODO:''' make sure both hard- and software rendering match whats described in [[Scaling_cleanup]] - if so, the page can be cleaned out<br />
:: Implemented, but only for a single display, no multi-display support yet. GDK seem to support multi-display setup querying, but we'd actually have to write code and test this to see how GDK handles this, if at all. (fixed?)<br />
** do not forget the VDC and the Monitor windows (fixed?)<br />
:: VDC is handled, the monitor windows isn't, there aren't any resource for the monitor window, nor any event handlers. Another wish seems to be to put the VICII and VDC window next to each other for x128, which will probably mean introducing yet another resource to control this and override the Window1* resources. Probably some enum: USE_WINDOW1* = -1, ABOVE, BELOW, LEFT, RIGHT. And hope the Window Manager actually listens to our requests to move said window.<br />
<br />
* '''BUG:''' mouse grab (when mouse emulation is enabled) is not perfect. eg when the emulator is started with mouse enabled, the pointer is not initially moved into the emulator window.<br />
<br />
==== Statusbar ====<br />
<br />
* '''BUG:''' On MacOS and Windows, the slider popup widget is hidden behind the rendered canvas, on Linux this works as it should. So currently the volume widget is disabled on MacOS and Windows<br />
<br />
==== Dialogs ====<br />
* '''TODO''': Polish the keyset dialog: <s>at there very least split the UI into a 3x3 grid for the directions and a 4x2 grid for the fire buttons</s>. Maybe use icons for the direction if they're in the default Gtk icon set.<br />
:: Only arrow icons for North, West, South and East are available. Gtk3 used to have a [https://docs.gtk.org/gtk3/class.Arrow.html GtkArrow] class, but that has been deprecated since 3.14 and removed from 4.x. So we'll have to write our own (which should also prove useful for joystick mapping widgets).<br />
<br />
==== Settings ====<br />
<br />
* '''TODO:''' HardSID settings are missing<br />
<br />
=====ROMsets=====<br />
<br />
* a generic function should be created which scans the data directory of the emulator and returns a list of all .vrs files for the UI<br />
** then the UI can use said list in a dropdown list for quick selection<br />
<br />
* '''TODO:''' ROM-set manager/settings need to be reworked and fixed. ROMset "archives" should be removed completely. see [[#ROMsets]]<br />
<br />
===== CBM2 model (xcbm2/xcbm5x0) =====<br />
<br />
* '''TODO:''' Check model settings glue logic.<br />
:: Mostly works, the 50/60Hz switch is a problem. I'll need someone with some actual CBM-II knowledge to help me out here. [[User:Compyx|Compyx]] 2020-01-08<br />
<br />
===== Joysticks =====<br />
<br />
see [[Joymappings]]<br />
<br />
==== vsid ====<br />
<br />
* '''BUG:''' Fix drag-n-drop behaviour, dragging multiple SID files onto the playlist widget works, but on Linux at least, dropping a SID file on the STIL view widget doesn't work (specifically the GtkTextView), this works on Windows oddly enough.<br />
<br />
* <s>'''TODO:''' Implement "goto-next-SID" when having SLDB support enabled.</s> ('''added in trunk''')<br />
<br />
* '''BUG:''' STIL view: some tunes (for example Last Ninja 2) print empty "tune #x" entries, so you'll get "Tune #1" in blue and a few empty lines, in the case of LN2 this goes on until tune #6. Most likely a bug in the use of hvsclib, not the lib itself.<br />
<br />
* '''TODO:'''Playlist: allow keyboard navigation. Perhaps also multi-select via Ctrl or Shift to delete multiple entries?<br />
<br />
* <s>Implement a playlist for VSID (partly done)</s> ('''added in trunk''': VSID playlists use the <tt>m3u</tt> format and can be created, edited, loaded and saved.)<br />
<br />
* Add some sort of tree-based file browser (preferably using the HVSC as the default dir) to allow quick tune selection and help with building a playlist (ie via drag-n-drop)<br />
<br />
* Add HVSC BUGlist support to VSID<br />
:: Support for this is available in src/hvsc, but there are very few actual entries in the BUGList.txt file. Maybe skip this one?<br />
<br />
==== Monitor ====<br />
<br />
The GUI based monitor currently uses a mercylessly hacked VTE library. When we looked for a way to put the monitor into a console window that works with GTK3, this seemed to be the only way to do it. The ugly hacks were required to make VTE compile and work on windows. This is also why we cant use a more modern version of the VTE library.<br />
<br />
* '''TODO:''' On the long run, we will have to write a custom renderer for a monitor window, which supports all the things we need to implement a classic "fullscreen editor" like ml monitor.<br />
* '''TODO:''' Again as a long term goal, we might want to support transparent support for native charsets<br />
<br />
for some info on the monitor ui see: [[MonitorUI]].<br />
<br />
==== macOS ====<br />
<br />
* '''TODO:''' joystick_ui_get_next_device_name should return the detected joysticks instead of the predefined list (fixed?)<br />
<br />
* '''TODO:''' Make the GTK UI create/use the macOS style "top menubar"<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
<br />
==== OpenGL ====<br />
* '''TODO:''' The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (fixed?)<br />
** Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing.<br />
* '''TODO:''' Do-not-scale option. Important for Cairo renderer, possible for OpenGL.<br />
<br />
==== Stretch goals ====<br />
<br />
* Make 'smart cartridge attach' dialog smarter when attaching .bin images, show only valid cartridge types when selecting a cart image.<br />
** '''TODO''': this needs a new API call that returns the valid sizes for a given type<br />
* make an option to force display size to 1x/2x/3x/4x<br />
* make a GUI based editor for keymaps<br />
* add statusbar indicators for cartridge LEDs.<br />
<br />
----<br />
<br />
===SDL UI===<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''BUG:''' FFmpeg media recording behaves unexpected when entering the menu [https://sourceforge.net/p/vice-emu/bugs/898/]<br />
* '''TODO''': get rid of fullscreenarch.h and fullscreen.c - its no more required because SDL can do all of the features fine.<br />
<br />
====Menus====<br />
* '''TODO:''' some menu items need status text to show that the action has been done.<br />
** Drive>Fliplist settings>Add current image to fliplist<br />
** Drive>Fliplist settings>Remove current image from fliplist<br />
** Drive>Fliplist settings>Attach next image in fliplist<br />
** Drive>Fliplist settings>Attach previous image in fliplist<br />
* '''BUG:''' at a lot of places "inactive" (as in "cant be selected") menu items are missing the "N/A" on the right<br />
* '''TODO:''' A better way of showing filenames (maybe using contraction) needs to be made<br />
<br />
====Datasette====<br />
<br />
*'''TODO:''' add menu items for "Reset datasette counter" (UI action handlers have been added in the "compyx/sdl-uiactions" branch)<br />
<br />
====Joysticks====<br />
<br />
see [[Joymappings]]<br />
<br />
====Monitor====<br />
* '''TODO:''' implement a scrollback buffer<br />
<br />
====File Selector====<br />
* '''TODO:''' add filtering in file requester<br />
<br />
====Virtual Keyboard====<br />
* '''TODO:''' shift/cbm/ctrl should be "sticky" (right now shifted keys are entered using backspace/cancel - which is odd)<br />
* '''TODO:''' the virtual keyboard handling of the SDL port must be updated/fixed to support all PET keyboards<br />
<br />
==== VSID ====<br />
* '''TODO:''' Implement a playlist for VSID<br />
* '''TODO:''' Add HVSC song length database (SLDB) support to VSID (<s>both .txt and</s> .md5 file format)<br />
* '''TODO:''' Add HVSC sid tune information list (STIL) support to VSID<br />
* '''TODO:''' Add HVSC BUGlist support to VSID<br />
<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Todo&diff=6125Todo2023-11-11T18:55:48Z<p>Compyx: /* Dialogs */</p>
<hr />
<div><br />
This is the list of known problems. also look at [https://sourceforge.net/tracker/?limit=100&func=&group_id=223021&atid=1057617&assignee=&status=4&category=&artgroup=&keyword=&submitter=&artifact_id=&assignee=&status=1&category=&artgroup=&submitter=&keyword=&artifact_id=&submit=Filter&mass_category=&mass_priority=&mass_resolution=&mass_assignee=&mass_artgroup=&mass_status=&mass_cannedresponse= Tracker: open Bugs]<br />
<br />
This list always refers to the status of the last major release version, which was '''3.7'''. Items that have been fixed by the time of a major release will be removed, items fixed after that will be marked as fixed and stay until the next major version. New items will be added as noticed.<br />
<br />
==Prime Directive==<br />
<br />
* '''All developers shall subscribe to the [https://sourceforge.net/p/vice-emu/mailman/ vice-emu-mail mailinglist]''' and perhaps join #vice-dev on freenode too (highly recommended).<br />
* Please '''respect the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/doc/coding-guidelines.txt coding guidelines]'''.<br />
* '''Document your code''' so other people than you are able to understand and fix it in a decade or two.<br />
* When adding/changing stuff that needs (G)UI items/changes, '''all developers should update the SDL and GTK3 UIs themselves''', and immediately following their respective changes.<br />
* When adding/changing command-line options and/or resources, adding a new feature or change the behavior of an existing feature, '''please update the documentation'''.<br />
* After fixing a bug or implementing a new feature, '''update''' its status on '''the [https://sourceforge.net/tracker/?limit=50&group_id=223021&atid=1057617&status=1&submit=Filter Bug Tracker] and''' mark it as fixed in '''the TODO list''' below.<br />
:: Only remove a bug/feature from this list when it was fixed/implemented in the latest stable release.<br />
* And most importantly...<br />
<pre><br />
<@_tlr> Please at least test the issue you were trying to fix before committing.<br />
</pre><br />
: That means: '''you break it, you fix it.''' Do not commit deal breaking changes without communicating it with the rest of the team. '''Generally regressions are not acceptable and respective commits are subject to be reverted.'''<br />
<br />
==Code cleanup and streamlining==<br />
<br />
* remove compiler- and platform- specific hacks (IFDEFS) in common code<br />
$ ./src/findhacks.sh ccarchdep<br />
$ ./src/findhacks.sh archdep<br />
<br />
* <s>replace readline and our fallback implementation with linenoise (https://github.com/antirez/linenoise), or perhaps linenoise-ng (https://github.com/arangodb/linenoise-ng) which appears to support Windows and UTF-8.</s><br />
** write a C <-> C++ wrapper for completions with linenoise-ng, so we can also drop linenoise (non-ng).<br />
<br />
==Documentation==<br />
===Technical===<br />
* many nodes are not yet linked correctly, which makes some of the exporters output garbled and/or suboptimal output (unix .info).<br />
<br />
: '''Workaround:''' use the .html or .pdf documentation, which is exported correctly.<br />
<br />
===Content===<br />
The documentation is partly outdated and/or incomplete, in particular:<br />
<br />
* some descriptions of emulator formats are missing (D67, D1M, D2M, D4M...)<br />
* descriptions of several snapshot modules are missing (Plus4, TED...)<br />
<br />
for details look at doc/Documentation-Howto.txt<br />
<br />
==Testbench==<br />
<br />
* many test programs (mostly for vic20) are not yet integrated into the automatic testing<br />
* '''TODO''': fix the reference screenshots and/or the scripts so they dont rely on the "normal" rendering mode anymore<br />
* '''TODO''': make a test program to determine visible screen dimensions<br />
* '''TODO''': make a test program to determine the type of delay line used for a PAL screen (UV or U only)<br />
=== autostart problems ===<br />
<br />
* x128 does not autostart prg files correctly when also a cartridge is attached (that forces c64 mode)<br />
<br />
==Emulators==<br />
<br />
===Subsystems===<br />
<br />
====Keyboard====<br />
<br />
* When a key which is shifted on the real machine but unshifted on the PC or Unix keyboard you are using is pressed, the virtual shift is pressed together (i.e. at the same clock cycle) with the main key; this could not work with some keyboard routines.<br />
<br />
: '''Workaround''': If you have to use the function keys, press the (real) shift key manually (e.g. F2 = Shift + F1, F4 = Shift + F3 and so on); this also works with other keys. In any case, using a positional keymap will remove much of this problem.<br />
<br />
* Some ports/emulators/keyboard-types do not have all required keymaps (and a fallback will used) - look at [[Keymaps]] for details<br />
<br />
* Although "shift lock" can be mapped to a key, not all ports and/or emulators support it due to missing keymaps and/or implementation details.<br />
: '''TODO''': check ports and fix or at least add a comment in the keymaps<br />
<br />
* contact-bounce is not emulated <br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick====<br />
<br />
WIP [[Joymappings]]<br />
<br />
* contact-bounce is not emulated<br />
: '''TODO''': make a proper test program<br />
<br />
====Joystick port devices====<br />
<br />
* Paperclip 64 dongle emulation is broken<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
<br />
====Userport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in userport.h)<br />
<br />
====Tapeport devices====<br />
<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
<br />
====Monitor====<br />
<br />
* TODO: Breakpoints/watchpoints should consider banks, and perhaps PLA/MMU config<br />
* banking should somehow work also with cartridges. for this some generic interface in the cartridge system needs to be created<br />
<br />
===== Profiler =====<br />
<br />
The new profiler feature is still incomplete ( https://sourceforge.net/p/vice-emu/patches/350/ )<br />
<br />
* support for banking (main CPU) is only implemented in x64(sc) right now<br />
** banking should somehow consider cartridge banks, once we have generic support for it in the monitor<br />
* perhaps additional stats for "stolen cycles" (cycles used by the VICII) can be added<br />
* branch taken / not taken statistics<br />
* support for drive CPUs is missing<br />
* support for other CPUs than 6502 is missing<br />
* binary remote monitor commands need to be implemented (perhaps once more of the above works, so we know how these must look like)<br />
<br />
===== Binary Interface =====<br />
<br />
The binary interface has a few design issues that should be fixed<br />
<br />
* Command 0x84 (get display) has several issues:<br />
** The first parameter should probably not be a boolean ("is this VICII?"), but "videochip number", with 0 being VICII and 1 being VDC on C128. Further Videochips could be added then (eg if we ever implement the BTX cartridge). Perhaps for compatibility reasons we start counting at 1, and make "0" a special parameter for "current one" '''I'm not sure what to do with this so I'm leaving it alone for the time being.'''<br />
<br />
Also, the Documentation has some issues:<br />
<br />
* At some places it uses &foo and *bar to refer to "length" and a block of data(?). This is really weird and should be removed / replaced by something that is more clear.<br />
<br />
Last not least the binmontest program needs cleanup, so it can serve as an example program:<br />
<br />
* Magic values are used for offsets at various places. It should use constants instead. Ideally, a common header file is used for both the test-program and the VICE code itself<br />
* More comments are needed in place of the various checks<br />
<br />
====History Recording====<br />
<br />
* history recording currently breaks on a lot of user actions, such as using autostart or attaching a cartridge.<br />
: '''Workaround''': make sure to start up with a bog standard c64, and then load/run the program in question manually<br />
* recording/playing back histories was broken in 2.2 ( https://sourceforge.net/tracker/?func=detail&aid=2925410&group_id=223021&atid=1057617 )<br />
note: since history recording is very error prone and hard to debug, we depend on feedback (on either failure or success) on this topic very much. if you still have problems with the current release, please report them including testcases.<br />
<br />
====Screenshots / Media Recording====<br />
* Screenshots with activated video filter (CRT emulation / Scale2x) do not deliver the expected (filtered) result.<br />
<br />
====Rendering====<br />
<br />
* some things are still shared by videochips although they shouldnt be, resulting in conflicts for eg the color generation (visible in x128 in ports that show two windows at a time, when crt emulation is enabled, eg adjusting brightness affects also the other window)<br />
* '''TODO''' add a 4:3 fixed aspect ratio scaling mode<br />
* '''TODO''' when a test program has been written, adjust the "normal" border mode accordingly (CAUTION: fix testsuite first)<br />
* '''TODO''' put all border mode parameters into arrays, make a global function to query the parameters and modes (for UIs) and then add "TV" mode (like "normal", but not centered)<br />
<br />
=====CRT Emulation=====<br />
<br />
* the rf-modulator output characteristics are not emulated, which means the so called "black bleeding" effect does not work (emusux0r, http://www.csdb.dk/release/?id=81780)<br />
* artefact color and luma/chroma crosstalk are not emulated (eg the "red/green stripes")<br />
<br />
see http://hitmen.c02.at/temp/palstuff/ for some further info on this topic.<br />
<br />
====Drive Emulation====<br />
<br />
* G64 image support is incomplete, the speedzone definitions are completely ignored<br />
: ''Note: this is no problem in practise, so far not a single title (game) could be located that would actually require this kind of support to work''. Incase you find a program that needs this kind of support, please let us know.<br />
* RPM and Wobble settings have currently no effect when P64 images are used<br />
<br />
=====virtual Devices=====<br />
<br />
* handling of CBM style sub partitions is incomplete, write operations on sub partitions may give unexpected results.<br />
* RELative files are only supported when using disk images ( https://sourceforge.net/p/vice-emu/bugs/703/ )<br />
* support for double sided disk images is very shaky, since no concept of disk sides exists and the tracks on the second side are referenced by an offset into the image, the handling of images with different number of tracks is needlessly hard and complicated (and thus broken).<br />
* the IEEE machines use the "virtual devices" for something slightly different than the IEC machines, for the IEEE machines its more like what "IEC Device" means for the IEC machines. This should be handled with a seperate resource similar to "IEC Device" in the other emulators.<br />
<br />
=====True Drive Emulation=====<br />
* serial timing latency is not implemented. due to their physical properties, it takes about half a cycle for a value to show up at the respective output pin after it has been written to the register. and respectivly, it takes about half a cycle from changing an input pin until the value in the respective register changes.<br />
* mechanical delays (such as head stepping and motor spinup) are not emulated yet.<br />
* accessing device #7 on the IEC bus works (only real devices), but it only works if True Drive Emulation is OFF, even though this has nothing to do with drives. This needs to be fixed in TDE somehow.<br />
: generally the way device #7 is implemented as a special case that is different to devices 4-6 is questionable and should be made the same<br />
======1571======<br />
* 2mhz mode of the 1571 is not handled correctly<br />
** drive CPUs always run at 1Mhz for all drives (hardcoded 1000000 at a few places)<br />
** 1571 has extra delay on on reading sync inside the drive, ("you cannot use BVC in 2mhz mode!")<br />
* 1571CR (MOS5710) emulation is incomplete<br />
** extra FDC2 registers are not implemented<br />
* double sided 1571 images do not work correctly<br />
** regular (70 tracks) vs extended (80 or 84 tracks) d71 images are not handled at all (vdrive problem)<br />
** creating (formatting) G71 does not work correctly, the second BAM block will be wrong (vdrive problem)<br />
** double sided P64 can be used, but can not be created from within VICE (see patch #122, r32586). since these are non existant "in the wild" and probably not needed for anything - not a big problem :) to handle this properly, a seperate image format should get created (at least internally)<br />
<br />
=====Extensions=====<br />
* when using dolphin dos 3 emulation, the state of the mc6821 is not saved to/restored from snapshots<br />
* when using supercard+ emulation, the optional additional index hole sensor (for the IHS nibbler) is not emulated<br />
=====Drive Noise=====<br />
* since the current implementation is a very simple sample player, things like "drive composer" will not work<br />
<br />
====Datasette Emulation====<br />
<br />
* unlike with a real datasette, the emulated counter will stop counting when no tape/image is present<br />
* when a t64 image is attached, the datasette status will incorrectly say "no image".<br />
: ''Note: since t64 is currently only accessable via kernal traps, the datasette emulation actually treats this case as if no image is present. The respective code must be updated so the datasette emulation actually "knows" about when t64 is in use.''<br />
* motor noise is not emulated<br />
<br />
====Tape port devices====<br />
<br />
* DTL Basic Dongle emulation is broken<br />
<br />
====Printer Emulation====<br />
<br />
* not really a bug: the printer output file is always created in the current working directory. ( https://sourceforge.net/tracker/?func=detail&aid=3305650&group_id=223021&atid=1057617 )<br />
: ''there perhaps should be a way to explicitly set a directory for printer output files'' [[User:Gpz|Gpz]] 01:24, 4 July 2011 (UTC)<br />
* printer noise is not emulated<br />
<br />
====RS232====<br />
<br />
* the RING signal is not emulated (there is exactly one code path where it appears to be handled - a) windows b) userport c) physical rs232 port)<br />
** an "invert" option for this is needed too<br />
<br />
----<br />
<br />
===Cores===<br />
<br />
{| class="wikitable"<br />
! Core !! used in !!<br />
|-<br />
| VIA || VIC20, PET, various drives ||<br />
|-<br />
| CIA || C64, C128, 1570/71 ||<br />
|-<br />
| SID || C64, C128, CBM2, (VIC20, PLUS4, PET: SID cart) ||<br />
|-<br />
| TED || Plus4 || snapshots are broken<br />
|-<br />
| VDC || C128 || snapshots are broken<br />
|-<br />
| VIC || VIC-20 ||<br />
|-<br />
| VIC-II || C64, CBM2 ||<br />
|-<br />
| VIC-IIe || C128 ||<br />
|-<br />
| t6721a || Magic Voice, Plus4 (V364) || snapshot support is missing<br />
|-<br />
| mc6821 || Formel64, Magic Formel, Dolphin-DOS 3 ||<br />
|-<br />
| CS8900a || RR-Net/TFE || snapshot support is missing<br />
|-<br />
| RIOT || 2040/3040/4040/1001/8050/8250 ||<br />
|-<br />
| PC8477/DP8473 || FD4000/FD2000 ||<br />
|-<br />
| WD1770 || 1570/1571/1581 ||<br />
|-<br />
| ACIA (6551)|| Swiftlink ||<br />
|-<br />
| spi-sdcard || MMC64, MMC Replay || snapshot support is missing<br />
|-<br />
| ser-eeprom || MMC Replay || snapshot support is missing<br />
|-<br />
| midi || C64, VIC-20 || snapshot support is missing<br />
|}<br />
<br />
====VIA====<br />
<br />
* MYVIA_NEED_LATCHING option is possibly broken, but in any case untested<br />
* the code doesn't actually notify anything outside the chip when PB7 toggles<br />
** Same so far for the output from the shift register and its handshaking<br />
<br />
====CIA====<br />
<br />
* the case when CIA1 port A and port B are both in output mode, port A outputs low, port B outputs high, both are connected via the keyboard matrix and a value is read from port B is not handled correctly ( testprogs/CIA/ciaports ; http://noname.c64.org/csdb/release/?id=5375 ) (has been improved but is not perfect)<br />
* the various analog side effects that must be considered when pressing two or more keys are not emulated correctly, so this will currently not produce the correct results in some corner cases.<br />
* Shift Register IRQ triggers one cycle too early (see [http://sourceforge.net/p/vice-emu/bugs/599/ this] bug)<br />
<br />
====SID====<br />
<br />
* POTX/POTY sampling jitter is not emulated<br />
* only one mouse or pair of paddles can be emulated at a time<br />
<br />
====TED====<br />
<br />
* FLI does not work ( https://sourceforge.net/tracker/?func=detail&aid=3205787&group_id=223021&atid=1057617 )<br />
<br />
====VDC====<br />
<br />
* Some basic features of the VDC are missing:<br />
** Registers 34/35 (horizontal blanking position) not implemented<br />
** $d600 bit 7 STATUS flag is only approximately implemented. Fixing requires emulating the internal timing of the VDC.. (partially implemented in r35456, also see testprogs/VDC/vdctiming)<br />
** Differences between 8563 and 8568 are not all emulated, eg. register 38<br />
* Clock calculation for lightpen is incorrect (?)<br />
* Can't resize the screen enough to fit all video modes, e.g. vdcmodemania high resolution modes. Aspect ratio needs to change on the fly too.<br />
* Screen position is not always correct, e.g. vdcmodemania FLI parts<br />
<br />
====VIC====<br />
<br />
* Idle fetch (or the lack of it) needs investigation<br />
* "Screen mixup" is not emulated<br />
* COLS=0 can lead to negative width in raster/ causing segfaults if not checked for in archdep video code<br />
* NTSC bugs:<br />
** raster line register values are incorrect near the end of frame (see testprogs/VIC20/split-tests/lightpen)<br />
** lightpen values are off (see testprogs/VIC20/split-tests/lightpen, http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=4870 )<br />
** some glitches when XPOS is 0, breaks (at least) Vicual MMIX credits part (http://www.cs.tut.fi/~albert/Pu-239/vicual-mmix/)<br />
<br />
====VIC-II====<br />
<br />
* the handling of MCBASE at power-on is incorrect (see testprogs/VICII/spritemcbase)<br />
*: note: this should only be visible directly after power-cycle on a 6569<br />
* DMA delay artifacts are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325466&group_id=223021&atid=1057617 )<br />
* Sprite fetch bugs in sideborder are not emulated correctly ( https://sourceforge.net/tracker/?func=detail&aid=3325426&group_id=223021&atid=1057617 )<br />
* DMA delay does not affect idle byte correctly [https://sourceforge.net/p/vice-emu/bugs/1855/ bug#1855]<br />
* 6569R1 sprite oddity at X-position $163 is not emulated correctly [https://sourceforge.net/p/vice-emu/bugs/1857/ bug #1857]<br />
<br />
====VIC-IIe====<br />
<br />
* The test bit is not emulated, which results in things like 'real interlace' ([http://sites.google.com/site/h2obsession/CBM/C128/Interlace]) and the $D030 new VIC-IIe color palette hack ([http://www.commodore128.org/index.php?topic=3665.0]) not working.<br />
<br />
====t6721a====<br />
<br />
* 48bit frames support is incorrect/broken<br />
* synthesizer condition 2 loss-effect-, shape- and repeat- bits have no effect<br />
* reading from the speach rom is not emulated (which is not really an issue since neither magic voice nor v364 have one)<br />
<br />
====mc6821====<br />
<br />
* interrupts are not implemented<br />
* implementation of C2 output modes is incomplete<br />
<br />
====RIOT====<br />
<br />
* I/O "peek" function is broken<br />
<br />
----<br />
<br />
===Machines===<br />
<br />
====x64sc====<br />
<br />
Note: [[x64_Bugs|x64]] is deprecated.<br />
<br />
=====general=====<br />
<br />
* some C64 models are not emulated 100% correctly (for details see [[C64models]])<br />
** the memory layout for "Max Machine" is not yet correct<br />
** when SX-64 is selected, the tick for the CIA TOD clocks should always be 60Hz (regardless of PAL/NTSC)<br />
** The Japanese C64 has "C= lock" instead of "Shift Lock" (the keyboard is physically different)<br />
<br />
=====Cartridge System=====<br />
<br />
''note: the detailed todo list/status is [[cartsystem|here]].''<br />
<br />
* some carts have no snapshot support yet (still broken: Magic Voice, MMC Replay, RR-Net MK3, Ethernet.)<br />
** IDE64 & ATA system can only handle "readonly" snapshots now. Somehow the image file must be matched to the snapshot to prevent corruption.<br />
** MMC64 snapshots do not include the SD-card<br />
* some carts do not work 100% yet (still broken: Magic Voice, MMC Replay.)<br />
** Magic Voice: emulation of the speech chip is incomplete (see [[Todo#t6721a]]), this breaks some words included in the magic voice rom and the "a-bee-c" cartridge. Memory mapping is incomplete/broken (which however affects no known software/testcase).<br />
** MMC Replay: only the BIOS mode works right now; the monitor may incorrectly access cartridge memory (even) if "bank cart" is explicitly set<br />
* the (very strange, and incompatible with most cartridges) passthrough port of the SFX sound expander is not emulated<br />
* various cartridges have no support for verbose i/o dump in the monitor<br />
* Passthrough port functionality depends on ordering of cartridge attaches, especially visible from the command line. (e.g. MMC64+RR ok, RR+MMC64 not)<br />
* '''TODO:''' IDE64 is missing a "make HD image read only" resource<br />
* '''TODO:''' IDE64 saves its config data into vicerc - it should use a bin image like every other cartridge<br />
<br />
----<br />
====x128====<br />
<br />
* Support for fast mode (2MHz) is implemented but incomplete, detailed information about the stealing of cycles by the VICII when switching back from fast mode is missing and therefor the emulation of it is incorrect.<br />
* support for c128 specific expansion port handling/mapping is missing in the c64/c128 cartridge system (MMC Replay, FastLoad128, MACH128, other?)<br />
* the relative speed and details like cycle-stealing of the z80 is inaccurate ( https://sourceforge.net/tracker/?func=detail&aid=3476760&group_id=223021&atid=1057617 )<br />
: xmx provided a test program, see testprogs/c128/z80/cycletimer<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6510 "sc" core<br />
<br />
----<br />
====xvic====<br />
<br />
* programs that do not work for unknown reason:<br />
** "Grave Cave" ( https://sourceforge.net/tracker/?func=detail&aid=3297561&group_id=223021&atid=1057617 )<br />
* the naming of the VIAs in the sourcecode is mixed up, it should be VIA1 for the one at 9110 and VIA2 for the one at 9120<br />
* xvic does not use iecbus/iecbus.c, which is why "IEC Device" stuff does not work with it<br />
<br />
===== Cartridge System =====<br />
<br />
* cartridge_get_info_list is not implemented<br />
* CRT/BIN saver are missing<br />
** writeback with crt file is not implemented<br />
** GUI elements for "save cartridge" are missing<br />
<br />
----<br />
====x64dtv====<br />
<big>The DTV emulator is very inaccurate and is in need of a partial rewrite. Maintainer wanted!</big><br />
<br />
* Misery 3: (http://noname.c64.org/csdb/release/?id=83196)<br />
** fails emudetect<br />
** plasma part is missing badlines<br />
* switching VICII border mode resets x64dtv ( https://sourceforge.net/tracker/?func=detail&aid=3004255&group_id=223021&atid=1057620 )<br />
* CPU history (chist) implementation is incomplete<br />
* the "PS/2 Mouse at Userport" should get refactored to be a regular Userport device in the common Userport system<br />
* "enable Userport Joystick" vs "Hummer Userport Joystick" is strange and confusing, especially since in the DTV emulator we dont even have a "UserportJoyType" selection. the regular "DTV Joystick on Userport" should become a regular Userport device.<br />
<br />
----<br />
====xplus4====<br />
<big>The plus4 emulator is generally work in progress and not yet "ready". Maintainer wanted!</big><br />
* support for Snapshots is incomplete/broken (TED, PIA, V364 Speech, ...) ( https://sourceforge.net/tracker/?func=detail&aid=2878220&group_id=223021&atid=1057617 )<br />
* emulation of the V364 speech chip is incomplete (see [[Todo#t6721a]])<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
=====Cartridge System=====<br />
* handling of the c0/c1/c2 roms is weak<br />
** cartridges share the same roms as internal roms<br />
** roms are not removed from the memory map if not present (just cleared)<br />
* "mmu" memory translation table handling is not implemented for cartridges<br />
* snapshot implementations are completely untested<br />
* .crt support is missing<br />
<br />
----<br />
====xcbm2====<br />
<br />
* The CBM-II emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture<br />
* when running the burn-in diagnostic tests, the CIA is reported as bad ( https://sourceforge.net/tracker/?func=detail&aid=3102493&group_id=223021&atid=1057617 )<br />
: ''note: run like this: xcbm2 -model 610 -ntsc -drive8type 8050 -virtualdev +truedrive -8 cbm2-burnin.d80''<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xcbm5x0====<br />
* The emulator, when the execution bank is set to an open memory bank, sets the zeropage and stack access to unmapped, but actually existing memory. This is a bug but cannot be avoided with the current CPU code architecture.<br />
* In the C510 emulation the VIC-II timing is not exact, i.e. the stopping of the CPU during bad lines is wrong.<br />
* The C510 emulation uses the old VIC-II core which means no cycle exact sprite collisions, no inline gfx changes, and probably more. See [[x64_Bugs|here]] for details.<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
===== Cartridge System =====<br />
* not implemented yet<br />
<br />
----<br />
====xpet====<br />
* When running the "8296d diagnostic" test of the 8296 system disk on "xpet -model 8296" some tests fail:<br />
** when TDE is enabled, the program will hang. when TDE is disabled, the IEEE interface status will be reported as bad<br />
** the userport is reported as bad (perhaps some dongle is needed?)<br />
: ''note: run like this: "xpet -model 8296 -drive8type 8050 -8 8296d-systemdisk.d82 -editor edit-4-80-b-50Hz.901474-04.bin". the "burnin8296" program seems to be an older version of the "8296d diagnostic" program. it runs when TDE is enabled, but the 50Hz irq test fails.''<br />
* some combinations of selected keymap and keyboard model do not work because of missing keymaps<br />
** also the keymaps must match the "editor" ROM - currently only the UK (Business) ROM in included in VICE<br />
** the keymaps for US (host) keymap need to be checked and fixed<br />
* CPU history (chist) implementation is incomplete<br />
* should get rewritten to use the new 6502 "sc" core<br />
<br />
----<br />
===SC Rewrites===<br />
<br />
As a long term goal, everything should be rewritten to use the new "sc" cpu cores (and the non sc cores removed):<br />
<br />
* Migrate emulators to the cycle based CPU core (6510dtvcore.c, should be renamed), which allows:<br />
** cycle based hooks for complex hardware expansions (SCPU)<br />
** in-line graphics data change emulation (see testprogs/VICII/gfxfetch)<br />
** cycle exact Blitter/DMA vblank start and proper LinearA/B counter handling on x64dtv<br />
** cycle based drawing<br />
* ...and requires (at least):<br />
** rewrite video chip modules to use:<br />
*** cycle based fetch/etc (VIC & VICII done, VICII-DTV in progress)<br />
*** cycle based drawing (VICII done)<br />
** remove 1 clock write offsets (at least CIA/VIA already handled)<br />
** an insane amount of regression testing (preferably with new testprogs where needed)<br />
<br />
----<br />
<br />
== Tools ==<br />
=== c1541 ===<br />
<br />
* handling of .d81 CBM sub partitions and CMD DIR subdirectories is broken due to the way disk images are handled.<br />
** accessing files does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367519&group_id=223021&atid=1057617 )<br />
** listing directories does not work ( https://sourceforge.net/tracker/?func=detail&aid=3367517&group_id=223021&atid=1057617 )<br />
: ''unfortunately to fix this a lot of c1541 will have to be rewritten (mount image only once, not for each operation)'' [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 23:57, 13 December 2012 (UTC)<br />
* since virtual drive emulation does not support REL files on the host filesystem, c1541 can not extract them to R00 files ( https://sourceforge.net/p/vice-emu/bugs/702/ )<br />
<br />
* <s>Remove optional dependency on libreadline once linenoise-ng has been tested properly.</s><br />
:: See if linenoise-ng can be made to work with the MSYS2 shell, which would help with debugging c1541.<br />
<br />
----<br />
==Ports==<br />
<br />
Some of the mess isn't ours! See here for [[Upstream bugs]].<br />
<br />
===archdep===<br />
<br />
* '''TODO:''' allow browsing of archives (zip etc) ( https://sourceforge.net/tracker/index.php?func=detail&aid=2942868&group_id=223021&atid=1057620 )<br />
<br />
====Windows====<br />
<br />
* '''TODO:''' the native (console based) monitor does not work in windows<br />
<br />
----<br />
<br />
===GTK3 UI===<br />
<br />
This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: <code>grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`</code>, and be amazed.<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''TODO:''' Add support for non-ASCII characters in the various file/path dialogs (snapshot, maybe even the various cartridge image/eeprom paths and the machine/drive ROM paths) (fixed?)<br />
<br />
The list of covered resources is [[Gtk3_Resource_Coverage|here]]<br />
<br />
==== Main window(s) ====<br />
<br />
* '''TODO:''' make sure both hard- and software rendering match whats described in [[Scaling_cleanup]] - if so, the page can be cleaned out<br />
:: Implemented, but only for a single display, no multi-display support yet. GDK seem to support multi-display setup querying, but we'd actually have to write code and test this to see how GDK handles this, if at all. (fixed?)<br />
** do not forget the VDC and the Monitor windows (fixed?)<br />
:: VDC is handled, the monitor windows isn't, there aren't any resource for the monitor window, nor any event handlers. Another wish seems to be to put the VICII and VDC window next to each other for x128, which will probably mean introducing yet another resource to control this and override the Window1* resources. Probably some enum: USE_WINDOW1* = -1, ABOVE, BELOW, LEFT, RIGHT. And hope the Window Manager actually listens to our requests to move said window.<br />
<br />
* '''BUG:''' mouse grab (when mouse emulation is enabled) is not perfect. eg when the emulator is started with mouse enabled, the pointer is not initially moved into the emulator window.<br />
<br />
==== Statusbar ====<br />
<br />
* '''BUG:''' On MacOS and Windows, the slider popup widget is hidden behind the rendered canvas, on Linux this works as it should. So currently the volume widget is disabled on MacOS and Windows<br />
<br />
==== Dialogs ====<br />
* '''TODO''': Polish the keyset dialog: <s>at there very least split the UI into a 3x3 grid for the directions and a 4x2 grid for the fire buttons</s>. Maybe use icons for the direction if they're in the default Gtk icon set.<br />
:: Only arrow icons for North, West, South and East are available. Gtk3 used to have a [https://docs.gtk.org/gtk3/class.Arrow.html GtkArrow] class, but that has been deprecated since 3.14 and removed from 4.x. So we'll have to write our own (which should also prove useful for joystick mapping widgets).<br />
<br />
==== Settings ====<br />
<br />
* '''TODO:''' HardSID settings are missing<br />
<br />
=====ROMsets=====<br />
<br />
* a generic function should be created which scans the data directory of the emulator and returns a list of all .vrs files for the UI<br />
** then the UI can use said list in a dropdown list for quick selection<br />
<br />
* '''TODO:''' ROM-set manager/settings need to be reworked and fixed. ROMset "archives" should be removed completely. see [[#ROMsets]]<br />
<br />
===== CBM2 model (xcbm2/xcbm5x0) =====<br />
<br />
* '''TODO:''' Check model settings glue logic.<br />
:: Mostly works, the 50/60Hz switch is a problem. I'll need someone with some actual CBM-II knowledge to help me out here. [[User:Compyx|Compyx]] 2020-01-08<br />
<br />
===== Joysticks =====<br />
<br />
see [[Joymappings]]<br />
<br />
==== vsid ====<br />
<br />
* '''BUG:''' Fix drag-n-drop behaviour, dragging multiple SID files onto the playlist widget works, but on Linux at least, dropping a SID file on the STIL view widget doesn't work (specifically the GtkTextView), this works on Windows oddly enough.<br />
<br />
* '''TODO:''' Implement "goto-next-SID" when having SLDB support enabled.<br />
<br />
* '''BUG:''' STIL view: some tunes (for example Last Ninja 2) print empty "tune #x" entries, so you'll get "Tune #1" in blue and a few empty lines, in the case of LN2 this goes on until tune #6. Most likely a bug in the use of hvsclib, not the lib itself.<br />
<br />
* '''TODO:'''Playlist: allow keyboard navigation. Perhaps also multi-select via Ctrl or Shift to delete multiple entries?<br />
<br />
* Implement a playlist for VSID (partly done)<br />
<br />
* Add some sort of tree-based file browser (preferably using the HVSC as the default dir) to allow quick tune selection and help with building a playlist (ie via drag-n-drop)<br />
<br />
* Add HVSC BUGlist support to VSID<br />
:: Support for this is available in src/hvsc, but there are very few actual entries in the BUGList.txt file. Maybe skip this one?<br />
<br />
==== Monitor ====<br />
<br />
The GUI based monitor currently uses a mercylessly hacked VTE library. When we looked for a way to put the monitor into a console window that works with GTK3, this seemed to be the only way to do it. The ugly hacks were required to make VTE compile and work on windows. This is also why we cant use a more modern version of the VTE library.<br />
<br />
* '''TODO:''' On the long run, we will have to write a custom renderer for a monitor window, which supports all the things we need to implement a classic "fullscreen editor" like ml monitor.<br />
* '''TODO:''' Again as a long term goal, we might want to support transparent support for native charsets<br />
<br />
for some info on the monitor ui see: [[MonitorUI]].<br />
<br />
==== macOS ====<br />
<br />
* '''TODO:''' joystick_ui_get_next_device_name should return the detected joysticks instead of the predefined list (fixed?)<br />
<br />
* '''TODO:''' Make the GTK UI create/use the macOS style "top menubar"<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
<br />
==== OpenGL ====<br />
* '''TODO:''' The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (fixed?)<br />
** Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing.<br />
* '''TODO:''' Do-not-scale option. Important for Cairo renderer, possible for OpenGL.<br />
<br />
==== Stretch goals ====<br />
<br />
* Make 'smart cartridge attach' dialog smarter when attaching .bin images, show only valid cartridge types when selecting a cart image.<br />
** '''TODO''': this needs a new API call that returns the valid sizes for a given type<br />
* make an option to force display size to 1x/2x/3x/4x<br />
* make a GUI based editor for keymaps<br />
* add statusbar indicators for cartridge LEDs.<br />
<br />
----<br />
<br />
===SDL UI===<br />
<br />
* <b>Write documentation on how to use the UI</b><br />
* '''BUG:''' FFmpeg media recording behaves unexpected when entering the menu [https://sourceforge.net/p/vice-emu/bugs/898/]<br />
* '''TODO''': get rid of fullscreenarch.h and fullscreen.c - its no more required because SDL can do all of the features fine.<br />
<br />
====Menus====<br />
* '''TODO:''' some menu items need status text to show that the action has been done.<br />
** Drive>Fliplist settings>Add current image to fliplist<br />
** Drive>Fliplist settings>Remove current image from fliplist<br />
** Drive>Fliplist settings>Attach next image in fliplist<br />
** Drive>Fliplist settings>Attach previous image in fliplist<br />
* '''BUG:''' at a lot of places "inactive" (as in "cant be selected") menu items are missing the "N/A" on the right<br />
* '''TODO:''' A better way of showing filenames (maybe using contraction) needs to be made<br />
<br />
====Datasette====<br />
<br />
*'''TODO:''' add menu items for "Reset datasette counter" (UI action handlers have been added in the "compyx/sdl-uiactions" branch)<br />
<br />
====Joysticks====<br />
<br />
see [[Joymappings]]<br />
<br />
====Monitor====<br />
* '''TODO:''' implement a scrollback buffer<br />
<br />
====File Selector====<br />
* '''TODO:''' add filtering in file requester<br />
<br />
====Virtual Keyboard====<br />
* '''TODO:''' shift/cbm/ctrl should be "sticky" (right now shifted keys are entered using backspace/cancel - which is odd)<br />
* '''TODO:''' the virtual keyboard handling of the SDL port must be updated/fixed to support all PET keyboards<br />
<br />
==== VSID ====<br />
* '''TODO:''' Implement a playlist for VSID<br />
* '''TODO:''' Add HVSC song length database (SLDB) support to VSID (<s>both .txt and</s> .md5 file format)<br />
* '''TODO:''' Add HVSC sid tune information list (STIL) support to VSID<br />
* '''TODO:''' Add HVSC BUGlist support to VSID<br />
<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=60933.82023-11-05T07:38:00Z<p>Compyx: /* GTK UI */</p>
<hr />
<div>Things we want to do for the 3.7.2 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)<br />
<br />
* "CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* <s>TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?</s> ('''fixed in trunk''')<br />
** <s>It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)</s> ('''fixed in trunk''')<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y)<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource)<br />
:: Added in trunk, with command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>. Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* "CB2 Sound" should get an enable tickbox under "Machine" settings<br />
** not sure if this should also be a userport device<br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** cartridges that work in C64 _and_ C128 mode are not supported yet<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
**** (what else?)<br />
**** Warpspeed is basically "two cartridges in one" (with a physical switch) and is implemented as if it was two individual cartridges because of this<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
* <s>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)</s> ('''fixed in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''' for gtk3)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
* <s>WiC64 emulation is not working well (and disabled, unless experimental devices are enabled in userport.h)</s> ('''fixed in trunk''')<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
* IEEE machines have no virtual device ("device traps")<br />
* Paperclip 64 dongle emulation is broken<br />
* DTL Basic Dongle emulation is broken<br />
* Mirror/Flip X/Y and Rotate 90 degrees, should they still not be implemented at release time<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
==== Codestyle cleanup ====<br />
* Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
** <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* There should be non port specific cmdline options that set Window0Height, Window0Width etc<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|}<br />
<br />
=== Docs ===<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us<br />
** also the respective mapping files need to be checked and fixed<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
=== Data ===<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=60923.82023-11-05T07:30:12Z<p>Compyx: /* SDL UI */</p>
<hr />
<div>Things we want to do for the 3.7.2 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)<br />
<br />
* "CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)<br />
<br />
* <s>TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)</s> ('''fixed in trunk''')<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?<br />
** It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y)<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource)<br />
:: Added in trunk, with command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>. Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* "CB2 Sound" should get an enable tickbox under "Machine" settings<br />
** not sure if this should also be a userport device<br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** cartridges that work in C64 _and_ C128 mode are not supported yet<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
**** (what else?)<br />
**** Warpspeed is basically "two cartridges in one" (with a physical switch) and is implemented as if it was two individual cartridges because of this<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
* <s>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)</s> ('''fixed in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''' for gtk3)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
* <s>WiC64 emulation is not working well (and disabled, unless experimental devices are enabled in userport.h)</s> ('''fixed in trunk''')<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
* IEEE machines have no virtual device ("device traps")<br />
* Paperclip 64 dongle emulation is broken<br />
* DTL Basic Dongle emulation is broken<br />
* Mirror/Flip X/Y and Rotate 90 degrees, should they still not be implemented at release time<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
==== Codestyle cleanup ====<br />
* Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
** <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* There should be non port specific cmdline options that set Window0Height, Window0Width etc<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|}<br />
<br />
=== Docs ===<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us<br />
** also the respective mapping files need to be checked and fixed<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
=== Data ===<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=60913.82023-11-05T07:24:38Z<p>Compyx: /* SDL UI */</p>
<hr />
<div>Things we want to do for the 3.7.2 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)<br />
<br />
* "CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)<br />
<br />
* TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)<br />
<br />
* <s>Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)</s> ('''fixed in trunk''')<br />
* <s>WiC64 settings missing (to be added to userport devices menu/dialog): reset, user-reset checkbox, default server, timezone</s> ('''fixed in trunk''')<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?<br />
** It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
* <s>Nice-to-have TODO: WIC64 UI element to show traffic between emulated machine and WiC64 - kernal64 offers to open a window, where basically a hexdump is shown. In Vice, the hexdump of the traffic is currently only put on the console, when DEBUG_WIC64 is set (which it currently is). Rationale: when debugging WiC64 applications one may want to see what's happening between the host machine and WiC64.</s> ('''rejected''', user shall use console output)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y)<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource)<br />
:: Added in trunk, with command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>. Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* <s>WiC64 settings should be changeable through the GUI</s> '''(fixed in trunk)'''<br />
:: <s>Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).</s> '''(fixed in trunk)'''<br />
<br />
* <s>WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?</s> '''(fixed in trunk)'''<br />
* <s>WiC64 missing commandline options: -wic64trace,+wic64trace, -wic64reset</s> '''(fixed in trunk)'''<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* "CB2 Sound" should get an enable tickbox under "Machine" settings<br />
** not sure if this should also be a userport device<br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** cartridges that work in C64 _and_ C128 mode are not supported yet<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
**** (what else?)<br />
**** Warpspeed is basically "two cartridges in one" (with a physical switch) and is implemented as if it was two individual cartridges because of this<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* a GHA that builds macOS binaries should be added<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
* <s>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)</s> ('''fixed in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''' for gtk3)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
* <s>WiC64 emulation is not working well (and disabled, unless experimental devices are enabled in userport.h)</s> ('''fixed in trunk''')<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
* IEEE machines have no virtual device ("device traps")<br />
* Paperclip 64 dongle emulation is broken<br />
* DTL Basic Dongle emulation is broken<br />
* Mirror/Flip X/Y and Rotate 90 degrees, should they still not be implemented at release time<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
==== Codestyle cleanup ====<br />
* Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
** <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
: Status: should be clean [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:47, 4 November 2023 (CET)<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
: Status: seems clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
: Status: clean, shows a few false positives [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 22:49, 4 November 2023 (CET)<br />
<br />
==== Archdep cleanup ====<br />
There are still various bits of archdep things dangling around in common code<br />
* use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
: Status: shows quite a few cases, this still needs some more work/cleanup<br />
<br />
* TODO: review ifdefs that check SDL vs GTK3 UIs - since many resources/features are available for both now, some of these checks can likely be removed<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
: Status: Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
: Status: still shows quite some work to do :)<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* There should be non port specific cmdline options that set Window0Height, Window0Width etc<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|}<br />
<br />
=== Docs ===<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* Some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us<br />
** also the respective mapping files need to be checked and fixed<br />
** make sure to treat KP_Separator exactly the same as KP_Decimal.<br />
<br />
=== Data ===<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6076Joymappings2023-10-29T08:56:05Z<p>Compyx: /* Actions */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || Compyx (Linux), ? (Windows), ? (BSD), ? (MacOS) ||style="background-color:orange;"|25% || ||The preferred way would be to use the GUIDs used by SDL's mapping (see https://github.com/gabomdq/SDL_GameControllerDB), a 128-bit unsigned integer composed of device <i>bus-type</i>, <i>vendor</i>, product</i> and version</i>. Some test code generating this GUID for Linux with <tt>libevdev</tt> is available at https://github.com/Compyx/evdev-js-test. See the function <tt>dev_info_get_guid()</tt> in the file <tt>joystick.c</tt> for details.<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK3 joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx ||style="background:yellow;"|50% || ? ||Basic things like buttons work, but axes and hats need work. The shared code also needs updating to allow for non-sequential, non-zero based button/axis/hat codes, and codes that are larger than <tt><b>uint8_t</b></tt>.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx ||style="background-color:orange;"|20% || ? ||Joymap files now use UI action names instead of "menu paths" for all ports and the parser has been updated to actually validate its input and log warnings on errors in joymap files. Still needs a ton of work.<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
<ol><br />
<li>Joystick number (zero-based index of the hardware joystick)</li><br />
<li>Input type (enum <tt>joystick_input_type_t</tt>)<br />
<ol start="0"><br />
<li>Axis (<tt>JOY_INPUT_AXIS</tt>)</li><br />
<li>Button (<tt>JOY_INPUT_BUTTON</tt>)</li><br />
<li>Hat (<tt>JOY_INPUT_HAT</tt>)</li><br />
<li>Ball (<tt>JOY_INPUT_BALL</tt>)</li><br />
</ol><br />
</li><br />
<li>Input index<br />
<ul><br />
<li>For buttons, it is the zero-based index of the button</li><br />
<li>For axes:<br />
* if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
* otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.</li><br />
<li>for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.</li><br />
</ul><br />
</li><br />
<li>Action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. A string argument (unquoted) indicating the UI action to trigger. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/shared/uiactions.c src/arch/shared/uiactions.c] for a list of action names.<br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=3.8&diff=60683.82023-10-11T05:05:28Z<p>Compyx: /* Misc */</p>
<hr />
<div>Things we want to do for the 3.7.2 release:<br />
<br />
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.<br />
<br />
However, generally do not forget about the regular [[Todo]] page, which always contains some low hanging fruit :)<br />
<br />
__TOC__<br />
<br />
=== Joystick ===<br />
<br />
The joystick system needs to be modified/extended to properly support custom button mappings.<br />
See [[Joymappings]] for more information.<br />
<br />
=== Keyboard ===<br />
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.<br><br />
See [https://sourceforge.net/p/vice-emu/bugs/1797/ bug #1797] for some additional info.<br />
<br />
=== SDL UI ===<br />
<br />
* <s>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</s> (moved to [[Joymappings]])<br />
<br />
* <s>SDL1/2 joystick mapping improvements</s> (moved to [[Joymappings]])<br />
** <s>Make the 'extra joystick options' menu show what they are already mapped to</s> (moved to [[Joymappings]])<br />
** <s>Add menu joystick actions mapping support to the 'extra joystick options' menu</s> (moved to [[Joymappings]])<br />
<br />
* TODO: in x128 there is no separate cartridge menu, but x128 has extra cartridges that only exist in x128<br />
<br />
* <s>FIX: For RAMLink, the "RAMLink RAM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* <s>FIX: For GMOD2, the "GMOD2 EEPROM Image" should use the new cartridge_flush_secondary_image() and cartridge_save_secondary_image()</s> ('''in trunk''')<br />
<br />
* The position of the SDL window(s) should be saved and restored at startup (only works on SDL2)<br />
<br />
* "CB2Lowpass" setting is missing in xpet (slider in sound mixer settings)<br />
<br />
* TODO: in x64dtv the menu to select between internal color generation and external palette files is missing ('''Fixed in branch''' <tt>compyx/sdl-uiactions</tt>, will be merged back to trunk)<br />
<br />
* Add UI action IDs for cartridge-attach menu items. Unlike the Gtk3 UI, which has a single dialog (<tt>ACTION_CART_ATTACH</tt>) to attach CRT and RAW images, the SDL UI has many different menu items to attach cartridge images.<br />
** VIC20: smart-attach: can use <tt>ACTION_CART_ATTACH</tt> for this<br />
** VIC20: attach raw at $2000<br />
** VIC20: attach raw at $4000<br />
** VIC20: attach raw at $6000<br />
** VIC20: attach raw at $A000<br />
** VIC20: attach raw at $B000<br />
** C64: attach CRT (<tt>ACTION_CART_ATTACH</tt>)<br />
** C64: attach raw: <tt>ACTION_CART_ATTACH_RAW</tt> is available but not yet implemented<br />
** CBM-II: attach raw at $1000<br />
** CBM-II: attach raw at $2000<br />
** CBM-II: attach raw at $4000<br />
** CBM-II: attach raw at $6000<br />
** Plus4: attach CRT<br />
** Plus4: attach raw c264 magic cart<br />
** Plus4: attach raw 1MB cart<br />
** Plus4: attach raw Plus4 multi cart<br />
** Plus4: attach full C1 image<br />
** Plus4: attach low C1 image<br />
** Plus4: attach high C1 image<br />
** Plus4: attach full C2 image<br />
** Plus4: attach low C2 image<br />
** Plus4: attach high C2 image<br />
** PET: attach ROM 9 (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM B (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
** PET: attach ROM A (not a cart, but in <tt>menu_pet<b>CART</b>.c</tt>)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* <s>TODO: in x128 support enabling the statusbar separately for each window</s> ('''in trunk''')<br />
<br />
* <s>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</s> ('''fixed in trunk''')<br />
<br />
=== GTK UI ===<br />
<br />
* 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.<br />
** this should be a generic option (for all UIs)<br />
<br />
* add missing $VICERES comments in the UI files, so ./gtk3-resources.py list-missing keeps working<br />
<br />
* <s>Find out why the CRT control widgets take so long to show up.</s>(<b>fixed in trunk</b>: certain signal handlers waited for the main lock while they didn't need to.)<br />
<br />
* <s>Implement ''CHIP''AspectRatio widget as a spin button.</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Add support for setting the <tt>LogFileName</tt> resource, including setting it to "-" to redirect to <tt>stdout</tt>. Perhaps use the "Host" => "Current directory" node and rename to "Environment"?</s> (<b>fixed in trunk</b>)<br />
<br />
* Add support for opening the directory containing <tt>vice.log</tt> with the default file manager, or perhaps open <tt>vice.log</tt> with the default editor for .txt files.<br />
:: Works on Linux and Windows, no idea about MacOS.<br />
<br />
* <s>Add UI action and hotkey to toggle the PET diagnostic pin (allows for non-destructive reset on PET).</s>(<b>fixed in trunk</b>)<br />
<br />
* Rework the "Machine" => "ROMs" dialog: much too unwieldy, there are too many different ROM file resources for the current layout.<br />
:: Also either delete the "ROM sets" stuff or properly fix it.<br />
<br />
* <s>TODO: Make all cartridge widgets use the defines in <tt>src/cartridge.h</tt> for the cartridge names.</s> (<b>fixed in trunk</b>, some defines might be missing: <tt>CARTRIDGE_PLUS4_NAME_DIGIBLASTER</tt> and CARTRIDGE_PLUS4_NAME_SIDCARD</tt> (although that one is spelled in at least four different ways))<br />
<br />
* <s>FIX: generally on all cartridge tabs the widgets related to "primary image" should be at the top, then the "secondary": GMOD2, Expert, MMC Replay</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>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</s> (<b>fixed in trunk</b>)<br />
<br />
* TODO: On the printer tab, some invalid combinations of options should be prevented:<br />
:: 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)<br />
:: grey out "text" if 1520 driver is selected (make sure you cant select "text" first, then change the driver to "1520")<br />
<br />
* TODO: Fix hotkeys UI: saving the custom hotkeys is unwieldy and it's unclear whether the custom hotkeys file is stored in the <tt>HotkeyFile</tt> 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. <tt>~/.config/vice/gtk3-hotkeys-${MACHINE}.vhk</tt> 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?<br />
** It also appears that when saving the hotkeys, the "Current hotkeys file" GtkEntry still shows <tt>/usr/local/share/vice/C64/gtk3-hotkeys.vhk</tt>, so that text will need be to updated on saving as well, but ''only'' when to user requests the saved hotkeys to be default ;)<br />
** The dialog exceeds the limits set on dialog size, so that'll need fixing as well.<br />
<br />
* Implement UI action handlers for:<br />
** <s>Toggle secondary status bar (<tt>ACTION_SHOW_STATUSBAR_SECONDARY_TOGGLE</tt>) (x128 only)</s> (<b>fixed in trunk</b>)<br />
** <s>Set border mode (<tt>ACTION_BORDER_MODE_NORMAL</tt>, <tt>ACTION_BORDER_MODE_FULL</tt>, <tt>ACTION_BORDER_MODE_DEBUG</tt> and <tt>ACTION_BORDER_MODE_DEBUG</tt>) (all emus except vsid, xcbm2, xpet and x128's VDC window)</s> (<b>fixed in trunk</b>)<br />
<br />
* <s>Remove "Cartridge freeze" from the menu (and from valid UI actions!) in non-c64/c128 emulators.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Rendering ====<br />
<br />
* TODO: support mirroring the output (CHIPFlipX, CHIPFlipY, canvas->videoconfig->flipx/y)<br />
<br />
* TODO: support rotating the output by 90 degrees (CHIPRotate, canvas->videoconfig->rotate)<br />
** the host window should change size/ratio<br />
<br />
* TODO: the macOS renderer must be checked and eventually updated for the new per chip resources. see eg r42892<br />
<br />
* add feature that allows to hide (only) the statusbar (use <CHIP>ShowStatusbar resource)<br />
:: Added in trunk, with command line options <tt>-<CHIP>showstatusbar</tt> and <tt>+<CHIP>showstatusbar</tt>. Needs more work to properly handle the window resizing when toggling the visibility of the status bar.<br />
<br />
=== Linux/Unix ===<br />
<br />
* <s>The path for vice.log is incorrect: currently we use <tt>$XDG_CONFIG_HOME</tt> (default: <tt>.~/config/vice/vice.log</tt>), this should become <tt>$XDG_STATE_HOME</tt> (default: <tt>~/.local/state/vice/vice.log</tt>).</s> (<b>fixed in trunk</b>, on Windows we still stuff everything in <tt>%APPDATA%\Roaming\vice</tt>)<br />
<br />
=== FFMPEG ===<br />
<br />
Using FFMPEG via API breaks all the time, and it is currently disabled in our windows builds.<br />
<br />
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):<br />
<br />
* 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''')<br />
** a runtime check and UI that warns when the exectable is missing needs to be made<br />
** needs to be tested and fixed on Windows, macOS<br />
** FIXME: The port(s) that are used for streaming data to ffmpeg are currently hardcoded - this is a problem, because they might not be free to use<br />
* instead of the internal FFMPEG, support internal [https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec ZMBV] codec (which we can pull into the tree) ('''WIP in trunk''')<br />
:: this can always work, even if FFMPEG executable is not available<br />
:: if we have this, even if we do not ship with the FFMPEG executable, we have working movie recording<br />
::: TODO: might even be possible to pipe ZMBV to external programs (such as OBS) directly<br />
<br />
=== Misc ===<br />
<br />
* WiC64 settings should be changeable through the GUI<br />
:: Added in the Gtk3 UI, though the MAC address and IP address show different values than what is dumped on the terminal when VICE starts. Selecting a timezone with the combobox also <i>appears</i> to fail since the resource setter is bugged: it doesn't return 0 on success (or rather: it only returns 0 for timezone 0).<br />
<br />
* WiC64 settings should be changeable through command line options: currently only <tt>WIC64DefaultServer</tt> can be set; command line options for the <tt>WIC64MACAddress</tt>, <tt>WIC64IPAddress</tt>, <tt>WIC64SecToken</tt> and <tt>WIC64Timezone</tt> resources are missing, or perhaps this is by design?<br />
<br />
* Fix Userport system<br />
** The API that is used to register/show only user port devices which work on a certain machine is overcomplicated and broken:<br />
*** 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<br />
*** All devices should be registered in a central function, not per emulator as it is now.<br />
** 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.<br />
*** 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.<br />
** 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.<br />
** the IDs should be fixed, and not change when a new device was added (update docs when fixed)<br />
** after the rework, the PET diag pin can be converted into a regular userport device<br />
<br />
* "CB2 Sound" should get an enable tickbox under "Machine" settings<br />
** not sure if this should also be a userport device<br />
<br />
* <s>archdep_spawn needs to be rewritten to use CreateProcess, like in coproc.c - see [https://sourceforge.net/p/vice-emu/bugs/1843/]</s> ('''fixed in trunk''')<br />
<br />
* Fix C128 cartridge system<br />
** snapshots are not supported yet<br />
** cartridges that work in C64 _and_ C128 mode are not supported yet<br />
*** <s>RAMLink</s> ('''in trunk''')<br />
*** <s>LTK</s> ('''in trunk''')<br />
*** MMC Replay<br />
**** (what else?)<br />
**** Warpspeed is basically "two cartridges in one" (with a physical switch) and is implemented as if it was two individual cartridges because of this<br />
** <s>comal80 does not work correctly</s> ('''fixed in trunk''')<br />
<br />
* implement CBM2 cartridge system<br />
<br />
* <s>Fix C64 cartridge system</s><br />
** <s>implement functions for GMod2 EEPROM save-as/flush.</s> ('''fixed in trunk''')<br />
** <s>a generic API for saving and flushing EEPROM data for carts should be implemented.</s> ('''fixed in trunk''')<br />
** <s>IDE64 should save its config into a separate file rather than writing a binary string into vice.ini</s> ('''in trunk''')<br />
<br />
* <s>it is not possible to reset hotkeys to default (via UI)</s> (<b>fixed in trunk</b>)<br />
** -default on cmdline should skip loading system files such as kernal from <tt>~/.local/share/vice/$EMU/</tt>.<br />
<br />
* <s>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 :)</s> ('''in trunk''')<br />
<br />
* <s>DTV should use different flash images for PAL, NTSC, Hummer</s> ('''fixed in trunk''')<br />
<br />
* <s>The list of available palette files (.vpl) should get generated from the available files found in the data directory</s> ('''fixed in trunk''')<br />
<br />
* <s>Fix Videochip options (also see below)</s><br />
** <s> 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)</s> ('''fixed in trunk''')<br />
<br />
=== Buildsystem ===<br />
<br />
* <s>when configured without --enable-x64, a symlink "x64->x64sc" should be created and installed instead of x64 </s> ('''fixed in trunk''')<br />
<br />
* README is currently updated from the same rule that generates infocontrib.h, this should be done in a different way<br />
<br />
* <tt>make bindist</tt> is currently broken for <tt>USE_HEADLESSUI</tt>. (fixed only for Windows/msys2)<br />
<br />
* <s>Too many files are installed in <tt>$PREFIX/share/doc/vice</tt> when doing <tt>make install</tt> </s> ('''fixed in trunk''')<br />
* <s>The configure switch to enable lame mp3 support needs to be renamed to <tt>--with-lame</tt>, currently it is called <tt>--enable-lame</tt>, a remnant of when there was an in-tree lame source.</s> (<b>fixed in trunk</b>)<br />
<br />
==== Github Actions ====<br />
A .deb is generated for headless, sdl1, sdl2 and gtk3 (both amd64), with non-stripped binaries.<br />
* <s>Still TODO is adding FFMPEG to the builds (needs support for FFMPEG 5.x in trunk)</s><br />
<br />
The GHA should produce the html documentation and upload it to the website<br />
* perhaps the entire website can be updated/produced/uploaded (removing another manual step from the release procedure)<br />
* also the release tarball and binaries can be updated to sf (and zimmers perhaps?) automatically<br />
<br />
* <s>The SDL1 port should also get checked</s><br />
<br />
* [https://clang.llvm.org/extra/clang-tidy/ clang-tidy] could be used to do more automatic codestyle checks<br />
<br />
=== Cleanup ===<br />
<br />
* <s>get rid of all traces of "Frankenvice" and other failed attempts of using a linux hosted mingw crosscompiler. (Remove related scripts, documentation, etc)</s> (<b>fixed in trunk</b>)<br />
<br />
==== disable non working things in the GUI ====<br />
<br />
* <s>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)</s> ('''fixed in trunk''')<br />
* <s>vdrive via opencbm ("real device") does not work in xvic</s> ('''fixed in trunk''')<br />
* Professional DOS emulation doesn't work (https://sourceforge.net/p/vice-emu/bugs/759/) ('''disabled in trunk''' for gtk3)<br />
* "IEC-Device" does not work in xvic and the IEEE machines ('''disabled in trunk''')<br />
* diag 586220 harness emulation is not working (and disabled, unless experimental devices are enabled in tapeport.h)<br />
* <s>WiC64 emulation is not working well (and disabled, unless experimental devices are enabled in userport.h)</s> ('''fixed in trunk''')<br />
* Gun Stick lightpen emulation is not working (and disabled, unless experimental devices are enabled in joyport.h)<br />
* IEEE machines have no virtual device ("device traps")<br />
* Paperclip 64 dongle emulation is broken<br />
* DTL Basic Dongle emulation is broken<br />
* Mirror/Flip X/Y and Rotate 90 degrees, should they still not be implemented at release time<br />
TODO: make a list of all those things (here, and keep it here, since obviously those are open ends and need to be fixed!)<br />
<br />
==== Codestyle cleanup ====<br />
* Apparently some files that do not respect the common codestyle sneaked in. <b>Remember we removed the rule that archdep files can ignore codestyle rules long ago!</b><br />
** <s>opengl_renderer_unix.c</s>, <s>render_thread.c</s>, <s>render_queue.c</s>, <s>opengl_renderer.c</s> ...<br />
<br />
* use '''./src/findhacks.sh encoding''' to find files with illegal characters in them<br />
<br />
* use '''make stylecheck''' to run the general style checks<br />
<br />
==== obsolete ifdefs/resources cleanup ====<br />
* use <tt>'''./src/findhacks.sh obsolete'''</tt> to find defines that should no more be used - these should be replaced (eg use WINDOWS_COMPILE instead of _WIN32) or removed. Ideally this finds no files.<br />
* use <tt>'''./src/findhacks.sh res'''</tt> to find obsolete resources - this should find nothing (except a couple false positives)<br />
<br />
==== Archdep cleanup ====<br />
* there are still various bits of archdep things dangling around in common code (and some newly added *sigh*) - use <tt>'''./src/findhacks.sh archdep'''</tt> to find such code - a lot of this (if not all) should live in arch/shared<br />
** remaining cases should always come with a comment telling why there is archdep stuff and why it has to be in common code<br />
* 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<br />
* TODO: Remove support for 'classic' BeOS, only support Haiku.<br />
:: Change the <tt>make bindist</tt> method for Haiku into <tt>make install</tt>.<br />
<br />
==== Compiler-dependent ifdefs cleanup ====<br />
<tt>'''vice.h'''</tt> is the only file where ifdefs are allowed that check for a specific compiler.<br />
<br />
* Use <tt>'''./src/findhacks.sh ccarchdep'''</tt> to find occurances elsewhere in the code, they should be removed in almost all cases.<br />
** remaining cases should always come with a comment telling why there has to be compiler specific stuff<br />
:: the exception to that rule is generated code (mon_parse.c, mon_lex.c) and a few occurences in our "novte" hack<br />
<br />
Codebase seems to be clean now [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 16:43, 25 March 2023 (CET)<br />
<br />
==== Debug and log messages cleanup ====<br />
We have a lot of noise on the terminal, it might be a good idea to clean that up.<br />
* use <tt>'''./src/findhacks.sh printf'''</tt> to find <tt>printf</tt> calls that need to turned into log_debug</tt> calls (<tt>log_debug</tt> adds a <b>newline</b>, keep that in mind to avoid lots of empty lines in the log when changing <tt>printf</tt> to <tt>log_debug</tt>!).<br />
* decide if we really need that message in the log, perhaps it can be surrounded with <tt>#ifdef DEBUG / #endif</tt> so the messages are only shown when compiling with <tt>--enable-debug</tt>?<br />
* also check disabled (commented-out) <tt>printf/log_debug</tt> calls, will we ever need them again?<br />
* a lot of devices / modules use LOG_DEFAULT for logging, but they should use their own log_t instead (for easier filtering)<br />
<br />
=== Headers ===<br />
<br />
* many things that currently live in the archdep ui.h could be moved to the generic uiapi.h<br />
<br />
=== Resources ===<br />
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)<br />
* the same applies to the related commandline options, of course<br />
* NOTE: <tt><i>CHIP</i>xyz</tt> 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)<br />
<br />
A bunch of resources have to be handled per video chip:<br />
{| class="wikitable"<br />
|+ GTK3 Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>GTKFilter</tt> || Rename to <tt><i>CHIP</i>GLFilter</tt> ('''in trunk''')<br />
|-<br />
| <tt>KeepAspectRatio</tt>, <tt>TrueAspectRatio</tt> || Rework into one resource: <tt>''CHIP''AspectMode</tt> (0: off, 1: custom 2: true) ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>AspectRatio</tt> || should be used with "custom" mode, see above ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>FlipX</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>FlipY</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in GUI<br />
|-<br />
| <tt>JoyMapFile</tt>, <tt>JoyThreshold</tt>, <tt>JoyFuzz</tt> || Use these when implementing the joystick mapping stuff<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ SDL Resources<br />
|-<br />
! Resource !! Action<br />
|-<br />
| <tt>VSync</tt> || Rename to <tt><i>CHIP</i>VSync</tt> ('''in trunk''')<br />
|-<br />
| <tt>AspectRatio</tt> || Rename to <i>CHIP</i>AspectRatio ('''in trunk''')<br />
|-<br />
| <tt>SDLGLAspectMode</tt> || Rename to <i>CHIP</i>AspectMode ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipX</tt> || Rename to <i>CHIP</i>FlipX ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFlipY</tt> || Rename to <i>CHIP</i>FlipY ('''in trunk''')<br />
|-<br />
| <tt>SDLGLFilter</tt> || Rename to <i>CHIP</i>GLFilter ('''in trunk''')<br />
|-<br />
| <tt><i>CHIP</i>Rotate</tt> || ('''in trunk''') To be implemented in UI<br />
|-<br />
| <tt>SDLStatusbar</tt> || Rename to <i>CHIP</i>ShowStatusbar ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomWidth</tt> || Rename to <i>CHIP</i>FullscreenCustomWidth ('''in trunk''')<br />
|-<br />
| <tt>SDLCustomHeight</tt> || Rename to <i>CHIP</i>FullscreenCustomHeight ('''in trunk''')<br />
|}<br />
<br />
* There should be non port specific cmdline options that set Window0Height, Window0Width etc<br />
<br />
==== Resources without UI support ====<br />
<br />
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).<br />
<br />
{| class="wikitable"<br />
! Resource !! Emulators !! Status<br />
|-<br />
| <tt>BoardType</tt> || x64, x64sc, xscpu64, x128 || set implicitly by "model" API<br />
|-<br />
| <tt>CartridgeFile</tt> || x64, x64sc, xscpu64, x128, xplus4, xvic, xcbm2, xcbm5x0 || set implicitly by cartride API<br />
|}<br />
<br />
=== Docs ===<br />
<br />
use '''cd doc && ./checkdoc.mak all ; cd ..'''<br />
<br />
* list of userport devices must be updated, once userport system was changed so the numbers are fixed<br />
<br />
* split vice.texi into smaller files<br />
** CAUTION: various scripts use vice.texi as input<br />
* various things that are right now hidden in "Settings and Resources" -> "Miscellaneous settings" can perhaps be moved elsewhere<br />
* Write a HOWTO for running Github Actions locally using [https://github.com/nektos/act act].<br />
<br />
* Some info from the WIKI still needs to be revised and moved into vice.texi<br />
** https://vice-emu.pokefinder.org/wiki/RS232<br />
<br />
* A some keymap images are still missing: cbm2-symbolic-de, cbm2-symbolic-us, plus4-symbolic-de, plus4-symbolic-us<br />
** also the respective mapping files need to be checked and fixed<br />
<br />
=== Data ===<br />
<br />
==== ROMs ====<br />
<br />
* Ultimately rename all ROM files using a naming scheme as in "kernal-901227-01.bin". Unfortunately some files could not be identified yet:<br />
** C128 ROMs: kernalfi, kernalfr, kernalit, kernalno<br />
*** when ROMs have been identified, fix the code/checksums in c128rom.h/.c<br />
** Printer ROMs: mps801.bin, nl10.bin<br />
** SCPU ROM: scpu64 (wanted is the part number of the actual SCPU ROM / what is written on the sticker)<br />
** PET ROMs: chargen.de<br />
<br />
== 3.7 Feedback threads ==<br />
<br />
*https://www.lemon64.com/forum/viewtopic.php?t=81099<br />
*https://www.forum64.de/index.php?thread/132610-vice-3-7-has-been-released<br />
*https://csdb.dk/release/?id=226991<br />
*https://csdb.dk/forums/?csdbentrytype=release&csdbentry=226991&entrytopic=1<br />
<br />
== even later ==<br />
<br />
see [[Roadmap]] for the long term plan<br />
<br />
----<br />
<br />
After a release was made:<br />
* copy this page to a new X.Y.Z page.<br />
* Move this page to [[:Category:DONE]].<br />
* Remove all crossed-out stuff from new page.<br />
* Update [[Todo]] and [[:Category:TODO]].<br />
* Update [[Roadmap]]<br />
<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=UI_Actions&diff=6066UI Actions2023-10-02T07:20:23Z<p>Compyx: </p>
<hr />
<div><span id="ui-actions"></span><br />
= UI Actions =<br />
<br />
<span id="introduction"></span><br />
== Introduction ==<br />
<br />
The UI actions are a way to trigger specific emulators actions from menu items, hotkeys or controller buttons without code duplication and letting VICE deal with issues like threading and avoiding showing multiple dialogs or retriggering actions that haven’t finished yet.<br />
<br />
UI actions are managed through an API living in <code>src/arch/shared/uiactions.h</code>. Actions are triggered by specifying action ID in menu items, or by using an action name in hotkey and joy map files (which VICE translates to IDs).<br />
<br />
The file <code>src/arch/shared/uiactions.h</code> contains the UI action IDs available, while the file <code>src/arch/shared/uiactions.c</code> contains a table mapping these IDs to action names.<br />
<br />
New actions can be created by adding a unqiue ID in the header file and an entry (with a unique name) in the aformentioned table in the source file. An ''action handler'' is required to implement the action’s logic, this handler is a callback function that gets passed some information about itself (the entry in the table, an <code>ui_action_map_t*</code>). The action will need to be registered with the UI actions system via <code>ui_actions_register()</code>. (See below)<br />
<br />
<span id="basic-api-usage"></span><br />
== Basic API usage ==<br />
<br />
The basic functions and types used by the UI actions are relatively simple. A selection of the most used functions and types is listed here.<br />
<br />
<span id="general-functions-dealing-with-the-ui-actions-system-itself"></span><br />
=== General functions dealing with the UI actions system itself: ===<br />
<br />
<syntaxhighlight lang="c">void ui_actions_init (void);<br />
void ui_actions_set_dispatch (void (*dispatch)(ui_action_map_t *));<br />
void ui_actions_register (const ui_action_map_t *mappings);<br />
void ui_actions_shutdown (void);</syntaxhighlight><br />
VICE will call <code>ui_actions_init()</code> and <code>ui_actions_shutdown()</code>, and calling <code>ui_actions_set_dispatch()</code> is optional. So the only function required to use is <code>ui_actions_register()</code>.<br />
<br />
The function <code>ui_actions_set_dispatch()</code> can be used to install a function that “intercepts” an action before it’s triggered by VICE, in which case the dispatch function is responsible for calling <code>ui_action_trigger(map-&gt;action)</code>. The dispatch function is used in the Gtk3 port to make sure an action that is marked as requiring the UI thread is executed on the UI thread. More on this later.<br />
<br />
The '''<code>ui_action_map_t</code>''' type is used to register actions and to access information on an action. It maps action IDs to actions handlers and hotkeys.<br />
<br />
<syntaxhighlight lang="c">typedef struct ui_action_map_s {<br />
int action; /**< action ID */<br />
<br />
/*<br />
* Action handler data<br />
*/<br />
<br />
void (*handler)(struct ui_action_map_s*); /**< function handling the action */<br />
void *data; /**< optional user data */<br />
<br />
/* modes */<br />
bool blocks; /**< action blocks (the same action cannot be<br />
triggered again until it finishes) */<br />
bool dialog; /**< action pops up a dialog (only one dialog action<br />
is allowed at a time), this implies using the<br />
UI thread */<br />
bool uithread; /**< must run on the UI thread */<br />
<br />
/* state */<br />
bool is_busy; /**< action is busy */<br />
<br />
/* Hotkey data left out */<br />
} ui_action_map_t;</syntaxhighlight><br />
The “Hotkey data” can be ignored: UI actions and hotkeys are closely related, and VICE uses the same struct to store hotkey data.<br />
<br />
In its simplest form an initialization of the map requires providing values for <code>.action</code> and <code>.handler</code>. When providing initializers for UI action maps please use C99 designated initializers: this looks a lot cleaner and allows for adding members to the UI action map type without causing compiler warnings with existing code.<br />
<br />
<span id="simple-example-of-an-action-handler"></span><br />
==== Simple example of an action handler ====<br />
<br />
<syntaxhighlight lang="c">/* Action handler for toggling warp mode */<br />
static void warp_mode_toggle_action(ui_action_map_t *self)<br />
{<br />
vsync_set_warp_mode(!vsync_get_warp_mode());<br />
}<br />
<br />
/* List of actions to register (just one here) */<br />
static const ui_action_map_t some_actions[] = {<br />
{ .action = ACTION_WARP_MODE_TOGGLE,<br />
.handler = warp_mode_toggle_action<br />
},<br />
UI_ACTION_MAP_TERMINATOR /* macro used to terminate a list of actions */<br />
};<br />
<br />
<br />
/* Register the action: */<br />
ui_actions_register(some_actions);</syntaxhighlight><br />
Here we have a single action handler to toggle warp mode, in this case it does not use its ''self'' argument, but the argument can be used to access, for example, the action’s<code>.id</code> member or the <code>.data</code> member to be able to write an action handler that can be used for multiple IDs.<br />
<br />
We register the action with a call to <code>ui_actions_register()</code>, after which VICE will call <code>warp_mode_toggle_action()</code> when a menu item, hotkey or controller button is used that is mapped to <code>ACTION_WARP_MODE_TOGGLE</code>.<br />
<br />
<span id="functions-dealing-with-individual-actions"></span><br />
=== Functions dealing with individual actions: ===<br />
<br />
<syntaxhighlight lang="c">void ui_action_trigger (int action);<br />
void ui_action_finish (int action);<br />
int ui_action_get_id (const char *name);<br />
const char *ui_action_get_name (int action);<br />
const char *ui_action_get_desc (int action);<br />
char * ui_action_get_hotkey_label(int action);</syntaxhighlight></div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=UI_Actions&diff=6065UI Actions2023-10-01T19:32:24Z<p>Compyx: </p>
<hr />
<div><span id="ui-actions"></span><br />
= UI Actions =<br />
<br />
<span id="introduction"></span><br />
== Introduction ==<br />
<br />
The UI actions are a way to trigger specific emulators actions from menu items, hotkeys or controller buttons without code duplication and letting VICE deal with issues like threading and avoiding showing multiple dialogs or retriggering actions that haven’t finished yet.<br />
<br />
UI actions are managed through an API living in <code>src/arch/shared/uiactions.h</code>. Actions are triggered by specifying action ID in menu items, or by using an action name in hotkey and joy map files (which VICE translates to IDs).<br />
<br />
The file <code>src/arch/shared/uiactions.h</code> contains the UI action IDs available, while the file <code>src/arch/shared/uiactions.c</code> contains a table mapping these IDs to action names.<br />
<br />
New actions can be created by adding a unqiue ID in the header file and an entry (with a unique name) in the aformentioned table in the source file. An ''action handler'' is required to implement the action’s logic, this handler is a callback function that gets passed some information about itself (the entry in the table, an <code>ui_action_map_t*</code>). The action will need to be registered with the UI actions system via <code>ui_actions_register()</code>. (See below)<br />
<br />
<span id="basic-api-usage"></span><br />
== Basic API usage ==<br />
<br />
The basic functions and types used by the UI actions are relatively simple. A selection of the most used functions and types is listed here.<br />
<br />
<span id="general-functions-dealing-with-the-ui-actions-system-itself"></span><br />
=== General functions dealing with the UI actions system itself: ===<br />
<br />
<syntaxhighlight lang="c">void ui_actions_init (void);<br />
void ui_actions_set_dispatch (void (*dispatch)(ui_action_map_t *));<br />
void ui_actions_register (const ui_action_map_t *mappings);<br />
void ui_actions_shutdown (void);</syntaxhighlight><br />
VICE will call <code>ui_actions_init()</code> and <code>ui_actions_shutdown()</code>, and calling <code>ui_actions_set_dispatch()</code> is optional (more on this later).<br />
<br />
<span id="functions-dealing-with-individual-actions"></span><br />
=== Functions dealing with individual actions: ===<br />
<br />
<syntaxhighlight lang="c">void ui_action_trigger (int action);<br />
void ui_action_finish (int action);<br />
int ui_action_get_id (const char *name);<br />
const char *ui_action_get_name (int action);<br />
const char *ui_action_get_desc (int action);<br />
char * ui_action_get_hotkey_label(int action);</syntaxhighlight></div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=UI_Actions&diff=6064UI Actions2023-10-01T19:22:27Z<p>Compyx: </p>
<hr />
<div>= UI Actions =<br />
<br />
== Introduction ==<br />
<br />
The UI actions are a way to trigger specific emulators actions from menu items, hotkeys or controller buttons without code duplication and letting VICE deal with issues like threading and avoiding showing multiple dialogs or retriggering actions that haven’t finished yet.<br />
<br />
UI actions are managed through an API living in <code>src/arch/shared/uiactions.h</code>. Actions are triggered by specifying action ID in menu items, or by using an action name in hotkey and joy map files (which VICE translates to IDs).<br />
<br />
The file <code>src/arch/shared/uiactions.h</code> contains the UI action IDs available, while the file <code>src/arch/shared/uiactions.c</code> contains a table mapping these IDs to action names.<br />
<br />
New actions can be created by adding a unqiue ID in the header file and an entry (with a unique name) in the aformentioned table in the source file. An ''action handler'' is required to implement the action’s logic, this handler is a callback function that gets passed some information about itself (the entry in the table, an <code>ui_action_map_t*</code>). The action will need to be registered with the UI actions system via <code>ui_actions_register()</code>. (See below)<br />
<br />
== Basic API usage ==<br />
<br />
The basic functions and types used by the UI actions are relatively simple. A selection of the most used functions and types is listed here.<br />
<br />
=== General functions dealing with the UI actions system itself: ===<br />
<br />
<source lang="c">void ui_actions_init (void);<br />
void ui_actions_set_dispatch (void (*dispatch)(ui_action_map_t *));<br />
void ui_actions_register (const ui_action_map_t *mappings);<br />
void ui_actions_shutdown (void);</source><br />
VICE will call <code>ui_actions_init()</code> and <code>ui_actions_shutdown()</code>, and calling <code>ui_actions_set_dispatch()</code> is optional (more on this later).<br />
<br />
=== Functions dealing with individual actions: ===<br />
<br />
<source lang="c">void ui_action_trigger (int action);<br />
void ui_action_finish (int action);<br />
int ui_action_get_id (const char *name);<br />
const char *ui_action_get_name (int action);<br />
const char *ui_action_get_desc (int action);<br />
char * ui_action_get_hotkey_label(int action);</source></div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=UI_Actions&diff=6063UI Actions2023-10-01T18:29:58Z<p>Compyx: UI Actions</p>
<hr />
<div>This page explains the UI actions system used in the Gtk3 and SDL port UIs and which is supposed to be used in any future ports.<br />
<br />
'''2023-10-01: Removed outdated docs'''</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6061Joymappings2023-09-23T07:59:48Z<p>Compyx: /* Mapping file */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
<ol><br />
<li>Joystick number (zero-based index of the hardware joystick)</li><br />
<li>Input type (enum <tt>joystick_input_type_t</tt>)<br />
<ol start="0"><br />
<li>Axis (<tt>JOY_INPUT_AXIS</tt>)</li><br />
<li>Button (<tt>JOY_INPUT_BUTTON</tt>)</li><br />
<li>Hat (<tt>JOY_INPUT_HAT</tt>)</li><br />
<li>Ball (<tt>JOY_INPUT_BALL</tt>)</li><br />
</ol><br />
</li><br />
<li>Input index<br />
<ul><br />
<li>For buttons, it is the zero-based index of the button</li><br />
<li>For axes:<br />
* if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
* otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.</li><br />
<li>for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.</li><br />
</ul><br />
</li><br />
<li>Action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. A string argument (unquoted) indicating the UI action to trigger. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/shared/uiactions.c src/arch/shared/uiactions.c] for a list of action names.<br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6060Joymappings2023-09-22T20:18:37Z<p>Compyx: /* Mapping file */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
## ball<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. A string argument (unquoted) indicating the UI action to trigger. See [https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/shared/uiactions.c src/arch/shared/uiactions.c] for a list of action names.<br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6057Joymappings2023-09-18T22:52:01Z<p>Compyx: /* Actions */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:lime;"| 100% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items. (DONE)<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6056Joymappings2023-09-18T22:49:20Z<p>Compyx: /* Milestone 1 */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:orange;"| 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6055Joymappings2023-09-18T22:49:05Z<p>Compyx: /* Milestone 1 */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* DONE: make SDL port use the common numeric menu ids for joystick buttons<br />
* half DONE: update joystick mapping code to use UI actions and load and save these from/to .vjm file (done for SDL)<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:orange;"| 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6053Joymappings2023-08-29T17:50:26Z<p>Compyx: /* Tasks */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* TODO: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:orange;"| 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6048Joymappings2023-08-18T19:40:25Z<p>Compyx: /* Actions */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* TODO: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
|style="background:lime;"| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
|style="background:yellow;"| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx ||style="background:yellow;"| 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"|GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
|style="background:lime;"| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6047Joymappings2023-08-18T19:36:54Z<p>Compyx: Mark SDL UI action and hotkeys done</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* TODO: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || SDL UI actions || Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu is implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique.<br />
The SDL UI currently shows an error message box when trying to assign a hotkey to an item without an action ID.<br />
Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
|style="background:lime;"| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx || 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"|GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. || Compyx ||style="background-color: lime;"|100% || SDL UI actions ||<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6046Joymappings2023-08-08T06:28:29Z<p>Compyx: /* Actions */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* TODO: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| SDL hotkeys || 1 || Rework SDL hotkeys system to use [[UI Actions]] || Compyx ||style="background:yellow;"|75% || SDL UI actions || Currently (2023-08-08) being worked on in the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/branches/compyx/sdl-hotkeys/ sdl-hotkeys branch]. Hotkeys now work and use the same syntax as the Gtk3 .vhk files: they can be loaded, saved, cleared and reset to default. Assigning them with the magic 'M' key in the menu needs to be (re)implemented, with the caveat that only items with a UI action ID can be used to assign a hotkey to, unlike the old "Some&menu&item" technique. this means we need a way to signal to the user which items can be used for hotkeys/joybuttons. Any items we want to be able to assign to a hotkey or joystick button will have to be assigned a new UI action ID and an action handler implemented for that action.<br />
|-<br />
|style="background:lime;"| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo, Compyx || 50% || SDL UI actions || Although the joystick mappings currently work, they use the old "Some&menu&item" menu item references, this needs to be rewritten to use UI actions and the .vjm parser needs to be updated to use UI action names instead of paths to menu items.<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"|GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. For example: <tt>void ui_hotkeys_arch_install_by_map(vhk_map_t *map)</tt>.</tt>.<br><br>See the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/branches/compyx/hotkeys-rework-002/ hotkeys-rework-002] branch for details. || Compyx ||style="background-color: yellow;"|75% || SDL UI actions || Code in <tt>arch/shared/</tt> and <tt>arch/gtk3/</tt> is done. Code in <tt>arch/sdl/</tt> depends on implementing the UI actions in <tt>arch/sdl/</tt>.<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6045Joymappings2023-08-08T06:04:55Z<p>Compyx: /* Roadmap */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* TODO: update joystick mapping code to use UI actions and load and save these from/to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* TODO: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:orange;"|50% || ? ||<br />
|-<br />
|style="background:lime;"| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"|GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. For example: <tt>void ui_hotkeys_arch_install_by_map(vhk_map_t *map)</tt>.</tt>.<br><br>See the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/branches/compyx/hotkeys-rework-002/ hotkeys-rework-002] branch for details. || Compyx ||style="background-color: yellow;"|75% || SDL UI actions || Code in <tt>arch/shared/</tt> and <tt>arch/gtk3/</tt> is done. Code in <tt>arch/sdl/</tt> depends on implementing the UI actions in <tt>arch/sdl/</tt>.<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyxhttp://vice-emu.pokefinder.org/vicewiki/index.php?title=Joymappings&diff=6044Joymappings2023-08-08T06:02:25Z<p>Compyx: /* Milestone 1 */</p>
<hr />
<div>For a long time the SDL port has had a joystick mappings file. There are 2 sample ones: data/C64/sdl_joymap_thec64.vjm and data/C64/sdl_joymap_ps3.vjm.<br />
<br />
These files contain associations between host joystick actions and emulator actions. Possible actions include a corresponding emulated joystick action, a shortcut to an emulator menu action etc.<br />
<br />
The file name has the form {sdl,gtk3,headless}-joymap-{C64,C64SC,...}.vjm. Its format is documented in a comment in the sample file itself.<br />
<br />
In order to port the feature to the generic code, the event UI_FUNCTION (shortcuts to menu actions) got lost, but it has since been reimplemented. For SDL, it is implemented in a very SDL-specific way. GTK3, instead, uses the new uiactions.[ch], that is cross-platform.<br />
<br />
== Roadmap ==<br />
<br />
=== Milestone 1 ===<br />
<br />
First the SDL port needs to be "modernized" and use the generic code.<br />
<br />
* DONE: generic hotkey parser<br />
: <s>move the gtk3/hotkeys.{c,h} files into shared/ and use the same syntax (.vhk) files for SDL</s><br />
* DONE: make SDL port use the common numeric menu ids for hotkeys<br />
* TODO: make SDL port use the common numeric menu ids for joystick buttons<br />
* DONE: load and save the menu actions to .vjm file<br />
After this, the SDL port should have fully functional UI, Menu actions can be mapped to Joysticks, Joysticks can be mapped, regular (C64) keys can be mapped, and the controller mappings saved/restored from .vjm files<br />
<br />
=== Milestone 2 ===<br />
<br />
Now we need to make the GTK3 port use the generic joystick mapping code, and make .vjm files work<br />
<br />
* DONE: load and save the menu actions to .vjm file<br />
The GTK3 port can load/save .vjm files. Joysticks and Menu actions can be mapped via .vjm files. Existing Joystick mapping UI should still function (for the directions)<br />
<br />
At this point we can make a release, so people can test the new code. (We'll include a couple mapping files for common controllers)<br />
<br />
=== Milestone 3 ===<br />
<br />
The last step will be making a GUI to create the Joystick and Menu action mappings in the GTK3 port<br />
<br />
* TODO: make GUI to assign menu actions and joystick directions/buttons to gamecontroller<br />
<br />
After this both SDL and GTK3 UIs should have fully functional UIs<br />
<br />
=== Milestone 4 ===<br />
<br />
We really want some more modern features. These are mostly independent from the Joystick mapping itself though, so they are listed here. It might make sense to actually implement those separately.<br />
<br />
* TODO: instead of simply listing controllers by number, we should use a UUID to construct unique resource names<br />
* TODO: mapping files could use human readable strings instead of numeric magic values<br />
<br />
== Tasks ==<br />
<br />
=== Actions ===<br />
<br />
This will be the list of things to do and the place to keep track of progress:<br />
<br />
{| class="wikitable"<br />
|+ (SDL) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
| SDL UI actions || 1 || Rework SDL menu system to use [[UI Actions]] || Compyx ||style="background:orange;"|50% || ? ||<br />
|-<br />
|style="background:lime;"| SDL joycode || 1 || Make the SDL UI use the new joy mapping code || Fabbo || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (GTK3) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| UUIDs || 4 || Figure out how to obtain UUIDs for controllers on Linux, BSD, MacOS and Windows || ? || 0% ||<br />
|-<br />
|style="background:lime;"|GTK3 UI actions || 2 || Rework GTK3 menu system to use [[UI Actions]] || Compyx ||style="background:lime;"|100% || ? ||<br />
|-<br />
| GTK joycode || 2 || Make the Gtk3 UI use the new joy mapping code || Compyx || 0% || ? ||<br />
|-<br />
|}<br />
<br />
{| class="wikitable"<br />
|+ (generic) Actions to be undertaken for full configurable joystick mappings<br />
|-<br />
! Action !! Milestone !! Description !! Who !! Status !! Depends on !! Remarks<br />
|-<br />
| Joymap files (generic) || 4 || Update syntax of joymap files to use a human-readable format (text instead of magic numbers). If the files are easier to read and write users can produce joymaps for controllers they own, which we can then include in VICE. This will be especially handy until we have proper UI support for creating the mappings. 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 (strings) instead of the "menu paths" SDL does or magic numbers. (See [[UI Actions]]) || Compyx || 0% || ? ||<br />
|-<br />
| Resources (generic) || 4 || Change and add resources to use UUIDs for controllers and mapping joymap files to controllers. Get rid of the 0-4 for 'none', 'numpad', 'keyset A', 'keyset B' and 4+ for whatever controller was plugged in first: change <tt>Joy%d</tt> to strings. || ? || 0% || UUIDs<br />
|-<br />
| Hotkeys (generic) || 1 || Move most of the hotkeys code into <tt>arch/shared</tt> so the hotkey files and the parser can be shared between UIs. The hotkeys code relies on [[UI Actions]], so if we make the hotkeys parser use a callback when it encounters a hotkey definition we can use the hotkeys code for all UIs. For example: <tt>void ui_hotkeys_arch_install_by_map(vhk_map_t *map)</tt>.</tt>.<br><br>See the [https://sourceforge.net/p/vice-emu/code/HEAD/tree/branches/compyx/hotkeys-rework-002/ hotkeys-rework-002] branch for details. || Compyx ||style="background-color: yellow;"|75% || SDL UI actions || Code in <tt>arch/shared/</tt> and <tt>arch/gtk3/</tt> is done. Code in <tt>arch/sdl/</tt> depends on implementing the UI actions in <tt>arch/sdl/</tt>.<br />
|-<br />
|}<br />
<br />
== Reminders ==<br />
<br />
Some leftovers from previous "joysticks" related TODOs. Not strictly related to what we are doing here.<br />
<br />
=== General ===<br />
<br />
* keep in mind there needs to be a way to map both "paddles" and "joysticks"<br />
* Dialogs need to written to handle all of this.<br />
<br />
=== SDL UI ===<br />
<br />
* SDL1/2 joystick mapping improvements<br />
** Make the 'extra joystick options' menu show what they are already mapped to<br />
** Add menu joystick actions mapping support to the 'extra joystick options' menu<br />
<br />
=== GTK3 UI ===<br />
<br />
* '''TODO:''' we need an interface to map controller buttons and axis to joystick emulation, keyboard input and GUI actions<br />
** at this point, make sure the mapping can be different for each connected joystick<br />
** also make sure support for 2nd and 3rd button is handled correctly<br />
<br />
* '''TODO:''' joy-osx.c contains a lot of resources and commandline options that should not be there, but live in common code instead. this needs some refactoring to make game controllers work the same in all ports<br />
** similar for at least joy-unix.c, but commented out<br />
<br />
* in the gtk3 port VICE currently interprets all buttons of a connected joystick as fire button ( https://sourceforge.net/tracker/?func=detail&aid=3292139&group_id=223021&atid=1057620 )<br />
<br />
* in the gtk3 port the 2nd button of C64GS joystick currently only works via keyboard, not real (USB) joysticks<br />
<br />
* when selecting "swap joysticks" or "swap userport joysticks" this will actually swap the related resources, which may be surprising when saving settings and loading them later. it also means its impossible to display whether they are swapped or not in the UI.<br />
: '''TODO''': create a "JoysticksAreSwapped" resource, and update the code accordingly. (This is partially solved in the Gtk3 UI by using two internal states, one for controlports and one for userport, and reflecting the state in the menu with checkboxes)<br />
<br />
* Add gtk3 ui support for the host joystick mapping system.<br />
joyport_map_desc_t *mappings = joyport_get_mapping(port); /* get the mappings for the given port */<br />
char *port_name = joyport_get_port_name(port); /* get the name of the emulated port */<br />
if (joyport_has_mapping(port)) { /* only if the given port has a device that has pins to map */<br />
char *emulated_joystick_device_name = mappings->name; /* get the name of the emulated device in the given port */<br />
if (mappings->pinmap != NULL) { /* only if the device has pin (digital line) mappings */<br />
for (int i = 0; mappings->pinmap[i].name; i++) { /* go through all the pin mappings, if mapping pin name is NULL then we have reached the end */ <br />
char *pin_name = mappings->pinmap[i].name; /* get the pin name */<br />
int pin_nr = mappings->pinmap[i].pin; /* get the pin number */<br />
... /* build host joystick direction/button dialog based on the above info */<br />
}<br />
}<br />
if (mappings->potmap != NULL) { /* only if the device has pot (analog line) mappings */<br />
for (int i = 0; mappings->potmap[i].name; i++) { /* go through all the pot mappings, if mapping pot name is NULL then we have reached the end */ <br />
char *pin_name = mappings->potmap[i].name; /* get the pot name */<br />
int pin_nr = mappings->potmap[i].pin; /* get the pot number */<br />
... /* build host joystick analog axis dialog based on the above info */<br />
}<br />
}<br />
}<br />
: Is the above still valid/relevant? If not, remove! [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 15:15, 25 March 2023 (CET)<br />
<br />
=== Feature Requests ===<br />
<br />
There are a couple open feature requests, some (if not not most) might be solved by the joymapping rework<br />
<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/15/ use second joystick button as auto fire]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/30/ Add support for Paddles and other input devices]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/87/ Only one fire on multiple button joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/116/ Map any emulator function to controller buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/224/ Select Joystick X and Y axis]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/264/ Paddle Controller Support in WinVICE64...?]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/376/ Custom gamepad buttons]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/386/ Use XBox/PS4 controller as multibutton joystick]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/419/ gamepad mapping]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/445/ Improve GTK3/macOS Joystick Compatibility]<br />
* [https://sourceforge.net/p/vice-emu/feature-requests/447/ Paddle input settings]<br />
<br />
== Docs ==<br />
<br />
=== generic API ===<br />
<br />
TODO: Document the API of the generic code here<br />
<br />
=== Source files ===<br />
<br />
TODO: list the relevant files in general section of the code here<br />
TODO: list the relevant files in SDL section of the code here<br />
TODO: list the relevant files in GTK3 section of the code here<br />
<br />
=== Mapping file ===<br />
A line has 4 mandatory columns:<br />
<br />
# joystick number (zero-based index of the hardware joystick)<br />
# input type<br />
## axis<br />
## button<br />
## hat<br />
# input index<br />
#* for buttons, it is the zero-based index of the button<br />
#* for axes<br />
#** if the action is 6 (POT_AXIS), it is the zero-based index of the axis<br />
#** otherwise, 0 and 1 are respectively the positive and negative directions of axis 0; 2 and 3 are respectively the positive and negative directions of axis 1 etc. In formulas: axis=inputindex/2 (integer division), direction = positive if inputindex % 2 ==0 , negative if inputindex % 2 ==1.<br />
#* for hats, 0, 1, 2 and 3 are respectively up, down, left and right of hat 0; 4, 5, 6 and 7 are respectively up, down, left and right of hat 1, etc.<br />
# action (enum <code>joystick_action_t</code> in <code>joystick.h</code>)<br />
<ol start="0"><br />
<li>NONE: none</li><br />
<li>JOYSTICK: emulated joystick action</li><br />
<li>KEYBOARD: emulated keyboard action</li><br />
<li>MAP: SDL-only. Only works while the SDL settings menu is active. If a joystick action mapped to this is performed, the user is asked to press a key, which will become a hotkey to select the currently-selected menu</li><br />
<li>UI_ACTIVATE: go to the settings menu (SDL) show the settings dialog (Gtk3)</li><br />
<li>UI_FUNCTION: shortcut to a specific UI function. '''UNSUPPORTED AT THE MOMENT'''</li><br />
<li>POT_AXIS: (only for axes of hardware joysticks) the analog value of the axis is the value of the emulated potentiometer</li><br />
</ol><br />
<br />
For some actions, more columns are present:<br />
<br />
* JOYSTICK<br />
<ol start="5"><li>emulated joystick pin. Same values as reading the corresponding CIA register.</li><br />
<ol><br />
<li value="1">up</li><br />
<li value="2>down</li><br />
<li value="4">left</li><br />
<li value="8">right</li><br />
<li value="16">fire</li><br />
<li value="32">fire 2</li><br />
<li value="64">fire 3</li><br />
</ol><br />
</ol>Blacky note: In vice we also emulate snes pads, these need to be able to be controlled as well, and so the emulated joystick pin needs to be renamed (more like emulated joystick input) and extended, some of the old pins/inputs can be reused, and in such a case we get the following:<br />
<ol><br />
<li value="1">joystick up / snes pad up</li><br />
<li value="2">joystick down / snes pad down</li><br />
<li value="4">joystick left / snes pad left</li><br />
<li value="8">joystick right / snes pad right</li><br />
<li value="16">joystick fire 1 / snes pad A button</li><br />
<li value="32">joystick fire 2 / snes pad B button</li><br />
<li value="64">joystick fire 3 / snes pad X button</li><br />
<li value="128">snes pad Y button</li><br />
<li value="256">snes pad left bumber</li><br />
<li value="512">snes pad right bumber</li><br />
<li value="1024">snes pad select button</li><br />
<li value="2048">snes pad start button</li><br />
</ol><br />
</ol>And this can be extended if other joystick devices become available with more buttons than we currently map for.<br />
* KEYBOARD<br />
<ol start="5"><br />
<li>row in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li><br />
<li>column in the [https://sta.c64.org/cbm64kbdlay.html keyboard matrix layout]</li></ol><br />
* POT_AXIS<br />
<ol start="5"><li>which potentiometer is affected</li><br />
<ol><br />
<li>Pot-X</li><br />
<li>Pot-Y</li><br />
</ol><br />
</ol><br />
<br />
==== Technical ====<br />
When a hardware joystick action is performed, the selected joystick driver (Gtk3) <code>ui_dispatch_events()</code> (SDL) call <code>joy_axis_event()</code> or <code>joy_button_event()</code> or <code>joy_hat_event()</code>. These functions read what that joystick action is mapped to, and perform the mapped action.<br />
<br />
Mappings are stored in the static array joystick_devices, declared in joystick.c, that has one element per registered hardware joystick. Mappings are stored in each element's axis_mapping, button_mapping and hat_mapping, each an array with one element per axis/button/hat. The mappings are initialised from the joystick mappings file, or with default values if no joystick mappings file is present.<br />
<br />
==== Example ====<br />
Take this sample line from data/C64/sdl_joymap_ps3.vjm<syntaxhighlight lang="abap"><br />
# O -> Space<br />
0 1 1 2 7 4<br />
<br />
</syntaxhighlight>First column: HW joystick 0<br />
<br />
Second column: input type is button (1)<br />
<br />
Third column: input index 1, so button 1<br />
<br />
Fourth column: action KEYBOARD (2)<br />
<br />
Fifth and sixth columns: Space (7 and 4 in the matrix)<br />
<br />
: Does it really make sense to put the number of the hardware joystick into the mapping file? I'd expect i can use the same mapping file for more than one controller [[User:Gpz|Gpz]] ([[User talk:Gpz|talk]]) 19:09, 20 February 2023 (CET)<br />
<br />
<br />
<br />
[[Category:Developer]]<br />
[[Category:TODO]]</div>Compyx