vice-emu-commit Mailing List for VICE (Page 19)
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
(14) |
Dec
|
|
From: <pot...@us...> - 2024-11-17 10:14:23
|
Revision: 45369
http://sourceforge.net/p/vice-emu/code/45369
Author: pottendo
Date: 2024-11-17 10:14:21 +0000 (Sun, 17 Nov 2024)
Log Message:
-----------
fixed data counters in trace level 3
Modified Paths:
--------------
trunk/vice/src/userport/userport_wic64.c
Modified: trunk/vice/src/userport/userport_wic64.c
===================================================================
--- trunk/vice/src/userport/userport_wic64.c 2024-11-12 11:28:43 UTC (rev 45368)
+++ trunk/vice/src/userport/userport_wic64.c 2024-11-17 10:14:21 UTC (rev 45369)
@@ -2363,7 +2363,7 @@
even if all bytes are sent, so the last byte seems to be sent twice */
char *stage = NULL;
char datastr[32];
- int v = 0, b = 0;
+ int v = 0, b = 0, d = 1;
cmd_timeout(0);
/* FIXME: trigger mainloop */
@@ -2392,7 +2392,8 @@
} else if (stage_data) {
v = bsd - --stage_data;
b = bsd;
- snprintf(datastr, 31, "data block %04d/%04d", (v / 256) + 1, (b / 256) + 1);
+ if ((bsd > 255) && (v == bsd)) d = 0;
+ snprintf(datastr, 31, "data block %04d/%04d", (v / 256) + 1*d, ((b - 1) / 256) + 1);
stage = datastr;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2024-11-12 11:28:45
|
Revision: 45368
http://sourceforge.net/p/vice-emu/code/45368
Author: compyx
Date: 2024-11-12 11:28:43 +0000 (Tue, 12 Nov 2024)
Log Message:
-----------
Add Windows 11 check to `archdep_get_runtime_info()`
Modified Paths:
--------------
trunk/vice/src/arch/shared/archdep_get_runtime_info.c
Modified: trunk/vice/src/arch/shared/archdep_get_runtime_info.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_get_runtime_info.c 2024-11-12 09:19:30 UTC (rev 45367)
+++ trunk/vice/src/arch/shared/archdep_get_runtime_info.c 2024-11-12 11:28:43 UTC (rev 45368)
@@ -97,6 +97,36 @@
#endif
+#if defined(WINDOWS_COMPILE)
+/** \brief Try to determine if we're running Windows 11 or later
+ *
+ * Apparently Windows 11 is actually a build of 10, so we need to do some
+ * version detection magic.
+ *
+ * \return \c TRUE if Windows 11 or later
+ */
+static BOOL IsWindows11OrGreater(void)
+{
+ OSVERSIONINFOEX vinfo;
+ ULONGLONG cmask = 0;
+
+ memset(&vinfo, 0, sizeof vinfo);
+ vinfo.dwOSVersionInfoSize = sizeof vinfo;
+ vinfo.dwMajorVersion = 10;
+ vinfo.dwMinorVersion = 0;
+ vinfo.dwBuildNumber = 21996;
+
+ cmask = VerSetConditionMask(cmask, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ cmask = VerSetConditionMask(cmask, VER_MINORVERSION, VER_GREATER_EQUAL);
+ cmask = VerSetConditionMask(cmask, VER_BUILDNUMBER, VER_GREATER_EQUAL);
+
+ return VerifyVersionInfo(&vinfo,
+ VER_MAJORVERSION|VER_MINORVERSION|VER_BUILDNUMBER,
+ cmask);
+
+}
+#endif
+
/** \brief Get runtime info
*
* Try to retrieve OS name, version, release and arch.
@@ -144,7 +174,9 @@
name = "Unknown";
- if (IsWindows10OrGreater()) {
+ if (IsWindows11OrGreater()) {
+ name = "11";
+ } else if (IsWindows10OrGreater()) {
/* yes, not correct, fuck it */
name = "10";
} else if (IsWindows8Point1OrGreater()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2024-11-12 09:19:32
|
Revision: 45367
http://sourceforge.net/p/vice-emu/code/45367
Author: compyx
Date: 2024-11-12 09:19:30 +0000 (Tue, 12 Nov 2024)
Log Message:
-----------
Gtk3: generate gdk-pixbuf's `loader.cache` from loaders in bindist
Point `gdk-pixbuf-query-loaders` to the win32 bindist's `lib/gdk-pixbuf-2.0/2.10.0/` directory to
generate a proper `loaders.cache` file from the pixbuf loaders we've copied into the bindist.
Might fix bug #2081.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/make-bindist_win32.sh
Modified: trunk/vice/src/arch/gtk3/make-bindist_win32.sh
===================================================================
--- trunk/vice/src/arch/gtk3/make-bindist_win32.sh 2024-11-09 18:00:17 UTC (rev 45366)
+++ trunk/vice/src/arch/gtk3/make-bindist_win32.sh 2024-11-12 09:19:30 UTC (rev 45367)
@@ -136,10 +136,16 @@
if test x"$CROSS" != "xtrue"; then
# The following lines assume that this script is run by MSYS2.
+ curdir=`pwd`
cp `ntldd -R $BUILDPATH/bin/x64sc.exe|gawk '/\\\\bin\\\\/{print $3;}'|cygpath -f -` $BUILDPATH/bin
cd $MINGW_PREFIX
cp bin/lib{lzma-5,rsvg-2-2,xml2-2}.dll $BUILDPATH/bin
- cp --parents lib/gdk-pixbuf-2.0/2.10.0/loaders.cache lib/gdk-pixbuf-2.0/2.10.0/loaders/*pixbufloader*{png,svg,xpm}.dll $BUILDPATH
+ cp --parents lib/gdk-pixbuf-2.0/2.10.0/loaders/*pixbufloader*{png,svg,xpm}.dll $BUILDPATH
+ # generate loaders.cache from the copied loaders in the binidst, not the system loaders
+ cd $BUILDPATH
+ GDK_PIXBUF_MODULEDIR=lib/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders > lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ cd $MINGW_PREFIX
+
# GTK3 accepts having only scalable icons,
# which reduces the bindist size considerably.
cp --parents -a share/icons/Adwaita/{index.*,scalable,symbolic} $BUILDPATH
@@ -154,6 +160,8 @@
cp `ntldd -R $UNZIPBIN | gawk '/\\\\bin\\\\/{print $3;}' | cygpath -f -` $BUILDPATH/bin
fi
+ cd "$curdir"
+
else
# The following lines assume a cross compiler,
@@ -230,6 +238,10 @@
fi
+
+echo "TOPSRCDIR = $TOPSRCDIR"
+echo "BUILDPATH = $BUILDPATH"
+
cp -a $TOPSRCDIR/data/C128 $TOPSRCDIR/data/C64 $BUILDPATH
cp -a $TOPSRCDIR/data/C64DTV $TOPSRCDIR/data/CBM-II $BUILDPATH
cp -a $TOPSRCDIR/data/DRIVES $TOPSRCDIR/data/PET $BUILDPATH
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-11-09 18:00:19
|
Revision: 45366
http://sourceforge.net/p/vice-emu/code/45366
Author: gpz
Date: 2024-11-09 18:00:17 +0000 (Sat, 09 Nov 2024)
Log Message:
-----------
print expected errors and timeouts in green, and unexpected ok in red. patch by Christian Bauer
Modified Paths:
--------------
testprogs/testbench/testbench.sh
Modified: testprogs/testbench/testbench.sh
===================================================================
--- testprogs/testbench/testbench.sh 2024-11-08 21:03:41 UTC (rev 45365)
+++ testprogs/testbench/testbench.sh 2024-11-09 18:00:17 UTC (rev 45366)
@@ -455,6 +455,8 @@
# echo " options: $testoptions"
skiptest=0
+ expecterror=0
+ expecttimeout=0
if [ "$2" == "" ] || [ "${progpath#*$2}" != "$progpath" ]; then
# create the commandline for the target...
testoptions=""
@@ -462,6 +464,12 @@
for (( i=5; i<${arraylength}+1; i++ ));
do
# echo $i " / " ${arraylength} " : " ${myarray[$i-1]}
+ if [ "${myarray[$i-1]}" == "expect:error" ]; then
+ expecterror=1
+ fi
+ if [ "${myarray[$i-1]}" == "expect:timeout" ]; then
+ expecttimeout=1
+ fi
"$target"_get_options "${myarray[$i-1]}" "$testpath"
# echo "exitoptions: $exitoptions"
# echo "testprogvideotype: ${testprogvideotype}"
@@ -632,17 +640,33 @@
GREEN='\033[1;32m'
RED='\033[1;31m'
NC='\033[0m'
+ extrastatus=""
case "$exitcode" in
0)
- echo -ne $GREEN
+ if [ "${expecterror}" == "1" ] || [ "${expecttimeout}" == "1" ]; then
+ echo -ne $RED
+ extrastatus="(unexpected)"
+ else
+ echo -ne $GREEN
+ fi
exitstatus="ok"
;;
1)
- echo -ne $RED
+ if [ "${expecttimeout}" == "1" ]; then
+ echo -ne $GREEN
+ extrastatus="(expected)"
+ else
+ echo -ne $RED
+ fi
exitstatus="timeout"
;;
255)
- echo -ne $RED
+ if [ "${expecterror}" == "1" ]; then
+ echo -ne $GREEN
+ extrastatus="(expected)"
+ else
+ echo -ne $RED
+ fi
exitstatus="error"
;;
*)
@@ -650,7 +674,7 @@
exitstatus="error"
;;
esac
- echo -e "$exitstatus" $NC
+ echo -e "$exitstatus" "$extrastatus" $NC
resultprintline "$testpath" "$testprog" "$exitstatus" "${testtype}"
fi
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-11-08 21:03:44
|
Revision: 45365
http://sourceforge.net/p/vice-emu/code/45365
Author: gpz
Date: 2024-11-08 21:03:41 +0000 (Fri, 08 Nov 2024)
Log Message:
-----------
added support for Frodo, patch by Christian Bauer
Modified Paths:
--------------
testprogs/testbench/Makefile
testprogs/testbench/Makefile.config.example
testprogs/testbench/testbench.sh
Added Paths:
-----------
testprogs/testbench/frodo-hooks.sh
Property Changed:
----------------
testprogs/testbench/
Index: testprogs/testbench
===================================================================
--- testprogs/testbench 2024-11-08 19:41:33 UTC (rev 45364)
+++ testprogs/testbench 2024-11-08 21:03:41 UTC (rev 45365)
Property changes on: testprogs/testbench
___________________________________________________________________
Modified: svn:ignore
## -51,3 +51,4 ##
kernal64scpu64-result.txt
kernal64cbm2-result.txt
kernal64vic20-result.txt
+virtualc64-result.txt
Modified: testprogs/testbench/Makefile
===================================================================
--- testprogs/testbench/Makefile 2024-11-08 19:41:33 UTC (rev 45364)
+++ testprogs/testbench/Makefile 2024-11-08 21:03:41 UTC (rev 45365)
@@ -156,6 +156,7 @@
hoxs64-testlist.txt \
micro64-testlist.txt \
emu64-testlist.txt \
+ frodo-testlist.txt \
yace-testlist.txt \
x128-testlist.txt \
xscpu64-testlist.txt \
@@ -339,7 +340,34 @@
| grep -v ",mountp64:" \
>> emu64-testlist.txt
-
+# Frodo only supports simple 8K and 16K game cartridges
+frodo-testlist.txt: c64-testlist.in Makefile
+ echo "# this is a generated file, do not edit." > frodo-testlist.txt
+ cat c64-testlist.in \
+ | grep -v ",vicii-ntsc" \
+ | grep -v ",vicii-ntscold" \
+ | grep -v ",vicii-drean" \
+ | grep -v ",cia-new" \
+ | grep -v ",reu1m" \
+ | grep -v ",reu2m" \
+ | grep -v ",reu4m" \
+ | grep -v ",reu8m" \
+ | grep -v ",plus60k" \
+ | grep -v ",plus256k" \
+ | grep -v ",isepic" \
+ | grep -v ",dqbb" \
+ | grep -v ",ramcart128k" \
+ | grep -v ",mountp64:" \
+ | grep -v "C64/carts/aracidtest" \
+ | grep -v "C64/carts/pagefox" \
+ | grep -v "C64/carts/ef" \
+ | grep -v "C64/carts/nordicpower" \
+ | grep -v "C64/carts/retroreplay" \
+ | grep -v "C64/carts/supergames" \
+ | grep -v "C64/carts/tamtest" \
+ | grep -v "C64/carts/ultimax" \
+ >> frodo-testlist.txt
+
denise-testlist.txt: c64-testlist.in Makefile
echo "# this is a generated file, do not edit." > denise-testlist.txt
cat c64-testlist.in \
@@ -365,7 +393,7 @@
| grep -v ",dqbb" \
| grep -v ",ramcart128k" \
>> yace-testlist.txt
-
+
#Cartridge support for the following crt types:
# - Action Replay
# - KCS Power Cartridge
@@ -728,6 +756,9 @@
testemu64: prereq
# EMUDIR="$(EMU64DIR)" ./testbench.sh emu64 --verbose --resume
EMUDIR="$(EMU64DIR)" ./testbench.sh emu64 --resume
+testfrodo: prereq
+# EMUDIR="$(FRODODIR)" ./testbench.sh frodo --verbose
+ EMUDIR="$(FRODODIR)" ./testbench.sh frodo
testkernal64: testkernal64c64 testkernal64c128c64 testkernal64c128c128 testkernal64scpu64 testkernal64cbm2 testkernal64vic20
testkernal64c64: prereq
@@ -886,7 +917,8 @@
--results results/chameleon-$(CHAMSTANDALONELAST)-standalone-result.txt "TC64 "$(CHAMSTANDALONELAST)" (standalone)" \
--results results/u64-$(U64LAST)-result.txt "U64 "$(U64LASTSTRING) \
--results results/yace-$(YACEHEAD)-result.txt "yace "$(YACEHEAD)"" \
- --results results/emu64-$(EMU64HEAD)-result.txt "emu64 "$(EMU64HEAD)""
+ --results results/emu64-$(EMU64HEAD)-result.txt "emu64 "$(EMU64HEAD)"" \
+ --results results/frodo-$(FRODOHEAD)-result.txt "frodo "$(FRODOHEAD)""
./maketable --list vic20-testlist.in \
--results results/xvic-$(XVICHEAD)-result.txt "xvic "$(XVICHEAD)"" \
@@ -939,6 +971,7 @@
--results results/u64-$(U64LAST)-result.txt "U64 "$(U64LASTSTRING) \
--results results/yace-$(YACEHEAD)-result.txt "yace "$(YACEHEAD)"" \
--results results/emu64-$(EMU64HEAD)-result.txt "emu64 "$(EMU64HEAD)"" \
+ --results results/frodo-$(FRODOHEAD)-result.txt "frodo "$(FRODOHEAD)"" \
\
> results/c64.html
@@ -1024,7 +1057,8 @@
--results results/chameleon-$(CHAMSTANDALONELAST)-standalone-result.txt "TC64 "$(CHAMSTANDALONELAST)" (standalone)" \
--results results/u64-$(U64LAST)-result.txt "U64 "$(U64LASTSTRING) \
--results results/yace-$(YACEHEAD)-result.txt "yace "$(YACEHEAD)"" \
- --results results/emu64-$(EMU64HEAD)-result.txt "emu64 "$(EMU64HEAD)""
+ --results results/emu64-$(EMU64HEAD)-result.txt "emu64 "$(EMU64HEAD)"" \
+ --results results/frodo-$(FRODOHEAD)-result.txt "frodo "$(FRODOHEAD)""
@echo "=== VIC20 ==="
./maketable --omit-clean --wiki --list vic20-testlist.in \
--ranking "{{Progress|%d|%d|%d|}}" \
Modified: testprogs/testbench/Makefile.config.example
===================================================================
--- testprogs/testbench/Makefile.config.example 2024-11-08 19:41:33 UTC (rev 45364)
+++ testprogs/testbench/Makefile.config.example 2024-11-08 21:03:41 UTC (rev 45365)
@@ -35,5 +35,8 @@
# should point to the directory containing virtualc64
VIRTUALC64DIR="~/c64stuff/virtualc64/"
+# should point to the directory containing Frodo
+FRODODIR="~/c64stuff/frodo/"
+
# the IP used for the U64 remote interface
U64IP="192.168.100.210"
Added: testprogs/testbench/frodo-hooks.sh
===================================================================
--- testprogs/testbench/frodo-hooks.sh (rev 0)
+++ testprogs/testbench/frodo-hooks.sh 2024-11-08 21:03:41 UTC (rev 45365)
@@ -0,0 +1,189 @@
+FRODOOPTS+=" -c /dev/null" # start with default settings
+FRODOOPTS+=" FastReset=true"
+FRODOOPTS+=" LimitSpeed=false"
+FRODOOPTS+=" ShowLEDs=false"
+FRODOOPTS+=" AutoStart=true"
+
+# extra options for the different ways tests can be run
+FRODOOPTSEXITCODE+=" TestBench=true"
+FRODOOPTSSCREENSHOT+=" TestBench=true"
+
+function frodo_check_environment
+{
+ FRODO="$EMUDIR"Frodo
+ if ! [ -x "$(command -v $FRODO)" ]; then
+ echo 'Error: '$FRODO' not found.' >&2
+ exit 1
+ fi
+
+ emu_default_videosubtype="6569"
+}
+
+# $1 option
+# $2 test path
+function frodo_get_options
+{
+ exitoptions=""
+ case "$1" in
+ "default")
+ exitoptions=""
+ ;;
+ "sid-old")
+ exitoptions="SIDType=6581"
+ new_sid_enabled=0
+ ;;
+ "sid-new")
+ exitoptions="SIDType=8580"
+ new_sid_enabled=1
+ ;;
+ "reu128k")
+ exitoptions="REUType=128K"
+ reu_enabled=1
+ ;;
+ "reu256k")
+ exitoptions="REUType=256K"
+ reu_enabled=1
+ ;;
+ "reu512k")
+ exitoptions="REUType=512K"
+ reu_enabled=1
+ ;;
+ "geo512k")
+ exitoptions="REUType=GEORAM"
+ georam_enabled=1
+ ;;
+ *)
+ exitoptions=""
+ if [ "${1:0:9}" == "mountd64:" ]; then
+ exitoptions="DrivePath8=$2/${1:9}"
+ mounted_d64="${1:9}"
+ echo -ne "(disk:${1:9}) "
+ fi
+ if [ "${1:0:9}" == "mountg64:" ]; then
+ exitoptions="DrivePath8=$2/${1:9}"
+ mounted_g64="${1:9}"
+ echo -ne "(disk:${1:9}) "
+ fi
+ if [ "${1:0:9}" == "mountcrt:" ]; then
+ exitoptions="Cartridge=$2/${1:9}"
+ mounted_crt="${1:9}"
+ echo -ne "(cartridge:${1:9}) "
+ fi
+ ;;
+ esac
+}
+
+# $1 option
+# $2 test path
+function frodo_get_cmdline_options
+{
+ exitoptions=""
+}
+
+# called once before any tests run
+function frodo_prepare
+{
+ true
+}
+
+################################################################################
+# reset
+# run test program
+# exit when write to $d7ff occurs - the value written determines success (=$00) or fail (=$ff)
+# exit after $timeout cycles (exitcode=$01)
+# save a screenshot at exit - success or failure is determined by comparing screenshots
+
+# $1 test path
+# $2 test program name
+# $3 timeout cycles
+# $4 test full path+name (may be empty)
+# $5- extra options for the emulator
+function frodo_run_screenshot
+{
+ if [ "$2" == "" ] ; then
+ screenshottest="$mounted_crt"
+ else
+ screenshottest="$2"
+ fi
+
+ mkdir -p "$1"/".testbench"
+ rm -f "$1"/.testbench/"$screenshottest"-frodo.png
+ if [ x"$2"x == x""x ]; then
+ TESTPROGFULLPATH=""
+ else
+ TESTPROGFULLPATH="LoadProgram="$1"/"$2""
+ fi
+ if [ $verbose == "1" ]; then
+ echo $FRODO $FRODOOPTS $FRODOOPTSSCREENSHOT ${@:5} "TestMaxFrames="$(($3/19656)) "TestScreenshot=$1"/.testbench/"$screenshottest"-frodo.bmp $TESTPROGFULLPATH
+ fi
+ $FRODO $FRODOOPTS $FRODOOPTSSCREENSHOT ${@:5} "TestMaxFrames="$(($3/19656)) "TestScreenshot=$1"/.testbench/"$screenshottest"-frodo.bmp $TESTPROGFULLPATH 1> /dev/null 2> /dev/null
+ exitcode=$?
+ if [ $exitcode -ne 0 ]
+ then
+ if [ $exitcode -ne 1 ]
+ then
+ if [ $exitcode -ne 255 ]
+ then
+ echo -ne "\nerror: call to $FRODO failed.\n"
+ fi
+ fi
+ fi
+ if [ -f "$refscreenshotname" ]
+ then
+
+ # defaults for PAL
+ FRODOREFSXO=32
+ FRODOREFSYO=35
+ FRODOSXO=32
+ FRODOSYO=35
+
+ if [ "${refscreenshotvideotype}" == "NTSC" ]; then
+ FRODOREFSXO=32
+ FRODOREFSYO=23
+ fi
+
+ # when either the testbench was run with --ntsc, or the test is ntsc-specific,
+ # then we need the offsets on the NTSC screenshot
+ if [ "${videotype}" == "NTSC" ] || [ "${testprogvideotype}" == "NTSC" ]; then
+ FRODOSXO=32
+ FRODOSYO=23
+ fi
+
+ if [ $verbose == "1" ]; then
+ echo ./cmpscreens "$refscreenshotname" "$FRODOREFSXO" "$FRODOREFSYO" "$1"/.testbench/"$screenshottest"-frodo.bmp "$FRODOSXO" "$FRODOSYO"
+ fi
+ ./cmpscreens "$refscreenshotname" "$FRODOREFSXO" "$FRODOREFSYO" "$1"/.testbench/"$screenshottest"-frodo.bmp "$FRODOSXO" "$FRODOSYO"
+ exitcode=$?
+ else
+ echo -ne "reference screenshot missing - "
+ exitcode=255
+ fi
+}
+
+################################################################################
+# reset
+# run test program
+# exit when write to $d7ff occurs - the value written determines success (=$00) or fail (=$ff)
+# exit after $timeout cycles (exitcode=$01)
+
+# $1 test path
+# $2 test program name
+# $3 timeout cycles
+# $4 test full path+name (may be empty)
+# $5- extra options for the emulator
+function frodo_run_exitcode
+{
+ if [ x"$2"x == x""x ]; then
+ TESTPROGFULLPATH=""
+ else
+ TESTPROGFULLPATH="LoadProgram="$1"/"$2""
+ fi
+ if [ $verbose == "1" ]; then
+ echo $FRODO $FRODOOPTS $FRODOOPTSEXITCODE ${@:5} "TestMaxFrames="$(($3/19656)) $TESTPROGFULLPATH
+ fi
+ $FRODO $FRODOOPTS $FRODOOPTSEXITCODE ${@:5} "TestMaxFrames="$(($3/19656)) $TESTPROGFULLPATH 1> /dev/null 2> /dev/null
+ exitcode=$?
+ if [ $verbose == "1" ]; then
+ echo "exited with: " $exitcode
+ fi
+}
Modified: testprogs/testbench/testbench.sh
===================================================================
--- testprogs/testbench/testbench.sh 2024-11-08 19:41:33 UTC (rev 45364)
+++ testprogs/testbench/testbench.sh 2024-11-08 21:03:41 UTC (rev 45365)
@@ -39,6 +39,7 @@
source "./hoxs64-hooks.sh"
source "./micro64-hooks.sh"
source "./emu64-hooks.sh"
+source "./frodo-hooks.sh"
source "./yace-hooks.sh"
source "./z64kc64-hooks.sh"
source "./z64kc128-hooks.sh"
@@ -86,6 +87,9 @@
emu64)
target="$1"
;;
+ frodo)
+ target="$1"
+ ;;
yace)
target="$1"
;;
@@ -676,7 +680,7 @@
echo $NAME" - run test programs."
echo "usage: "$NAME" [target] <filter> <options>"
echo " targets: x64, x64sc, x128c64, x128, xscpu64, x64dtv, xpet, xcbm2, xcbm5x0, xvic, xplus4, vsid,"
- echo " hoxs64, micro64, emu64, yace, z64kc64, z64kc128, z64kc128c64, z64kvic20, denise, kernal64c64, kernal64c64c128, kernal64c128c128, kernal64scpu64, kernal64cbm2, kernal64vic20, virtualc64,"
+ echo " hoxs64, micro64, emu64, frodo, yace, z64kc64, z64kc128, z64kc128c64, z64kvic20, denise, kernal64c64, kernal64c64c128, kernal64c128c128, kernal64scpu64, kernal64cbm2, kernal64vic20, virtualc64,"
echo " chameleon, u64, cham20, c64rmk2"
echo " <filter> is a substring of the path of tests to restrict to"
echo " --help show this help"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-11-08 19:41:34
|
Revision: 45364
http://sourceforge.net/p/vice-emu/code/45364
Author: rhialto
Date: 2024-11-08 19:41:33 +0000 (Fri, 08 Nov 2024)
Log Message:
-----------
On the PET, when the option -diagpin or +diagpin is used, the user
apparently wants the diagnostic pin, so its userport device is attached.
This only happens for the command line option, not for the resource
which sets the value of the pin.
Modified Paths:
--------------
trunk/vice/src/userport/userport_diag_pin.c
Modified: trunk/vice/src/userport/userport_diag_pin.c
===================================================================
--- trunk/vice/src/userport/userport_diag_pin.c 2024-11-08 17:21:39 UTC (rev 45363)
+++ trunk/vice/src/userport/userport_diag_pin.c 2024-11-08 19:41:33 UTC (rev 45364)
@@ -76,6 +76,21 @@
return 0;
}
+/*
+ * Called if the command line option +diagpin or -diagpin are used.
+ * Sets the resource as if .type = SET_RESOURCE. Also sets the userport
+ * device to the diagnostic pin, on the theory that it is wanted because
+ * the user explicitly sets its state.
+ */
+static int diagnostic_pin_command_line_option(const char *value, void *extra_param)
+{
+ cmdline_option_t *opt = (cmdline_option_t *)extra_param;
+ resources_set_value(opt->resource_name, opt->resource_value);
+
+ return resources_set_value("UserportDevice",
+ (resource_value_t)USERPORT_DEVICE_DIAGNOSTIC_PIN);
+}
+
static const resource_int_t resources_int[] = {
{ "DiagPin", 0, RES_EVENT_SAME, NULL,
&diagnostic_pin_enabled, set_diagnostic_pin_enabled, NULL },
@@ -87,17 +102,32 @@
if (resources_register_int(resources_int) < 0) {
return -1;
}
- return userport_device_register(USERPORT_DEVICE_DIAGNOSTIC_PIN, &diag_pin_device);
+ return userport_device_register(USERPORT_DEVICE_DIAGNOSTIC_PIN,
+ &diag_pin_device);
}
static const cmdline_option_t cmdline_options[] =
{
- { "-diagpin", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
- NULL, NULL, "DiagPin", (resource_value_t)1,
- NULL, "Enable userport diagnostic pin" },
- { "+diagpin", SET_RESOURCE, CMDLINE_ATTRIB_NONE,
- NULL, NULL, "DiagPin", (resource_value_t)1,
- NULL, "Disable userport diagnostic pin" },
+ { .name = "-diagpin",
+ .type = CALL_FUNCTION,
+ .attributes = CMDLINE_ATTRIB_NONE,
+ .set_func = diagnostic_pin_command_line_option,
+ .extra_param = (void *)&cmdline_options[0],/* this very cmdline_option_t */
+ .resource_name = "DiagPin",
+ .resource_value = (resource_value_t)1,
+ .param_name = NULL,
+ .description = "Attach userport diagnostic pin and enable"
+ },
+ { .name = "+diagpin",
+ .type = CALL_FUNCTION,
+ .attributes = CMDLINE_ATTRIB_NONE,
+ .set_func = diagnostic_pin_command_line_option,
+ .extra_param = (void *)&cmdline_options[1],/* this very cmdline_option_t */
+ .resource_name = "DiagPin",
+ .resource_value = (resource_value_t)0,
+ .param_name = NULL,
+ .description = "Attach userport diagnostic pin and disable"
+ },
CMDLINE_LIST_END
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pot...@us...> - 2024-11-08 17:21:41
|
Revision: 45363
http://sourceforge.net/p/vice-emu/code/45363
Author: pottendo
Date: 2024-11-08 17:21:39 +0000 (Fri, 08 Nov 2024)
Log Message:
-----------
(userport_wic64_read_pbx): added some debug beautify.
Modified Paths:
--------------
trunk/vice/src/userport/userport_wic64.c
Modified: trunk/vice/src/userport/userport_wic64.c
===================================================================
--- trunk/vice/src/userport/userport_wic64.c 2024-11-05 14:26:54 UTC (rev 45362)
+++ trunk/vice/src/userport/userport_wic64.c 2024-11-08 17:21:39 UTC (rev 45363)
@@ -124,6 +124,7 @@
static void cmd_tcp_write(void);
static void cmd_timeout(int arm);
static void cmd_remote_timeout(int arm);
+static int stage_dummy, stage_retcode, stage_length, stage_data, bsr, bsl, bsd;
static userport_device_t userport_wic64_device = {
"Userport WiC64", /* device name */
@@ -471,7 +472,7 @@
#define INPUT_EXP_ARGS 6
static const char *cmd2string[256];
-/* WiC64 return codes */
+/* WiC64 return codes, adjust debug output accordingly if changes happen here, see func 'userport_wic64_read_pbx()' */
static uint8_t SUCCESS = 0;
static uint8_t INTERNAL_ERROR = 1;
static uint8_t CLIENT_ERROR = 2;
@@ -478,6 +479,7 @@
static uint8_t CONNECTION_ERROR = 3;
static uint8_t NETWORK_ERROR = 4;
static uint8_t SERVER_ERROR = 5;
+static char *err2string[] = { "SUCCESS", "INTERNAL", "CLIENT", "CONNECTION", "NETWORK", "SERVER" };
#define HTTPREPLY_MAXLEN ((unsigned)(16 * 1024 * 1024)) /* 16MB needed for potential large images to flash via bigloader */
static size_t httpbufferptr = 0;
@@ -1238,9 +1240,14 @@
reply_length = (uint32_t)(len + 3 + offs);
cmd_timeout(1); /* arm alarm handler */
+ stage_dummy = 1;
+ bsr = stage_retcode = 1;
+ bsl = stage_length = 2 + offs;
+ bsd = stage_data = len;
handshake_flag2();
} else {
/* legacy protocol */
+ stage_dummy = stage_retcode = stage_length = stage_data = -1;
if (legacy_msg && payload) {
wic64_log(LOG_COL_LRED,
"protocol error: can't send both payload and legacy message: '%s' discarded.",
@@ -2354,12 +2361,53 @@
/* FIXME: what do we have to do with original value? */
/* CIA read is triggered once more by wic64 lib on the host,
even if all bytes are sent, so the last byte seems to be sent twice */
+ char *stage = NULL;
+ char datastr[32];
+ int v = 0, b = 0;
- debug_log(LOG_COL_LGREEN, 3, "sending '%c'/0x%02x - ptr = %d, rl = %d/0x%x",
- isprint(retval) ? retval : '.',
- retval, replyptr, reply_length, reply_length);
cmd_timeout(0);
/* FIXME: trigger mainloop */
+
+ if (wic64_loglevel < 3)
+ return retval;
+
+ if (stage_retcode < 0) {
+ stage = NULL;
+ } else if (stage_dummy) {
+ stage = "dummy";
+ b = v = 1;
+ stage_dummy--;
+ } else if (stage_retcode) {
+ if (retval < 6) { /* num of error codes defined for now */
+ stage = err2string[retval];
+ } else {
+ stage = "UNKNOWN";
+ }
+ v = bsr - --stage_retcode;
+ b = bsr;
+ } else if (stage_length) {
+ stage = "length";
+ v = bsl - --stage_length;
+ b = bsl;
+ } else if (stage_data) {
+ v = bsd - --stage_data;
+ b = bsd;
+ snprintf(datastr, 31, "data block %04d/%04d", (v / 256) + 1, (b / 256) + 1);
+ stage = datastr;
+ }
+
+ if (stage) {
+ debug_log(LOG_COL_LGREEN, 3, "sending '%c'/0x%02x - 0x%02x/0x%04x %s\t - ptr = %d, rl = %d/0x%x",
+ isprint(retval) ? retval : '.', retval,
+ v, b, stage,
+ replyptr,
+ reply_length, reply_length);
+ } else {
+ debug_log(LOG_COL_LGREEN, 3, "sending '%c'/0x%02x - ptr = %d, rl = %d/0x%x",
+ isprint(retval) ? retval : '.', retval,
+ replyptr,
+ reply_length, reply_length);
+ }
return retval;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-11-05 14:26:56
|
Revision: 45362
http://sourceforge.net/p/vice-emu/code/45362
Author: gpz
Date: 2024-11-05 14:26:54 +0000 (Tue, 05 Nov 2024)
Log Message:
-----------
remove TABs. fix your editor! :)
Modified Paths:
--------------
trunk/vice/src/drive/iec/fdd.c
Modified: trunk/vice/src/drive/iec/fdd.c
===================================================================
--- trunk/vice/src/drive/iec/fdd.c 2024-11-05 10:13:07 UTC (rev 45361)
+++ trunk/vice/src/drive/iec/fdd.c 2024-11-05 14:26:54 UTC (rev 45362)
@@ -714,9 +714,9 @@
if (drv->image) {
/* don't do check on the "image" tracks here since this value for the
CMDFDs is logical not physical */
- if (drv->image->type != DISK_IMAGE_TYPE_D1M &&
- drv->image->type != DISK_IMAGE_TYPE_D2M &&
- drv->image->type != DISK_IMAGE_TYPE_D4M) {
+ if (drv->image->type != DISK_IMAGE_TYPE_D1M &&
+ drv->image->type != DISK_IMAGE_TYPE_D2M &&
+ drv->image->type != DISK_IMAGE_TYPE_D4M) {
if (drv->drive->current_half_track > (drv->image->tracks * 2)) {
log_warning(LOG_DEFAULT, "disk image will get extended (%d tracks)",
drv->drive->current_half_track / 2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2024-11-05 10:13:09
|
Revision: 45361
http://sourceforge.net/p/vice-emu/code/45361
Author: compyx
Date: 2024-11-05 10:13:07 +0000 (Tue, 05 Nov 2024)
Log Message:
-----------
Gtk3: fix copying of GDK pixbfuf loaders for Windows bindists
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/make-bindist_win32.sh
Modified: trunk/vice/src/arch/gtk3/make-bindist_win32.sh
===================================================================
--- trunk/vice/src/arch/gtk3/make-bindist_win32.sh 2024-10-25 14:03:57 UTC (rev 45360)
+++ trunk/vice/src/arch/gtk3/make-bindist_win32.sh 2024-11-05 10:13:07 UTC (rev 45361)
@@ -139,7 +139,7 @@
cp `ntldd -R $BUILDPATH/bin/x64sc.exe|gawk '/\\\\bin\\\\/{print $3;}'|cygpath -f -` $BUILDPATH/bin
cd $MINGW_PREFIX
cp bin/lib{lzma-5,rsvg-2-2,xml2-2}.dll $BUILDPATH/bin
- cp --parents lib/gdk-pixbuf-2.0/2.*/loaders.cache lib/gdk-pixbuf-2.0/2.*/loaders/libpixbufloader-{png,svg,xpm}.dll $BUILDPATH
+ cp --parents lib/gdk-pixbuf-2.0/2.10.0/loaders.cache lib/gdk-pixbuf-2.0/2.10.0/loaders/*pixbufloader*{png,svg,xpm}.dll $BUILDPATH
# GTK3 accepts having only scalable icons,
# which reduces the bindist size considerably.
cp --parents -a share/icons/Adwaita/{index.*,scalable,symbolic} $BUILDPATH
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <old...@us...> - 2024-10-25 14:03:59
|
Revision: 45360
http://sourceforge.net/p/vice-emu/code/45360
Author: oldwoman37
Date: 2024-10-25 14:03:57 +0000 (Fri, 25 Oct 2024)
Log Message:
-----------
Removed warning 'disk image will get extended' for CMD FD images as logical tracks do not relate to physical ones; also cleaned up memory leak
Modified Paths:
--------------
trunk/vice/src/drive/iec/fdd.c
Modified: trunk/vice/src/drive/iec/fdd.c
===================================================================
--- trunk/vice/src/drive/iec/fdd.c 2024-10-19 09:06:35 UTC (rev 45359)
+++ trunk/vice/src/drive/iec/fdd.c 2024-10-25 14:03:57 UTC (rev 45360)
@@ -139,6 +139,12 @@
if (!drv) {
return;
}
+ /* clean up memory from CRC tables */
+ if (crc1021) {
+ lib_free(crc1021);
+ /* prevent multiple instances of fdd_shutdown to unallocate this table */
+ crc1021 = NULL;
+ }
lib_free(drv->myname);
lib_free(drv);
}
@@ -706,10 +712,16 @@
drv->image->tracks, drv->image->max_half_tracks);
#endif
if (drv->image) {
- if (drv->drive->current_half_track > (drv->image->tracks * 2)) {
- log_warning(LOG_DEFAULT, "disk image will get extended (%d tracks)",
- drv->drive->current_half_track / 2);
- /* FIXME: actually extend the image here */
+ /* don't do check on the "image" tracks here since this value for the
+ CMDFDs is logical not physical */
+ if (drv->image->type != DISK_IMAGE_TYPE_D1M &&
+ drv->image->type != DISK_IMAGE_TYPE_D2M &&
+ drv->image->type != DISK_IMAGE_TYPE_D4M) {
+ if (drv->drive->current_half_track > (drv->image->tracks * 2)) {
+ log_warning(LOG_DEFAULT, "disk image will get extended (%d tracks)",
+ drv->drive->current_half_track / 2);
+ /* FIXME: actually extend the image here */
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2024-10-19 09:06:37
|
Revision: 45359
http://sourceforge.net/p/vice-emu/code/45359
Author: dqh
Date: 2024-10-19 09:06:35 +0000 (Sat, 19 Oct 2024)
Log Message:
-----------
(macOS) Register all the ttf fonts, not just C64_Pro_Mono-STYLE
Modified Paths:
--------------
trunk/vice/src/arch/shared/archdep_cbmfont.c
Modified: trunk/vice/src/arch/shared/archdep_cbmfont.c
===================================================================
--- trunk/vice/src/arch/shared/archdep_cbmfont.c 2024-10-19 07:55:18 UTC (rev 45358)
+++ trunk/vice/src/arch/shared/archdep_cbmfont.c 2024-10-19 09:06:35 UTC (rev 45359)
@@ -41,7 +41,7 @@
/** \brief Filename of the TrueType CBM font used for directory display
*/
-#define VICE_CBM_FONT_TTF "C64_Pro_Mono-STYLE.ttf"
+/* #define VICE_CBM_FONT_TTF "C64_Pro_Mono-STYLE.ttf" */
/** \brief List of fonts to register with the OS */
static const char *font_files[] = {
@@ -75,31 +75,35 @@
CFURLRef fontUrl;
CFArrayRef fontUrls;
CFArrayRef errors;
+ int i;
- if (sysfile_locate(VICE_CBM_FONT_TTF, "common", &fontPath) < 0) {
- log_error(LOG_DEFAULT, "failed to find resource data '%s'.",
- VICE_CBM_FONT_TTF);
- return 0;
- }
+ for (i = 0; i < sizeof font_files / sizeof font_files[0]; i++) {
+ if (sysfile_locate(font_files[i], "common", &fontPath) < 0) {
+ log_error(LOG_DEFAULT, "failed to find resource data '%s'.",
+ font_files[i]);
+ return 0;
+ }
- fontPathStringRef = CFStringCreateWithCString(NULL, fontPath, kCFStringEncodingUTF8);
- fontUrl = CFURLCreateWithFileSystemPath(NULL, fontPathStringRef, kCFURLPOSIXPathStyle, false);
- fontUrls = CFArrayCreate(NULL, (const void **)&fontUrl, 1, NULL);
+ fontPathStringRef = CFStringCreateWithCString(NULL, fontPath, kCFStringEncodingUTF8);
+ fontUrl = CFURLCreateWithFileSystemPath(NULL, fontPathStringRef, kCFURLPOSIXPathStyle, false);
+ fontUrls = CFArrayCreate(NULL, (const void **)&fontUrl, 1, NULL);
- CFRelease(fontPathStringRef);
+ CFRelease(fontPathStringRef);
- if(!CTFontManagerRegisterFontsForURLs(fontUrls, kCTFontManagerScopeProcess, &errors))
- {
- log_error(LOG_DEFAULT, "Failed to register font for file: %s", fontPath);
+ if(!CTFontManagerRegisterFontsForURLs(fontUrls, kCTFontManagerScopeProcess, &errors))
+ {
+ log_error(LOG_DEFAULT, "Failed to register font for file: %s", fontPath);
+ CFRelease(fontUrls);
+ CFRelease(fontUrl);
+ lib_free(fontPath);
+ return 0;
+ }
+
CFRelease(fontUrls);
CFRelease(fontUrl);
lib_free(fontPath);
- return 0;
}
- CFRelease(fontUrls);
- CFRelease(fontUrl);
- lib_free(fontPath);
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2024-10-19 07:55:19
|
Revision: 45358
http://sourceforge.net/p/vice-emu/code/45358
Author: dqh
Date: 2024-10-19 07:55:18 +0000 (Sat, 19 Oct 2024)
Log Message:
-----------
Fixed unused variable in non-debug builds
Modified Paths:
--------------
trunk/vice/src/lib.c
Modified: trunk/vice/src/lib.c
===================================================================
--- trunk/vice/src/lib.c 2024-10-19 07:49:23 UTC (rev 45357)
+++ trunk/vice/src/lib.c 2024-10-19 07:55:18 UTC (rev 45358)
@@ -54,7 +54,9 @@
# endif
#endif
+#if defined(LIB_DEBUG) || defined(DEBUG)
static log_t log_lib = LOG_DEFAULT;
+#endif
#define LIB_DEBUG_LOCK()
#define LIB_DEBUG_UNLOCK()
@@ -1033,7 +1035,6 @@
void lib_init(void)
{
- /* log_debug(log_lib, "lib_init()"); */
lib_lock_init();
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dq...@us...> - 2024-10-19 07:49:25
|
Revision: 45357
http://sourceforge.net/p/vice-emu/code/45357
Author: dqh
Date: 2024-10-19 07:49:23 +0000 (Sat, 19 Oct 2024)
Log Message:
-----------
(macOS) Moved system includes to end of generated CMake include list. Fixes hvsc #include "md5.h"
Modified Paths:
--------------
trunk/vice/cmake-bootstrap.sh
trunk/vice/configure.ac
Modified: trunk/vice/cmake-bootstrap.sh
===================================================================
--- trunk/vice/cmake-bootstrap.sh 2024-10-15 16:56:40 UTC (rev 45356)
+++ trunk/vice/cmake-bootstrap.sh 2024-10-19 07:49:23 UTC (rev 45357)
@@ -182,8 +182,15 @@
| sed "s#^\\..*\\./src\$#\\\${CMAKE_SOURCE_DIR}$vpath/src#" \
| sed "s#^\\..*\\./src/#\\\${CMAKE_SOURCE_DIR}$vpath/src/#" \
| sed -n "p; s#^\\\${CMAKE_SOURCE_DIR}$vpath#\\\${CMAKE_SOURCE_DIR}#p" \
- | unique_preserve_order \
- | indent_file_list
+ | unique_preserve_order
+
+ (extract_make_var AM_CPPFLAGS; space; extract_make_var VICE_CFLAGS; space; extract_make_var VICE_CXXFLAGS) \
+ | sed $'s/ -/\\\n-/g' \
+ | grep '^-isystem' \
+ | sed 's/^-isystem//' \
+ | sed 's/^[[:space:]]*//' \
+ | sed 's/[[:space:]]*$//' \
+ | unique_preserve_order
}
function extract_link_dirs {
@@ -460,7 +467,7 @@
PRIVATE
\${CMAKE_CURRENT_SOURCE_DIR}
\${CMAKE_CURRENT_SOURCE_DIR}/$(extract_make_var VPATH)
- $(extract_include_dirs)
+ $(extract_include_dirs | indent_file_list)
)
target_compile_options(
@@ -571,7 +578,7 @@
PRIVATE
\${CMAKE_CURRENT_SOURCE_DIR}
\${CMAKE_CURRENT_SOURCE_DIR}/$(extract_make_var VPATH)
- $(extract_include_dirs)
+ $(extract_include_dirs | indent_file_list)
)
target_compile_options(
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2024-10-15 16:56:40 UTC (rev 45356)
+++ trunk/vice/configure.ac 2024-10-19 07:49:23 UTC (rev 45357)
@@ -1019,8 +1019,8 @@
dnl Macports headers and libraries
- AC_CHECK_FILE(/opt/local/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/opt/local/include" ])
- AC_CHECK_FILE(/opt/local/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/opt/local/include/libomp" ])
+ AC_CHECK_FILE(/opt/local/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/opt/local/include" ])
+ AC_CHECK_FILE(/opt/local/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/opt/local/include/libomp" ])
AC_CHECK_FILE(/opt/local/lib, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/opt/local/lib -Wl,-rpath,/opt/local/lib" ])
AC_CHECK_FILE(/opt/local/lib/libomp, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/opt/local/lib/libomp -Wl,-rpath,/opt/local/lib/libomp" ])
@@ -1027,13 +1027,13 @@
dnl Homebrew headers and libraries
if test "`uname -m`" = "arm64"; then
- AC_CHECK_FILE(/opt/homebrew/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/opt/homebrew/include" ])
- AC_CHECK_FILE(/opt/homebrew/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/opt/homebrew/include/libomp" ])
+ AC_CHECK_FILE(/opt/homebrew/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/opt/homebrew/include" ])
+ AC_CHECK_FILE(/opt/homebrew/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/opt/homebrew/include/libomp" ])
AC_CHECK_FILE(/opt/homebrew/lib, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib" ])
AC_CHECK_FILE(/opt/homebrew/lib/libomp, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/opt/homebrew/lib/libomp -Wl,-rpath,/opt/homebrew/lib/libomp" ])
else
- AC_CHECK_FILE(/usr/local/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/usr/local/include" ])
- AC_CHECK_FILE(/usr/local/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -I/usr/local/include/libomp" ])
+ AC_CHECK_FILE(/usr/local/include, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/usr/local/include" ])
+ AC_CHECK_FILE(/usr/local/include/libomp, [ MAC_CCPFLAGS="$MAC_CCPFLAGS -isystem/usr/local/include/libomp" ])
AC_CHECK_FILE(/usr/local/lib, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib" ])
AC_CHECK_FILE(/usr/local/lib/libomp, [ MAC_LDFLAGS="$MAC_LDFLAGS -L/usr/local/lib/libomp -Wl,-rpath,/usr/local/lib/libomp" ])
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-15 16:56:42
|
Revision: 45356
http://sourceforge.net/p/vice-emu/code/45356
Author: gpz
Date: 2024-10-15 16:56:40 +0000 (Tue, 15 Oct 2024)
Log Message:
-----------
make UI less amigious because i am dumb
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_petdww.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_petdww.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_petdww.c 2024-10-09 16:19:31 UTC (rev 45355)
+++ trunk/vice/src/arch/gtk3/widgets/settings_petdww.c 2024-10-15 16:56:40 UTC (rev 45356)
@@ -139,7 +139,7 @@
gtk_grid_attach(GTK_GRID(grid), enable, 0, 0, 2, 1);
/* DWW filename */
- label = gtk_label_new("DWW image file");
+ label = gtk_label_new("DWW RAM image file");
gtk_widget_set_halign(label, GTK_ALIGN_START);
chooser = vice_gtk3_resource_filechooser_new("PETDWWfilename",
GTK_FILE_CHOOSER_ACTION_SAVE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-09 16:19:34
|
Revision: 45355
http://sourceforge.net/p/vice-emu/code/45355
Author: gpz
Date: 2024-10-09 16:19:31 +0000 (Wed, 09 Oct 2024)
Log Message:
-----------
fix warning maybe perhaps :)
Modified Paths:
--------------
trunk/vice/src/socket.c
Modified: trunk/vice/src/socket.c
===================================================================
--- trunk/vice/src/socket.c 2024-10-07 18:05:47 UTC (rev 45354)
+++ trunk/vice/src/socket.c 2024-10-09 16:19:31 UTC (rev 45355)
@@ -1006,7 +1006,7 @@
signals_pipe_set();
ret = send(sockfd->sockfd, buffer, buffer_length, flags);
if (ret > buffer_length) {
- log_error(LOG_DEFAULT, "vice_network_send: internal error (ret:%"PRI_SSIZE_T" buffer_length:%"PRI_SSIZE_T" errno:%d - %s)",
+ log_error(LOG_DEFAULT, "vice_network_send: internal error (ret:%"PRI_SSIZE_T" buffer_length:%"PRI_SIZE_T" errno:%d - %s)",
ret, buffer_length, errno, strerror(errno));
ret = -1; /* signal error */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-07 18:05:48
|
Revision: 45354
http://sourceforge.net/p/vice-emu/code/45354
Author: gpz
Date: 2024-10-07 18:05:47 +0000 (Mon, 07 Oct 2024)
Log Message:
-----------
this may or may not fix #2076 :)
Modified Paths:
--------------
trunk/vice/src/monitor/monitor_binary.c
trunk/vice/src/socket.c
Modified: trunk/vice/src/monitor/monitor_binary.c
===================================================================
--- trunk/vice/src/monitor/monitor_binary.c 2024-10-05 22:01:48 UTC (rev 45353)
+++ trunk/vice/src/monitor/monitor_binary.c 2024-10-07 18:05:47 UTC (rev 45354)
@@ -25,6 +25,8 @@
*
*/
+/* #define DEBUG_BINMON */
+
#include "vice.h"
#include <assert.h>
@@ -60,6 +62,12 @@
# include "svnversion.h"
#endif
+#ifdef DEBUG_BINMON
+#define DBG(x) log_printf x
+#else
+#define DBG(x)
+#endif
+
#ifdef HAVE_NETWORK
#define ADDR_LIMIT(x) ((uint16_t)(addr_mask(x)))
@@ -1425,7 +1433,7 @@
uint8_t requested_memspace = body[5];
uint16_t requested_banknum = little_endian_to_uint16(&body[6]);
- uint32_t length = endaddress - startaddress + 1;
+ uint32_t length = (endaddress + 1) - startaddress;
if (startaddress > endaddress) {
monitor_binary_error(e_MON_ERR_INVALID_PARAMETER, command->request_id);
@@ -1492,7 +1500,7 @@
uint8_t requested_memspace = body[5];
uint16_t requested_banknum = little_endian_to_uint16(&body[6]);
- uint32_t length = endaddress - startaddress + 1;
+ uint32_t length = (endaddress + 1) - startaddress;
if (startaddress > endaddress) {
monitor_binary_error(e_MON_ERR_INVALID_PARAMETER, command->request_id);
@@ -1522,8 +1530,11 @@
banknum = requested_banknum;
+ DBG(("monitor_binary_process_mem_set %04x-%04x (=length:%04x) bank:%d memspace:%d", startaddress, endaddress, length, banknum, memspace));
+
sidefx = !!new_sidefx;
for (i = 0; i < length; i++) {
+ DBG(("%04x:%02x", (uint16_t)ADDR_LIMIT(startaddress + i), body[header_size + i]));
mon_set_mem_val_ex(memspace, banknum, (uint16_t)ADDR_LIMIT(startaddress + i), body[header_size + i]);
}
sidefx = old_sidefx;
@@ -1541,7 +1552,7 @@
command.request_id = little_endian_to_uint32(&pbuffer[6]);
- if (command.api_version < 0x01 || command.api_version > 0x02) {
+ if ((command.api_version < 0x01) || (command.api_version > 0x02)) {
monitor_binary_error(e_MON_ERR_CMD_INVALID_API_VERSION, command.request_id);
return;
}
@@ -1555,6 +1566,7 @@
command.body = &pbuffer[11];
command_type = command.type;
+ DBG(("monitor_binary_process_command type:%02x", command_type));
if (command_type == e_MON_CMD_PING) {
monitor_binary_process_ping(&command);
Modified: trunk/vice/src/socket.c
===================================================================
--- trunk/vice/src/socket.c 2024-10-05 22:01:48 UTC (rev 45353)
+++ trunk/vice/src/socket.c 2024-10-07 18:05:47 UTC (rev 45354)
@@ -1006,7 +1006,8 @@
signals_pipe_set();
ret = send(sockfd->sockfd, buffer, buffer_length, flags);
if (ret > buffer_length) {
- log_error(LOG_DEFAULT, "vice_network_send: internal error");
+ log_error(LOG_DEFAULT, "vice_network_send: internal error (ret:%"PRI_SSIZE_T" buffer_length:%"PRI_SSIZE_T" errno:%d - %s)",
+ ret, buffer_length, errno, strerror(errno));
ret = -1; /* signal error */
}
signals_pipe_unset();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-05 22:01:50
|
Revision: 45353
http://sourceforge.net/p/vice-emu/code/45353
Author: gpz
Date: 2024-10-05 22:01:48 +0000 (Sat, 05 Oct 2024)
Log Message:
-----------
Don't pop up a second ui_error message when ffmpeg executable was not found. also reset/stop the recording status in the statusbar when recording is no more active.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/uimedia.c
trunk/vice/src/arch/gtk3/widgets/statusbarrecordingwidget.c
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/arch/gtk3/uimedia.c
===================================================================
--- trunk/vice/src/arch/gtk3/uimedia.c 2024-10-04 13:34:07 UTC (rev 45352)
+++ trunk/vice/src/arch/gtk3/uimedia.c 2024-10-05 22:01:48 UTC (rev 45353)
@@ -708,6 +708,11 @@
}
g_free(filename);
g_free(filename_locale);
+
+ /* if for some reason recording is not active now, signal the UI it has been stopped */
+ if (!screenshot_is_recording()) {
+ ui_media_stop_recording();
+ }
}
mainlock_release();
gtk_widget_destroy(GTK_WIDGET(dialog));
Modified: trunk/vice/src/arch/gtk3/widgets/statusbarrecordingwidget.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/statusbarrecordingwidget.c 2024-10-04 13:34:07 UTC (rev 45352)
+++ trunk/vice/src/arch/gtk3/widgets/statusbarrecordingwidget.c 2024-10-05 22:01:48 UTC (rev 45353)
@@ -268,7 +268,7 @@
* So this needs some serious refactoring.
*/
type = RW_TYPE_AUDIO;
- } else {
+ } else if (screenshot_is_recording()) {
type = RW_TYPE_VIDEO;
}
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-04 13:34:07 UTC (rev 45352)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-05 22:01:48 UTC (rev 45353)
@@ -1209,7 +1209,11 @@
if (test_ffmpeg_executable() < 0) {
screenshot_stop_recording();
ui_error("ffmpeg executable could not be started.");
- return -1;
+ /* Do not return -1, since that would just pop up a second error message,
+ which will eventually appear behind the main window, and make the UI
+ seem to hang. We can do this, since there is no further error handling
+ depending on the return value. */
+ return 0;
}
#ifdef HAVE_FFMPEG
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-04 13:34:10
|
Revision: 45352
http://sourceforge.net/p/vice-emu/code/45352
Author: gpz
Date: 2024-10-04 13:34:07 +0000 (Fri, 04 Oct 2024)
Log Message:
-----------
improve error handling a bit. a proper error is now shown when ffmpeg executable can not be started - however, as a result the UI becomes unresponsible, and the emulator appears to still run (?). likely a locking problem, perhaps screenshot_stop_recording() needs to be wrapped accordingly
Modified Paths:
--------------
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-02 19:52:29 UTC (rev 45351)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-04 13:34:07 UTC (rev 45352)
@@ -288,6 +288,8 @@
#endif
static char *outfilename = NULL;
+log_t ffmpeg_log = LOG_DEFAULT;
+
/******************************************************************************/
static int ffmpegexedrv_init_file(void);
@@ -419,6 +421,8 @@
/* Driver API gfxoutputdrv_t.resources_init */
static int ffmpegexedrv_resources_init(void)
{
+ ffmpeg_log = log_open("FFMPEG");
+
if (resources_register_string(resources_string) < 0) {
return -1;
}
@@ -490,8 +494,8 @@
if ((video_has_codec > 0) && (video_codec != AV_CODEC_ID_NONE)) {
if (ffmpeg_video_socket == 0) {
- log_error(LOG_DEFAULT, "FFMPEG: write_video_frame ffmpeg_video_socket is 0 (framecount:%"PRIu64")\n", framecounter);
- return 0;
+ log_error(ffmpeg_log, "FFMPEG: write_video_frame ffmpeg_video_socket is 0 (framecount:%"PRIu64")", framecounter);
+ return -1;
}
return len - vice_network_send(ffmpeg_video_socket, pic->data, len, 0 /* flags */);
}
@@ -498,7 +502,7 @@
return 0;
}
-static void write_initial_video_frames(void)
+static int write_initial_video_frames(void)
{
int len;
int frm;
@@ -507,8 +511,11 @@
DBG(("video len:%d (%d)", len, len * DUMMY_FRAMES_VIDEO));
memset(video_st_frame->data, 0, len);
for (frm = 0; frm < DUMMY_FRAMES_VIDEO; frm++) {
- write_video_frame(video_st_frame);
+ if (write_video_frame(video_st_frame) < 0) {
+ return -1;
+ }
}
+ return 0;
}
static int write_initial_audio_frames(void)
@@ -527,7 +534,7 @@
for (frm = 0; frm < DUMMY_FRAMES_AUDIO; frm++) {
res = vice_network_send(ffmpeg_audio_socket, ffmpegexedrv_audio_in.buffer, len, 0 /* flags */);
if (res != len) {
- log_error(LOG_DEFAULT, "ffmpegexedrv: Error writing to AUDIO socket");
+ log_error(ffmpeg_log, "ffmpegexedrv: Error writing to AUDIO socket");
return -1;
}
if (audio_input_channels == 2) {
@@ -534,7 +541,7 @@
/* stereo - send twice the amount of data */
res = vice_network_send(ffmpeg_audio_socket, ffmpegexedrv_audio_in.buffer, len, 0 /* flags */);
if (res != len) {
- log_error(LOG_DEFAULT, "ffmpegexedrv: Error writing to AUDIO socket");
+ log_error(ffmpeg_log, "ffmpegexedrv: Error writing to AUDIO socket");
return -1;
}
}
@@ -552,14 +559,14 @@
vice_network_socket_t *s = NULL;
ad = vice_network_address_generate("127.0.0.1", port);
if (!ad) {
- log_error(LOG_DEFAULT, "Bad device name (port:%d).\n", port);
+ log_error(ffmpeg_log, "Bad device name (port:%d).\n", port);
}
/* connect socket */
s = vice_network_server(ad);
if (!s) {
- log_error(LOG_DEFAULT, "Bad port number (port:%d).\n", port);
+ log_error(ffmpeg_log, "Bad port number (port:%d).\n", port);
} else {
- /*log_error(LOG_DEFAULT, "Good port number (port:%d).\n", port);*/
+ /*log_error(ffmpeg_log, "Good port number (port:%d).\n", port);*/
vice_network_socket_close(s);
}
if (ad) {
@@ -569,6 +576,31 @@
}
#endif
+static int test_ffmpeg_executable(void)
+{
+ int ret;
+ char *argv[5];
+ /* `exec*()' does not want these to be constant... */
+ argv[0] = lib_strdup("ffmpeg");
+ argv[1] = lib_strdup("-hide_banner");
+ argv[2] = lib_strdup("-loglevel");
+ argv[3] = lib_strdup("quiet");
+ argv[4] = NULL;
+
+ ret = archdep_spawn("ffmpeg", argv, NULL, NULL);
+
+ lib_free(argv[0]);
+ lib_free(argv[1]);
+ lib_free(argv[2]);
+ lib_free(argv[3]);
+
+ if (ret != 1) {
+ log_error(ffmpeg_log, "ffmpeg executable can not be started.");
+ return -1;
+ }
+ return 0;
+}
+
static int start_ffmpeg_executable(void)
{
char fpsstring[0x20];
@@ -697,7 +729,7 @@
/*DBG(("forking ffmpeg: '%s'", command));*/
if (fork_coproc(&ffmpeg_stdin, &ffmpeg_stdout, command, &ffmpeg_pid) < 0) {
- log_error(LOG_DEFAULT, "Cannot fork process '%s'.", command);
+ log_error(ffmpeg_log, "Cannot fork process '%s'.", command);
return -1;
}
#endif
@@ -706,7 +738,7 @@
vice_network_socket_address_t *ad = NULL;
ad = vice_network_address_generate("127.0.0.1", SOCKETS_VIDEO_PORT);
if (!ad) {
- log_error(LOG_DEFAULT, "Bad device name.\n");
+ log_error(ffmpeg_log, "Bad device name.\n");
return -1;
}
/* connect socket */
@@ -718,22 +750,24 @@
ffmpeg_video_socket = vice_network_client(ad);
if (!ffmpeg_video_socket) {
#endif
- /*log_error(LOG_DEFAULT, "ffmpegexedrv: Error connecting AUDIO socket");*/
+ /*log_error(ffmpeg_log, "ffmpegexedrv: Error connecting AUDIO socket");*/
archdep_usleep(1000);
} else {
- log_message(LOG_DEFAULT, "ffmpegexedrv: VIDEO connected");
+ log_message(ffmpeg_log, "ffmpegexedrv: VIDEO connected");
video_connected = 1;
break;
}
}
if (!video_connected) {
- log_error(LOG_DEFAULT, "ffmpegexedrv: Error connecting VIDEO socket");
+ log_error(ffmpeg_log, "ffmpegexedrv: Error connecting VIDEO socket");
return -1;
}
}
#ifndef VICE_IS_SERVER
- write_initial_video_frames();
+ if (write_initial_video_frames() < 0) {
+ return -1;
+ }
#endif
if ((audio_has_codec > 0) && (audio_codec != AV_CODEC_ID_NONE)) {
@@ -740,7 +774,7 @@
vice_network_socket_address_t *ad = NULL;
ad = vice_network_address_generate("127.0.0.1", SOCKETS_AUDIO_PORT);
if (!ad) {
- log_error(LOG_DEFAULT, "Bad device name.\n");
+ log_error(ffmpeg_log, "Bad device name.\n");
return -1;
}
/* connect socket */
@@ -752,16 +786,16 @@
ffmpeg_audio_socket = vice_network_client(ad);
if (!ffmpeg_audio_socket) {
#endif
- /*log_error(LOG_DEFAULT, "ffmpegexedrv: Error connecting AUDIO socket");*/
+ /*log_error(ffmpeg_log, "ffmpegexedrv: Error connecting AUDIO socket");*/
archdep_usleep(1000);
} else {
- log_message(LOG_DEFAULT, "ffmpegexedrv: AUDIO connected");
+ log_message(ffmpeg_log, "ffmpegexedrv: AUDIO connected");
audio_connected = 1;
break;
}
}
if (!audio_connected) {
- log_error(LOG_DEFAULT, "ffmpegexedrv: Error connecting AUDIO socket");
+ log_error(ffmpeg_log, "ffmpegexedrv: Error connecting AUDIO socket");
return -1;
}
}
@@ -780,7 +814,7 @@
}
/*DBG(("forking ffmpeg: '%s'", command));*/
if (fork_coproc(&ffmpeg_stdin, &ffmpeg_stdout, command, &ffmpeg_pid) < 0) {
- log_error(LOG_DEFAULT, "Cannot fork process '%s'.", command);
+ log_error(ffmpeg_log, "Cannot fork process '%s'.", command);
return -1;
}
@@ -809,7 +843,9 @@
if (vice_network_select_poll_one(ffmpeg_video_listen_socket)) {
ffmpeg_video_socket = vice_network_accept(ffmpeg_video_listen_socket);
- write_initial_video_frames();
+ if (write_initial_video_frames() < 0) {
+ return -1;
+ }
}
DBG(("ffmpeg_video_socket connected: %p", ffmpeg_video_socket));
}
@@ -816,7 +852,7 @@
} while ((ffmpeg_audio_socket == NULL) || (ffmpeg_video_socket == NULL));
#endif
- log_message(LOG_DEFAULT, "ffmpegexedrv: pipes are ready");
+ log_message(ffmpeg_log, "ffmpegexedrv: pipes are ready");
return 0;
}
@@ -885,7 +921,7 @@
DBG(("ffmpegexedrv_open_audio (%d,%d)", audio_input_channels, AUDIO_BUFFER_MAX_CHANNELS));
/*assert((audio_input_channels > 0));*/
/*if (audio_input_channels < 1) {
- log_warning(LOG_DEFAULT, "ffmpegexedrv_open_audio audio_input_channels < 1 (%d,%d)", audio_input_channels, AUDIO_BUFFER_MAX_CHANNELS);
+ log_warning(ffmpeg_log, "ffmpegexedrv_open_audio audio_input_channels < 1 (%d,%d)", audio_input_channels, AUDIO_BUFFER_MAX_CHANNELS);
}*/
audio_is_open = 1;
@@ -898,7 +934,7 @@
ffmpegexedrv_audio_in.buffer = lib_malloc(audio_inbuf_size);
if (ffmpegexedrv_audio_in.buffer == NULL) {
- log_error(LOG_DEFAULT, "ffmpegexedrv: Error allocating audio buffer (%u bytes)", (unsigned)audio_inbuf_size);
+ log_error(ffmpeg_log, "ffmpegexedrv: Error allocating audio buffer (%u bytes)", (unsigned)audio_inbuf_size);
return -1;
}
return 0;
@@ -941,9 +977,7 @@
}
#endif
- start_ffmpeg_executable();
-
- return 0;
+ return start_ffmpeg_executable();
}
/* Soundmovie API soundmovie_funcs_t.encode */
@@ -964,7 +998,7 @@
#endif
if (ffmpeg_audio_socket == 0) {
- log_error(LOG_DEFAULT, "FFMPEG: ffmpegexe_soundmovie_encode ffmpeg_audio_socket is 0 (framecount:%"PRIu64")", audio_input_counter);
+ log_error(ffmpeg_log, "FFMPEG: ffmpegexe_soundmovie_encode ffmpeg_audio_socket is 0 (framecount:%"PRIu64")", audio_input_counter);
return 0;
}
@@ -1052,7 +1086,7 @@
picture->data = lib_malloc(bpp * width * height);
if (!picture->data) {
lib_free(picture);
- log_debug(LOG_DEFAULT, "ffmpegexedrv: Could not allocate frame data");
+ log_debug(ffmpeg_log, "ffmpegexedrv: Could not allocate frame data");
return NULL;
}
@@ -1076,7 +1110,7 @@
/* allocate the encoded raw picture */
video_st_frame = video_alloc_picture(INPUT_VIDEO_BPP, video_width, video_height);
if (!video_st_frame) {
- log_debug(LOG_DEFAULT, "ffmpegexedrv: could not allocate picture");
+ log_debug(ffmpeg_log, "ffmpegexedrv: could not allocate picture");
return -1;
}
@@ -1138,19 +1172,20 @@
return 0;
}
#endif
+
if (ffmpegexedrv_open_video() < 0) {
+ screenshot_stop_recording();
ui_error("ffmpegexedrv: Cannot open video stream");
- screenshot_stop_recording();
return -1;
}
if (ffmpegexedrv_open_audio() < 0) {
+ screenshot_stop_recording();
ui_error("ffmpegexedrv: Cannot open audio stream");
- screenshot_stop_recording();
return -1;
}
- log_debug(LOG_DEFAULT, "ffmpegexedrv: Initialized file successfully");
+ log_debug(ffmpeg_log, "ffmpegexedrv: Initialized file successfully");
/*start_ffmpeg_executable();*/
@@ -1171,6 +1206,12 @@
video_init_done = 0;
file_init_done = 0;
+ if (test_ffmpeg_executable() < 0) {
+ screenshot_stop_recording();
+ ui_error("ffmpeg executable could not be started.");
+ return -1;
+ }
+
#ifdef HAVE_FFMPEG
get_resource_values();
#endif
@@ -1216,7 +1257,7 @@
/* free the streams */
close_stream();
- log_debug(LOG_DEFAULT, "ffmpegexedrv: Closed successfully");
+ log_debug(ffmpeg_log, "ffmpegexedrv: Closed successfully");
file_init_done = 0;
@@ -1264,7 +1305,9 @@
/*DBGFRAMES(("ffmpegexedrv_record (%u)", framecounter));*/
video_fill_rgb_image(screenshot, video_st_frame);
- write_video_frame(video_st_frame);
+ if (write_video_frame(video_st_frame) < 0) {
+ return -1;
+ }
/* the video is late */
if (frametime < (audiotime - (time_base * 1.5f))) {
@@ -1272,7 +1315,9 @@
framecounter++;
DBG(("video is late, inserting a frame (framecount:%lu, audiocount:%lu frametime:%f, audiotime:%f)",
framecounter, audio_input_counter, frametime, audiotime));
- write_video_frame(video_st_frame);
+ if (write_video_frame(video_st_frame) < 0) {
+ return -1;
+ }
}
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-10-02 19:52:31
|
Revision: 45351
http://sourceforge.net/p/vice-emu/code/45351
Author: gpz
Date: 2024-10-02 19:52:29 +0000 (Wed, 02 Oct 2024)
Log Message:
-----------
fix recording video using the ffmpeg executable, should skip warp and keep a/v sync the same as ZMBV
Modified Paths:
--------------
trunk/vice/src/arch/shared/coproc.c
trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
Modified: trunk/vice/src/arch/shared/coproc.c
===================================================================
--- trunk/vice/src/arch/shared/coproc.c 2024-10-01 16:24:18 UTC (rev 45350)
+++ trunk/vice/src/arch/shared/coproc.c 2024-10-02 19:52:29 UTC (rev 45351)
@@ -148,7 +148,11 @@
{
log_message(LOG_DEFAULT, "terminating child process id: %d", pid);
if (kill(pid, SIGKILL) != 0) {
- log_error(LOG_DEFAULT, "terminating child process id %d failed.", pid);
+ if (errno == ESRCH) {
+ log_debug(LOG_DEFAULT, "child process id %d does not exist anymore.", pid);
+ } else {
+ log_error(LOG_DEFAULT, "terminating child process id %d failed.", pid);
+ }
}
}
@@ -282,7 +286,11 @@
{
log_message(LOG_DEFAULT, "terminating child process id: %p", pid);
if (TerminateProcess(pid, 0) != 0) {
- log_error(LOG_DEFAULT, "terminating child process id %p failed.", pid);
+ if (GetLastError() == ERROR_INVALID_HANDLE) {
+ log_debug(LOG_DEFAULT, "child process id %d does not exist anymore.", pid);
+ } else {
+ log_error(LOG_DEFAULT, "terminating child process id %p failed.", pid);
+ }
}
}
Modified: trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-01 16:24:18 UTC (rev 45350)
+++ trunk/vice/src/gfxoutputdrv/ffmpegexedrv.c 2024-10-02 19:52:29 UTC (rev 45351)
@@ -65,6 +65,7 @@
#include <stdlib.h>
#include <inttypes.h>
#include <unistd.h>
+#include <math.h>
#include "archdep.h"
#include "cmdline.h"
@@ -235,7 +236,7 @@
static int file_init_done;
#define DUMMY_FRAMES_VIDEO 1
-#define DUMMY_FRAMES_AUDIO 200 /* FIXME: calculate from AUDIO_SKIP_SECONDS */
+#define DUMMY_FRAMES_AUDIO ((int)round(fps * (double)AUDIO_SKIP_SECONDS))
#define AUDIO_SKIP_SECONDS 4
@@ -570,10 +571,10 @@
static int start_ffmpeg_executable(void)
{
+ char fpsstring[0x20];
+ char *dot;
static char command[0x400];
static char tempcommand[0x400];
- int fpsint;
- int fpsfrac;
int n;
int audio_connected = 0;
int video_connected = 0;
@@ -584,11 +585,15 @@
log_resource_values(__FUNCTION__);
/* FPS of the input, including "half framerate" */
- fpsint = fps;
- fpsfrac = (fps * 100.0f) - (fpsint * 100.0f);
+ sprintf(fpsstring, "%f", fps);
+ dot = strchr(fpsstring,',');
+ if (dot) {
+ *dot = '.';
+ }
strcpy(command,
"ffmpeg "
+ "-nostdin "
/* Caution: at least on windows we must avoid that the ffmpeg
executable produces output on stdout - if it does, the process
may block and wait for ffmpeg_stderr being read */
@@ -599,7 +604,6 @@
/* "-loglevel error " */
#else
"-loglevel quiet "
- "-nostdin "
#endif
);
@@ -607,19 +611,19 @@
if ((video_has_codec > 0) && (video_codec != AV_CODEC_ID_NONE)) {
sprintf(tempcommand,
"-f rawvideo "
- "-pix_fmt rgb24 "
- "-framerate %2d.%02d " /* exact fps */
+ "-pixel_format rgb24 "
+ "-framerate %s " /* exact fps */
+ "-r %s " /* exact fps */
"-s %dx%d " /* size */
/*"-readrate_initial_burst 0 "*/ /* no initial burst read */
/*"-readrate 1 "*/ /* Read input at native frame rate */
"-thread_queue_size 512 "
- "-vsync 0 "
#ifdef VICE_IS_SERVER
"-i tcp://127.0.0.1:%d "
#else
"-i tcp://127.0.0.1:%d?listen "
#endif
- , fpsint, fpsfrac
+ , fpsstring, fpsstring
, video_width, video_height
, SOCKETS_VIDEO_PORT
);
@@ -631,7 +635,6 @@
sprintf(tempcommand,
"-f s16le " /* input audio stream format */
"-acodec pcm_s16le " /* audio codec */
- "-channels %d " /* input audio channels */
"-ac %d " /* input audio channels */
"-ar %d " /* input audio stream sample rate */
"-ss %d " /* skip seconds at start */
@@ -641,9 +644,7 @@
#else
"-i tcp://127.0.0.1:%d?listen "
#endif
- "-async 1 "
, audio_input_channels
- , audio_input_channels
, audio_input_sample_rate
, AUDIO_SKIP_SECONDS
, SOCKETS_AUDIO_PORT
@@ -657,7 +658,6 @@
"-f %s " /* outfile format/container */
"-shortest " /* Finish encoding when the shortest output stream ends. */
/*"-shortest_buf_duration 1 "*/ /* the maximum duration of buffered frames in seconds */
- "-async 1 "
, ffmpegexe_format /* outfile format/container */
);
strcat(command, tempcommand);
@@ -664,10 +664,11 @@
/* options for the output file (video) */
if ((video_has_codec > 0) && (video_codec != AV_CODEC_ID_NONE)) {
sprintf(tempcommand,
- "-framerate %2d.%02d " /* exact fps */
+ "-framerate %s " /* exact fps */
+ "-r %s " /* exact fps */
"-vcodec %s " /* outfile video codec */
"-b:v %d " /* outfile video bitrate */
- , fpsint, fpsfrac
+ , fpsstring, fpsstring
, av_codec_get_option(video_codec) /* outfile video codec */
, video_bitrate /* outfile video bitrate */
);
@@ -688,6 +689,12 @@
strcat(command, outfilename ? outfilename : "outfile.avi");
#ifndef VICE_IS_SERVER
+ /* kill old process in case it is still running for whatever reason */
+ if (ffmpeg_pid != 0) {
+ kill_coproc(ffmpeg_pid);
+ ffmpeg_pid = 0;
+ }
+
/*DBG(("forking ffmpeg: '%s'", command));*/
if (fork_coproc(&ffmpeg_stdin, &ffmpeg_stdout, command, &ffmpeg_pid) < 0) {
log_error(LOG_DEFAULT, "Cannot fork process '%s'.", command);
@@ -766,6 +773,11 @@
#endif
#ifdef VICE_IS_SERVER
+ /* kill old process in case it is still running for whatever reason */
+ if (ffmpeg_pid != 0) {
+ kill_coproc(ffmpeg_pid);
+ ffmpeg_pid = 0;
+ }
/*DBG(("forking ffmpeg: '%s'", command));*/
if (fork_coproc(&ffmpeg_stdin, &ffmpeg_stdout, command, &ffmpeg_pid) < 0) {
log_error(LOG_DEFAULT, "Cannot fork process '%s'.", command);
@@ -852,11 +864,14 @@
close(ffmpeg_stdout);
ffmpeg_stdout = -1;
}
-
+ /* do not kill ffmpeg here, it should die when the streams close. if it is
+ killed early the resulting file will be broken */
+#if 0
if (ffmpeg_pid != 0) {
kill_coproc(ffmpeg_pid);
ffmpeg_pid = 0;
}
+#endif
}
/*****************************************************************************
@@ -1298,6 +1313,13 @@
int i = 0;
#endif
DBG(("ffmpegexedrv_shutdown"));
+
+ /* kill old process in case it is still running for whatever reason */
+ if (ffmpeg_pid != 0) {
+ kill_coproc(ffmpeg_pid);
+ ffmpeg_pid = 0;
+ }
+
#ifndef HAVE_FFMPEG
if (ffmpegexe_drv.formatlist != NULL) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2024-10-01 16:24:21
|
Revision: 45350
http://sourceforge.net/p/vice-emu/code/45350
Author: compyx
Date: 2024-10-01 16:24:18 +0000 (Tue, 01 Oct 2024)
Log Message:
-----------
Gtk3: update 'Categories' entries in .desktop files
Apparently the entries need to be separated by a semicolon, not a comma or a
space. At least that's what the Arch Linux docs use in their example, and
makes `desktop-file-validate` not barf.
Modified Paths:
--------------
trunk/vice/build/debian/vsid.desktop
trunk/vice/build/debian/x128.desktop
trunk/vice/build/debian/x64dtv.desktop
trunk/vice/build/debian/x64sc.desktop
trunk/vice/build/debian/xcbm2.desktop
trunk/vice/build/debian/xcbm5x0.desktop
trunk/vice/build/debian/xpet.desktop
trunk/vice/build/debian/xplus4.desktop
trunk/vice/build/debian/xscpu64.desktop
trunk/vice/build/debian/xvic.desktop
trunk/vice/src/arch/gtk3/data/unix/emu.desktop
Modified: trunk/vice/build/debian/vsid.desktop
===================================================================
--- trunk/vice/build/debian/vsid.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/vsid.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/vsid
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/vsid.svg
-Categories=Audio,AudioVideo,Emulator
+Categories=Audio;AudioVideo;Emulator;
Modified: trunk/vice/build/debian/x128.desktop
===================================================================
--- trunk/vice/build/debian/x128.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/x128.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/x128
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/x128.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/x64dtv.desktop
===================================================================
--- trunk/vice/build/debian/x64dtv.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/x64dtv.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/x64dtv
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/x64dtv.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/x64sc.desktop
===================================================================
--- trunk/vice/build/debian/x64sc.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/x64sc.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/x64sc
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/x64sc.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xcbm2.desktop
===================================================================
--- trunk/vice/build/debian/xcbm2.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xcbm2.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xcbm2
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xcbm2.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xcbm5x0.desktop
===================================================================
--- trunk/vice/build/debian/xcbm5x0.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xcbm5x0.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xcbm5x0
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xcbm2.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xpet.desktop
===================================================================
--- trunk/vice/build/debian/xpet.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xpet.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xpet
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xpet.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xplus4.desktop
===================================================================
--- trunk/vice/build/debian/xplus4.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xplus4.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xplus4
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xplus4.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xscpu64.desktop
===================================================================
--- trunk/vice/build/debian/xscpu64.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xscpu64.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xscpu64
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xscpu64.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/build/debian/xvic.desktop
===================================================================
--- trunk/vice/build/debian/xvic.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/build/debian/xvic.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,4 +5,4 @@
Exec=/usr/bin/xvic
Terminal=false
Icon=/usr/share/icons/hicolor/scalable/apps/xvic.svg
-Categories=Game,Emulator
+Categories=Game;Emulator;
Modified: trunk/vice/src/arch/gtk3/data/unix/emu.desktop
===================================================================
--- trunk/vice/src/arch/gtk3/data/unix/emu.desktop 2024-09-30 20:37:08 UTC (rev 45349)
+++ trunk/vice/src/arch/gtk3/data/unix/emu.desktop 2024-10-01 16:24:18 UTC (rev 45350)
@@ -5,6 +5,6 @@
Exec=__PREFIX__/bin/__VICE_EMU_BIN__
Terminal=false
Icon=__PREFIX__/share/vice/common/__ICON__
-Categories=Game,Emulator
+Categories=Game;Emulator;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2024-09-30 20:37:09
|
Revision: 45349
http://sourceforge.net/p/vice-emu/code/45349
Author: compyx
Date: 2024-09-30 20:37:08 +0000 (Mon, 30 Sep 2024)
Log Message:
-----------
Gtk3: set categories in .desktop files for `--enable-desktop-files`
Add "Game" and "Emulator" categories in the .desktop file template used by the
`--enable-desktop-files` configure switch. Should fix issues with desktop
environments not showing the icons after a `make install`.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/data/unix/emu.desktop
Modified: trunk/vice/src/arch/gtk3/data/unix/emu.desktop
===================================================================
--- trunk/vice/src/arch/gtk3/data/unix/emu.desktop 2024-09-28 13:42:28 UTC (rev 45348)
+++ trunk/vice/src/arch/gtk3/data/unix/emu.desktop 2024-09-30 20:37:08 UTC (rev 45349)
@@ -5,4 +5,6 @@
Exec=__PREFIX__/bin/__VICE_EMU_BIN__
Terminal=false
Icon=__PREFIX__/share/vice/common/__ICON__
+Categories=Game,Emulator
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-09-28 13:42:31
|
Revision: 45348
http://sourceforge.net/p/vice-emu/code/45348
Author: gpz
Date: 2024-09-28 13:42:28 +0000 (Sat, 28 Sep 2024)
Log Message:
-----------
fix uninitialized var in old filter, patch by leandro nini
Modified Paths:
--------------
trunk/vice/src/resid/filter.cc
Modified: trunk/vice/src/resid/filter.cc
===================================================================
--- trunk/vice/src/resid/filter.cc 2024-09-27 13:52:39 UTC (rev 45347)
+++ trunk/vice/src/resid/filter.cc 2024-09-28 13:42:28 UTC (rev 45348)
@@ -428,6 +428,7 @@
enable_filter(true);
set_chip_model(MOS6581);
set_voice_mask(0x07);
+ adjust_filter_bias(0.);
input(0);
reset();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-09-27 13:52:41
|
Revision: 45347
http://sourceforge.net/p/vice-emu/code/45347
Author: gpz
Date: 2024-09-27 13:52:39 +0000 (Fri, 27 Sep 2024)
Log Message:
-----------
skip video recording when warpmode is active, this does not, and can not, work and will result in massive a/v delays
Modified Paths:
--------------
trunk/vice/src/screenshot.c
Modified: trunk/vice/src/screenshot.c
===================================================================
--- trunk/vice/src/screenshot.c 2024-09-26 22:22:58 UTC (rev 45346)
+++ trunk/vice/src/screenshot.c 2024-09-27 13:52:39 UTC (rev 45347)
@@ -174,10 +174,14 @@
}
} else {
/* We're recording a movie */
- if ((recording_driver->record)(screenshot) < 0) {
- log_error(screenshot_log, "Recording failed...");
- lib_free(screenshot->color_map);
- return -1;
+ if (vsync_get_warp_mode() == 0) {
+ /* skip recording when warpmode is active, this doesn't really work -
+ and unless we significantly change what warpmode does can not work */
+ if ((recording_driver->record)(screenshot) < 0) {
+ log_error(screenshot_log, "Recording failed...");
+ lib_free(screenshot->color_map);
+ return -1;
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-09-26 22:23:00
|
Revision: 45346
http://sourceforge.net/p/vice-emu/code/45346
Author: gpz
Date: 2024-09-26 22:22:58 +0000 (Thu, 26 Sep 2024)
Log Message:
-----------
encode zmbv video at proper (fractional) frame rate, prepare some stuff to skip frames if needed. "warpmode" and "no audio" still needs to be fixed
Modified Paths:
--------------
trunk/vice/src/gfxoutputdrv/gfxoutput.c
trunk/vice/src/gfxoutputdrv/zmbvdrv.c
trunk/vice/src/lib/libzmbv/zmbv_avi.c
trunk/vice/src/lib/libzmbv/zmbv_avi.h
Modified: trunk/vice/src/gfxoutputdrv/gfxoutput.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/gfxoutput.c 2024-09-26 18:43:24 UTC (rev 45345)
+++ trunk/vice/src/gfxoutputdrv/gfxoutput.c 2024-09-26 22:22:58 UTC (rev 45346)
@@ -112,12 +112,13 @@
gfxoutput_init_iff(help);
gfxoutput_init_pcx(help);
gfxoutput_init_ppm(help);
+
/* video related */
+ gfxoutput_init_zmbv(help);
+ gfxoutput_init_ffmpegexe(help);
#ifdef HAVE_FFMPEG
gfxoutput_init_ffmpeg(help);
#endif
- gfxoutput_init_ffmpegexe(help);
- gfxoutput_init_zmbv(help);
/* C64 formats */
gfxoutput_init_godot(help);
Modified: trunk/vice/src/gfxoutputdrv/zmbvdrv.c
===================================================================
--- trunk/vice/src/gfxoutputdrv/zmbvdrv.c 2024-09-26 18:43:24 UTC (rev 45345)
+++ trunk/vice/src/gfxoutputdrv/zmbvdrv.c 2024-09-26 22:22:58 UTC (rev 45346)
@@ -39,6 +39,8 @@
#include "lib.h"
#include "log.h"
#include "machine.h"
+#include "maincpu.h"
+#include "math.h"
#include "palette.h"
#include "resources.h"
#include "screenshot.h"
@@ -124,8 +126,15 @@
static int audio_freq = 48000; /* initialized by zmbv_soundmovie_init */
static int audio_channels = 1; /* initialized by zmbv_soundmovie_init */
-static unsigned int video_framerate = 50; /* initialized by zmbvdrv_init_video */
+static double video_framerate = 50.125f; /* initialized by zmbvdrv_init_video */
+CLOCK clk_startframe;
+CLOCK clk_frame_cycles;
+CLOCK clk_last_audio_frame;
+CLOCK clk_this_audio_frame;
+CLOCK clk_last_video_frame;
+CLOCK clk_this_video_frame;
+
static int zmbvdrv_init_file(void);
/******************************************************************************/
@@ -268,12 +277,12 @@
log_error(LOG_DEFAULT, "zmbvdrv: Error allocating audio buffer (%u bytes)", (unsigned)MAX_AUDIO_BUFFER_SIZE);
return -1;
}
- zmbvdrv_audio_in.size = (audio_freq / video_framerate);
- LOG(("zmbvdrv_open_audio freq:%d fps:%u bufsize:%d\n", audio_freq, video_framerate, zmbvdrv_audio_in.size));
+ zmbvdrv_audio_in.size = round((double)audio_freq / video_framerate);
+ LOG(("zmbvdrv_open_audio freq:%d fps:%f bufsize:%d", audio_freq, video_framerate, zmbvdrv_audio_in.size));
#if 0
memset(cur_audio, 0, zmbvdrv_audio_in.size * 2);
if (zmbv_avi_write_chunk_audio(zavi, &cur_audio[0], zmbvdrv_audio_in.size) < 0) {
- LOG(("FATAL: can't write audio frame for screen #%d\n", 0));
+ LOG(("FATAL: can't write audio frame for screen #%d", 0));
}
#endif
return 0;
@@ -322,9 +331,12 @@
{
int ret = 0;
- LOGFRAMES(("zmbv_soundmovie_encode(size:%d used:%d channels:%d)",
- audio_in->size, audio_in->used, audio_channels));
+ clk_last_audio_frame = clk_this_audio_frame;
+ clk_this_audio_frame = maincpu_clk;
+ LOGFRAMES(("zmbv_soundmovie_encode(size:%d used:%d channels:%d) clk:%ld frame:%d",
+ audio_in->size, audio_in->used, audio_channels, clk_this_audio_frame, frameno));
+
/* FIXME: we might have an endianess problem here, we might have to swap lo/hi on BE machines */
if (audio_channels == 1) {
int i, o;
@@ -403,7 +415,7 @@
cur_pal[(x * (PALETTE_COLORS_BPP / 8)) + 2] = screenshot->palette->entries[x].blue;
}
- LOGFRAMES(("zmbvdrv_fill_rgb_image video_width/height: %dx%d\n", video_width, video_height));
+ LOGFRAMES(("zmbvdrv_fill_rgb_image video_width/height: %dx%d", video_width, video_height));
for (y = 0; y < video_height; y++) {
for (x = 0; x < video_width; x++) {
cur_screen[(y * video_width) + x] = screenshot->draw_buffer[bufferoffset + x];
@@ -410,7 +422,7 @@
}
bufferoffset += screenshot->draw_buffer_line_size;
}
- LOGFRAMES(("zmbvdrv_fill_rgb_image done\n"));
+ LOGFRAMES(("zmbvdrv_fill_rgb_image done"));
return 0;
}
@@ -455,9 +467,9 @@
video_init_done = 1;
{
double time_base, fps;
+ clk_frame_cycles = machine_get_cycles_per_frame();
time_base = ((double)machine_get_cycles_per_frame()) / ((double) machine_get_cycles_per_second());
fps = 1.0f / time_base;
- fps += 0.5f;
LOG(("zmbvdrv_init_video fps: %f timebase: %f", fps, time_base));
video_framerate = fps;
}
@@ -508,7 +520,13 @@
/* complevel = 9; */
/* no_zlib = 0; */
- if (no_zlib) iflg |= ZMBV_INIT_FLAG_NOZLIB;
+ clk_startframe = maincpu_clk;
+ clk_this_video_frame = clk_this_audio_frame = clk_startframe;
+ LOG(("zmbvdrv_save start clock: %ld", clk_startframe));
+
+ if (no_zlib) {
+ iflg |= ZMBV_INIT_FLAG_NOZLIB;
+ }
LOG(("zmbvdrv_save using compression level %d", complevel));
zmbvdrv_init_video(screenshot);
@@ -579,11 +597,30 @@
int ret = -1;
int32_t written;
int flags;
+ CLOCK clk_diff;
if (audio_init_done && video_init_done && !file_init_done) {
zmbvdrv_init_file();
}
+ clk_last_video_frame = clk_this_video_frame;
+ clk_this_video_frame = maincpu_clk;
+
+ if (clk_this_video_frame > clk_this_audio_frame) {
+ /* video ahead of audio */
+ clk_diff = clk_this_video_frame - clk_this_audio_frame;
+ if (clk_diff > clk_frame_cycles) {
+ LOG(("zmbvdrv_record video>audio %ld %ld frame:%ld diff:%ld", clk_this_video_frame, clk_this_audio_frame, clk_frame_cycles, clk_diff));
+ /*return 0;*/ /* skip this frame? */
+ }
+ } else if (clk_this_audio_frame > clk_this_video_frame) {
+ /* audio is ahead of video */
+ clk_diff = clk_this_audio_frame - clk_this_video_frame;
+ if (clk_diff > clk_frame_cycles) {
+ LOG(("zmbvdrv_record video<audio %ld %ld frame:%ld diff:%ld", clk_this_video_frame, clk_this_audio_frame, clk_frame_cycles, clk_diff));
+ }
+ }
+
zmbvdrv_fill_rgb_image(screenshot);
flags = ((frameno % KEYFRAME_INTERVAL == 0) ? ZMBV_PREP_FLAG_KEYFRAME : ZMBV_PREP_FLAG_NONE);
@@ -590,27 +627,27 @@
frameno++;
- LOGFRAMES(("zmbvdrv_record: frame %d\n", frameno));
+ LOGFRAMES(("zmbvdrv_record: frame %d (clk:%ld)", frameno, clk_this_video_frame));
/* encode video frame */
if (zmbv_encode_prepare_frame(zcodec, flags, fmt, cur_pal, video_work_buffer, work_buffer_size) < 0) {
- LOG(("FATAL: can't prepare frame for screen #%d\n", frameno));
+ LOG(("FATAL: can't prepare frame for screen #%d", frameno));
goto quit;
}
for (int y = 0; y < video_height; ++y) {
if (zmbv_encode_line(zcodec, cur_screen+(y*video_width)) < 0) {
- LOG(("FATAL: can't encode line #%d for screen #%d\n", y, frameno));
+ LOG(("FATAL: can't encode line #%d for screen #%d", y, frameno));
goto quit;
}
}
written = zmvb_encode_finish_frame(zcodec);
if (written < 0) {
- LOG(("FATAL: can't finish frame for screen #%d\n", frameno));
+ LOG(("FATAL: can't finish frame for screen #%d", frameno));
goto quit;
}
/* write avi chunk */
if (zmbv_avi_write_chunk_video(zavi, video_work_buffer, written) < 0) {
- LOG(("FATAL: can't write compressed frame for screen #%d\n", frameno));
+ LOG(("FATAL: can't write compressed frame for screen #%d", frameno));
goto quit;
}
ret = 0;
Modified: trunk/vice/src/lib/libzmbv/zmbv_avi.c
===================================================================
--- trunk/vice/src/lib/libzmbv/zmbv_avi.c 2024-09-26 18:43:24 UTC (rev 45345)
+++ trunk/vice/src/lib/libzmbv/zmbv_avi.c 2024-09-26 22:22:58 UTC (rev 45346)
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <math.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -69,7 +70,7 @@
uint8_t *index;
uint32_t indexsize, indexused;
uint32_t width, height;
- uint32_t fps;
+ double fps;
uint32_t frames;
uint32_t written;
//uint32_t audioused; // always 0 for now
@@ -79,7 +80,7 @@
};
-zmbv_avi_t zmbv_avi_start (const char *fname, int width, int height, int fps, int audiorate) {
+zmbv_avi_t zmbv_avi_start (const char *fname, int width, int height, double fps, int audiorate) {
if (fname != NULL && fname[0] && width > 0 && height > 0 && width <= 16384 && height <= 16384 && fps > 0 && fps <= 100) {
zmbv_avi_t zavi = malloc(sizeof(*zavi));
if (zavi == NULL) return NULL;
@@ -139,7 +140,7 @@
AVIOUT4("avih");
AVIOUTd(56); // # of bytes to follow
- AVIOUTd((uint32_t)(1000000/zavi->fps)); // microseconds per frame
+ AVIOUTd((uint32_t)round(1000000.0f/zavi->fps)); // microseconds per frame
AVIOUTd(0);
AVIOUTd(0); // PaddingGranularity (whatever that might be)
AVIOUTd(0x110); // Flags, 0x10 has index, 0x100 interleaved
@@ -167,7 +168,7 @@
AVIOUTd(0); // Reserved, MS says: wPriority, wLanguage
AVIOUTd(0); // InitialFrames
AVIOUTd(1000000); // Scale
- AVIOUTd((uint32_t)(1000000*zavi->fps)); // Rate: Rate/Scale == samples/second
+ AVIOUTd((uint32_t)round(1000000.0f*zavi->fps)); // Rate: Rate/Scale == samples/second
AVIOUTd(0); // Start
AVIOUTd(zavi->frames); // Length
AVIOUTd(0); // SuggestedBufferSize
Modified: trunk/vice/src/lib/libzmbv/zmbv_avi.h
===================================================================
--- trunk/vice/src/lib/libzmbv/zmbv_avi.h 2024-09-26 18:43:24 UTC (rev 45345)
+++ trunk/vice/src/lib/libzmbv/zmbv_avi.h 2024-09-26 22:22:58 UTC (rev 45346)
@@ -28,7 +28,7 @@
typedef struct zmbv_avi_s *zmbv_avi_t;
-extern zmbv_avi_t zmbv_avi_start (const char *fname, int width, int height, int fps, int audiorate);
+extern zmbv_avi_t zmbv_avi_start (const char *fname, int width, int height, double fps, int audiorate);
extern int zmbv_avi_stop (zmbv_avi_t zavi);
extern int zmbv_avi_write_chunk (zmbv_avi_t zavi, const char tag[4], uint32_t size, const void *data, uint32_t flags);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-09-26 18:43:26
|
Revision: 45345
http://sourceforge.net/p/vice-emu/code/45345
Author: gpz
Date: 2024-09-26 18:43:24 +0000 (Thu, 26 Sep 2024)
Log Message:
-----------
add printf-format attribute macros also for clang
Modified Paths:
--------------
trunk/vice/src/vice.h
Modified: trunk/vice/src/vice.h
===================================================================
--- trunk/vice/src/vice.h 2024-09-26 16:56:23 UTC (rev 45344)
+++ trunk/vice/src/vice.h 2024-09-26 18:43:24 UTC (rev 45345)
@@ -127,8 +127,19 @@
#endif
/* format checking attributes for printf style functions */
-#if defined(__GNUC__)
+#ifdef __clang__
/* like regular printf, func(format, ...) */
+#define VICE_ATTR_PRINTF __attribute__((__format__(__printf__, 1, 2)))
+/* one extra param on the left, func(param, format, ...) */
+#define VICE_ATTR_PRINTF2 __attribute__((__format__(__printf__, 2, 3)))
+/* two extra param on the left, func(param, param, format, ...) */
+#define VICE_ATTR_PRINTF3 __attribute__((__format__(__printf__, 3, 4)))
+/* three extra param on the left, func(param, param, param, format, ...) */
+#define VICE_ATTR_PRINTF4 __attribute__((__format__(__printf__, 4, 5)))
+/* one extra param after the format, func(format, param, ...) (used for resource sprintf) */
+#define VICE_ATTR_RESPRINTF __attribute__((__format__(__printf__, 1, 3)))
+#elif defined(__GNUC__)
+/* like regular printf, func(format, ...) */
#define VICE_ATTR_PRINTF __attribute__((format(printf, 1, 2)))
/* one extra param on the left, func(param, format, ...) */
#define VICE_ATTR_PRINTF2 __attribute__((format(printf, 2, 3)))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|