Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Integer scaling method #1352

Closed
midwan opened this issue Jun 11, 2024 · 2 comments
Closed

Implement Integer scaling method #1352

midwan opened this issue Jun 11, 2024 · 2 comments
Assignees

Comments

@midwan
Copy link
Collaborator

midwan commented Jun 11, 2024

Implement Integer scaling mechanism in Amiberry.

It should be possible to select from the GUI, saved to the config file, and even set as the default from amiberry.conf.

Some background info:

WinUAE already has integer scaling, but I think it's only for RTG modes there. We should implement this for all modes.

@midwan midwan self-assigned this Jun 11, 2024
@limi
Copy link

limi commented Jun 11, 2024

Sounds great! Especially combined with Auto-Crop, this should make it possible to get something close to what we do on MiSTer on the scaling front. Count me in for testing.

midwan added a commit that referenced this issue Jun 11, 2024
Added Integer scaling as an option in the Display panel.
This saves to the config file, and can be set in amiberry.conf as well.
The value 2 can be used in the scaling_method option, to set this as the default.
@midwan
Copy link
Collaborator Author

midwan commented Jun 11, 2024

This is now implemented in preview, for further testing.
The Wiki has been updated accordingly: https://github.com/BlitterStudio/amiberry/wiki/Amiberry.conf-options as well.

The GUI has a new option in the Display -> Scaling method dropdown: Integer

Selecting that option, will change the scaling method to Integer scaling, for the emulation screen. This can be combined with Auto-Crop, of course.

Once we're happy with the results, I will merge this to master as well.

midwan added a commit that referenced this issue Jun 11, 2024
When using Integer scaling, the Nearest Neighbor SDL2 hint should be used
midwan added a commit that referenced this issue Jun 11, 2024
midwan added a commit that referenced this issue Jun 11, 2024
@midwan midwan closed this as completed in 7ad7cab Jun 11, 2024
midwan added a commit that referenced this issue Jun 11, 2024
When using Integer scaling, the Nearest Neighbor SDL2 hint should be used
midwan added a commit that referenced this issue Sep 24, 2024
* enhancement: Gayle Null check (merged from WinUAE)

* enhancement: Line 0 A1000 and OCS Agnus strobe fix

* enhancement: OCS Agnus + OCS Denise config also has line 0 visible at the bottom of screen (like A1000)

