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
(28) |
Nov
(12) |
Dec
|
|
From: <gp...@us...> - 2025-11-09 12:56:48
|
Revision: 45820
http://sourceforge.net/p/vice-emu/code/45820
Author: gpz
Date: 2025-11-09 12:56:46 +0000 (Sun, 09 Nov 2025)
Log Message:
-----------
move breakpoint range check into the loop instead of trying early exit, should fix #2178
Modified Paths:
--------------
trunk/vice/src/monitor/mon_breakpoint.c
Modified: trunk/vice/src/monitor/mon_breakpoint.c
===================================================================
--- trunk/vice/src/monitor/mon_breakpoint.c 2025-11-07 17:36:18 UTC (rev 45819)
+++ trunk/vice/src/monitor/mon_breakpoint.c 2025-11-09 12:56:46 UTC (rev 45820)
@@ -534,10 +534,11 @@
ptr = search_checkpoint_list(list, addr);
- while (ptr && mon_is_in_range(ptr->checkpt->start_addr, ptr->checkpt->end_addr, addr)) {
+ while (ptr) {
cp = ptr->checkpt;
ptr = ptr->next;
- if (cp && (cp->enabled == e_ON)) {
+ if (cp && (cp->enabled == e_ON) &&
+ mon_is_in_range(cp->start_addr, cp->end_addr, addr)) {
/* If condition test fails, skip this checkpoint */
if (cp->condition) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-07 17:36:20
|
Revision: 45819
http://sourceforge.net/p/vice-emu/code/45819
Author: gpz
Date: 2025-11-07 17:36:18 +0000 (Fri, 07 Nov 2025)
Log Message:
-----------
define sprite pattern in the makefile, so we can add additional tests easily
Modified Paths:
--------------
testprogs/VICII/spritesplit/Makefile
testprogs/VICII/spritesplit/spritesplit.asm
Modified: testprogs/VICII/spritesplit/Makefile
===================================================================
--- testprogs/VICII/spritesplit/Makefile 2025-11-05 18:05:43 UTC (rev 45818)
+++ testprogs/VICII/spritesplit/Makefile 2025-11-07 17:36:18 UTC (rev 45819)
@@ -10,55 +10,55 @@
ss-hires-mc.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_HIRES_TO_MC
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_HIRES_TO_MC
ss-hires-mc-exp.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_HIRES_TO_MC_EXPANDED
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_HIRES_TO_MC_EXPANDED
ss-mc-hires.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_MC_TO_HIRES
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_MC_TO_HIRES
ss-mc-hires-exp.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_MC_TO_HIRES_EXPANDED
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_MC_TO_HIRES_EXPANDED
ss-hires-color.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_HIRES_COLOR
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%11001100 -DSPLIT_HIRES_COLOR
ss-mc-color0.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_MC_COLOR0
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%10001000 -DSPLIT_MC_COLOR0
ss-mc-color1.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_MC_COLOR1
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01000100 -DSPLIT_MC_COLOR1
ss-mc-color2.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_MC_COLOR2
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%11001100 -DSPLIT_MC_COLOR2
ss-xpos.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_XPOS
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%11111111 -DSPLIT_XPOS
ss-unexp-exp-hires.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_UNEXP_EXP_HIRES
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_UNEXP_EXP_HIRES
ss-exp-unexp-hires.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_EXP_UNEXP_HIRES
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_EXP_UNEXP_HIRES
ss-unexp-exp-mc.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_UNEXP_EXP_MC
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%10011001 -DSPLIT_UNEXP_EXP_MC
ss-exp-unexp-mc.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_EXP_UNEXP_MC
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%10011001 -DSPLIT_EXP_UNEXP_MC
ss-pri.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_PRI
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_PRI
ss-pri-exp.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_PRI_EXP
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%01010101 -DSPLIT_PRI_EXP
ss-pri-mc.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_PRI_MC
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%10011001 -DSPLIT_PRI_MC
ss-pri-mc-exp.prg: spritesplit.asm
- dasm $< -o$@ -DSPLIT_PRI_MC_EXP
+ dasm $< -o$@ -DSPRITE_PATTERN_VALUE=%10011001 -DSPLIT_PRI_MC_EXP
clean:
rm -f *~ \#*\#
Modified: testprogs/VICII/spritesplit/spritesplit.asm
===================================================================
--- testprogs/VICII/spritesplit/spritesplit.asm 2025-11-05 18:05:43 UTC (rev 45818)
+++ testprogs/VICII/spritesplit/spritesplit.asm 2025-11-07 17:36:18 UTC (rev 45819)
@@ -197,7 +197,7 @@
;******
ifconst SPLIT_HIRES_TO_MC
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -210,7 +210,7 @@
ifconst SPLIT_HIRES_TO_MC_EXPANDED
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -223,7 +223,7 @@
ifconst SPLIT_MC_TO_HIRES
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -236,7 +236,7 @@
ifconst SPLIT_MC_TO_HIRES_EXPANDED
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -249,7 +249,7 @@
ifconst SPLIT_HIRES_COLOR
IDLE_PATTERN equ $00
-SPR_PATTERN equ $cc
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -262,7 +262,7 @@
ifconst SPLIT_MC_COLOR0
IDLE_PATTERN equ $00
-SPR_PATTERN equ $88
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -275,7 +275,7 @@
ifconst SPLIT_MC_COLOR1
IDLE_PATTERN equ $00
-SPR_PATTERN equ $44
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -288,7 +288,7 @@
ifconst SPLIT_MC_COLOR2
IDLE_PATTERN equ $00
-SPR_PATTERN equ $cc
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -301,7 +301,7 @@
ifconst SPLIT_XPOS
IDLE_PATTERN equ $00
-SPR_PATTERN equ $ff
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 13
COLOR_MC2 equ 0
@@ -314,7 +314,7 @@
ifconst SPLIT_UNEXP_EXP_HIRES
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 0
COLOR_MC2 equ 13
@@ -327,7 +327,7 @@
ifconst SPLIT_EXP_UNEXP_HIRES
IDLE_PATTERN equ $00
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 0
COLOR_MC2 equ 13
@@ -340,7 +340,7 @@
ifconst SPLIT_UNEXP_EXP_MC
IDLE_PATTERN equ $00
-SPR_PATTERN equ $99
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 0
COLOR_MC2 equ 13
@@ -353,7 +353,7 @@
ifconst SPLIT_EXP_UNEXP_MC
IDLE_PATTERN equ $00
-SPR_PATTERN equ $99
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 0
COLOR_MC2 equ 13
@@ -366,7 +366,7 @@
ifconst SPLIT_PRI
IDLE_PATTERN equ $ff
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 10
COLOR_MC2 equ 0
@@ -379,7 +379,7 @@
ifconst SPLIT_PRI_EXP
IDLE_PATTERN equ $ff
-SPR_PATTERN equ $55
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 10
COLOR_MC2 equ 0
@@ -392,7 +392,7 @@
ifconst SPLIT_PRI_MC
IDLE_PATTERN equ $ff
-SPR_PATTERN equ $99
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 10
COLOR_MC2 equ 0
@@ -405,7 +405,7 @@
ifconst SPLIT_PRI_MC_EXP
IDLE_PATTERN equ $ff
-SPR_PATTERN equ $99
+SPR_PATTERN equ SPRITE_PATTERN_VALUE
COLOR_SPR equ 1
COLOR_MC1 equ 10
COLOR_MC2 equ 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-05 18:05:46
|
Revision: 45818
http://sourceforge.net/p/vice-emu/code/45818
Author: gpz
Date: 2025-11-05 18:05:43 +0000 (Wed, 05 Nov 2025)
Log Message:
-----------
update the Makefile too :)
Modified Paths:
--------------
testprogs/Monitor/testbench/Makefile
Modified: testprogs/Monitor/testbench/Makefile
===================================================================
--- testprogs/Monitor/testbench/Makefile 2025-11-05 14:27:39 UTC (rev 45817)
+++ testprogs/Monitor/testbench/Makefile 2025-11-05 18:05:43 UTC (rev 45818)
@@ -24,7 +24,11 @@
bug2024.log \
bug2025.log \
bug2025-2.log \
- bug2025-2b.log
+ bug2025-2b.log \
+ bug2025-3.log \
+ bug2025-4.log \
+ bug2025-4b.log \
+ bug2025-4c.log
all: helper tests
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-05 14:27:43
|
Revision: 45817
http://sourceforge.net/p/vice-emu/code/45817
Author: gpz
Date: 2025-11-05 14:27:39 +0000 (Wed, 05 Nov 2025)
Log Message:
-----------
remaining testcases for bug #2025, seems all OK in trunk
Added Paths:
-----------
testprogs/Monitor/testbench/bug2025-3.mon
testprogs/Monitor/testbench/bug2025-3.ref
testprogs/Monitor/testbench/bug2025-4.mon
testprogs/Monitor/testbench/bug2025-4.ref
testprogs/Monitor/testbench/bug2025-4b.mon
testprogs/Monitor/testbench/bug2025-4b.ref
testprogs/Monitor/testbench/bug2025-4c.mon
testprogs/Monitor/testbench/bug2025-4c.ref
Added: testprogs/Monitor/testbench/bug2025-3.mon
===================================================================
--- testprogs/Monitor/testbench/bug2025-3.mon (rev 0)
+++ testprogs/Monitor/testbench/bug2025-3.mon 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,6 @@
+logname "bug2025-3.log"
+log on
+break $ea31
+r a = ff
+reset
+q
Added: testprogs/Monitor/testbench/bug2025-3.ref
===================================================================
--- testprogs/Monitor/testbench/bug2025-3.ref (rev 0)
+++ testprogs/Monitor/testbench/bug2025-3.ref 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,3 @@
+BREAK: 1 C:$ea31 (Stop on exec)
+#1 (Stop on exec ea31) 1/$001, 60/$3c
+.C:ea31 20 EA FF JSR $FFEA - A:00 X:F9 Y:84 SP:f9 ..-..IZC 2162283
Added: testprogs/Monitor/testbench/bug2025-4.mon
===================================================================
--- testprogs/Monitor/testbench/bug2025-4.mon (rev 0)
+++ testprogs/Monitor/testbench/bug2025-4.mon 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,20 @@
+logname "bug2025-4.log"
+log on
+
+break 1000
+break e147
+
+a 1000
+inc $1004
+rts
+brk
+
+keybuf sys4096\n
+x
+
+r a = ff
+x
+
+m 1004 1004
+chis 4
+q
Added: testprogs/Monitor/testbench/bug2025-4.ref
===================================================================
(Binary files differ)
Index: testprogs/Monitor/testbench/bug2025-4.ref
===================================================================
--- testprogs/Monitor/testbench/bug2025-4.ref 2025-11-04 13:07:36 UTC (rev 45816)
+++ testprogs/Monitor/testbench/bug2025-4.ref 2025-11-05 14:27:39 UTC (rev 45817)
Property changes on: testprogs/Monitor/testbench/bug2025-4.ref
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: testprogs/Monitor/testbench/bug2025-4b.mon
===================================================================
--- testprogs/Monitor/testbench/bug2025-4b.mon (rev 0)
+++ testprogs/Monitor/testbench/bug2025-4b.mon 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,21 @@
+logname "bug2025-4b.log"
+log on
+
+break 1000
+break e147
+
+a 1000
+inx
+stx $1005
+rts
+brk
+
+keybuf sys4096\n
+x
+
+r a = ff
+x
+
+m 1005 1005
+chis 5
+q
Added: testprogs/Monitor/testbench/bug2025-4b.ref
===================================================================
(Binary files differ)
Index: testprogs/Monitor/testbench/bug2025-4b.ref
===================================================================
--- testprogs/Monitor/testbench/bug2025-4b.ref 2025-11-04 13:07:36 UTC (rev 45816)
+++ testprogs/Monitor/testbench/bug2025-4b.ref 2025-11-05 14:27:39 UTC (rev 45817)
Property changes on: testprogs/Monitor/testbench/bug2025-4b.ref
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: testprogs/Monitor/testbench/bug2025-4c.mon
===================================================================
--- testprogs/Monitor/testbench/bug2025-4c.mon (rev 0)
+++ testprogs/Monitor/testbench/bug2025-4c.mon 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,20 @@
+logname "bug2025-4c.log"
+log on
+
+break 1000
+break e147
+
+a 1000
+inc $1004
+rts
+brk
+
+keybuf sys4096\n
+x
+
+r pc = 1003
+x
+
+m 1004 1004
+chis 5
+q
Added: testprogs/Monitor/testbench/bug2025-4c.ref
===================================================================
--- testprogs/Monitor/testbench/bug2025-4c.ref (rev 0)
+++ testprogs/Monitor/testbench/bug2025-4c.ref 2025-11-05 14:27:39 UTC (rev 45817)
@@ -0,0 +1,12 @@
+BREAK: 1 C:$1000 (Stop on exec)
+BREAK: 2 C:$e147 (Stop on exec)
+#1 (Stop on exec 1000) 296/$128, 47/$2f
+.C:1000 EE 04 10 INC $1004 - A:00 X:00 Y:00 SP:f7 ..-..... 2161199
+#2 (Stop on exec e147) 296/$128, 53/$35
+.C:e147 08 PHP - A:00 X:00 Y:00 SP:f9 ..-..... 2161205
+>C:1004 00
+.C:e13d AE 0D 03 LDX $030D A:00 X:61 Y:00 SP:f6 ..-...Z. 2161182
+.C:e140 AC 0E 03 LDY $030E A:00 X:00 Y:00 SP:f6 ..-...Z. 2161186
+.C:e143 28 PLP A:00 X:00 Y:00 SP:f6 ..-...Z. 2161190
+.C:e144 6C 14 00 JMP ($0014) A:00 X:00 Y:00 SP:f7 ..-..... 2161194
+.C:1003 60 RTS A:00 X:00 Y:00 SP:f7 ..-..... 2161199
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-04 13:07:38
|
Revision: 45816
http://sourceforge.net/p/vice-emu/code/45816
Author: gpz
Date: 2025-11-04 13:07:36 +0000 (Tue, 04 Nov 2025)
Log Message:
-----------
copy inverted characters like normal characters from the monitor, as suggested in #2167
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/novte/vte.cc
Modified: trunk/vice/src/arch/gtk3/novte/vte.cc
===================================================================
--- trunk/vice/src/arch/gtk3/novte/vte.cc 2025-11-03 23:51:36 UTC (rev 45815)
+++ trunk/vice/src/arch/gtk3/novte/vte.cc 2025-11-04 13:07:36 UTC (rev 45816)
@@ -4735,6 +4735,7 @@
/*printf("[A:%04x]", codepoint);*/
switch (codeh) {
case 0: /* uppercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
+ case 2: /* inverted uppercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
/* simple petscii -> ascii conversion */
if ((codel >= 0x20) && (codel <= 0x3f)) {
ch = codel;
@@ -4750,6 +4751,7 @@
}
break;
case 1: /* lowercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
+ case 3: /* inverted lowercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
/* simple petscii -> ascii conversion */
if ((codel >= 0x20) && (codel <= 0x3f)) {
ch = codel;
@@ -4767,6 +4769,8 @@
ch = '.';
}
break;
+/* copy the inverted chars as normal chars */
+#if 0
case 2: /* inverted uppercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
ch = '.';
break;
@@ -4773,6 +4777,7 @@
case 3: /* inverted lowercase, petscii codes in ranges 0x20-0x7f and 0xa0-0xff */
ch = '.';
break;
+#endif
default:
ch = '.';
break;
@@ -4811,7 +4816,7 @@
if (ch == 0xee) {
int codepoint = ((ch2 & 0x3f) << 6) | (ch3 & 0x3f);
int codeh = codepoint >> 8;
- int codel = codepoint & 0xff;
+ int codel = codepoint & 0x7f; /* copy inverted chars as normal chars */
/*printf("[B:%04x]", codepoint);*/
switch (codeh) {
case 0: /* uppercase */
@@ -4901,7 +4906,7 @@
if (ch == 0xee) {
int codepoint = ((ch2 & 0x3f) << 6) | (ch3 & 0x3f);
int codeh = codepoint >> 8;
- int codel = codepoint & 0xff;
+ int codel = codepoint & 0x7f; /* copy inverted chars as normal chars */
/*printf("[B:%04x]", codepoint);*/
switch (codeh) {
case 2: /* uppercase */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-03 23:51:38
|
Revision: 45815
http://sourceforge.net/p/vice-emu/code/45815
Author: gpz
Date: 2025-11-03 23:51:36 +0000 (Mon, 03 Nov 2025)
Log Message:
-----------
fix warning
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-11-03 20:39:43 UTC (rev 45814)
+++ trunk/vice/src/userport/userport_wic64.c 2025-11-03 23:51:36 UTC (rev 45815)
@@ -2618,7 +2618,7 @@
/* try to connect to the default server */
curl_easy_setopt(c, CURLOPT_URL, default_server_hostname);
- curl_easy_setopt(c, CURLOPT_CONNECT_ONLY, 0);
+ curl_easy_setopt(c, CURLOPT_CONNECT_ONLY, 0L);
/* Perform the connect */
res = curl_easy_perform(c);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-03 20:39:46
|
Revision: 45814
http://sourceforge.net/p/vice-emu/code/45814
Author: gpz
Date: 2025-11-03 20:39:43 +0000 (Mon, 03 Nov 2025)
Log Message:
-----------
added note on using higher COM ports in Windows
Modified Paths:
--------------
trunk/vice/doc/vice.texi
Modified: trunk/vice/doc/vice.texi
===================================================================
--- trunk/vice/doc/vice.texi 2025-11-03 18:06:58 UTC (rev 45813)
+++ trunk/vice/doc/vice.texi 2025-11-03 20:39:43 UTC (rev 45814)
@@ -3667,6 +3667,16 @@
Default Settings'', can be used to reset all the values to the factory
defaults.
+Note that, when saving the settings to a new file, using ``Save settings to...'',
+only the resources for the currently running emulator will be stored into this
+file, and the settings related to other emulators (which might exist in a previously
+loaded file) will not be copied to it.
+
+You can also store some extra settings, for example to configure a certain hardware
+setup, in an extra file, and load these using ``Load extra settings from...''. In
+this case the resources will not be reset to default first and only the resources
+present in that file will be changed/used.
+
A special resource, @code{SaveResourcesOnExit}, if set to a non zero
value, causes the emulator to save the current
(changed) settings before exiting, and can be toggled with the ``Save
@@ -8098,17 +8108,18 @@
It is possible to define up to four serial devices, and then decide
which interface should be connected to which device. This is done by
-so-called @dfn{rs232 device file names}; an rs232 device file name can
+so-called @dfn{RS232 device file names}; an RS232 device file name can
be either a simple path, a network address, or a command name preceeded
by a pipe symbol @samp{|}.
If the path specifies a special device (e.g. @file{/dev/ttyS0} or @file{com1}) it
-is recognized by VICE and the emulator can set the baudrate.
+is recognized by VICE and the emulator can set the baudrate. (Note that in Windows
+you may have to use the full device path for higher COM ports, eg @file{\\.\com10})
-For example, rs232 device @samp{filename} will cause the output to be
+For example, RS232 device @samp{filename} will cause the output to be
written (not appended) to the file @file{filename}, while printer device
@samp{|lpr} will cause the @code{lpr} command to be executed and be fed
-the rs232 output. The rs232 output will not be converted but saved as
-sent by the emulated machine. The same holds true for the rs232 input.
+the RS232 output. The RS232 output will not be converted but saved as
+sent by the emulated machine. The same holds true for the RS232 input.
If the command writes data to the standard output it will be caught by VICE
and sent back to the emulator. Also the data sent by the pseudo device will
be sent back to VICE.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-03 18:07:00
|
Revision: 45813
http://sourceforge.net/p/vice-emu/code/45813
Author: gpz
Date: 2025-11-03 18:06:58 +0000 (Mon, 03 Nov 2025)
Log Message:
-----------
when inserting checkpoints into the list, compare their start addresses (as intended). fixes bug #2122
Modified Paths:
--------------
trunk/vice/src/monitor/mon_breakpoint.c
Modified: trunk/vice/src/monitor/mon_breakpoint.c
===================================================================
--- trunk/vice/src/monitor/mon_breakpoint.c 2025-11-03 14:36:52 UTC (rev 45812)
+++ trunk/vice/src/monitor/mon_breakpoint.c 2025-11-03 18:06:58 UTC (rev 45813)
@@ -48,6 +48,14 @@
#include "monitor_binary.h"
#endif
+/*#define DEBUG_BREAKPOINTS*/
+
+#ifdef DEBUG_BREAKPOINTS
+#define DBG(x) log_printf x
+#else
+#define DBG(x)
+#endif
+
struct checkpoint_list_s {
mon_checkpoint_t *checkpt;
struct checkpoint_list_s *next;
@@ -327,6 +335,19 @@
}
}
+#ifdef DEBUG_BREAKPOINTS
+/* show checkpoint list in the order it is in the list */
+static void dump_checkpoint_list(void)
+{
+ checkpoint_list_t *ptr = all_checkpoints;
+ mon_out("dump_checkpoint_list:\n");
+ while (ptr) {
+ print_checkpoint_info(ptr->checkpt);
+ ptr = ptr->next;
+ }
+}
+#endif
+
void mon_breakpoint_delete_checkpoint(int cp_num)
{
int i;
@@ -423,7 +444,7 @@
*/
addr1 = addr_location(bp1->start_addr);
- addr2 = addr_location(bp2->end_addr);
+ addr2 = addr_location(bp2->start_addr);
if (addr1 < addr2) {
return -1;
@@ -516,7 +537,8 @@
while (ptr && mon_is_in_range(ptr->checkpt->start_addr, ptr->checkpt->end_addr, addr)) {
cp = ptr->checkpt;
ptr = ptr->next;
- if (cp && cp->enabled == e_ON) {
+ if (cp && (cp->enabled == e_ON)) {
+
/* If condition test fails, skip this checkpoint */
if (cp->condition) {
if (!mon_evaluate_conditional(cp->condition)) {
@@ -612,11 +634,18 @@
if (!prev_entry) {
*head = new_entry;
new_entry->next = cur_entry;
+#ifdef DEBUG_BREAKPOINTS
+ dump_checkpoint_list();
+#endif
return;
}
prev_entry->next = new_entry;
new_entry->next = cur_entry;
+
+#ifdef DEBUG_BREAKPOINTS
+ dump_checkpoint_list();
+#endif
}
static
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-03 14:36:54
|
Revision: 45812
http://sourceforge.net/p/vice-emu/code/45812
Author: gpz
Date: 2025-11-03 14:36:52 +0000 (Mon, 03 Nov 2025)
Log Message:
-----------
make sure the first character is printed after manually enabling the printer
Modified Paths:
--------------
trunk/vice/src/printerdrv/interface-userport.c
Modified: trunk/vice/src/printerdrv/interface-userport.c
===================================================================
--- trunk/vice/src/printerdrv/interface-userport.c 2025-11-03 13:57:08 UTC (rev 45811)
+++ trunk/vice/src/printerdrv/interface-userport.c 2025-11-03 14:36:52 UTC (rev 45812)
@@ -112,6 +112,9 @@
/* ------------------------------------------------------------------------- */
+static uint8_t value; /* userport value */
+static uint8_t strobe;
+
static int userport_printer_enabled = 0;
#define USERPORT_OUTPUT (NUM_OUTPUT_SELECT - 1)
@@ -127,6 +130,7 @@
if (driver_select_open(USERPORT_OUTPUT, DRIVER_FIRST_OPEN) >= 0) {
if (driver_select_open(USERPORT_OUTPUT, 4) >= 0) {
userport_printer_enabled = 1;
+ strobe = 1; /* make sure the first hi->lo transition is detected */
}
}
}
@@ -147,9 +151,6 @@
/* ------------------------------------------------------------------------- */
-static uint8_t value; /* userport value */
-static uint8_t strobe;
-
static void userport_printer_store_pbx(uint8_t b, int pulse)
{
value = b;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-03 13:57:10
|
Revision: 45811
http://sourceforge.net/p/vice-emu/code/45811
Author: gpz
Date: 2025-11-03 13:57:08 +0000 (Mon, 03 Nov 2025)
Log Message:
-----------
fix copypaste bug, makes formfeed for userport printer work again
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-11-01 22:34:01 UTC (rev 45810)
+++ trunk/vice/src/arch/gtk3/widgets/settings_printer.c 2025-11-03 13:57:08 UTC (rev 45811)
@@ -71,7 +71,6 @@
#define PRINTER_NUM 4 /**< number of printer devices supported */
#define PRINTER_MIN 4 /**< lowest device number for a printer */
#define PRINTER_MAX 7 /**< highest device number for a printer */
-#define PRINTER_USERPORT 3 /**< userport printer virtual device number */
/** \brief GtkStack child data */
@@ -136,7 +135,6 @@
.title = "OpenCBM 7",
.name = "opencbm7",
.device = 7,
- .device_drv = PRINTER_USERPORT, /* 3 */
.has_trapdev = true,
.has_iec = true,
.has_realdev = true,
@@ -145,6 +143,7 @@
.title = "Userport",
.name = "userport",
.device = 3,
+ .device_drv = PRINTER_USERPORT, /* 3 */
.has_userport = true,
.has_driver = true,
.has_outmode = true,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-01 22:34:03
|
Revision: 45810
http://sourceforge.net/p/vice-emu/code/45810
Author: gpz
Date: 2025-11-01 22:34:01 +0000 (Sat, 01 Nov 2025)
Log Message:
-----------
better/generic fix for #2161
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
trunk/vice/src/joyport/joystick.c
Modified: trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-11-01 18:18:25 UTC (rev 45809)
+++ trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-11-01 22:34:01 UTC (rev 45810)
@@ -336,8 +336,6 @@
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);
Modified: trunk/vice/src/joyport/joystick.c
===================================================================
--- trunk/vice/src/joyport/joystick.c 2025-11-01 18:18:25 UTC (rev 45809)
+++ trunk/vice/src/joyport/joystick.c 2025-11-01 22:34:01 UTC (rev 45810)
@@ -4041,13 +4041,17 @@
sizeof *joydev->axes * (size_t)joydev->max_axes);
}
+ /* Digital axis detection */
+ axis->digital = (axis->minimum == -1 && axis->maximum == 1);
+
/* set default calibration */
joystick_calibration_default_for_axis(axis);
#if 0
- printf("AXIS %d: min: %d, N-threshold: %d, P-threshold: %d, max: %d\n",
+ printf("AXIS %d: min: %d, N-threshold: %d, P-threshold: %d, max: %d, digital: %d\n",
joydev->num_axes,
axis->minimum, axis->calibration.threshold.negative,
- axis->calibration.threshold.positive, axis->maximum);
+ axis->calibration.threshold.positive, axis->maximum,
+ axis->digital);
#endif
/* store parent device */
axis->device = joydev;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-11-01 18:18:26
|
Revision: 45809
http://sourceforge.net/p/vice-emu/code/45809
Author: gpz
Date: 2025-11-01 18:18:25 +0000 (Sat, 01 Nov 2025)
Log Message:
-----------
(re)size monitor window when it is opened, not when it is resumed. seems to fix the problem that the monitor does not render when it is not the default size on first open. needs more testing.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/uimon.c
Modified: trunk/vice/src/arch/gtk3/uimon.c
===================================================================
--- trunk/vice/src/arch/gtk3/uimon.c 2025-10-26 18:14:15 UTC (rev 45808)
+++ trunk/vice/src/arch/gtk3/uimon.c 2025-11-01 18:18:25 UTC (rev 45809)
@@ -1276,7 +1276,27 @@
return false;
}
+static void mon_set_pos(int xpos, int ypos)
+{
+ DBG(("mon_set_pos window xpos:%3d ypos:%3d", xpos, ypos));
+ if ((xpos == INT_MIN) || (ypos == INT_MIN)) {
+ /* Only center if we didn't get either a previous position or
+ * the position was set via the command line.
+ */
+ gtk_window_set_position(GTK_WINDOW(fixed.window), GTK_WIN_POS_CENTER);
+ } else {
+ gtk_window_move(GTK_WINDOW(fixed.window), xpos, ypos);
+ }
+}
+static void mon_set_size(int width, int height)
+{
+ DBG(("mon_set_size window resize width:%3d height:%3d", width, height));
+ if ((width > 0) && (height > 0)) {
+ gtk_window_resize(GTK_WINDOW(fixed.window), width, height);
+ }
+}
+
static gboolean uimon_window_open_impl(gpointer user_data)
{
bool display_now = (bool)user_data;
@@ -1286,6 +1306,8 @@
int sblines;
int xpos = INT_MIN;
int ypos = INT_MIN;
+ int height = 0;
+ int width = 0;
pthread_mutex_lock(&fixed.lock);
@@ -1297,12 +1319,14 @@
resources_get_int("MonitorXPos", &xpos);
resources_get_int("MonitorYPos", &ypos);
- if (xpos == INT_MIN || ypos == INT_MIN) {
- /* Only center if we didn't get either a previous position or
- * the position was set via the command line.
- */
- gtk_window_set_position(GTK_WINDOW(fixed.window), GTK_WIN_POS_CENTER);
- }
+ resources_get_int("MonitorHeight", &height);
+ resources_get_int("MonitorWidth", &width);
+ DBG(("uimon_window_open_impl window xpos:%3d ypos:%3d width:%3d height:%3d",
+ xpos, ypos, width, height));
+
+ mon_set_pos(xpos, ypos);
+ mon_set_size(width, height);
+
/* Set the gravity so that gtk doesn't over-compensate for the
* window's border width when saving/restoring its position. */
gtk_window_set_gravity(GTK_WINDOW(fixed.window), GDK_GRAVITY_STATIC);
@@ -1330,6 +1354,7 @@
/* base size should be multiple of .._inc, else we get funky effects */
hints.base_width = hints.width_inc;
hints.base_height = hints.height_inc;
+ DBG(("uimon_window_open_impl font width:%3d height:%3d", hints.width_inc, hints.height_inc));
gtk_window_set_geometry_hints (GTK_WINDOW (fixed.window),
fixed.term,
&hints,
@@ -1339,7 +1364,10 @@
GDK_HINT_USER_POS |
GDK_HINT_USER_SIZE);
- vte_terminal_set_size(VTE_TERMINAL(fixed.term), DEFAULT_COLUMNS, DEFAULT_ROWS);
+ if ((xpos == INT_MIN) || (ypos == INT_MIN)) {
+ DBG(("uimon_window_open_impl set vte size to defaults"));
+ vte_terminal_set_size(VTE_TERMINAL(fixed.term), DEFAULT_COLUMNS, DEFAULT_ROWS);
+ }
scrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL,
gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(fixed.term)));
@@ -1399,32 +1427,33 @@
/* Ensure any queued monitor output is displayed */
gdk_threads_add_timeout(0, write_to_terminal, NULL);
-
return FALSE;
}
static gboolean uimon_window_resume_impl(gpointer user_data)
{
- int xpos;
- int ypos;
- int height;
- int width;
+ int xpos = INT_MIN;
+ int ypos = INT_MIN;
+ int height = 0;
+ int width = 0;
resources_get_int("MonitorXPos", &xpos);
resources_get_int("MonitorYPos", &ypos);
resources_get_int("MonitorHeight", &height);
resources_get_int("MonitorWidth", &width);
+ DBG(("uimon_window_resume_impl window xpos:%3d ypos:%3d width:%3d height:%3d",
+ xpos, ypos, width, height));
gtk_widget_show_all(fixed.window);
on_term_text_modified(VTE_TERMINAL(fixed.term), NULL);
- if (xpos > INT_MIN && ypos > INT_MIN) {
- gtk_window_move(GTK_WINDOW(fixed.window), xpos, ypos);
- }
- if (width >= 0 && height >= 0) {
- gtk_window_resize(GTK_WINDOW(fixed.window), width, height);
- }
+ mon_set_pos(xpos, ypos);
+#if 0
+ /* BUG: this makes it hang first time the monitor window is opened */
+ mon_set_size(height, width);
+#endif
+
/*
* Make the monitor window appear on top of the active emulated machine
* window. This makes the monitor window show when the emulated machine
@@ -1431,7 +1460,6 @@
* window is in fullscreen mode. (only tested on Windows 10)
*/
gtk_window_present(GTK_WINDOW(fixed.window));
-
return FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-26 18:14:17
|
Revision: 45808
http://sourceforge.net/p/vice-emu/code/45808
Author: pottendo
Date: 2025-10-26 18:14:15 +0000 (Sun, 26 Oct 2025)
Log Message:
-----------
enable FunMP3 also for SDL win32 builds
Modified Paths:
--------------
trunk/vice/configure.ac
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2025-10-26 16:38:35 UTC (rev 45807)
+++ trunk/vice/configure.ac 2025-10-26 18:14:15 UTC (rev 45808)
@@ -3148,7 +3148,7 @@
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
+ if test x"$is_win32" = "xyes"; then
AC_DEFINE(HAVE_GLOB_H,,)
else
AC_CHECK_HEADERS(glob.h,,)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-26 16:38:38
|
Revision: 45807
http://sourceforge.net/p/vice-emu/code/45807
Author: pottendo
Date: 2025-10-26 16:38:35 +0000 (Sun, 26 Oct 2025)
Log Message:
-----------
fixed crash, happened when changing userport cart away from FunMP3
Modified Paths:
--------------
trunk/vice/src/userport/userport_funmp3.c
Modified: trunk/vice/src/userport/userport_funmp3.c
===================================================================
--- trunk/vice/src/userport/userport_funmp3.c 2025-10-25 13:21:19 UTC (rev 45806)
+++ trunk/vice/src/userport/userport_funmp3.c 2025-10-26 16:38:35 UTC (rev 45807)
@@ -334,6 +334,7 @@
funmp3_stop();
if (mh) {
mpg123_delete(mh);
+ mh = NULL;
}
if (bufr) {
lib_free(bufr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-10-25 13:21:22
|
Revision: 45806
http://sourceforge.net/p/vice-emu/code/45806
Author: rhialto
Date: 2025-10-25 13:21:19 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
r45801 changed screenshots slightly, so adjust them
We adjust the reference screenshots for those cases that look like they
should pass.
Test crtc0 sometimes spuriously fails; the screenshot seems to be taken
when a rasterline in in the process of being drawn (if this is
possible?)
Test crtc10 seems to have regressed at some point in the past; at least
the reference screenshot looks more like the hardware screen photo than
the current code produces.
Modified Paths:
--------------
testprogs/CRTC/references/crtc0.prg.png
testprogs/CRTC/references/crtc11.prg.png
testprogs/CRTC/references/crtc12.prg.png
testprogs/CRTC/references/crtc4.prg.png
testprogs/CRTC/references/crtc5.prg.png
testprogs/CRTC/references/crtc6.prg.png
testprogs/CRTC/references/crtc7.prg.png
testprogs/CRTC/references/crtc8.prg.png
testprogs/CRTC/references/crtc9.prg.png
testprogs/testbench/selftest/references/pet-pass.prg.png
testprogs/testbench/xcbm2-hooks.sh
testprogs/testbench/xcbm5x0-hooks.sh
Modified: testprogs/CRTC/references/crtc0.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc11.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc12.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc4.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc5.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc6.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc7.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc8.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/CRTC/references/crtc9.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/testbench/selftest/references/pet-pass.prg.png
===================================================================
(Binary files differ)
Modified: testprogs/testbench/xcbm2-hooks.sh
===================================================================
--- testprogs/testbench/xcbm2-hooks.sh 2025-10-25 13:19:46 UTC (rev 45805)
+++ testprogs/testbench/xcbm2-hooks.sh 2025-10-25 13:21:19 UTC (rev 45806)
@@ -1,7 +1,7 @@
XCBM2OPTS+=" -default"
XCBM2OPTS+=" -model 610"
-XCBM2OPTS+=" -virtualdev8"
+XCBM2OPTS+=" -busdevice8"
XCBM2OPTS+=" +drive8truedrive"
XCBM2OPTS+=" -CRTCfilter 0"
XCBM2OPTS+=" -CRTCextpal"
Modified: testprogs/testbench/xcbm5x0-hooks.sh
===================================================================
--- testprogs/testbench/xcbm5x0-hooks.sh 2025-10-25 13:19:46 UTC (rev 45805)
+++ testprogs/testbench/xcbm5x0-hooks.sh 2025-10-25 13:21:19 UTC (rev 45806)
@@ -1,7 +1,7 @@
XCBM5X0OPTS+=" -default"
XCBM5X0OPTS+=" -model 510"
-XCBM5X0OPTS+=" -virtualdev8"
+XCBM5X0OPTS+=" -busdevice8"
XCBM5X0OPTS+=" +drive8truedrive"
XCBM5X0OPTS+=" -VICIIfilter 0"
XCBM5X0OPTS+=" -VICIIextpal"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-25 13:19:48
|
Revision: 45805
http://sourceforge.net/p/vice-emu/code/45805
Author: gpz
Date: 2025-10-25 13:19:46 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
fix usbsid driver init, patch by LouD. Also updated the usbsid lib, which fixes some warning(s)
Modified Paths:
--------------
trunk/vice/src/arch/shared/hwsiddrv/us-unixwin-device.c
trunk/vice/src/lib/libusbsiddrv/USBSID.cpp
trunk/vice/src/lib/libusbsiddrv/USBSID.h
trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.cpp
trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.h
Modified: trunk/vice/src/arch/shared/hwsiddrv/us-unixwin-device.c
===================================================================
--- trunk/vice/src/arch/shared/hwsiddrv/us-unixwin-device.c 2025-10-25 13:09:13 UTC (rev 45804)
+++ trunk/vice/src/arch/shared/hwsiddrv/us-unixwin-device.c 2025-10-25 13:19:46 UTC (rev 45805)
@@ -113,8 +113,8 @@
/* Gather settings from resources */
resources_get_int("SidUSBSIDReadMode", &r_readmode);
resources_get_int("SidUSBSIDAudioMode", &r_audiomode);
- resources_get_int("SidUSBSIDDiffSize", &r_readmode);
- resources_get_int("SidUSBSIDBufferSize", &r_diffsize);
+ resources_get_int("SidUSBSIDDiffSize", &r_diffsize);
+ resources_get_int("SidUSBSIDBufferSize", &r_buffsize);
/* Apply settings to local variables */
readmode = r_readmode;
audiomode = r_audiomode;
@@ -162,9 +162,10 @@
int us_device_close(void)
{
log_message(usbsid_log, "Start device closing");
- if (usbsid) {
+ if (usbsid != NULL) {
mute_USBSID(usbsid);
close_USBSID(usbsid);
+ usbsid = NULL;
}
/* Clean up vars */
Modified: trunk/vice/src/lib/libusbsiddrv/USBSID.cpp
===================================================================
--- trunk/vice/src/lib/libusbsiddrv/USBSID.cpp 2025-10-25 13:09:13 UTC (rev 45804)
+++ trunk/vice/src/lib/libusbsiddrv/USBSID.cpp 2025-10-25 13:19:46 UTC (rev 45805)
@@ -433,7 +433,7 @@
/* SYNCHRONOUS */
-void USBSID_Class::USBSID_SingleWrite(unsigned char *buff, size_t len)
+void USBSID_Class::USBSID_SingleWrite(unsigned char *buff, int len)
{
if (!us_Initialised) return;
int actual_length = 0;
@@ -462,7 +462,7 @@
return result[0];
}
-unsigned char USBSID_Class::USBSID_SingleReadConfig(unsigned char *buff, size_t len)
+unsigned char USBSID_Class::USBSID_SingleReadConfig(unsigned char *buff, int len)
{
if (!us_Initialised) return 0;
int actual_length;
@@ -550,8 +550,8 @@
write_buffer[0] = (CYCLED_WRITE << 6);
write_buffer[1] = (reg & 0xFF);
write_buffer[2] = val;
- write_buffer[3] = (cycles >> 8);
- write_buffer[4] = (cycles & 0xFF);
+ write_buffer[3] = (uint8_t)(cycles >> 8);
+ write_buffer[4] = (uint8_t)(cycles & 0xFF);
USBSID_Write(write_buffer, 5);
return;
}
@@ -655,8 +655,8 @@
flush_buffer = 0;
run_thread = buffer_pos = 1;
threaded = withcycles = true;
+ USBSID_InitRingBuffer(ring_size, diff_size);
pthread_mutex_lock(&us_mutex);
- USBSID_InitRingBuffer(ring_size, diff_size);
us_thread++;
pthread_mutex_unlock(&us_mutex);
int error;
@@ -843,8 +843,8 @@
? (buffer_pos >= 5)
: (buffer_pos >= 3))) {
thread_buffer[0] = (withcycles == 1)
- ? (CYCLED_WRITE << 6 | (buffer_pos - 1))
- : (WRITE << 6 | (buffer_pos - 1));
+ ? (uint8_t)(CYCLED_WRITE << 6 | (buffer_pos - 1))
+ : (uint8_t)(WRITE << 6 | (buffer_pos - 1));
memcpy(out_buffer, thread_buffer, buffer_pos);
buffer_pos = 1;
flush_buffer = 0;
@@ -876,8 +876,8 @@
if (threaded && withcycles) {
USBSID_RingPut(reg);
USBSID_RingPut(val);
- USBSID_RingPut((cycles >> 8) & 0xFF);
- USBSID_RingPut(cycles & 0xFF);
+ USBSID_RingPut((uint8_t)(cycles >> 8) & 0xFF);
+ USBSID_RingPut((uint8_t)(cycles & 0xFF));
} else {
USBERR(stderr, "[USBSID] Function '%s' cannot be used when threaded = %d and withcycles = %d\n", __func__, threaded, withcycles);
}
@@ -895,7 +895,7 @@
|| buffer_pos == len_out_buffer
|| flush_buffer == 1) {
flush_buffer = 0;
- thread_buffer[0] = (CYCLED_WRITE << 6 | (buffer_pos - 1));
+ thread_buffer[0] = (uint8_t)((CYCLED_WRITE << 6) | (buffer_pos - 1));
memcpy(out_buffer, thread_buffer, buffer_pos);
buffer_pos = 1;
libusb_submit_transfer(transfer_out);
@@ -917,7 +917,7 @@
|| buffer_pos == len_out_buffer
|| flush_buffer == 1) {
flush_buffer = 0;
- thread_buffer[0] = (WRITE << 6 | (buffer_pos - 1));
+ thread_buffer[0] = (uint8_t)((WRITE << 6) | (buffer_pos - 1));
memcpy(out_buffer, thread_buffer, buffer_pos);
buffer_pos = 1;
libusb_submit_transfer(transfer_out);
@@ -951,7 +951,7 @@
static uint8_t a;
switch (addr) {
case 0xD400 ... 0xD499:
- a = (addr & SIDLMASK); /* $D400 -> $D479 1, 2, 3 & 4 */
+ a = (uint8_t)(addr & SIDLMASK); /* $D400 -> $D479 1, 2, 3 & 4 */
break;
case 0xD500 ... 0xD599:
case 0xDE00 ... 0xDF99:
@@ -958,7 +958,7 @@
a = ((SID3ADDR | (addr & SID2MASK)) & SIDLMASK);
break;
default:
- a = (addr & SIDLMASK);
+ a = (uint8_t)(addr & SIDLMASK);
break;
}
return a;
@@ -973,7 +973,7 @@
USBSID_GetClockRate(); /* Make sure we use the right clockrate */
us_InvCPUcycleDurationNanoSeconds = 1.0 / (ratio_t::den / (float)cycles_per_sec);
auto nsec = std::chrono::duration_cast<std::chrono::nanoseconds>(timestamp - m_StartTime);
- return (int_fast64_t)(nsec.count() * us_InvCPUcycleDurationNanoSeconds);
+ return (int_fast64_t)((double)nsec.count() * us_InvCPUcycleDurationNanoSeconds);
}
uint_fast64_t USBSID_Class::USBSID_WaitForCycle(uint_fast16_t cycles)
@@ -981,7 +981,7 @@
if (!us_Initialised) return 0;
USBSID_GetClockRate(); /* Make sure we use the right clockrate */
timestamp_t now = std::chrono::high_resolution_clock::now();
- double dur = cycles * us_CPUcycleDuration; /* duration in nanoseconds */
+ double dur = (double)cycles * us_CPUcycleDuration; /* duration in nanoseconds */
duration_t duration = (duration_t)(int_fast64_t)dur; /* equals dur but as chrono nanoseconds */
auto target_time = m_LastTime + duration; /* ns to wait since m_LastTime (now + duration for actual wait time) */
// auto target_time = now + duration; /* ns to wait since m_LastTime (now + duration for actual wait time) */
@@ -993,7 +993,7 @@
}
m_LastTime = target_time;
/* int_fast64_t waited_cycles = wait_usec.count(); */
- int_fast64_t waited_cycles = (wait_nsec.count() * us_InvCPUcycleDurationNanoSeconds);
+ int_fast64_t waited_cycles = (int_fast64_t)((double)wait_nsec.count() * us_InvCPUcycleDurationNanoSeconds);
// USBDBG(stdout, "[C] %ld [WC] %ld [us] %ld [ns] %ld [ts] %lu\n",
// cycles, waited_cycles, wait_usec.count(), wait_nsec.count(), USBSID_CycleFromTimestamp(now));
// return (wait_nsec.count() > 0) ? waited_cycles : 0;
@@ -1031,7 +1031,7 @@
return;
}
-int USBSID_Class::LIBUSB_Available(libusb_context *ctx, uint16_t vendor_id, uint16_t product_id)
+int USBSID_Class::LIBUSB_Available(uint16_t vendor_id, uint16_t product_id)
{
struct libusb_device **devs;
struct libusb_device *dev;
@@ -1239,7 +1239,7 @@
libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, 0);
/* Check for an available USBSID-Pico */
- if (LIBUSB_Available(ctx, VENDOR_ID, PRODUCT_ID) <= 0) {
+ if (LIBUSB_Available(VENDOR_ID, PRODUCT_ID) <= 0) {
USBDBG(stderr, "[USBSID] USBSID-Pico not connected\n");
goto out;
}
Modified: trunk/vice/src/lib/libusbsiddrv/USBSID.h
===================================================================
--- trunk/vice/src/lib/libusbsiddrv/USBSID.h 2025-10-25 13:09:13 UTC (rev 45804)
+++ trunk/vice/src/lib/libusbsiddrv/USBSID.h 2025-10-25 13:19:46 UTC (rev 45805)
@@ -287,7 +287,7 @@
/* LIBUSB */
int LIBUSB_Setup(bool start_threaded, bool with_cycles);
int LIBUSB_Exit(void);
- int LIBUSB_Available(libusb_context *ctx, uint16_t vendor_id, uint16_t product_id);
+ int LIBUSB_Available(uint16_t vendor_id, uint16_t product_id);
void LIBUSB_StopTransfers(void);
int LIBUSB_OpenDevice(void);
void LIBUSB_CloseDevice(void);
@@ -365,9 +365,9 @@
void USBSID_ToggleStereo(void); /* Toggle between mono and stereo ~ v1.3 PCB only */
/* Synchronous direct */
- void USBSID_SingleWrite(unsigned char *buff, size_t len); /* Single write buffer of size_t ~ example: config writing */
+ void USBSID_SingleWrite(unsigned char *buff, int len); /* Single write buffer of size_t ~ example: config writing */
unsigned char USBSID_SingleRead(uint8_t reg); /* Single read register, return result */
- unsigned char USBSID_SingleReadConfig(unsigned char *buff, size_t len); /* Single to buffer of specified length ~ example: config reading */
+ unsigned char USBSID_SingleReadConfig(unsigned char *buff, int len); /* Single to buffer of specified length ~ example: config reading */
/* Asynchronous direct */
void USBSID_Write(unsigned char *buff, size_t len); /* Write buffer of size_t len */
Modified: trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.cpp
===================================================================
--- trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.cpp 2025-10-25 13:09:13 UTC (rev 45804)
+++ trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.cpp 2025-10-25 13:19:46 UTC (rev 45805)
@@ -117,7 +117,7 @@
if( p == NULL ) return -1;
return ((USBSID_Class*)p)->us_Found;
}
- void writesingle_USBSID(USBSIDitf p, unsigned char *buff, size_t len){
+ void writesingle_USBSID(USBSIDitf p, unsigned char *buff, int len){
if( p == NULL ) return;
return ((USBSID_Class*)p)->USBSID_SingleWrite(buff, len);
};
@@ -125,7 +125,7 @@
if( p == NULL ) return 0;
return ((USBSID_Class*)p)->USBSID_SingleRead(reg);
};
- void writebuffer_USBSID(USBSIDitf p, unsigned char *buff, size_t len){
+ void writebuffer_USBSID(USBSIDitf p, unsigned char *buff, int len){
if( p == NULL ) return;
return ((USBSID_Class*)p)->USBSID_Write(buff, len);
};
Modified: trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.h
===================================================================
--- trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.h 2025-10-25 13:09:13 UTC (rev 45804)
+++ trunk/vice/src/lib/libusbsiddrv/USBSIDInterface.h 2025-10-25 13:19:46 UTC (rev 45805)
@@ -62,11 +62,11 @@
int found_USBSID(USBSIDitf);
/* Synchronous direct */
- void writesingle_USBSID(USBSIDitf, unsigned char *buff, size_t len);
+ void writesingle_USBSID(USBSIDitf, unsigned char *buff, int len);
unsigned char readsingle_USBSID(USBSIDitf, uint8_t reg);
/* Asynchronous direct */
- void writebuffer_USBSID(USBSIDitf, unsigned char *buff, size_t len);
+ void writebuffer_USBSID(USBSIDitf, unsigned char *buff, int len);
void write_USBSID(USBSIDitf, uint8_t reg, uint8_t val);
void writecycled_USBSID(USBSIDitf, uint8_t reg, uint8_t val, uint16_t cycles);
unsigned char read_USBSID(USBSIDitf p, uint8_t reg);
@@ -79,6 +79,7 @@
void enablethread_USBSID(USBSIDitf);
void disablethread_USBSID(USBSIDitf);
void setflush_USBSID(USBSIDitf);
+ void flush_USBSID(USBSIDitf);
void restartringbuffer_USBSID(USBSIDitf);
void setbuffsize_USBSID(USBSIDitf, int size);
void setdiffsize_USBSID(USBSIDitf, int size);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-25 13:09:16
|
Revision: 45804
http://sourceforge.net/p/vice-emu/code/45804
Author: pottendo
Date: 2025-10-25 13:09:13 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
added FunMP3 init
Modified Paths:
--------------
trunk/vice/src/scpu64/scpu64.c
Modified: trunk/vice/src/scpu64/scpu64.c
===================================================================
--- trunk/vice/src/scpu64/scpu64.c 2025-10-25 13:08:13 UTC (rev 45803)
+++ trunk/vice/src/scpu64/scpu64.c 2025-10-25 13:09:13 UTC (rev 45804)
@@ -133,6 +133,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"
@@ -866,6 +867,9 @@
/* Initialize userport based sound chips */
userport_dac_sound_chip_init();
+#if defined(USE_MPG123) && defined (HAVE_GLOB_H)
+ userport_funmp3_sound_chip_init();
+#endif
drive_sound_init();
video_sound_init();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-10-25 13:08:15
|
Revision: 45803
http://sourceforge.net/p/vice-emu/code/45803
Author: rhialto
Date: 2025-10-25 13:08:13 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
This was missed in r45781 Rename (virtual/trap) device related settings (bug 2162)
Modified Paths:
--------------
trunk/vice/src/cbm2/cbm5x0.c
Modified: trunk/vice/src/cbm2/cbm5x0.c
===================================================================
--- trunk/vice/src/cbm2/cbm5x0.c 2025-10-25 12:19:11 UTC (rev 45802)
+++ trunk/vice/src/cbm2/cbm5x0.c 2025-10-25 13:08:13 UTC (rev 45803)
@@ -308,6 +308,10 @@
the machine itself with `machine_init()'. */
int machine_resources_init(void)
{
+ if (parallel_resources_init() < 0) {
+ init_resource_fail("parallel");
+ return -1;
+ }
if (traps_resources_init() < 0) {
init_resource_fail("traps");
return -1;
@@ -451,6 +455,10 @@
/* CBM-II-specific command-line option initialization. */
int machine_cmdline_options_init(void)
{
+ if (parallel_cmdline_options_init() < 0) {
+ init_cmdline_options_fail("parallel");
+ return -1;
+ }
if (traps_cmdline_options_init() < 0) {
init_cmdline_options_fail("traps");
return -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-10-25 12:19:13
|
Revision: 45802
http://sourceforge.net/p/vice-emu/code/45802
Author: gpz
Date: 2025-10-25 12:19:11 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
fix warning
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/novte/vteconv.cc
Modified: trunk/vice/src/arch/gtk3/novte/vteconv.cc
===================================================================
--- trunk/vice/src/arch/gtk3/novte/vteconv.cc 2025-10-25 11:56:52 UTC (rev 45801)
+++ trunk/vice/src/arch/gtk3/novte/vteconv.cc 2025-10-25 12:19:11 UTC (rev 45802)
@@ -253,7 +253,8 @@
/* Possibly convert the input data from gunichars to UTF-8. */
if (converter->in_unichar) {
- int i; gulong char_count;
+ gulong i;
+ gulong char_count;
guchar *p, *end;
gunichar *g;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-10-25 11:56:55
|
Revision: 45801
http://sourceforge.net/p/vice-emu/code/45801
Author: rhialto
Date: 2025-10-25 11:56:52 +0000 (Sat, 25 Oct 2025)
Log Message:
-----------
Fix bug 2175: CRTC 80x42 text mode does not display properly.
The test program set the CRTC to 42 lines of 7 scan lines each, making
294 scan lines total. This needs a PET 8296 to have sufficient screen
memory for all these character positions. This didn't fit in the standard
window size (which could fit up to 256 scanlines). As a result, various
unwritten assumptions in the code where the CRTC interacted with raster/*.c
code must have been broken, and the display was not just truncated but garbled.
We fix this by adding some code to resize the window larger when needed (and
also smaller if the required size is much smaller than the current size).
Various border sizes seemed to be applied inconsistently; this was changed.
Since the code never draws a top and bottom border, the allocation of render
bitmaps for the GTK3 GUI was changed to clear them before use. This normally
only happens once or twice at startup, and again when resizing the window
larger. Therefore this has no performance impact.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/render_queue.c
trunk/vice/src/crtc/crtc-mem.c
trunk/vice/src/crtc/crtc.c
trunk/vice/src/crtc/crtctypes.h
trunk/vice/src/raster/raster.c
Modified: trunk/vice/src/arch/gtk3/render_queue.c
===================================================================
--- trunk/vice/src/arch/gtk3/render_queue.c 2025-10-24 14:08:06 UTC (rev 45800)
+++ trunk/vice/src/arch/gtk3/render_queue.c 2025-10-25 11:56:52 UTC (rev 45801)
@@ -138,7 +138,7 @@
/* Make sure there's at least the requested size in bytes */
if (bb->pixel_data_size_bytes < pixel_data_size_bytes) {
lib_free(bb->pixel_data);
- bb->pixel_data = lib_malloc(pixel_data_size_bytes);
+ bb->pixel_data = lib_calloc(pixel_data_size_bytes, 1);
bb->pixel_data_size_bytes = pixel_data_size_bytes;
}
Modified: trunk/vice/src/crtc/crtc-mem.c
===================================================================
--- trunk/vice/src/crtc/crtc-mem.c 2025-10-24 14:08:06 UTC (rev 45800)
+++ trunk/vice/src/crtc/crtc-mem.c 2025-10-25 11:56:52 UTC (rev 45801)
@@ -83,6 +83,7 @@
if (crtc.initialized) {
alarm_set(crtc.raster_draw_alarm, crtc.rl_start + value);
}
+ crtc.delayed_resize = true;
break;
case CRTC_REG_HDISP: /* R01 Horizontal characters displayed */
@@ -108,6 +109,7 @@
crtc_fetch_prefetch();
}
#endif
+ crtc.delayed_resize = true;
break;
case CRTC_REG_HSYNC: /* R02 Horizontal Sync Position */
@@ -122,18 +124,22 @@
case CRTC_REG_VTOTAL: /* R04 Vertical total (character) rows */
crtc.regs[CRTC_REG_VTOTAL] &= 0x7f;
+ crtc.delayed_resize = true;
break;
case CRTC_REG_VTOTALADJ: /* R05 Vertical total line adjust */
crtc.regs[CRTC_REG_VTOTALADJ] &= 0x1f;
+ crtc.delayed_resize = true;
break;
case CRTC_REG_VDISP: /* R06 Number of display lines on screen */
crtc.regs[CRTC_REG_VDISP] &= 0x7f;
+ crtc.delayed_resize = true;
break;
case CRTC_REG_VSYNC: /* R07 Vertical sync position */
crtc.regs[CRTC_REG_VSYNC] &= 0x7f;
+ crtc.delayed_resize = true;
break;
case CRTC_REG_MODECTRL: /* R08 unused: Interlace and Skew */
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2025-10-24 14:08:06 UTC (rev 45800)
+++ trunk/vice/src/crtc/crtc.c 2025-10-25 11:56:52 UTC (rev 45801)
@@ -41,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include "alarm.h"
#include "crtc-cmdline-options.h"
@@ -88,6 +89,7 @@
.screen_width = 340,
.screen_height = 270,
+ .delayed_resize = false,
.hw_cursor = 0,
.hw_cols = 1,
@@ -135,6 +137,7 @@
.current_charline = 0,
.blank = 0,
+ .vadj_counter = 0,
.frame_start = 0,
.cycles_per_frame = 0,
@@ -217,7 +220,7 @@
*
* crtc_set_screen_options(int num_cols, int rasterlines);
* num_cols -> 40 or 80
- * rasterlines-> number of (text data) rasterlines (25*8, 25*14)
+ * rasterlines-> number of (text data) rasterlines (25*10, 25*14)
*
*
* The CRTC memory and charset can be changed by the CPU. Those
@@ -343,33 +346,74 @@
/* update screen window */
void crtc_update_window(void)
{
+ bool do_resize = false;
+
if (!crtc.initialized) {
return;
}
+ /* expression copied from crtc_set_screen_options() */
+ unsigned int screen_height = crtc.framelines + CRTC_EXTRA_RASTERLINES + 2 * CRTC_SCREEN_BORDERHEIGHT;
+ unsigned int max_drawn_lines = crtc.regs[CRTC_REG_VTOTAL] * (crtc.regs[CRTC_REG_SCANLINE] + 1) +
+ crtc.regs[CRTC_REG_VTOTALADJ] +
+ 2 * CRTC_SCREEN_BORDERHEIGHT;
+
+ if (screen_height > crtc.screen_height ||
+ (max_drawn_lines > screen_height && max_drawn_lines < crtc.screen_height)) {
+ /*
+ * We only increase the screen height here, but it would also
+ * work if we acted on all size changes. However that already
+ * triggers on the switch between upper- and lower case modes
+ * with its change in line spacing. If the underlying code would
+ * just change the vertical window size, this would be fine. But
+ * it often seems to adjust scaling of the bitmap inside the
+ * window, with the result that the vertical size remains the
+ * same, but the scale changes and with it the horizontal size.
+ * And that is just weird because it doesn't reflect what
+ * happens on the screen of the real thing.
+ *
+ * We decrease the height if there would not be enough lines drawn to
+ * cover the whole screen, which would probably result in old stuff
+ * remaining when it should be blanked out.
+ */
+ crtc.screen_height = screen_height;
+ do_resize = true;
+ }
+
crtc.raster.display_ystart = CRTC_SCREEN_BORDERHEIGHT;
crtc.raster.display_ystop = crtc.screen_height
- - 2 * CRTC_SCREEN_BORDERHEIGHT;
+ - CRTC_SCREEN_BORDERHEIGHT;
crtc.raster.display_xstart = CRTC_SCREEN_BORDERWIDTH;
crtc.raster.display_xstop = crtc.screen_width
- - 2 * CRTC_SCREEN_BORDERWIDTH;
+ - CRTC_SCREEN_BORDERWIDTH;
crtc_update_renderer();
- raster_set_geometry(&crtc.raster,
- crtc.screen_width, crtc.screen_height - 2 * CRTC_SCREEN_BORDERHEIGHT,
- crtc.screen_width, crtc.screen_height,
- crtc.screen_width - 2 * CRTC_SCREEN_BORDERWIDTH,
- crtc.screen_height - 2 * CRTC_SCREEN_BORDERHEIGHT,
- CRTC_SCREEN_TEXTCOLS(), CRTC_SCREEN_TEXTLINES(),
- CRTC_SCREEN_BORDERWIDTH, CRTC_SCREEN_BORDERHEIGHT,
- 0,
- CRTC_FIRST_DISPLAYED_LINE,
- CRTC_LAST_DISPLAYED_LINE,
- 0, 0);
+ raster_set_geometry(&crtc.raster, /* */
+ crtc.screen_width, /* canvas_width */
+ crtc.screen_height, // - 2 * CRTC_SCREEN_BORDERHEIGHT, /* canvas_height */
+ crtc.screen_width, /* screen_width */
+ crtc.screen_height, /* screen_height */
+ crtc.screen_width - 2 * CRTC_SCREEN_BORDERWIDTH, /* gfx_width */
+ crtc.screen_height - 2 * CRTC_SCREEN_BORDERHEIGHT, /* gfx_height */
+ CRTC_SCREEN_TEXTCOLS(), /* text_width */
+ CRTC_SCREEN_TEXTLINES(), /* text_height */
+ CRTC_SCREEN_BORDERWIDTH, /* gfx_position_x */
+ CRTC_SCREEN_BORDERHEIGHT, /* gfx_position_y */
+ 0, /* gfx_area_moves */
+ CRTC_FIRST_DISPLAYED_LINE, /* first_displayed_line */
+ CRTC_LAST_DISPLAYED_LINE, /* last_displayed_line */
+ 0, /* extra_offscreen_border_left */
+ 0); /* extra_offscreen_border_right */
crtc.raster.geometry->pixel_aspect_ratio = crtc_get_pixel_aspect();
crtc.raster.viewport->crt_type = crtc_get_crt_type();
+
+ if (do_resize && crtc.raster.canvas != NULL) {
+ video_viewport_resize(crtc.raster.canvas, 1);
+ }
+
+ crtc.delayed_resize = false;
}
/*--------------------------------------------------------------------*/
@@ -400,6 +444,7 @@
{
crtc.screen_width = (num_cols + CRTC_EXTRA_COLS) * 8 + 2 * CRTC_SCREEN_BORDERWIDTH;
crtc.screen_height = rasterlines + CRTC_EXTRA_RASTERLINES + 2 * CRTC_SCREEN_BORDERHEIGHT;
+ crtc.framelines = rasterlines;
DBG(("crtc_set_screen_options: cols=%d, rl=%d -> w=%u, h=%u",
num_cols, rasterlines, crtc.screen_width, crtc.screen_height));
@@ -407,6 +452,7 @@
crtc_update_window();
resources_touch("CrtcDoubleSize");
+ /* Maybe already done in crtc_update_window(), but conditionally */
if (crtc.raster.canvas != NULL) {
video_viewport_resize(crtc.raster.canvas, 1);
}
@@ -574,9 +620,9 @@
crtc.raster.ycounter = 0; /* scan line within a text line (0..7) */
crtc.current_charline = 0;
crtc.current_line = 0; /* scan line */
- /* expected number of rasterlines for next frame */
- crtc.framelines = (crtc.regs[CRTC_REG_VTOTAL] + 1) * (crtc.regs[CRTC_REG_SCANLINE] + 1)
- + crtc.regs[CRTC_REG_VTOTALADJ];
+ crtc.vadj_counter = 0;
+ /* expected number of active rasterlines for next frame */
+ crtc.framelines = crtc.regs[CRTC_REG_VDISP] * (crtc.regs[CRTC_REG_SCANLINE] + 1);
}
/* Redraw the current raster line. This happens at the last
@@ -640,8 +686,12 @@
/* emulate the line */
if (crtc.raster.current_line >=
- crtc.screen_height - 2 * CRTC_SCREEN_BORDERHEIGHT) {
- /* FIXFRAME: crtc.raster.current_line ++; */
+ crtc.screen_height - CRTC_SCREEN_BORDERHEIGHT) {
+ /*
+ * We omit the call to raster_line_emulate() here because we don't want to
+ * trigger its end-of-screen handling, which apparently conflicts with ours.
+ * if (raster->current_line == raster->geometry->screen_size.height) {
+ */
} else {
raster_line_emulate(&crtc.raster);
}
@@ -704,9 +754,24 @@
/* Did we create as many scan lines as the last time? */
if ((crtc.framelines - crtc.current_line) == crtc.screen_yoffset) {
+ /*
+ * Restart at the top of the bitmap when there are still
+ * screen_yoffset lines to go in the frame, so that the actual
+ * first line ends up screen_yoffset lines from the top. THIS IS
+ * WEIRD! It assumes (something like) that we are finished with
+ * drawing the text area (otherwise we would get bottom text
+ * lines at the top of the screen), and that the bottom border /
+ * vsync area is tall enough to fill the whole yoffset space.
+ */
crtc.raster.current_line = 0;
raster_canvas_handle_end_of_frame(&crtc.raster);
vsync_do_vsync(crtc.raster.canvas);
+
+ if (crtc.delayed_resize) {
+ /* expected number of active rasterlines for next frame */
+ crtc.framelines = crtc.regs[CRTC_REG_VDISP] * (crtc.regs[CRTC_REG_SCANLINE] + 1);
+ crtc_update_window();
+ }
}
/* FIXME: charheight */
@@ -717,8 +782,10 @@
* The text lines are followed by a bottom border, vertical retrace
* (which includes vertical sync), and top border. This total number of
* scan lines is expressed in VTOTAL text lines + VTOTALADJ scan lines.
+ * TODO: maybe this condition below can just be "true".
*/
- if (crtc.current_charline <= crtc.regs[CRTC_REG_VTOTAL]) {
+ if (crtc.current_charline <= crtc.regs[CRTC_REG_VTOTAL] ||
+ crtc.current_charline <= crtc.regs[CRTC_REG_VDISP]) {
/* Are we NOT at the bottom most scan line of a character,
* i.e still inside it? */
if (crtc.raster.ycounter != crtc.regs[CRTC_REG_SCANLINE]) {
@@ -776,6 +843,10 @@
* This is not structured as the else-part of the previous condition,
* because this condition can become true in the previous then-part.
*
+ * We may check the condition again, since one could set VDISP = 42,
+ * VTOTAL = 40, VTOTALADJ = 20 where the last one "adjusts" for more than 1
+ * line.
+ *
* Are we past the end of the screen, i.e. the top border?
*/
if (crtc.current_charline > crtc.regs[CRTC_REG_VTOTAL]) {
@@ -793,7 +864,7 @@
}
#endif
/* The real end is VTOTALADJ scan lines futher down, for fine tuning */
- if (crtc.raster.ycounter >= crtc.regs[CRTC_REG_VTOTALADJ]) {
+ if (crtc.vadj_counter >= crtc.regs[CRTC_REG_VTOTALADJ]) {
long cycles;
/* Do vsync stuff. Reset line counters to top (0). */
@@ -800,6 +871,7 @@
/* printf("new screen at clk=%d\n",crtc.rl_start); */
crtc_reset_screen_ptr();
crtc.raster.ycounter = 0;
+ crtc.vadj_counter = 0;
crtc.current_charline = 0;
new_venable = 1; /* Re-enable video */
@@ -832,8 +904,7 @@
* However, I think that effectively nothing cares about
* that since this is not a drawing part of the video.
*/
- crtc.raster.ycounter++;
- crtc.raster.ycounter &= 0x1f;
+ crtc.vadj_counter++;
}
}
/* If we're in the vertical sync area, count down how many lines are left. */
@@ -890,15 +961,12 @@
/* visible area ends here - try to compute vertical centering */
/* FIXME: count actual number of rasterlines */
int visible_height = crtc.current_line;
- /* crtc.regs[CRTC_REG_VDISP] * (crtc.regs[CRTC_REG_SCANLINE] + 1); */
crtc.screen_yoffset = ((int)crtc.screen_height - visible_height) / 2;
+
if (crtc.screen_yoffset < CRTC_SCREEN_BORDERHEIGHT) {
crtc.screen_yoffset = CRTC_SCREEN_BORDERHEIGHT;
}
-
-/* printf("visible_height=%d -> yoffset=%d\n",
- visible_height, crtc.screen_height); */
}
crtc.venable = new_venable;
@@ -1062,6 +1130,10 @@
{
raster_screenshot(&crtc.raster, screenshot);
+ /* use screen_size rather than first/last_displayed_line */
+ screenshot->first_displayed_line = 0;
+ screenshot->last_displayed_line = screenshot->max_height;
+
screenshot->chipid = "CRTC";
screenshot->video_regs = crtc.regs;
screenshot->screen_ptr = crtc.screen_base;
@@ -1082,7 +1154,7 @@
}
/* Use the bitmap_high_ptr as indicator for the height of the chars */
- if (crtc.screen_height == 382) {
+ if (crtc.regs[CRTC_REG_SCANLINE] > 10) {
screenshot->bitmap_high_ptr = charh14;
} else {
screenshot->bitmap_high_ptr = charh8;
Modified: trunk/vice/src/crtc/crtctypes.h
===================================================================
--- trunk/vice/src/crtc/crtctypes.h 2025-10-24 14:08:06 UTC (rev 45800)
+++ trunk/vice/src/crtc/crtctypes.h 2025-10-25 11:56:52 UTC (rev 45801)
@@ -60,6 +60,7 @@
/* window size computed by crtc_set_screen_options() */
unsigned int screen_width;
unsigned int screen_height;
+ bool delayed_resize; /* nr of scanlines has changed; act on a batch of changes */
/* hardware options as given to crtc_set_hw_options() */
int hw_cursor;
@@ -128,6 +129,8 @@
int blank; /* external blank (only honored if hw_blank set) */
+ int vadj_counter; /* counter for scanlines before vertical blank */
+
/* frame */
CLOCK frame_start; /* when did the last frame start */
@@ -209,11 +212,11 @@
/* those define the invisible borders, where we never paint anything */
#define CRTC_SCREEN_BORDERWIDTH 8
-#define CRTC_SCREEN_BORDERHEIGHT 8
+#define CRTC_SCREEN_BORDERHEIGHT 8 /* FIXME: 16 doesn't work with bug 2175 */
/* These define the extra space around the size given from the machine,
to allow effects like open borders etc. */
#define CRTC_EXTRA_COLS 6
-#define CRTC_EXTRA_RASTERLINES 16
+#define CRTC_EXTRA_RASTERLINES 0 /* FIXME: only works when 0 with bug 2175 */
#endif
Modified: trunk/vice/src/raster/raster.c
===================================================================
--- trunk/vice/src/raster/raster.c 2025-10-24 14:08:06 UTC (rev 45800)
+++ trunk/vice/src/raster/raster.c 2025-10-25 11:56:52 UTC (rev 45801)
@@ -422,7 +422,7 @@
geometry->screen_size.height = screen_height;
geometry->extra_offscreen_border_left = extra_offscreen_border_left;
geometry->extra_offscreen_border_right = extra_offscreen_border_right;
- DBG(("raster_set_geometry screen_size.width:%d height:%d extra_offscreen_border_left: %d right:%d",
+ DBG(("raster_set_geometry screen_size.width:%u height:%u extra_offscreen_border_left: %u right:%u",
screen_width, screen_height, extra_offscreen_border_left, extra_offscreen_border_right));
raster_realize_frame_buffer(raster);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2025-10-24 14:08:07
|
Revision: 45800
http://sourceforge.net/p/vice-emu/code/45800
Author: pottendo
Date: 2025-10-24 14:08:06 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
added FunMP3 SDL UI
Modified Paths:
--------------
trunk/vice/src/arch/sdl/menu_userport.c
Modified: trunk/vice/src/arch/sdl/menu_userport.c
===================================================================
--- trunk/vice/src/arch/sdl/menu_userport.c 2025-10-23 19:50:31 UTC (rev 45799)
+++ trunk/vice/src/arch/sdl/menu_userport.c 2025-10-24 14:08:06 UTC (rev 45800)
@@ -85,8 +85,28 @@
return MENU_SUBMENU_STRING;
}
-ui_menu_entry_t userport_menu[6];
+#if defined(USE_MPG123) && defined(HAVE_GLOB_H)
+#include "uifilereq.h"
+#include "resources.h"
+static UI_MENU_CALLBACK(set_directory_callback)
+{
+ char *name;
+ const char *res;
+ res = (const char *)param;
+ if (activated) {
+ name = sdl_ui_file_selection_dialog("Select FunMP3 directory", FILEREQ_MODE_CHOOSE_DIR);
+ if (name != NULL) {
+ resources_set_string(res, name);
+ lib_free(name);
+ }
+ }
+ return NULL;
+}
+#endif
+
+ui_menu_entry_t userport_menu[7];
+
UI_MENU_DEFINE_TOGGLE(UserportRTCDS1307Save)
UI_MENU_DEFINE_TOGGLE(UserportRTC58321aSave)
@@ -110,6 +130,23 @@
j++;
}
+#if defined(USE_MPG123) && defined(HAVE_GLOB_H)
+ if (machine_class == VICE_MACHINE_C64 ||
+ machine_class == VICE_MACHINE_C64SC ||
+ machine_class == VICE_MACHINE_C128 ||
+ machine_class == VICE_MACHINE_VIC20 ||
+ machine_class == VICE_MACHINE_PET ||
+ machine_class == VICE_MACHINE_SCPU64) {
+
+ userport_menu[j].action = ACTION_NONE;
+ userport_menu[j].string = "FunMP3 Directory";
+ userport_menu[j].type = MENU_ENTRY_DIALOG;
+ userport_menu[j].callback = set_directory_callback;
+ userport_menu[j].data = (ui_callback_data_t) "FunMP3Dir";
+ j++;
+ }
+#endif
+
#ifdef HAVE_LIBCURL
if (machine_class == VICE_MACHINE_C64 ||
machine_class == VICE_MACHINE_C64SC ||
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|