vice-emu-commit Mailing List for VICE (Page 15)
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
(28) |
Nov
(12) |
Dec
|
|
From: <gp...@us...> - 2025-02-02 18:20:15
|
Revision: 45470
http://sourceforge.net/p/vice-emu/code/45470
Author: gpz
Date: 2025-02-02 18:20:13 +0000 (Sun, 02 Feb 2025)
Log Message:
-----------
disable debug output
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/kbd.c
Modified: trunk/vice/src/arch/gtk3/kbd.c
===================================================================
--- trunk/vice/src/arch/gtk3/kbd.c 2025-01-31 21:44:29 UTC (rev 45469)
+++ trunk/vice/src/arch/gtk3/kbd.c 2025-02-02 18:20:13 UTC (rev 45470)
@@ -29,7 +29,7 @@
*
*/
-#define HAVE_DEBUG_GTK3UI
+/* #define HAVE_DEBUG_GTK3UI */
#include "vice.h"
@@ -54,7 +54,7 @@
/** \brief Enable debug_gtk3() calls for the Gdk scancode/keypad fixes
*/
-#define DEBUG_GDK_FIXES
+/* #define DEBUG_GDK_FIXES */
/** \brief Gdk keyval translation table array indexes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-31 21:44:31
|
Revision: 45469
http://sourceforge.net/p/vice-emu/code/45469
Author: rhialto
Date: 2025-01-31 21:44:29 +0000 (Fri, 31 Jan 2025)
Log Message:
-----------
Another case of PET empty space reading.
Fix a confusing case of the size of the "I/O peek through" for the 8096 expansion. Add some comments why.
Fix access to 8800-8FFF colour memory from the Vice monitor in the case of ColourPET.
Modified Paths:
--------------
trunk/vice/src/pet/petmem.c
Modified: trunk/vice/src/pet/petmem.c
===================================================================
--- trunk/vice/src/pet/petmem.c 2025-01-28 20:21:31 UTC (rev 45468)
+++ trunk/vice/src/pet/petmem.c 2025-01-31 21:44:29 UTC (rev 45469)
@@ -635,7 +635,7 @@
static uint8_t read_super_io(uint16_t addr)
{
if (addr >= 0xeff4) { /* unused / readonly */
- return last_access;
+ return read_unused(addr);
} else if (addr >= 0xeff0) { /* ACIA */
last_access = acia1_read((uint16_t)(addr & 0x03));
} else if ((addr & 0x0010) == 0) {
@@ -650,9 +650,10 @@
#endif /* DEBUG_DONGLE */
} else {
last_access = 0xff;
+ return last_access;
}
}
- return last_access; /* fallback */
+ return read_unused(addr); /* fallback */
}
static void store_super_io(uint16_t addr, uint8_t value)
@@ -1058,8 +1059,11 @@
ramE8 = petres.ramselA && !(petmem_map_reg & FFF0_IO_PEEK_THROUGH);
ramF = petres.ramselA;
/*
- * XXX: If there is no I/O peek through, how can we write
+ * In this case the window of the I/O peek through is
+ * E800-E8FF. See note [1].
+ * Q: If there is no I/O peek through, how can we write
* again to the E888 register to restore I/O?
+ * A: FFF0 is always writable so you can enable I/O peek through.
*/
} else {
ram9 = petres.ramsel9;
@@ -1275,6 +1279,22 @@
* The register is write-only, and the value is written through to the
* previously selected ram bank.
*
+ * Note [1]: The I/O-peek-through in expansion memory is active for
+ * E800-EFFF. UE5, FPLA II, has only the 5 top address bits available to
+ * make its decisions. Since the original 64K board used /NO_ROM to
+ * disable the ROMs (it is directly connected to CS2 on the ROM chips),
+ * it would blend out the Editor ROM even if you had an extended one. So
+ * E900-EFFF would be either empty space, or extra I/O chips, but not
+ * ROM.
+ * But also in the 8296, the I/O peek through seems to be only 256
+ * bytes. UE6, FPLA I, has more address bits and uses /NOIO (=CR6) and
+ * NOROM (=CR7) too. This is for accessing the extra 32 KB of "main"
+ * memory when CR7 = 0.
+ * So, if CR7 = 1, then the I/O peek through seems to be 2 KB.
+ * If CR7 = 0 (and petmem_ramON), then it is 256 bytes.
+ * Sources:
+ * http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/pet/8296/8296desc3.tar.gz
+ * http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/pet/8296/CBM8296_ServiceManual_DinA4_alle.pdf
*/
#define FFF0_BANK_C 0x08
@@ -1338,10 +1358,18 @@
bankCoffset = 0x8000 + ((value & FFF0_BANK_C) ? 0x8000 : 0);
for (l = 0xc0; l < 0x100; l++) {
if ((l == 0xe8) && (value & FFF0_IO_PEEK_THROUGH)) {
+ /* In this case the window of the I/O
+ * peek through is E800-EFFF. See note [1]. */
_mem_read_tab[l] = read_io_e8;
_mem_write_tab[l] = store_io_e8;
_mem_read_base_tab[l] = NULL;
mem_read_limit_tab[l] = 0;
+ } else if ((l >= 0xe9) && (l <= 0xef) &&
+ (value & FFF0_IO_PEEK_THROUGH)) {
+ _mem_read_tab[l] = read_io_e9_ef;
+ _mem_write_tab[l] = store_io_e9_ef;
+ _mem_read_base_tab[l] = NULL;
+ mem_read_limit_tab[l] = 0;
} else {
_mem_read_tab[l] = read_extC;
if (protected) {
@@ -1793,7 +1821,7 @@
}
/* FALL THROUGH */
case 0x00:
- return addr >> 8;
+ return addr >> 8; /* Empty space */
default: /* 0x30, 0x50, 0x60, 0x70, 0x90-0xf0 */
break;
}
@@ -1986,8 +2014,9 @@
/* is_peek_access = 0; FIXME */
return result;
}
- if (addr >= 0x8800 && addr < 0x9000) {
- return peek_io_88_8f(addr);
+ if (addr >= 0x8800 && addr < 0x9000 &&
+ pet_colour_type == PET_COLOUR_TYPE_OFF) {
+ return peek_io_88_8f(addr);
}
/* FALLS THROUGH TO normal read with side effects */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-28 20:21:33
|
Revision: 45468
http://sourceforge.net/p/vice-emu/code/45468
Author: rhialto
Date: 2025-01-28 20:21:31 +0000 (Tue, 28 Jan 2025)
Log Message:
-----------
Oops, fix previous. We want to see the value from the CRTC.
Modified Paths:
--------------
trunk/vice/src/pet/petmem.c
Modified: trunk/vice/src/pet/petmem.c
===================================================================
--- trunk/vice/src/pet/petmem.c 2025-01-28 20:14:43 UTC (rev 45467)
+++ trunk/vice/src/pet/petmem.c 2025-01-28 20:21:31 UTC (rev 45468)
@@ -898,7 +898,7 @@
break;
case 0x80: /* CRTC */
if (petres.model.crtc) {
- last_access = crtc_read(addr);
+ return last_access = crtc_read(addr);
} /* fall through */
case 0x00:
return addr >> 8; /* empty space */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-28 20:14:46
|
Revision: 45467
http://sourceforge.net/p/vice-emu/code/45467
Author: rhialto
Date: 2025-01-28 20:14:43 +0000 (Tue, 28 Jan 2025)
Log Message:
-----------
Also return empty space on E80x.
I found a test program that cares about this:
8032.mem.prg from https://www.zimmers.net/anonftp/pub/cbm/pet/utilities/
It tests the 64K memory expansion and wants to see empty space at E800 if the
"I/O peek through" is enabled:
.C:096d A9 CC LDA #$CC ; enabled; i/o peek though; bank 3 and 1; no w/p
.C:096f 8D F0 FF STA $FFF0
.C:0972 85 00 STA $00
.C:0974 AD 00 E8 LDA $E800 ; I/O area but no chip selected
.C:0977 C9 E8 CMP #$E8
.C:0979 F0 07 BEQ $0982
Modified Paths:
--------------
trunk/vice/src/pet/petmem.c
Modified: trunk/vice/src/pet/petmem.c
===================================================================
--- trunk/vice/src/pet/petmem.c 2025-01-26 12:52:22 UTC (rev 45466)
+++ trunk/vice/src/pet/petmem.c 2025-01-28 20:14:43 UTC (rev 45467)
@@ -901,7 +901,7 @@
last_access = crtc_read(addr);
} /* fall through */
case 0x00:
- return last_access;
+ return addr >> 8; /* empty space */
default: /* 0x30, 0x50, 0x60, 0x70, 0x90-0xf0 */
if (addr & 0x10) {
v1 = pia1_read(addr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-26 12:52:25
|
Revision: 45466
http://sourceforge.net/p/vice-emu/code/45466
Author: rhialto
Date: 2025-01-26 12:52:22 +0000 (Sun, 26 Jan 2025)
Log Message:
-----------
Use crtc.vaddr_mask_eff to mask colour memory offsets, since we use effective addresses here: not the ones direcly from the CRTC, but possibly times 2.
Modified Paths:
--------------
trunk/vice/src/pet/petcolour.c
Modified: trunk/vice/src/pet/petcolour.c
===================================================================
--- trunk/vice/src/pet/petcolour.c 2025-01-23 23:02:09 UTC (rev 45465)
+++ trunk/vice/src/pet/petcolour.c 2025-01-26 12:52:22 UTC (rev 45466)
@@ -60,10 +60,10 @@
int i;
#if DEBUG_GFX
- printf("DRAW_rgbi: xstart=%d, xend=%d, ymod8=%d, scr_rel=%04x\n", xstart, xend, ymod8, scr_rel);
+ printf("DRAW_rgbi: xstart=%d, xend=%d, ymod8=%d, scr_rel=%04x vaddr_mask_eff=%04x\n", xstart, xend, ymod8, scr_rel, crtc.vaddr_mask_eff);
#endif
for (i = xstart; i < xend; i++) {
- uint8_t colour = colour_ptr[scr_rel & crtc.vaddr_mask];
+ uint8_t colour = colour_ptr[scr_rel & crtc.vaddr_mask_eff];
uint8_t bg = (colour >> 4) & 0x0F;
uint8_t fg = colour & 0x0F;
@@ -92,7 +92,7 @@
printf("DRAW_analog: xstart=%d, xend=%d, ymod8=%d, scr_rel=%04x\n", xstart, xend, ymod8, scr_rel);
#endif
for (i = xstart; i < xend; i++) {
- uint8_t colour = colour_ptr[scr_rel & crtc.vaddr_mask];
+ uint8_t colour = colour_ptr[scr_rel & crtc.vaddr_mask_eff];
int pixel;
for (pixel = 0; pixel < 8; pixel++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-01-23 23:02:11
|
Revision: 45465
http://sourceforge.net/p/vice-emu/code/45465
Author: gpz
Date: 2025-01-23 23:02:09 +0000 (Thu, 23 Jan 2025)
Log Message:
-----------
move keyval fix magic into a public function and use it in the joystick keyset config dialog. should fix bug #2120. the hotkey code (and any other place that uses gtk keyval) needs a similar fix
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/kbd.c
trunk/vice/src/arch/gtk3/kbd.h
trunk/vice/src/arch/gtk3/widgets/keysetdialog.c
Modified: trunk/vice/src/arch/gtk3/kbd.c
===================================================================
--- trunk/vice/src/arch/gtk3/kbd.c 2025-01-23 20:44:12 UTC (rev 45464)
+++ trunk/vice/src/arch/gtk3/kbd.c 2025-01-23 23:02:09 UTC (rev 45465)
@@ -29,7 +29,7 @@
*
*/
-/* #define HAVE_DEBUG_GTK3UI */
+#define HAVE_DEBUG_GTK3UI
#include "vice.h"
@@ -54,7 +54,7 @@
/** \brief Enable debug_gtk3() calls for the Gdk scancode/keypad fixes
*/
-/* #define DEBUG_GDK_FIXES */
+#define DEBUG_GDK_FIXES
/** \brief Gdk keyval translation table array indexes
@@ -572,6 +572,37 @@
return keyval;
}
+/** \brief Fixup the GTK keycodes so they are the same on all OSs */
+/**
+ * \return fixed keyval (also modifies the value in the event)
+ */
+guint kbd_fix_keyval(GdkEvent *event)
+{
+ guint key = event->key.keyval;
+#ifdef WINDOWS_COMPILE
+# ifdef DEBUG_GDK_FIXES
+ debug_gtk3("key before numpad fix: 0x%04x (GDK_KEY_%s).",
+ (unsigned int)key, gdk_keyval_name(key));
+# endif
+ key = event->key.keyval = fix_numpad_keyval(event);
+# ifdef DEBUG_GDK_FIXES
+ debug_gtk3("key after numpad fix : 0x%04x (GDK_KEY_%s).",
+ (unsigned int)key, gdk_keyval_name(key));
+# endif
+#endif /* WINDOWS_COMPILE */
+
+#ifdef DEBUG_GDK_FIXES
+ debug_gtk3("key before aliases fix : 0x%04x (GDK_KEY_%s).",
+ (unsigned int)key, gdk_keyval_name(key));
+#endif
+ key = event->key.keyval = fix_numpad_aliases(event);
+#ifdef DEBUG_GDK_FIXES
+ debug_gtk3("key after aliases fix : 0x%04x (GDK_KEY_%s).",
+ (unsigned int)key, gdk_keyval_name(key));
+#endif
+ return key;
+}
+
/** \brief Gtk keyboard event handler
*
* \param[in] w widget triggering the event
@@ -614,26 +645,12 @@
report->key.keyval, report->key.state); */
#endif
-#ifdef WINDOWS_COMPILE
-# ifdef DEBUG_GDK_FIXES
- debug_gtk3("(press) key before numpad fix: 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-# endif
- key = report->key.keyval = fix_numpad_keyval(report);
#ifdef DEBUG_GDK_FIXES
- debug_gtk3("(press) key after numpad fix : 0x%04x (GDK_KEY_%s).",
+ debug_gtk3("(press) key: 0x%04x (GDK_KEY_%s).",
(unsigned int)key, gdk_keyval_name(key));
-# endif
#endif
-#ifdef DEBUG_GDK_FIXES
- debug_gtk3("(press) key before aliases fix : 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-#endif
- key = report->key.keyval = fix_numpad_aliases(report);
-#ifdef DEBUG_GDK_FIXES
- debug_gtk3("(press) key after aliases fix : 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-#endif
+ key = kbd_fix_keyval(report);
+
/* FIXME: This still gets the unmodified keyval, but we cannot
* modify `report` since that's owned by Gdk.
*/
@@ -695,26 +712,12 @@
report->key.keyval, report->key.state); */
#endif
-#ifdef WINDOWS_COMPILE
-# ifdef DEBUG_GDK_FIXES
- debug_gtk3("(release) key before numpad fix: 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-# endif
- key = report->key.keyval = fix_numpad_keyval(report);
-# ifdef DEBUG_GDK_FIXES
- debug_gtk3("(release) key after numpad fix : 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-# endif
-#endif
#ifdef DEBUG_GDK_FIXES
- debug_gtk3("(release) key before aliases fix : 0x%04x (GDK_KEY_%s).",
+ debug_gtk3("(release) key: 0x%04x (GDK_KEY_%s).",
(unsigned int)key, gdk_keyval_name(key));
#endif
- key = report->key.keyval = fix_numpad_aliases(report);
-#ifdef DEBUG_GDK_FIXES
- debug_gtk3("(release) key after aliases fix : 0x%04x (GDK_KEY_%s).",
- (unsigned int)key, gdk_keyval_name(key));
-#endif
+ key = kbd_fix_keyval(report);
+
ui_statusbar_update_kbd_debug(report);
if (removepressedkey(report, &key, &mod)) {
Modified: trunk/vice/src/arch/gtk3/kbd.h
===================================================================
--- trunk/vice/src/arch/gtk3/kbd.h 2025-01-23 20:44:12 UTC (rev 45464)
+++ trunk/vice/src/arch/gtk3/kbd.h 2025-01-23 23:02:09 UTC (rev 45465)
@@ -65,4 +65,10 @@
*/
const char *kbd_get_menu_keyname(void);
+/** \brief Fixup the GTK keycodes so they are the same on all OSs */
+/**
+ * \return fixed keyval (also modifies the value in the event)
+ */
+guint kbd_fix_keyval(GdkEvent *event);
+
#endif
Modified: trunk/vice/src/arch/gtk3/widgets/keysetdialog.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/keysetdialog.c 2025-01-23 20:44:12 UTC (rev 45464)
+++ trunk/vice/src/arch/gtk3/widgets/keysetdialog.c 2025-01-23 23:02:09 UTC (rev 45465)
@@ -70,6 +70,7 @@
#include "resources.h"
#include "widgethelpers.h"
#include "ui.h"
+#include "kbd.h"
#include "keysetdialog.h"
@@ -194,7 +195,7 @@
{
int row;
int col;
- guint key = event->keyval;
+ guint key = kbd_fix_keyval((GdkEvent*)event);
/* don't accept Alt keys */
if (key == GDK_KEY_Alt_L || key == GDK_KEY_Alt_R) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-23 20:44:14
|
Revision: 45464
http://sourceforge.net/p/vice-emu/code/45464
Author: rhialto
Date: 2025-01-23 20:44:12 +0000 (Thu, 23 Jan 2025)
Log Message:
-----------
Restore behaviour for access to open space: the high byte of the address is read.
Modified Paths:
--------------
trunk/vice/src/pet/petmem.c
Modified: trunk/vice/src/pet/petmem.c
===================================================================
--- trunk/vice/src/pet/petmem.c 2025-01-23 20:41:58 UTC (rev 45463)
+++ trunk/vice/src/pet/petmem.c 2025-01-23 20:44:12 UTC (rev 45464)
@@ -297,7 +297,7 @@
uint8_t read_unused(uint16_t addr)
{
- return last_access;
+ return addr >> 8;
}
static uint8_t read_io_88_8f(uint16_t addr)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-01-23 20:42:00
|
Revision: 45463
http://sourceforge.net/p/vice-emu/code/45463
Author: rhialto
Date: 2025-01-23 20:41:58 +0000 (Thu, 23 Jan 2025)
Log Message:
-----------
In ColourPET and lower case mode, also fill in the colour of the extra 2 lines of the characters. This will be the background colour of the character "above".
This conforms to what the real hardware does.
>From discussion with Steve Gray.
Modified Paths:
--------------
trunk/vice/src/pet/petcolour.c
Modified: trunk/vice/src/pet/petcolour.c
===================================================================
--- trunk/vice/src/pet/petcolour.c 2025-01-13 20:39:04 UTC (rev 45462)
+++ trunk/vice/src/pet/petcolour.c 2025-01-23 20:41:58 UTC (rev 45463)
@@ -55,7 +55,7 @@
*/
static void DRAW_rgbi(uint8_t *p, int xstart, int xend, int scr_rel, int ymod8)
{
- if (ymod8 < 8 && xstart < xend) {
+ if (xstart < xend) {
uint8_t *colour_ptr = crtc.screen_base + COLOUR_MEMORY_START;
int i;
@@ -84,7 +84,7 @@
static void DRAW_analog(uint8_t *p, int xstart, int xend, int scr_rel, int ymod8)
{
- if (ymod8 < 8 && xstart < xend) {
+ if (xstart < xend) {
uint8_t *colour_ptr = crtc.screen_base + COLOUR_MEMORY_START;
int i;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-13 20:39:06
|
Revision: 45462
http://sourceforge.net/p/vice-emu/code/45462
Author: compyx
Date: 2025-01-13 20:39:04 +0000 (Mon, 13 Jan 2025)
Log Message:
-----------
Gtk3: Properly set RAMLink enable check button if enabled
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c 2025-01-12 22:24:28 UTC (rev 45461)
+++ trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c 2025-01-13 20:39:04 UTC (rev 45462)
@@ -196,6 +196,8 @@
* depends on whether a BIOS image file is specified
*/
enable = gtk_check_button_new_with_label("Enable " CARTRIDGE_NAME_RAMLINK " emulation");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enable),
+ cartridge_type_enabled(CARTRIDGE_RAMLINK));
g_signal_connect(G_OBJECT(enable),
"toggled",
G_CALLBACK(on_enable_toggled),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-12 22:24:29
|
Revision: 45461
http://sourceforge.net/p/vice-emu/code/45461
Author: compyx
Date: 2025-01-12 22:24:28 +0000 (Sun, 12 Jan 2025)
Log Message:
-----------
Gtk3: Don't require a memory image file for RAMLink emulation check button
The RAMLink emulation functions without a RAM image file present, so the logic
checking for a RAM image file in the "Enable" check button handling has been
removed.
(See bug #2119)
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c 2025-01-10 12:04:14 UTC (rev 45460)
+++ trunk/vice/src/arch/gtk3/widgets/settings_ramlink.c 2025-01-12 22:24:28 UTC (rev 45461)
@@ -187,25 +187,16 @@
GtkWidget *size;
GtkWidget *wrapper;
int row = 0;
- const char *image = NULL;
- int cart_enabled;
- resources_get_string("RAMLINKfilename", &image);
- cart_enabled = cartridge_type_enabled(CARTRIDGE_RAMLINK);
-
grid = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(grid), 16);
/* create 'enable ramlink' checkbox */
/* we can't use a `resource_check_button` here, since toggling the resource
- * depends on whether an image file is specified
+ * depends on whether a BIOS image file is specified
*/
enable = gtk_check_button_new_with_label("Enable " CARTRIDGE_NAME_RAMLINK " emulation");
- /* only set state to true if both the state is true and an image is given */
- if (cart_enabled && (image != NULL && *image != '\0')) {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enable), TRUE);
- }
- g_signal_connect(enable,
+ g_signal_connect(G_OBJECT(enable),
"toggled",
G_CALLBACK(on_enable_toggled),
NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-10 12:04:16
|
Revision: 45460
http://sourceforge.net/p/vice-emu/code/45460
Author: compyx
Date: 2025-01-10 12:04:14 +0000 (Fri, 10 Jan 2025)
Log Message:
-----------
Fix typo
Modified Paths:
--------------
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-10 11:24:41 UTC (rev 45459)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-10 12:04:14 UTC (rev 45460)
@@ -598,7 +598,7 @@
}
/*log_printf("test_ffmpeg_executable pid:%d stdin:%d stdout:%d", test_pid, test_stdin, test_stdout);*/
#ifdef WINDOWS_COMPILE
- if (test_pid == VICE_PID_INVALDI) {
+ if (test_pid == VICE_PID_INVALID) {
log_error(ffmpeg_log, "Cannot fork ffmpeg process '%s' (pid == NULL).", command);
#else
if (test_pid <= 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-10 11:24:42
|
Revision: 45459
http://sourceforge.net/p/vice-emu/code/45459
Author: compyx
Date: 2025-01-10 11:24:41 +0000 (Fri, 10 Jan 2025)
Log Message:
-----------
Unbreak Windows build, hopefully
Introduce `VICE_PID_INVALID` constant to portably indicate an invalid pid.
Defined as -1 on Unix/MacOS, NULL on Windows (HANDLE is a typedef for void* on
Windows).
Modified Paths:
--------------
trunk/vice/src/arch/shared/coproc.h
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/arch/shared/coproc.h
===================================================================
--- trunk/vice/src/arch/shared/coproc.h 2025-01-10 11:10:18 UTC (rev 45458)
+++ trunk/vice/src/arch/shared/coproc.h 2025-01-10 11:24:41 UTC (rev 45459)
@@ -31,9 +31,11 @@
#if defined(WINDOWS_COMPILE)
#include <windows.h>
typedef HANDLE vice_pid_t;
+#define VICE_PID_INVALID NULL
#else
#include <sys/types.h>
typedef pid_t vice_pid_t;
+#define VICE_PID_INVALID -1
#endif
int fork_coproc(int *fd_wr, int *fd_rd, char *cmd, vice_pid_t *childpid);
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-10 11:10:18 UTC (rev 45458)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-10 11:24:41 UTC (rev 45459)
@@ -570,7 +570,7 @@
#else
static int test_stdin = -1;
static int test_stdout = -1;
- static vice_pid_t test_pid = -1;
+ static vice_pid_t test_pid = VICE_PID_INVALID;
int res = -1;
size_t n;
static char output[0x40];
@@ -578,9 +578,9 @@
"ffmpeg 2>&1" /* redirect stderr to stdout. this better works on the big 3 */
};
/* kill old process in case it is still running for whatever reason */
- if (test_pid != -1) {
+ if (test_pid != VICE_PID_INVALID) {
kill_coproc(test_pid);
- test_pid = -1;
+ test_pid = VICE_PID_INVALID;
}
if (test_stdin != -1) {
close(test_stdin);
@@ -597,8 +597,13 @@
goto testend;
}
/*log_printf("test_ffmpeg_executable pid:%d stdin:%d stdout:%d", test_pid, test_stdin, test_stdout);*/
+#ifdef WINDOWS_COMPILE
+ if (test_pid == VICE_PID_INVALDI) {
+ log_error(ffmpeg_log, "Cannot fork ffmpeg process '%s' (pid == NULL).", command);
+#else
if (test_pid <= 0) {
log_error(ffmpeg_log, "Cannot fork ffmpeg process '%s' (pid <= 0).", command);
+#endif
goto testend;
}
@@ -618,9 +623,9 @@
}
testend:
/* kill new process */
- if (test_pid != -1) {
+ if (test_pid != VICE_PID_INVALID) {
kill_coproc(test_pid);
- test_pid = -1;
+ test_pid = VICE_PID_INVALID;
}
if (test_stdin != -1) {
close(test_stdin);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-10 11:10:19
|
Revision: 45458
http://sourceforge.net/p/vice-emu/code/45458
Author: compyx
Date: 2025-01-10 11:10:18 +0000 (Fri, 10 Jan 2025)
Log Message:
-----------
Remove assigned-but-unused variable
Modified Paths:
--------------
trunk/vice/src/arch/shared/archdep_spawn.c
Modified: trunk/vice/src/arch/shared/archdep_spawn.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_spawn.c 2025-01-10 01:38:21 UTC (rev 45457)
+++ trunk/vice/src/arch/shared/archdep_spawn.c 2025-01-10 11:10:18 UTC (rev 45458)
@@ -125,7 +125,6 @@
return -1;
} else {
if (child_pid == 0) {
- int res;
/* child - CAUTION: log system does not work here */
if (stdout_redir && freopen(stdout_redir, "w", stdout) == NULL) {
stdout_errno = errno;
@@ -135,7 +134,7 @@
stderr_errno = errno;
_exit(-1);
}
- res = execvp(name, argv);
+ execvp(name, argv);
/* execvp should never return, except when there was some error */
_exit(-1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-01-10 01:38:26
|
Revision: 45457
http://sourceforge.net/p/vice-emu/code/45457
Author: gpz
Date: 2025-01-10 01:38:21 +0000 (Fri, 10 Jan 2025)
Log Message:
-----------
improve the test for whether ffmpeg executable exists, cycle through a port range when launching the executable, so ports that are still lingering will not block
Modified Paths:
--------------
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-09 23:38:17 UTC (rev 45456)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2025-01-10 01:38:21 UTC (rev 45457)
@@ -222,8 +222,10 @@
#define AUDIO_SKIP_SECONDS 4
-#define SOCKETS_VIDEO_PORT 60000
-#define SOCKETS_AUDIO_PORT 60001
+#define SOCKETS_RANGE_FIRST 53248
+#define SOCKETS_RANGE_LAST 57343
+static int current_video_port = SOCKETS_RANGE_FIRST;
+static int current_audio_port = SOCKETS_RANGE_FIRST + 1;
/* input video stream */
#define INPUT_VIDEO_BPP 3
@@ -436,6 +438,17 @@
DBG(("%s FFMPEGVideoHalveFramerate:%d", func, video_halve_framerate));
}
+static void prepare_port_numbers(void)
+{
+ current_video_port += 2;
+ current_audio_port += 2;
+ if (current_audio_port > SOCKETS_RANGE_LAST) {
+ current_video_port = SOCKETS_RANGE_FIRST;
+ current_audio_port = SOCKETS_RANGE_FIRST + 1;
+ }
+ log_message(ffmpeg_log, "prepare_port_numbers %d:%d", current_video_port, current_audio_port);
+}
+
static ssize_t write_video_frame(VIDEOFrame *pic)
{
ssize_t len = INPUT_VIDEO_BPP * video_height * video_width;
@@ -531,6 +544,7 @@
static int test_ffmpeg_executable(void)
{
+#if 0
int ret;
char *argv[5];
/* `exec*()' does not want these to be constant... */
@@ -547,11 +561,77 @@
lib_free(argv[2]);
lib_free(argv[3]);
+ /* NOTE: ffmpeg returns 1 (not 0) on success */
if (ret != 1) {
- log_error(ffmpeg_log, "ffmpeg executable can not be started.");
+ log_error(ffmpeg_log, "ffmpeg executable can not be started. (ret:%d)", ret);
return -1;
}
return 0;
+#else
+ static int test_stdin = -1;
+ static int test_stdout = -1;
+ static vice_pid_t test_pid = -1;
+ int res = -1;
+ size_t n;
+ static char output[0x40];
+ static char command[0x40] = {
+ "ffmpeg 2>&1" /* redirect stderr to stdout. this better works on the big 3 */
+ };
+ /* kill old process in case it is still running for whatever reason */
+ if (test_pid != -1) {
+ kill_coproc(test_pid);
+ test_pid = -1;
+ }
+ if (test_stdin != -1) {
+ close(test_stdin);
+ test_stdin = -1;
+ }
+ if (test_stdout != -1) {
+ close(test_stdout);
+ test_stdout = -1;
+ }
+ DBG(("test_ffmpeg_executable: '%s'", command));
+ /*log_printf("fork command:%s", command);*/
+ if (fork_coproc(&test_stdin, &test_stdout, command, &test_pid) < 0) {
+ log_error(ffmpeg_log, "Cannot fork ffmpeg process '%s'.", command);
+ goto testend;
+ }
+ /*log_printf("test_ffmpeg_executable pid:%d stdin:%d stdout:%d", test_pid, test_stdin, test_stdout);*/
+ if (test_pid <= 0) {
+ log_error(ffmpeg_log, "Cannot fork ffmpeg process '%s' (pid <= 0).", command);
+ goto testend;
+ }
+
+ /* FIXME: stdout is 0 on error ? */
+ if (test_stdout) {
+ memset(output, 0, 0x40);
+ n = read(test_stdout, output, 0x3f);
+ /*log_printf("test_ffmpeg_executable got: '%s'", output);*/
+ output[6] = 0;
+ if ((n >= 6) && !strcmp("ffmpeg", output)) {
+ res = 0;
+ /*log_printf("test_ffmpeg_executable tested ok");*/
+ }
+ }
+ if (res < 0) {
+ log_error(ffmpeg_log, "ffmpeg not found.\n");
+ }
+testend:
+ /* kill new process */
+ if (test_pid != -1) {
+ kill_coproc(test_pid);
+ test_pid = -1;
+ }
+ if (test_stdin != -1) {
+ close(test_stdin);
+ test_stdin = -1;
+ }
+ if (test_stdout != -1) {
+ close(test_stdout);
+ test_stdout = -1;
+ }
+ return res;
+#endif
}
static int start_ffmpeg_executable(void)
@@ -607,7 +687,7 @@
#endif
, fpsstring, fpsstring
, video_width, video_height
- , SOCKETS_VIDEO_PORT
+ , current_video_port
);
strcat(command, tempcommand);
}
@@ -629,7 +709,7 @@
, audio_input_channels
, audio_input_sample_rate
, AUDIO_SKIP_SECONDS
- , SOCKETS_AUDIO_PORT
+ , current_audio_port
);
strcat(command, tempcommand);
}
@@ -686,7 +766,7 @@
if ((video_has_codec > 0) && (video_codec != AV_CODEC_ID_NONE)) {
vice_network_socket_address_t *ad = NULL;
- ad = vice_network_address_generate("127.0.0.1", SOCKETS_VIDEO_PORT);
+ ad = vice_network_address_generate("127.0.0.1", current_video_port);
if (!ad) {
log_error(ffmpeg_log, "Bad device name.\n");
return -1;
@@ -722,7 +802,7 @@
if ((audio_has_codec > 0) && (audio_codec != AV_CODEC_ID_NONE)) {
vice_network_socket_address_t *ad = NULL;
- ad = vice_network_address_generate("127.0.0.1", SOCKETS_AUDIO_PORT);
+ ad = vice_network_address_generate("127.0.0.1", current_audio_port);
if (!ad) {
log_error(ffmpeg_log, "Bad device name.\n");
return -1;
@@ -858,6 +938,8 @@
ffmpeg_pid = 0;
}
#endif
+
+ prepare_port_numbers();
}
/*****************************************************************************
@@ -1155,12 +1237,18 @@
if (test_ffmpeg_executable() < 0) {
screenshot_stop_recording();
- ui_error("ffmpeg executable could not be started.");
- /* Do not return -1, since that would just pop up a second error message,
- which will eventually appear behind the main window, and make the UI
- seem to hang. We can do this, since there is no further error handling
- depending on the return value. */
- return 0;
+ sleep(1);
+ if (test_ffmpeg_executable() < 0) {
+ sleep(1);
+ if (test_ffmpeg_executable() < 0) {
+ ui_error("ffmpeg executable could not be started.");
+ /* Do not return -1, since that would just pop up a second error message,
+ which will eventually appear behind the main window, and make the UI
+ seem to hang. We can do this, since there is no further error handling
+ depending on the return value. */
+ return 0;
+ }
+ }
}
log_resource_values(__FUNCTION__);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-01-09 23:38:19
|
Revision: 45456
http://sourceforge.net/p/vice-emu/code/45456
Author: gpz
Date: 2025-01-09 23:38:17 +0000 (Thu, 09 Jan 2025)
Log Message:
-----------
some refactoring, comments, use fork() instead of vfork(), print log messages in parent context
Modified Paths:
--------------
trunk/vice/src/arch/shared/archdep_spawn.c
Modified: trunk/vice/src/arch/shared/archdep_spawn.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_spawn.c 2025-01-09 23:37:07 UTC (rev 45455)
+++ trunk/vice/src/arch/shared/archdep_spawn.c 2025-01-09 23:38:17 UTC (rev 45456)
@@ -28,6 +28,33 @@
*
*/
+/*
+ calls an external program, waits for it to finish, and returns status
+
+ name file name of external program
+ - If the name contains slashes ("/"), the program at the exact
+ location will be executed.
+ - else PATH will be used to search for the binary
+ argv array of pointers to arguments
+ The char *const argv[] argument is an array of pointers to null-terminated
+ strings that represent the argument list available to the new program.
+ The first argument, by convention, should point to the filename associated with
+ the file being executed. The array of pointers must be terminated by a null pointer.
+
+ pstdout_redir pointer to name of file to redirect stdout to
+ - if file name is empty, a temporary name will be created
+ - no redirection if NULL
+ stderr_redir name of file to redirect stderr to
+ - no redirection if NULL
+
+ returns: -1 on errors
+ any other returncode of the called process
+*/
+
+/* this code is currently used to spawn sub processes in:
+ src/zfile.c
+ src/arch/gtk3/actions-help.c (fallback for gtk_show_uri_on_window)
+*/
#include "vice.h"
#include "archdep_defs.h"
@@ -65,7 +92,7 @@
/* #define DEBUG_SPAWN */
#ifdef DEBUG_SPAWN
-#define LOG(a) log_printf a
+#define LOG(a) log_printf a
#else
#define LOG(a)
#endif
@@ -75,11 +102,13 @@
int archdep_spawn(const char *name, char **argv,
char **pstdout_redir, const char *stderr_redir)
{
+ pid_t pid;
pid_t child_pid;
- int child_status;
+ int child_status = 0;
char *stdout_redir;
+ int stdout_errno = 0;
+ int stderr_errno = 0;
-
if (pstdout_redir != NULL) {
if (*pstdout_redir == NULL) {
*pstdout_redir = archdep_tmpnam();
@@ -89,35 +118,49 @@
stdout_redir = NULL;
}
- child_pid = vfork();
+ log_message(LOG_DEFAULT, "Spawn: forking process '%s'", name);
+ child_pid = fork();
if (child_pid < 0) {
- log_error(LOG_DEFAULT, "vfork() failed: %s.", strerror(errno));
+ log_error(LOG_DEFAULT, "fork() failed: %s.", strerror(errno));
return -1;
} else {
if (child_pid == 0) {
+ int res;
+ /* child - CAUTION: log system does not work here */
if (stdout_redir && freopen(stdout_redir, "w", stdout) == NULL) {
- log_error(LOG_DEFAULT, "freopen(\"%s\") failed: %s.", stdout_redir, strerror(errno));
+ stdout_errno = errno;
_exit(-1);
}
if (stderr_redir && freopen(stderr_redir, "w", stderr) == NULL) {
- log_error(LOG_DEFAULT, "freopen(\"%s\") failed: %s.", stderr_redir, strerror(errno));
+ stderr_errno = errno;
_exit(-1);
}
- execvp(name, argv);
+ res = execvp(name, argv);
+ /* execvp should never return, except when there was some error */
_exit(-1);
}
}
- if (waitpid(child_pid, &child_status, 0) != child_pid) {
- log_error(LOG_DEFAULT, "waitpid() failed: %s", strerror(errno));
+ /* wait for the child to finish */
+ if ((pid = waitpid(child_pid, &child_status, 0)) != child_pid) {
+ log_error(LOG_DEFAULT, "waitpid(%d) got pid %d (%d): %s",
+ child_pid, pid, errno, strerror(errno));
return -1;
}
+ /* output the log messages in parent context */
+ if (stdout_errno) {
+ log_error(LOG_DEFAULT, "freopen(\"%s\") failed: %s.", stdout_redir, strerror(stdout_errno));
+ }
+ if (stderr_errno) {
+ log_error(LOG_DEFAULT, "freopen(\"%s\") failed: %s.", stderr_redir, strerror(stderr_errno));
+ }
+
+ LOG(("WIFEXITED(child_status):%d", WIFEXITED(child_status)));
if (WIFEXITED(child_status)) {
return WEXITSTATUS(child_status);
- } else {
- return -1;
}
+ return -1;
}
#elif defined(WINDOWS_COMPILE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-01-09 23:37:08
|
Revision: 45455
http://sourceforge.net/p/vice-emu/code/45455
Author: gpz
Date: 2025-01-09 23:37:07 +0000 (Thu, 09 Jan 2025)
Log Message:
-----------
some refactoring, add comments, use full path to shell for argv[0]
Modified Paths:
--------------
trunk/vice/src/arch/shared/coproc.c
Modified: trunk/vice/src/arch/shared/coproc.c
===================================================================
--- trunk/vice/src/arch/shared/coproc.c 2025-01-09 21:09:29 UTC (rev 45454)
+++ trunk/vice/src/arch/shared/coproc.c 2025-01-09 23:37:07 UTC (rev 45455)
@@ -49,6 +49,22 @@
* installing an ignoring handler.
*/
+/*
+ spawns a shell and executes a shell command (which can be a program)
+ as a background process
+
+ cmd command to run
+
+ returns:
+
+ fd_wr stdin of the child process
+ fd_rd stdout of the child process
+ childpid PID of the child process (to be used with kill_coproc)
+
+ return value: 0:ok, -1:error
+
+*/
+
/* this code is currently used to spawn sub processes in:
- gfxoutputdrv/ffmpegexedrv.c
- printerdrv/output-text.c
@@ -58,6 +74,14 @@
#include "vice.h"
+/* #define DEBUG_COPROC */
+
+#ifdef DEBUG_COPROC
+#define DBG(x) log_printf x
+#else
+#define DBG(x)
+#endif
+
/* TODO: Perhaps implement fork_coproc() on Haiku using Haiku-specific code
* instead of relying on the POSIX compatibility layer? */
#if defined(UNIX_COMPILE) || defined(HAIKU_COMPILE)
@@ -87,7 +111,7 @@
int fork_coproc(int *fd_wr, int *fd_rd, char *cmd, vice_pid_t *childpid)
{
- int fd1[2], fd2[2];
+ int pipe_stdout_fd[2], pipe_stdin_fd[2];
vice_pid_t pid;
ignore.sa_handler = SIG_IGN;
@@ -97,47 +121,52 @@
sigaction(SIGCHLD, &ignore, NULL);
sigaction(SIGPIPE, &ignore, NULL);
- if (pipe(fd1) < 0) {
+ *fd_rd = *fd_wr = *childpid = -1;
+
+ if (pipe(pipe_stdout_fd) < 0) {
log_error(LOG_DEFAULT, "Coproc: Couldn't open pipe!");
return -1;
}
- if (pipe(fd2) < 0) {
+ if (pipe(pipe_stdin_fd) < 0) {
log_error(LOG_DEFAULT, "Coproc: Couldn't open pipe!");
- close(fd1[0]);
- close(fd1[1]);
+ close(pipe_stdout_fd[0]);
+ close(pipe_stdout_fd[1]);
return -1;
}
- log_message(LOG_DEFAULT, "forking process '%s'", cmd);
+
+ log_message(LOG_DEFAULT, "Coproc: forking process '%s'", cmd);
if ((pid = fork()) < 0) {
log_error(LOG_DEFAULT, "Coproc: Couldn't fork()!");
- close(fd1[0]);
- close(fd1[1]);
- close(fd2[0]);
- close(fd2[1]);
+ close(pipe_stdout_fd[0]);
+ close(pipe_stdout_fd[1]);
+ close(pipe_stdin_fd[0]);
+ close(pipe_stdin_fd[1]);
return -1;
- } else if (pid == 0) { /* child */
- close(fd1[0]);
- if (fd1[1] != STDOUT_FILENO) {
- dup2(fd1[1], STDOUT_FILENO);
- close(fd1[1]);
+ } else if (pid == 0) {
+ /* child */
+ close(pipe_stdout_fd[0]);
+ if (pipe_stdout_fd[1] != STDOUT_FILENO) {
+ dup2(pipe_stdout_fd[1], STDOUT_FILENO);
+ close(pipe_stdout_fd[1]);
}
- close(fd2[1]);
- if (fd2[0] != STDIN_FILENO) {
- dup2(fd2[0], STDIN_FILENO);
- close(fd2[0]);
+ close(pipe_stdin_fd[1]);
+ if (pipe_stdin_fd[0] != STDIN_FILENO) {
+ dup2(pipe_stdin_fd[0], STDIN_FILENO);
+ close(pipe_stdin_fd[0]);
}
/* Hm, we have to close all other files that are currently
open now... */
- execl(SHELL, "sh", "-c", cmd, NULL);
+ execl(SHELL, SHELL, "-c", cmd, NULL);
archdep_vice_exit(127); /* child dies on error */
- } else { /* parent */
- close(fd1[1]);
- close(fd2[0]);
+ } else {
+ /* parent */
+ close(pipe_stdout_fd[1]);
+ close(pipe_stdin_fd[0]);
- *fd_rd = fd1[0];
- *fd_wr = fd2[1];
+ *fd_rd = pipe_stdout_fd[0];
+ *fd_wr = pipe_stdin_fd[1];
*childpid = pid;
log_message(LOG_DEFAULT, "forked process id is: %d", pid);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-01-09 21:09:32
|
Revision: 45454
http://sourceforge.net/p/vice-emu/code/45454
Author: gpz
Date: 2025-01-09 21:09:29 +0000 (Thu, 09 Jan 2025)
Log Message:
-----------
properly check return value of lib_mvsprintf, print an error and return if NULL. should fix #2112
Modified Paths:
--------------
trunk/vice/src/log.c
Modified: trunk/vice/src/log.c
===================================================================
--- trunk/vice/src/log.c 2025-01-08 13:26:45 UTC (rev 45453)
+++ trunk/vice/src/log.c 2025-01-09 21:09:29 UTC (rev 45454)
@@ -730,8 +730,13 @@
} else {
pretxt = lib_msprintf(LOG_COL_LWHITE "%s" LOG_COL_OFF ": %s", logs[logi], lvlstr);
}
+
/* build the log string */
logtxt = lib_mvsprintf(format, ap);
+ if (logtxt == NULL) {
+ fprintf(stderr, "log_helper: internal error (lib_mvsprintf returned NULL)\n");
+ return -1;
+ }
if ((log_to_file) || (!log_colorize)) {
nocolorpre = logskipcolors(pretxt);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-08 13:26:47
|
Revision: 45453
http://sourceforge.net/p/vice-emu/code/45453
Author: compyx
Date: 2025-01-08 13:26:45 +0000 (Wed, 08 Jan 2025)
Log Message:
-----------
SDL: Add toggle buttons for "StartMinimized" and "StartMaximized" resources
Add toggle buttons to start the emulator minimized or maximized to the "Video settings" submenu.
Modified Paths:
--------------
trunk/vice/src/arch/sdl/menu_video.c
Modified: trunk/vice/src/arch/sdl/menu_video.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_video.c 2025-01-07 16:45:34 UTC (rev 45452)
+++ trunk/vice/src/arch/sdl/menu_video.c 2025-01-08 13:26:45 UTC (rev 45453)
@@ -349,8 +349,9 @@
#endif
UI_MENU_DEFINE_INT(Window0Width)
UI_MENU_DEFINE_INT(Window0Height)
+UI_MENU_DEFINE_TOGGLE(StartMinimized)
+UI_MENU_DEFINE_TOGGLE(StartMaximized)
-
#define VICE_SDL_SIZE_MENU_DOUBLESIZE(chip) \
{ .string = "Double size", \
.type = MENU_ENTRY_RESOURCE_TOGGLE, \
@@ -816,6 +817,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "VICII Video cache",
@@ -915,6 +924,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -982,6 +999,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "VICII border mode",
@@ -1047,6 +1072,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -1124,6 +1157,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -1204,6 +1245,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -1252,6 +1301,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -1300,6 +1357,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
@@ -1379,6 +1444,14 @@
.string = "Restore window size",
.type = MENU_ENTRY_OTHER,
},
+ { .string = "Start with minimized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMinimized_callback,
+ },
+ { .string = "Start with maximized window",
+ .type = MENU_ENTRY_RESOURCE_TOGGLE,
+ .callback = toggle_StartMaximized_callback,
+ },
SDL_MENU_ITEM_SEPARATOR,
{ .string = "Video cache",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-07 16:45:36
|
Revision: 45452
http://sourceforge.net/p/vice-emu/code/45452
Author: compyx
Date: 2025-01-07 16:45:34 +0000 (Tue, 07 Jan 2025)
Log Message:
-----------
SDL: Add -maximized to SDL2 UI
Add command line options [-+]maxnimized to SDL UI (2.x only, 1.x doesn't have
any function or flag to properly maximize a window).
No menu item to toggle "StartMaximized", there isn't one for "StartMinimized"
either.
Modified Paths:
--------------
trunk/vice/src/arch/sdl/ui.c
trunk/vice/src/arch/sdl/video_sdl2.c
Modified: trunk/vice/src/arch/sdl/ui.c
===================================================================
--- trunk/vice/src/arch/sdl/ui.c 2025-01-06 19:15:38 UTC (rev 45451)
+++ trunk/vice/src/arch/sdl/ui.c 2025-01-07 16:45:34 UTC (rev 45452)
@@ -538,6 +538,7 @@
static int save_resources_on_exit;
static int confirm_on_exit;
static int start_minimized;
+static int start_maximized;
static int set_ui_menukey(int val, void *param)
{
@@ -574,14 +575,35 @@
* \param[in] val 0: start normal 1: start minimized
* \param[in] param extra param (ignored)
*
- * \return 0
+ * \return 0 on success, -1 if both minimized and maximized are requested
*/
static int set_start_minimized(int val, void *param)
{
+ if (val && start_maximized) {
+ log_error(LOG_DEFAULT, "cannot request both minimized and maximized window");
+ return -1;
+ }
start_minimized = val ? 1 : 0;
return 0;
}
+/** \brief Set StartMaximized resource (bool)
+ *
+ * \param[in] val 0: start normal 1: start maximized
+ * \param[in] param extra param (ignored)
+ *
+ * \return 0 on success, -1 if both minimized and maximized are requested
+ */
+static int set_start_maximized(int val, void *param)
+{
+ if (val && start_minimized) {
+ log_error(LOG_DEFAULT, "cannot request both minimized and maximized window");
+ return -1;
+ }
+ start_maximized = val ? 1 : 0;
+ return 0;
+}
+
#ifndef DEFAULT_MENU_KEY
# ifdef MACOS_COMPILE
# define DEFAULT_MENU_KEY SDLK_F10
@@ -628,6 +650,8 @@
#endif
{ "StartMinimized", 0, RES_EVENT_NO, NULL,
&start_minimized, set_start_minimized, NULL },
+ { "StartMaximized", 0, RES_EVENT_NO, NULL,
+ &start_maximized, set_start_maximized, NULL },
RESOURCE_INT_LIST_END
};
@@ -736,6 +760,12 @@
{ "+minimized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
NULL, NULL, "StartMinimized", (void *)0,
NULL, "Do not start VICE minimized" },
+ { "-maximized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
+ NULL, NULL, "StartMaximized", (void *)1,
+ NULL, "Start VICE maximized" },
+ { "+maximized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
+ NULL, NULL, "StartMaximized", (void *)0,
+ NULL, "Do not start VICE maximized" },
CMDLINE_LIST_END
};
Modified: trunk/vice/src/arch/sdl/video_sdl2.c
===================================================================
--- trunk/vice/src/arch/sdl/video_sdl2.c 2025-01-06 19:15:38 UTC (rev 45451)
+++ trunk/vice/src/arch/sdl/video_sdl2.c 2025-01-07 16:45:34 UTC (rev 45452)
@@ -556,6 +556,7 @@
{
SDL_WindowFlags flags = 0;
int minimized = 0;
+ int maximized = 0;
int hide_vdc = 0;
if (machine_class == VICE_MACHINE_C128) {
@@ -562,19 +563,25 @@
resources_get_int("C128HideVDC", &hide_vdc);
}
resources_get_int("StartMinimized", &minimized);
+ resources_get_int("StartMaximized", &maximized);
- if (minimized) {
- flags |= SDL_WINDOW_MINIMIZED;
+ if (minimized && maximized) {
+ log_warning(LOG_DEFAULT,
+ "both StartMinized and StartMaximized are true, ignoring.");
+ } else if (minimized) {
+ flags |= SDL_WINDOW_MINIMIZED;
+ } else if (maximized) {
+ flags |= SDL_WINDOW_MAXIMIZED;
}
if (hide_vdc && (canvas->index == VIDEO_CANVAS_IDX_VDC)) {
- flags |= SDL_WINDOW_HIDDEN;
+ flags |= SDL_WINDOW_HIDDEN;
}
if (canvas->fullscreenconfig->enable) {
- flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+ flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
} else {
- flags |= SDL_WINDOW_RESIZABLE;
+ flags |= SDL_WINDOW_RESIZABLE;
}
return flags;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-01-06 19:15:40
|
Revision: 45451
http://sourceforge.net/p/vice-emu/code/45451
Author: pottendo
Date: 2025-01-06 19:15:38 +0000 (Mon, 06 Jan 2025)
Log Message:
-----------
disable local certificate lookup
Modified Paths:
--------------
trunk/vice/src/userport/userport_wic64.c
Modified: trunk/vice/src/userport/userport_wic64.c
===================================================================
--- trunk/vice/src/userport/userport_wic64.c 2025-01-05 09:23:13 UTC (rev 45450)
+++ trunk/vice/src/userport/userport_wic64.c 2025-01-06 19:15:38 UTC (rev 45451)
@@ -902,11 +902,17 @@
curl_easy_setopt(eh, CURLOPT_URL, url);
curl_easy_setopt(eh, CURLOPT_PRIVATE, url);
curl_easy_setopt(eh, CURLOPT_FOLLOWLOCATION, 1L);
+ /* need to decied if we want to ship a certificate file
+ curl_easy_setopt(eh, CURLOPT_CAINFO, PREFIX "/share/vice/etc/ca-bundle.crt");
+ curl_easy_setopt(eh, CURLOPT_CAPATH, PREFIX "/share/vice/etc/ca-bundle.crt");
+ */
+ curl_easy_setopt(eh, CURLOPT_SSL_VERIFYPEER, 0L);
- /* work around bug 1964 (https://sourceforge.net/p/vice-emu/bugs/1964/) */
+ /* work around bug 1964 (https://sourceforge.net/p/vice-emu/bugs/1964/) - maybe not needed anymore !*/
#ifdef CURLSSLOPT_NATIVE_CA
curl_easy_setopt(eh, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
#endif
+
/* set USERAGENT: otherwise the server won't return data, e.g. wicradio */
if (wic64_protocol == WIC64_PROT_LEGACY) {
http_user_agent = HTTP_AGENT_LEGACY;
@@ -1652,6 +1658,11 @@
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
}
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ /* need to decied if we want to ship a certificate file
+ curl_easy_setopt(curl, CURLOPT_CAINFO, PREFIX "/share/vice/etc/ca-bundle.crt");
+ curl_easy_setopt(curl, CURLOPT_CAPATH, PREFIX "/share/vice/etc/ca-bundle.crt");
+ */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
res = curl_easy_setopt(curl, CURLOPT_USERAGENT, http_user_agent);
if (res != CURLE_OK) {
wic64_log(CONS_COL_NO, "curl set user agent failed: %s", curl_easy_strerror(res));
@@ -1829,6 +1840,11 @@
}
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ /* need to decied if we want to ship a certificate file
+ curl_easy_setopt(curl, CURLOPT_CAINFO, PREFIX "/share/vice/etc/ca-bundle.crt");
+ curl_easy_setopt(curl, CURLOPT_CAPATH, PREFIX "/share/vice/etc/ca-bundle.crt");
+ */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_URL, buffer);
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-05 09:23:16
|
Revision: 45450
http://sourceforge.net/p/vice-emu/code/45450
Author: compyx
Date: 2025-01-05 09:23:13 +0000 (Sun, 05 Jan 2025)
Log Message:
-----------
Gtk3: add option to start with maximized window (-maximized)
Add resource "StartMaximized" and command line options `-maximized`/`+maximized`
to start the emulator window maximized. The setting can be changed in the
settings dialog: Display => Host Display.
Implementation for the SDL UI will follow soon.
Modified Paths:
--------------
trunk/vice/doc/vice.texi
trunk/vice/src/arch/gtk3/ui.c
trunk/vice/src/arch/gtk3/widgets/settings_host_display.c
Modified: trunk/vice/doc/vice.texi
===================================================================
--- trunk/vice/doc/vice.texi 2025-01-04 17:55:33 UTC (rev 45449)
+++ trunk/vice/doc/vice.texi 2025-01-05 09:23:13 UTC (rev 45450)
@@ -17629,6 +17629,12 @@
Start/Do not start with minimized window
(@code{StartMinimized=1}, @code{StartMinimized=0}).
+@findex -maximized, +maximized
+@item -maximized
+@itemx +maximized
+Start/Do not start with maximized window
+(@code{StartMaximized=1}, @code{StartMaximized=0}).
+
@findex -jamaction
@item -jamaction <Type>
Specify the action to take when the CPU encounters a 'JAM' opcode
@@ -17730,6 +17736,10 @@
@item StartMinimized
Boolean specifying whether the emulator should start minimized
+@vindex StartMaximized
+@item StartMaximized
+Boolean specifying whether the emulator should start maximized
+
@vindex JAMAction
@item JAMAction
Integer specifying the action to take when the CPU encounters a 'JAM' opcode.
Modified: trunk/vice/src/arch/gtk3/ui.c
===================================================================
--- trunk/vice/src/arch/gtk3/ui.c 2025-01-04 17:55:33 UTC (rev 45449)
+++ trunk/vice/src/arch/gtk3/ui.c 2025-01-05 09:23:13 UTC (rev 45450)
@@ -155,7 +155,8 @@
static int set_window_width(gint width, void *window_index);
static int set_window_xpos(gint xpos, void *window_index);
static int set_window_ypos(gint ypos, void *window_index);
-static int set_start_minimized(gboolean start_minimized, void *unused);
+static int set_start_minimized(int start_minimized, void *unused);
+static int set_start_maximized(int start_minimized, void *unused);
static int set_native_monitor(gboolean use_native_monitorl, void *unused);
static int set_monitor_font(const gchar *font_description, void *unused);
static int set_monitor_bg(const gchar *color, void *unused);
@@ -198,6 +199,7 @@
int pause_on_settings; /**< PauseOnSettings (bool) */
int start_minimized; /**< StartMinimized (bool) */
+ int start_maximized; /**< StartMaximized (bool) */
int use_native_monitor; /**< NativeMonitor (bool) */
@@ -285,6 +287,8 @@
{ "StartMinimized", 0, RES_EVENT_NO, NULL,
&ui_resources.start_minimized, set_start_minimized, NULL },
+ { "StartMaximized", 0, RES_EVENT_NO, NULL,
+ &ui_resources.start_maximized, set_start_maximized, NULL },
{ "NativeMonitor", 0, RES_EVENT_NO, NULL,
&ui_resources.use_native_monitor, set_native_monitor, NULL },
@@ -392,6 +396,12 @@
{ "+minimized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
NULL, NULL, "StartMinimized", (void *)0,
NULL, "Do not start VICE minimized" },
+ { "-maximized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
+ NULL, NULL, "StartMaximized", (void*)1,
+ NULL, "Start VICE maximized" },
+ { "+maximized", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
+ NULL, NULL, "StartMaximized", (void*)0,
+ NULL, "Do not start VICE maximized" },
{ "-nativemonitor", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
NULL, NULL, "NativeMonitor", (void *)1,
NULL, "Use native monitor on OS terminal" },
@@ -569,14 +579,37 @@
* \param[in] start_minimized start the emulator window minimized
* \param[in] unused extra param (ignored)
*
- * \return 0
+ * \return 0 on success, -1 when StartMaximized is true
*/
-static int set_start_minimized(gboolean start_minimized, void *unused)
+static int set_start_minimized(int start_minimized, void *unused)
{
+ if (start_minimized && ui_resources.start_maximized) {
+ log_error(LOG_DEFAULT,
+ "cannot request both minimized and maximized window.");
+ return -1;
+ }
ui_resources.start_minimized = start_minimized;
return 0;
}
+/** \brief Set StartMaximized resource
+ *
+ * \param[in] start_maximized start the emulator window maximized
+ * \param[in] unused extra param (ignored)
+ *
+ * \return 0 on success, -1 when StartMinimized is true
+ */
+static int set_start_maximized(int start_maximized, void *unused)
+{
+ if (start_maximized && ui_resources.start_minimized) {
+ log_error(LOG_DEFAULT,
+ "cannot request both minimized and maximized window.");
+ return -1;
+ }
+ ui_resources.start_maximized = start_maximized;
+ return 0;
+}
+
/** \brief Set NativeMonitor resource (bool)
*
* Use the spawning shell for the monitor instead of the VTE widget.
@@ -1780,7 +1813,6 @@
GdkPixbuf *icon;
gchar title[256];
- int minimized = 0;
bool restored = false;
if (machine_class != VICE_MACHINE_VSID) {
@@ -1939,18 +1971,16 @@
}
/*
- * Do we start minimized?
+ * Do we start minimized or maximized?
*/
- if (resources_get_int("StartMinimized", &minimized) < 0) {
- minimized = 0; /* fallback : not minimized */
- }
- if (minimized) {
- /* there's no gtk_window_minimize() so we do this:
- * (there is a gtk_window_maximize(), so for API consistency I'd would
- * probably have added gtk_window_minimize() to mirror the maximize
- * function)
- */
+ if (ui_resources.start_minimized && ui_resources.start_maximized) {
+ /* error: cannot have both: log and ignore */
+ log_error(LOG_DEFAULT, "minimized and maximized window requested, ignoring.");
+ } else if (ui_resources.start_minimized) {
+ /* there's no gtk_window_minimize() so we do this */
gtk_window_iconify(GTK_WINDOW(new_window));
+ } else if (ui_resources.start_maximized) {
+ gtk_window_maximize(GTK_WINDOW(new_window));
} else {
/* my guess is a minimized/iconified window cannot be fullscreen */
if (ui_is_fullscreen_from_canvas(canvas)) {
Modified: trunk/vice/src/arch/gtk3/widgets/settings_host_display.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_host_display.c 2025-01-04 17:55:33 UTC (rev 45449)
+++ trunk/vice/src/arch/gtk3/widgets/settings_host_display.c 2025-01-05 09:23:13 UTC (rev 45450)
@@ -7,6 +7,7 @@
/*
* $VICERES FullscreenDecorations -vsid
* $VICERES StartMinimized -vsid
+ * $VICERES StartMaximized -vsid
*/
/*
@@ -121,7 +122,22 @@
return grid;
}
+/** \brief Handler for the 'toggled' event of the minimized/maximized check buttons
+ *
+ * Prevent user from enabling both "start minimized" and "start maximized".
+ *
+ * \param[in] self check button triggering event
+ * \param[in] other check button for opposite state
+ */
+static void on_minmax_toggled(GtkToggleButton *self, gpointer other)
+{
+ if (gtk_toggle_button_get_active(self) &&
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(other))) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other), FALSE);
+ }
+}
+
/** \brief Create host display settings widget
*
* \param[in] widget parent widget (used for dialogs)
@@ -138,6 +154,7 @@
GtkWidget *decorations;
GtkWidget *minimized;
+ GtkWidget *maximized;
GtkWidget *rendering_options;
GtkWidget *rendering_options_vdc = NULL;
const char *chip;
@@ -147,6 +164,9 @@
minimized = vice_gtk3_resource_check_button_new(
"StartMinimized",
"Start the emulator window minimized");
+ maximized = vice_gtk3_resource_check_button_new(
+ "StartMaximized",
+ "Start the emulator window maximized");
rendering_options = create_rendering_options_widget(chip);
gtk_widget_set_margin_top(rendering_options, 24);
if (machine_class == VICE_MACHINE_C128) {
@@ -154,11 +174,21 @@
gtk_widget_set_margin_top(rendering_options_vdc, 24);
}
+ g_signal_connect(G_OBJECT(minimized),
+ "toggled",
+ G_CALLBACK(on_minmax_toggled),
+ (gpointer)maximized);
+ g_signal_connect(G_OBJECT(maximized),
+ "toggled",
+ G_CALLBACK(on_minmax_toggled),
+ (gpointer)minimized);
+
gtk_grid_attach(GTK_GRID(grid), decorations, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(grid), minimized, 0, 2, 1, 1);
- gtk_grid_attach(GTK_GRID(grid), rendering_options, 0, 3, 1, 1);
+ gtk_grid_attach(GTK_GRID(grid), maximized, 0, 3, 1, 1);
+ gtk_grid_attach(GTK_GRID(grid), rendering_options, 0, 4, 1, 1);
if (machine_class == VICE_MACHINE_C128) {
- gtk_grid_attach(GTK_GRID(grid), rendering_options_vdc, 0, 4, 1, 1);
+ gtk_grid_attach(GTK_GRID(grid), rendering_options_vdc, 0, 5, 1, 1);
}
}
gtk_widget_show_all(grid);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-01-04 17:55:34
|
Revision: 45449
http://sourceforge.net/p/vice-emu/code/45449
Author: compyx
Date: 2025-01-04 17:55:33 +0000 (Sat, 04 Jan 2025)
Log Message:
-----------
Gtk3: add $VICERES comment for "StartMinimized"
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/ui.c
Modified: trunk/vice/src/arch/gtk3/ui.c
===================================================================
--- trunk/vice/src/arch/gtk3/ui.c 2025-01-04 17:53:27 UTC (rev 45448)
+++ trunk/vice/src/arch/gtk3/ui.c 2025-01-04 17:55:33 UTC (rev 45449)
@@ -26,7 +26,7 @@
* $VICERES Window1Width x128
* $VICERES Window1Xpos x128
* $VICERES Window1Ypos x128
-
+ * $VICERES StartMinimized -vsid
*/
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-01-04 17:53:29
|
Revision: 45448
http://sourceforge.net/p/vice-emu/code/45448
Author: pottendo
Date: 2025-01-04 17:53:27 +0000 (Sat, 04 Jan 2025)
Log Message:
-----------
let curl redirect 30x URLs
Modified Paths:
--------------
trunk/vice/src/userport/userport_wic64.c
Modified: trunk/vice/src/userport/userport_wic64.c
===================================================================
--- trunk/vice/src/userport/userport_wic64.c 2025-01-01 21:56:40 UTC (rev 45447)
+++ trunk/vice/src/userport/userport_wic64.c 2025-01-04 17:53:27 UTC (rev 45448)
@@ -901,6 +901,8 @@
curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(eh, CURLOPT_URL, url);
curl_easy_setopt(eh, CURLOPT_PRIVATE, url);
+ curl_easy_setopt(eh, CURLOPT_FOLLOWLOCATION, 1L);
+
/* work around bug 1964 (https://sourceforge.net/p/vice-emu/bugs/1964/) */
#ifdef CURLSSLOPT_NATIVE_CA
curl_easy_setopt(eh, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
@@ -1649,6 +1651,7 @@
} else {
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
}
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_setopt(curl, CURLOPT_USERAGENT, http_user_agent);
if (res != CURLE_OK) {
wic64_log(CONS_COL_NO, "curl set user agent failed: %s", curl_easy_strerror(res));
@@ -1825,6 +1828,7 @@
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
}
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_URL, buffer);
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2025-01-01 21:56:42
|
Revision: 45447
http://sourceforge.net/p/vice-emu/code/45447
Author: dqh
Date: 2025-01-01 21:56:40 +0000 (Wed, 01 Jan 2025)
Log Message:
-----------
Update macOS bindist to latest notarisation tool
Modified Paths:
--------------
trunk/vice/build/macOS/bindist.sh
Modified: trunk/vice/build/macOS/bindist.sh
===================================================================
--- trunk/vice/build/macOS/bindist.sh 2025-01-01 21:55:24 UTC (rev 45446)
+++ trunk/vice/build/macOS/bindist.sh 2025-01-01 21:56:40 UTC (rev 45447)
@@ -25,11 +25,11 @@
if [ -z "$APPLE_ID_EMAIL" ]; then
err "Missing env APPLE_ID_EMAIL. Set to your apple ID email address"
fi
-if [ -z "$NOTARISATION_PROVIDER" ]; then
- err "Missing env NOTARISATION_PROVIDER. Refer to https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow"
+if [ -z "$APPLE_TEAM_ID" ]; then
+ err "Missing env APPLE_TEAM_ID. Get it from https://developer.apple.com/account#MembershipDetailsCard"
fi
-if [ -z "$NOTARISATION_PASSWORD" ]; then
- err "Missing env NOTARISATION_PASSWORD. Refer to https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow"
+if [ -z "$APPLE_NOTARISATION_PASSWORD" ]; then
+ err "Missing env APPLE_NOTARISATION_PASSWORD. NOT YOUR APPLE ID PASSWORD. Refer to https://support.apple.com/en-us/102654"
fi
set -o nounset
@@ -51,32 +51,14 @@
function notarise {
OUTPUT="$(mktemp)"
- xcrun altool --notarize-app \
- --primary-bundle-id "$1" \
- --username "$APPLE_ID_EMAIL" \
- --password "$NOTARISATION_PASSWORD" \
- --asc-provider "$NOTARISATION_PROVIDER" \
- --file "$1" \
- 2>&1 | tee "$OUTPUT"
- UUID=$(awk '/RequestUUID/ { print $3 }' "$OUTPUT")
+ xcrun notarytool submit \
+ --apple-id "$APPLE_ID_EMAIL" \
+ --password "$APPLE_NOTARISATION_PASSWORD" \
+ --team-id "$APPLE_TEAM_ID" \
+ --wait \
+ "$1" \
+ 2>&1 | tee "$OUTPUT"
- if [ -z "$UUID" ]
- then
- echo "ERROR: Failed to capture RequestUUID from xcrun output".
- exit 1
- fi
-
- echo "Waiting for Status: success"
-
- while [ -z "$(grep "Status: success" "$OUTPUT")" ]
- do
- sleep 10
- xcrun altool --notarization-info "$UUID" \
- -u "$APPLE_ID_EMAIL" \
- -p "$NOTARISATION_PASSWORD" \
- 2>&1 | tee "$OUTPUT"
- done
-
xcrun stapler staple "$1"
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2025-01-01 21:55:25
|
Revision: 45446
http://sourceforge.net/p/vice-emu/code/45446
Author: dqh
Date: 2025-01-01 21:55:24 +0000 (Wed, 01 Jan 2025)
Log Message:
-----------
Update macOS bindist for latest GTK3
Modified Paths:
--------------
trunk/vice/src/arch/shared/make-bindist_osx.sh
Modified: trunk/vice/src/arch/shared/make-bindist_osx.sh
===================================================================
--- trunk/vice/src/arch/shared/make-bindist_osx.sh 2025-01-01 21:21:39 UTC (rev 45445)
+++ trunk/vice/src/arch/shared/make-bindist_osx.sh 2025-01-01 21:55:24 UTC (rev 45446)
@@ -45,8 +45,10 @@
GTK_UPDATE_ICON_CACHE=gtk-update-icon-cache-3.0
elif which gtk3-update-icon-cache >/dev/null; then
GTK_UPDATE_ICON_CACHE=gtk3-update-icon-cache
+elif which gtk-update-icon-cache >/dev/null; then
+ GTK_UPDATE_ICON_CACHE=gtk-update-icon-cache
else
- >&2 echo "ERROR: Could not find gtk-update-icon-cache-3.0 or gtk3-update-icon-cache"
+ >&2 echo "ERROR: Could not find gtk-update-icon-cache-3.0, gtk3-update-icon-cache, nor gtk-update-icon-cache."
exit 1
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|