* Fix base color for Radiobuttons in SaveStates panel (#1293)

* doc: added new option in usage help text (fixes #1319)

* Update PanelChipset.cpp

* bugfix: Always clear the text fields when deleting a config (fixes #1321)

* bugfix: Fullscreen toggle didn't quite work (fixes #1322)

* bugfix: Set right colors for checkboxes that were missed, so that themes work properly on them

* bugfix: Use the right APMODE when toggling full-screen (fixes #1324)

* Use the Default toggle screenmode instead of windowed<->fullscreen

* feat: added window scaling option in amiberry.conf

This option allows you to set the window scaling for the GUI window.
The default option is 1.0, which is the normal 100% scaling.
The value is a float, so you can dynamically set it to whatever you need, depending on your monitor's resolution.

For example, you can set it to:
1.250 = 125%
1.50  = 150%
2.0   = 200%

* enhancement: Fix AGA genlock transparency bit being detected as special blanking bits

(merged from WinUAE)

* refactor: rename gui theme internal variables

* feat: implemented GUI foreground color option for themes

* bugfix: Quickstart - enabling 2nd floppy drive did not refresh panel

* doc: updated help text

the --cdimage option does not change configuration, only inserts the CD. The help text did not clearly reflect that

* bugfix: Make guisan widgets active/inactive status more visible (fixes #1326)

Some widgets were not greyed out when disabled

* enhancement: CPU panel had widgets that were not shown as disabled (#1326)

The MMU and CPU Data Cache options were not visibly disabled as they should

* Remove HighDPI window flag

* bugfix: Fixed textbox background color in Create hardfile dialog (fixes #1327)

* include <string> in CommonBridgeTemplate.h

* refactor: minor tidy in SelectFolderf

* Add stdint.h include in SerialIO.h (fixes compile with newer GCC)

* sync resource.h with upstream

* bugfix: Floppy GUI panel didn't show the select file buttons anymore (fixes #1331)

* refactor: Create plugins directory, use it for external plugins (like floppybridge)

From now on, external libraries such as the CAPSimg.so and libfloppybridge.so, will live in a separate directory named "plugins". This cleans up the main dir from such files.

The new path is added to the GUI (Paths) and config files accordingly. The default value is <start_path>/plugins.

The Makefile will now build floppybridge by default - CAPSimg is a submodule, so it needs to be checked out before it can be built.

MacOS is a special case, since the libs there should be under the Resources folder. So, we're leaving that as-is for now.

* ci: update pipeline with plugin changes

* bugfix: only add the module extension if it's actually missing

* ci: allow floppybridge to use older CMake versions also (3.13 for buster)

* minor tidy

* bugfix: Under KMSDRM the GUI would not open a second time (fixes #1333)

- The window focus was not grabbed when resuming emulation after the GUI, so any subsequent attempt to re-enter the GUI failed.
- Removed single_window_mode option, as it's too buggy and not really worth the trouble.

* refactor: Use CD32 model as a fallback for CD auto-detection (fixes #1325)

Instead of checking for CDTV, then CD32 and as a fallback going for A1200CD, we will look for CDTV and use CD32 as a fallback always.

Most of the titles will be in those two categories anyway, and many might not contain that in the file path, leading to incorrectly trying to boot them (and failing) as an A1200 CD config.

* enhancement: improved console handling in writelog

* bugfix: if console_logging is requested, ensure it's activated always

If console_logging was enabled, but write_logfile was not, then write_log would not show any output.
This changes the behavior so that if console_logging is enabled, we always get output.

* bugfix: Use WHDLoad custom1-5 values if they are not zero (fixes #1328)

Since we always set the default value to zero, this should be safe to use.
Apparently some games do not have some custom fields set, but still use them if specified (e.g. BattleIsle)

* enhancement: ATAPI Write / Mode Select fix (merged from WinUAE)

* enhancement: Serial port undocumented OVRUN behavior emulated. Fast CPU mode + loopback serial port mode fix.

Merged from WinUAE

* Updated version date

* bugfix: the floppy dropdown wasn't updated properly after a selection (fixes #1334)

* refactor: Use "Plugins" directory for macOS

* Resize and center icon

* Leave .so files in Resources for macOS, otherwise dlopen doesn't find them

* Try to fix extension .so being added under macOS always

* Revert "Resize and center icon"

This reverts commit 5386f2b.

* enhancement: Set config name automatically for CD images as well (fixes #1336)

When Floppies or WHDLoad archives are inserted from the Quickstart panel, the last active config name is updated to the filename used.
This did not apply to CD images however.

This commit fixes that behavior, so it's consistent across all types of disk images.

* feat: Added button to Create new folder in the dialogs (fixes #1329)

A new button is now available in the Select File/Folder dialogs: Create Folder

This allows the user to create a new directory inside the currently selected one.

* bugfix: Fixed CD dropdown did not refresh properly (fixes #1337)

When selecting a new CD image, the items in the dropdown did not refresh as expected in the Quickstart panel.
This worked correctly in the HD/CD panel.

Also synced the behavior a bit between the two panels.

* bugfix: Fixed plugins directory name in macOS script

* refactor: Remove CreateFolder button from SelectFile (fixes #1338)

There's no need to Create a new folder, when you're about to select a File

* ci: CMake will now copy libfloppybridge.so into plugins when finished

* ci: add the new folders in flatpak as well

* Updated version date

* build: fix CMake copy of floppybridge lib destination path

* ci: avoid relative paths for placing floppybridge library

Apparently, this won't work everywhere - flatpak failed with the relative paths

* ci: change destination of floppybridge library

It should be the top-level source dir, not the floppybridge one

* Try to fix the relative path once more

* Revert "Try to fix the relative path once more"

This reverts commit 9946d56.

* Revert "ci: change destination of floppybridge library"

This reverts commit af14d19.

* ci: change copying of floppybridge lib, do it on the root CMake file instead

* ci: Removed Buster platforms from pipeline targets

Debian Buster is EOL soon, might as well remove it from the pipelines

* Update README.md

Minor updates, to indicate dropping support for Buster

* Add keywords to .desktop file (#1342)

These are also used by Flathub, KDE Discover and Gnome Software

* enhancement: Improve WHDLoad config handling

* bugfix: load any .uae config after parsing the XML settings, not before (fixes #1343)

* ci: copy lib into plugins after the dir is created

* bugfix: Fixed crash when saving config files (fixes #1345)

* enhancement: When selecting CD32 model, set joystick port to CD32 also (fixes #1346)

* Updated version to 6.3.2

* doc: Updated help text in Input panel (fixes #1349)

* Update README.md

* Update README.md

* Change gui_always_on_top to true, by default (fixes #1351)

Set the GUI to be always on top by default.
This should help with cases where we are in Full screen mode, and sometimes the GUI opens behind the emulation screen.

* feat: Implemented Integer scaling (fixes #1352)

Added Integer scaling as an option in the Display panel.
This saves to the config file, and can be set in amiberry.conf as well.
The value 2 can be used in the scaling_method option, to set this as the default.

* Package macOS bundles on each build

* fix integer scaling was blurry (#1352)

When using Integer scaling, the Nearest Neighbor SDL2 hint should be used

* only enable GUI always on top, if we have fullscreen by default (#1351)

We don't want the GUI to be always on top in Windowed mode also

* improve integer scaling (#1352)

* Remove obsolete option from amiberry.conf

* Revert "improve integer scaling (#1352)"

This reverts commit f3db2f2.

* Don't set GUI always on top, try to raise the GUI window when it opens, instead (#1351)

* build: ensure the floppybridge build is completed, before attempting to copy the lib

* feat: implemented Resolution Autoswitch option

This option comes from WinUAE, and when enabled, allows the automatic selection between horizontal LowRes/HiRes and vertical Single/Double line modes

* enhancement: auto-crop scaling improvements, for integer scaling

When we use Integer scaling, we don't want the width/height doubled during autocrop.
One exception to that is when we have HiRes horizontally, and single line mode (where we need to double the height, in order to keep the aspect ratio correct)

* bring back HighDPI support on windows

This was removed as a test, but it didn't make a difference

* enhancement: make "System Default" sound card option the default

The System Default will now be enabled by default, as it seems to work best for most cases.
If you want another sound output device selected, you can always change that.

Config files should not be affected anyway, this is just a more sensible default.

* bump version to 6.3.3

* enhancement: GUI window improvements

- Set window to always on top, if we're running it in Full-window
- RaiseWindow later in the process

* bugfix: keyboard and mouse was not always grabbed (#1351)

When going from GUI->Emulation repeatedly, sometimes the input was not grabbed as expected

* bugfix: don't grab mouse/keyboard in the GUI window (fixes #1357)

* Update README.md

Added Ko-Fi support button

* bugfix: VKBD would not show if Auto-Crop was enabled

When Auto-Crop was enabled, the texture size was changed. However, VKBD did not update the X/Y coordinates it uses, so the image it showed could happen to be off-screen.

* ci: Rename macOS M1 to macOS Apple Silicon

* ci: fix apple silicon build

* bugfix: Custom controls would not get loaded when starting from cmd line (fixes #1355)

When starting Amiberry from the command line, with one of the autoload options, if a config file was found and loaded, the custom controls would never be applied.
When doing the same from the GUI, it worked, but only by accident.

The jports ID was set to -1 by default_prefs for all ports, in the currprefs structure. This didn't apply to changed_prefs, which had the default values of 0 for those fields. When using the GUI, which always applied settings to changed_prefs, it would work by accident since the ID happened to be zero, which also is the first available joystick in the did struct.

Additionally, SDL2 detected a JOYSTICK INSERTED/REMOVED event after startup, which triggered the initialization of joysticks, which in turn loaded the default mapping back on them, overwriting any custom mapping previously loaded.

To fix the above, some refactoring was needed:
- Disabled the detection of JOYSTICK INSERTED/REMOVED during emulation. This is still triggered when the GUI is open.
- Set the first two ports (0 and 1) to their default IDs for Mouse and first Joystick. This is diverging from WinUAE's defaults, but I think it will work out fine for us
- Moved the loading of custom controls outside of cfgfile.cpp and into amiberry_input.cpp, where it belongs. This makes it easier to read, since it's not part of that huge parse_host function.
- Fixed the loading of custom controls to apply to the uae_prefs struct passed into it, instead of always on currprefs, as it was before.
- Added logical checks to ensure the port we're working on is valid (not and id of -1) and within the Joystick ports (value 0-8). We don't want to bother with unmapped ports or mouse ports.
- Some more minor refactoring and cleanup was done around those areas as well.

* enhancement: Make GUI window follow the same logic as the emulation one (#1351)

- If KMSDRM is detected, set the mode to FULL-WINDOW
- If a resolution less than 800x600 is detected, go for Full-window as well
- Otherwise, we'll follow the settings requested regarding Windowed/Fullscreen/Full-window mode

* feat: Added default option to control resolution autoswitch from amiberry.conf

This option helps get the best results out of integer scaling, in combination with auto-crop and full-window modes

* Updated version date

* Change Full-screen toggle behavior - use full-window <-> window (#1351)

Let's prefer Full-window instead of Fullscreen, to avoid screenmode changes on the monitor

* refactor: return to previous approach: GUI window is always Windowed, except on KMSDRM (#1351)

Due to how modern Window Managers handle things, if we open the GUI in full-window while the emulation screen is also opened in full-window, the second one gets minimized. That means that when we resume from the GUI, we don't get back to the emulation screen, even if we call for SDL_RaiseWindow() - it gets ignored.

To resolve this, I'm reverting this behavior to the previous approach: The GUI is always Windowed, and opens on top of the emulation screen. The exception is when we're using KMSDRM, which doesn't have the notion of windows.

But under KMSDRM we might run into a similar problem as well, so that needs a separate solution.

* Update c-cpp.yml

Try adding a `brew upgrade` step

* Update c-cpp.yml

* Update c-cpp.yml

* Update c-cpp.yml

* bugfix: Fix KMSDRM problems when switching between GUI -> emulation (fixes #1351)

The emulation screen would not get the focus always, when resuming from the GUI, if running under KMSDRM.
Removed the code that checked if the window had focus, and instead trying to grab it right away now.

It still sometimes doesn't get it (not sure why), but at least you can click on it once and resume properly now.

* bugfix: when loading custom mapping, skip the check for isrealbutton (#1355)

* refactor: Refactored target_cfgfile_load

* Updated version date

* refactor: remove more checks for isrealbutton from controller mapping (#1355)

* refactor: added some more logging in target_cfgfile_load function (#1355)

* refactor: accept .uae config files in cmd line, even if they are not the last item (#1355)

uae config files and savestates were only accepted from the command line, if they were the last parameters. If we however wanted to include -G after them (to hide the GUI), they would not get loaded.

* Updated version date

* build: add USE_GPIOD in CMakeLists.txt also

* Remove some entries from CMakeSettings.json

* bugfix: store joystick GUID, use it to check before re-importing joysticks (#1355)

* feat: Auto-detect MT32 titles in whdbooter

Auto-detect any titles supporting MT32 MIDI output in WHDBooter, and enable the relevant feature in Amiberry (if the ROMs are installed).
This currently works based on the filename (it has to contain the word "MT32"), as it's not included in the XML.
Not many title supported MT32, so maybe this is good enough.

* Updated version date

* Merged latest WinUAE updates

Added support for Picmatic Tierras Salvajes and Marbella Vice

* Update README.md

* bugfix: fixed typo in Sound panel (fixes #1369)

* refactor: use string.empty()

* enhancement: Added VSync options from WinUAE in Display panel (#1368)

Added the WinUAE VSync options for Native and RTG as dropdowns, instead of the single checkbox we had before.
The Lagless modes are not implemented, not even sure we can do that in SDL2.
The other modes work the same way as in WinUAE.

Amiberry still uses V-Sync internally for the SDL_Presenter, so this only changes what is passed internally in the emulation. These options only make sense to enable if the monitor is already set to the right refresh rate - i.e. don't enable if your monitor only does 60Hz and you want to emulate a PAL machine (which needs 50).

* bugfix: Fixed changing logfile name would append "amiberry.log" at the end

The SelectFile dialog had an incorrect filter setting, which ended up appending the whole default filename instead of only the ".log" extension, if it wasn't found.

* refactor: slight refactor of mapping from retroarch function

* bugfix: joystick input didn't work with retroarch mapping after latest changes (#1363)

* Bumped version to 6.3.4

* Macos folder changes (#1373)

* refactor: use separate dir for amiberry.conf and data under macOS (#1372)

Moving the contents of the data folder and amiberry.conf, under <user>/Library/Application Support/Amiberry for macOS platforms

* Fix capsimg (#1374)

* Remove capsimg submodule

* Add capsimg sources

* Add dependencies in Makefile and CMakeLists.txt to build libcapsimage.so

* Fix path in makefile

* Add libs to make clean also

* Automatically build capsimg as well

* Remove extra step to build capsimg from pipeline

* bugfix: Fixed new/free mismatch in amiberry_filesys (#1387)

* bugfix: Fixed display modes iteration (fixes #1394)

* enhancement: Make Paths panel textboxes read-only (fixes #1385)

* bugfix: always refresh floppy/quickstart panels after disk changes (fixes #1378)

* bugfix: Refresh all panels when WHDLoad action from Quickstart is taken (fixes #1383)

* Add FPS Adjustment options to the Display panel (#1399)

* enhancement: Add FPS Adjustment options to the Display panel (fixes #1397)

* Fix build under macOS

* Updated version date

* bugfix: Fix Picmatic (100Hz TV only) light gun positioning in lores or shres resolutions

* bugfix: Fix duplicated Golem SCSI II / HD3000 name prefix.

* bugfix: Always clear intreq2 in audio state 5.

* enhancement: add secondary check when loading cfg files, look in configs folder for filename (fixes #1388)

* enhancement: resample audio during Push operations (#1397)

* bugfix: detect uppercase MT32 filenames also (fixes #1386) (#1400)

* Updated XML to latest version

* Improve macOS instructions (fixes #1382)

* enhancement: fix inconsistency regarding default config name (fixes #1395)

* Minor sync with WinUAE

No functional changes, just minimizing diffs from WinUAE sources

* Another round of syncs to WinUAE

* enhancement: GUI - Make read-only textboxes in WHDLoad panel show as such (fixes #1403)

Make the read-only text boxes show as such (disabled), since no user input is supported there

* Updated version date

* Minor sync with WinUAE

* enhancement: updated FloppyBridge to v1.6.4

* Updated version date

* enhancement: updated game controller DB to latest version

* enhancement: updated WHDLoad XML to latest version

* bugfix: don't refresh the emulation screen when GUI is open, under KMSDRM (#1401)

* bugfix: Don't replace spaces in native_dos_op

With the newer version of host-run (v1.6 onwards), this should not be necessary anymore

* bugfix: Fixed bug under KMSDRM, where the emulation screen would not show (#1401)

Under KMSDRM, if you started Amiberry from the command line with the -G parameter, and you entered the GUI once, resuming would not show the emulation screen.

* bugfix: remove newlines from debugger input (#1407)

The "fd" command didn't work in the debugger. This was because the "d"
was followed in the input buffer by \n rather than \0.

The Windows version of console_get replaces the terminating \r with \0.
amiberry's version uses fgets, which doesn't do this; it did adjust the
length value returned, but the debugger code doesn't look at the length.

Make it actually strip the newline characters when adjusting the length.

* bugfix: release window grab in the debugger (#1406)

When the debugger is entered with Shift-F12, this function is called to
release the mouse pointer. The second argument to SDL_SetWindowGrab
should be SDL_FALSE to disable the grab; previously, both _acquire and
_release had SDL_TRUE, which enables the grab.

* enhancement: improve help text in Misc panel (fixes #1408)

* Revert "enhancement: resample audio during Push operations (#1397)"

This reverts commit a70dd17.

* enhancement: auto-select the first item in the Configs list (fixes #1391)

If we have items in the Configs list, automatically select the first one.

* enhancement: Log command line parameters on startup (fixes #1380)

If logging is enabled, also log the full command line used to start up

* enhancement: harmonize buttons in HDD GUI panel

Change label on Add Directory, to indicate it also supports archives.
Harmonize the widths of those buttons.
Improve label on CD select image file.

* Added CMakePresets.json

* enhancement: use string.empty() instead of comparing with ""

* bugfix: When using KMSDRM, controller input was lost after entering the GUI once (fixes #1384)

This seems to be caused by SDL2 when using KMSDRM only, as it works properly under X.
As a workaround, I'm changing the logic to keep only a single window and renderer when KMSDRM is detected.

* Updated version date

* bugfix: KMSDRM fixes for when using a single window (fixes #1411)

Disable integer scaling when opening the GUI, trigger an update of scaling options when resuming

* enhancement: separate data from home directories, improve handling (fixes #1073)

- Separate DATA from HOME directories
- Use special ENV variables to override locations: AMIBERRY_DATA_DIR and AMIBERRY_HOME_DIR respectively
- Use the standard Linux locations if the env variables are not set: /usr/share/amiberry/data for the DATA folder, and $HOME/.amiberry for the HOME folder
- Fallback to the Portable mode used before, if all the above fail

* enhancement: Fix new paths logic for Flatpak also (#1073)

* enhancement: improve look of GUI Misc panel scrollbar (fixes #1412)

* 1376 add a3000 scsi controller and tape support for amiga unix amix (#1414)

* enhancement: added CD and Tape drive buttons

Added new buttons in the GUI: HDD panel, for handling CD and Tape drives.

* Refactoring of GUI HD Panel

- Added TapeDrive option
- Refactored GUI panels to look more like WinUAE
- Refactored functionality to closer match that of WinUAE

* bugfix: Fixes for HDD panel windows

* bugfix: Fixed default paths in dialogs

* enhancement: Harmonize TapeDrive dialog logic with others

Set the default path (harddrives) if no path is configured, before opening the dialog

* enhancement: Updated Create HF dialog

- The dialog will now only create HDFs, not add them as well

* enhancement: fix navigation in Create HDF dialog

* enhancement: Added Special Monitors support

* enhancement: Added special monitors support in GUI

* enhancement: fixed navigation for Tape Drive and other HDD panel dialogs

* enhancement: improvements in the Add HardDrive dialog

Added controller, unit, type and feature level dropdowns

* enhancement: fixed navigation in Panel Harddrive

* disable button that's not implemented yet

* Updated version date

* ci: Remove Manjaro RPI4 target from releases

Only AmiKit was using that, and it moved to Debian12 with the new update

* refactor: Move "abr" under plugins directory

- Handle "abr" as one of the plugins, instead of having it living on a directory in the home dir.
- Moved directory, updated paths and macOS scripts accordingly.
- get_plugin_path() now returns the actual plugins path

* enhancement: expanded DBus support with new events

New DBus events added:
- Insert Floppy
- Insert CD

* enhancement: added one more native lib path

Added /usr/lib/amiberry as one more native lib search path

* enhancement: Added option to use JST instead of WHDLoad binary

In case someone needs this, there is now an option to use JST instead of WHDLoad for the Booter.

use_jst_instead_of_whd (boolean)

The option is saved in the global configuration of amiberry.conf and when enabled, will switch out the startup-sequence references from WHDLoad to JST, including any differences in options.

The old AMOS-based booter is not changed with this.

* enhancement: add filetype associations under macOS

Handle .uae, .adf and .lha files with Amiberry, under macOS

* bugfix: Fixed various glitches in SelectFile dialog (fixes #1417)

- Do not attempt to scroll if the items are less than 32, as they fit in the screen already
- Show the selected item in the text field
- Allow existing files to be selected and used, even when the "createNew" flag is set
- Fixed path building, it would always append to the existing string
- Fixed string assignment in changeDir

* enhancement: always show horizontal scrollbar in Selectfile dialog (fixes #1415)

* build(deps): bump actions/download-artifact in /.github/workflows (#1419)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.1.2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* enhancement: upgrade libguisan to latest version, fix various bugs

Guisan has been getting several updates lately, improving and fixing various bugs.
Upgrading to the current version, but keeping my own improvements until I've had time to push them upstream

* bugfix: Listboxes would not resize in width (fixes #1415)

* enhancement: Guisan: Window widget needs to draw frame in inverted colors

* bugfix: Fixed guisan theme colors (fixes #1420)

* bugfix: Some Textboxes should not have a frame drawn

* enhancement: Guisan: improve widget help text

* bugfix: Fixed capitalization in RAM panel (fixes #1422)

* enhancement: apply scaling factor to emulation window also (fixes #1421)

* enhancement: Guisan updates

Added Text class, refactored textbox, textfield etc.

* bugfix: Fixed slider background color after guisan updates

* bugfix: Fix CPU speed slider scale, when Fastest Possible was selected

* enhancement: added .bin, .cdtv and .cd32 as valid rom extensions

* bugfix: fixed dropdown and checkbox colors when disabled

* bugfix: text widget should clear previous rows when setting context

* bugfix: macOS Bundle name should be Amiberry

* cleanup: remove CMakeSettings.json (obsolete)

This is no longer needed, as we're using CMakePresets.json instead

* enhancement: Check if the GUI theme font has the full path also

- If the gui_theme.font_name contains the full path to the font, open it from there directly. This means we can now use system fonts as well, from /usr/share/fonts/...
- If the filename is not found, then try to open it from the data directory, as before

* ci: added Debian files

* build: added CMake install section

* build: change paths for cmake install

* build: added install targets for guisan and floppybridge

* build: ensure external libs are built before binary under CMake

* build: added CPack support

* chore: guisan: harmonize all files to use spaces and same line endings

* enhancement: guisan: radiobutton and togglebutton fixes

These widgets didn't use the proper disabled color

* enhancement: guisan: fix remaining widgets colors

These widgets were also missing their disabled color

* enhancement: guisan: clang tidy, use const when possible

* bugfix: Fixed navigation in Sound panel

It wasn't possible to navigate into the Sound panel, since the first control (dropdown at the top) was disabled by default.

* enhancement: add support for XDG_CONFIG_HOME (fixes #1425)

Added logic to pick up the config directory, from the first match of the following:
- $AMIBERY_CONFIG_DIR
- $XDG_CONFIG_HOME/amiberry
- $HOME/.config/amiberry
- $HOME/.amiberry/conf

if none of the above is found, the fallback is the current logic (portable mode, <current dir>/conf)

* enhancement: Gracefully handle iconv failures

If iconv_open() fails for some reason, do not fail completely but instead try to copy the entries verbatim.

* bugfix: Refresh RTG panel when CPU changes are modified

- The 24-bit addressing option blocks RTG cards from being used. When it's disabled, the RTG panel should refresh, to enable any relevant widgets
- Fixed navigation in RTG panel (the VRAM slider could not be accessed)

* chore: remove unneeded ifdef

* Big bang winuae merge (#1428)

* enhancement: Merge more WinUAE code

- Added PPC
- Added PCEM
- Added PCI
- Added MAME (A2410 and TM34010)
- Added QEMU (various gfx cards, network cards, SCSI, etc)
- Enabled relevant ifdefs

* enhancement: Added luascript, slirp_uae

- Removed unused ersatz
- Added luascript (disabled for now, needs an extra library)
- Added slirp_uae (disabled for now)
- Added sources for separate tool "uaeunp"

* enhancement: Added DSP emulation

- Added DSP emulation files from WinUAE, with slight modifications (disabled for now)

* enhancement: Enabled TabletLibrary, DSP, Draco

Not implemented on the GUI yet, but enabled related ifdefs in the code

* enhancement: Added SANA2 support

Not visible on the GUI yet

* enhancement: sync includes and other details with WinUAE

* enhancement: added support for more RTG boards

* bugfix: added missing arm/arm64 headers for pcem codegen_backend

WinUAE didn't have these, so let's grab them from PCem v16 directly

* enhancement: Fixed defines in picasso96.cpp

* bugfix: Maybe we should actually sleep for a few ms in sleep_millis2

* enhancement: P96 - added ifdefs where Amiberry-specific pieces are added

* chore: sync time/rpt headers with WinUAE

* chore: reduce the lines of ifdefs in ahi_v2

* enhancement: use SDL_Delay instead of waiting for the cpu_wakeup_event

* perf: only call init_row_map if the pixels have changed

* enhancement: Added GVP T-Rex II

Merged from WinUAE

* enhancement: Added DKB WildFire v1.0 and Masoboshi v2.197

Merged from WinUAE

* enhancement: Flush trap queues during reset.

* bugfix: Added missing S3 Virge PCI byteswap mode

Merged from WinUAE

* perf: Do not unnecessarily call SetCursor() continuously.

* bugfix: Fixed uae_sem_unpost

This should be SemPost, not SemWait

* enhancement: Allow 16-bit only if D3D9 is selected.

Merged from WinUAE - Amiberry uses gfx_api value 2 anyway.

* bugfix: Fix SPRxPOS modification just before horizontal match if sprite had lowest horizontal bit set.

Merged from WinUAE

* enhancement: Both COPxJMP strobe emulation update

Merged from WinUAE

* enhancement: Serial emulation updates, more accurate transmit timing, receive timing is not anymore instant except in direct mode.

Merged from WinUAE

* enhancement: OpalVision undocumented horizontal panning emulation

address load was ignored if it was included in second control line.

* perf: Reduce amount of read_processor_time() calls.

Merged from WinUAE

* build: updated makefile with new files

* enhancement: added PPC options to GUI

* enhancement: added MapROM option in GUI

* bugfix: GUI RAM Panel did not highlight selected items properly

* enhancement: added label in Input panel for Parallel Port joystick adapter

The label should make it more clear that the last two ports are for the emulated parallel port joystick adapter

* enhancement: GUI listbox inactive color improvement

The guisan listbox would use an inactive color of a fixed value.
It should use something from the color scheme, instead.

* enhancement: added more models and configs in Quickstart

* build: set the compiler standard higher in the Makefile

* bugfix: fix ambiguous variable names

* ci: avoid using named initializers in file, otherwise we run into a GCC bug

This code won't compile with older GCC versions, due to a known bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227

* ci: fixed voodo file as well (see previous commit reason)

* ci: fixed one more file with named initializers

* ci: upgrade the minimum CMake version for capsimage

Get rid of a warning about older CMake versions being deprecated soon

* ci: change SDL_ttf include in sdltruetypefont.hpp

* ci: updated more SDL includes in guisan

* ci: Cmake builds would fail if started under a subdir (#1430)

* ci: Cmake builds would fail if started under a subdir

* ci: add cmake files needed for bullseye

* ci: updated macOS include directories

* ci: fix compiler error under clang/macOS

* ci: remove unused linker flag

* ci: add cmake in macOS homebrew

* chore: fix compiler warnings in calc

Well, most of them anyway

* Revert "build: set the compiler standard higher in the Makefile"

This reverts commit e822fe8.

* bugfix: Editing entries in HD GUI panel was broken

* ci: ensure Apple ARM builds don't detect both arm32 and arm64 defines

* ci: more Cmake files for MacOS

* ci: macos fixes, guisan should be static

* ci: cleanup makefile macos targets

* ci: fix macos apple silicon flags

* ci: fix cmake linker flags for macos

* ci: more macos Makefile fixes

* ci: MacOS fix - remove rt lib from linker in Makefile

* ci: MacOS fixes - Remove one more lib from the linker in the Makefile

* ci: MacOS Makefile fixes: link to iconv

* ci: Fixed typo

* chore: make it clear that these flags are for ARM builds only

* ci: Remove cmake and wget from MacOS homebrew runner

these are already installed in the runner environment anyway

* ci: remove autoconf from macos homebrew runner as well

* ci: Fix capsimg filename for MacOS

* Update make-bundle.sh

* Remove unnecessary architecture detection

* First imports of toolchain files for cross-compiling

* Yet another fix for CMake that will help both OSX and Debian Bullseye

* Cmake packaging (#1431)

* modify CMakeLists.txt to be able to build packages for MacOS and Linux

* Moved pull request template to .github dir

* Moved code of conduct file under .github directory

* Removed gitmodules file

* Moved install extra dirs to only if we're not building an Apple bundle

* Added first version of a Deb package option to CPack

* Fixed double directory creation during installation/packaging

* Remove debian directory

We won't be using this, going for CPack instead

* Fixed package version

* Clean up contents of packages

* Fix dependencies and filename of .deb package

* Bump version to 6.3.5

* Add desktop file for Deb package

* Remove archive generator, the DEB one is good enough

* Change pipeline to use CMake for Linux targets

Let's generate some .deb files!
This is most likely missing stuff, like the distro name...

* Fix incorrect architecture names in cross-compiler

* Fix 32-bit arm package architecture

* ci: Allow 32-bit arm builds

* ci: disable the bullseye builds for now

Until we figure out a solution with Bullseye + CMake + SDL2_image/SDL2_ttf

* ci: fix expected targets

* ci: bring back bullseye builds

* Remove path from desktop shortcut

* Fixed typo in comment

* Set the version in the Project, use that for CPack

* Updated compiled and linker flags with no-pie properly

- There were some differences between the Makefile flags and CMake. Now they are identical
- Updated the Findmpg123.cmake file with the latest one from upstream

* Include bullseye build targets again

* Increase GFX MAX_RTG_Boards to 4 as it looks like Picasso96 code is expecting 4 not the 1 listed. (#1434)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
Co-authored-by: Adam Sampson <ats-github@offog.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Solskogen <christer.solskogen@gmail.com>
Co-authored-by: BluewizardNet <ryan@bluewizard.net>
midwan added a commit that referenced this issue Sep 24, 2024
* enhancement: OCS Agnus + OCS Denise config also has line 0 visible at the bottom of screen (like A1000)

* Fix base color for Radiobuttons in SaveStates panel (#1293)

* doc: added new option in usage help text (fixes #1319)

* Update PanelChipset.cpp

* bugfix: Always clear the text fields when deleting a config (fixes #1321)

* bugfix: Fullscreen toggle didn't quite work (fixes #1322)

* bugfix: Set right colors for checkboxes that were missed, so that themes work properly on them

* bugfix: Use the right APMODE when toggling full-screen (fixes #1324)

* Use the Default toggle screenmode instead of windowed<->fullscreen

* feat: added window scaling option in amiberry.conf

This option allows you to set the window scaling for the GUI window.
The default option is 1.0, which is the normal 100% scaling.
The value is a float, so you can dynamically set it to whatever you need, depending on your monitor's resolution.

For example, you can set it to:
1.250 = 125%
1.50  = 150%
2.0   = 200%

* enhancement: Fix AGA genlock transparency bit being detected as special blanking bits

(merged from WinUAE)

* refactor: rename gui theme internal variables

* feat: implemented GUI foreground color option for themes

* bugfix: Quickstart - enabling 2nd floppy drive did not refresh panel

* doc: updated help text

the --cdimage option does not change configuration, only inserts the CD. The help text did not clearly reflect that

* bugfix: Make guisan widgets active/inactive status more visible (fixes #1326)

Some widgets were not greyed out when disabled

* enhancement: CPU panel had widgets that were not shown as disabled (#1326)

The MMU and CPU Data Cache options were not visibly disabled as they should

* Remove HighDPI window flag

* bugfix: Fixed textbox background color in Create hardfile dialog (fixes #1327)

* include <string> in CommonBridgeTemplate.h

* refactor: minor tidy in SelectFolderf

* Add stdint.h include in SerialIO.h (fixes compile with newer GCC)

* sync resource.h with upstream

* bugfix: Floppy GUI panel didn't show the select file buttons anymore (fixes #1331)

* refactor: Create plugins directory, use it for external plugins (like floppybridge)

From now on, external libraries such as the CAPSimg.so and libfloppybridge.so, will live in a separate directory named "plugins". This cleans up the main dir from such files.

The new path is added to the GUI (Paths) and config files accordingly. The default value is <start_path>/plugins.

The Makefile will now build floppybridge by default - CAPSimg is a submodule, so it needs to be checked out before it can be built.

MacOS is a special case, since the libs there should be under the Resources folder. So, we're leaving that as-is for now.

* ci: update pipeline with plugin changes

* bugfix: only add the module extension if it's actually missing

* ci: allow floppybridge to use older CMake versions also (3.13 for buster)

* minor tidy

* bugfix: Under KMSDRM the GUI would not open a second time (fixes #1333)

- The window focus was not grabbed when resuming emulation after the GUI, so any subsequent attempt to re-enter the GUI failed.
- Removed single_window_mode option, as it's too buggy and not really worth the trouble.

* refactor: Use CD32 model as a fallback for CD auto-detection (fixes #1325)

Instead of checking for CDTV, then CD32 and as a fallback going for A1200CD, we will look for CDTV and use CD32 as a fallback always.

Most of the titles will be in those two categories anyway, and many might not contain that in the file path, leading to incorrectly trying to boot them (and failing) as an A1200 CD config.

* enhancement: improved console handling in writelog

* bugfix: if console_logging is requested, ensure it's activated always

If console_logging was enabled, but write_logfile was not, then write_log would not show any output.
This changes the behavior so that if console_logging is enabled, we always get output.

* bugfix: Use WHDLoad custom1-5 values if they are not zero (fixes #1328)

Since we always set the default value to zero, this should be safe to use.
Apparently some games do not have some custom fields set, but still use them if specified (e.g. BattleIsle)

* enhancement: ATAPI Write / Mode Select fix (merged from WinUAE)

* enhancement: Serial port undocumented OVRUN behavior emulated. Fast CPU mode + loopback serial port mode fix.

Merged from WinUAE

* Updated version date

* bugfix: the floppy dropdown wasn't updated properly after a selection (fixes #1334)

* refactor: Use "Plugins" directory for macOS

* Resize and center icon

* Leave .so files in Resources for macOS, otherwise dlopen doesn't find them

* Try to fix extension .so being added under macOS always

* Revert "Resize and center icon"

This reverts commit 5386f2b.

* enhancement: Set config name automatically for CD images as well (fixes #1336)

When Floppies or WHDLoad archives are inserted from the Quickstart panel, the last active config name is updated to the filename used.
This did not apply to CD images however.

This commit fixes that behavior, so it's consistent across all types of disk images.

* feat: Added button to Create new folder in the dialogs (fixes #1329)

A new button is now available in the Select File/Folder dialogs: Create Folder

This allows the user to create a new directory inside the currently selected one.

* bugfix: Fixed CD dropdown did not refresh properly (fixes #1337)

When selecting a new CD image, the items in the dropdown did not refresh as expected in the Quickstart panel.
This worked correctly in the HD/CD panel.

Also synced the behavior a bit between the two panels.

* bugfix: Fixed plugins directory name in macOS script

* refactor: Remove CreateFolder button from SelectFile (fixes #1338)

There's no need to Create a new folder, when you're about to select a File

* ci: CMake will now copy libfloppybridge.so into plugins when finished

* ci: add the new folders in flatpak as well

* Updated version date

* build: fix CMake copy of floppybridge lib destination path

* ci: avoid relative paths for placing floppybridge library

Apparently, this won't work everywhere - flatpak failed with the relative paths

* ci: change destination of floppybridge library

It should be the top-level source dir, not the floppybridge one

* Try to fix the relative path once more

* Revert "Try to fix the relative path once more"

This reverts commit 9946d56.

* Revert "ci: change destination of floppybridge library"

This reverts commit af14d19.

* ci: change copying of floppybridge lib, do it on the root CMake file instead

* ci: Removed Buster platforms from pipeline targets

Debian Buster is EOL soon, might as well remove it from the pipelines

* Update README.md

Minor updates, to indicate dropping support for Buster

* Add keywords to .desktop file (#1342)

These are also used by Flathub, KDE Discover and Gnome Software

* enhancement: Improve WHDLoad config handling

* bugfix: load any .uae config after parsing the XML settings, not before (fixes #1343)

* ci: copy lib into plugins after the dir is created

* bugfix: Fixed crash when saving config files (fixes #1345)

* enhancement: When selecting CD32 model, set joystick port to CD32 also (fixes #1346)

* Updated version to 6.3.2

* doc: Updated help text in Input panel (fixes #1349)

* Update README.md

* Update README.md

* Change gui_always_on_top to true, by default (fixes #1351)

Set the GUI to be always on top by default.
This should help with cases where we are in Full screen mode, and sometimes the GUI opens behind the emulation screen.

* feat: Implemented Integer scaling (fixes #1352)

Added Integer scaling as an option in the Display panel.
This saves to the config file, and can be set in amiberry.conf as well.
The value 2 can be used in the scaling_method option, to set this as the default.

* Package macOS bundles on each build

* fix integer scaling was blurry (#1352)

When using Integer scaling, the Nearest Neighbor SDL2 hint should be used

* only enable GUI always on top, if we have fullscreen by default (#1351)

We don't want the GUI to be always on top in Windowed mode also

* improve integer scaling (#1352)

* Remove obsolete option from amiberry.conf

* Revert "improve integer scaling (#1352)"

This reverts commit f3db2f2.

* Don't set GUI always on top, try to raise the GUI window when it opens, instead (#1351)

* build: ensure the floppybridge build is completed, before attempting to copy the lib

* feat: implemented Resolution Autoswitch option

This option comes from WinUAE, and when enabled, allows the automatic selection between horizontal LowRes/HiRes and vertical Single/Double line modes

* enhancement: auto-crop scaling improvements, for integer scaling

When we use Integer scaling, we don't want the width/height doubled during autocrop.
One exception to that is when we have HiRes horizontally, and single line mode (where we need to double the height, in order to keep the aspect ratio correct)

* bring back HighDPI support on windows

This was removed as a test, but it didn't make a difference

* enhancement: make "System Default" sound card option the default

The System Default will now be enabled by default, as it seems to work best for most cases.
If you want another sound output device selected, you can always change that.

Config files should not be affected anyway, this is just a more sensible default.

* bump version to 6.3.3

* enhancement: GUI window improvements

- Set window to always on top, if we're running it in Full-window
- RaiseWindow later in the process

* bugfix: keyboard and mouse was not always grabbed (#1351)

When going from GUI->Emulation repeatedly, sometimes the input was not grabbed as expected

* bugfix: don't grab mouse/keyboard in the GUI window (fixes #1357)

* Update README.md

Added Ko-Fi support button

* bugfix: VKBD would not show if Auto-Crop was enabled

When Auto-Crop was enabled, the texture size was changed. However, VKBD did not update the X/Y coordinates it uses, so the image it showed could happen to be off-screen.

* ci: Rename macOS M1 to macOS Apple Silicon

* ci: fix apple silicon build

* bugfix: Custom controls would not get loaded when starting from cmd line (fixes #1355)

When starting Amiberry from the command line, with one of the autoload options, if a config file was found and loaded, the custom controls would never be applied.
When doing the same from the GUI, it worked, but only by accident.

The jports ID was set to -1 by default_prefs for all ports, in the currprefs structure. This didn't apply to changed_prefs, which had the default values of 0 for those fields. When using the GUI, which always applied settings to changed_prefs, it would work by accident since the ID happened to be zero, which also is the first available joystick in the did struct.

Additionally, SDL2 detected a JOYSTICK INSERTED/REMOVED event after startup, which triggered the initialization of joysticks, which in turn loaded the default mapping back on them, overwriting any custom mapping previously loaded.

To fix the above, some refactoring was needed:
- Disabled the detection of JOYSTICK INSERTED/REMOVED during emulation. This is still triggered when the GUI is open.
- Set the first two ports (0 and 1) to their default IDs for Mouse and first Joystick. This is diverging from WinUAE's defaults, but I think it will work out fine for us
- Moved the loading of custom controls outside of cfgfile.cpp and into amiberry_input.cpp, where it belongs. This makes it easier to read, since it's not part of that huge parse_host function.
- Fixed the loading of custom controls to apply to the uae_prefs struct passed into it, instead of always on currprefs, as it was before.
- Added logical checks to ensure the port we're working on is valid (not and id of -1) and within the Joystick ports (value 0-8). We don't want to bother with unmapped ports or mouse ports.
- Some more minor refactoring and cleanup was done around those areas as well.

* enhancement: Make GUI window follow the same logic as the emulation one (#1351)

- If KMSDRM is detected, set the mode to FULL-WINDOW
- If a resolution less than 800x600 is detected, go for Full-window as well
- Otherwise, we'll follow the settings requested regarding Windowed/Fullscreen/Full-window mode

* feat: Added default option to control resolution autoswitch from amiberry.conf

This option helps get the best results out of integer scaling, in combination with auto-crop and full-window modes

* Updated version date

* Change Full-screen toggle behavior - use full-window <-> window (#1351)

Let's prefer Full-window instead of Fullscreen, to avoid screenmode changes on the monitor

* refactor: return to previous approach: GUI window is always Windowed, except on KMSDRM (#1351)

Due to how modern Window Managers handle things, if we open the GUI in full-window while the emulation screen is also opened in full-window, the second one gets minimized. That means that when we resume from the GUI, we don't get back to the emulation screen, even if we call for SDL_RaiseWindow() - it gets ignored.

To resolve this, I'm reverting this behavior to the previous approach: The GUI is always Windowed, and opens on top of the emulation screen. The exception is when we're using KMSDRM, which doesn't have the notion of windows.

But under KMSDRM we might run into a similar problem as well, so that needs a separate solution.

* Update c-cpp.yml

Try adding a `brew upgrade` step

* Update c-cpp.yml

* Update c-cpp.yml

* Update c-cpp.yml

* bugfix: Fix KMSDRM problems when switching between GUI -> emulation (fixes #1351)

The emulation screen would not get the focus always, when resuming from the GUI, if running under KMSDRM.
Removed the code that checked if the window had focus, and instead trying to grab it right away now.

It still sometimes doesn't get it (not sure why), but at least you can click on it once and resume properly now.

* bugfix: when loading custom mapping, skip the check for isrealbutton (#1355)

* refactor: Refactored target_cfgfile_load

* Updated version date

* refactor: remove more checks for isrealbutton from controller mapping (#1355)

* refactor: added some more logging in target_cfgfile_load function (#1355)

* refactor: accept .uae config files in cmd line, even if they are not the last item (#1355)

uae config files and savestates were only accepted from the command line, if they were the last parameters. If we however wanted to include -G after them (to hide the GUI), they would not get loaded.

* Updated version date

* build: add USE_GPIOD in CMakeLists.txt also

* Remove some entries from CMakeSettings.json

* bugfix: store joystick GUID, use it to check before re-importing joysticks (#1355)

* feat: Auto-detect MT32 titles in whdbooter

Auto-detect any titles supporting MT32 MIDI output in WHDBooter, and enable the relevant feature in Amiberry (if the ROMs are installed).
This currently works based on the filename (it has to contain the word "MT32"), as it's not included in the XML.
Not many title supported MT32, so maybe this is good enough.

* Updated version date

* Merged latest WinUAE updates

Added support for Picmatic Tierras Salvajes and Marbella Vice

* Update README.md

* bugfix: fixed typo in Sound panel (fixes #1369)

* refactor: use string.empty()

* enhancement: Added VSync options from WinUAE in Display panel (#1368)

Added the WinUAE VSync options for Native and RTG as dropdowns, instead of the single checkbox we had before.
The Lagless modes are not implemented, not even sure we can do that in SDL2.
The other modes work the same way as in WinUAE.

Amiberry still uses V-Sync internally for the SDL_Presenter, so this only changes what is passed internally in the emulation. These options only make sense to enable if the monitor is already set to the right refresh rate - i.e. don't enable if your monitor only does 60Hz and you want to emulate a PAL machine (which needs 50).

* bugfix: Fixed changing logfile name would append "amiberry.log" at the end

The SelectFile dialog had an incorrect filter setting, which ended up appending the whole default filename instead of only the ".log" extension, if it wasn't found.

* refactor: slight refactor of mapping from retroarch function

* bugfix: joystick input didn't work with retroarch mapping after latest changes (#1363)

* Bumped version to 6.3.4

* Macos folder changes (#1373)

* refactor: use separate dir for amiberry.conf and data under macOS (#1372)

Moving the contents of the data folder and amiberry.conf, under <user>/Library/Application Support/Amiberry for macOS platforms

* Fix capsimg (#1374)

* Remove capsimg submodule

* Add capsimg sources

* Add dependencies in Makefile and CMakeLists.txt to build libcapsimage.so

* Fix path in makefile

* Add libs to make clean also

* Automatically build capsimg as well

* Remove extra step to build capsimg from pipeline

* bugfix: Fixed new/free mismatch in amiberry_filesys (#1387)

* bugfix: Fixed display modes iteration (fixes #1394)

* enhancement: Make Paths panel textboxes read-only (fixes #1385)

* bugfix: always refresh floppy/quickstart panels after disk changes (fixes #1378)

* bugfix: Refresh all panels when WHDLoad action from Quickstart is taken (fixes #1383)

* Add FPS Adjustment options to the Display panel (#1399)

* enhancement: Add FPS Adjustment options to the Display panel (fixes #1397)

* Fix build under macOS

* Updated version date

* bugfix: Fix Picmatic (100Hz TV only) light gun positioning in lores or shres resolutions

* bugfix: Fix duplicated Golem SCSI II / HD3000 name prefix.

* bugfix: Always clear intreq2 in audio state 5.

* enhancement: add secondary check when loading cfg files, look in configs folder for filename (fixes #1388)

* enhancement: resample audio during Push operations (#1397)

* bugfix: detect uppercase MT32 filenames also (fixes #1386) (#1400)

* Updated XML to latest version

* Improve macOS instructions (fixes #1382)

* enhancement: fix inconsistency regarding default config name (fixes #1395)

* Minor sync with WinUAE

No functional changes, just minimizing diffs from WinUAE sources

* Another round of syncs to WinUAE

* enhancement: GUI - Make read-only textboxes in WHDLoad panel show as such (fixes #1403)

Make the read-only text boxes show as such (disabled), since no user input is supported there

* Updated version date

* Minor sync with WinUAE

* enhancement: updated FloppyBridge to v1.6.4

* Updated version date

* enhancement: updated game controller DB to latest version

* enhancement: updated WHDLoad XML to latest version

* bugfix: don't refresh the emulation screen when GUI is open, under KMSDRM (#1401)

* bugfix: Don't replace spaces in native_dos_op

With the newer version of host-run (v1.6 onwards), this should not be necessary anymore

* bugfix: Fixed bug under KMSDRM, where the emulation screen would not show (#1401)

Under KMSDRM, if you started Amiberry from the command line with the -G parameter, and you entered the GUI once, resuming would not show the emulation screen.

* bugfix: remove newlines from debugger input (#1407)

The "fd" command didn't work in the debugger. This was because the "d"
was followed in the input buffer by \n rather than \0.

The Windows version of console_get replaces the terminating \r with \0.
amiberry's version uses fgets, which doesn't do this; it did adjust the
length value returned, but the debugger code doesn't look at the length.

Make it actually strip the newline characters when adjusting the length.

* bugfix: release window grab in the debugger (#1406)

When the debugger is entered with Shift-F12, this function is called to
release the mouse pointer. The second argument to SDL_SetWindowGrab
should be SDL_FALSE to disable the grab; previously, both _acquire and
_release had SDL_TRUE, which enables the grab.

* enhancement: improve help text in Misc panel (fixes #1408)

* Revert "enhancement: resample audio during Push operations (#1397)"

This reverts commit a70dd17.

* enhancement: auto-select the first item in the Configs list (fixes #1391)

If we have items in the Configs list, automatically select the first one.

* enhancement: Log command line parameters on startup (fixes #1380)

If logging is enabled, also log the full command line used to start up

* enhancement: harmonize buttons in HDD GUI panel

Change label on Add Directory, to indicate it also supports archives.
Harmonize the widths of those buttons.
Improve label on CD select image file.

* Added CMakePresets.json

* enhancement: use string.empty() instead of comparing with ""

* bugfix: When using KMSDRM, controller input was lost after entering the GUI once (fixes #1384)

This seems to be caused by SDL2 when using KMSDRM only, as it works properly under X.
As a workaround, I'm changing the logic to keep only a single window and renderer when KMSDRM is detected.

* Updated version date

* bugfix: KMSDRM fixes for when using a single window (fixes #1411)

Disable integer scaling when opening the GUI, trigger an update of scaling options when resuming

* enhancement: separate data from home directories, improve handling (fixes #1073)

- Separate DATA from HOME directories
- Use special ENV variables to override locations: AMIBERRY_DATA_DIR and AMIBERRY_HOME_DIR respectively
- Use the standard Linux locations if the env variables are not set: /usr/share/amiberry/data for the DATA folder, and $HOME/.amiberry for the HOME folder
- Fallback to the Portable mode used before, if all the above fail

* enhancement: Fix new paths logic for Flatpak also (#1073)

* enhancement: improve look of GUI Misc panel scrollbar (fixes #1412)

* 1376 add a3000 scsi controller and tape support for amiga unix amix (#1414)

* enhancement: added CD and Tape drive buttons

Added new buttons in the GUI: HDD panel, for handling CD and Tape drives.

* Refactoring of GUI HD Panel

- Added TapeDrive option
- Refactored GUI panels to look more like WinUAE
- Refactored functionality to closer match that of WinUAE

* bugfix: Fixes for HDD panel windows

* bugfix: Fixed default paths in dialogs

* enhancement: Harmonize TapeDrive dialog logic with others

Set the default path (harddrives) if no path is configured, before opening the dialog

* enhancement: Updated Create HF dialog

- The dialog will now only create HDFs, not add them as well

* enhancement: fix navigation in Create HDF dialog

* enhancement: Added Special Monitors support

* enhancement: Added special monitors support in GUI

* enhancement: fixed navigation for Tape Drive and other HDD panel dialogs

* enhancement: improvements in the Add HardDrive dialog

Added controller, unit, type and feature level dropdowns

* enhancement: fixed navigation in Panel Harddrive

* disable button that's not implemented yet

* Updated version date

* ci: Remove Manjaro RPI4 target from releases

Only AmiKit was using that, and it moved to Debian12 with the new update

* refactor: Move "abr" under plugins directory

- Handle "abr" as one of the plugins, instead of having it living on a directory in the home dir.
- Moved directory, updated paths and macOS scripts accordingly.
- get_plugin_path() now returns the actual plugins path

* enhancement: expanded DBus support with new events

New DBus events added:
- Insert Floppy
- Insert CD

* enhancement: added one more native lib path

Added /usr/lib/amiberry as one more native lib search path

* enhancement: Added option to use JST instead of WHDLoad binary

In case someone needs this, there is now an option to use JST instead of WHDLoad for the Booter.

use_jst_instead_of_whd (boolean)

The option is saved in the global configuration of amiberry.conf and when enabled, will switch out the startup-sequence references from WHDLoad to JST, including any differences in options.

The old AMOS-based booter is not changed with this.

* enhancement: add filetype associations under macOS

Handle .uae, .adf and .lha files with Amiberry, under macOS

* bugfix: Fixed various glitches in SelectFile dialog (fixes #1417)

- Do not attempt to scroll if the items are less than 32, as they fit in the screen already
- Show the selected item in the text field
- Allow existing files to be selected and used, even when the "createNew" flag is set
- Fixed path building, it would always append to the existing string
- Fixed string assignment in changeDir

* enhancement: always show horizontal scrollbar in Selectfile dialog (fixes #1415)

* build(deps): bump actions/download-artifact in /.github/workflows (#1419)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.1.2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* enhancement: upgrade libguisan to latest version, fix various bugs

Guisan has been getting several updates lately, improving and fixing various bugs.
Upgrading to the current version, but keeping my own improvements until I've had time to push them upstream

* bugfix: Listboxes would not resize in width (fixes #1415)

* enhancement: Guisan: Window widget needs to draw frame in inverted colors

* bugfix: Fixed guisan theme colors (fixes #1420)

* bugfix: Some Textboxes should not have a frame drawn

* enhancement: Guisan: improve widget help text

* bugfix: Fixed capitalization in RAM panel (fixes #1422)

* enhancement: apply scaling factor to emulation window also (fixes #1421)

* enhancement: Guisan updates

Added Text class, refactored textbox, textfield etc.

* bugfix: Fixed slider background color after guisan updates

* bugfix: Fix CPU speed slider scale, when Fastest Possible was selected

* enhancement: added .bin, .cdtv and .cd32 as valid rom extensions

* bugfix: fixed dropdown and checkbox colors when disabled

* bugfix: text widget should clear previous rows when setting context

* bugfix: macOS Bundle name should be Amiberry

* cleanup: remove CMakeSettings.json (obsolete)

This is no longer needed, as we're using CMakePresets.json instead

* enhancement: Check if the GUI theme font has the full path also

- If the gui_theme.font_name contains the full path to the font, open it from there directly. This means we can now use system fonts as well, from /usr/share/fonts/...
- If the filename is not found, then try to open it from the data directory, as before

* ci: added Debian files

* build: added CMake install section

* build: change paths for cmake install

* build: added install targets for guisan and floppybridge

* build: ensure external libs are built before binary under CMake

* build: added CPack support

* chore: guisan: harmonize all files to use spaces and same line endings

* enhancement: guisan: radiobutton and togglebutton fixes

These widgets didn't use the proper disabled color

* enhancement: guisan: fix remaining widgets colors

These widgets were also missing their disabled color

* enhancement: guisan: clang tidy, use const when possible

* bugfix: Fixed navigation in Sound panel

It wasn't possible to navigate into the Sound panel, since the first control (dropdown at the top) was disabled by default.

* enhancement: add support for XDG_CONFIG_HOME (fixes #1425)

Added logic to pick up the config directory, from the first match of the following:
- $AMIBERY_CONFIG_DIR
- $XDG_CONFIG_HOME/amiberry
- $HOME/.config/amiberry
- $HOME/.amiberry/conf

if none of the above is found, the fallback is the current logic (portable mode, <current dir>/conf)

* enhancement: Gracefully handle iconv failures

If iconv_open() fails for some reason, do not fail completely but instead try to copy the entries verbatim.

* bugfix: Refresh RTG panel when CPU changes are modified

- The 24-bit addressing option blocks RTG cards from being used. When it's disabled, the RTG panel should refresh, to enable any relevant widgets
- Fixed navigation in RTG panel (the VRAM slider could not be accessed)

* chore: remove unneeded ifdef

* Big bang winuae merge (#1428)

* enhancement: Merge more WinUAE code

- Added PPC
- Added PCEM
- Added PCI
- Added MAME (A2410 and TM34010)
- Added QEMU (various gfx cards, network cards, SCSI, etc)
- Enabled relevant ifdefs

* enhancement: Added luascript, slirp_uae

- Removed unused ersatz
- Added luascript (disabled for now, needs an extra library)
- Added slirp_uae (disabled for now)
- Added sources for separate tool "uaeunp"

* enhancement: Added DSP emulation

- Added DSP emulation files from WinUAE, with slight modifications (disabled for now)

* enhancement: Enabled TabletLibrary, DSP, Draco

Not implemented on the GUI yet, but enabled related ifdefs in the code

* enhancement: Added SANA2 support

Not visible on the GUI yet

* enhancement: sync includes and other details with WinUAE

* enhancement: added support for more RTG boards

* bugfix: added missing arm/arm64 headers for pcem codegen_backend

WinUAE didn't have these, so let's grab them from PCem v16 directly

* enhancement: Fixed defines in picasso96.cpp

* bugfix: Maybe we should actually sleep for a few ms in sleep_millis2

* enhancement: P96 - added ifdefs where Amiberry-specific pieces are added

* chore: sync time/rpt headers with WinUAE

* chore: reduce the lines of ifdefs in ahi_v2

* enhancement: use SDL_Delay instead of waiting for the cpu_wakeup_event

* perf: only call init_row_map if the pixels have changed

* enhancement: Added GVP T-Rex II

Merged from WinUAE

* enhancement: Added DKB WildFire v1.0 and Masoboshi v2.197

Merged from WinUAE

* enhancement: Flush trap queues during reset.

* bugfix: Added missing S3 Virge PCI byteswap mode

Merged from WinUAE

* perf: Do not unnecessarily call SetCursor() continuously.

* bugfix: Fixed uae_sem_unpost

This should be SemPost, not SemWait

* enhancement: Allow 16-bit only if D3D9 is selected.

Merged from WinUAE - Amiberry uses gfx_api value 2 anyway.

* bugfix: Fix SPRxPOS modification just before horizontal match if sprite had lowest horizontal bit set.

Merged from WinUAE

* enhancement: Both COPxJMP strobe emulation update

Merged from WinUAE

* enhancement: Serial emulation updates, more accurate transmit timing, receive timing is not anymore instant except in direct mode.

Merged from WinUAE

* enhancement: OpalVision undocumented horizontal panning emulation

address load was ignored if it was included in second control line.

* perf: Reduce amount of read_processor_time() calls.

Merged from WinUAE

* build: updated makefile with new files

* enhancement: added PPC options to GUI

* enhancement: added MapROM option in GUI

* bugfix: GUI RAM Panel did not highlight selected items properly

* enhancement: added label in Input panel for Parallel Port joystick adapter

The label should make it more clear that the last two ports are for the emulated parallel port joystick adapter

* enhancement: GUI listbox inactive color improvement

The guisan listbox would use an inactive color of a fixed value.
It should use something from the color scheme, instead.

* enhancement: added more models and configs in Quickstart

* build: set the compiler standard higher in the Makefile

* bugfix: fix ambiguous variable names

* ci: avoid using named initializers in file, otherwise we run into a GCC bug

This code won't compile with older GCC versions, due to a known bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55227

* ci: fixed voodo file as well (see previous commit reason)

* ci: fixed one more file with named initializers

* ci: upgrade the minimum CMake version for capsimage

Get rid of a warning about older CMake versions being deprecated soon

* ci: change SDL_ttf include in sdltruetypefont.hpp

* ci: updated more SDL includes in guisan

* ci: Cmake builds would fail if started under a subdir (#1430)

* ci: Cmake builds would fail if started under a subdir

* ci: add cmake files needed for bullseye

* ci: updated macOS include directories

* ci: fix compiler error under clang/macOS

* ci: remove unused linker flag

* ci: add cmake in macOS homebrew

* chore: fix compiler warnings in calc

Well, most of them anyway

* Revert "build: set the compiler standard higher in the Makefile"

This reverts commit e822fe8.

* bugfix: Editing entries in HD GUI panel was broken

* ci: ensure Apple ARM builds don't detect both arm32 and arm64 defines

* ci: more Cmake files for MacOS

* ci: macos fixes, guisan should be static

* ci: cleanup makefile macos targets

* ci: fix macos apple silicon flags

* ci: fix cmake linker flags for macos

* ci: more macos Makefile fixes

* ci: MacOS fix - remove rt lib from linker in Makefile

* ci: MacOS fixes - Remove one more lib from the linker in the Makefile

* ci: MacOS Makefile fixes: link to iconv

* ci: Fixed typo

* chore: make it clear that these flags are for ARM builds only

* ci: Remove cmake and wget from MacOS homebrew runner

these are already installed in the runner environment anyway

* ci: remove autoconf from macos homebrew runner as well

* ci: Fix capsimg filename for MacOS

* Update make-bundle.sh

* Remove unnecessary architecture detection

* First imports of toolchain files for cross-compiling

* Yet another fix for CMake that will help both OSX and Debian Bullseye

* Cmake packaging (#1431)

* modify CMakeLists.txt to be able to build packages for MacOS and Linux

* Moved pull request template to .github dir

* Moved code of conduct file under .github directory

* Removed gitmodules file

* Moved install extra dirs to only if we're not building an Apple bundle

* Added first version of a Deb package option to CPack

* Fixed double directory creation during installation/packaging

* Remove debian directory

We won't be using this, going for CPack instead

* Fixed package version

* Clean up contents of packages

* Fix dependencies and filename of .deb package

* Bump version to 6.3.5

* Add desktop file for Deb package

* Remove archive generator, the DEB one is good enough

* Change pipeline to use CMake for Linux targets

Let's generate some .deb files!
This is most likely missing stuff, like the distro name...

* Fix incorrect architecture names in cross-compiler

* Fix 32-bit arm package architecture

* ci: Allow 32-bit arm builds

* ci: disable the bullseye builds for now

Until we figure out a solution with Bullseye + CMake + SDL2_image/SDL2_ttf

* ci: fix expected targets

* ci: bring back bullseye builds

* Remove path from desktop shortcut

* Fixed typo in comment

* Set the version in the Project, use that for CPack

* Updated compiled and linker flags with no-pie properly

- There were some differences between the Makefile flags and CMake. Now they are identical
- Updated the Findmpg123.cmake file with the latest one from upstream

* Include bullseye build targets again

* Increase GFX MAX_RTG_Boards to 4 as it looks like Picasso96 code is expecting 4 not the 1 listed. (#1434)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
Co-authored-by: Adam Sampson <ats-github@offog.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Solskogen <christer.solskogen@gmail.com>
Co-authored-by: BluewizardNet <ryan@bluewizard.net>
Co-authored-by: Dimitris Panokostas <dimitris.panokostas@norce.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants