vice-emu-commit Mailing List for VICE
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
(60) |
Jun
(122) |
Jul
(148) |
Aug
(178) |
Sep
(151) |
Oct
(131) |
Nov
(208) |
Dec
(129) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(193) |
Feb
(209) |
Mar
(221) |
Apr
(243) |
May
(165) |
Jun
(168) |
Jul
(198) |
Aug
(161) |
Sep
(103) |
Oct
(98) |
Nov
(168) |
Dec
(99) |
| 2010 |
Jan
(263) |
Feb
(156) |
Mar
(57) |
Apr
(93) |
May
(85) |
Jun
(124) |
Jul
(57) |
Aug
(58) |
Sep
(113) |
Oct
(148) |
Nov
(114) |
Dec
(193) |
| 2011 |
Jan
(200) |
Feb
(207) |
Mar
(91) |
Apr
(91) |
May
(142) |
Jun
(104) |
Jul
(115) |
Aug
(137) |
Sep
(266) |
Oct
(91) |
Nov
(85) |
Dec
(186) |
| 2012 |
Jan
(98) |
Feb
(146) |
Mar
(160) |
Apr
(99) |
May
(59) |
Jun
(257) |
Jul
(84) |
Aug
(103) |
Sep
(169) |
Oct
(206) |
Nov
(90) |
Dec
(296) |
| 2013 |
Jan
(294) |
Feb
(130) |
Mar
(36) |
Apr
(14) |
May
(51) |
Jun
(74) |
Jul
(180) |
Aug
(85) |
Sep
(26) |
Oct
(45) |
Nov
(29) |
Dec
(21) |
| 2014 |
Jan
(56) |
Feb
(40) |
Mar
(57) |
Apr
(30) |
May
(31) |
Jun
(11) |
Jul
(107) |
Aug
(135) |
Sep
(142) |
Oct
(195) |
Nov
(139) |
Dec
(133) |
| 2015 |
Jan
(293) |
Feb
(161) |
Mar
(146) |
Apr
(85) |
May
(139) |
Jun
(51) |
Jul
(21) |
Aug
(24) |
Sep
(29) |
Oct
(136) |
Nov
(212) |
Dec
(118) |
| 2016 |
Jan
(119) |
Feb
(165) |
Mar
(229) |
Apr
(219) |
May
(134) |
Jun
(119) |
Jul
(134) |
Aug
(236) |
Sep
(203) |
Oct
(215) |
Nov
(300) |
Dec
(140) |
| 2017 |
Jan
(188) |
Feb
(20) |
Mar
(147) |
Apr
(198) |
May
(26) |
Jun
(21) |
Jul
(67) |
Aug
(219) |
Sep
(209) |
Oct
(194) |
Nov
(144) |
Dec
(99) |
| 2018 |
Jan
(139) |
Feb
(122) |
Mar
(116) |
Apr
(85) |
May
(232) |
Jun
(181) |
Jul
(190) |
Aug
(105) |
Sep
(92) |
Oct
(178) |
Nov
(105) |
Dec
(86) |
| 2019 |
Jan
(119) |
Feb
(79) |
Mar
(74) |
Apr
(117) |
May
(115) |
Jun
(307) |
Jul
(107) |
Aug
(131) |
Sep
(103) |
Oct
(60) |
Nov
(118) |
Dec
(70) |
| 2020 |
Jan
(114) |
Feb
(103) |
Mar
(77) |
Apr
(121) |
May
(193) |
Jun
(110) |
Jul
(214) |
Aug
(210) |
Sep
(179) |
Oct
(260) |
Nov
(237) |
Dec
(334) |
| 2021 |
Jan
(163) |
Feb
(186) |
Mar
(58) |
Apr
(81) |
May
(108) |
Jun
(175) |
Jul
(154) |
Aug
(180) |
Sep
(217) |
Oct
(204) |
Nov
(232) |
Dec
(190) |
| 2022 |
Jan
(253) |
Feb
(134) |
Mar
(229) |
Apr
(190) |
May
(125) |
Jun
(70) |
Jul
(8) |
Aug
(22) |
Sep
(19) |
Oct
(33) |
Nov
(94) |
Dec
(164) |
| 2023 |
Jan
(158) |
Feb
(366) |
Mar
(272) |
Apr
(109) |
May
(198) |
Jun
(226) |
Jul
(200) |
Aug
(94) |
Sep
(108) |
Oct
(62) |
Nov
(175) |
Dec
(116) |
| 2024 |
Jan
(35) |
Feb
(40) |
Mar
(51) |
Apr
(89) |
May
(24) |
Jun
(26) |
Jul
(53) |
Aug
(71) |
Sep
(23) |
Oct
(11) |
Nov
(22) |
Dec
(58) |
| 2025 |
Jan
(26) |
Feb
(40) |
Mar
(107) |
Apr
(39) |
May
(35) |
Jun
(20) |
Jul
(11) |
Aug
(24) |
Sep
(35) |
Oct
(19) |
Nov
|
Dec
|
|
From: <pot...@us...> - 2025-10-23 19:50:34
|
Revision: 45799
http://sourceforge.net/p/vice-emu/code/45799
Author: pottendo
Date: 2025-10-23 19:50:31 +0000 (Thu, 23 Oct 2025)
Log Message:
-----------
added FunMP3 dir select GTK3 widget, fixed crashes
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_userport.c
trunk/vice/src/arch/shared/archdep_glob.c
trunk/vice/src/arch/shared/archdep_glob.h
trunk/vice/src/userport/userport_funmp3.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_userport.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_userport.c 2025-10-21 21:02:10 UTC (rev 45798)
+++ trunk/vice/src/arch/gtk3/widgets/settings_userport.c 2025-10-23 19:50:31 UTC (rev 45799)
@@ -15,6 +15,7 @@
* $VICERES WIC64Resetuser x64 x64sc xscpu64 x128 xvic
* $VICERES WIC64Timezone x64 x64sc xscpu64 x128 xvic
* $VICERES WIC64RemoteTimeout x64 x64sc xscpu64 x128 xvic
+ * $VICERES FunMP3Dir x64 x64sc xscpu64 x128 xvic xpet
*
* The following resources are not user-configurable, but set indirectly via
* the WiC64 code, so we list them here for `gtk3-resources.py` to find:
@@ -97,6 +98,10 @@
#endif
+#if defined(USE_MPG123) && defined(HAVE_GLOB_H)
+static GtkWidget *funmp3_save = NULL;
+#endif
+
/** \brief Create left-aligned label with Pango markup
*
* \param[in] markup text using Pango markup
@@ -164,6 +169,11 @@
gtk_widget_set_sensitive(wic64_save, id == USERPORT_DEVICE_WIC64);
}
#endif
+#if defined(USE_MPG123) && defined(HAVE_GLOB_H)
+ if (funmp3_save != NULL) {
+ gtk_widget_set_sensitive(funmp3_save, id == USERPORT_DEVICE_FUNMP3);
+ }
+#endif
}
/** \brief Handler for the 'changed' event of the device combobox
@@ -345,7 +355,6 @@
return combo;
}
-
#ifdef HAVE_LIBCURL
/** \brief Create widget for the "WIC64Logenabled" resource
@@ -430,6 +439,88 @@
}
#endif
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+/* FunMP3 path selection widget */
+#include "mainlock.h"
+
+/** \brief Callback for the directory-select dialog
+ *
+ * \param[in] dialog directory-select dialog
+ * \param[in] filename filename (NULL if canceled)
+ * \param[in] entry entry box for the filename
+ */
+static void funmp3dir_browse_callback(GtkDialog *dialog, gchar *filename, gpointer entry)
+{
+ if (filename != NULL) {
+ vice_gtk3_resource_entry_set(GTK_WIDGET(entry), filename);
+ g_free(filename);
+ }
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+}
+
+/** \brief Handler for the 'clicked' event of the FunMP3 directory browse button
+ *
+ * \param[in] button FunMP3 directory browse button (unused)
+ * \param[in] entry FunMP3 directory text entry
+ */
+static void on_funmp3dir_browse_clicked(GtkWidget *button, gpointer entry)
+{
+ GtkWidget *dialog;
+
+ mainlock_assert_is_not_vice_thread();
+
+ dialog = vice_gtk3_select_directory_dialog("Select FunMP3 directory",
+ NULL,
+ TRUE,
+ NULL,
+ funmp3dir_browse_callback,
+ entry);
+ gtk_widget_show_all(dialog);
+}
+
+/** \brief Create FunMP3 path selection entry widget
+ *
+ */
+static GtkWidget *create_funmp3dir_entry_widget(void)
+{
+ GtkWidget *entry;
+ entry = vice_gtk3_resource_entry_new("FunMP3Dir");
+ gtk_widget_set_tooltip_text(entry,
+ "Select the host directory for MP3 files");
+ gtk_widget_set_hexpand(entry, TRUE);
+ return entry;
+}
+
+/** \brief Create FunMP3 path selection widget
+ *
+ */
+static GtkWidget *create_funmp3dir_widget(void)
+{
+ GtkWidget *grid;
+ GtkWidget *entry;
+ GtkWidget *label;
+ GtkWidget *browse;
+
+ grid = vice_gtk3_grid_new_spaced(8, 0);
+
+ label = gtk_label_new("FunMP3 directory");
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
+ entry = create_funmp3dir_entry_widget();
+ browse = gtk_button_new_with_label("Browse ...");
+ g_signal_connect_unlocked(browse,
+ "clicked",
+ G_CALLBACK(on_funmp3dir_browse_clicked),
+ (gpointer)entry);
+ gtk_grid_attach(GTK_GRID(grid), label, 0, 1, 1, 1);
+ gtk_grid_attach(GTK_GRID(grid), entry, 1, 1, 1, 1);
+ gtk_grid_attach(GTK_GRID(grid), browse, 2, 1, 1, 1);
+
+ gtk_widget_show_all(grid);
+ return grid;
+}
+
+#endif /* MPG123 && HAVE_GLOB_H */
+
/** \brief Handler for the 'clicked' event of the 'reset' buttons
*
* \param[in] widget button triggering the event
@@ -643,6 +734,24 @@
break;
}
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ /* FunMP3 widget for userport featured machine, except cbm */
+ switch (machine_class) {
+ case VICE_MACHINE_C64: /* fall through */
+ case VICE_MACHINE_C64SC: /* fall through */
+ case VICE_MACHINE_SCPU64: /* fall through */
+ case VICE_MACHINE_C128: /* fall through */
+ case VICE_MACHINE_VIC20: /* fall through */
+ case VICE_MACHINE_PET: /* fall through */
+ funmp3_save = create_funmp3dir_widget();
+ gtk_grid_attach(GTK_GRID(grid), funmp3_save, 0, row, 2, 1);
+ row++;
+ break;
+ default:
+ break;
+ }
+#endif
+
/* PET userport diagnostic pin */
if (machine_class == VICE_MACHINE_PET) {
diag_pin_active = create_diag_pin_active_widget();
Modified: trunk/vice/src/arch/shared/archdep_glob.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_glob.c 2025-10-21 21:02:10 UTC (rev 45798)
+++ trunk/vice/src/arch/shared/archdep_glob.c 2025-10-23 19:50:31 UTC (rev 45799)
@@ -52,7 +52,7 @@
static char *fh[1];
/* expects an absolute path for pattern and many glob() functions are NOT implemented */
-int glob(const char *pattern, int flags, void *errfunc, glob_t *pglob)
+int archdep_glob(const char *pattern, int flags, void *errfunc, glob_t *pglob)
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
@@ -81,7 +81,7 @@
return 0;
}
-void globfree(glob_t *pglob)
+void archdep_globfree(glob_t *pglob)
{
lib_free(pglob->gl_pathv[0]);
}
Modified: trunk/vice/src/arch/shared/archdep_glob.h
===================================================================
--- trunk/vice/src/arch/shared/archdep_glob.h 2025-10-21 21:02:10 UTC (rev 45798)
+++ trunk/vice/src/arch/shared/archdep_glob.h 2025-10-23 19:50:31 UTC (rev 45799)
@@ -37,6 +37,8 @@
#if defined(UNIX_COMPILE)
#if defined (HAVE_GLOB_H)
#include <glob.h>
+#define archdep_glob glob
+#define archdep_globfree globfree
#endif
#endif
@@ -50,8 +52,8 @@
} glob_t;
/* expects an absolute path for pattern and many glob() functions are NOT implemented */
-int glob(const char *pattern, int flags, void *errfunc, glob_t *pglob);
-void globfree(glob_t *pglob);
+int archdep_glob(const char *pattern, int flags, void *errfunc, glob_t *pglob);
+void archdep_globfree(glob_t *pglob);
#endif
Modified: trunk/vice/src/userport/userport_funmp3.c
===================================================================
--- trunk/vice/src/userport/userport_funmp3.c 2025-10-21 21:02:10 UTC (rev 45798)
+++ trunk/vice/src/userport/userport_funmp3.c 2025-10-23 19:50:31 UTC (rev 45799)
@@ -170,7 +170,7 @@
static int funmp3_sound_machine_calculate_samples(sound_t **psid, int16_t *pbuf, int nr, int soc, int scc, CLOCK *delta_t)
{
- int i, j, rem;
+ size_t i, j, rem;
int16_t sample;
int res = 0;
if (!mp3_playing) {
@@ -182,8 +182,9 @@
put remaining samples to the front and decode new chunk */
if (rem > 0) {
/* copy unconsumed samples to the front */
- for (i = act_pos, j = 0; i < size; i++, j++)
+ for (i = act_pos, j = 0; i < size; i++, j++) {
buf[j] = buf[i];
+ }
}
act_pos = 0;
ret = mpg123_read(mh, (unsigned char *)bufr + (rem * sizeof(int16_t)),
@@ -211,7 +212,7 @@
res = nr;
} else {
log_error(lh, "mpg123_read() error: %d", ret);
- exit(1);
+ res = 0;
}
if (ret == MPG123_DONE) {
funmp3_stop();
@@ -255,13 +256,13 @@
snprintf(fn, ARCHDEP_PATH_MAX, "%05d*", val);
}
archdep_expand_path(&fn_abs, fn);
- if ((glob(fn_abs, 0, NULL, &results) != 0) ||
+ if ((archdep_glob(fn_abs, 0, NULL, &results) != 0) ||
(results.gl_pathc < 1)) {
log_message(lh, "can't open '%s'", fn_abs);
return;
}
mp3_name = lib_strdup(results.gl_pathv[0]);
- globfree(&results);
+ archdep_globfree(&results);
log_message(lh, "request to play '%s'", mp3_name);
mpg123_close(mh);
@@ -303,7 +304,7 @@
if (mh) {
mpg123_close(mh);
}
- mp3_playing = 0;
+ mp3_playing = act_pos = size = 0;
set_userport_flag(0);
}
@@ -364,6 +365,7 @@
mp3_last = 0;
return;
}
+ funmp3_stop();
mp3_last = val; /* the default is to repeat */
funmp3_start(255 - val); /* that's how it is defined */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-21 21:02:11
|
Revision: 45798
http://sourceforge.net/p/vice-emu/code/45798
Author: pottendo
Date: 2025-10-21 21:02:10 +0000 (Tue, 21 Oct 2025)
Log Message:
-----------
added glob support
Added Paths:
-----------
trunk/vice/src/arch/shared/archdep_glob.c
trunk/vice/src/arch/shared/archdep_glob.h
Added: trunk/vice/src/arch/shared/archdep_glob.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_glob.c (rev 0)
+++ trunk/vice/src/arch/shared/archdep_glob.c 2025-10-21 21:02:10 UTC (rev 45798)
@@ -0,0 +1,89 @@
+/** \file archdep_glob.c
+ * \brief very minimalistic glob()
+ *
+ * Wrapper for the POSIX glob(3) function.
+ *
+ * \author pottendo
+ *
+ * OS support:
+ * - Linux
+ * - Windows
+ * - BSD
+ * - MacOS
+ * - Haiku
+ */
+
+/*
+ * This file is part of VICE, the Versatile Commodore Emulator.
+ * See README for copyright notice.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA.
+ *
+ */
+
+#include "vice.h"
+
+#if !defined(UNIX_COMPILE) && !defined(HAIKU_COMPILE) && !defined(WINDOWS_COMPILE)
+# error "Unsupported OS!"
+#endif
+
+#if defined(WINDOWS_COMPILE)
+#include <archdep_glob.h>
+#include <archdep_defs.h>
+#include <windows.h>
+#include <tchar.h>
+#include <stdio.h>
+#include "lib.h"
+#include "util.h"
+
+static char *fh[1];
+
+/* expects an absolute path for pattern and many glob() functions are NOT implemented */
+int glob(const char *pattern, int flags, void *errfunc, glob_t *pglob)
+{
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ if(!pattern) {
+ return -1;
+ }
+ hFind = FindFirstFile(pattern, &FindFileData);
+ if (hFind == INVALID_HANDLE_VALUE) {
+ return -1;
+ } else {
+ char tmp[ARCHDEP_PATH_MAX];
+ strcpy(tmp, pattern);
+ char *del = strrchr(tmp, '/');
+ char *fn = FindFileData.cFileName;
+ if (del) {
+ *del = 0;
+ fh[0] = util_concat(tmp, "/", fn, NULL);
+ } else {
+ fh[0] = fn;
+ }
+ pglob->gl_pathc = 1;
+ pglob->gl_offs = 1;
+ pglob->gl_pathv = fh;
+ FindClose(hFind);
+ }
+ return 0;
+}
+
+void globfree(glob_t *pglob)
+{
+ lib_free(pglob->gl_pathv[0]);
+}
+
+#endif
Added: trunk/vice/src/arch/shared/archdep_glob.h
===================================================================
--- trunk/vice/src/arch/shared/archdep_glob.h (rev 0)
+++ trunk/vice/src/arch/shared/archdep_glob.h 2025-10-21 21:02:10 UTC (rev 45798)
@@ -0,0 +1,58 @@
+/** \file archdep_glob.h
+ * \brief very minimalistic glob()
+ * \author pottendo
+ *
+ * OS support:
+ * - Linux
+ * - Windows
+ * - BSD
+ * - MacOS
+ * - Haiku
+ */
+
+/*
+ * This file is part of VICE, the Versatile Commodore Emulator.
+ * See README for copyright notice.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA.
+ *
+ */
+
+#ifndef VICE_ARCHDEP_GLOB_H
+#define VICE_ARCHDEP_GLOB_H
+
+#if defined(UNIX_COMPILE)
+#if defined (HAVE_GLOB_H)
+#include <glob.h>
+#endif
+#endif
+
+#if defined (WINDOWS_COMPILE)
+#include <stdlib.h>
+
+typedef struct {
+ size_t gl_pathc; /* Count of paths matched so far */
+ char **gl_pathv; /* List of matched pathnames. */
+ size_t gl_offs; /* Slots to reserve in gl_pathv. */
+} glob_t;
+
+/* expects an absolute path for pattern and many glob() functions are NOT implemented */
+int glob(const char *pattern, int flags, void *errfunc, glob_t *pglob);
+void globfree(glob_t *pglob);
+
+#endif
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-21 21:00:58
|
Revision: 45797
http://sourceforge.net/p/vice-emu/code/45797
Author: pottendo
Date: 2025-10-21 21:00:57 +0000 (Tue, 21 Oct 2025)
Log Message:
-----------
fix style
Added Paths:
-----------
trunk/vice/src/userport/userport_funmp3.c
trunk/vice/src/userport/userport_funmp3.h
Added: trunk/vice/src/userport/userport_funmp3.c
===================================================================
--- trunk/vice/src/userport/userport_funmp3.c (rev 0)
+++ trunk/vice/src/userport/userport_funmp3.c 2025-10-21 21:00:57 UTC (rev 45797)
@@ -0,0 +1,376 @@
+/*
+ * userport_funmp3.c - Userport FunMP3 emulation.
+ * details about this cartridge can be found here:
+ * http://www.christianes-components.de/download/FunMP3-Player_Handbuch.pdf
+ *
+ * Written by
+ * pottendo <pot...@gm...>
+ *
+ * This file is part of VICE, the Versatile Commodore Emulator.
+ * See README for copyright notice.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA.
+ *
+ */
+
+/* #define DEBUG_FUNMP3 */
+#include "vice.h"
+
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+#include <mpg123.h>
+#include <archdep.h>
+
+#include "userport.h"
+#include "joystick.h"
+#include "userport_funmp3.h"
+#include "log.h"
+#include "sound.h"
+#include "alarm.h"
+#include "maincpu.h"
+#include "machine.h"
+#include "resources.h"
+#include "lib.h"
+#include "util.h"
+#include "cmdline.h"
+
+static int userport_funmp3_enable(int value);
+static void userport_funmp3_store_pbx(uint8_t value, int pulse);
+static void userport_funmp3_reset(void);
+
+static int funmp3_sound_machine_init(sound_t *psid, int speed, int cycles_per_sec);
+static void funmp3_sound_machine_close(sound_t *psid);
+static int funmp3_sound_machine_calculate_samples(sound_t **psid, int16_t *pbuf, int nr, int soc, int scc, CLOCK *delta_t);
+static void funmp3_sound_reset(sound_t *psid, CLOCK cpu_clk);
+static int funmp3_sound_machine_cycle_based(void);
+static int funmp3_sound_machine_channels(void);
+static int funmp3_set_dir(const char *val, void *v);
+static void funmp3_start(uint8_t val);
+static void funmp3_stop(void);
+
+static userport_device_t userport_funmp3_device = {
+ "Userport FunMP3 Player", /* device name */
+ JOYSTICK_ADAPTER_ID_NONE, /* this is NOT a joystick adapter */
+ USERPORT_DEVICE_TYPE_AUDIO_OUTPUT, /* device is a WIFI adapter */
+ userport_funmp3_enable, /* enable function */
+ NULL, /* read pb0-pb7 function */
+ userport_funmp3_store_pbx, /* store pb0-pb7 function */
+ NULL, /* read pa2 pin function */
+ NULL, /* store pa2 pin function */
+ NULL, /* NO read pa3 pin function */
+ NULL, /* NO store pa3 pin function */
+ /* HACK: We put a 0 into the struct here, although pin 8 of the userport
+ (which is PC2 on the C64) is actually used. This is needed so the device
+ can be registered in xvic (where the pin is driven by PA6). */
+ 0, /* pc pin IS needed */
+ NULL, /* NO store sp1 pin function */
+ NULL, /* NO read sp1 pin function */
+ NULL, /* NO store sp2 pin function */
+ NULL, /* NO read sp2 pin function */
+ userport_funmp3_reset, /* reset function */
+ NULL, /* NO powerup function */
+ NULL, /* snapshot write function */
+ NULL, /* snapshot read function */
+};
+
+/* FunMP3 sound chip */
+static sound_chip_t funmp3_sound_chip = {
+ NULL, /* NO sound chip open function */
+ funmp3_sound_machine_init, /* sound chip init function */
+ funmp3_sound_machine_close, /* sound chip close function */
+ funmp3_sound_machine_calculate_samples, /* sound chip calculate samples function */
+ NULL, /* NO sound chip store function */
+ NULL, /* NO sound chip read function */
+ funmp3_sound_reset, /* sound chip reset function */
+ funmp3_sound_machine_cycle_based, /* sound chip 'is_cycle_based()' function, sound chip is NOT cycle based */
+ funmp3_sound_machine_channels, /* sound chip 'get_amount_of_channels()' function, sound chip has 1 channel */
+ 0 /* chip enabled, toggled when sound chip is (de-)activated */
+};
+
+
+static log_t lh = LOG_DEFAULT;
+static int userport_funmp3_enabled = 0;
+static int mp3_err = MPG123_OK;
+static mpg123_handle *mh = NULL;
+
+static int mp3_playing = 0; /* indicates if playing is on-going */
+static int mp3_last = 0; /* this is the last requested mp3, unless explicitly asked not to repeat, then it's 0 */
+static char *funmp3_dir = NULL;
+static const resource_string_t funmp3_resources[] =
+{
+ { "FunMP3Dir", ".", (resource_event_relevant_t)0, NULL,
+ &funmp3_dir, funmp3_set_dir, NULL },
+ RESOURCE_STRING_LIST_END,
+};
+
+static const cmdline_option_t cmdline_options[] =
+{
+ { "-funmp3dir", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
+ NULL, NULL, "FunMP3Dir", NULL,
+ "<path>", "Set FunMP3 directory" },
+ CMDLINE_LIST_END
+};
+
+int userport_funmp3_resources_init(void)
+{
+ if (resources_register_string(funmp3_resources) < 0) {
+ return -1;
+ }
+ userport_funmp3_reset();
+ return userport_device_register(USERPORT_DEVICE_FUNMP3, &userport_funmp3_device);
+}
+
+int userport_funmp3_cmdline_options_init(void)
+{
+ return cmdline_register_options(cmdline_options);
+}
+
+void userport_funmp3_resources_shutdown(void)
+{
+}
+
+void userport_funmp3_sound_chip_init(void)
+{
+ sound_chip_register(&funmp3_sound_chip);
+}
+
+static int funmp3_sound_machine_init(sound_t *psid, int speed, int cycles_per_sec)
+{
+ return 1;
+}
+
+static void funmp3_sound_machine_close(sound_t *psid)
+{
+ funmp3_stop();
+}
+
+static int funmp3_set_dir(const char *val, void *v)
+{
+ util_string_set(&funmp3_dir, val);
+ return 0;
+}
+
+static uint8_t *bufr = NULL;
+static int16_t *buf = NULL;
+static size_t size;
+static size_t act_pos = 0;
+static int ret = MPG123_OK;
+
+static int funmp3_sound_machine_calculate_samples(sound_t **psid, int16_t *pbuf, int nr, int soc, int scc, CLOCK *delta_t)
+{
+ int i, j, rem;
+ int16_t sample;
+ int res = 0;
+ if (!mp3_playing) {
+ return 0;
+ }
+ rem = (size - act_pos);
+ if (nr > rem) {
+ /* if sound engine requests more than buffered,
+ put remaining samples to the front and decode new chunk */
+ if (rem > 0) {
+ /* copy unconsumed samples to the front */
+ for (i = act_pos, j = 0; i < size; i++, j++)
+ buf[j] = buf[i];
+ }
+ act_pos = 0;
+ ret = mpg123_read(mh, (unsigned char *)bufr + (rem * sizeof(int16_t)),
+ mpg123_outblock(mh), &size);
+ buf = (int16_t *)bufr;
+ size = size / sizeof(int16_t) + rem;
+ }
+
+ if ((ret == MPG123_OK) ||
+ (ret == MPG123_DONE)) {
+ for (i = 0; i < nr; ++i) {
+ switch (soc) {
+ default:
+ case SOUND_OUTPUT_MONO:
+ sample = sound_audio_mix(buf[act_pos], buf[act_pos]);
+ pbuf[i] = sound_audio_mix(pbuf[i], sample);
+ break;
+ case SOUND_OUTPUT_STEREO:
+ pbuf[i * 2] = sound_audio_mix(pbuf[i * 2], buf[act_pos]);
+ pbuf[(i * 2) + 1] = sound_audio_mix(pbuf[(i * 2) + 1], buf[act_pos + 1]);
+ break;
+ }
+ act_pos++;
+ }
+ res = nr;
+ } else {
+ log_error(lh, "mpg123_read() error: %d", ret);
+ exit(1);
+ }
+ if (ret == MPG123_DONE) {
+ funmp3_stop();
+ if (mp3_last) {
+ funmp3_start(255-mp3_last);
+ }
+ }
+ return res;
+}
+
+static void funmp3_sound_reset(sound_t *psid, CLOCK cpu_clk)
+{
+ funmp3_stop();
+}
+
+static int funmp3_sound_machine_cycle_based(void)
+{
+ return 0;
+}
+
+static int funmp3_sound_machine_channels(void)
+{
+ return 1;
+}
+
+static void funmp3_start(uint8_t val)
+{
+ char *mp3_name = NULL;
+ int rate;
+ char fn[ARCHDEP_PATH_MAX];
+ char *fn_abs;
+ glob_t results;
+
+ if (!mh) {
+ log_message(lh, "mpg123 not initialized");
+ return;
+ }
+ if (funmp3_dir) {
+ snprintf(fn, ARCHDEP_PATH_MAX, "%s/%05d*", funmp3_dir, val);
+ } else {
+ snprintf(fn, ARCHDEP_PATH_MAX, "%05d*", val);
+ }
+ archdep_expand_path(&fn_abs, fn);
+ if ((glob(fn_abs, 0, NULL, &results) != 0) ||
+ (results.gl_pathc < 1)) {
+ log_message(lh, "can't open '%s'", fn_abs);
+ return;
+ }
+ mp3_name = lib_strdup(results.gl_pathv[0]);
+ globfree(&results);
+ log_message(lh, "request to play '%s'", mp3_name);
+
+ mpg123_close(mh);
+ mpg123_format_none(mh);
+ resources_get_int("SoundSampleRate", &rate);
+ if ((ret = mpg123_format(mh, (long)rate,
+ MPG123_MONO,
+ MPG123_ENC_SIGNED_16)) != MPG123_OK) {
+ log_error(lh, "failed to set format: %d", ret);
+ mpg123_exit();
+ goto out;
+ }
+ if (mpg123_open(mh, mp3_name) != MPG123_OK) {
+ log_error(lh, "failed to open: %s", mp3_name);
+ goto out;
+ }
+
+ mpg123_volume(mh, 1.0);
+ int channels = 1, encoding;
+ /* this is needed, see commen in mpg123.h */
+ mpg123_getformat(mh, (long *)&rate, &channels, &encoding);
+ /*
+ log_message(lh, "2 - mp3rate = %d, ch = %d, enc = %d, outblock = %lu, sample_size = %d",
+ rate, channels, encoding, mpg123_outblock(mh), MPG123_SAMPLESIZE(encoding));
+ */
+ mp3_playing = 1;
+ set_userport_flag(1);
+ if (bufr) {
+ lib_free(bufr);
+ }
+ bufr = lib_malloc(mpg123_outblock(mh) * 2); /* allocate 2x, ensures sufficient for boundary cases */
+ out:
+ lib_free(mp3_name);
+ lib_free(fn_abs);
+}
+
+static void funmp3_stop(void)
+{
+ if (mh) {
+ mpg123_close(mh);
+ }
+ mp3_playing = 0;
+ set_userport_flag(0);
+}
+
+static int userport_funmp3_enable(int value)
+{
+ if (userport_funmp3_enabled == value) {
+ return 0;
+ }
+ if (lh == LOG_DEFAULT) {
+ lh = log_open("FunMP3");
+ }
+ if (value) {
+ /* Fixme: clockport mp3@64 driver may run and clash, as MMC is a cartridge */
+ mp3_err = mpg123_init();
+ if (mp3_err != MPG123_OK) {
+ log_error(lh, "failed to intialized mpg123");
+ return 0;
+ }
+ mh = mpg123_new(NULL, &mp3_err);
+ if (!mh) {
+ log_error(lh, "failed to create mpg123 handle");
+ mpg123_exit();
+ return 0;
+ }
+ } else {
+ mp3_last = 0;
+ funmp3_stop();
+ if (mh) {
+ mpg123_delete(mh);
+ }
+ if (bufr) {
+ lib_free(bufr);
+ bufr = NULL;
+ }
+ mpg123_exit();
+ }
+ userport_funmp3_enabled = value;
+ funmp3_sound_chip.chip_enabled = value;
+ log_message(lh, "FunMP3 %s", value ? "enabled" : "disabled");
+ return 0;
+}
+
+/* PC2 irq (pulse) triggers when C64 reads/writes to userport */
+static void userport_funmp3_store_pbx(uint8_t val, int pulse)
+{
+ if (pulse == 1) {
+ return;
+ }
+ /* log_message(lh, "%s: val = %d, pulse = %d", __FUNCTION__, val, pulse); */
+
+ if (val == 0) {
+ /* stop sound output */
+ funmp3_stop();
+ return;
+ }
+ if (val == 255) {
+ /* stop repetition of last mp3 */
+ mp3_last = 0;
+ return;
+ }
+ mp3_last = val; /* the default is to repeat */
+ funmp3_start(255 - val); /* that's how it is defined */
+}
+
+static void userport_funmp3_reset(void)
+{
+ funmp3_stop();
+}
+
+#endif /* MPG123 */
Added: trunk/vice/src/userport/userport_funmp3.h
===================================================================
--- trunk/vice/src/userport/userport_funmp3.h (rev 0)
+++ trunk/vice/src/userport/userport_funmp3.h 2025-10-21 21:00:57 UTC (rev 45797)
@@ -0,0 +1,40 @@
+/*
+ * userport_funmp3.h:
+ * details about this cartridge can be found here:
+ * http://www.christianes-components.de/download/FunMP3-Player_Handbuch.pdf
+ *
+ * Written by
+ * pottendo (pot...@gm...)
+ *
+ * This file is part of VICE, the Versatile Commodore Emulator.
+ * See README for copyright notice.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA.
+ *
+ */
+
+#ifndef VICE_USERPORT_FUNMP3_H
+#define VICE_USERPORT_FUNMP3_H
+
+#include "types.h"
+
+int userport_funmp3_resources_init(void);
+void userport_funmp3_resources_shutdown(void);
+int userport_funmp3_cmdline_options_init(void);
+void userport_funmp3_factory_reset(void);
+void userport_funmp3_sound_chip_init(void);
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-21 20:48:18
|
Revision: 45796
http://sourceforge.net/p/vice-emu/code/45796
Author: pottendo
Date: 2025-10-21 20:48:15 +0000 (Tue, 21 Oct 2025)
Log Message:
-----------
Added FunMP3 userport cartridge support
Modified Paths:
--------------
trunk/vice/configure.ac
trunk/vice/doc/vice.texi
trunk/vice/src/arch/shared/Makefile.am
trunk/vice/src/arch/shared/archapi.h
trunk/vice/src/c128/c128.c
trunk/vice/src/c64/c64.c
trunk/vice/src/pet/pet.c
trunk/vice/src/userport/Makefile.am
trunk/vice/src/userport/userport.c
trunk/vice/src/userport/userport.h
trunk/vice/src/vic20/vic20.c
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/configure.ac 2025-10-21 20:48:15 UTC (rev 45796)
@@ -3148,6 +3148,11 @@
if test x"$USE_MPG123_SUPPORT" != "xyes"; then
AC_MSG_ERROR([MPG123 support requested but missing])
fi
+ if test x"$is_win32_gtk3" = "xyes"; then
+ AC_DEFINE(HAVE_GLOB_H,,)
+ else
+ AC_CHECK_HEADERS(glob.h,,)
+ fi
fi
dnl Check for libraries and header files
Modified: trunk/vice/doc/vice.texi
===================================================================
--- trunk/vice/doc/vice.texi 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/doc/vice.texi 2025-10-21 20:48:15 UTC (rev 45796)
@@ -8782,6 +8782,9 @@
@item 27
@tab Userport PS/2 Mouse
@tab x64dtv
+@item 27
+@tab Userport FunMP3
+@tab x64, x64sc, x128, xscpu64, xpet, xvic
@end multitable
@table @code
@@ -8855,6 +8858,11 @@
3: debug
(vic20, x64, x64sc, xscpu64 and x128 only).
+@vindex FunMP3Dir
+@item FunMP3Dir
+String specifying the path to the directory where mp3's are lookup up
+for playing
+(vic20, x64, x64sc, xscpu64, x128 and xpet only).
@end table
@c @node FIXME
@@ -8937,6 +8945,10 @@
Enable/disable automatically setting the local IP address (default: enabled)
(vic20, x64, x64sc, xscpu64 and x128 only).
+@findex -funmp3dir
+@item -funmp3dir <path>
+Specify path to search for mp3 files used by the FunMP3 module
+(vic20, x64, x64sc, xscpu64, x128, xpet only).
@end table
@c -----------------------------------------------------------------------------
@@ -36712,6 +36724,7 @@
@b{Pottendo}
Fixed WiC64 support. Most of the former contributions (pre V3.x) have
been taken over and/or replaced by other's contributions.
+Added FunMP3 userport cartdridge support.
@item
@b{Marco van den Heuvel}
Modified: trunk/vice/src/arch/shared/Makefile.am
===================================================================
--- trunk/vice/src/arch/shared/Makefile.am 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/arch/shared/Makefile.am 2025-10-21 20:48:15 UTC (rev 45796)
@@ -87,6 +87,7 @@
archdep_get_vice_hotkeysdir.c \
archdep_get_vice_machinedir.c \
archdep_getcwd.c \
+ archdep_glob.c \
archdep_home_path.c \
archdep_icon_path.c \
archdep_is_haiku.c \
@@ -199,6 +200,7 @@
archdep_get_vice_hotkeysdir.h \
archdep_get_vice_machinedir.h \
archdep_getcwd.h \
+ archdep_glob.h \
archdep_home_path.h \
archdep_icon_path.h \
archdep_is_haiku.h \
Modified: trunk/vice/src/arch/shared/archapi.h
===================================================================
--- trunk/vice/src/arch/shared/archapi.h 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/arch/shared/archapi.h 2025-10-21 20:48:15 UTC (rev 45796)
@@ -82,6 +82,7 @@
#include "archdep_get_vice_hotkeysdir.h"
#include "archdep_get_vice_machinedir.h"
#include "archdep_getcwd.h"
+#include "archdep_glob.h"
#include "archdep_home_path.h"
#include "archdep_icon_path.h"
#include "archdep_is_haiku.h"
Modified: trunk/vice/src/c128/c128.c
===================================================================
--- trunk/vice/src/c128/c128.c 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/c128/c128.c 2025-10-21 20:48:15 UTC (rev 45796)
@@ -142,6 +142,7 @@
#include "userport_superpad64.h"
#include "userport_synergy_joystick.h"
#include "userport_wic64.h"
+#include "userport_funmp3.h"
#include "userport_woj_joystick.h"
#include "vdc.h"
#include "vdc-mem.h"
@@ -1149,7 +1150,9 @@
#ifdef USE_MPG123
clockport_mp3at64_sound_chip_init();
#endif
-
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ userport_funmp3_sound_chip_init();
+#endif
drive_sound_init();
datasette_sound_init();
video_sound_init();
Modified: trunk/vice/src/c64/c64.c
===================================================================
--- trunk/vice/src/c64/c64.c 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/c64/c64.c 2025-10-21 20:48:15 UTC (rev 45796)
@@ -144,6 +144,7 @@
#include "userport_synergy_joystick.h"
#include "userport_wic64.h"
#include "userport_woj_joystick.h"
+#include "userport_funmp3.h"
#include "vice-event.h"
#include "vicii.h"
#include "vicii-mem.h"
@@ -1103,10 +1104,13 @@
userport_dac_sound_chip_init();
userport_digimax_sound_chip_init();
- /* Initialize mp3@64 */
+ /* Initialize mp3@64, funmp3 */
#ifdef USE_MPG123
clockport_mp3at64_sound_chip_init();
#endif
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ userport_funmp3_sound_chip_init();
+#endif
drive_sound_init();
datasette_sound_init();
Modified: trunk/vice/src/pet/pet.c
===================================================================
--- trunk/vice/src/pet/pet.c 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/pet/pet.c 2025-10-21 20:48:15 UTC (rev 45796)
@@ -111,6 +111,7 @@
#include "userport_spt_joystick.h"
#include "userport_synergy_joystick.h"
#include "userport_woj_joystick.h"
+#include "userport_funmp3.h"
#include "util.h"
#include "via.h"
#include "vice-event.h"
@@ -431,6 +432,12 @@
init_resource_fail("debug cart");
return -1;
}
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ if (userport_funmp3_resources_init() < 0) {
+ init_resource_fail("funmp3 cart");
+ return -1;
+ }
+#endif
return 0;
}
@@ -582,6 +589,12 @@
init_cmdline_options_fail("debug cart");
return -1;
}
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ if (userport_funmp3_cmdline_options_init() < 0) {
+ init_cmdline_options_fail("funmp3 cart");
+ return -1;
+ }
+#endif
return 0;
}
@@ -706,6 +719,11 @@
/* Initialize userport based sound chips */
userport_dac_sound_chip_init();
+ /* Initialize funmp3 */
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ userport_funmp3_sound_chip_init();
+#endif
+
drive_sound_init();
datasette_sound_init();
video_sound_init();
Modified: trunk/vice/src/userport/Makefile.am
===================================================================
--- trunk/vice/src/userport/Makefile.am 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/userport/Makefile.am 2025-10-21 20:48:15 UTC (rev 45796)
@@ -63,6 +63,8 @@
userport_synergy_joystick.h \
userport_wic64.c \
userport_wic64.h \
+ userport_funmp3.c \
+ userport_funmp3.h \
userport_woj_joystick.c \
userport_woj_joystick.h
Modified: trunk/vice/src/userport/userport.c
===================================================================
--- trunk/vice/src/userport/userport.c 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/userport/userport.c 2025-10-21 20:48:15 UTC (rev 45796)
@@ -152,6 +152,7 @@
#include "userport_superpad64.h"
#include "userport_synergy_joystick.h"
#include "userport_wic64.h"
+#include "userport_funmp3.h"
#include "c64parallel.h"
#include "plus4parallel.h"
@@ -786,6 +787,14 @@
NULL, /* resources shutdown function */
NULL /* cmdline options init function */
},
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ { USERPORT_DEVICE_FUNMP3, /* device id */
+ UP_C64 | UP_VIC20, /* emulators this device works on */
+ userport_funmp3_resources_init, /* resources init function */
+ userport_funmp3_resources_shutdown, /* resources shutdown function */
+ userport_funmp3_cmdline_options_init /* cmdline options init function */
+ },
+#endif
{ USERPORT_DEVICE_NONE, VICE_MACHINE_NONE, NULL, NULL, NULL }, /* end of the devices list */
};
@@ -930,6 +939,10 @@
#endif
{ "space", USERPORT_DEVICE_SPACEBALLS },
{ "spaceballs", USERPORT_DEVICE_SPACEBALLS },
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ { "funmp3", USERPORT_DEVICE_FUNMP3 },
+#endif
+
{ NULL, -1 }
};
Modified: trunk/vice/src/userport/userport.h
===================================================================
--- trunk/vice/src/userport/userport.h 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/userport/userport.h 2025-10-21 20:48:15 UTC (rev 45796)
@@ -71,6 +71,7 @@
USERPORT_DEVICE_SPT_JOYSTICK,
USERPORT_DEVICE_DIAGNOSTIC_PIN,
USERPORT_DEVICE_MOUSE_PS2,
+ USERPORT_DEVICE_FUNMP3,
/* This item always needs to be at the end */
USERPORT_MAX_DEVICES
Modified: trunk/vice/src/vic20/vic20.c
===================================================================
--- trunk/vice/src/vic20/vic20.c 2025-10-19 16:18:00 UTC (rev 45795)
+++ trunk/vice/src/vic20/vic20.c 2025-10-21 20:48:15 UTC (rev 45796)
@@ -105,6 +105,7 @@
#include "userport_spt_joystick.h"
#include "userport_synergy_joystick.h"
#include "userport_wic64.h"
+#include "userport_funmp3.h"
#include "userport_woj_joystick.h"
#include "via.h"
#include "vic.h"
@@ -985,6 +986,11 @@
/* Initialize userport based sound chips */
userport_dac_sound_chip_init();
+ /* Initialize funmp3 */
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ userport_funmp3_sound_chip_init();
+#endif
+
drive_sound_init();
datasette_sound_init();
video_sound_init();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-19 16:18:01
|
Revision: 45795
http://sourceforge.net/p/vice-emu/code/45795
Author: gpz
Date: 2025-10-19 16:18:00 +0000 (Sun, 19 Oct 2025)
Log Message:
-----------
fix DQBB resources, netplay should work without a warning now
Modified Paths:
--------------
trunk/vice/src/c64/cart/dqbb.c
trunk/vice/src/resources.c
Modified: trunk/vice/src/c64/cart/dqbb.c
===================================================================
--- trunk/vice/src/c64/cart/dqbb.c 2025-10-19 10:23:55 UTC (rev 45794)
+++ trunk/vice/src/c64/cart/dqbb.c 2025-10-19 16:18:00 UTC (rev 45795)
@@ -315,6 +315,7 @@
static int set_dqbb_enabled(int value, void *param)
{
int val = value ? 1 : 0;
+ DBG(("set_dqbb_enabled: val:%d", val));
if ((!val) && (dqbb_enabled)) {
cart_power_off();
@@ -339,6 +340,7 @@
dqbb_reset();
dqbb_change_config();
}
+ DBG(("set_dqbb_enabled: dqbb_enabled:%d", dqbb_enabled));
return 0;
}
@@ -374,6 +376,7 @@
static int set_dqbb_size(int val, void *param)
{
+ DBG(("set_dqbb_size: val:%d", val));
if (val != dqbb_size) {
if ((val == 16) ||
(val == 32) ||
@@ -389,16 +392,18 @@
}
DBG(("set_dqbb_size size: %d mask: 0x%02x", dqbb_size, (unsigned int)dqbb_bank_mask));
} else {
+ DBG(("set_dqbb_size: (error) dqbb_size:%d", dqbb_size));
return -1;
}
}
+ DBG(("set_dqbb_size: (ok) dqbb_size:%d", dqbb_size));
return 0;
}
static int set_dqbb_mode(int val, void *param)
{
- dqbb_mode_switch = (val == 0) ? DQBB_MODE_C128 : DQBB_MODE_C64;
- DBG(("set_dqbb_mode: %s", dqbb_mode_switch == DQBB_MODE_C64 ? "C64" : "C128"));
+ dqbb_mode_switch = (val == DQBB_MODE_C128) ? DQBB_MODE_C128 : DQBB_MODE_C64;
+ DBG(("set_dqbb_mode: val:%d dqbb_mode_switch: %s", val, dqbb_mode_switch == DQBB_MODE_C64 ? "C64" : "C128"));
if (dqbb_enabled) {
dqbb_change_config();
}
@@ -414,11 +419,11 @@
};
static const resource_int_t resources_int[] = {
- { "DQBB", 0, RES_EVENT_STRICT, NULL,
+ { "DQBB", 0, RES_EVENT_SAME, NULL,
&dqbb_enabled, set_dqbb_enabled, NULL },
- { "DQBBSize", 16, RES_EVENT_STRICT, NULL,
+ { "DQBBSize", 16, RES_EVENT_SAME, NULL,
&dqbb_size, set_dqbb_size, NULL },
- { "DQBBMode", DQBB_MODE_C64, RES_EVENT_STRICT, NULL,
+ { "DQBBMode", DQBB_MODE_C64, RES_EVENT_SAME, NULL,
&dqbb_mode_switch, set_dqbb_mode, NULL },
{ "DQBBImageWrite", 0, RES_EVENT_NO, NULL,
&dqbb_write_image, set_dqbb_image_write, NULL },
Modified: trunk/vice/src/resources.c
===================================================================
--- trunk/vice/src/resources.c 2025-10-19 10:23:55 UTC (rev 45794)
+++ trunk/vice/src/resources.c 2025-10-19 16:18:00 UTC (rev 45795)
@@ -1012,6 +1012,7 @@
switch (resources[i].type) {
case RES_INTEGER:
if (resources[i].event_relevant == RES_EVENT_STRICT) {
+ DBG(("seting event-safe resource value for '%s'", resources[i].name));
if ((*resources[i].set_func_int)(vice_ptr_to_int(resources[i].event_strict_value),
resources[i].param) < 0) {
log_error(LOG_DEFAULT, "failed to set event-safe resource value for '%s'", resources[i].name);
@@ -1021,6 +1022,7 @@
break;
case RES_STRING:
if (resources[i].event_relevant == RES_EVENT_STRICT) {
+ DBG(("seting event-safe resource value for '%s'", resources[i].name));
if ((*resources[i].set_func_string)((const char *)(resources[i].event_strict_value),
resources[i].param) < 0) {
log_error(LOG_DEFAULT, "failed to set event-safe resource value for '%s'", resources[i].name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2025-10-19 10:23:57
|
Revision: 45794
http://sourceforge.net/p/vice-emu/code/45794
Author: dqh
Date: 2025-10-19 10:23:55 +0000 (Sun, 19 Oct 2025)
Log Message:
-----------
macOS bindist no longer require platypus. And other bindist issues fixed.
Modified Paths:
--------------
trunk/vice/src/arch/shared/macOS-launcher.sh
trunk/vice/src/arch/shared/make-bindist_osx.sh
Modified: trunk/vice/src/arch/shared/macOS-launcher.sh
===================================================================
--- trunk/vice/src/arch/shared/macOS-launcher.sh 2025-10-13 21:07:01 UTC (rev 45793)
+++ trunk/vice/src/arch/shared/macOS-launcher.sh 2025-10-19 10:23:55 UTC (rev 45794)
@@ -34,7 +34,7 @@
shift
fi
-ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
+ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)/../Resources"
cd "$ROOT_DIR"
source "./bin/common-runtime.sh"
@@ -75,13 +75,13 @@
xvic*)
PROGRAM=xvic
;;
- script*)
+ VICE*)
# pick emu name in dialog
PROGRAM=`osascript -e 'first item of (choose from list {"x128","x64dtv","x64sc","xcbm2","xcbm5x0","xpet","xplus4","xvic"} with title "VICE Emulator" with prompt "Please select an Emulator to run:" default items {"x64sc"})'`
;;
*)
# invalid bundle name
- osascript -e 'display dialog "Invalid Bundle Name / PROGRAM var! (use: x128,x64dtv,x64sc,xcbm2,xcbm5x0,xpet,xplus4,xvic)" buttons {"Abort"} with icon stop'
+ osascript -e "display dialog \"Invalid Bundle Name / PROGRAM var: [$(basename "$0")] (use: x128,x64dtv,x64sc,xcbm2,xcbm5x0,xpet,xplus4,xvic)\" buttons {\"Abort\"} with icon stop"
PROGRAM=""
;;
esac
Modified: trunk/vice/src/arch/shared/make-bindist_osx.sh
===================================================================
--- trunk/vice/src/arch/shared/make-bindist_osx.sh 2025-10-13 21:07:01 UTC (rev 45793)
+++ trunk/vice/src/arch/shared/make-bindist_osx.sh 2025-10-19 10:23:55 UTC (rev 45794)
@@ -102,8 +102,7 @@
fi
# define droppable file types
-DROP_TYPES="x64|p64|g64|d64|d71|d81|t64|tap|prg|p00|crt|reu"
-DROP_FORMATS="x64 p64 g64 d64 d71 d81 t64 tap prg p00 crt reu"
+DROP_EXTENSIONS="x64 p64 g64 d64 d71 d81 t64 tap prg p00 crt reu"
# runtime scripts
MACOS_SCRIPTS=macOS-runtime-scripts.inc
@@ -159,56 +158,72 @@
APP_BIN=$APP_RESOURCES/bin
APP_LIB=$APP_RESOURCES/lib
-if ! which -s platypus; then
- echo "ERROR: platypus not found (sudo port install platypus / brew install platypus)"
- exit 1
-fi
-
make_app_bundle() {
- local app_name=$1
- local app_path=$BUILD_DIR/$app_name.app
- local app_launcher=$2
- local output=$(mktemp)
+ local app_name="$1"
+ local app_launcher="$2"
+ local app_path="$BUILD_DIR/$app_name.app"
+ local contents="$app_path/Contents"
+ local macos="$contents/MacOS"
+ local resources="$contents/Resources"
+ local info_plist="$contents/Info.plist"
+ local bundle_id="org.viceteam.$app_name"
+ local icon_src="$RUN_PATH/Resources/VICE.icns"
+ local icon_name="VICE.icns"
+ local min_macos="${MIN_MACOS_VER:-12.0}" # override with MIN_MACOS_VER if you want
- platypus \
- -a $app_name \
- -o None \
- -i "$RUN_PATH/Resources/VICE.icns" \
- -V "$VICE_VERSION" \
- -u "The VICE Team" \
- -I "org.viceteam.$app_name" \
- -c "$app_launcher" \
- -D \
- -X $DROP_TYPES \
- -R \
- -B \
- "$app_path" \
- > /dev/null \
- 2> $output
+ rm -rf "$app_path"
+ mkdir -p "$macos" "$resources"
- PLATYPUS_STATUS=$?
-
- if [ $PLATYPUS_STATUS -ne 0 ]; then
- echo "ERROR: platypus failed with $PLATYPUS_STATUS. Output:"
- cat $output
- rm $output
+ # Install icon
+ cp "$icon_src" "$resources/$icon_name"
- exit 1
- fi
+ # 2) Install launcher (your script/binary)
+ # We name it the same as the app for neatness, but any name is fine.
+ install -m 0755 "$app_launcher" "$macos/$app_name"
- #
- # For some reason can't set the CFBundlePackageType key directly using platypus.
- # Without this the codesigning works but spctl --assess --verbose *.app results
- # in "rejected (the code is valid but does not seem to be an app)" -- which
- # means it won't get past gatekeeper properly, at least on 10.14. But it will on
- # 10.15 if it's notarised. Wtf Apple.
- #
- # Also, with newer versions of platypus, the key WILL be there already.
- # So, we check for it, and add it if missing.
- #
+ # 3) Minimal Info.plist
+ /usr/bin/env cat > "$info_plist" <<PLIST
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "" rel="nofollow">http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key> <string>en</string>
+ <key>CFBundleName</key> <string>${app_name}</string>
+ <key>CFBundleDisplayName</key> <string>${app_name}</string>
+ <key>CFBundleIdentifier</key> <string>${bundle_id}</string>
+ <key>CFBundleVersion</key> <string>${VICE_VERSION}</string>
+ <key>CFBundleShortVersionString</key> <string>${VICE_VERSION}</string>
+ <key>CFBundlePackageType</key> <string>APPL</string>
+ <key>CFBundleExecutable</key> <string>${app_name}</string>
+ <key>CFBundleIconFile</key> <string>${icon_name}</string>
+ <key>CFBundlePackageType</key> <string>APPL</string>
+ <key>LSMinimumSystemVersion</key> <string>${min_macos}</string>
+ <key>NSHighResolutionCapable</key> <true/>
+ <key>NSAppTransportSecurity</key>
+ <dict>
+ <key>NSAllowsArbitraryLoads</key>
+ <true/>
+ </dict>
+ <key>NSHumanReadableCopyright</key>
+ <string>© 2025 The VICE Team</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key><string>VICE Files</string>
+ <key>CFBundleTypeRole</key><string>Viewer</string> <!-- or Editor if you really want -->
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ $(for ext in $DROP_EXTENSIONS; do printf ' <string>%s</string>\n' "$ext"; done)
+ </array>
+ <!-- optional: <key>LSHandlerRank</key><string>Default</string> -->
+ </dict>
+ </array>
+</dict>
+</plist>
+PLIST
- /usr/libexec/PlistBuddy -c 'print ":CFBundlePackageType"' "$app_path/Contents/Info.plist" >/dev/null 2>&1 || \
- /usr/libexec/PlistBuddy -c "Add CFBundlePackageType string APPL" "$app_path/Contents/Info.plist"
+ # Strip extended attrs from script (reduces Gatekeeper false positives when copying from net fs)
+ xattr -cr "$app_path" || true
}
echo " bundling $BUNDLE.app: "
@@ -305,7 +320,7 @@
copy_tree "$TOP_DIR/data/$ROM" "$APP_ROMS/$ROM"
(cd $APP_ROMS/$ROM && eval "rm -f $ROM_REMOVE")
- echo -n "[platypus] "
+ echo -n "[app] "
make_app_bundle $emu $RUN_PATH/$REDIRECT_LAUNCHER
# ready
@@ -323,6 +338,8 @@
if [ "$UI_TYPE" = "SDL2" ]; then
cp "$TOP_DIR/src/arch/sdl/macOS-ui-runtime.sh" "$APP_BIN/ui-runtime.sh"
+ copy_lib_recursively $DEPS_PREFIX/lib/libjxl_cms.*.dylib
+ copy_lib_recursively $DEPS_PREFIX/lib/libsharpyuv.*.dylib
elif [ "$UI_TYPE" = "GTK3" ]; then
cp "$TOP_DIR/src/arch/gtk3/macOS-ui-runtime.sh" "$APP_BIN/ui-runtime.sh"
@@ -398,20 +415,6 @@
copy_lib_recursively $DEPS_PREFIX/lib/libmp3lame.dylib
fi
-# ffmpeg
-if grep -q "^#define EXTERNAL_FFMPEG " "src/config.h"; then
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libavformat.*.dylib')"
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libavcodec.*.dylib')"
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libavutil.*.dylib')"
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libswscale.*.dylib')"
- if grep -q "^#define HAVE_FFMPEG_AVRESAMPLE " "src/config.h"; then
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libavresample.*.dylib')"
- fi
- if grep -q "^#define HAVE_FFMPEG_SWRESAMPLE " "src/config.h"; then
- copy_lib_recursively "$(find $DEPS_PREFIX/lib -type f -name 'libswresample.*.dylib')"
- fi
-fi
-
# --- copy tools ---------------------------------------------------------------
BIN_DIR=$BUILD_DIR/bin
@@ -451,6 +454,10 @@
echo "Deduplicating libs"
+relative_path() {
+ python3 -c 'import os,sys; print(os.path.relpath(sys.argv[1], os.path.dirname(sys.argv[2])))' "$1" "$2"
+}
+
for lib in $(find $APP_LIB -name '*.dylib' | sort -V -r); do
if [ -L "$lib" ]; then
continue
@@ -462,9 +469,10 @@
fi
if cmp -s "$potential_duplicate" "$lib"; then
- echo "Replacing $(basename $potential_duplicate) with symlink to $(basename $lib)"
+ echo "Replacing $(basename $potential_duplicate) with symlink to $(relative_path "$lib" "$potential_duplicate")"
+ chmod u+w "$potential_duplicate"
rm "$potential_duplicate"
- ln -s "$(basename "$lib")" "$potential_duplicate"
+ ln -s "$(relative_path "$lib" "$potential_duplicate")" "$potential_duplicate"
fi
done
done
@@ -558,7 +566,7 @@
#!/bin/bash
export VICE_INITIAL_CWD="$(pwd)"
export PROGRAM="$(basename "$0")"
- "$(dirname "$0")/../VICE.app/Contents/Resources/script" "$@"
+ "$(dirname "$0")/../VICE.app/Contents/MacOS/VICE" "$@"
HEREDOC
chmod +x "$BIN_DIR/$emu"
done
@@ -613,14 +621,6 @@
cp "$TOP_DIR/data/hotkeys/"*.vhk "$APP_HOTKEYS/"
-# --- wtf permissions. ---------------------------------------------------------
-
-# platypus produces 777 binaries, which is awesome.
-
-find $BUILD_DIR -type f -exec chmod a-w {} \;
-find $BUILD_DIR -type d -exec chmod 755 {} \;
-
-
# --- code signing (for Apple notarisation) ------------------------------------
code_sign_file () {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-13 21:07:11
|
Revision: 45793
http://sourceforge.net/p/vice-emu/code/45793
Author: gpz
Date: 2025-10-13 21:07:01 +0000 (Mon, 13 Oct 2025)
Log Message:
-----------
add some joy- and keymaps related to https://github.com/aminch/8-bit-pc-pi-compile
Modified Paths:
--------------
trunk/vice/data/C64/Makefile.am
trunk/vice/data/C64DTV/Makefile.am
trunk/vice/data/SCPU64/Makefile.am
Added Paths:
-----------
trunk/vice/data/C64/sdl_c64p.vkm
trunk/vice/data/C64/sdl_joymap_8bitdo_6b.vjm
trunk/vice/data/C64/sdl_sym_no_pi_4-500_bmc64.vkm
trunk/vice/data/C64/sdl_sym_uk_pi_4-500_bmc64.vkm
trunk/vice/data/C64/sdl_sym_us_pi_4-500_bmc64.vkm
trunk/vice/data/C64DTV/sdl_c64p.vkm
trunk/vice/data/C64DTV/sdl_joymap_8bitdo_6b.vjm
trunk/vice/data/C64DTV/sdl_sym_no_pi_4-500_bmc64.vkm
trunk/vice/data/C64DTV/sdl_sym_uk_pi_4-500_bmc64.vkm
trunk/vice/data/C64DTV/sdl_sym_us_pi_4-500_bmc64.vkm
trunk/vice/data/SCPU64/sdl_c64p.vkm
trunk/vice/data/SCPU64/sdl_joymap_8bitdo_6b.vjm
trunk/vice/data/SCPU64/sdl_sym_no_pi_4-500_bmc64.vkm
trunk/vice/data/SCPU64/sdl_sym_uk_pi_4-500_bmc64.vkm
trunk/vice/data/SCPU64/sdl_sym_us_pi_4-500_bmc64.vkm
Modified: trunk/vice/data/C64/Makefile.am
===================================================================
--- trunk/vice/data/C64/Makefile.am 2025-10-11 18:12:49 UTC (rev 45792)
+++ trunk/vice/data/C64/Makefile.am 2025-10-13 21:07:01 UTC (rev 45793)
@@ -72,6 +72,7 @@
sdl_joymap_thec64.vjm \
sdl_joymap_keyrah_v3.vjm \
sdl_joymap_xbox360.vjm \
+ sdl_joymap_8bitdo_6b.vjm \
sdl_pos.vkm \
sdl_pos_uk.vkm \
sdl_pos_ch.vkm \
@@ -92,7 +93,11 @@
sdl_sym_it.vkm \
sdl_sym_fr.vkm \
sdl_sym_tr.vkm \
- sdl_sym_da.vkm
+ sdl_sym_da.vkm \
+ sdl_sym_us_pi_4-500_bmc64.vkm \
+ sdl_sym_uk_pi_4-500_bmc64.vkm \
+ sdl_sym_no_pi_4-500_bmc64.vkm \
+ sdl_c64p.vkm
sym_file = \
c64mem.sym
Added: trunk/vice/data/C64/sdl_c64p.vkm
===================================================================
--- trunk/vice/data/C64/sdl_c64p.vkm (rev 0)
+++ trunk/vice/data/C64/sdl_c64p.vkm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,259 @@
+# VICE keyboard mapping file
+#
+# A Keyboard map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal lines have 'keysym/scancode row column shiftflag'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear whole table
+# '!INCLUDE filename' read file as mapping file
+# '!LSHIFT row col' left shift keyboard row/column
+# '!RSHIFT row col' right shift keyboard row/column
+# '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT)
+# '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT)
+# for emulated keyboards that have only one shift key, set both LSHIFT
+# and RSHIFT to the same row/col and use RSHIFT for VSHIFT and SHIFTL.
+# '!LCTRL row col' left control keyboard row/column
+# '!VCTRL ctrlkey' virtual control key (LCTRL)
+# '!LCBM row col' left CBM keyboard row/column
+# '!VCBM cbmkey' virtual CBM key (LCBM)
+# '!UNDEF keysym' remove keysym from table
+#
+# Shiftflag can have these values, flags can be ORed to combine them:
+# 0x0000 0 key is not shifted for this keysym/scancode
+# 0x0001 1 key is combined with shift for this keysym/scancode
+# 0x0002 2 key is left shift on emulated machine
+# 0x0004 4 key is right shift on emulated machine (use only this one
+# for emulated keyboards that have only one shift key)
+# 0x0008 8 key can be shifted or not with this keysym/scancode
+# 0x0010 16 deshift key for this keysym/scancode
+# 0x0020 32 another definition for this keysym/scancode follows
+# 0x0040 64 key is shift-lock on emulated machine
+# 0x0080 128 shift modifier required on host
+# 0x0100 256 key is used for an alternative keyboard mapping, e.g. C64 mode in x128
+# 0x0200 512 alt-r (alt-gr) modifier required on host
+# 0x0400 1024 ctrl modifier required on host
+# 0x0800 2048 key is combined with cbm for this keysym/scancode
+# 0x1000 4096 key is combined with ctrl for this keysym/scancode
+# 0x2000 8192 key is (left) cbm on emulated machine
+# 0x4000 16384 key is (left) ctrl on emulated machine
+#
+# Negative row values:
+# 'keysym -1 n' joystick keymap A, direction n
+# 'keysym -2 n' joystick keymap B, direction n
+# 'keysym -3 0' first RESTORE key
+# 'keysym -3 1' second RESTORE key
+# 'keysym -4 0' 40/80 column key (x128)
+# 'keysym -4 1' CAPS (ASCII/DIN) key (x128)
+# 'keysym -5 n' joyport keypad, key n (not supported in x128)
+#
+# Joystick direction values:
+# 0 Fire
+# 1 South/West
+# 2 South
+# 3 South/East
+# 4 West
+# 5 East
+# 6 North/West
+# 7 North
+# 8 North/East
+#
+# Joyport keypad key layout:
+# --------------------------
+# | 0 | 1 | 2 | 3 | 4 |
+# --------------------------
+# | 5 | 6 | 7 | 8 | 9 |
+# --------------------------
+# | 10 | 11 | 12 | 13 | 14 |
+# --------------------------
+# | 15 | 16 | 17 | 18 | 19 |
+# --------------------------
+#
+# When a bigger spaced key is used,
+# it uses the upper left most key value.
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# specifically for https://github.com/aminch/c64p/
+
+# Positional Mapping for aminch's C64P: https://github.com/aminch/c64p
+
+# note: For some reason SDL does not get keyboard events for "dead keys" at all,
+# so a "nodeadkeys" layout must be used. CAUTION: apparently SDL generates
+# some tables internally at startup - switching the host layout while
+# the emulator is running produces unpredictable results (broken keycodes)
+
+# To use this keyboard mapping the C64P needs to be in BMC64 Mode
+# Press RUN/STOP + F3 to switch into BMC64 Mode
+
+# C64 keyboard matrix:
+#
+# +-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0|Bit 1|Bit 2|Bit 3|Bit 4|Bit 5|Bit 6|Bit 7|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0| DEL |Retrn|C_L/R| F7 | F1 | F3 | F5 |C_U/D|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 1| 3 # | W | A | 4 $ | Z | S | E | S_L |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 2| 5 % | R | D | 6 & | C | F | T | X |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 3| 7 ' | Y | G | 8 ( | B | H | U | V |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 4| 9 ) | I | J | 0 | M | K | O | N |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 5| + | P | L | - | . > | : [ | @ | , < |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 6|POUND| * | ; ] | HOME| S_R | = | A_UP| / ? |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 7| 1 ! |A_LFT| CTRL| 2 " |SPACE| C= | Q | R/S |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+
+# C64 Keyboard layout:
+#
+# arrow 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 + - pound clr del f1/f2
+# ctrl q w e r t y u i o p @ * ^ restore f3/f4
+# r/s SL a s d f g h j k l :[ ;] = return f5/f6
+# CBM LS z x c v b n m ,< .> /? RS u/d l/r f7/f8
+# space
+
+!CLEAR
+!LSHIFT 1 7
+!RSHIFT 6 4
+!VSHIFT RSHIFT
+!SHIFTL LSHIFT
+!LCBM 7 5
+!VCBM LCBM
+!LCTRL 7 2
+!VCTRL LCTRL
+
+8 0 0 8 /* backspace -> Del */
+13 0 1 8 /* Return -> Return */
+275 0 2 8 /* Right -> CRSR RIGHT */
+276 0 2 1 /* Left -> CRSR LEFT */
+288 0 3 8 /* F7 -> F7 */
+289 0 3 1 /* F8 -> F8 */
+282 0 4 8 /* F1 -> F1 */
+283 0 4 1 /* F2 -> F2 */
+284 0 5 8 /* F3 -> F3 */
+285 0 5 1 /* F4 -> F4 */
+286 0 6 8 /* F5 -> F5 */
+287 0 6 1 /* F6 -> F6 */
+273 0 7 1 /* Up -> CRSR UP */
+274 0 7 8 /* Down -> CRSR DOWN */
+
+51 1 0 8 /* 3 -> 3 */
+52 1 3 8 /* 4 -> 4 */
+304 1 7 2 /* Left Shift -> Left Shift */
+301 1 7 64 /* Caps Lock -> Shift Lock */
+
+53 2 0 8 /* 5 -> 5 */
+54 2 3 8 /* 6 -> 6 */
+
+55 3 0 8 /* 7 -> 7 */
+56 3 3 8 /* 8 -> 8 */
+
+57 4 0 8 /* 9 -> 9 */
+48 4 3 8 /* 0 -> 0 */
+
+#223 5 0 8 /* world 63 -> + */
+#180 5 3 8 /* world 20 -> - */
+45 5 0 8 /* + -> + */
+61 5 3 8 /* - -> - */
+46 5 4 8 /* . -> . */
+#246 5 5 8 /* world 86 -> : */
+#252 5 6 8 /* world 92 -> @ */
+59 5 5 8 /* : -> : */
+91 5 6 8 /* @ -> @ */
+44 5 7 8 /* , -> , */
+
+277 6 0 8 /* insert -> Pound */
+43 6 1 8 /* * -> * */
+93 6 1 8 /* * -> * */
+#228 6 2 8 /* world 68 -> ; */
+39 6 2 8 /* ; -> ; */
+278 6 3 8 /* Home -> CLR/HOME */
+303 6 4 4 /* Right Shift -> Right Shift */
+#35 6 5 8 /* # -> = */
+92 6 5 8 /* # -> = */
+127 6 6 8 /* delete -> Up Arrow */
+#45 6 7 8 /* - -> / */
+47 6 7 8 /* / -> / */
+
+49 7 0 8 /* 1 -> 1 */
+94 7 1 8 /* ^ -> Left Arrow */
+96 7 1 8 /* ^ -> Left Arrow */
+9 7 2 16392 /* TAB -> Ctrl */
+50 7 3 8 /* 2 -> 2 */
+32 7 4 8 /* Space -> Space */
+306 7 5 8200 /* Left Ctrl -> CBM */
+27 7 7 8 /* ESC -> Run/Stop */
+
+97 1 2 8 /* A -> A */
+98 3 4 8 /* B -> B */
+99 2 4 8 /* C -> C */
+100 2 2 8 /* D -> D */
+101 1 6 8 /* E -> E */
+102 2 5 8 /* F -> F */
+103 3 2 8 /* G -> G */
+104 3 5 8 /* H -> H */
+105 4 1 8 /* I -> I */
+106 4 2 8 /* J -> J */
+107 4 5 8 /* K -> K */
+108 5 2 8 /* L -> L */
+109 4 4 8 /* M -> M */
+110 4 7 8 /* N -> N */
+111 4 6 8 /* O -> O */
+112 5 1 8 /* P -> P */
+113 7 6 8 /* Q -> Q */
+114 2 1 8 /* R -> R */
+115 1 5 8 /* S -> S */
+116 2 6 8 /* T -> T */
+117 3 6 8 /* U -> U */
+118 3 7 8 /* V -> V */
+119 1 1 8 /* W -> W */
+120 2 7 8 /* X -> X */
+121 3 1 8 /* Y -> Y */
+122 1 4 8 /* Z -> Z */
+
+# Restore key
+280 -3 0
+
+# joystick keymap A (port 1)
+256 -1 0 /* NumPad 0 -> FIRE */
+265 -1 7 /* NumPad 9 -> UP */
+259 -1 2 /* NumPad 3 -> DOWN */
+263 -1 4 /* NumPad 7 -> LEFT */
+257 -1 5 /* NumPad 1 -> RIGHT */
+
+# joystick Keymap B (port 2)
+261 -2 0 /* NumPad 5 -> FIRE */
+264 -2 7 /* NumPad 8 -> UP */
+258 -2 2 /* NumPad 2 -> DOWN */
+260 -2 4 /* NumPad 4 -> LEFT */
+262 -2 5 /* NumPad 6 -> RIGHT */
+
+# Joyport attached keypad key mappings
+# note: there are no such keys on the C64 keyboard connected to keyrah
+#300 -5 0 /* NumLock -> keypad x0 */
+#263 -5 1 /* NumPad 7 -> keypad 7 */
+#264 -5 2 /* NumPad 8 -> keypad 8 */
+#265 -5 3 /* NumPad 9 -> keypad 9 */
+#267 -5 4 /* NumPad / -> keypad / */
+#302 -5 5 /* ScrollLock -> keypad x1 */
+#260 -5 6 /* NumPad 4 -> keypad 4 */
+#261 -5 7 /* NumPad 5 -> keypad 5 */
+#262 -5 8 /* NumPad 6 -> keypad 6 */
+#268 -5 9 /* NumPad * -> keypad * */
+#317 -5 10 /* SysReq -> keypad x2 */
+#257 -5 11 /* NumPad 1 -> keypad 1 */
+#258 -5 12 /* NumPad 2 -> keypad 2 */
+#259 -5 13 /* NumPad 3 -> keypad 3 */
+#269 -5 14 /* NumPad - -> keypad - */
+#316 -5 15 /* PrtScr -> keypad x3 */
+#256 -5 16 /* NumPad 0 -> keypad 0 */
+#266 -5 17 /* NumPad , -> keypad . */
+#271 -5 18 /* NumPad Enter -> keypad enter */
+#270 -5 19 /* NumPad + -> keypad + */
Added: trunk/vice/data/C64/sdl_joymap_8bitdo_6b.vjm
===================================================================
--- trunk/vice/data/C64/sdl_joymap_8bitdo_6b.vjm (rev 0)
+++ trunk/vice/data/C64/sdl_joymap_8bitdo_6b.vjm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,60 @@
+# VICE joystick mapping file
+#
+# A joystick map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal line has 'joynum inputtype inputindex action'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear all mappings
+#
+# inputtype:
+# 0 axis
+# 1 button
+# 2 hat
+#
+# For buttons, inputindex is the zero-based index of the button.
+# For hats: hat 0 has inputindex 0,1,2,3 respectively for up, down, left and right. Hat 1 has 5,6,7,8 etc.
+# For axes, and action 1 (joystick) and 2 (keyboard): axis 0 has inputindex 0,1 respectively for positive and negative, axis 1 has 2,3 etc.
+# For axes, and action 6 (pot axis): inputindex is the zero-based index of the axis.
+#
+# action [action_parameters]:
+# 0 none
+# 1 pin joystick (pin: 1/2/4/8/16/32/64 = u/d/l/r/fire/fire2/fire3)
+# 2 row col keyboard
+# 3 map
+# 4 UI activate
+# 5 action-name UI function
+# 6 pot potentiometer (1=pot x, 2=pot y)
+#
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# for use with the https://www.8bitdo.com "6b" controller
+
+!CLEAR
+
+# 6B controller
+0 0 0 1 8
+0 0 1 1 4
+
+0 0 2 1 2
+0 0 3 1 1
+
+0 0 4 0
+0 0 5 0
+
+0 1 0 1 64
+0 1 1 1 16
+0 1 2 1 32
+0 1 3 0
+0 1 4 0
+0 1 5 1 1
+0 1 6 0
+0 1 7 0
+0 1 8 4
+0 1 9 0
+
+
Added: trunk/vice/data/C64/sdl_sym_no_pi_4-500_bmc64.vkm
===================================================================
--- trunk/vice/data/C64/sdl_sym_no_pi_4-500_bmc64.vkm (rev 0)
+++ trunk/vice/data/C64/sdl_sym_no_pi_4-500_bmc64.vkm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,255 @@
+# VICE keyboard mapping file
+#
+# A Keyboard map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal lines have 'keysym/scancode row column shiftflag'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear whole table
+# '!INCLUDE filename' read file as mapping file
+# '!LSHIFT row col' left shift keyboard row/column
+# '!RSHIFT row col' right shift keyboard row/column
+# '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT)
+# '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT)
+# for emulated keyboards that have only one shift key, set both LSHIFT
+# and RSHIFT to the same row/col and use RSHIFT for VSHIFT and SHIFTL.
+# '!LCTRL row col' left control keyboard row/column
+# '!VCTRL ctrlkey' virtual control key (LCTRL)
+# '!LCBM row col' left CBM keyboard row/column
+# '!VCBM cbmkey' virtual CBM key (LCBM)
+# '!UNDEF keysym' remove keysym from table
+#
+# Shiftflag can have these values, flags can be ORed to combine them:
+# 0x0000 0 key is not shifted for this keysym/scancode
+# 0x0001 1 key is combined with shift for this keysym/scancode
+# 0x0002 2 key is left shift on emulated machine
+# 0x0004 4 key is right shift on emulated machine (use only this one
+# for emulated keyboards that have only one shift key)
+# 0x0008 8 key can be shifted or not with this keysym/scancode
+# 0x0010 16 deshift key for this keysym/scancode
+# 0x0020 32 another definition for this keysym/scancode follows
+# 0x0040 64 key is shift-lock on emulated machine
+# 0x0080 128 shift modifier required on host
+# 0x0100 256 key is used for an alternative keyboard mapping, e.g. C64 mode in x128
+# 0x0200 512 alt-r (alt-gr) modifier required on host
+# 0x0400 1024 ctrl modifier required on host
+# 0x0800 2048 key is combined with cbm for this keysym/scancode
+# 0x1000 4096 key is combined with ctrl for this keysym/scancode
+# 0x2000 8192 key is (left) cbm on emulated machine
+# 0x4000 16384 key is (left) ctrl on emulated machine
+#
+# Negative row values:
+# 'keysym -1 n' joystick keymap A, direction n
+# 'keysym -2 n' joystick keymap B, direction n
+# 'keysym -3 0' first RESTORE key
+# 'keysym -3 1' second RESTORE key
+# 'keysym -4 0' 40/80 column key (x128)
+# 'keysym -4 1' CAPS (ASCII/DIN) key (x128)
+# 'keysym -5 n' joyport keypad, key n (not supported in x128)
+#
+# Joystick direction values:
+# 0 Fire
+# 1 South/West
+# 2 South
+# 3 South/East
+# 4 West
+# 5 East
+# 6 North/West
+# 7 North
+# 8 North/East
+#
+# Joyport keypad key layout:
+# --------------------------
+# | 0 | 1 | 2 | 3 | 4 |
+# --------------------------
+# | 5 | 6 | 7 | 8 | 9 |
+# --------------------------
+# | 10 | 11 | 12 | 13 | 14 |
+# --------------------------
+# | 15 | 16 | 17 | 18 | 19 |
+# --------------------------
+#
+# When a bigger spaced key is used,
+# it uses the upper left most key value.
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# to be used in combination with https://github.com/aminch/bmc-joy-pcb
+
+# SDL symbolic map for the C64, the SCPU64, and the C64DTV
+
+# Norwegian was currently broken and on PiOS it was returning US layout keycodes
+# even though the system was in NO locale, therefore we will just use the
+# US file here for now
+
+# note: For some reason SDL does not get keyboard events for "dead keys" at all,
+# so a "nodeadkeys" layout must be used. CAUTION: apparently SDL generates
+# some tables internally at startup - switching the host layout while
+# the emulator is running produces unpredictable results (broken keycodes)
+
+# C64 keyboard matrix:
+#
+# +-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0|Bit 1|Bit 2|Bit 3|Bit 4|Bit 5|Bit 6|Bit 7|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0| DEL |Retrn|C_L/R| F7 | F1 | F3 | F5 |C_U/D|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 1| 3 # | W | A | 4 $ | Z | S | E | S_L |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 2| 5 % | R | D | 6 & | C | F | T | X |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 3| 7 ' | Y | G | 8 ( | B | H | U | V |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 4| 9 ) | I | J | 0 | M | K | O | N |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 5| + | P | L | - | . > | : [ | @ | , < |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 6|POUND| * | ; ] | HOME| S_R | = | A_UP| / ? |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 7| 1 ! |A_LFT| CTRL| 2 " |SPACE| C= | Q | R/S |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+
+# C64 Keyboard layout:
+#
+# arrow 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 + - pound clr del f1/f2
+# ctrl q w e r t y u i o p @ * ^ restore f3/f4
+# r/s SL a s d f g h j k l :[ ;] = return f5/f6
+# CBM LS z x c v b n m ,< .> /? RS u/d l/r f7/f8
+# space
+
+!CLEAR
+!LSHIFT 1 7
+!RSHIFT 6 4
+!VSHIFT RSHIFT
+!SHIFTL LSHIFT
+!LCBM 7 5
+!VCBM LCBM
+!LCTRL 7 2
+!VCTRL LCTRL
+
+27 7 7 8 /* ESC -> Run/Stop */
+49 7 0 8 /* 1 -> 1 */
+50 7 3 32 /* 2 -> 2 */
+50 5 6 144 /* @ -> @ */
+51 1 0 8 /* 3 -> 3 */
+52 1 3 8 /* 4 -> 4 */
+53 2 0 8 /* 5 -> 5 */
+54 2 3 32 /* 6 -> 6 */
+54 6 6 144 /* ^ -> ^ */
+55 3 0 32 /* 7 -> 7 */
+55 2 3 129 /* & -> & */
+56 3 3 32 /* 8 -> 8 */
+56 6 1 144 /* * -> * */
+57 4 0 32 /* 9 -> 9 */
+57 3 3 129 /* ( -> ( */
+48 4 3 32 /* 0 -> 0 */
+48 4 0 129 /* ) -> ) */
+45 5 3 32 /* Minus -> Minus */
+45 5 6 2192 /* _ -> _ */
+61 6 5 32 /* = -> = */
+61 5 0 144 /* + -> + */
+8 0 0 8 /* Backspace -> DEL */
+9 7 5 8192 /* Tab -> CBM */
+113 7 6 8 /* Q -> Q */
+119 1 1 8 /* W -> W */
+101 1 6 8 /* E -> E */
+114 2 1 8 /* R -> R */
+116 2 6 8 /* T -> T */
+121 3 1 8 /* Y -> Y */
+117 3 6 8 /* U -> U */
+105 4 1 8 /* I -> I */
+111 4 6 8 /* O -> O */
+112 5 1 8 /* P -> P */
+91 5 5 1 /* [ -> [ */
+93 6 2 1 /* ] -> ] */
+13 0 1 8 /* Return -> Return */
+306 7 2 16384 /* Left Ctrl -> Ctrl */
+97 1 2 8 /* A -> A */
+115 1 5 8 /* S -> S */
+100 2 2 8 /* D -> D */
+102 2 5 8 /* F -> F */
+103 3 2 8 /* G -> G */
+104 3 5 8 /* H -> H */
+106 4 2 8 /* J -> J */
+107 4 5 8 /* K -> K */
+108 5 2 8 /* L -> L */
+59 6 2 32 /* ; -> ; */
+59 5 5 144 /* : -> : */
+39 3 0 33 /* ' -> ' */
+39 7 3 129 /* " -> " */
+96 3 0 33 /* ` -> ` */
+96 7 1 129 /* ~ -> Arrow Left */
+92 6 0 32 /* \ -> Pound */
+304 1 7 2 /* Left Shift -> Left Shift */
+301 1 7 64 /* Caps Lock -> Shift Lock */
+122 1 4 8 /* Z -> Z */
+120 2 7 8 /* X -> X */
+99 2 4 8 /* C -> C */
+118 3 7 8 /* V -> V */
+98 3 4 8 /* B -> B */
+110 4 7 8 /* N -> N */
+109 4 4 8 /* M -> M */
+44 5 7 8 /* , -> , */
+46 5 4 8 /* . -> . */
+47 6 7 8 /* / -> / */
+303 6 4 4 /* Right Shift -> Right Shift */
+32 7 4 8 /* Space -> Space */
+282 0 4 8 /* F1 -> F1 */
+283 0 4 1 /* F2 -> F2 */
+284 0 5 8 /* F3 -> F3 */
+285 0 5 1 /* F4 -> F4 */
+286 0 6 8 /* F5 -> F5 */
+287 0 6 1 /* F6 -> F6 */
+288 0 3 8 /* F7 -> F7 */
+289 0 3 1 /* F8 -> F8 */
+278 6 3 8 /* Home -> CLR/HOME */
+273 0 7 1 /* Up -> CRSR UP */
+276 0 2 1 /* Left -> CRSR LEFT */
+275 0 2 8 /* Right -> CRSR RIGHT */
+274 0 7 8 /* Down -> CRSR DOWN */
+277 0 0 1 /* Insert -> INS */
+127 0 0 8 /* Delete -> DEL */
+279 7 1 8 /* End -> Left Arrow */
+281 6 6 8 /* Page Down -> Arrow up */
+
+# Restore key mappings
+280 -3 0 /* Page Up -> RESTORE */
+
+# joystick keymap A (port 1)
+256 -1 0 /* NumPad 0 -> FIRE */
+265 -1 7 /* NumPad 9 -> UP */
+259 -1 2 /* NumPad 3 -> DOWN */
+263 -1 4 /* NumPad 7 -> LEFT */
+257 -1 5 /* NumPad 1 -> RIGHT */
+
+# joystick Keymap B (port 2)
+261 -2 0 /* NumPad 5 -> FIRE */
+264 -2 7 /* NumPad 8 -> UP */
+258 -2 2 /* NumPad 2 -> DOWN */
+260 -2 4 /* NumPad 4 -> LEFT */
+262 -2 5 /* NumPad 6 -> RIGHT */
+
+# Joyport attached keypad key mappings
+#300 -5 0 /* NumLock -> keypad x0 */
+#263 -5 1 /* NumPad 7 -> keypad 7 */
+#264 -5 2 /* NumPad 8 -> keypad 8 */
+#265 -5 3 /* NumPad 9 -> keypad 9 */
+#267 -5 4 /* NumPad / -> keypad / */
+#302 -5 5 /* ScrollLock -> keypad x1 */
+#260 -5 6 /* NumPad 4 -> keypad 4 */
+#261 -5 7 /* NumPad 5 -> keypad 5 */
+#262 -5 8 /* NumPad 6 -> keypad 6 */
+#268 -5 9 /* NumPad * -> keypad * */
+#317 -5 10 /* SysReq -> keypad x2 */
+#257 -5 11 /* NumPad 1 -> keypad 1 */
+#258 -5 12 /* NumPad 2 -> keypad 2 */
+#259 -5 13 /* NumPad 3 -> keypad 3 */
+#269 -5 14 /* NumPad - -> keypad - */
+#316 -5 15 /* PrtScr -> keypad x3 */
+#256 -5 16 /* NumPad 0 -> keypad 0 */
+#266 -5 17 /* NumPad , -> keypad . */
+#271 -5 18 /* NumPad Enter -> keypad enter */
+#270 -5 19 /* NumPad + -> keypad + */
Added: trunk/vice/data/C64/sdl_sym_uk_pi_4-500_bmc64.vkm
===================================================================
--- trunk/vice/data/C64/sdl_sym_uk_pi_4-500_bmc64.vkm (rev 0)
+++ trunk/vice/data/C64/sdl_sym_uk_pi_4-500_bmc64.vkm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,274 @@
+# VICE keyboard mapping file
+#
+# A Keyboard map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal lines have 'keysym/scancode row column shiftflag'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear whole table
+# '!INCLUDE filename' read file as mapping file
+# '!LSHIFT row col' left shift keyboard row/column
+# '!RSHIFT row col' right shift keyboard row/column
+# '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT)
+# '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT)
+# for emulated keyboards that have only one shift key, set both LSHIFT
+# and RSHIFT to the same row/col and use RSHIFT for VSHIFT and SHIFTL.
+# '!LCTRL row col' left control keyboard row/column
+# '!VCTRL ctrlkey' virtual control key (LCTRL)
+# '!LCBM row col' left CBM keyboard row/column
+# '!VCBM cbmkey' virtual CBM key (LCBM)
+# '!UNDEF keysym' remove keysym from table
+#
+# Shiftflag can have these values, flags can be ORed to combine them:
+# 0x0000 0 key is not shifted for this keysym/scancode
+# 0x0001 1 key is combined with shift for this keysym/scancode
+# 0x0002 2 key is left shift on emulated machine
+# 0x0004 4 key is right shift on emulated machine (use only this one
+# for emulated keyboards that have only one shift key)
+# 0x0008 8 key can be shifted or not with this keysym/scancode
+# 0x0010 16 deshift key for this keysym/scancode
+# 0x0020 32 another definition for this keysym/scancode follows
+# 0x0040 64 key is shift-lock on emulated machine
+# 0x0080 128 shift modifier required on host
+# 0x0100 256 key is used for an alternative keyboard mapping, e.g. C64 mode in x128
+# 0x0200 512 alt-r (alt-gr) modifier required on host
+# 0x0400 1024 ctrl modifier required on host
+# 0x0800 2048 key is combined with cbm for this keysym/scancode
+# 0x1000 4096 key is combined with ctrl for this keysym/scancode
+# 0x2000 8192 key is (left) cbm on emulated machine
+# 0x4000 16384 key is (left) ctrl on emulated machine
+#
+# Negative row values:
+# 'keysym -1 n' joystick keymap A, direction n
+# 'keysym -2 n' joystick keymap B, direction n
+# 'keysym -3 0' first RESTORE key
+# 'keysym -3 1' second RESTORE key
+# 'keysym -4 0' 40/80 column key (x128)
+# 'keysym -4 1' CAPS (ASCII/DIN) key (x128)
+# 'keysym -5 n' joyport keypad, key n (not supported in x128)
+#
+# Joystick direction values:
+# 0 Fire
+# 1 South/West
+# 2 South
+# 3 South/East
+# 4 West
+# 5 East
+# 6 North/West
+# 7 North
+# 8 North/East
+#
+# Joyport keypad key layout:
+# --------------------------
+# | 0 | 1 | 2 | 3 | 4 |
+# --------------------------
+# | 5 | 6 | 7 | 8 | 9 |
+# --------------------------
+# | 10 | 11 | 12 | 13 | 14 |
+# --------------------------
+# | 15 | 16 | 17 | 18 | 19 |
+# --------------------------
+#
+# When a bigger spaced key is used,
+# it uses the upper left most key value.
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# to be used in combination with https://github.com/aminch/bmc-joy-pcb
+
+# SDL symbolic map for the C64, the SCPU64, and the C64DTV
+
+# note: For some reason SDL does not get keyboard events for "dead keys" at all,
+# so a "nodeadkeys" layout must be used. CAUTION: apparently SDL generates
+# some tables internally at startup - switching the host layout while
+# the emulator is running produces unpredictable results (broken keycodes)
+
+# C64 keyboard matrix:
+#
+# +-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0|Bit 1|Bit 2|Bit 3|Bit 4|Bit 5|Bit 6|Bit 7|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0| DEL |Retrn|C_L/R| F7 | F1 | F3 | F5 |C_U/D|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 1| 3 # | W | A | 4 $ | Z | S | E | S_L |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 2| 5 % | R | D | 6 & | C | F | T | X |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 3| 7 ' | Y | G | 8 ( | B | H | U | V |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 4| 9 ) | I | J | 0 | M | K | O | N |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 5| + | P | L | - | . > | : [ | @ | , < |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 6|POUND| * | ; ] | HOME| S_R | = | A_UP| / ? |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 7| 1 ! |A_LFT| CTRL| 2 " |SPACE| C= | Q | R/S |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+
+# C64 Keyboard layout:
+#
+# arrow 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 + - pound clr del f1/f2
+# ctrl q w e r t y u i o p @ * ^ restore f3/f4
+# r/s SL a s d f g h j k l :[ ;] = return f5/f6
+# CBM LS z x c v b n m ,< .> /? RS u/d l/r f7/f8
+# space
+
+!CLEAR
+!LSHIFT 1 7
+!RSHIFT 6 4
+!VSHIFT RSHIFT
+!SHIFTL LSHIFT
+!LCBM 7 5
+!VCBM LCBM
+!LCTRL 7 2
+!VCTRL LCTRL
+
+92 1 0 33 /* \ -> Pi Note: On UK Pi500 is this the #~ key */
+92 6 6 129 /* | -> Pi Note: On UK Pi500 is this the #~ key */
+
+96 7 1 8 /* `¬ -> left arrow */
+49 7 0 8 /* 1 -> 1 ! */
+50 7 3 8 /* 2 -> 2 " */
+
+51 1 0 32 /* 3 -> 3 # */
+51 6 0 144 /* £ -> £ */
+
+52 1 3 8 /* 4 -> 4 $ */
+53 2 0 8 /* 5 -> 5 % */
+
+54 2 3 32 /* 6 -> 6 & */
+54 6 6 144 /* ^ -> Arrow up */
+
+55 3 0 32 /* 7 -> 7 ' */
+55 2 3 129 /* & -> & */
+
+56 3 3 32 /* 8 -> 8 ( */
+56 6 1 144 /* * -> * */
+
+57 4 0 32 /* 9 -> 9 ) */
+57 3 3 129 /* ( -> ( */
+
+48 4 3 32 /* 0 -> 0 */
+48 4 0 129 /* ) -> ) */
+
+45 5 3 32 /* Minus -> Minus */
+45 5 6 2192 /* _ -> _ */
+
+61 6 5 32 /* = -> = */
+61 5 0 144 /* + -> + */
+
+8 0 0 8 /* Backspace -> DEL */
+
+113 7 6 8 /* Q -> Q */
+119 1 1 8 /* W -> W */
+101 1 6 8 /* E -> E */
+114 2 1 8 /* R -> R */
+116 2 6 8 /* T -> T */
+121 3 1 8 /* Y -> Y */
+117 3 6 8 /* U -> U */
+105 4 1 8 /* I -> I */
+111 4 6 8 /* O -> O */
+112 5 1 8 /* P -> P */
+91 5 5 1 /* [ -> [ */
+93 6 2 1 /* ] -> ] */
+
+97 1 2 8 /* A -> A */
+115 1 5 8 /* S -> S */
+100 2 2 8 /* D -> D */
+102 2 5 8 /* F -> F */
+103 3 2 8 /* G -> G */
+104 3 5 8 /* H -> H */
+106 4 2 8 /* J -> J */
+107 4 5 8 /* K -> K */
+108 5 2 8 /* L -> L */
+
+59 6 2 32 /* ; -> ; */
+59 5 5 144 /* : -> : */
+
+39 3 0 33 /* ' -> ' */
+39 5 6 144 /* @ -> @ */
+
+35 1 0 33 /* # -> # */
+35 6 6 129 /* ~ -> Pi */
+
+122 1 4 8 /* Z -> Z */
+120 2 7 8 /* X -> X */
+99 2 4 8 /* C -> C */
+118 3 7 8 /* V -> V */
+98 3 4 8 /* B -> B */
+110 4 7 8 /* N -> N */
+109 4 4 8 /* M -> M */
+44 5 7 8 /* , -> , */
+46 5 4 8 /* . -> . */
+47 6 7 8 /* / -> / */
+
+9 7 5 8192 /* Tab -> CBM */
+13 0 1 8 /* Return -> Return */
+306 7 2 16384 /* Left Ctrl -> Ctrl */
+304 1 7 2 /* Left Shift -> Left Shift */
+301 1 7 64 /* Caps Lock -> Shift Lock */
+303 6 4 4 /* Right Shift -> Right Shift */
+32 7 4 8 /* Space -> Space */
+
+27 7 7 8 /* ESC -> Run/Stop */
+282 0 4 8 /* F1 -> F1 */
+283 0 4 1 /* F2 -> F2 */
+284 0 5 8 /* F3 -> F3 */
+285 0 5 1 /* F4 -> F4 */
+286 0 6 8 /* F5 -> F5 */
+287 0 6 1 /* F6 -> F6 */
+288 0 3 8 /* F7 -> F7 */
+289 0 3 1 /* F8 -> F8 */
+
+278 6 3 8 /* Home -> CLR/HOME */
+273 0 7 1 /* Up -> CRSR UP */
+276 0 2 1 /* Left -> CRSR LEFT */
+275 0 2 8 /* Right -> CRSR RIGHT */
+274 0 7 8 /* Down -> CRSR DOWN */
+
+277 0 0 1 /* Insert -> INS */
+127 0 0 8 /* Delete -> DEL */
+279 7 1 8 /* End -> Left Arrow */
+
+# Restore key mappings
+280 -3 0 /* Page Up -> RESTORE */
+
+# joystick keymap A (port 1)
+256 -1 0 /* NumPad 0 -> FIRE */
+265 -1 7 /* NumPad 9 -> UP */
+259 -1 2 /* NumPad 3 -> DOWN */
+263 -1 4 /* NumPad 7 -> LEFT */
+257 -1 5 /* NumPad 1 -> RIGHT */
+
+# joystick Keymap B (port 2)
+261 -2 0 /* NumPad 5 -> FIRE */
+264 -2 7 /* NumPad 8 -> UP */
+258 -2 2 /* NumPad 2 -> DOWN */
+260 -2 4 /* NumPad 4 -> LEFT */
+262 -2 5 /* NumPad 6 -> RIGHT */
+
+# Joyport attached keypad key mappings
+#300 -5 0 /* NumLock -> keypad x0 */
+#263 -5 1 /* NumPad 7 -> keypad 7 */
+#264 -5 2 /* NumPad 8 -> keypad 8 */
+#265 -5 3 /* NumPad 9 -> keypad 9 */
+#267 -5 4 /* NumPad / -> keypad / */
+#302 -5 5 /* ScrollLock -> keypad x1 */
+#260 -5 6 /* NumPad 4 -> keypad 4 */
+#261 -5 7 /* NumPad 5 -> keypad 5 */
+#262 -5 8 /* NumPad 6 -> keypad 6 */
+#268 -5 9 /* NumPad * -> keypad * */
+#317 -5 10 /* SysReq -> keypad x2 */
+#257 -5 11 /* NumPad 1 -> keypad 1 */
+#258 -5 12 /* NumPad 2 -> keypad 2 */
+#259 -5 13 /* NumPad 3 -> keypad 3 */
+#269 -5 14 /* NumPad - -> keypad - */
+#316 -5 15 /* PrtScr -> keypad x3 */
+#256 -5 16 /* NumPad 0 -> keypad 0 */
+#266 -5 17 /* NumPad , -> keypad . */
+#271 -5 18 /* NumPad Enter -> keypad enter */
+#270 -5 19 /* NumPad + -> keypad + */
+
Added: trunk/vice/data/C64/sdl_sym_us_pi_4-500_bmc64.vkm
===================================================================
--- trunk/vice/data/C64/sdl_sym_us_pi_4-500_bmc64.vkm (rev 0)
+++ trunk/vice/data/C64/sdl_sym_us_pi_4-500_bmc64.vkm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,251 @@
+# VICE keyboard mapping file
+#
+# A Keyboard map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal lines have 'keysym/scancode row column shiftflag'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear whole table
+# '!INCLUDE filename' read file as mapping file
+# '!LSHIFT row col' left shift keyboard row/column
+# '!RSHIFT row col' right shift keyboard row/column
+# '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT)
+# '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT)
+# for emulated keyboards that have only one shift key, set both LSHIFT
+# and RSHIFT to the same row/col and use RSHIFT for VSHIFT and SHIFTL.
+# '!LCTRL row col' left control keyboard row/column
+# '!VCTRL ctrlkey' virtual control key (LCTRL)
+# '!LCBM row col' left CBM keyboard row/column
+# '!VCBM cbmkey' virtual CBM key (LCBM)
+# '!UNDEF keysym' remove keysym from table
+#
+# Shiftflag can have these values, flags can be ORed to combine them:
+# 0x0000 0 key is not shifted for this keysym/scancode
+# 0x0001 1 key is combined with shift for this keysym/scancode
+# 0x0002 2 key is left shift on emulated machine
+# 0x0004 4 key is right shift on emulated machine (use only this one
+# for emulated keyboards that have only one shift key)
+# 0x0008 8 key can be shifted or not with this keysym/scancode
+# 0x0010 16 deshift key for this keysym/scancode
+# 0x0020 32 another definition for this keysym/scancode follows
+# 0x0040 64 key is shift-lock on emulated machine
+# 0x0080 128 shift modifier required on host
+# 0x0100 256 key is used for an alternative keyboard mapping, e.g. C64 mode in x128
+# 0x0200 512 alt-r (alt-gr) modifier required on host
+# 0x0400 1024 ctrl modifier required on host
+# 0x0800 2048 key is combined with cbm for this keysym/scancode
+# 0x1000 4096 key is combined with ctrl for this keysym/scancode
+# 0x2000 8192 key is (left) cbm on emulated machine
+# 0x4000 16384 key is (left) ctrl on emulated machine
+#
+# Negative row values:
+# 'keysym -1 n' joystick keymap A, direction n
+# 'keysym -2 n' joystick keymap B, direction n
+# 'keysym -3 0' first RESTORE key
+# 'keysym -3 1' second RESTORE key
+# 'keysym -4 0' 40/80 column key (x128)
+# 'keysym -4 1' CAPS (ASCII/DIN) key (x128)
+# 'keysym -5 n' joyport keypad, key n (not supported in x128)
+#
+# Joystick direction values:
+# 0 Fire
+# 1 South/West
+# 2 South
+# 3 South/East
+# 4 West
+# 5 East
+# 6 North/West
+# 7 North
+# 8 North/East
+#
+# Joyport keypad key layout:
+# --------------------------
+# | 0 | 1 | 2 | 3 | 4 |
+# --------------------------
+# | 5 | 6 | 7 | 8 | 9 |
+# --------------------------
+# | 10 | 11 | 12 | 13 | 14 |
+# --------------------------
+# | 15 | 16 | 17 | 18 | 19 |
+# --------------------------
+#
+# When a bigger spaced key is used,
+# it uses the upper left most key value.
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# to be used in combination with https://github.com/aminch/bmc-joy-pcb
+
+# SDL symbolic map for the C64, the SCPU64, and the C64DTV
+
+# note: For some reason SDL does not get keyboard events for "dead keys" at all,
+# so a "nodeadkeys" layout must be used. CAUTION: apparently SDL generates
+# some tables internally at startup - switching the host layout while
+# the emulator is running produces unpredictable results (broken keycodes)
+
+# C64 keyboard matrix:
+#
+# +-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0|Bit 1|Bit 2|Bit 3|Bit 4|Bit 5|Bit 6|Bit 7|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0| DEL |Retrn|C_L/R| F7 | F1 | F3 | F5 |C_U/D|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 1| 3 # | W | A | 4 $ | Z | S | E | S_L |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 2| 5 % | R | D | 6 & | C | F | T | X |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 3| 7 ' | Y | G | 8 ( | B | H | U | V |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 4| 9 ) | I | J | 0 | M | K | O | N |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 5| + | P | L | - | . > | : [ | @ | , < |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 6|POUND| * | ; ] | HOME| S_R | = | A_UP| / ? |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 7| 1 ! |A_LFT| CTRL| 2 " |SPACE| C= | Q | R/S |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+
+# C64 Keyboard layout:
+#
+# arrow 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 + - pound clr del f1/f2
+# ctrl q w e r t y u i o p @ * ^ restore f3/f4
+# r/s SL a s d f g h j k l :[ ;] = return f5/f6
+# CBM LS z x c v b n m ,< .> /? RS u/d l/r f7/f8
+# space
+
+!CLEAR
+!LSHIFT 1 7
+!RSHIFT 6 4
+!VSHIFT RSHIFT
+!SHIFTL LSHIFT
+!LCBM 7 5
+!VCBM LCBM
+!LCTRL 7 2
+!VCTRL LCTRL
+
+27 7 7 8 /* ESC -> Run/Stop */
+49 7 0 8 /* 1 -> 1 */
+50 7 3 32 /* 2 -> 2 */
+50 5 6 144 /* @ -> @ */
+51 1 0 8 /* 3 -> 3 */
+52 1 3 8 /* 4 -> 4 */
+53 2 0 8 /* 5 -> 5 */
+54 2 3 32 /* 6 -> 6 */
+54 6 6 144 /* ^ -> ^ */
+55 3 0 32 /* 7 -> 7 */
+55 2 3 129 /* & -> & */
+56 3 3 32 /* 8 -> 8 */
+56 6 1 144 /* * -> * */
+57 4 0 32 /* 9 -> 9 */
+57 3 3 129 /* ( -> ( */
+48 4 3 32 /* 0 -> 0 */
+48 4 0 129 /* ) -> ) */
+45 5 3 32 /* Minus -> Minus */
+45 5 6 2192 /* _ -> _ */
+61 6 5 32 /* = -> = */
+61 5 0 144 /* + -> + */
+8 0 0 8 /* Backspace -> DEL */
+9 7 5 8192 /* Tab -> CBM */
+113 7 6 8 /* Q -> Q */
+119 1 1 8 /* W -> W */
+101 1 6 8 /* E -> E */
+114 2 1 8 /* R -> R */
+116 2 6 8 /* T -> T */
+121 3 1 8 /* Y -> Y */
+117 3 6 8 /* U -> U */
+105 4 1 8 /* I -> I */
+111 4 6 8 /* O -> O */
+112 5 1 8 /* P -> P */
+91 5 5 1 /* [ -> [ */
+93 6 2 1 /* ] -> ] */
+13 0 1 8 /* Return -> Return */
+306 7 2 16384 /* Left Ctrl -> Ctrl */
+97 1 2 8 /* A -> A */
+115 1 5 8 /* S -> S */
+100 2 2 8 /* D -> D */
+102 2 5 8 /* F -> F */
+103 3 2 8 /* G -> G */
+104 3 5 8 /* H -> H */
+106 4 2 8 /* J -> J */
+107 4 5 8 /* K -> K */
+108 5 2 8 /* L -> L */
+59 6 2 32 /* ; -> ; */
+59 5 5 144 /* : -> : */
+39 3 0 33 /* ' -> ' */
+39 7 3 129 /* " -> " */
+96 3 0 33 /* ` -> ` */
+96 7 1 129 /* ~ -> Arrow Left */
+92 6 0 32 /* \ -> Pound */
+304 1 7 2 /* Left Shift -> Left Shift */
+301 1 7 64 /* Caps Lock -> Shift Lock */
+122 1 4 8 /* Z -> Z */
+120 2 7 8 /* X -> X */
+99 2 4 8 /* C -> C */
+118 3 7 8 /* V -> V */
+98 3 4 8 /* B -> B */
+110 4 7 8 /* N -> N */
+109 4 4 8 /* M -> M */
+44 5 7 8 /* , -> , */
+46 5 4 8 /* . -> . */
+47 6 7 8 /* / -> / */
+303 6 4 4 /* Right Shift -> Right Shift */
+32 7 4 8 /* Space -> Space */
+282 0 4 8 /* F1 -> F1 */
+283 0 4 1 /* F2 -> F2 */
+284 0 5 8 /* F3 -> F3 */
+285 0 5 1 /* F4 -> F4 */
+286 0 6 8 /* F5 -> F5 */
+287 0 6 1 /* F6 -> F6 */
+288 0 3 8 /* F7 -> F7 */
+289 0 3 1 /* F8 -> F8 */
+278 6 3 8 /* Home -> CLR/HOME */
+273 0 7 1 /* Up -> CRSR UP */
+276 0 2 1 /* Left -> CRSR LEFT */
+275 0 2 8 /* Right -> CRSR RIGHT */
+274 0 7 8 /* Down -> CRSR DOWN */
+277 0 0 1 /* Insert -> INS */
+127 0 0 8 /* Delete -> DEL */
+279 7 1 8 /* End -> Left Arrow */
+281 6 6 8 /* Page Down -> Arrow up */
+
+# Restore key mappings
+280 -3 0 /* Page Up -> RESTORE */
+
+# joystick keymap A (port 1)
+256 -1 0 /* NumPad 0 -> FIRE */
+265 -1 7 /* NumPad 9 -> UP */
+259 -1 2 /* NumPad 3 -> DOWN */
+263 -1 4 /* NumPad 7 -> LEFT */
+257 -1 5 /* NumPad 1 -> RIGHT */
+
+# joystick Keymap B (port 2)
+261 -2 0 /* NumPad 5 -> FIRE */
+264 -2 7 /* NumPad 8 -> UP */
+258 -2 2 /* NumPad 2 -> DOWN */
+260 -2 4 /* NumPad 4 -> LEFT */
+262 -2 5 /* NumPad 6 -> RIGHT */
+
+# Joyport attached keypad key mappings
+#300 -5 0 /* NumLock -> keypad x0 */
+#263 -5 1 /* NumPad 7 -> keypad 7 */
+#264 -5 2 /* NumPad 8 -> keypad 8 */
+#265 -5 3 /* NumPad 9 -> keypad 9 */
+#267 -5 4 /* NumPad / -> keypad / */
+#302 -5 5 /* ScrollLock -> keypad x1 */
+#260 -5 6 /* NumPad 4 -> keypad 4 */
+#261 -5 7 /* NumPad 5 -> keypad 5 */
+#262 -5 8 /* NumPad 6 -> keypad 6 */
+#268 -5 9 /* NumPad * -> keypad * */
+#317 -5 10 /* SysReq -> keypad x2 */
+#257 -5 11 /* NumPad 1 -> keypad 1 */
+#258 -5 12 /* NumPad 2 -> keypad 2 */
+#259 -5 13 /* NumPad 3 -> keypad 3 */
+#269 -5 14 /* NumPad - -> keypad - */
+#316 -5 15 /* PrtScr -> keypad x3 */
+#256 -5 16 /* NumPad 0 -> keypad 0 */
+#266 -5 17 /* NumPad , -> keypad . */
+#271 -5 18 /* NumPad Enter -> keypad enter */
+#270 -5 19 /* NumPad + -> keypad + */
Modified: trunk/vice/data/C64DTV/Makefile.am
===================================================================
--- trunk/vice/data/C64DTV/Makefile.am 2025-10-11 18:12:49 UTC (rev 45792)
+++ trunk/vice/data/C64DTV/Makefile.am 2025-10-13 21:07:01 UTC (rev 45793)
@@ -36,6 +36,7 @@
gtk3_pos_bmc64.vkm
sdl_keymaps = \
+ sdl_joymap_8bitdo_6b.vjm \
sdl_keyrah.vkm \
sdl_keyrah_de.vkm \
sdl_keyrah_retropie.vkm \
@@ -55,7 +56,11 @@
sdl_sym_fr.vkm \
sdl_sym_nl.vkm \
sdl_sym_tr.vkm \
- sdl_sym_da.vkm
+ sdl_sym_da.vkm \
+ sdl_sym_us_pi_4-500_bmc64.vkm \
+ sdl_sym_uk_pi_4-500_bmc64.vkm \
+ sdl_sym_no_pi_4-500_bmc64.vkm \
+ sdl_c64p.vkm
sym_file = \
c64mem.sym
Added: trunk/vice/data/C64DTV/sdl_c64p.vkm
===================================================================
--- trunk/vice/data/C64DTV/sdl_c64p.vkm (rev 0)
+++ trunk/vice/data/C64DTV/sdl_c64p.vkm 2025-10-13 21:07:01 UTC (rev 45793)
@@ -0,0 +1,259 @@
+# VICE keyboard mapping file
+#
+# A Keyboard map is read in as patch to the current map.
+#
+# File format:
+# - comment lines start with '#'
+# - keyword lines start with '!keyword'
+# - normal lines have 'keysym/scancode row column shiftflag'
+#
+# Keywords and their lines are:
+# '!CLEAR' clear whole table
+# '!INCLUDE filename' read file as mapping file
+# '!LSHIFT row col' left shift keyboard row/column
+# '!RSHIFT row col' right shift keyboard row/column
+# '!VSHIFT shiftkey' virtual shift key (RSHIFT or LSHIFT)
+# '!SHIFTL shiftkey' shift lock key (RSHIFT or LSHIFT)
+# for emulated keyboards that have only one shift key, set both LSHIFT
+# and RSHIFT to the same row/col and use RSHIFT for VSHIFT and SHIFTL.
+# '!LCTRL row col' left control keyboard row/column
+# '!VCTRL ctrlkey' virtual control key (LCTRL)
+# '!LCBM row col' left CBM keyboard row/column
+# '!VCBM cbmkey' virtual CBM key (LCBM)
+# '!UNDEF keysym' remove keysym from table
+#
+# Shiftflag can have these values, flags can be ORed to combine them:
+# 0x0000 0 key is not shifted for this keysym/scancode
+# 0x0001 1 key is combined with shift for this keysym/scancode
+# 0x0002 2 key is left shift on emulated machine
+# 0x0004 4 key is right shift on emulated machine (use only this one
+# for emulated keyboards that have only one shift key)
+# 0x0008 8 key can be shifted or not with this keysym/scancode
+# 0x0010 16 deshift key for this keysym/scancode
+# 0x0020 32 another definition for this keysym/scancode follows
+# 0x0040 64 key is shift-lock on emulated machine
+# 0x0080 128 shift modifier required on host
+# 0x0100 256 key is used for an alternative keyboard mapping, e.g. C64 mode in x128
+# 0x0200 512 alt-r (alt-gr) modifier required on host
+# 0x0400 1024 ctrl modifier required on host
+# 0x0800 2048 key is combined with cbm for this keysym/scancode
+# 0x1000 4096 key is combined with ctrl for this keysym/scancode
+# 0x2000 8192 key is (left) cbm on emulated machine
+# 0x4000 16384 key is (left) ctrl on emulated machine
+#
+# Negative row values:
+# 'keysym -1 n' joystick keymap A, direction n
+# 'keysym -2 n' joystick keymap B, direction n
+# 'keysym -3 0' first RESTORE key
+# 'keysym -3 1' second RESTORE key
+# 'keysym -4 0' 40/80 column key (x128)
+# 'keysym -4 1' CAPS (ASCII/DIN) key (x128)
+# 'keysym -5 n' joyport keypad, key n (not supported in x128)
+#
+# Joystick direction values:
+# 0 Fire
+# 1 South/West
+# 2 South
+# 3 South/East
+# 4 West
+# 5 East
+# 6 North/West
+# 7 North
+# 8 North/East
+#
+# Joyport keypad key layout:
+# --------------------------
+# | 0 | 1 | 2 | 3 | 4 |
+# --------------------------
+# | 5 | 6 | 7 | 8 | 9 |
+# --------------------------
+# | 10 | 11 | 12 | 13 | 14 |
+# --------------------------
+# | 15 | 16 | 17 | 18 | 19 |
+# --------------------------
+#
+# When a bigger spaced key is used,
+# it uses the upper left most key value.
+
+# This file was taken from https://github.com/aminch/8-bit-pc-pi-compile/
+#
+# specifically for https://github.com/aminch/c64p/
+
+# Positional Mapping for aminch's C64P: https://github.com/aminch/c64p
+
+# note: For some reason SDL does not get keyboard events for "dead keys" at all,
+# so a "nodeadkeys" layout must be used. CAUTION: apparently SDL generates
+# some tables internally at startup - switching the host layout while
+# the emulator is running produces unpredictable results (broken keycodes)
+
+# To use this keyboard mapping the C64P needs to be in BMC64 Mode
+# Press RUN/STOP + F3 to switch into BMC64 Mode
+
+# C64 keyboard matrix:
+#
+# +-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0|Bit 1|Bit 2|Bit 3|Bit 4|Bit 5|Bit 6|Bit 7|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 0| DEL |Retrn|C_L/R| F7 | F1 | F3 | F5 |C_U/D|
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 1| 3 # | W | A | 4 $ | Z | S | E | S_L |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 2| 5 % | R | D | 6 & | C | F | T | X |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 3| 7 ' | Y | G | 8 ( | B | H | U | V |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 4| 9 ) | I | J | 0 | M | K | O | N |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 5| + | P | L | - | . > | : [ | @ | , < |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 6|POUND| * | ; ] | HOME| S_R | = | A_UP| / ? |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+# |Bit 7| 1 ! |A_LFT| CTRL| 2 " |SPACE| C= | Q | R/S |
+# +-----+-----+-----+-----+-----+-----+-----+-----+-----+
+
+# C64 Keyboard layout:
+#
+# arrow 1! 2" 3# 4$ 5% 6& 7' 8( 9) 0 + - pound clr del f1/f2
+# ctrl q w e r t y u i o p @ * ^ restore f3/f4
+# r/s SL a s d f g h j k l :[ ;] = return f5/f6
+# CBM LS z x c v b n m ,< .> /? RS u/d l/r f7/f8
+# space
+
+!CLEAR
+!LSHIFT 1 7
+!RSHIFT 6 4
+!VSHIFT RSHIFT
+!SHIFTL LSHIFT
+!LCBM 7 5
+!VCBM LCBM
+!LCTRL 7 2
+!VCTRL LCTRL
+
+8 0 0 8 /* backspace -> Del */
+13 0 1 8 /* Return -> Return */
+275 0 2 8 /* Right -> CRSR RIGHT */
+276 0 2 1 /* Left -> CRSR LEFT */
+288 0 3 ...
[truncated message content] |
|
From: <gp...@us...> - 2025-10-11 18:12:53
|
Revision: 45792
http://sourceforge.net/p/vice-emu/code/45792
Author: gpz
Date: 2025-10-11 18:12:49 +0000 (Sat, 11 Oct 2025)
Log Message:
-----------
set tap_buffer=NULL after free(), fixes #2173
Modified Paths:
--------------
trunk/vice/src/datasette/datasette.c
Modified: trunk/vice/src/datasette/datasette.c
===================================================================
--- trunk/vice/src/datasette/datasette.c 2025-10-10 18:28:47 UTC (rev 45791)
+++ trunk/vice/src/datasette/datasette.c 2025-10-11 18:12:49 UTC (rev 45792)
@@ -880,7 +880,8 @@
{
CLOCK gap;
- DBG(("datasette_set_tape_image (image present:%s)", image ? "yes" : "no"));
+ DBG(("datasette_set_tape_image (image present:%s) tap_buffer[%d] %p",
+ image ? "yes" : "no", port, (void*)tap_buffer[port]));
current_image[port] = image;
last_tap[port] = next_tap[port] = 0;
@@ -890,6 +891,7 @@
/* allocate buffer for the image */
if (tap_buffer[port] == NULL) {
tap_buffer[port] = lib_malloc(TAP_BUFFER_LENGTH);
+ DBG(("allocated tap_buffer[%d] %p", port, (void*)tap_buffer[port]));
}
/* We need the length of tape for realistic counter. */
current_image[port]->cycle_counter_total = 0;
@@ -912,7 +914,9 @@
/* if image was removed, get rid of the buffer */
if (image == NULL) {
if (tap_buffer[port] != NULL) {
+ DBG(("free tap_buffer[%d] %p", port, (void*)tap_buffer[port]));
lib_free(tap_buffer[port]);
+ tap_buffer[port] = NULL;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-10 18:28:49
|
Revision: 45791
http://sourceforge.net/p/vice-emu/code/45791
Author: gpz
Date: 2025-10-10 18:28:47 +0000 (Fri, 10 Oct 2025)
Log Message:
-----------
fix mp3@c64, plays audio now and does not crash on large frames
Modified Paths:
--------------
trunk/vice/src/c64/cart/clockport-mp3at64.c
Modified: trunk/vice/src/c64/cart/clockport-mp3at64.c
===================================================================
--- trunk/vice/src/c64/cart/clockport-mp3at64.c 2025-10-08 16:43:42 UTC (rev 45790)
+++ trunk/vice/src/c64/cart/clockport-mp3at64.c 2025-10-10 18:28:47 UTC (rev 45791)
@@ -34,11 +34,10 @@
#include <mpg123.h>
+#include "archdep.h"
#include "clockport.h"
#include "lib.h"
-#ifdef MP3AT64_DEBUG
#include "log.h"
-#endif
#include "monitor.h"
#include "sound.h"
#include "types.h"
@@ -46,6 +45,20 @@
#include "clockport-mp3at64.h"
+/* #define MP3AT64_DEBUG */
+
+#ifdef MP3AT64_DEBUG
+#define DBG(x) log_printf x
+#else
+#define DBG(x)
+#endif
+
+/* #define DUMPWAV */
+
+#ifdef DUMPWAV
+FILE *dumpfile;
+#endif
+
/* ------------------------------------------------------------------------- */
/* variables needed */
@@ -161,6 +174,7 @@
}
mp3_output_buffers[MP3_BUFFERS - 1] = NULL;
mp3_output_buffers_size[MP3_BUFFERS - 1] = 0;
+ mp3_output_sample_pos = 0;
}
}
return retval / 32767.0;
@@ -181,8 +195,10 @@
}
mp3_output_buffers[MP3_BUFFERS - 1] = NULL;
mp3_output_buffers_size[MP3_BUFFERS - 1] = 0;
+ mp3_output_sample_pos = 0;
}
}
+
return retval;
}
#endif
@@ -246,6 +262,9 @@
static int clockport_mp3at64_sound_machine_init(sound_t *psid, int speed, int cycles_per_sec)
{
+#ifdef DUMPWAV
+ dumpfile = fopen("dumpwav.raw", "wb");
+#endif
mp3_err = mpg123_init();
if (mp3_err != MPG123_OK) {
return 0;
@@ -276,6 +295,9 @@
mp3_output_buffers_size[i] = 0;
}
}
+#ifdef DUMPWAV
+ fclose(dumpfile);
+#endif
}
#ifdef SOUND_SYSTEM_FLOAT
@@ -297,6 +319,8 @@
int i;
int16_t sample;
+ DBG(("clockport_mp3at64_sound_machine_calculate_samples soc:%d num:%d clock-delta:%ld n:%04x", soc, nr, *delta_t, n));
+
for (i = 0; i < nr; ++i) {
switch (soc) {
default:
@@ -304,9 +328,9 @@
sample = sound_audio_mix(mp3_get_current_sample(), mp3_get_current_sample());
pbuf[i] = sound_audio_mix(pbuf[i], sample);
break;
- case SOUND_OUTPUT_STEREO:
+ case SOUND_OUTPUT_STEREO:
pbuf[i * 2] = sound_audio_mix(pbuf[i * 2], mp3_get_current_sample());
- pbuf[(i * 2) + 1] = sound_audio_mix(pbuf[i], mp3_get_current_sample());
+ pbuf[(i * 2) + 1] = sound_audio_mix(pbuf[(i * 2) + 1], mp3_get_current_sample());
break;
}
}
@@ -466,10 +490,16 @@
static int mp3_frame_is_empty(void)
{
- if (mp3_frame_buffer[0x24] == 'X' && mp3_frame_buffer[0x25] == 'i' && mp3_frame_buffer[0x26] == 'n' && mp3_frame_buffer[0x27] == 'g') {
+ if (mp3_frame_buffer[0x24] == 'X' &&
+ mp3_frame_buffer[0x25] == 'i' &&
+ mp3_frame_buffer[0x26] == 'n' &&
+ mp3_frame_buffer[0x27] == 'g') {
return 1;
}
- if (mp3_frame_buffer[0x24] == 'I' && mp3_frame_buffer[0x25] == 'n' && mp3_frame_buffer[0x26] == 'f' && mp3_frame_buffer[0x27] == 'o') {
+ if (mp3_frame_buffer[0x24] == 'I' &&
+ mp3_frame_buffer[0x25] == 'n' &&
+ mp3_frame_buffer[0x26] == 'f' &&
+ mp3_frame_buffer[0x27] == 'o') {
return 1;
}
return 0;
@@ -484,9 +514,19 @@
int block;
int ret;
size_t size;
+ static int warnoverflow = 1;
- mp3_frame_buffer[mp3_input_pointer] = val;
+ DBG(("mp3at64_store_mp3_data: 0x%02x ptr:%04x state:%d", val, mp3_input_pointer, mp3_input_data_state));
+ if (mp3_input_pointer < MP3_INPUT_MAX_FRAME) {
+ mp3_frame_buffer[mp3_input_pointer] = val;
+ warnoverflow = 1;
+ } else if (warnoverflow) {
+ log_error(LOG_DEFAULT, "mp3_frame_buffer overflow (state:%d pos:%04x)",
+ mp3_input_data_state, (unsigned)mp3_input_pointer);
+ warnoverflow = 0;
+ }
+
switch (mp3_input_data_state) {
case MP3_INPUT_STATE_IDLE:
if (val == 0xff) {
@@ -604,7 +644,10 @@
mp3_id3_length[mp3_input_pointer - 6] = val;
mp3_input_pointer++;
if (mp3_input_pointer == 10) {
- mp3_id3_len = (mp3_id3_length[0] << 21) | (mp3_id3_length[1] << 14) | (mp3_id3_length[2] << 7) | mp3_id3_length[3];
+ mp3_id3_len = (mp3_id3_length[0] << 21) |
+ (mp3_id3_length[1] << 14) |
+ (mp3_id3_length[2] << 7) |
+ mp3_id3_length[3];
}
}
break;
@@ -671,6 +714,12 @@
if (mp3_get_sampling_rate() != mp3_output_rate) {
mp3_resample(block, mp3_get_sampling_rate());
}
+ DBG(("block: %d size: %d", block, size));
+#ifdef DUMPWAV
+ fwrite(mp3_output_buffers[block], 1, mp3_output_buffers_size[block], dumpfile);
+#endif
+ } else {
+ lib_free(buffer);
}
}
mp3_input_pointer = 0;
@@ -699,15 +748,11 @@
mp3at64_store_mp3_data(val);
break;
case 5:
-#ifdef MP3AT64_DEBUG
- log_warning(LOG_DEFAULT, "storing i2c data: %d", val);
-#endif
+ DBG(("storing i2c data: %d", val));
mp3at64_set_i2c_data(val);
break;
case 6:
-#ifdef MP3AT64_DEBUG
- log_warning(LOG_DEFAULT, "storing i2c clock: %d", val);
-#endif
+ DBG(("storing i2c clock: %d", val));
mp3at64_set_i2c_clock(val);
break;
}
@@ -783,6 +828,7 @@
clockport_device_t *clockport_mp3at64_open_device(const char *owner)
{
clockport_device_t *retval = NULL;
+ DBG(("clockport_mp3at64_open_device"));
if (clockport_mp3at64_sound_chip.chip_enabled) {
ui_error("ClockPort MP3@64 already in use by %s.", clockport_mp3at64_owner);
return NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-08 16:43:43
|
Revision: 45790
http://sourceforge.net/p/vice-emu/code/45790
Author: gpz
Date: 2025-10-08 16:43:42 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
kill TAB with fire
Modified Paths:
--------------
trunk/vice/src/tools/petcat/petcat.c
Modified: trunk/vice/src/tools/petcat/petcat.c
===================================================================
--- trunk/vice/src/tools/petcat/petcat.c 2025-10-08 16:28:12 UTC (rev 45789)
+++ trunk/vice/src/tools/petcat/petcat.c 2025-10-08 16:43:42 UTC (rev 45790)
@@ -2058,7 +2058,7 @@
c, feof(source), *line, sysflg));
if (checksummer_data) {
- free(checksummer_data);
+ free(checksummer_data);
}
return (!feof(source) && (*line | line[1]) && sysflg);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-08 16:28:15
|
Revision: 45789
http://sourceforge.net/p/vice-emu/code/45789
Author: gpz
Date: 2025-10-08 16:28:12 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
add support for outputting checksum(s), patch by Patrick Georgi
Modified Paths:
--------------
trunk/vice/doc/vice.texi
trunk/vice/src/tools/petcat/petcat.c
Modified: trunk/vice/doc/vice.texi
===================================================================
--- trunk/vice/doc/vice.texi 2025-10-08 14:18:58 UTC (rev 45788)
+++ trunk/vice/doc/vice.texi 2025-10-08 16:28:12 UTC (rev 45789)
@@ -24172,6 +24172,9 @@
@findex -text
@item -text
Force text mode
+@findex -C<chksum>
+@item -C<chksum>
+add listing checksums of the specified type. (see below)
@c @findex -<version> - this one breaks the index (?!)
@item -<version>
use keywords for <version> instead of the v7.0 ones
@@ -24186,7 +24189,7 @@
list all Basic versions available.
@findex -l
@item -l
-Specify load address for program (in hex, no loading chars!).
+Specify load address for program (in hex, no leading chars!).
@findex -o <name>
@item -o <name>
Specify the output file name
@@ -24283,6 +24286,18 @@
Basic v2.0 with Xbasic (C64)
@end table
+Checksummers:
+@table @code
+@item 64er-v1
+64'er Checksummer v1 + v2
+@item 64er-v3
+64'er Checksummer v3
+@item dossier
+Commodore Dossier Checksummer
+@item f64
+F64Summer
+@end table
+
@c @node FIXME
@section petcat extra features
Modified: trunk/vice/src/tools/petcat/petcat.c
===================================================================
--- trunk/vice/src/tools/petcat/petcat.c 2025-10-08 14:18:58 UTC (rev 45788)
+++ trunk/vice/src/tools/petcat/petcat.c 2025-10-08 16:28:12 UTC (rev 45789)
@@ -592,6 +592,142 @@
#define NUM_VERSIONS ((sizeof(basic_list) / sizeof(basic_list[0])) - 1)
+typedef struct {
+ uint8_t val;
+ uint8_t shift;
+} chksum_64er_data;
+
+static char *chksum_64er_finalize(void *data) {
+ chksum_64er_data *v = data;
+ char out[6];
+ snprintf(out, 6, "<%03hhu>", v->val);
+ return strdup(out);
+}
+
+static void chksum_64er_v1_process(void *data, uint8_t c, int quoted) {
+ chksum_64er_data *v = data;
+ if (c == 0x20) {
+ return; /* ignores spaces within quotes, too */
+ }
+ v->val += c;
+}
+
+static void chksum_64er_v1_init(void *data, int linenum) {
+ chksum_64er_data *v = data;
+ v->val = 0;
+ v->shift = 0;
+ chksum_64er_v1_process(data, linenum & 0xff, 0);
+ chksum_64er_v1_process(data, linenum >> 8, 0);
+}
+
+static void chksum_64er_v3_process(void *data, uint8_t c, int quoted) {
+ chksum_64er_data *v = data;
+ uint8_t tmp;
+ if (c == 0x20) {
+ return; /* ignores spaces within quotes, too */
+ }
+ v->shift &= 7;
+ tmp = c << v->shift;
+ tmp |= c >> (8 - v->shift);
+ v->shift++;
+ v->val += tmp;
+}
+
+static void chksum_64er_v3_init(void *data, int linenum) {
+ chksum_64er_data *v = data;
+ v->val = 0;
+ v->shift = 0;
+ chksum_64er_v3_process(data, linenum & 0xff, 0);
+ chksum_64er_v3_process(data, linenum >> 8, 0);
+}
+
+typedef struct {
+ uint8_t val;
+} chksum_cmddossier_data;
+
+static void chksum_cmddossier_init(void *data, int linenum) {
+ chksum_cmddossier_data *v = data;
+ v->val = (linenum & 0xff) ^ (linenum >> 8);
+}
+
+static void chksum_cmddossier_process(void *data, uint8_t c, int quoted) {
+ chksum_cmddossier_data *v = data;
+ if (!quoted && c == ' ') {
+ return;
+ }
+ v->val ^= c;
+}
+
+static char *chksum_cmddossier_finalize(void *data) {
+ chksum_64er_data *v = data;
+ char out[10];
+ snprintf(out, 10, "<sh/sp>%02hhx", v->val);
+ return strdup(out);
+}
+
+typedef struct {
+ uint16_t val;
+} chksum_f64_data;
+
+static void chksum_f64_init(void *data, int linenum) {
+ chksum_f64_data *v = data;
+ v->val = (uint16_t)linenum ^ 0xffff;
+}
+
+static void chksum_f64_process(void *data, uint8_t c, int quoted) {
+ chksum_f64_data *v = data;
+ if (!quoted && c == ' ') {
+ return;
+ }
+ /* Taken from https://github.com/Zirias/f64summer, which is BSD-2 */
+ if ((c >= 0x60 && c < 0x80)
+ || (c >= 0xe0 && c < 0xff)
+ || c == 0xde) {
+ if (c == 0xde || c == 0x7e) {
+ c = 0xff;
+ } else if (c & 0x80) {
+ c -= 0x40;
+ } else {
+ c += 0x60;
+ }
+ }
+ if (c==0xa0) {
+ c=' ';
+ }
+ for (int b = 0; b < 8; ++b) {
+ unsigned char tmp = !!(c & 0x80);
+ c <<= 1;
+ tmp ^= (v->val & 1);
+ v->val >>= 1;
+ if (tmp) v->val ^= 0xb400;
+ }
+}
+
+static char *chksum_f64_finalize(void *data) {
+ chksum_f64_data *v = data;
+ char out[7];
+ snprintf(out, 7, "<%04hx>", v->val);
+ return strdup(out);
+}
+
+typedef struct {
+ char *name;
+ char *description;
+ void (*init)(void *data, int linenum);
+ void (*process)(void *data, uint8_t c, int quoted);
+ char *(*finalize)(void *data);
+ unsigned int datasize;
+} chksum_t;
+
+chksum_t chksum_list[] = {
+ /* v2 uses the same algorithm as v1 */
+ {"64er-v1", "64'er Checksummer v1 + v2", chksum_64er_v1_init, chksum_64er_v1_process, chksum_64er_finalize, sizeof(chksum_64er_data)},
+ {"64er-v3", "64'er Checksummer v3", chksum_64er_v3_init, chksum_64er_v3_process, chksum_64er_finalize, sizeof(chksum_64er_data)},
+ {"dossier", "Commodore Dossier Checksummer", chksum_cmddossier_init, chksum_cmddossier_process, chksum_cmddossier_finalize, sizeof(chksum_cmddossier_data)},
+ {"f64", "F64Summer", chksum_f64_init, chksum_f64_process, chksum_f64_finalize, sizeof(chksum_f64_data)},
+ {NULL, NULL, NULL, NULL, NULL, 0},
+};
+
/* Limits */
#define NUM_KWCE 11
@@ -914,6 +1050,7 @@
static void usage(char *progname);
static void petcat_version(void);
static int parse_version(char *str);
+static chksum_t *parse_checksummer(char *str);
static void list_keywords(int version);
static void pet_2_asc (int version, int ctrls);
static void asc_2_pet (int version, int ctrls);
@@ -934,6 +1071,7 @@
static const unsigned char MagicHeaderP00[8] = "C64File\0";
+static chksum_t *checksummer = NULL;
/* ------------------------------------------------------------------------- */
int main(int argc, char **argv)
@@ -1036,6 +1174,11 @@
} else if (strcmp(argv[0], "-version") == 0) {
petcat_version();
return EXIT_SUCCESS;
+ } else if (!strncmp(argv[0], "-C", 2) && !checksummer) {
+ checksummer = parse_checksummer((strlen(argv[0]) > 2 ? &argv[0][2] : NULL));
+ if (checksummer) {
+ continue;
+ }
/* Basic version */
} else if (!strncmp(argv[0], "-w", 2) && !wr_mode) {
version = parse_version((strlen(argv[0]) > 2 ? &argv[0][2] : NULL));
@@ -1293,6 +1436,7 @@
" -nh\t\tno header <default if output is a file>\n"
" -skip <n>\tSkip <n> bytes in the beginning of input file. Ignored on P00.\n"
" -text\tForce text mode\n"
+ " -C<chksum>\tadd listing checksums of the specified type.\n"
" -<version>\tuse keywords for <version> instead of the v7.0 ones\n"
" -w<version>\ttokenize using keywords on specified Basic version.\n"
" -k<version>\tlist all keywords for the specified Basic version\n"
@@ -1311,6 +1455,13 @@
fprintf(stdout, "\n");
+ fprintf(stdout, "\n\tChecksummers:\n");
+ for (i = 0; chksum_list[i].name; ++i) {
+ fprintf(stdout, "\t%s\t%s\n", chksum_list[i].name, chksum_list[i].description);
+ }
+
+ fprintf(stdout, "\n");
+
fprintf(stdout, "\tUsage examples:\n"
"\tpetcat -2 -o outputfile.txt -- inputfile.prg\n"
"\t\tDe-tokenize, convert inputfile.prg to a text file\n"
@@ -1366,6 +1517,23 @@
return -1;
}
+static chksum_t *parse_checksummer(char *str)
+{
+ if (str == NULL || !*str) {
+ return NULL;
+ }
+
+ for (int i = 0; chksum_list[i].name; ++i) {
+ if (strcasecmp(str, chksum_list[i].name) == 0) {
+ return &chksum_list[i];
+ }
+ }
+
+ fprintf(stderr, "\nUnimplemented checksummer '%s'\n", str);
+
+ return NULL;
+}
+
static void list_keywords(int version)
{
unsigned int n, max;
@@ -1708,6 +1876,11 @@
int quote, spnum, directory = 0;
int sysflg = 0;
+ void *checksummer_data = NULL;
+ if (checksummer) {
+ checksummer_data = malloc(checksummer->datasize);
+ }
+
/*
* It seems to be common mistake not to terminate BASIC properly
* before the machine language part, so we don't check for the
@@ -1719,6 +1892,9 @@
while ((fread(line, 1, 2, source) == 2) && (line[1]) && fread(line + 2, 1, 2, source) == 2) {
quote = 0;
fprintf(dest, "%5d ", (spnum = (line[2] & 0xff) + ((line[3] & 0xff) << 8)));
+ if (checksummer) {
+ checksummer->init(checksummer_data, spnum);
+ }
if (directory) {
if (spnum >= 100) {
@@ -1740,6 +1916,9 @@
}
do {
+ if (checksummer)
+ checksummer->process(checksummer_data, c, quote);
+
if (c == 0x22) {
quote ^= c;
}
@@ -1867,6 +2046,11 @@
_p_toascii((int)c, version, ctrls, quote); /* convert character */
} while ((c = getc(source)) != EOF && c);
+ if (checksummer) {
+ char *chksum = checksummer->finalize(checksummer_data);
+ fprintf(dest, "\t|| %s", chksum);
+ free(chksum);
+ }
fprintf(dest, "\n");
} /* line */
@@ -1873,6 +2057,9 @@
DBG(("\n c %02d EOF %d *line %d sysflg %d\n",
c, feof(source), *line, sysflg));
+ if (checksummer_data) {
+ free(checksummer_data);
+ }
return (!feof(source) && (*line | line[1]) && sysflg);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-08 14:18:59
|
Revision: 45788
http://sourceforge.net/p/vice-emu/code/45788
Author: gpz
Date: 2025-10-08 14:18:58 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
forgot this in r45787
Modified Paths:
--------------
trunk/vice/doc/coding-guidelines.txt
Modified: trunk/vice/doc/coding-guidelines.txt
===================================================================
--- trunk/vice/doc/coding-guidelines.txt 2025-10-07 16:43:18 UTC (rev 45787)
+++ trunk/vice/doc/coding-guidelines.txt 2025-10-08 14:18:58 UTC (rev 45788)
@@ -114,7 +114,7 @@
resid - cycle exact sid engine (made by dag lem)
resid-dtv
sid - SID chip interface and emulation for fallback sid engine (fastsid)
- vdc - MOS8563 VDC emulation
+ vdc - MOS8563/8568 VDC emulation
vicii - almost cycle exact VICII emulation code for x64, x128, xcbm2, and x64dtv
viciisc - more cycle exact then vicii code emulation used in x64sc and xscpu64
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-07 16:43:22
|
Revision: 45787
http://sourceforge.net/p/vice-emu/code/45787
Author: gpz
Date: 2025-10-07 16:43:18 +0000 (Tue, 07 Oct 2025)
Log Message:
-----------
make VDC v0 a bit less broken, patch by Marco Baye
Modified Paths:
--------------
trunk/vice/src/vdc/vdc-mem.c
trunk/vice/src/vdc/vdc.c
trunk/vice/src/vdc/vdctypes.h
Modified: trunk/vice/src/vdc/vdc-mem.c
===================================================================
--- trunk/vice/src/vdc/vdc-mem.c 2025-10-05 13:16:54 UTC (rev 45786)
+++ trunk/vice/src/vdc/vdc-mem.c 2025-10-07 16:43:18 UTC (rev 45787)
@@ -383,14 +383,28 @@
if ((vdc.regs[25] & 0x0Fu) != (oldval & 0x0Fu)) {
/* Horizontal smooth scroll */
#ifdef ALLOW_UNALIGNED_ACCESS
- /* Smooth scroll behaviour differs between VDC versions */
+ /* Smooth scroll behaviour differs between VDC versions:
+ Incrementing HSS always moves the screen contents to the right,
+ but in v0 VDC, the left border moves to the right as well(!),
+ which makes scrolling almost totally useless.
+ Also, v0 VDC has another, even more serious bug:
+ if xsmooth == (vdc.regs[22] >> 4), pixel data of leftmost char
+ is missing (inside border?) so pixel data and attributes are out
+ of sync! This also affects the hardware cursor, which appears to
+ be located one char to the right.
+ In v1/v2 VDC, the bugs are fixed: the border is fixed so only
+ the rightmost pixel of the leftmost char is visible, which is
+ why (vdc.regs[22] >> 4) has to be used as xsmooth init value. */
if (vdc.revision == VDC_REVISION_0) {
- /* v0 VDC, incrementing HSS moves screen to the left, so xsmooth should decrease */
- vdc.xsmooth = ((vdc.regs[22] >> 4) - (vdc.regs[25] & 0x0F)) & 0x0F;
+ /* v0 VDC, incrementing HSS moves border and screen to the right */
+ vdc.v0xscroll = (vdc.regs[25] & 0x0F);
+ vdc.xsmooth = (vdc.regs[22] >> 4) & 0x0F;
} else {
/* v1/2 VDC, incrementing HSS moves screen to the right */
+ vdc.v0xscroll = 0;
vdc.xsmooth = (vdc.regs[25] & 0x0F);
}
+ vdc.border_width = vdc.iborder_width + vdc.v0xscroll;
vdc.raster.xsmooth = 0;
/* Hack to get the line redrawn because we are not actually using the xsmooth in raster
(so the xsmooth color is irrelevant, but changing it still forces a repaint of the line) */
Modified: trunk/vice/src/vdc/vdc.c
===================================================================
--- trunk/vice/src/vdc/vdc.c 2025-10-05 13:16:54 UTC (rev 45786)
+++ trunk/vice/src/vdc/vdc.c 2025-10-07 16:43:18 UTC (rev 45787)
@@ -306,7 +306,8 @@
} else if (vdc.hsync_shift + (vdc.screen_text_cols * vdc.charwidth) > VDC_SCREEN_WIDTH ) {
vdc.hsync_shift = VDC_SCREEN_WIDTH - (vdc.screen_text_cols * vdc.charwidth);
}
- vdc.border_width = vdc.hsync_shift;
+ vdc.iborder_width = vdc.hsync_shift;
+ vdc.border_width = vdc.iborder_width + vdc.v0xscroll;
vdc.update_geometry = 0;
}
@@ -334,6 +335,8 @@
vdc.interlaced = 0;
vdc.regs[9] = vdc.raster_ycounter_max = 7;
vdc.regs[22] = 0x78;
+ vdc.regs[27] = vdc.skip_after_line = 0;
+ vdc.v0xscroll = 0;
vdc.charwidth = 8;
vdc.attribute_offset = 0;
vdc.border_height = 59;
Modified: trunk/vice/src/vdc/vdctypes.h
===================================================================
--- trunk/vice/src/vdc/vdctypes.h 2025-10-05 13:16:54 UTC (rev 45786)
+++ trunk/vice/src/vdc/vdctypes.h 2025-10-07 16:43:18 UTC (rev 45787)
@@ -102,7 +102,9 @@
unsigned int first_displayed_line;
unsigned int last_displayed_line;
unsigned int border_height;
- unsigned int border_width;
+ unsigned int v0xscroll;
+ unsigned int iborder_width; /* internal */
+ unsigned int border_width; /* including v0 xscroll */
unsigned int raster_ycounter_max;
unsigned int screen_textlines;
@@ -132,7 +134,7 @@
unsigned int mem_counter;
unsigned int bitmap_counter;
- /* Bytes per character. */
+ /* Bytes per character, either 16 or 32 */
unsigned int bytes_per_char;
/* Character width - width of each character on screen in physical pixels */
@@ -173,7 +175,7 @@
/* The screen geometry has changed. */
int update_geometry;
- /* 0..7 pixel x shift. */
+ /* 0..7 pixel x shift. FIXME - should be 0..15! */
unsigned int xsmooth;
/* VDC Revision. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-05 13:16:57
|
Revision: 45786
http://sourceforge.net/p/vice-emu/code/45786
Author: gpz
Date: 2025-10-05 13:16:54 +0000 (Sun, 05 Oct 2025)
Log Message:
-----------
strlen returns size_t, not it. patch by carlo bramini
Modified Paths:
--------------
trunk/vice/src/arch/sdl/menu_common.c
trunk/vice/src/arch/sdl/uifilereq.c
Modified: trunk/vice/src/arch/sdl/menu_common.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_common.c 2025-10-04 16:59:58 UTC (rev 45785)
+++ trunk/vice/src/arch/sdl/menu_common.c 2025-10-05 13:16:54 UTC (rev 45786)
@@ -245,8 +245,8 @@
static char *sdl_ui_menu_file_translate_seperator(const char *text)
{
- int len;
- int i;
+ size_t len;
+ size_t i;
len = strlen(text);
Modified: trunk/vice/src/arch/sdl/uifilereq.c
===================================================================
--- trunk/vice/src/arch/sdl/uifilereq.c 2025-10-04 16:59:58 UTC (rev 45785)
+++ trunk/vice/src/arch/sdl/uifilereq.c 2025-10-05 13:16:54 UTC (rev 45786)
@@ -144,8 +144,8 @@
#if (ARCHDEP_DIR_SEP_CHR == '\\')
static void sdl_ui_print_translate_seperator(const char *text, int x, int y)
{
- unsigned int len;
- unsigned int i;
+ size_t len;
+ size_t i;
char *new_text = NULL;
len = strlen(text);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-04 16:59:59
|
Revision: 45785
http://sourceforge.net/p/vice-emu/code/45785
Author: gpz
Date: 2025-10-04 16:59:58 +0000 (Sat, 04 Oct 2025)
Log Message:
-----------
workaround for bug #2161
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
Modified: trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-10-04 16:37:53 UTC (rev 45784)
+++ trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-10-04 16:59:58 UTC (rev 45785)
@@ -336,6 +336,8 @@
if (info != NULL) {
axis->minimum = info->minimum;
axis->maximum = info->maximum;
+ /* FIXME: Workaround for bug #2161 (should be fixed one layer above) */
+ axis->digital = (info->minimum == -1) && (info->maximum == 1);
}
/* joydev takes ownership of axis */
joystick_device_add_axis(joydev, axis);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-04 16:37:57
|
Revision: 45784
http://sourceforge.net/p/vice-emu/code/45784
Author: gpz
Date: 2025-10-04 16:37:53 +0000 (Sat, 04 Oct 2025)
Log Message:
-----------
fix C128 chargen dumps, the international charset should be in the first half. fixes #2171
Modified Paths:
--------------
trunk/vice/data/C128/Makefile.am
trunk/vice/data/C128/chargen-325078-02.bin
trunk/vice/data/C128/chargen-325167-02.bin
trunk/vice/data/C128/chargen-325173-01D.bin
trunk/vice/src/c128/c128rom.h
Removed Paths:
-------------
trunk/vice/data/C128/chargen-325167-01.bin
Modified: trunk/vice/data/C128/Makefile.am
===================================================================
--- trunk/vice/data/C128/Makefile.am 2025-10-02 13:36:31 UTC (rev 45783)
+++ trunk/vice/data/C128/Makefile.am 2025-10-04 16:37:53 UTC (rev 45784)
@@ -9,7 +9,6 @@
basiclo-318018-04.bin \
chargen-315079-01.bin \
chargen-390059-01.bin \
- chargen-325167-01.bin \
chargen-325181-01.bin \
chargen-325173-01D.bin \
chargen-325078-02.bin \
Modified: trunk/vice/data/C128/chargen-325078-02.bin
===================================================================
(Binary files differ)
Deleted: trunk/vice/data/C128/chargen-325167-01.bin
===================================================================
(Binary files differ)
Modified: trunk/vice/data/C128/chargen-325167-02.bin
===================================================================
(Binary files differ)
Modified: trunk/vice/data/C128/chargen-325173-01D.bin
===================================================================
(Binary files differ)
Modified: trunk/vice/src/c128/c128rom.h
===================================================================
--- trunk/vice/src/c128/c128rom.h 2025-10-02 13:36:31 UTC (rev 45783)
+++ trunk/vice/src/c128/c128rom.h 2025-10-04 16:37:53 UTC (rev 45784)
@@ -75,13 +75,15 @@
#define C128_KERNAL_DE_R01_CHECKSUM 22098 /* FIXME: 19680 ? */
#define C128_KERNAL_CH_R01_CHECKSUM 21376
-/* C128 chargen */
+/* C128 chargen
+ * CAUTION: some dumps that are circulating have the two charsets swapped.
+ * The international one should be in the first half (see #2171)
+ */
#define C128_CHARGEN_NAME "chargen-390059-01.bin"
#define C128_CHARGEN_BE_NAME "chargen-325167-02.bin" /* italian/french/belgium */
#define C128_CHARGEN_CH_NAME "chargen-325173-01D.bin"
#define C128_CHARGEN_DE_NAME "chargen-315079-01.bin"
#define C128_CHARGEN_FI_NAME "chargen-325181-01.bin" /* same as swedish */
-/*#define C128_CHARGEN_FR_NAME "chargen-325167-01.bin"*/
#define C128_CHARGEN_FR_NAME "chargen-325167-02.bin" /* italian/french/belgium */
#define C128_CHARGEN_IT_NAME "chargen-325167-02.bin" /* italian/french/belgium */
#define C128_CHARGEN_NO_NAME "chargen-325078-02.bin"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-02 13:36:34
|
Revision: 45783
http://sourceforge.net/p/vice-emu/code/45783
Author: gpz
Date: 2025-10-02 13:36:31 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
update test for new options (r45781)
Modified Paths:
--------------
testprogs/testbench/autostart/autostart.sh
Modified: testprogs/testbench/autostart/autostart.sh
===================================================================
--- testprogs/testbench/autostart/autostart.sh 2025-10-02 12:55:18 UTC (rev 45782)
+++ testprogs/testbench/autostart/autostart.sh 2025-10-02 13:36:31 UTC (rev 45783)
@@ -82,295 +82,295 @@
echo "autostart mode 0 (virtual filesystem) - do not handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU none 1 1 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 1 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 1 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 1 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 +autostart-handle-tde +autostart-warp
fi
echo "autostart mode 1 (inject to RAM) - do not handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 +autostart-handle-tde +autostart-warp
fi
echo "autostart mode 2 (copy to disk image) - do not handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 +autostart-handle-tde +autostart-warp
fi
echo "autostart mode 0 (virtual filesystem) - handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 1 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 1 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 0 -autostart-handle-tde +autostart-warp
fi
echo "autostart mode 1 (inject to RAM) - handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU none 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU none 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU tde 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU tde 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 1 0 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
-dotest $EMU vfs 0 255 $OPTS $DRIVEON -device8 1 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde -autostart-warp
+dotest $EMU vfs 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 1 -autostart-handle-tde +autostart-warp
fi
echo "autostart mode 2 (copy to disk image) - handle TDE"
## fsdevice = none
# TDEonly
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
if [ "$IECDEVICE" = "yes" ]; then
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
# iecdev only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -device8 0 $IECDEVON +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU vdrive-disk 0 255 $OPTS $DRIVEON -devicebackend8 0 $IECDEVON +drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
fi
## fsdevice = filesystem
# TDEonly
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF -drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU tde-disk 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF -drive8truedrive -trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
# none
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU none 0 255 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive +virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
+dotest $EMU none 0 255 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive +trapdevice8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
# vfs only
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde -autostart-warp
-dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -device8 1 $IECDEVOFF +drive8truedrive -virtualdev8 -autostartprgmode 2 -autostart-handle-tde +autostart-warp
+dotest $EMU vdrive-disk 1 0 $OPTS $DRIVEON -devicebackend8 1 $IECDEVOFF +drive8truedrive -trapdevice8 -autostartprgmode 2 -auto...
[truncated message content] |
|
From: <rh...@us...> - 2025-10-02 12:55:20
|
Revision: 45782
http://sourceforge.net/p/vice-emu/code/45782
Author: rhialto
Date: 2025-10-02 12:55:18 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
Let tabs be spaces...
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_printer.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_printer.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_printer.c 2025-10-02 12:45:42 UTC (rev 45781)
+++ trunk/vice/src/arch/gtk3/widgets/settings_printer.c 2025-10-02 12:55:18 UTC (rev 45782)
@@ -198,7 +198,7 @@
case VICE_MACHINE_VIC20: /* fall through */
#endif
case VICE_MACHINE_PLUS4:
- /* these machines have IEEE-488 */
+ /* these machines have IEEE-488 */
case VICE_MACHINE_PET: /* fall through */
case VICE_MACHINE_CBM5x0: /* fall through */
case VICE_MACHINE_CBM6x0: /* fall through */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-10-02 12:45:46
|
Revision: 45781
http://sourceforge.net/p/vice-emu/code/45781
Author: rhialto
Date: 2025-10-02 12:45:42 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
Rename (virtual/trap) device related settings (bug 2162)
Specifically the command line options
-virtualdevN => -trapdeviceN
-iecdeviceN => -busdeviceN
-deviceN <Type> => -devicebackendN <Type>
and the related resource names
VirtualDeviceN => TrapDeviceN
IECDeviceN => BusDeviceN
FileSystemDeviceN remains the same, since it indicates the back-end storage
type already accurately enough.
This generalizes the names used for IEC and IEEE-488 settings.
It abandons the confusing name "virtual device" and replaces it with
"trapdevice" (device which is implemented using kernal traps). It had been
getting this specific meaning over time already.
The initial issue was about the settings GUI for PETs which did not allow for
choosing the "file system device" back-end for a floppy disk. This revealed an
inconsistency in handling these 3 groups of options between IEC and IEEE based
emulators (enabling the file system device was controlled by the VirtualDeviceN
resource which had already changed its meaning to control kernal traps, and
PETs don't even have or need kernal traps).
Modified Paths:
--------------
trunk/vice/doc/vice.texi
trunk/vice/src/arch/gtk3/widgets/settings_drive.c
trunk/vice/src/arch/gtk3/widgets/settings_printer.c
trunk/vice/src/arch/gtk3/widgets/settings_tapeport.c
trunk/vice/src/arch/sdl/menu_drive.c
trunk/vice/src/arch/sdl/menu_printer.c
trunk/vice/src/arch/sdl/menu_tape.c
trunk/vice/src/attach.c
trunk/vice/src/autostart-prg.c
trunk/vice/src/autostart.c
trunk/vice/src/c128/c128memsnapshot.c
trunk/vice/src/c128/c128rom.c
trunk/vice/src/c64/c64-resources.c
trunk/vice/src/c64/c64bus.c
trunk/vice/src/c64/c64memsnapshot.c
trunk/vice/src/c64/c64rom.c
trunk/vice/src/c64/cart/c64tpi.c
trunk/vice/src/c64/vsid-stubs.c
trunk/vice/src/c64dtv/c64dtvmem.c
trunk/vice/src/c64dtv/c64dtvmemsnapshot.c
trunk/vice/src/cbm2/cbm2.c
trunk/vice/src/cbm2/cbm2bus.c
trunk/vice/src/cbm2/cbm2memsnapshot.c
trunk/vice/src/cmdline.c
trunk/vice/src/cmdline.h
trunk/vice/src/drive/drive-check.c
trunk/vice/src/iecbus/iecbus.c
trunk/vice/src/iecbus.h
trunk/vice/src/machine-bus.h
trunk/vice/src/monitor/mon_drive.c
trunk/vice/src/parallel/parallel.c
trunk/vice/src/parallel.h
trunk/vice/src/pet/pet.c
trunk/vice/src/pet/petbus.c
trunk/vice/src/pet/petmemsnapshot.c
trunk/vice/src/plus4/plus4bus.c
trunk/vice/src/plus4/plus4memsnapshot.c
trunk/vice/src/plus4/plus4rom.c
trunk/vice/src/printerdrv/interface-serial.c
trunk/vice/src/scpu64/scpu64memsnapshot.c
trunk/vice/src/serial/Makefile.am
trunk/vice/src/serial/serial-iec-device.c
trunk/vice/src/traps.c
trunk/vice/src/vic20/cart/vic20-ieee488.c
trunk/vice/src/vic20/vic20bus.c
trunk/vice/src/vic20/vic20iec.c
trunk/vice/src/vic20/vic20memsnapshot.c
trunk/vice/src/vic20/vic20rom.c
Added Paths:
-----------
trunk/vice/src/serial/iec-ieee488-shared.c
trunk/vice/src/serial/iec-ieee488-shared.h
Modified: trunk/vice/doc/vice.texi
===================================================================
--- trunk/vice/doc/vice.texi 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/doc/vice.texi 2025-10-02 12:45:42 UTC (rev 45781)
@@ -403,7 +403,7 @@
1, 2 and 4, all of which are provided. The PET 2001 uses the version 1,
the PET 3032 uses version 2, and the others use version 4. The 2001 ROM
is horribly broken with respect to IEEE488 (they shipped it before they
-tested it with the floppy drive, so only tape worked. Therefore the
+tested it with the floppy drive, so only tape and printers worked. Therefore the
emulator patches the ROM to fix the IEEE488 routines.
As well as other low-level fixes the 2001 patch obtains the load address
@@ -828,7 +828,8 @@
Make sure to pick the right library (32 or 64bit) for your system.
@itemize @bullet
@item To use it in the emulators, go to the drive tab in the settings and choose
-either "Virtual Device" or "IEC Device" and "Real Drive (OpenCBM)".
+either "Virtual (traps)" or "Virtual (bus)" and in the dropdown labeled
+"Virtual backend", choose "Real Drive (OpenCBM)".
Note that this will not work with all emulators right now. Also note that using
the real drives like this provides only very limited compatibility in practise -
it is recommended to transfer the disks to images and use the images with an
@@ -842,8 +843,8 @@
@end itemize
@end itemize
-When using disk images there are two available types of drive
-emulation. One of them the @dfn{virtual drive} emulation. It does
+When using disk images there are three available types of drive
+emulation. One of them the @dfn{virtual (traps)} emulation. It does
@emph{not} really emulate the serial line, but patches the kernal ROM
(with the so-called @dfn{kernal traps}) so that serial line operations
can be emulated via C language routines. This emulation is very fast,
@@ -853,11 +854,15 @@
The IEEE488 drives (2031, 2040, 3040, 4040, 1001, 8050, 8250, and D9090/60)
do not use kernal traps. Instead the IEEE488 interface lines are
-monitored and the data is passed to the drive emulation. To use them
-on the C64, you need to enable the IEEE488 interface emulation. Only
-if the IEEE488 emulation is enabled, those drives can be selected.
+monitored and the data is passed to the drive emulation.
+This is called @dfn{virtual (ieee- or iec-bus)} emulation.
+To use the IEEE488 disks on the C64, you need to enable the IEEE488 interface
+emulation. Only if the IEEE488 emulation is enabled, those drives can be
+selected.
-The other alternative is a @dfn{true drive} emulation. The
+This option also exists for the serial IEC disks (except on the VIC-20).
+
+The third, most accurate, alternative is a @dfn{true drive} emulation. The
Commodore disk drives are provided with their own CPU (a 6502 as the
VIC20 and the PETs) and their own RAM and ROM. So, in order to more
closely emulate its features, a complete emulation of this hardware
@@ -3519,7 +3524,7 @@
Go to "Preferences -> Peripheral devices -> Printer", select the printer you want to use.
Note that not all types of printers are available at all ports/device numbers.
@item
-Enable either "Virtual Device" or "IEC Device" (There is no "True Printer Emulation")
+Enable either "Virtual (traps)" or "Virtual (bus)" (There is no "True Printer Emulation")
@item
Set "Emulation type" to "File system access" if you want to output to a file or pipe through a program.
If you want to use a real printer via OpenCBM, select "Real device (OpenCBM)".
@@ -3608,8 +3613,8 @@
@item
To speed up loading .d64 files,
-enable Options->Peripherial devices->Drive->Virtual device
-(@code{VirtualDevice8..11} = 1)
+enable Options->Peripherial devices->Drive->Virtual (traps)
+(@code{TrapDevice8..11} = 1)
and enable Options->Host->Autostart->Handle True Drive Emulation on autostart
(@code{AutostartHandleTrueDriveEmulation} = 1)
@@ -7487,15 +7492,16 @@
@table @code
-@vindex IECDevice8
-@vindex IECDevice9
-@vindex IECDevice10
-@vindex IECDevice11
-@item IECDevice8
-@itemx IECDevice9
-@itemx IECDevice10
-@itemx IECDevice11
-Booleans that specify whether IEC device emulation for device #8 to #11 is enabled.
+@vindex BusDevice8
+@vindex BusDevice9
+@vindex BusDevice10
+@vindex BusDevice11
+@item BusDevice8
+@itemx BusDevice9
+@itemx BusDevice10
+@itemx BusDevice11
+Booleans that specify whether IEC or IEEE-488 (bus) device emulation for
+virtual device #8 to #11 is enabled.
@vindex FileSystemDevice8
@vindex FileSystemDevice9
@@ -7572,39 +7578,39 @@
@table @code
-@findex -iecdevice8, +iecdevice8
-@item -iecdevice8
-@itemx +iecdevice8
-Enable/disable IEC device emulation for device #8
-(@code{IECDevice8=1}, @code{IECDevice8=0}).
+@findex -busdevice8, +busdevice8
+@item -busdevice8
+@itemx +busdevice8
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #8
+(@code{BusDevice8=1}, @code{BusDevice8=0}).
-@findex -iecdevice9, +iecdevice9
-@item -iecdevice9
-@itemx +iecdevice9
-Enable/disable IEC device emulation for device #9
-(@code{IECDevice9=1}, @code{IECDevice9=0}).
+@findex -busdevice9, +busdevice9
+@item -busdevice9
+@itemx +busdevice9
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #9
+(@code{BusDevice9=1}, @code{BusDevice9=0}).
-@findex -iecdevice10, +iecdevice10
-@item -iecdevice10
-@itemx +iecdevice10
-Enable/disable IEC device emulation for device #10
-(@code{IECDevice10=1}, @code{IECDevice10=0}).
+@findex -busdevice10, +busdevice10
+@item -busdevice10
+@itemx +busdevice10
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #10
+(@code{BusDevice10=1}, @code{BusDevice10=0}).
-@findex -iecdevice11, +iecdevice11
-@item -iecdevice11
-@itemx +iecdevice11
-Enable/disable IEC device emulation for device #11
-(@code{IECDevice11=1}, @code{IECDevice11=0}).
+@findex -busdevice11, +busdevice11
+@item -busdevice11
+@itemx +busdevice11
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #11
+(@code{BusDevice11=1}, @code{BusDevice11=0}).
-@findex -device8
-@findex -device9
-@findex -device10
-@findex -device11
-@item -device8 <type>
-@itemx -device9 <type>
-@itemx -device10 <type>
-@itemx -device11 <type>
-Set device type for device 8-11 respectively
+@findex -devicebackend8
+@findex -devicebackend9
+@findex -devicebackend10
+@findex -devicebackend11
+@item -devicebackend8 <type>
+@itemx -devicebackend9 <type>
+@itemx -devicebackend10 <type>
+@itemx -devicebackend11 <type>
+Set backend device type for trap or bus device 8-11 respectively
(@code{FileSystemDevice8}, @code{FileSystemDevice9}, @code{FileSystemDevice10}, @code{FileSystemDevice11})
(all emulators except vsid).
(0: None, 1: Filesystem, 2: OpenCBM (Real))
@@ -7770,15 +7776,15 @@
@table @code
-@vindex IECDevice4
-@vindex IECDevice5
-@vindex IECDevice6
-@vindex IECDevice7
-@item IECDevice4
-@itemx IECDevice5
-@itemx IECDevice6
-@itemx IECDevice7
-Booleans that specify whether IEC device emulation for device #4, #5, #6 and #7 is enabled.
+@vindex BusDevice4
+@vindex BusDevice5
+@vindex BusDevice6
+@vindex BusDevice7
+@item BusDevice4
+@itemx BusDevice5
+@itemx BusDevice6
+@itemx BusDevice7
+Booleans that specify whether IEC or IEEE-488 (bus) device emulation for device #4, #5, #6 and #7 is enabled.
@vindex PrinterTextDevice1
@vindex PrinterTextDevice2
@@ -7857,50 +7863,50 @@
@table @code
-@findex -iecdevice4, +iecdevice4
-@item -iecdevice4
-@itemx +iecdevice4
-Enable/disable IEC device emulation for device #4
-(@code{IECDevice4=1}, @code{IECDevice4=0}).
+@findex -busdevice4, +busdevice4
+@item -busdevice4
+@itemx +busdevice4
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #4
+(@code{BusDevice4=1}, @code{BusDevice4=0}).
-@findex -iecdevice5, +iecdevice5
-@item -iecdevice5
-@itemx +iecdevice5
-Enable/disable IEC device emulation for device #5
-(@code{IECDevice5=1}, @code{IECDevice5=0}).
+@findex -busdevice5, +busdevice5
+@item -busdevice5
+@itemx +busdevice5
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #5
+(@code{BusDevice5=1}, @code{BusDevice5=0}).
-@findex -iecdevice6, +iecdevice6
-@item -iecdevice6
-@itemx +iecdevice6
-Enable/disable IEC device emulation for device #6
-(@code{IECDevice6=1}, @code{IECDevice6=0}).
+@findex -busdevice6, +busdevice6
+@item -busdevice6
+@itemx +busdevice6
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #6
+(@code{BusDevice6=1}, @code{BusDevice6=0}).
-@findex -iecdevice7, +iecdevice7
-@item -iecdevice7
-@itemx +iecdevice7
-Enable/disable IEC device emulation for device #7
-(@code{IECDevice7=1}, @code{IECDevice7=0}).
+@findex -busdevice7, +busdevice7
+@item -busdevice7
+@itemx +busdevice7
+Enable/disable IEC or IEEE-488 (bus) device emulation for device #7
+(@code{BusDevice7=1}, @code{BusDevice7=0}).
-@findex -device4
-@item -device4 <type>
+@findex -devicebackend4
+@item -devicebackend4 <type>
Set device type for device 4
(@code{Printer4}).
(0: None, 1: Filesystem, 2: Real)
-@findex -device5
-@item -device5 <type>
+@findex -devicebackend5
+@item -devicebackend5 <type>
Set device type for device 5
(@code{Printer5}).
(0: None, 1: Filesystem, 2: Real)
-@findex -device6
-@item -device6 <type>
+@findex -devicebackend6
+@item -devicebackend6 <type>
Set device type for device 6
(@code{Printer6}).
(0: None, 1: Filesystem, 2: Real)
-@findex -device7
-@item -device7 <type>
+@findex -devicebackend7
+@item -devicebackend7 <type>
Set device type for device 7
(@code{Printer7}).
(0: None, 2: Real)
@@ -8000,31 +8006,28 @@
@table @code
-@vindex VirtualDevice1
-@vindex VirtualDevice2
-@vindex VirtualDevice4
-@vindex VirtualDevice5
-@vindex VirtualDevice6
-@vindex VirtualDevice7
-@vindex VirtualDevice8
-@vindex VirtualDevice9
-@vindex VirtualDevice10
-@vindex VirtualDevice11
-@item VirtualDevice1
-@itemx VirtualDevice2
-@itemx VirtualDevice4
-@itemx VirtualDevice5
-@itemx VirtualDevice6
-@itemx VirtualDevice7
-@itemx VirtualDevice8
-@itemx VirtualDevice9
-@itemx VirtualDevice10
-@itemx VirtualDevice11
-Boolean specifying whether all the mechanisms for virtual device
-emulation should be enabled. Serial IEC devices use kernal traps,
-parallel IEEE488 devices use an own IEEE488 engine. Both are switched
-on and off with this resource.
-
+@vindex TrapDevice1
+@vindex TrapDevice2
+@vindex TrapDevice4
+@vindex TrapDevice5
+@vindex TrapDevice6
+@vindex TrapDevice7
+@vindex TrapDevice8
+@vindex TrapDevice9
+@vindex TrapDevice10
+@vindex TrapDevice11
+@item TrapDevice1
+@itemx TrapDevice2
+@itemx TrapDevice4
+@itemx TrapDevice5
+@itemx TrapDevice6
+@itemx TrapDevice7
+@itemx TrapDevice8
+@itemx TrapDevice9
+@itemx TrapDevice10
+@itemx TrapDevice11
+Boolean specifying whether the kernal trap mechanism for virtual device
+emulation should be enabled. Serial IEC devices can use kernal traps.
@end table
@@ -8033,37 +8036,37 @@
@table @code
-@findex -virtualdev1, +virtualdev1
-@findex -virtualdev2, +virtualdev2
-@findex -virtualdev4, +virtualdev4
-@findex -virtualdev5, +virtualdev5
-@findex -virtualdev6, +virtualdev6
-@findex -virtualdev7, +virtualdev7
-@findex -virtualdev8, +virtualdev8
-@findex -virtualdev9, +virtualdev9
-@findex -virtualdev10, +virtualdev10
-@findex -virtualdev11, +virtualdev11
-@item -virtualdev1, +virtualdev1
-@itemx -virtualdev2, +virtualdev2
-@itemx -virtualdev4, +virtualdev4
-@itemx -virtualdev5, +virtualdev5
-@itemx -virtualdev6, +virtualdev6
-@itemx -virtualdev7, +virtualdev7
-@itemx -virtualdev8, +virtualdev8
-@itemx -virtualdev9, +virtualdev9
-@itemx -virtualdev10, +virtualdev10
-@itemx -virtualdev11, +virtualdev11
-Enable/disable virtual devices
-(@code{VirtualDevice1=1}, @code{VirtualDevice1=0},
- @code{VirtualDevice2=1}, @code{VirtualDevice2=0},
- @code{VirtualDevice4=1}, @code{VirtualDevice4=0},
- @code{VirtualDevice5=1}, @code{VirtualDevice5=0},
- @code{VirtualDevice6=1}, @code{VirtualDevice6=0},
- @code{VirtualDevice7=1}, @code{VirtualDevice7=0},
- @code{VirtualDevice8=1}, @code{VirtualDevice8=0},
- @code{VirtualDevice9=1}, @code{VirtualDevice9=0},
- @code{VirtualDevice10=1}, @code{VirtualDevice10=0},
- @code{VirtualDevice11=1}, @code{VirtualDevice11=0}).
+@findex -trapdevice1, +trapdevice1
+@findex -trapdevice2, +trapdevice2
+@findex -trapdevice4, +trapdevice4
+@findex -trapdevice5, +trapdevice5
+@findex -trapdevice6, +trapdevice6
+@findex -trapdevice7, +trapdevice7
+@findex -trapdevice8, +trapdevice8
+@findex -trapdevice9, +trapdevice9
+@findex -trapdevice10, +trapdevice10
+@findex -trapdevice11, +trapdevice11
+@item -trapdevice1, +trapdevice1
+@itemx -trapdevice2, +trapdevice2
+@itemx -trapdevice4, +trapdevice4
+@itemx -trapdevice5, +trapdevice5
+@itemx -trapdevice6, +trapdevice6
+@itemx -trapdevice7, +trapdevice7
+@itemx -trapdevice8, +trapdevice8
+@itemx -trapdevice9, +trapdevice9
+@itemx -trapdevice10, +trapdevice10
+@itemx -trapdevice11, +trapdevice11
+Enable/disable kernal traps for virtual devices
+(@code{TrapDevice1=1}, @code{TrapDevice1=0},
+ @code{TrapDevice2=1}, @code{TrapDevice2=0},
+ @code{TrapDevice4=1}, @code{TrapDevice4=0},
+ @code{TrapDevice5=1}, @code{TrapDevice5=0},
+ @code{TrapDevice6=1}, @code{TrapDevice6=0},
+ @code{TrapDevice7=1}, @code{TrapDevice7=0},
+ @code{TrapDevice8=1}, @code{TrapDevice8=0},
+ @code{TrapDevice9=1}, @code{TrapDevice9=0},
+ @code{TrapDevice10=1}, @code{TrapDevice10=0},
+ @code{TrapDevice11=1}, @code{TrapDevice11=0}).
@end table
Modified: trunk/vice/src/arch/gtk3/widgets/settings_drive.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_drive.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/gtk3/widgets/settings_drive.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -5,18 +5,18 @@
*/
/*
- * $VICERES VirtualDevice8 -vsid
- * $VICERES VirtualDevice9 -vsid
- * $VICERES VirtualDevice10 -vsid
- * $VICERES VirtualDevice11 -vsid
+ * $VICERES TrapDevice8 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice9 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice10 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice11 -vsid -xcbm5x0 -xcbm2 -xpet
* $VICERES Drive8TrueEmulation -vsid
* $VICERES Drive9TrueEmulation -vsid
* $VICERES Drive10TrueEmulation -vsid
* $VICERES Drive11TrueEmulation -vsid
- * $VICERES IECDevice8 -vsid -xcbm5x0 -xcbm2 -xpet -xvic
- * $VICERES IECDevice9 -vsid -xcbm5x0 -xcbm2 -xpet -xvic
- * $VICERES IECDevice10 -vsid -xcbm5x0 -xcbm2 -xpet -xvic
- * $VICERES IECDevice11 -vsid -xcbm5x0 -xcbm2 -xpet -xvic
+ * $VICERES BusDevice8 -vsid -xvic
+ * $VICERES BusDevice9 -vsid -xvic
+ * $VICERES BusDevice10 -vsid -xvic
+ * $VICERES BusDevice11 -vsid -xvic
* $VICERES FileSystemDevice8 -vsid
* $VICERES FileSystemDevice9 -vsid
* $VICERES FileSystemDevice10 -vsid
@@ -116,8 +116,8 @@
/** \brief Real time clock save check buttons */
static GtkWidget *drive_rtc_save[NUM_DISK_UNITS];
-/** \brief IEC device check buttons */
-static GtkWidget *drive_iec_device[NUM_DISK_UNITS];
+/** \brief IEC or IEEE-488 device check buttons */
+static GtkWidget *drive_bus_device[NUM_DISK_UNITS];
/** \brief Drive extend-policy widgets */
static GtkWidget *drive_extend[NUM_DISK_UNITS];
@@ -175,6 +175,9 @@
*
* \param[in] widget IEC toggle button
* \param[in] unit unit number (8-11)
+ *
+ * This callback is used if the virtual backend depends on TrapDevice%d
+ * as well as the Virtual (bus) checkbox.
*/
static void iec_callback(GtkWidget *widget, int unit)
{
@@ -183,12 +186,31 @@
int virtdev = 0;
int index = unit - DRIVE_UNIT_MIN;
- resources_get_int_sprintf("VirtualDevice%d", &virtdev, unit);
+ resources_get_int_sprintf("TrapDevice%d", &virtdev, unit);
gtk_widget_set_sensitive(drive_device_type_label[index], iecdev | virtdev);
gtk_widget_set_sensitive(drive_device_type[index], iecdev | virtdev);
}
}
+/** \brief Custom callback for the IEEE widget in driveoptions.c
+ *
+ * \param[in] widget IEEE toggle button
+ * \param[in] unit unit number (8-11)
+ *
+ * This callback is used if the virtual backend depends only on
+ * the Virtual (bus) checkbox.
+ */
+static void ieee_callback(GtkWidget *widget, int unit)
+{
+ if (unit >= DRIVE_UNIT_MIN && unit <= DRIVE_UNIT_MAX) {
+ int ieeedev = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+ int index = unit - DRIVE_UNIT_MIN;
+
+ gtk_widget_set_sensitive(drive_device_type_label[index], ieeedev);
+ gtk_widget_set_sensitive(drive_device_type[index], ieeedev);
+ }
+}
+
/** \brief Extra event handler for the drive model changes
*
* \param[in] widget drive type radio button
@@ -236,7 +258,7 @@
}
}
-/** \brief Handler for the 'toggled' event of the IEC checkbox
+/** \brief Handler for the 'toggled' event of the IEC/IEEE-488 bus checkbox
*
* Triggers the user-provided callback function on toggle.
*
@@ -243,19 +265,14 @@
* \param[in] widget IEC checkbox
* \param[in] data unit number
*/
-static void on_iec_toggled(GtkWidget *widget, gpointer data)
+static void on_bus_toggled(GtkWidget *widget, gpointer data)
{
- if (machine_class != VICE_MACHINE_PET &&
- machine_class != VICE_MACHINE_CBM6x0 &&
- machine_class != VICE_MACHINE_CBM5x0) {
+ void (*callback)(GtkWidget *, int);
+ int unit = GPOINTER_TO_INT(data);
- void (*callback)(GtkWidget *, int);
- int unit = GPOINTER_TO_INT(data);
-
- callback = g_object_get_data(G_OBJECT(widget), "UnitCallback");
- if (callback != NULL) {
- callback(widget, unit);
- }
+ callback = g_object_get_data(G_OBJECT(widget), "UnitCallback");
+ if (callback != NULL) {
+ callback(widget, unit);
}
}
@@ -297,7 +314,7 @@
return label;
}
-/** \brief Create checkbox to toggle IEC-Device emulation for \a unit
+/** \brief Create checkbox to toggle IEC/IEEE-488 (bus) Device emulation for \a unit
*
* \param[in] unit unit number (8-11)
* \param[in] callback function to call on checkbutton toggle events
@@ -304,18 +321,17 @@
*
* \return GtkCheckButton
*/
-static GtkWidget *create_iec_check_button(int unit,
- void (*callback)(GtkWidget *, int))
+static GtkWidget *create_bus_check_button(int unit, void (*callback)(GtkWidget *, int))
{
GtkWidget *check;
- check = vice_gtk3_resource_check_button_new_sprintf("IECDevice%d",
- "IEC device",
+ check = vice_gtk3_resource_check_button_new_sprintf("BusDevice%d",
+ "Virtual (bus)",
unit);
g_object_set_data(G_OBJECT(check), "UnitCallback", (gpointer)callback);
g_signal_connect(GTK_TOGGLE_BUTTON(check),
"toggled",
- G_CALLBACK(on_iec_toggled),
+ G_CALLBACK(on_bus_toggled),
GINT_TO_POINTER(unit));
return check;
}
@@ -372,7 +388,7 @@
return check;
}
-/** \brief Create widget to control IEC device type
+/** \brief Create widget to control IEC/IEEE-488 device type
*
* \param[in] unit unit number (8-11)
*
@@ -413,8 +429,8 @@
{
GtkWidget *check;
- check = vice_gtk3_resource_check_button_new_sprintf("VirtualDevice%d",
- "Virtual device",
+ check = vice_gtk3_resource_check_button_new_sprintf("TrapDevice%d",
+ "Virtual (traps)",
unit);
g_object_set_data(G_OBJECT(check), "UnitCallback", (gpointer)callback);
g_signal_connect(GTK_TOGGLE_BUTTON(check),
@@ -443,7 +459,7 @@
/* Left column widgets */
/* IEC device type combo box */
- drive_device_type_label[index] = create_left_aligned_label("IEC device type");
+ drive_device_type_label[index] = create_left_aligned_label("Virtual backend");
drive_device_type[index] = create_drive_device_type_widget(unit);
gtk_grid_attach(GTK_GRID(left_grid), drive_device_type_label[index], 0, left_row, 1, 1);
gtk_grid_attach(GTK_GRID(left_grid), drive_device_type[index], 1, left_row, 1, 1);
@@ -477,13 +493,13 @@
/* Left column widgets */
- /* IEC device check button */
- drive_iec_device[index] = create_iec_check_button(unit, iec_callback);
- gtk_grid_attach(GTK_GRID(left_grid), drive_iec_device[index], 0, left_row, 2, 1);
+ /* IEC/IEEE-488 (bus) device check button */
+ drive_bus_device[index] = create_bus_check_button(unit, iec_callback);
+ gtk_grid_attach(GTK_GRID(left_grid), drive_bus_device[index], 0, left_row, 2, 1);
left_row++;
- /* IEC device type combo box */
- drive_device_type_label[index] = create_left_aligned_label("IEC device type");
+ /* IEC/IEEE-488 (bus) device type combo box */
+ drive_device_type_label[index] = create_left_aligned_label("Virtual backend");
drive_device_type[index] = create_drive_device_type_widget(unit);
gtk_widget_set_margin_top(drive_device_type_label[index], 8);
gtk_widget_set_margin_top(drive_device_type[index], 8);
@@ -547,12 +563,12 @@
/* Left column widgets */
/* IEC device check button */
- drive_iec_device[index] = create_iec_check_button(unit, iec_callback);
- gtk_grid_attach(GTK_GRID(left_grid), drive_iec_device[index], 0, left_row, 2, 1);
+ drive_bus_device[index] = create_bus_check_button(unit, iec_callback);
+ gtk_grid_attach(GTK_GRID(left_grid), drive_bus_device[index], 0, left_row, 2, 1);
left_row++;
/* IEC device type combo box */
- drive_device_type_label[index] = create_left_aligned_label("IEC device type");
+ drive_device_type_label[index] = create_left_aligned_label("Virtual backend");
drive_device_type[index] = create_drive_device_type_widget(unit);
gtk_widget_set_margin_top(drive_device_type_label[index], 8);
gtk_widget_set_margin_top(drive_device_type[index], 8);
@@ -592,15 +608,17 @@
int right_row,
int unit)
{
-#if 0
int index = unit - DRIVE_UNIT_MIN; /* index in widget arrays */
-#endif
+
/* Left column widgets */
- /* IEEE/Virtual device type combo box */
- /* No virtual devices, so no IEEE device type? */
-#if 0
- drive_device_type_label[index] = create_left_aligned_label("IEEE device type");
+ /* IEEE-488 device check button */
+ drive_bus_device[index] = create_bus_check_button(unit, ieee_callback);
+ gtk_grid_attach(GTK_GRID(left_grid), drive_bus_device[index], 0, left_row, 2, 1);
+ left_row++;
+
+ /* Virtual device type combo box */
+ drive_device_type_label[index] = create_left_aligned_label("Virtual backend");
drive_device_type[index] = create_drive_device_type_widget(unit);
gtk_widget_set_margin_top(drive_device_type_label[index], 8);
gtk_widget_set_margin_top(drive_device_type[index], 8);
@@ -607,7 +625,7 @@
gtk_grid_attach(GTK_GRID(left_grid), drive_device_type_label[index], 0, left_row, 1, 1);
gtk_grid_attach(GTK_GRID(left_grid), drive_device_type[index], 1, left_row, 1, 1);
left_row++;
-#endif
+
/* Right column widgets (none at the moment) */
}
@@ -658,7 +676,7 @@
gtk_grid_attach(GTK_GRID(grid), drive_tde[index], 0, row, 2, 1);
row++;
- /* Virtual Device */
+ /* Virtual Device (bus) check button */
if (has_iec()) {
drive_virtualdev[index] = create_drive_virtual_device_widget(unit, iec_callback);
gtk_grid_attach(GTK_GRID(grid), drive_virtualdev[index], 0, row, 2, 1);
@@ -811,30 +829,26 @@
gtk_grid_attach(GTK_GRID(layout), stack, 0, 2, 1, 1);
/* set sensitivity of the filesystem-type comboboxes, depending on the
- * IECDevice (not for VIC20 and PET/CBM-II) and VirtualDevice resource
+ * BusDevice (not for VIC20 and PET/CBM-II) and TrapDevice resource
*/
- if (has_iec()) {
- for (unit = DRIVE_UNIT_MIN; unit <= DRIVE_UNIT_MAX; unit++) {
- int iecdev = 0;
- int virtdev = 0;
- int index = unit - DRIVE_UNIT_MIN; /* index in the widget arrays */
+ for (unit = DRIVE_UNIT_MIN; unit <= DRIVE_UNIT_MAX; unit++) {
+ int iecdev = 0;
+ int virtdev = 0;
+ int index = unit - DRIVE_UNIT_MIN; /* index in the widget arrays */
- /* FIXME: xvic doesn't use IEDevice (yet), uses its own iecbus code */
- if (machine_class != VICE_MACHINE_VIC20 &&
- machine_class != VICE_MACHINE_PET &&
- machine_class != VICE_MACHINE_CBM5x0 &&
- machine_class != VICE_MACHINE_CBM6x0) {
- resources_get_int_sprintf("IECDevice%d", &iecdev, unit);
- }
- resources_get_int_sprintf("VirtualDevice%d", &virtdev, unit);
- /* try to set sensitive, regardless of if the widget actually
- * exists, this helps with debugging since Gtk will print a warning
- * on the console.
- */
- gtk_widget_set_sensitive(drive_device_type_label[index], iecdev | virtdev);
- gtk_widget_set_sensitive(drive_device_type[index], iecdev | virtdev);
+ /* FIXME: xvic doesn't use BusDevice (yet), uses its own iecbus code */
+ if (machine_class != VICE_MACHINE_VIC20) {
+ resources_get_int_sprintf("BusDevice%d", &iecdev, unit);
}
+ resources_get_int_sprintf("TrapDevice%d", &virtdev, unit);
+ /* try to set sensitive, regardless of if the widget actually
+ * exists, this helps with debugging since Gtk will print a warning
+ * on the console.
+ */
+ gtk_widget_set_sensitive(drive_device_type_label[index], iecdev | virtdev);
+ gtk_widget_set_sensitive(drive_device_type[index], iecdev | virtdev);
}
+
gtk_widget_show_all(layout);
return layout;
}
Modified: trunk/vice/src/arch/gtk3/widgets/settings_printer.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_printer.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/gtk3/widgets/settings_printer.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -5,14 +5,14 @@
*/
/*
- * $VICERES VirtualDevice4 -vsid
- * $VICERES VirtualDevice5 -vsid
- * $VICERES VirtualDevice6 -vsid
- * $VICERES VirtualDevice7 -vsid
- * $VICERES IECDevice4 x64 x64sc x64dtv xscpu64 x128 xplus4
- * $VICERES IECDevice5 x64 x64sc x64dtv xscpu64 x128 xplus4
- * $VICERES IECDevice6 x64 x64sc x64dtv xscpu64 x128 xplus4
- * $VICERES IECDevice7 x64 x64sc x64dtv xscpu64 x128 xplus4
+ * $VICERES TrapDevice4 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice5 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice6 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES TrapDevice7 -vsid -xcbm5x0 -xcbm2 -xpet
+ * $VICERES BusDevice4 -vsid -xvic
+ * $VICERES BusDevice5 -vsid -xvic
+ * $VICERES BusDevice6 -vsid -xvic
+ * $VICERES BusDevice7 -vsid -xvic
* $VICERES Printer7 -vsid
* $VICERES Printer4Output -vsid
* $VICERES Printer5Output -vsid
@@ -81,7 +81,7 @@
int device; /**< device number used by resources */
int device_drv; /**< device number used by drivers */
bool has_type; /**< can set emulation type */
- bool has_virtdev; /**< virtual device support */
+ bool has_trapdev; /**< virtual device support with traps */
bool has_iec; /**< can have IEC device support (depends on machine) */
bool has_formfeed; /**< can send FF */
bool has_realdev; /**< real device (OpenCBM) support */
@@ -99,7 +99,7 @@
.device = 4,
.device_drv = PRINTER_IEC_4, /* 0 */
.has_type = true,
- .has_virtdev = true,
+ .has_trapdev = true,
.has_iec = true,
.has_formfeed = true,
.has_driver = true,
@@ -112,7 +112,7 @@
.device = 5,
.device_drv = PRINTER_IEC_5, /* 1 */
.has_type = true,
- .has_virtdev = true,
+ .has_trapdev = true,
.has_iec = true,
.has_formfeed = true,
.has_driver = true,
@@ -125,7 +125,7 @@
.device = 6,
.device_drv = PRINTER_IEC_6, /* 2 */
.has_type = true,
- .has_virtdev = true,
+ .has_trapdev = true,
.has_iec = true,
.has_formfeed = true,
.has_driver = true,
@@ -137,7 +137,7 @@
.name = "opencbm7",
.device = 7,
.device_drv = PRINTER_USERPORT, /* 3 */
- .has_virtdev = true,
+ .has_trapdev = true,
.has_iec = true,
.has_realdev = true,
},
@@ -184,7 +184,7 @@
*
* \note Returns `false` for xvic due to xvic having its own iecbus code.
*/
-static bool machine_has_iec(void)
+static bool machine_has_iec_or_ieee(void)
{
switch (machine_class) {
/* these machines have IEC */
@@ -198,6 +198,10 @@
case VICE_MACHINE_VIC20: /* fall through */
#endif
case VICE_MACHINE_PLUS4:
+ /* these machines have IEEE-488 */
+ case VICE_MACHINE_PET: /* fall through */
+ case VICE_MACHINE_CBM5x0: /* fall through */
+ case VICE_MACHINE_CBM6x0: /* fall through */
return true;
default:
@@ -272,8 +276,8 @@
{
GtkWidget *check;
- check = vice_gtk3_resource_check_button_new_sprintf("VirtualDevice%d",
- "Enable Virtual Device",
+ check = vice_gtk3_resource_check_button_new_sprintf("TrapDevice%d",
+ "Virtual (traps)",
device);
return check;
}
@@ -288,8 +292,8 @@
{
GtkWidget *check;
- check = vice_gtk3_resource_check_button_new_sprintf("IECDevice%d",
- "Enable IEC device",
+ check = vice_gtk3_resource_check_button_new_sprintf("BusDevice%d",
+ "Virtual (bus)",
device);
return check;
}
@@ -414,13 +418,13 @@
* custom check button */
type = create_real_device7_check_button();
}
- if (child->has_virtdev) {
+ if (child->has_trapdev) {
virtdev = create_virtual_device_check_button(device);
} else if (child->has_userport) {
virtdev = userport_device_check_button_new("Enable userport printer emulation",
USERPORT_DEVICE_PRINTER);
}
- if (child->has_iec && machine_has_iec()) {
+ if (child->has_iec && machine_has_iec_or_ieee()) {
iec = create_iec_check_button(device);
}
if (child->has_driver) {
Modified: trunk/vice/src/arch/gtk3/widgets/settings_tapeport.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_tapeport.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/gtk3/widgets/settings_tapeport.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -5,10 +5,10 @@
*/
/*
- * $VICERES VirtualDevice1 -xscpu64 -vsid
- * $VICERES VirtualDevice2 -xscpu64 -vsid -x64sc -x64 -xvic -xplus4 -xcbm2 -xcbm5x0
- * $VICERES TapePort1Device -xscpu64 -vsid
- * $VICERES TapePort2Device -xscpu64 -vsid -x64sc -x64 -xvic -xplus4 -xcbm2 -xcbm5x0
+ * $VICERES TrapDevice1 -xscpu64 -vsid
+ * $VICERES TrapDevice2 -xscpu64 -vsid -x64sc -x64 -xvic -xplus4 -xcbm2 -xcbm5x0
+ * $VICERES TapePort1Device -xscpu64 -vsid
+ * $VICERES TapePort2Device -xscpu64 -vsid -x64sc -x64 -xvic -xplus4 -xcbm2 -xcbm5x0
* $VICERES DatasetteResetWithCPU -xscpu64 -vsid
* $VICERES DatasetteSound -xscpu64 -vsid
* $VICERES DatasetteSoundVolume -xscpu64 -vsid
@@ -17,11 +17,11 @@
* $VICERES DatasetteTapeWobbleAmplitude -xscpu64 -vsid
* $VICERES DatasetteTapeWobbleFrequency -xscpu64 -vsid
* $VICERES DatasetteZeroGapDelay -xscpu64 -vsid
- * $VICERES CPClockF83Save -xscpu64 -vsid
- * $VICERES TapecartUpdateTCRT x64 x64sc x128
- * $VICERES TapecartOptimizeTCRT x64 x64sc x128
- * $VICERES TapecartLogLevel x64 x64sc x128
- * $VICERES TapecartTCRTFilename x64 x64sc x128
+ * $VICERES CPClockF83Save -xscpu64 -vsid
+ * $VICERES TapecartUpdateTCRT x64 x64sc x128
+ * $VICERES TapecartOptimizeTCRT x64 x64sc x128
+ * $VICERES TapecartLogLevel x64 x64sc x128
+ * $VICERES TapecartTCRTFilename x64 x64sc x128
*/
/*
@@ -270,12 +270,12 @@
row++;
/* device traps for datasette #1 and #2 */
- ds_traps1 = vice_gtk3_resource_check_button_new("VirtualDevice1",
- "Virtual Device #1 (required for t64)");
+ ds_traps1 = vice_gtk3_resource_check_button_new("TrapDevice1",
+ "Kernal traps for Device #1 (required for t64)");
gtk_grid_attach(GTK_GRID(grid), ds_traps1, 0, row, 2, 1);
if (machine_has_second_tape_port()) {
- ds_traps2 = vice_gtk3_resource_check_button_new("VirtualDevice2",
- "Virtual Device #2 (required for t64)");
+ ds_traps2 = vice_gtk3_resource_check_button_new("TrapDevice2",
+ "Kernal traps for Device #2 (required for t64)");
gtk_grid_attach(GTK_GRID(grid), ds_traps2, 2, row, 2, 1);
}
row++;
Modified: trunk/vice/src/arch/sdl/menu_drive.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_drive.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/sdl/menu_drive.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -97,7 +97,7 @@
int drivetype;
resources_get_int_sprintf("Drive%iTrueEmulation", &tde, drive);
- resources_get_int_sprintf("VirtualDevice%i", &vdt, drive);
+ resources_get_int_sprintf("TrapDevice%i", &vdt, drive);
resources_get_int_sprintf("Drive%iType", &drivetype, drive);
resources_get_int_sprintf("FileSystemDevice%i", &fsdevice, drive);
if (!tde && vdt) {
@@ -116,20 +116,22 @@
{
int type;
int tde = 0;
- int vdt = 0;
+ int bus = 0;
+ int trap = 0;
int fsdevice = 0;
type = drive_get_type_by_devnr(drive);
resources_get_int_sprintf("Drive%iTrueEmulation", &tde, drive);
- resources_get_int_sprintf("VirtualDevice%i", &vdt, drive);
+ resources_get_int_sprintf("BusDevice%i", &bus, drive);
+ resources_get_int_sprintf("TrapDevice%i", &trap, drive);
resources_get_int_sprintf("FileSystemDevice%i", &fsdevice, drive);
- if (!tde && vdt && fsdevice == ATTACH_DEVICE_FS) {
+ if (!tde && (trap || bus) && fsdevice == ATTACH_DEVICE_FS) {
return MENU_SUBMENU_STRING " directory";
}
#ifdef HAVE_REALDEVICE
- if (!tde && vdt && fsdevice == ATTACH_DEVICE_REAL) {
+ if (!tde && (trap || bus) && fsdevice == ATTACH_DEVICE_REAL) {
return MENU_SUBMENU_STRING " real drive";
}
#endif
@@ -675,16 +677,16 @@
if (support) {
if (parameter == ATTACH_DEVICE_REAL) {
#ifdef HAVE_REALDEVICE
- resources_set_int_sprintf("IECDevice%i", 1, drive);
+ resources_set_int_sprintf("BusDevice%i", 1, drive);
resources_set_int_sprintf("FileSystemDevice%i", parameter, drive);
#endif
} else if (parameter == ATTACH_DEVICE_FS) {
- resources_set_int_sprintf("VirtualDevice%i", 1, drive);
+ resources_set_int_sprintf("TrapDevice%i", 1, drive);
resources_set_int_sprintf("Drive%iTrueEmulation", 0, drive);
resources_set_int_sprintf("FileSystemDevice%i", 0, drive);
resources_set_int_sprintf("FileSystemDevice%i", parameter, drive);
} else {
- resources_set_int_sprintf("VirtualDevice%i", 0, drive);
+ resources_set_int_sprintf("TrapDevice%i", 0, drive);
resources_set_int_sprintf("Drive%iTrueEmulation", 1, drive);
resources_set_int_sprintf("Drive%iType", parameter, drive);
}
@@ -1087,10 +1089,10 @@
UI_MENU_DEFINE_TOGGLE(Drive10TrueEmulation)
UI_MENU_DEFINE_TOGGLE(Drive11TrueEmulation)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice8)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice9)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice10)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice11)
+UI_MENU_DEFINE_TOGGLE(TrapDevice8)
+UI_MENU_DEFINE_TOGGLE(TrapDevice9)
+UI_MENU_DEFINE_TOGGLE(TrapDevice10)
+UI_MENU_DEFINE_TOGGLE(TrapDevice11)
UI_MENU_DEFINE_STRING(Drive8FixedSize)
UI_MENU_DEFINE_STRING(Drive9FixedSize)
@@ -1158,9 +1160,9 @@
/* 14 */{ .string = "Drive " #x" True Drive Emulation", \
.type = MENU_ENTRY_RESOURCE_TOGGLE, \
.callback = toggle_Drive##x##TrueEmulation_callback }, \
-/* 15 */{ .string = "Drive " #x" Virtual Device", \
+/* 15 */{ .string = "Drive " #x" Virtual (Trap) Device", \
.type = MENU_ENTRY_RESOURCE_TOGGLE, \
- .callback = toggle_VirtualDevice##x##_callback }, \
+ .callback = toggle_TrapDevice##x##_callback }, \
/* 16 */SDL_MENU_ITEM_SEPARATOR, \
/* 17 */{ .string = "CMD HD fixed size", \
.type = MENU_ENTRY_RESOURCE_STRING, \
Modified: trunk/vice/src/arch/sdl/menu_printer.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_printer.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/sdl/menu_printer.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -243,16 +243,16 @@
#ifdef HAVE_REALDEVICE
VICE_SDL_DEVICE_TYPE_MENU(7)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice7)
-UI_MENU_DEFINE_TOGGLE(IECDevice7)
+UI_MENU_DEFINE_TOGGLE(TrapDevice7)
+UI_MENU_DEFINE_TOGGLE(BusDevice7)
#endif
-UI_MENU_DEFINE_TOGGLE(VirtualDevice4)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice5)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice6)
-UI_MENU_DEFINE_TOGGLE(IECDevice4)
-UI_MENU_DEFINE_TOGGLE(IECDevice5)
-UI_MENU_DEFINE_TOGGLE(IECDevice6)
+UI_MENU_DEFINE_TOGGLE(TrapDevice4)
+UI_MENU_DEFINE_TOGGLE(TrapDevice5)
+UI_MENU_DEFINE_TOGGLE(TrapDevice6)
+UI_MENU_DEFINE_TOGGLE(BusDevice4)
+UI_MENU_DEFINE_TOGGLE(BusDevice5)
+UI_MENU_DEFINE_TOGGLE(BusDevice6)
static UI_MENU_CALLBACK(uiprinter_formfeed_callback)
{
@@ -401,47 +401,47 @@
const ui_menu_entry_t printer_iec_menu[] = {
VICE_SDL_PRINTER_COMMON_4_MENU_ITEMS
- { .string = "Printer #4 enable virtual device",
+ { .string = "Printer #4 enable virt. (trap) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice4_callback
+ .callback = toggle_TrapDevice4_callback
},
- { .string = "Printer #4 enable IEC device",
+ { .string = "Printer #4 enable virt. (bus) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_IECDevice4_callback
+ .callback = toggle_BusDevice4_callback
},
SDL_MENU_ITEM_SEPARATOR,
VICE_SDL_PRINTER_COMMON_5_MENU_ITEMS
- { .string = "Printer #5 enable virtual device",
+ { .string = "Printer #5 enable virt. (trap) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice5_callback
+ .callback = toggle_TrapDevice5_callback
},
- { .string = "Printer #5 enable IEC device",
+ { .string = "Printer #5 enable virt. (bus) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_IECDevice5_callback,
+ .callback = toggle_BusDevice5_callback,
},
SDL_MENU_ITEM_SEPARATOR,
VICE_SDL_PRINTER_COMMON_6_MENU_ITEMS
- { .string = "Printer #6 enable virtual device",
+ { .string = "Printer #6 enable virt. (trap) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice6_callback
+ .callback = toggle_TrapDevice6_callback
},
- { .string = "Printer #6 enable IEC device",
+ { .string = "Printer #6 enable virt. (bus) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_IECDevice6_callback
+ .callback = toggle_BusDevice6_callback
},
SDL_MENU_ITEM_SEPARATOR,
#ifdef HAVE_REALDEVICE
VICE_SDL_DEVICE_COMMON_7_MENU_ITEMS
- { .string = "Device #7 enable virtual device",
+ { .string = "Device #7 enable virt. (trap) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice7_callback
+ .callback = toggle_TrapDevice7_callback
},
- { .string = "Device #7 enable IEC device",
+ { .string = "Device #7 enable virt. (bus) device",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_IECDevice7_callback
+ .callback = toggle_BusDevice7_callback
},
SDL_MENU_ITEM_SEPARATOR,
Modified: trunk/vice/src/arch/sdl/menu_tape.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_tape.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/arch/sdl/menu_tape.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -180,7 +180,7 @@
UI_MENU_DEFINE_INT(DatasetteTapeWobbleAmplitude)
UI_MENU_DEFINE_INT(DatasetteTapeAzimuthError)
UI_MENU_DEFINE_TOGGLE(DatasetteSound)
-UI_MENU_DEFINE_TOGGLE(VirtualDevice1)
+UI_MENU_DEFINE_TOGGLE(TrapDevice1)
const ui_menu_entry_t tape_pet_menu[] = {
{ .action = ACTION_TAPE_ATTACH_1,
@@ -299,7 +299,7 @@
},
{ .string = "Enable virtual device (for t64)",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice1_callback
+ .callback = toggle_TrapDevice1_callback
},
SDL_MENU_LIST_END
};
@@ -388,7 +388,7 @@
},
{ .string = "Enable virtual device (for t64)",
.type = MENU_ENTRY_RESOURCE_TOGGLE,
- .callback = toggle_VirtualDevice1_callback
+ .callback = toggle_TrapDevice1_callback
},
SDL_MENU_LIST_END
};
Modified: trunk/vice/src/attach.c
===================================================================
--- trunk/vice/src/attach.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/attach.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -148,16 +148,16 @@
static const cmdline_option_t cmdline_options[] =
{
- { "-device8", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
+ { "-devicebackend8", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
NULL, NULL, "FileSystemDevice8", (void *)ATTACH_DEVICE_FS,
"<Type>", "Set device type for device #8 (0: None, 1: Filesystem, 2: OpenCBM)" },
- { "-device9", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
+ { "-devicebackend9", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
NULL, NULL, "FileSystemDevice9", (void *)ATTACH_DEVICE_FS,
"<Type>", "Set device type for device #9 (0: None, 1: Filesystem, 2: OpenCBM)" },
- { "-device10", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
+ { "-devicebackend10", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
NULL, NULL, "FileSystemDevice10", (void *)ATTACH_DEVICE_FS,
"<Type>", "Set device type for device #10 (0: None, 1: Filesystem, 2: OpenCBM)" },
- { "-device11", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
+ { "-devicebackend11", SET_RESOURCE, CMDLINE_ATTRIB_NEED_ARGS,
NULL, NULL, "FileSystemDevice11", (void *)ATTACH_DEVICE_FS,
"<Type>", "Set device type for device #11 (0: None, 1: Filesystem, 2: OpenCBM)" },
{ "-attach8ro", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
Modified: trunk/vice/src/autostart-prg.c
===================================================================
--- trunk/vice/src/autostart-prg.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/autostart-prg.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -168,7 +168,6 @@
DBG(("autostart_prg_with_virtual_fs (directory:%s)", directory));
/* Setup FS-based drive emulation. */
- /* resources_set_int("VirtualDevices", 1); FIXME: not restored */
resources_set_int_sprintf("FSDevice%dConvertP00", 1, unit);
file_system_detach_disk(unit, drive); /* FIXME: not restored */
resources_set_int_sprintf("FileSystemDevice%d", ATTACH_DEVICE_FS, unit);
Modified: trunk/vice/src/autostart.c
===================================================================
--- trunk/vice/src/autostart.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/autostart.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -129,7 +129,7 @@
/* Flag: were device traps turned on when we started booting the disk image? */
static int orig_device_traps_state = -1;
/* Flag: was iec device turned on when we started booting the disk image? */
-static int orig_iec_device_state = -1;
+static int orig_bus_device_state = -1;
/* Flag: warp mode state before booting */
static int orig_warp_mode = -1;
static int orig_FileSystemDevice8 = -1;
@@ -678,26 +678,20 @@
return value;
}
-static void set_iec_device_state(int on, int unit)
+static void set_bus_device_state(int on, int unit)
{
- if ((machine_class != VICE_MACHINE_VIC20) &&
- (machine_class != VICE_MACHINE_PET) &&
- (machine_class != VICE_MACHINE_CBM5x0) &&
- (machine_class != VICE_MACHINE_CBM6x0)) {
- log_message(autostart_log, "Turning IECDevice %s for unit %d.", on ? "on" : "off", unit);
- resources_set_int_sprintf("IECDevice%d", on, unit);
+ if (machine_class != VICE_MACHINE_VIC20) {
+ log_message(autostart_log, "Turning BusDevice %s for unit %d.", on ? "on" : "off", unit);
+ resources_set_int_sprintf("BusDevice%d", on, unit);
}
}
-static int get_iec_device_state(int unit)
+static int get_bus_device_state(int unit)
{
int value = 0;
- if ((machine_class != VICE_MACHINE_VIC20) &&
- (machine_class != VICE_MACHINE_PET) &&
- (machine_class != VICE_MACHINE_CBM5x0) &&
- (machine_class != VICE_MACHINE_CBM6x0)) {
- if (resources_get_int_sprintf("IECDevice%d", &value, unit) < 0) {
+ if (machine_class != VICE_MACHINE_VIC20) {
+ if (resources_get_int_sprintf("BusDevice%d", &value, unit) < 0) {
return 0;
}
}
@@ -714,7 +708,7 @@
{
int value;
- if (resources_get_int_sprintf("VirtualDevice%d", &value, unit) < 0) {
+ if (resources_get_int_sprintf("TrapDevice%d", &value, unit) < 0) {
return 0;
}
@@ -724,7 +718,7 @@
static void set_device_traps_state(int unit, int on)
{
log_message(autostart_log, "Turning virtual device traps %s.", on ? "on" : "off");
- resources_set_int_sprintf("VirtualDevice%d", on, unit);
+ resources_set_int_sprintf("TrapDevice%d", on, unit);
}
static void enable_warp_if_requested(void)
@@ -792,7 +786,7 @@
static void init_drive_emulation_state(int unit, int drive)
{
DBG(("init_drive_emulation_state(unit: %d drive: %d) tde:%d iecdevice:%d traps:%d warp:%d",
- unit, drive, get_true_drive_emulation_state(unit), get_iec_device_state(unit),
+ unit, drive, get_true_drive_emulation_state(unit), get_bus_device_state(unit),
get_device_traps_state(unit), vsync_get_warp_mode()
));
if (orig_drive_true_emulation_state == -1) {
@@ -801,8 +795,8 @@
if (orig_device_traps_state == -1) {
orig_device_traps_state = get_device_traps_state(unit);
}
- if (orig_iec_device_state == -1) {
- orig_iec_device_state = get_iec_device_state(unit);
+ if (orig_bus_device_state == -1) {
+ orig_bus_device_state = get_bus_device_state(unit);
}
if (orig_warp_mode == -1) {
orig_warp_mode = vsync_get_warp_mode();
@@ -832,10 +826,10 @@
set_device_traps_state(unit, orig_device_traps_state);
}
}
- if (orig_iec_device_state != -1) {
+ if (orig_bus_device_state != -1) {
/* set iec device to original state */
- if (get_iec_device_state(unit) != orig_iec_device_state) {
- set_iec_device_state(orig_iec_device_state, unit);
+ if (get_bus_device_state(unit) != orig_bus_device_state) {
+ set_bus_device_state(orig_bus_device_state, unit);
}
}
if (orig_drive_true_emulation_state != -1) {
@@ -866,7 +860,7 @@
/* make sure we refresh these next time we do autostart via gui */
orig_drive_true_emulation_state = - 1;
orig_device_traps_state = - 1;
- orig_iec_device_state = - 1;
+ orig_bus_device_state = - 1;
orig_warp_mode = -1;
orig_FileSystemDevice8 = -1;
orig_FSDevice8ConvertP00 = -1;
@@ -880,7 +874,7 @@
autostart_type = -1;
DBG(("restore_drive_emulation_state(unit: %d drive: %d) tde:%d iecdevice:%d traps:%d warp:%d", unit, drive,
- get_true_drive_emulation_state(unit), get_iec_device_state(unit), get_device_traps_state(unit), vsync_get_warp_mode()
+ get_true_drive_emulation_state(unit), get_bus_device_state(unit), get_device_traps_state(unit), vsync_get_warp_mode()
));
}
@@ -1259,7 +1253,7 @@
case NO:
orig_drive_true_emulation_state = get_true_drive_emulation_state(unit);
orig_device_traps_state = get_device_traps_state(unit);
- orig_iec_device_state = get_iec_device_state(unit);
+ orig_bus_device_state = get_bus_device_state(unit);
disable_warp_if_was_requested();
autostart_disable();
break;
@@ -1709,10 +1703,10 @@
}
}
}
- DBG(("setup_for_disk: unit: %d drive: %d TDE: %s IECDevice: %s Traps: %s handle TDE: %s",
+ DBG(("setup_for_disk: unit: %d drive: %d TDE: %s BusDevice: %s Traps: %s handle TDE: %s",
unit, drive,
get_true_drive_emulation_state(unit) ? "on" : "off",
- get_iec_device_state(unit) ? "on" : "off",
+ get_bus_device_state(unit) ? "on" : "off",
get_device_traps_state(unit) ? "on" : "off",
handle_drive_true_emulation_overridden ? "yes" : "no"
));
@@ -1727,7 +1721,7 @@
{
if (handle_drive_true_emulation_overridden) {
DBG(("setup_for_disk_ready - handle TDE"));
- if (orig_device_traps_state || orig_iec_device_state) {
+ if (orig_device_traps_state || orig_bus_device_state) {
#if 0
if (orig_drive_true_emulation_state) {
/* if traps are enabled, and TDE was on before autostart, disable it now */
@@ -1737,7 +1731,7 @@
/* disable TDE if device traps or iecdevice are enabled */
set_true_drive_emulation_mode(0, unit);
/* if both traps and iec device is enabled, disable traps */
- if (orig_device_traps_state && orig_iec_device_state) {
+ if (orig_device_traps_state && orig_bus_device_state) {
set_device_traps_state(0, unit);
}
} else {
@@ -1754,10 +1748,10 @@
}
}
}
- DBG(("setup_for_disk_ready: unit: %d drive: %d TDE: %s IECDevice: %s Traps: %s handle TDE: %s",
+ DBG(("setup_for_disk_ready: unit: %d drive: %d TDE: %s BusDevice: %s Traps: %s handle TDE: %s",
unit, drive,
get_true_drive_emulation_state(unit) ? "on" : "off",
- get_iec_device_state(unit) ? "on" : "off",
+ get_bus_device_state(unit) ? "on" : "off",
get_device_traps_state(unit) ? "on" : "off",
handle_drive_true_emulation_overridden ? "yes" : "no"
));
Modified: trunk/vice/src/c128/c128memsnapshot.c
===================================================================
--- trunk/vice/src/c128/c128memsnapshot.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/c128/c128memsnapshot.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -102,7 +102,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_get_int_sprintf("VirtualDevice%d", &trapfl[i], trapdevices[i]);
+ resources_get_int_sprintf("TrapDevice%d", &trapfl[i], trapdevices[i]);
}
}
@@ -110,7 +110,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_set_int_sprintf("VirtualDevice%d", 0, trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", 0, trapdevices[i]);
}
}
@@ -118,7 +118,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_set_int_sprintf("VirtualDevice%d", trapfl[i], trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", trapfl[i], trapdevices[i]);
}
}
Modified: trunk/vice/src/c128/c128rom.c
===================================================================
--- trunk/vice/src/c128/c128rom.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/c128/c128rom.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -240,7 +240,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_get_int_sprintf("VirtualDevice%d", &trapfl[i], trapdevices[i]);
+ resources_get_int_sprintf("TrapDevice%d", &trapfl[i], trapdevices[i]);
}
}
@@ -248,7 +248,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_set_int_sprintf("VirtualDevice%d", 0, trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", 0, trapdevices[i]);
}
}
@@ -256,7 +256,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_set_int_sprintf("VirtualDevice%d", trapfl[i], trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", trapfl[i], trapdevices[i]);
}
}
Modified: trunk/vice/src/c64/c64-resources.c
===================================================================
--- trunk/vice/src/c64/c64-resources.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/c64/c64-resources.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -201,7 +201,7 @@
int ret = 0;
int trapfl;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_get_int_sprintf("VirtualDevice%d", &trapfl, trapdevices[i]);
+ resources_get_int_sprintf("TrapDevice%d", &trapfl, trapdevices[i]);
/*val |= trapfl;*/
if (trapfl) {
ret |= (1 << i);
@@ -215,7 +215,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_set_int_sprintf("VirtualDevice%d", 0, trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", 0, trapdevices[i]);
}
/*printf("clear_trapflags\n");*/
}
@@ -227,7 +227,7 @@
int trapfl;
for(i = 0; trapdevices[i] != -1; i++) {
trapfl = (flags & (1 << i)) ? 1 : 0;
- resources_set_int_sprintf("VirtualDevice%d", trapfl, trapdevices[i]);
+ resources_set_int_sprintf("TrapDevice%d", trapfl, trapdevices[i]);
/*val |= trapfl;*/
}
/*printf("restore_trapflags(%d)\n", val);*/
Modified: trunk/vice/src/c64/c64bus.c
===================================================================
--- trunk/vice/src/c64/c64bus.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/c64/c64bus.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -74,11 +74,10 @@
iecbus_status_set(IECBUS_STATUS_DRIVETYPE, unit, enable);
}
-void machine_bus_status_virtualdevices_set(unsigned int unit, unsigned int enable)
+void machine_bus_status_trapdevices_set(unsigned int unit, unsigned int enable)
{
- DBG(("machine_bus_status_virtualdevices_set unit: %u enable: %u", unit, enable));
- iecbus_status_set(IECBUS_STATUS_VIRTUALDEVICES, unit, enable); /* IEC */
- parallel_bus_enable(unit, enable); /* IEEE488 */
+ DBG(("machine_bus_status_trapdevices_set unit: %u enable: %u", unit, enable));
+ iecbus_status_set(IECBUS_STATUS_TRAPDEVICE, unit, enable); /* IEC */
}
void machine_bus_eof_callback_set(void (*func)(void))
Modified: trunk/vice/src/c64/c64memsnapshot.c
===================================================================
--- trunk/vice/src/c64/c64memsnapshot.c 2025-09-21 15:41:29 UTC (rev 45780)
+++ trunk/vice/src/c64/c64memsnapshot.c 2025-10-02 12:45:42 UTC (rev 45781)
@@ -100,7 +100,7 @@
{
int i;
for(i = 0; trapdevices[i] != -1; i++) {
- resources_get_int_sprintf("VirtualDevice%d", &trapfl[i], trapdevices[i]);
+ resources_get_int_sprintf("TrapDevice%d", &trapfl[i], trapdevices[i]);
}
}
@@ -108,7 +...
[truncated message content] |
|
From: <gp...@us...> - 2025-09-21 15:41:31
|
Revision: 45780
http://sourceforge.net/p/vice-emu/code/45780
Author: gpz
Date: 2025-09-21 15:41:29 +0000 (Sun, 21 Sep 2025)
Log Message:
-----------
implement rotate option in the opengl renderer
Modified Paths:
--------------
trunk/vice/data/GLSL/viewport.vert
trunk/vice/src/arch/gtk3/opengl_renderer.c
trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
Modified: trunk/vice/data/GLSL/viewport.vert
===================================================================
--- trunk/vice/data/GLSL/viewport.vert 2025-09-20 19:42:12 UTC (rev 45779)
+++ trunk/vice/data/GLSL/viewport.vert 2025-09-21 15:41:29 UTC (rev 45780)
@@ -3,6 +3,8 @@
uniform vec4 scale;
uniform vec2 view_size;
+uniform mat4 rotation;
+
in vec4 position;
in vec2 tex;
@@ -9,6 +11,6 @@
out vec2 tex_coord;
void main() {
- gl_Position = position * scale;
+ gl_Position = position * scale * rotation;
tex_coord = (tex * (view_size - 1.0) + 0.5) / view_size;
-}
\ No newline at end of file
+}
Modified: trunk/vice/src/arch/gtk3/opengl_renderer.c
===================================================================
--- trunk/vice/src/arch/gtk3/opengl_renderer.c 2025-09-20 19:42:12 UTC (rev 45779)
+++ trunk/vice/src/arch/gtk3/opengl_renderer.c 2025-09-21 15:41:29 UTC (rev 45780)
@@ -84,7 +84,7 @@
* entire display area, and the last eight assign texture coordinates
* to each corner.
*/
-static float vertexData[] = {
+static float vertexData[16 + 8] = {
-1.0f, -1.0f, 0.0f, 1.0f,
1.0f, -1.0f, 0.0f, 1.0f,
-1.0f, 1.0f, 0.0f, 1.0f,
@@ -103,6 +103,21 @@
{ 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }, /* flip x & y */
};
+static const float model_matrix[2][16] = {
+ { /* ident, no rotation */
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f
+ }, {
+ /* rotated 90 degr clockwise */
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f
+ }
+};
+
/**/
static void vice_opengl_initialise_canvas(video_canvas_t *canvas)
@@ -528,8 +543,6 @@
vice_opengl_renderer_context_t *context = (vice_opengl_renderer_context_t *)canvas->renderer_context;
filter = canvas->videoconfig->glfilter;
- /* FIXME: add support for rotate */
-
/* update texture coords according to flipx/flipy */
flipidx = canvas->videoconfig->flipx | (canvas->videoconfig->flipy << 1);
u1 = vertexDataPatches[flipidx][4];
@@ -545,6 +558,13 @@
glEnable(GL_TEXTURE_2D);
glActiveTexture(GL_TEXTURE0);
+ /* Save the current matrix. */
+ glPushMatrix();
+
+ if (canvas->videoconfig->rotate) {
+ glRotatef(270.0f, 0, 0, 1); /* rotate 90degr clockwise */
+ }
+
if (context->interlaced) {
glBindTexture(GL_TEXTURE_2D, context->previous_frame_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter);
@@ -584,6 +604,9 @@
glBindTexture(GL_TEXTURE_2D, 0);
glDisable(GL_TEXTURE_2D);
+
+ /* Reset the current matrix to the one that was saved. */
+ glPopMatrix();
}
static void modern_render(video_canvas_t *canvas, float scale_x, float scale_y)
@@ -602,13 +625,12 @@
GLuint view_size_uniform;
GLuint source_size_uniform;
GLuint this_frame_uniform;
+ GLuint rotation_uniform;
GLuint last_frame_uniform = 0;
vice_opengl_renderer_context_t *context = (vice_opengl_renderer_context_t *)canvas->renderer_context;
filter = canvas->videoconfig->glfilter;
- /* FIXME: add support for rotate */
-
/* update texture coords according to flipx/flipy */
flipidx = canvas->videoconfig->flipx | (canvas->videoconfig->flipy << 1);
if (flipidxlast != flipidx) {
@@ -641,6 +663,7 @@
view_size_uniform = glGetUniformLocation(program, "view_size");
source_size_uniform = glGetUniformLocation(program, "source_size");
this_frame_uniform = glGetUniformLocation(program, "this_frame");
+ rotation_uniform = glGetUniformLocation(program, "rotation");
if (context->interlaced) {
last_frame_uniform = glGetUniformLocation(program, "last_frame");
@@ -665,6 +688,8 @@
glUniform2f(view_size_uniform, context->native_view_width, context->native_view_height);
glUniform2f(source_size_uniform, context->current_frame_width, context->current_frame_height);
+ glUniformMatrix4fv(rotation_uniform, 1, GL_FALSE, model_matrix[canvas->videoconfig->rotate]);
+
if (context->interlaced) {
glUniform1i(last_frame_uniform, 0);
glUniform1i(this_frame_uniform, 1);
@@ -760,7 +785,12 @@
float viewport_aspect;
float emulated_aspect;
- viewport_aspect = (float)context->native_view_width / (float)context->native_view_height;
+ if (canvas->videoconfig->rotate) {
+ /* rotate aspect 90 degr too */
+ viewport_aspect = (float)context->native_view_height / (float)context->native_view_width;
+ } else {
+ viewport_aspect = (float)context->native_view_width / (float)context->native_view_height;
+ }
emulated_aspect = (float)context->current_frame_width / (float)context->current_frame_height;
if (canvas->videoconfig->aspect_mode == VIDEO_ASPECT_MODE_TRUE) {
Modified: trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-20 19:42:12 UTC (rev 45779)
+++ trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-21 15:41:29 UTC (rev 45780)
@@ -81,8 +81,9 @@
"Rotate 90\u00b0",
chip);
/* grey out rotate option, remove this once it's implemented in the renderer */
+#ifdef WINDOWS_COMPILE
gtk_widget_set_sensitive(rotate, 0);
-
+#endif
gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(grid), flip_x, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(grid), flip_y, 0, 2, 1, 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-09-20 19:42:14
|
Revision: 45779
http://sourceforge.net/p/vice-emu/code/45779
Author: gpz
Date: 2025-09-20 19:42:12 +0000 (Sat, 20 Sep 2025)
Log Message:
-----------
enable flipx/flipy in the directx renderer
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/directx_renderer_impl.cc
trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
Modified: trunk/vice/src/arch/gtk3/directx_renderer_impl.cc
===================================================================
--- trunk/vice/src/arch/gtk3/directx_renderer_impl.cc 2025-09-20 17:25:52 UTC (rev 45778)
+++ trunk/vice/src/arch/gtk3/directx_renderer_impl.cc 2025-09-20 19:42:12 UTC (rev 45779)
@@ -505,6 +505,7 @@
bool interlaced;
int vsync = canvas->videoconfig->vsync;
int filter = canvas->videoconfig->glfilter;
+ int flipidx = canvas->videoconfig->flipx | (canvas->videoconfig->flipy << 1);
DXGI_PRESENT_PARAMETERS present_parameters = { 0 };
if (job == render_thread_init) {
@@ -599,12 +600,46 @@
)
);
- context->d2d_device_context->SetTransform(
- D2D1::Matrix3x2F::Translation(
- context->render_dest_rect.left,
- context->render_dest_rect.top
- )
- );
+ /* FIXME: add support for rotate */
+
+ switch (flipidx) {
+ default:
+ case 0:
+ context->d2d_device_context->SetTransform(
+ D2D1::Matrix3x2F::Translation(
+ context->render_dest_rect.left,
+ context->render_dest_rect.top
+ )
+ );
+ break;
+ case 1:
+ context->d2d_device_context->SetTransform(
+ D2D1::Matrix3x2F(-1,0,0,1,0,0) *
+ D2D1::Matrix3x2F::Translation(
+ context->render_dest_rect.right,
+ context->render_dest_rect.top
+ )
+ );
+ break;
+ case 2:
+ context->d2d_device_context->SetTransform(
+ D2D1::Matrix3x2F(1,0,0,-1,0,0) *
+ D2D1::Matrix3x2F::Translation(
+ context->render_dest_rect.left,
+ context->render_dest_rect.bottom
+ )
+ );
+ break;
+ case 3:
+ context->d2d_device_context->SetTransform(
+ D2D1::Matrix3x2F(-1,0,0,-1,0,0) *
+ D2D1::Matrix3x2F::Translation(
+ context->render_dest_rect.right,
+ context->render_dest_rect.bottom
+ )
+ );
+ break;
+ }
context->d2d_device_context->DrawImage(context->d2d_effect_scale);
result = context->d2d_device_context->EndDraw();
Modified: trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-20 17:25:52 UTC (rev 45778)
+++ trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-20 19:42:12 UTC (rev 45779)
@@ -80,15 +80,9 @@
rotate = vice_gtk3_resource_check_button_new_sprintf("%sRotate",
"Rotate 90\u00b0",
chip);
- /* grey out the options, remove this once it's implemented in the renderer */
-#if defined(WINDOWS_COMPILE)
- /* flipx/flipy works on opengl */
- gtk_widget_set_sensitive(flip_x, 0);
- gtk_widget_set_sensitive(flip_y, 0);
-#endif
-#if 1
+ /* grey out rotate option, remove this once it's implemented in the renderer */
gtk_widget_set_sensitive(rotate, 0);
-#endif
+
gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(grid), flip_x, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(grid), flip_y, 0, 2, 1, 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-09-20 17:25:54
|
Revision: 45778
http://sourceforge.net/p/vice-emu/code/45778
Author: gpz
Date: 2025-09-20 17:25:52 +0000 (Sat, 20 Sep 2025)
Log Message:
-----------
implement support for flipx/flipy in the open-gl renderer for gtk
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/directx_renderer_impl.cc
trunk/vice/src/arch/gtk3/opengl_renderer.c
trunk/vice/src/arch/gtk3/opengl_renderer_unix.c
trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
Modified: trunk/vice/src/arch/gtk3/directx_renderer_impl.cc
===================================================================
--- trunk/vice/src/arch/gtk3/directx_renderer_impl.cc 2025-09-18 16:49:44 UTC (rev 45777)
+++ trunk/vice/src/arch/gtk3/directx_renderer_impl.cc 2025-09-20 17:25:52 UTC (rev 45778)
@@ -236,14 +236,14 @@
if (!context->d3d_swap_chain) {
DXGI_SWAP_CHAIN_DESC1 swap_chain_desc = { 0 };
- swap_chain_desc.Width = 0; // use automatic sizing
+ swap_chain_desc.Width = 0; /* use automatic sizing */
swap_chain_desc.Height = 0;
- swap_chain_desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // this is the most common swapchain format
+ swap_chain_desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; /* this is the most common swapchain format */
swap_chain_desc.Stereo = false;
- swap_chain_desc.SampleDesc.Count = 1; // don't use multi-sampling
+ swap_chain_desc.SampleDesc.Count = 1; /* don't use multi-sampling */
swap_chain_desc.SampleDesc.Quality = 0;
swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
- swap_chain_desc.BufferCount = 2; // use double buffering to enable flip
+ swap_chain_desc.BufferCount = 2; /* use double buffering to enable flip */
swap_chain_desc.Scaling = DXGI_SCALING_STRETCH;
swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
swap_chain_desc.Flags = 0;
@@ -264,7 +264,7 @@
return;
}
- // Ensure that DXGI doesn't queue more than one frame at a time.
+ /* Ensure that DXGI doesn't queue more than one frame at a time. */
context->dxgi_device->SetMaximumFrameLatency(1);
}
@@ -387,8 +387,7 @@
bitmap_properies,
&context->render_bitmap);
- if (FAILED(result))
- {
+ if (FAILED(result)) {
vice_directx_impl_log_windows_error("CreateBitmap1");
return;
}
Modified: trunk/vice/src/arch/gtk3/opengl_renderer.c
===================================================================
--- trunk/vice/src/arch/gtk3/opengl_renderer.c 2025-09-18 16:49:44 UTC (rev 45777)
+++ trunk/vice/src/arch/gtk3/opengl_renderer.c 2025-09-20 17:25:52 UTC (rev 45778)
@@ -89,35 +89,20 @@
1.0f, -1.0f, 0.0f, 1.0f,
-1.0f, 1.0f, 0.0f, 1.0f,
1.0f, 1.0f, 0.0f, 1.0f,
-/* normal */
+ /* normal */
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f
-#if 0
-/* xflip */
- 1.0f, 1.0f,
- 0.0f, 1.0f,
- 1.0f, 0.0f,
- 0.0f, 0.0f,
-/* yflip */
- 0.0f, 0.0f,
- 1.0f, 0.0f,
- 0.0f, 1.0f,
- 1.0f, 1.0f,
-/* xyflip (180 degr rot) */
- 1.0f, 0.0f,
- 0.0f, 0.0f,
- 1.0f, 1.0f,
- 0.0f, 1.0f,
-/* 90 degr rot */
- 1.0f, 1.0f,
- 1.0f, 0.0f,
- 0.0f, 1.0f,
- 0.0f, 0.0f,
-#endif
};
+static const float vertexDataPatches[4][8] = {
+ { 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f }, /* normal */
+ { 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f }, /* flip x */
+ { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,}, /* flip y */
+ { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }, /* flip x & y */
+};
+
/**/
static void vice_opengl_initialise_canvas(video_canvas_t *canvas)
@@ -197,7 +182,12 @@
glGenBuffers(1, &context->vbo);
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
+#if 0
+ /* FIXME: we should really do flipx/flipy in the shader instead */
glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_STATIC_DRAW);
+#else
+ glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_DYNAMIC_DRAW);
+#endif
glBindBuffer(GL_ARRAY_BUFFER, 0);
glGenVertexArrays(1, &context->vao);
}
@@ -217,7 +207,6 @@
/* Due to the weird inverted native co-ordinates on macOS, we also need to layout when the window size changes */
g_signal_connect_unlocked(gtk_widget_get_toplevel(canvas->event_box), "size-allocate", G_CALLBACK(on_top_level_widget_resized), canvas);
#endif
-
CANVAS_UNLOCK();
}
@@ -529,17 +518,25 @@
int filter;
GLuint gl_filter;
+ int flipidx;
- float u1 = 0.0f;
- float v1 = 0.0f;
- float u2 = 1.0f;
- float v2 = 1.0f;
+ float u1;
+ float v1;
+ float u2;
+ float v2;
vice_opengl_renderer_context_t *context = (vice_opengl_renderer_context_t *)canvas->renderer_context;
filter = canvas->videoconfig->glfilter;
- /* FIXME: add support for flipx/flipy/rotate */
+ /* FIXME: add support for rotate */
+ /* update texture coords according to flipx/flipy */
+ flipidx = canvas->videoconfig->flipx | (canvas->videoconfig->flipy << 1);
+ u1 = vertexDataPatches[flipidx][4];
+ v1 = vertexDataPatches[flipidx][5];
+ u2 = vertexDataPatches[flipidx][2];
+ v2 = vertexDataPatches[flipidx][3];
+
/* We only support builtin linear and nearest on legacy OpenGL contexts */
gl_filter = filter ? GL_LINEAR : GL_NEAREST;
@@ -594,6 +591,8 @@
/* Used when OpenGL 3.2+ is available */
int filter;
+ int flipidx;
+ static int flipidxlast;
GLint gl_filter;
GLuint program;
@@ -608,8 +607,14 @@
vice_opengl_renderer_context_t *context = (vice_opengl_renderer_context_t *)canvas->renderer_context;
filter = canvas->videoconfig->glfilter;
- /* FIXME: add support for flipx/flipy/rotate */
+ /* FIXME: add support for rotate */
+ /* update texture coords according to flipx/flipy */
+ flipidx = canvas->videoconfig->flipx | (canvas->videoconfig->flipy << 1);
+ if (flipidxlast != flipidx) {
+ memcpy(&vertexData[16], &vertexDataPatches[flipidx], sizeof(float) * 8);
+ }
+
/* For shader filters, we start with nearest neighbor. So only use linear if directly requested. */
gl_filter = (filter == VIDEO_GLFILTER_BILINEAR) ? GL_LINEAR : GL_NEAREST;
@@ -644,6 +649,13 @@
glDisable(GL_BLEND);
glBindVertexArray(context->vao);
glBindBuffer(GL_ARRAY_BUFFER, context->vbo);
+
+ if (flipidxlast != flipidx) {
+ glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertexData), vertexData);
+ }
+
+ flipidxlast = flipidx;
+
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(position_attribute, 4, GL_FLOAT, GL_FALSE, 0, 0);
Modified: trunk/vice/src/arch/gtk3/opengl_renderer_unix.c
===================================================================
--- trunk/vice/src/arch/gtk3/opengl_renderer_unix.c 2025-09-18 16:49:44 UTC (rev 45777)
+++ trunk/vice/src/arch/gtk3/opengl_renderer_unix.c 2025-09-20 17:25:52 UTC (rev 45778)
@@ -38,6 +38,9 @@
#include "log.h"
#include "render_queue.h"
+/* for testing, undefine to use legacy renderer even with 3.2+ */
+/*#define FORCE_LEGACY_RENDERER*/
+
extern log_t opengl_log;
#define CANVAS_LOCK() pthread_mutex_lock(context->canvas_lock_ptr)
@@ -179,9 +182,8 @@
* Check for the GLX_ARB_create_context extension string and the function.
* If either is not present, use GLX 1.3 context creation method.
*/
-
if (!isExtensionSupported(glx_extensions, "GLX_ARB_create_context") || !vice_glXCreateContextAttribsARB) {
- /* Legact context -- TODO, actually support using this */
+ /* Legacy context -- TODO, actually support using this */
PFNGLXCREATENEWCONTEXTPROC vice_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC)glXGetProcAddressARB((const GLubyte *)"glXCreateNewContext");
context->gl_context = vice_glXCreateNewContext(context->x_display, framebuffer_config, GLX_RGBA_TYPE, NULL, True);
} else {
@@ -189,7 +191,11 @@
int context_attribs[] =
{
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+#ifdef FORCE_LEGACY_RENDERER
+ GLX_CONTEXT_MINOR_VERSION_ARB, 1,
+#else
GLX_CONTEXT_MINOR_VERSION_ARB, 2,
+#endif
None
};
@@ -225,7 +231,12 @@
vice_opengl_renderer_make_current(context);
glewInit();
+#ifdef FORCE_LEGACY_RENDERER
+ major = 3;
+ minor = 1;
+#else
sscanf((const char *)glGetString(GL_VERSION), "%d.%d", &major, &minor);
+#endif
/* Anything less than OpenGL 3.2 will use the legacy renderer */
context->gl_context_is_legacy = major < 3 || (major == 3 && minor < 2);
Modified: trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-18 16:49:44 UTC (rev 45777)
+++ trunk/vice/src/arch/gtk3/widgets/canvasrendermirrorwidget.c 2025-09-20 17:25:52 UTC (rev 45778)
@@ -80,10 +80,13 @@
rotate = vice_gtk3_resource_check_button_new_sprintf("%sRotate",
"Rotate 90\u00b0",
chip);
-#if 1
/* grey out the options, remove this once it's implemented in the renderer */
+#if defined(WINDOWS_COMPILE)
+ /* flipx/flipy works on opengl */
gtk_widget_set_sensitive(flip_x, 0);
gtk_widget_set_sensitive(flip_y, 0);
+#endif
+#if 1
gtk_widget_set_sensitive(rotate, 0);
#endif
gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-09-18 16:49:48
|
Revision: 45777
http://sourceforge.net/p/vice-emu/code/45777
Author: gpz
Date: 2025-09-18 16:49:44 +0000 (Thu, 18 Sep 2025)
Log Message:
-----------
sync resid sliders in vsync main window with sid engine selection
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_model.c
trunk/vice/src/arch/gtk3/widgets/sidsoundwidget.c
trunk/vice/src/arch/gtk3/widgets/vsidmixerwidget.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_model.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_model.c 2025-09-18 16:47:42 UTC (rev 45776)
+++ trunk/vice/src/arch/gtk3/widgets/settings_model.c 2025-09-18 16:49:44 UTC (rev 45777)
@@ -1688,6 +1688,7 @@
gtk_grid_attach(GTK_GRID(grid), video_widget, 1, 0, 1, 1);
sid_widget = sid_model_widget_create(machine_widget);
+ /*sid_model_widget_set_callback(sid_widget, sid_model_callback);*/
gtk_grid_attach(GTK_GRID(grid), sid_widget, 0, 0, 1, 1);
return grid;
}
Modified: trunk/vice/src/arch/gtk3/widgets/sidsoundwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/sidsoundwidget.c 2025-09-18 16:47:42 UTC (rev 45776)
+++ trunk/vice/src/arch/gtk3/widgets/sidsoundwidget.c 2025-09-18 16:49:44 UTC (rev 45777)
@@ -62,6 +62,7 @@
#include "sid.h"
#include "sidenginemodelwidget.h"
#include "sound.h"
+#include "vsidmixerwidget.h"
#include "vice_gtk3.h"
#include "sidsoundwidget.h"
@@ -286,6 +287,10 @@
gtk_widget_set_sensitive(resid_6581_grid, is_resid);
gtk_widget_set_sensitive(resid_8580_grid, is_resid);
gtk_widget_set_sensitive(resid_sampling, is_resid);
+
+ if (machine_class == VICE_MACHINE_VSID) {
+ vsid_mixer_widget_update();
+ }
}
/** \brief Create widget to control ReSID sampling method
Modified: trunk/vice/src/arch/gtk3/widgets/vsidmixerwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/vsidmixerwidget.c 2025-09-18 16:47:42 UTC (rev 45776)
+++ trunk/vice/src/arch/gtk3/widgets/vsidmixerwidget.c 2025-09-18 16:49:44 UTC (rev 45777)
@@ -104,6 +104,8 @@
static int old_sid_model = -1;
static int new_sid_model = -1;
+static int old_sid_engine = -1;
+static int new_sid_engine = -1;
/** \brief Handler for the 'destroy' event of the mixer widget
*
@@ -354,12 +356,24 @@
void vsid_mixer_widget_update(void)
{
#ifdef HAVE_RESID
+ resources_get_int("SidEngine", &new_sid_engine);
resources_get_int("SidModel", &new_sid_model);
+ debug_gtk3("old engine = %d, new engine = %d", old_sid_engine, new_sid_engine);
debug_gtk3("old model = %d, new model = %d", old_sid_model, new_sid_model);
- if (new_sid_model != old_sid_model) {
- debug_gtk3("model has changed: updating scale widgets");
- old_sid_model = new_sid_model;
+ if ((new_sid_engine != old_sid_engine) ||
+ (new_sid_model != old_sid_model)) {
+ debug_gtk3("engine or model has changed: updating scale widgets");
add_resid_scales(main_grid, 1, new_sid_model);
+ gtk_widget_set_sensitive(main_grid, (new_sid_engine == SID_ENGINE_RESID));
+#if 0
+ if (new_sid_engine == SID_ENGINE_RESID) {
+ gtk_widget_show_all(main_grid);
+ } else {
+ gtk_widget_hide(main_grid);
+ }
+#endif
}
+ old_sid_engine = new_sid_engine;
+ old_sid_model = new_sid_model;
#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-09-18 16:47:44
|
Revision: 45776
http://sourceforge.net/p/vice-emu/code/45776
Author: gpz
Date: 2025-09-18 16:47:42 +0000 (Thu, 18 Sep 2025)
Log Message:
-----------
fix warning
Modified Paths:
--------------
trunk/vice/src/c64/vsid-stubs.c
Modified: trunk/vice/src/c64/vsid-stubs.c
===================================================================
--- trunk/vice/src/c64/vsid-stubs.c 2025-09-18 11:55:35 UTC (rev 45775)
+++ trunk/vice/src/c64/vsid-stubs.c 2025-09-18 16:47:42 UTC (rev 45776)
@@ -37,6 +37,9 @@
#include "c64mem.h"
#include "c64-cmdline-options.h"
#include "c64_256k.h"
+#ifdef HAVE_EXPERIMENTAL_DEVICES
+#include "c64_diag_586220_harness.h"
+#endif
#include "cartridge.h"
#include "cbmdos.h"
#include "cia.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-09-18 11:55:37
|
Revision: 45775
http://sourceforge.net/p/vice-emu/code/45775
Author: gpz
Date: 2025-09-18 11:55:35 +0000 (Thu, 18 Sep 2025)
Log Message:
-----------
do not continue execution in jammed state when the value at the original jam location changes, see testprogs/CPU/cpujam/unjam.prg
Modified Paths:
--------------
trunk/vice/src/6510core.c
trunk/vice/src/6510dtvcore.c
Modified: trunk/vice/src/6510core.c
===================================================================
--- trunk/vice/src/6510core.c 2025-09-18 10:54:30 UTC (rev 45774)
+++ trunk/vice/src/6510core.c 2025-09-18 11:55:35 UTC (rev 45775)
@@ -2358,7 +2358,25 @@
SET_LAST_ADDR(reg_pc);
- FETCH_OPCODE(opcode);
+ /* HACK: The real CPU would stop fetching opcodes all together when
+ * "jammed" - however, our code may rely on FETCH_OPCODE being called
+ * here, so we can not simply skip it. What we do instead is remembering
+ * the opcode fetched when not jammed and force it when jammed.
+ * This is needed so the CPU would not continue executing opcodes when
+ * the value at the original jam location changed to a non-jam, for
+ * whatever reason.
+ */
+ {
+ static uint8_t lastop;
+ FETCH_OPCODE(opcode);
+ if (!CPU_IS_JAMMED) {
+ /* remember current opcode */
+ lastop = p0;
+ } else {
+ /* set opcode that made the cpu jam */
+ SET_OPCODE(lastop);
+ }
+ }
#ifdef FEATURE_CPUMEMHISTORY
#ifndef DRIVE_CPU
Modified: trunk/vice/src/6510dtvcore.c
===================================================================
--- trunk/vice/src/6510dtvcore.c 2025-09-18 10:54:30 UTC (rev 45774)
+++ trunk/vice/src/6510dtvcore.c 2025-09-18 11:55:35 UTC (rev 45775)
@@ -1775,7 +1775,25 @@
SET_LAST_ADDR(reg_pc);
- FETCH_OPCODE(opcode);
+ /* HACK: The real CPU would stop fetching opcodes all together when
+ * "jammed" - however, our code may rely on FETCH_OPCODE being called
+ * here, so we can not simply skip it. What we do instead is remembering
+ * the opcode fetched when not jammed and force it when jammed.
+ * This is needed so the CPU would not continue executing opcodes when
+ * the value at the original jam location changed to a non-jam, for
+ * whatever reason.
+ */
+ {
+ static uint8_t lastop;
+ FETCH_OPCODE(opcode);
+ if (!CPU_IS_JAMMED) {
+ /* remember current opcode */
+ lastop = p0;
+ } else {
+ /* set opcode that made the cpu jam */
+ SET_OPCODE(lastop);
+ }
+ }
#ifdef FEATURE_CPUMEMHISTORY
/* If reg_pc >= bank_limit then JSR (0x20) hasn't load p2 yet.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|