vice-emu-commit Mailing List for VICE (Page 24)
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
|
Dec
|
|
From: <gp...@us...> - 2024-07-15 18:48:31
|
Revision: 45230
http://sourceforge.net/p/vice-emu/code/45230
Author: gpz
Date: 2024-07-15 18:48:29 +0000 (Mon, 15 Jul 2024)
Log Message:
-----------
update testlists
Modified Paths:
--------------
testprogs/testbench/c64-testlist.in
testprogs/testbench/c64rmk2-testlist.txt
testprogs/testbench/chameleon-testlist.txt
testprogs/testbench/denise-testlist.txt
testprogs/testbench/dtv-testlist.in
testprogs/testbench/emu64-testlist.txt
testprogs/testbench/hoxs64-testlist.txt
testprogs/testbench/kernal64c128c64-testlist.txt
testprogs/testbench/kernal64c64-testlist.txt
testprogs/testbench/kernal64scpu64-testlist.txt
testprogs/testbench/micro64-testlist.txt
testprogs/testbench/scpu-testlist.in
testprogs/testbench/u64-testlist.txt
testprogs/testbench/x128c64-testlist.txt
testprogs/testbench/x64-testlist.txt
testprogs/testbench/x64dtv-testlist.txt
testprogs/testbench/x64sc-testlist.txt
testprogs/testbench/xscpu64-hooks.sh
testprogs/testbench/xscpu64-testlist.txt
testprogs/testbench/yace-testlist.txt
testprogs/testbench/z64kc128c64-testlist.txt
testprogs/testbench/z64kc64-testlist.txt
Modified: testprogs/testbench/c64-testlist.in
===================================================================
--- testprogs/testbench/c64-testlist.in 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/c64-testlist.in 2024-07-15 18:48:29 UTC (rev 45230)
@@ -521,6 +521,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/c64rmk2-testlist.txt
===================================================================
--- testprogs/testbench/c64rmk2-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/c64rmk2-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -511,6 +511,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/chameleon-testlist.txt
===================================================================
--- testprogs/testbench/chameleon-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/chameleon-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/denise-testlist.txt
===================================================================
--- testprogs/testbench/denise-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/denise-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/dtv-testlist.in
===================================================================
--- testprogs/testbench/dtv-testlist.in 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/dtv-testlist.in 2024-07-15 18:48:29 UTC (rev 45230)
@@ -24,6 +24,12 @@
#../DTV/overscan/,overscan.prg,screenshot
../DTV/steal/,steal.prg,interactive,0
################################################################################
+# CPU
+################################################################################
+# this needs to be tested on real DTV
+#../interrupts/irqnoack/,ackcia.prg,exitcode,12000000
+#../interrupts/irqnoack/,ackraster.prg,exitcode,12000000,expect:timeout
+################################################################################
# Lorenz Suite
#
# ../general/ runtime: 8 minutes and 21 seconds (x64dtv)
Modified: testprogs/testbench/emu64-testlist.txt
===================================================================
--- testprogs/testbench/emu64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/emu64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -491,6 +491,8 @@
../interrupts/irqdma/,test7.prg,exitcode,450000000,vicii-pal
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/hoxs64-testlist.txt
===================================================================
--- testprogs/testbench/hoxs64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/hoxs64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -521,6 +521,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/kernal64c128c64-testlist.txt
===================================================================
--- testprogs/testbench/kernal64c128c64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/kernal64c128c64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/kernal64c64-testlist.txt
===================================================================
--- testprogs/testbench/kernal64c64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/kernal64c64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/kernal64scpu64-testlist.txt
===================================================================
--- testprogs/testbench/kernal64scpu64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/kernal64scpu64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -17,6 +17,8 @@
# CPU
################################################################################
../CPU/jeek816/,suite-a.prg,exitcode,10800000
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
################################################################################
../SCPU/scputest/,scputest.prg,interactive,0
../SCPU/scputest/,scputest-0.prg,exitcode,30000000
Modified: testprogs/testbench/micro64-testlist.txt
===================================================================
--- testprogs/testbench/micro64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/micro64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -521,6 +521,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/scpu-testlist.in
===================================================================
--- testprogs/testbench/scpu-testlist.in 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/scpu-testlist.in 2024-07-15 18:48:29 UTC (rev 45230)
@@ -16,6 +16,9 @@
# CPU
################################################################################
../CPU/jeek816/,suite-a.prg,exitcode,10800000
+# this needs to be tested on real SCPU
+#../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+#../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
################################################################################
../SCPU/scputest/,scputest.prg,interactive,0
../SCPU/scputest/,scputest-0.prg,exitcode,30000000
Modified: testprogs/testbench/u64-testlist.txt
===================================================================
--- testprogs/testbench/u64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/u64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -487,6 +487,8 @@
../interrupts/irqdma/,test7.prg,exitcode,450000000,vicii-pal
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/x128c64-testlist.txt
===================================================================
--- testprogs/testbench/x128c64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/x128c64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/x64-testlist.txt
===================================================================
--- testprogs/testbench/x64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/x64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/x64dtv-testlist.txt
===================================================================
--- testprogs/testbench/x64dtv-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/x64dtv-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -25,6 +25,11 @@
#../DTV/overscan/,overscan.prg,screenshot
../DTV/steal/,steal.prg,interactive,0
################################################################################
+# CPU
+################################################################################
+../interrupts/irqnoack/,ackcia.prg,exitcode,12000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,12000000,expect:timeout
+################################################################################
# Lorenz Suite
#
# ../general/ runtime: 8 minutes and 21 seconds (x64dtv)
Modified: testprogs/testbench/x64sc-testlist.txt
===================================================================
--- testprogs/testbench/x64sc-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/x64sc-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/xscpu64-hooks.sh
===================================================================
--- testprogs/testbench/xscpu64-hooks.sh 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/xscpu64-hooks.sh 2024-07-15 18:48:29 UTC (rev 45230)
@@ -301,8 +301,13 @@
{
if [ $verbose == "1" ]; then
echo $XSCPU64 $XSCPU64OPTS $XSCPU64OPTSEXITCODE ${@:5} "-limitcycles" "$3" "$4"
+ $XSCPU64 $XSCPU64OPTS $XSCPU64OPTSEXITCODE ${@:5} "-limitcycles" "$3" "$4" 2> /dev/null | grep "cycles elapsed" | tr '\n' ' '
+ exitcode=${PIPESTATUS[0]}
+ else
+ $XSCPU64 $XSCPU64OPTS $XSCPU64OPTSEXITCODE ${@:5} "-limitcycles" "$3" "$4" 1> /dev/null 2> /dev/null
+ exitcode=$?
fi
- $XSCPU64 $XSCPU64OPTS $XSCPU64OPTSEXITCODE ${@:5} "-limitcycles" "$3" "$4" 1> /dev/null 2> /dev/null
- exitcode=$?
-# echo "exited with: " $exitcode
+ if [ $verbose == "1" ]; then
+ echo $XSCPU64 "exited with: " $exitcode
+ fi
}
Modified: testprogs/testbench/xscpu64-testlist.txt
===================================================================
--- testprogs/testbench/xscpu64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/xscpu64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -17,6 +17,8 @@
# CPU
################################################################################
../CPU/jeek816/,suite-a.prg,exitcode,10800000
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
################################################################################
../SCPU/scputest/,scputest.prg,interactive,0
../SCPU/scputest/,scputest-0.prg,exitcode,30000000
Modified: testprogs/testbench/yace-testlist.txt
===================================================================
--- testprogs/testbench/yace-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/yace-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -492,6 +492,8 @@
../interrupts/irqdma/,test7.prg,exitcode,450000000,vicii-pal
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/z64kc128c64-testlist.txt
===================================================================
--- testprogs/testbench/z64kc128c64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/z64kc128c64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
Modified: testprogs/testbench/z64kc64-testlist.txt
===================================================================
--- testprogs/testbench/z64kc64-testlist.txt 2024-07-15 18:47:10 UTC (rev 45229)
+++ testprogs/testbench/z64kc64-testlist.txt 2024-07-15 18:48:29 UTC (rev 45230)
@@ -522,6 +522,8 @@
../interrupts/irqdummy/,irqdummy.prg,exitcode,9000000
../interrupts/irqnmi/,irqnmi-new.prg,exitcode,20000000,cia-new
../interrupts/irqnmi/,irqnmi-old.prg,exitcode,20000000,cia-old
+../interrupts/irqnoack/,ackcia.prg,exitcode,7000000
+../interrupts/irqnoack/,ackraster.prg,exitcode,7000000,expect:timeout
../interrupts/nmitest/,nmitest.prg,interactive,0,comment:repeatedly press RESTORE
../interrupts/nmitest/,nmitest2.prg,interactive,0,comment:repeatedly press RESTORE
################################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-15 18:47:11
|
Revision: 45229
http://sourceforge.net/p/vice-emu/code/45229
Author: gpz
Date: 2024-07-15 18:47:10 +0000 (Mon, 15 Jul 2024)
Log Message:
-----------
add test program related to bug #2052
Added Paths:
-----------
testprogs/interrupts/irqnoack/
testprogs/interrupts/irqnoack/Makefile
testprogs/interrupts/irqnoack/ackcia.prg
testprogs/interrupts/irqnoack/ackcia.s
testprogs/interrupts/irqnoack/ackraster.prg
testprogs/interrupts/irqnoack/ackraster.s
testprogs/interrupts/irqnoack/readme.txt
Added: testprogs/interrupts/irqnoack/Makefile
===================================================================
--- testprogs/interrupts/irqnoack/Makefile (rev 0)
+++ testprogs/interrupts/irqnoack/Makefile 2024-07-15 18:47:10 UTC (rev 45229)
@@ -0,0 +1,11 @@
+
+all: ackcia.prg ackraster.prg
+
+ackcia.prg: ackcia.s
+ acme -f cbm -o ackcia.prg ackcia.s
+ackraster.prg: ackraster.s
+ acme -f cbm -o ackraster.prg ackraster.s
+
+clean:
+ $(RM) ackcia.prg
+ $(RM) ackraster.prg
Added: testprogs/interrupts/irqnoack/ackcia.prg
===================================================================
(Binary files differ)
Index: testprogs/interrupts/irqnoack/ackcia.prg
===================================================================
--- testprogs/interrupts/irqnoack/ackcia.prg 2024-07-14 17:22:40 UTC (rev 45228)
+++ testprogs/interrupts/irqnoack/ackcia.prg 2024-07-15 18:47:10 UTC (rev 45229)
Property changes on: testprogs/interrupts/irqnoack/ackcia.prg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-commodore-exec
\ No newline at end of property
Added: testprogs/interrupts/irqnoack/ackcia.s
===================================================================
--- testprogs/interrupts/irqnoack/ackcia.s (rev 0)
+++ testprogs/interrupts/irqnoack/ackcia.s 2024-07-15 18:47:10 UTC (rev 45229)
@@ -0,0 +1,114 @@
+
+ * = $0801
+ !word eol,0
+ !byte $9e, $32,$30,$36,$31, 0 ; sys 2061
+eol: !word 0
+
+;------------------------------------------------------------------------------
+
+ sei
+ lda #$35
+ sta $01
+ lda #>irq
+ ldx #<irq
+ sta $ffff
+ stx $fffe
+
+ ldx #0
+- lda #$20
+ sta $0400,x
+ sta $0500,x
+ sta $0600,x
+ sta $0700,x
+ lda #$01
+ sta $d800,x
+ sta $d900,x
+ sta $da00,x
+ sta $db00,x
+ inx
+ bne -
+
+ lda #0 ; all timers off
+ sta $dc0e
+ sta $dc0f
+
+ lda #$00
+ sta $dc05
+ lda #$ff
+ sta $dc04
+
+ lda #%00010001
+ sta $dc0e
+
+ lda #$81
+ sta $dc0d
+
+ lda #$1b
+ sta $d011 ; clear bit 8 of irq raster line
+ lda #$01
+ sta $d01a ; enable raster irq...
+ lda #$5b
+ sta $d012 ; ... at raster line 91
+
+ ; wait for raster irq to trigger at least once
+- cmp $d012
+ bne -
+
+ cli ; enable interrupts
+
+ ; these opcodes will be incorrectly executed
+ sta $0400
+ sta $0401
+
+ sei
+ ; signal failure
+ lda #$ff
+ sta $d7ff
+ lda #2
+ sta $d020
+
+ jmp *
+
+irq:
+ pha
+ lda $d019 ; Raster flag in bit0
+ lsr
+ bcs israster
+
+ lda $dc0d ; ACK CIA1 Irq, TimerA flag in bit0
+ lsr
+ bcs istimer
+
+ inc $0428
+ pla
+ rti
+
+istimer:
+ inc $0429
+ pla
+ rti
+
+israster:
+ inc $042a
+
+ lda $dc0d ; ACK CIA1 Irq, TimerA flag in bit0
+ lsr
+ bcs istimer2
+
+ pla
+ rti
+
+istimer2:
+ inc $042c
+
+ bne +
+ ; signal pass
+ lda #$00
+ sta $d7ff
+ lda #5
+ sta $d020
+
+ jmp *
++
+ pla
+ rti
Added: testprogs/interrupts/irqnoack/ackraster.prg
===================================================================
(Binary files differ)
Index: testprogs/interrupts/irqnoack/ackraster.prg
===================================================================
--- testprogs/interrupts/irqnoack/ackraster.prg 2024-07-14 17:22:40 UTC (rev 45228)
+++ testprogs/interrupts/irqnoack/ackraster.prg 2024-07-15 18:47:10 UTC (rev 45229)
Property changes on: testprogs/interrupts/irqnoack/ackraster.prg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-commodore-exec
\ No newline at end of property
Added: testprogs/interrupts/irqnoack/ackraster.s
===================================================================
--- testprogs/interrupts/irqnoack/ackraster.s (rev 0)
+++ testprogs/interrupts/irqnoack/ackraster.s 2024-07-15 18:47:10 UTC (rev 45229)
@@ -0,0 +1,100 @@
+
+ * = $0801
+ !word eol,0
+ !byte $9e, $32,$30,$36,$31, 0 ; sys 2061
+eol: !word 0
+
+;------------------------------------------------------------------------------
+
+ sei
+ lda #$35
+ sta $01
+ lda #>irq
+ ldx #<irq
+ sta $ffff
+ stx $fffe
+
+ ldx #0
+- lda #$20
+ sta $0400,x
+ sta $0500,x
+ sta $0600,x
+ sta $0700,x
+ lda #$01
+ sta $d800,x
+ sta $d900,x
+ sta $da00,x
+ sta $db00,x
+ inx
+ bne -
+
+ lda #0 ; all timers off
+ sta $dc0e
+ sta $dc0f
+
+ lda #$ff
+ sta $dc05
+ lda #$ff
+ sta $dc04
+
+ ; give the timer some time to underflow and trigger the irq at least once
+ ldy #$ff
+-- ldx #$ff
+- dex
+ bne -
+ dey
+ bne --
+
+ lda #%00010001
+ sta $dc0e
+
+ lda #$81
+ sta $dc0d
+
+ lda #$1b
+ sta $d011 ; clear bit 8 of irq raster line
+ lda #$01
+ sta $d01a ; enable raster irq...
+ lda #$5b
+ sta $d012 ; ... at raster line 91
+
+ ; wait for raster irq to trigger at least once
+- cmp $d012
+ bne -
+
+ cli ; enable interrupts
+
+ ; these opcodes will be incorrectly executed
+ sta $0400
+ sta $0401
+ sta $0402
+ sta $0403
+
+ sei
+ ; signal failure
+ lda #$ff
+ sta $d7ff
+ lda #2
+ sta $d020
+
+ jmp *
+
+irq:
+ pha
+ lda $d019 ; Raster flag in bit0
+ sta $d019
+ lsr
+ bcs israster
+
+ inc $0428
+
+ pla
+ rti
+
+
+israster:
+ inc $0429
+
+ pla
+ rti
+
Added: testprogs/interrupts/irqnoack/readme.txt
===================================================================
--- testprogs/interrupts/irqnoack/readme.txt (rev 0)
+++ testprogs/interrupts/irqnoack/readme.txt 2024-07-15 18:47:10 UTC (rev 45229)
@@ -0,0 +1,14 @@
+
+related to https://sourceforge.net/p/vice-emu/bugs/2052/
+
+ackcia.prg:
+Sets up a raster interrupt and a CIA1 Timer interrupt. The Raster interrupt is
+never acknowledged, so it will immediately trigger again after the RTI.
+
+ackraster.prg:
+Sets up a raster interrupt and a CIA1 Timer interrupt. The Timer interrupt is
+never acknowledged, so it will immediately trigger again after the RTI.
+
+
+TODO: this should probably also be tested with other IRQ and NMI sources, and
+also by using CLI or PHP to change the IRQ flag.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <emp...@us...> - 2024-07-14 17:22:41
|
Revision: 45228
http://sourceforge.net/p/vice-emu/code/45228
Author: empathicqubit
Date: 2024-07-14 17:22:40 +0000 (Sun, 14 Jul 2024)
Log Message:
-----------
Refactor binary monitor test suite somewhat
Modified Paths:
--------------
testprogs/remotemonitor/binmontest/CuTest.h
testprogs/remotemonitor/binmontest/Makefile
testprogs/remotemonitor/binmontest/main.c
Added Paths:
-----------
testprogs/remotemonitor/binmontest/checkpoint.c
testprogs/remotemonitor/binmontest/checkpoint.h
testprogs/remotemonitor/binmontest/connection.c
testprogs/remotemonitor/binmontest/connection.h
testprogs/remotemonitor/binmontest/util.c
testprogs/remotemonitor/binmontest/util.h
Modified: testprogs/remotemonitor/binmontest/CuTest.h
===================================================================
--- testprogs/remotemonitor/binmontest/CuTest.h 2024-07-14 15:09:10 UTC (rev 45227)
+++ testprogs/remotemonitor/binmontest/CuTest.h 2024-07-14 17:22:40 UTC (rev 45228)
@@ -4,6 +4,7 @@
#include <setjmp.h>
#include <stdarg.h>
+#include <stddef.h>
#define CUTEST_VERSION "CuTest 1.5"
Modified: testprogs/remotemonitor/binmontest/Makefile
===================================================================
--- testprogs/remotemonitor/binmontest/Makefile 2024-07-14 15:09:10 UTC (rev 45227)
+++ testprogs/remotemonitor/binmontest/Makefile 2024-07-14 17:22:40 UTC (rev 45228)
@@ -2,8 +2,8 @@
all: remotetest
-remotetest: CuTest.o main.o
- $(CC) $(CFLAGS) -o remotetest CuTest.o main.o
+remotetest: CuTest.o connection.o checkpoint.o util.o main.o
+ $(CC) $(CFLAGS) -o remotetest $^
test: remotetest
x64sc -default -binarymonitor -minimized > /dev/null & \
Added: testprogs/remotemonitor/binmontest/checkpoint.c
===================================================================
--- testprogs/remotemonitor/binmontest/checkpoint.c (rev 0)
+++ testprogs/remotemonitor/binmontest/checkpoint.c 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,575 @@
+/*
+ * checkpoint.c - Checkpoint command tests
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ * Andreas Signer
+ *
+ * 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 <stdint.h>
+
+#include "CuTest.h"
+
+#include "util.h"
+#include "connection.h"
+
+void checkpoint_set_works(CuTest *tc) {
+ int length;
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xb4, 0xd8, 0x44, 0x19,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x00,
+ 0x04,
+ 0x00,
+ 0x01,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertTrue(tc, response[RESPONSE_TYPE] == 0x11);
+
+ CuAssertTrue(tc, length - HEADER_LENGTH >= 22);
+
+ // start
+ CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 0]), little_endian_to_uint16(&response[HEADER_LENGTH + 5]));
+
+ // end
+ CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 2]), little_endian_to_uint16(&response[HEADER_LENGTH + 7]));
+
+ // stop
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 4], response[HEADER_LENGTH + 9]);
+
+ // enabled
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 5], response[HEADER_LENGTH + 10]);
+
+ // operation
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 6], response[HEADER_LENGTH + 11]);
+
+ // temp
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 7], response[HEADER_LENGTH + 12]);
+
+ // hit count
+ CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 13]));
+
+ // ignore count
+ CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 17]));
+
+ // condition
+ CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 17]);
+
+ // memspace
+ CuAssertIntEquals(tc, 1, response[HEADER_LENGTH + 22]);
+}
+
+void checkpoint_get_works(CuTest *tc) {
+ int length;
+ uint32_t brknum;
+
+ // set
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xb7, 0xde, 0x2d, 0x1d,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x00,
+ 0x04,
+ 0x00,
+ };
+
+ unsigned char get_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xe1, 0xc7, 0x52, 0x2f,
+
+ 0x11,
+
+ 0xff, 0xff, 0xff, 0xff,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+
+ // get
+
+ write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ CuAssertTrue(tc, length - HEADER_LENGTH >= 22);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ // start
+ CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 0]), little_endian_to_uint16(&response[HEADER_LENGTH + 5]));
+
+ // end
+ CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 2]), little_endian_to_uint16(&response[HEADER_LENGTH + 7]));
+
+ // stop
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 4], response[HEADER_LENGTH + 9]);
+
+ // enabled
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 5], response[HEADER_LENGTH + 10]);
+
+ // operation
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 6], response[HEADER_LENGTH + 11]);
+
+ // temp
+ CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 7], response[HEADER_LENGTH + 12]);
+
+ // hit count
+ CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 13]));
+
+ // ignore count
+ CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 17]));
+
+ // condition
+ CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 17]);
+
+ // memspace
+ CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 22]);
+}
+
+static uint32_t list_checkpoint_ids(CuTest *tc, uint32_t* checkpoint_ids, uint32_t maxcheckpoints) {
+ uint32_t length;
+ uint32_t nof_checkpoints;
+ unsigned char list_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff, // length
+ 0xe1, 0xc7, 0x52, 0x2f, // request id
+
+ 0x14, // command "checkpoint list"
+ };
+
+ nof_checkpoints = 0;
+ send_command(list_command);
+ for(;;) {
+ wait_for_response_id(tc, list_command);
+ if (response[RESPONSE_TYPE] == 0x14) {
+ break;
+ }
+ if (response[RESPONSE_TYPE]== 0x11) {
+ CuAssertTrue(tc, nof_checkpoints < maxcheckpoints);
+ checkpoint_ids[nof_checkpoints++] = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+ }
+ }
+ return nof_checkpoints;
+}
+
+static void delete_checkpoint(CuTest* tc, uint32_t checkpointId) {
+ unsigned char delete_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xcc, 0xd2, 0x16, 0x2b,
+
+ 0x13,
+
+ 0xff, 0xff, 0xff, 0xff,
+ };
+
+ write_uint32(checkpointId, &delete_command[COMMAND_HEADER_LENGTH]);
+ send_command(delete_command);
+ wait_for_response_id(tc, delete_command);
+ CuAssertIntEquals(tc, 0x13, response[RESPONSE_TYPE]);
+}
+
+void checkpoint_delete_works(CuTest *tc) {
+ int length;
+ uint32_t brknum;
+
+ // set
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xc3, 0xc7, 0x4e, 0x53,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x00,
+ 0x04,
+ 0x00,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+
+ // delete
+ delete_checkpoint(tc, brknum);
+}
+
+void checkpoint_list_works(CuTest *tc) {
+ int length;
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xb2, 0xcf, 0x49, 0x16,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x00,
+ 0x04,
+ 0x00,
+ };
+
+ unsigned char list_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xe3, 0xb5, 0xa4, 0xe4,
+
+ 0x14,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ send_command(list_command);
+
+ length = wait_for_response_id(tc, list_command);
+
+ while(response[RESPONSE_TYPE] != 0x14) {
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ length = wait_for_response_id(tc, list_command);
+ }
+
+ CuAssertIntEquals(tc, 0x14, response[RESPONSE_TYPE]);
+
+ CuAssertTrue(tc, little_endian_to_uint32(&response[HEADER_LENGTH]) >= 1);
+}
+
+void checkpoint_list_does_dedupe(CuTest *tc) {
+ int length;
+ uint32_t nof_checkpoints;
+ uint32_t checkpoint_ids[1024];
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff, // length
+ 0xb7, 0xde, 0x2d, 0x1d, // request id
+
+ 0x12, // command "checkpoint set"
+
+ 0xe2, 0xfc, // address start
+ 0xe3, 0xfc, // address end
+ 0x01, // stop when hit
+ 0x00, // enabled
+ 0x07, // operation (load | store | exec)
+ 0x00, // memspace
+ };
+
+ connection_setup(tc);
+
+ // Delete all the existing checkpoints
+ nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
+ while (nof_checkpoints > 0) {
+ delete_checkpoint(tc, checkpoint_ids[--nof_checkpoints]);
+ }
+
+ // Verify that there are no checkpoints left
+ nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
+ CuAssertIntEquals(tc, 0, nof_checkpoints);
+
+ // Create a new checkpoint for load, store, exec
+ send_command(set_command);
+ wait_for_response_id(tc, set_command);
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ // Verify that we only get back 1 checkpoint
+ nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
+ CuAssertIntEquals(tc, 1, nof_checkpoints);
+}
+
+void checkpoint_enable_works(CuTest *tc) {
+ int length;
+ uint32_t brknum;
+
+ // set
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xad, 0xde, 0x34, 0x12,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x00,
+ 0x04,
+ 0x00,
+ };
+
+ unsigned char toggle_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xad, 0xde, 0xad, 0xde,
+
+ 0x15,
+
+ 0xff, 0xff, 0xff, 0xff,
+ 0x01,
+ };
+
+ unsigned char get_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xef, 0xbe, 0x34, 0x12,
+
+ 0x11,
+
+ 0xff, 0xff, 0xff, 0xff,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+
+ // toggle
+
+ write_uint32(brknum, &toggle_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(toggle_command);
+
+ length = wait_for_response_id(tc, toggle_command);
+
+ CuAssertIntEquals(tc, 0x15, response[RESPONSE_TYPE]);
+
+ // get
+
+ write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ // enabled
+ CuAssertIntEquals(tc, 0x01, response[HEADER_LENGTH + 10]);
+}
+
+void checkpoint_disable_works(CuTest *tc) {
+ int length;
+ uint32_t brknum;
+
+ // set
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xad, 0xdf, 0x35, 0x11,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x01,
+ 0x04,
+ 0x00,
+ };
+
+ unsigned char toggle_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xa6, 0xe0, 0xab, 0xdf,
+
+ 0x15,
+
+ 0xff, 0xff, 0xff, 0xff,
+ 0x00,
+ };
+
+ unsigned char get_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xf2, 0xba, 0x39, 0x10,
+
+ 0x11,
+
+ 0xff, 0xff, 0xff, 0xff,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+
+ // toggle
+
+ write_uint32(brknum, &toggle_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(toggle_command);
+
+ length = wait_for_response_id(tc, toggle_command);
+
+ CuAssertIntEquals(tc, 0x15, response[RESPONSE_TYPE]);
+
+ // get
+
+ write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ // enabled
+ CuAssertIntEquals(tc, 0x00, response[HEADER_LENGTH + 10]);
+}
+
+void condition_set_works(CuTest *tc) {
+ int length;
+ uint32_t brknum;
+
+ // set
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xad, 0xdf, 0x35, 0x11,
+
+ 0x12,
+
+ 0xe2, 0xfc,
+ 0xe3, 0xfc,
+ 0x01,
+ 0x01,
+ 0x04,
+ 0x00,
+ };
+
+ unsigned char cond_set[] =
+ "\x02\x01"
+ "\xff\xff\xff\xff"
+ "\xa6\xe0\xab\xdf"
+
+ "\x22"
+
+ "\xff\xff\xff\xff"
+ "\x0e"
+ "$9531 == $9531"
+ ;
+
+ unsigned char get_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xf2, 0xba, 0x39, 0x10,
+
+ 0x11,
+
+ 0xff, 0xff, 0xff, 0xff,
+ };
+
+ connection_setup(tc);
+
+ send_command(set_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
+
+ // toggle
+
+ write_uint32(brknum, &cond_set[COMMAND_HEADER_LENGTH]);
+
+ send_command(cond_set);
+
+ length = wait_for_response_id(tc, cond_set);
+
+ CuAssertIntEquals(tc, 0x22, response[RESPONSE_TYPE]);
+
+ // get
+
+ write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
+
+ // condition set
+ CuAssertIntEquals(tc, 0x01, response[HEADER_LENGTH + 21]);
+}
Added: testprogs/remotemonitor/binmontest/checkpoint.h
===================================================================
--- testprogs/remotemonitor/binmontest/checkpoint.h (rev 0)
+++ testprogs/remotemonitor/binmontest/checkpoint.h 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,41 @@
+/*
+ * checkpoint.h - Checkpoint command tests
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ *
+ * 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 BINMONTEST_CHECKPOINT_H
+#define BINMONTEST_CHECKPOINT_H
+
+#include "CuTest.h"
+
+void checkpoint_set_works(CuTest *tc);
+void checkpoint_get_works(CuTest *tc);
+void checkpoint_delete_works(CuTest *tc);
+void checkpoint_list_works(CuTest *tc);
+void checkpoint_list_does_dedupe(CuTest *tc);
+void checkpoint_enable_works(CuTest *tc);
+void checkpoint_disable_works(CuTest *tc);
+void condition_set_works(CuTest *tc);
+
+#endif
\ No newline at end of file
Added: testprogs/remotemonitor/binmontest/connection.c
===================================================================
--- testprogs/remotemonitor/binmontest/connection.c (rev 0)
+++ testprogs/remotemonitor/binmontest/connection.c 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,156 @@
+/*
+ * connection.c - Connection setup and utility functions for tests
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ *
+ * 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 <sys/socket.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/poll.h>
+
+#include "CuTest.h"
+
+#include "util.h"
+
+static int response_count = 0;
+static int sock = 0;
+static int port = 0;
+static struct pollfd fds[1];
+
+unsigned char response[1<<24];
+
+void connection_set_port(int p) {
+ port = p;
+}
+
+void connection_setup(CuTest *tc) {
+ struct sockaddr_in *serv_addr;
+
+ if (sock) {
+ close(sock);
+ sock = 0;
+ }
+
+ response_count = 0;
+
+ if (sock) {
+ return;
+ }
+
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+
+ /* Disable nagle algorithm to ensure we split commands over multiple packets */
+ int flag = 1;
+ int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
+
+ fds[0].fd = sock;
+ fds[0].events = POLLIN;
+ fds[0].revents = 0;
+
+ CuAssertTrue(tc, sock >= 0);
+
+ serv_addr = malloc(sizeof(struct sockaddr_in));
+
+ serv_addr->sin_family = AF_INET;
+ serv_addr->sin_port = htons(port);
+
+ CuAssertTrue(tc, inet_pton(AF_INET, "127.0.0.1", &serv_addr->sin_addr) > 0);
+
+ CuAssertTrue(tc, connect(sock, (struct sockaddr *)serv_addr, sizeof(*serv_addr)) >= 0);
+
+ free(serv_addr);
+}
+
+void connection_close() {
+ close(sock);
+}
+
+void really_send_command(unsigned char* command, size_t length) {
+ write_uint32(length - COMMAND_HEADER_LENGTH, &command[COMMAND_LENGTH]);
+ for (int i = 0; i < length; i++) {
+ /* Send each byte to trigger incomplete reads on the other side */
+ send(sock, command + i, 1, 0);
+ }
+}
+
+#define send_command(command) really_send_command(command, sizeof(command))
+
+static int readloop(CuTest *tc, unsigned char *ptr, int length) {
+ int n = 0;
+ while(n < length) {
+ CuAssertTrue(tc, poll(fds, 1, 10000));
+ int o = read(sock, &ptr[n], length - n);
+ CuAssertTrue(tc, o > 0);
+ n += o;
+ }
+
+ return n;
+}
+
+static int read_response(CuTest *tc) {
+ response_count++;
+ readloop(tc, response, 6);
+ return 6 + readloop(tc, &response[6], 6 + little_endian_to_uint32(&response[2]));
+}
+
+int wait_for_response_type(CuTest *tc, uint8_t response_type) {
+ int length;
+
+ do {
+ length = read_response(tc);
+ fprintf(stderr, "%s: request %d: CID %8x RID %8x length %d type %2x error %2x \n",
+ tc->name,
+ response_count,
+ 0xffffffff,
+ little_endian_to_uint32(&response[RESPONSE_ID]),
+ length,
+ response[RESPONSE_TYPE],
+ response[RESPONSE_ERROR]
+ );
+ } while (response_type != response[RESPONSE_TYPE]);
+
+ return length;
+}
+
+int wait_for_response_id(CuTest *tc, unsigned char *command) {
+ int length;
+
+ do {
+ length = read_response(tc);
+ fprintf(stderr, "%s: request %d: CID %8x RID %8x length %d type %2x error %2x \n",
+ tc->name,
+ response_count,
+ little_endian_to_uint32(&command[COMMAND_ID]),
+ little_endian_to_uint32(&response[RESPONSE_ID]),
+ length,
+ response[RESPONSE_TYPE],
+ response[RESPONSE_ERROR]
+ );
+ } while (little_endian_to_uint32(&command[COMMAND_ID]) != little_endian_to_uint32(&response[RESPONSE_ID]));
+
+ return length;
+}
Added: testprogs/remotemonitor/binmontest/connection.h
===================================================================
--- testprogs/remotemonitor/binmontest/connection.h (rev 0)
+++ testprogs/remotemonitor/binmontest/connection.h 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,44 @@
+/*
+ * connection.h - Connection setup and utility functions for tests
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ *
+ * 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 BINMONTEST_CONNECTION_H
+#define BINMONTEST_CONNECTION_H
+
+#include <stdlib.h>
+
+#include "CuTest.h"
+
+extern unsigned char response[1<<24];
+void connection_set_port(int p);
+void connection_setup(CuTest *tc);
+void really_send_command(unsigned char* command, size_t length);
+#define send_command(command) really_send_command(command, sizeof(command));
+
+int wait_for_response_type(CuTest *tc, uint8_t response_type);
+int wait_for_response_id(CuTest *tc, unsigned char *command);
+void connection_close();
+
+#endif
\ No newline at end of file
Modified: testprogs/remotemonitor/binmontest/main.c
===================================================================
--- testprogs/remotemonitor/binmontest/main.c 2024-07-14 15:09:10 UTC (rev 45227)
+++ testprogs/remotemonitor/binmontest/main.c 2024-07-14 17:22:40 UTC (rev 45228)
@@ -1,5 +1,5 @@
/*
- * main.c - Tests for VICE's binary monitor interface
+ * main.c - Test entrypoint for VICE's binary monitor interface
*
* Written by
* Empathic Qubit <emp...@en...>
@@ -26,162 +26,16 @@
/* These tests are meant to be run against x64sc */
-#include <sys/socket.h>
-#include <netinet/tcp.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stdio.h>
#include <stdlib.h>
-#include <stdio.h>
-#include <arpa/inet.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/poll.h>
-
#include "CuTest.h"
+#include "util.h"
+#include "connection.h"
+#include "checkpoint.h"
-#define HEADER_LENGTH 12
-#define RESPONSE_TYPE 6
-#define RESPONSE_ERROR 7
-#define RESPONSE_ID 8
-
-#define COMMAND_ID 6
-#define COMMAND_HEADER_LENGTH 11
-#define COMMAND_LENGTH 2
-#define API_VERSION 0x02
-
-int response_count = 0;
-int sock = 0;
-struct pollfd fds[1];
-int port = 0;
-
-void setup(CuTest *tc) {
- struct sockaddr_in *serv_addr;
-
- if (sock) {
- close(sock);
- sock = 0;
- }
-
- response_count = 0;
-
- if (sock) {
- return;
- }
-
- sock = socket(AF_INET, SOCK_STREAM, 0);
-
- /* Disable nagle algorithm to ensure we split commands over multiple packets */
- int flag = 1;
- int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
-
- fds[0].fd = sock;
- fds[0].events = POLLIN;
- fds[0].revents = 0;
-
- CuAssertTrue(tc, sock >= 0);
-
- serv_addr = malloc(sizeof(struct sockaddr_in));
-
- serv_addr->sin_family = AF_INET;
- serv_addr->sin_port = htons(port);
-
- CuAssertTrue(tc, inet_pton(AF_INET, "127.0.0.1", &serv_addr->sin_addr) > 0);
-
- CuAssertTrue(tc, connect(sock, (struct sockaddr *)serv_addr, sizeof(*serv_addr)) >= 0);
-
- free(serv_addr);
-}
-
-static uint32_t little_endian_to_uint32(unsigned char *input) {
- return (input[3] << 24) + (input[2] << 16) + (input[1] << 8) + input[0];
-}
-
-static uint16_t little_endian_to_uint16(unsigned char *input) {
- return (input[1] << 8) + input[0];
-}
-
-static unsigned char *write_uint16(uint16_t input, unsigned char *output) {
- output[0] = input & 0xFFu;
- output[1] = (input >> 8) & 0xFFu;
-
- return output + 2;
-}
-
-static unsigned char *write_uint32(uint32_t input, unsigned char *output) {
- output[0] = input & 0xFFu;
- output[1] = (input >> 8) & 0xFFu;
- output[2] = (input >> 16) & 0xFFu;
- output[3] = (uint8_t)(input >> 24) & 0xFFu;
-
- return output + 4;
-}
-
-void really_send_command(unsigned char* command, size_t length) {
- write_uint32(length - COMMAND_HEADER_LENGTH, &command[COMMAND_LENGTH]);
- for (int i = 0; i < length; i++) {
- /* Send each byte to trigger incomplete reads on the other side */
- send(sock, command + i, 1, 0);
- }
-}
-
-#define send_command(command) really_send_command(command, sizeof(command))
-
-unsigned char response[1<<24];
-
-int readloop(CuTest *tc, unsigned char *ptr, int length) {
- int n = 0;
- while(n < length) {
- CuAssertTrue(tc, poll(fds, 1, 10000));
- int o = read(sock, &ptr[n], length - n);
- CuAssertTrue(tc, o > 0);
- n += o;
- }
-
- return n;
-}
-
-int read_response(CuTest *tc) {
- response_count++;
- readloop(tc, response, 6);
- return 6 + readloop(tc, &response[6], 6 + little_endian_to_uint32(&response[2]));
-}
-
-int wait_for_response_type(CuTest *tc, uint8_t response_type) {
- int length;
-
- do {
- length = read_response(tc);
- fprintf(stderr, "%s: request %d: CID %8x RID %8x length %d type %2x error %2x \n",
- tc->name,
- response_count,
- 0xffffffff,
- little_endian_to_uint32(&response[RESPONSE_ID]),
- length,
- response[RESPONSE_TYPE],
- response[RESPONSE_ERROR]
- );
- } while (response_type != response[RESPONSE_TYPE]);
-
- return length;
-}
-
-int wait_for_response_id(CuTest *tc, unsigned char *command) {
- int length;
-
- do {
- length = read_response(tc);
- fprintf(stderr, "%s: request %d: CID %8x RID %8x length %d type %2x error %2x \n",
- tc->name,
- response_count,
- little_endian_to_uint32(&command[COMMAND_ID]),
- little_endian_to_uint32(&response[RESPONSE_ID]),
- length,
- response[RESPONSE_TYPE],
- response[RESPONSE_ERROR]
- );
- } while (little_endian_to_uint32(&command[COMMAND_ID]) != little_endian_to_uint32(&response[RESPONSE_ID]));
-
- return length;
-}
-
void request_id_is_set(CuTest* tc) {
int length;
@@ -193,7 +47,7 @@
0x81,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -204,548 +58,6 @@
CuAssertIntEquals(tc, 0, length - HEADER_LENGTH);
}
-void checkpoint_set_works(CuTest *tc) {
- int length;
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xb4, 0xd8, 0x44, 0x19,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x00,
- 0x04,
- 0x00,
- 0x01,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertTrue(tc, response[RESPONSE_TYPE] == 0x11);
-
- CuAssertTrue(tc, length - HEADER_LENGTH >= 22);
-
- // start
- CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 0]), little_endian_to_uint16(&response[HEADER_LENGTH + 5]));
-
- // end
- CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 2]), little_endian_to_uint16(&response[HEADER_LENGTH + 7]));
-
- // stop
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 4], response[HEADER_LENGTH + 9]);
-
- // enabled
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 5], response[HEADER_LENGTH + 10]);
-
- // operation
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 6], response[HEADER_LENGTH + 11]);
-
- // temp
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 7], response[HEADER_LENGTH + 12]);
-
- // hit count
- CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 13]));
-
- // ignore count
- CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 17]));
-
- // condition
- CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 17]);
-
- // memspace
- CuAssertIntEquals(tc, 1, response[HEADER_LENGTH + 22]);
-}
-
-void checkpoint_get_works(CuTest *tc) {
- int length;
- uint32_t brknum;
-
- // set
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xb7, 0xde, 0x2d, 0x1d,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x00,
- 0x04,
- 0x00,
- };
-
- unsigned char get_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xe1, 0xc7, 0x52, 0x2f,
-
- 0x11,
-
- 0xff, 0xff, 0xff, 0xff,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
-
- // get
-
- write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
-
- send_command(get_command);
-
- length = wait_for_response_id(tc, get_command);
-
- CuAssertTrue(tc, length - HEADER_LENGTH >= 22);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- // start
- CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 0]), little_endian_to_uint16(&response[HEADER_LENGTH + 5]));
-
- // end
- CuAssertIntEquals(tc, little_endian_to_uint16(&set_command[COMMAND_HEADER_LENGTH + 2]), little_endian_to_uint16(&response[HEADER_LENGTH + 7]));
-
- // stop
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 4], response[HEADER_LENGTH + 9]);
-
- // enabled
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 5], response[HEADER_LENGTH + 10]);
-
- // operation
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 6], response[HEADER_LENGTH + 11]);
-
- // temp
- CuAssertIntEquals(tc, set_command[COMMAND_HEADER_LENGTH + 7], response[HEADER_LENGTH + 12]);
-
- // hit count
- CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 13]));
-
- // ignore count
- CuAssertIntEquals(tc, 0, little_endian_to_uint32(&response[HEADER_LENGTH + 17]));
-
- // condition
- CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 17]);
-
- // memspace
- CuAssertIntEquals(tc, 0, response[HEADER_LENGTH + 22]);
-}
-
-uint32_t list_checkpoint_ids(CuTest *tc, uint32_t* checkpoint_ids, uint32_t maxcheckpoints) {
- uint32_t length;
- uint32_t nof_checkpoints;
- unsigned char list_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff, // length
- 0xe1, 0xc7, 0x52, 0x2f, // request id
-
- 0x14, // command "checkpoint list"
- };
-
- nof_checkpoints = 0;
- send_command(list_command);
- for(;;) {
- wait_for_response_id(tc, list_command);
- if (response[RESPONSE_TYPE] == 0x14) {
- break;
- }
- if (response[RESPONSE_TYPE]== 0x11) {
- CuAssertTrue(tc, nof_checkpoints < maxcheckpoints);
- checkpoint_ids[nof_checkpoints++] = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
- }
- }
- return nof_checkpoints;
-}
-
-void delete_checkpoint(CuTest* tc, uint32_t checkpointId) {
- unsigned char delete_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xcc, 0xd2, 0x16, 0x2b,
-
- 0x13,
-
- 0xff, 0xff, 0xff, 0xff,
- };
-
- write_uint32(checkpointId, &delete_command[COMMAND_HEADER_LENGTH]);
- send_command(delete_command);
- wait_for_response_id(tc, delete_command);
- CuAssertIntEquals(tc, 0x13, response[RESPONSE_TYPE]);
-}
-
-void checkpoint_delete_works(CuTest *tc) {
- int length;
- uint32_t brknum;
-
- // set
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xc3, 0xc7, 0x4e, 0x53,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x00,
- 0x04,
- 0x00,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
-
- // delete
- delete_checkpoint(tc, brknum);
-}
-
-void checkpoint_list_works(CuTest *tc) {
- int length;
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xb2, 0xcf, 0x49, 0x16,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x00,
- 0x04,
- 0x00,
- };
-
- unsigned char list_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xe3, 0xb5, 0xa4, 0xe4,
-
- 0x14,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- send_command(list_command);
-
- length = wait_for_response_id(tc, list_command);
-
- while(response[RESPONSE_TYPE] != 0x14) {
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- length = wait_for_response_id(tc, list_command);
- }
-
- CuAssertIntEquals(tc, 0x14, response[RESPONSE_TYPE]);
-
- CuAssertTrue(tc, little_endian_to_uint32(&response[HEADER_LENGTH]) >= 1);
-}
-
-void checkpoint_list_does_dedupe(CuTest *tc) {
- int length;
- uint32_t nof_checkpoints;
- uint32_t checkpoint_ids[1024];
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff, // length
- 0xb7, 0xde, 0x2d, 0x1d, // request id
-
- 0x12, // command "checkpoint set"
-
- 0xe2, 0xfc, // address start
- 0xe3, 0xfc, // address end
- 0x01, // stop when hit
- 0x00, // enabled
- 0x07, // operation (load | store | exec)
- 0x00, // memspace
- };
-
- setup(tc);
-
- // Delete all the existing checkpoints
- nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
- while (nof_checkpoints > 0) {
- delete_checkpoint(tc, checkpoint_ids[--nof_checkpoints]);
- }
-
- // Verify that there are no checkpoints left
- nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
- CuAssertIntEquals(tc, 0, nof_checkpoints);
-
- // Create a new checkpoint for load, store, exec
- send_command(set_command);
- wait_for_response_id(tc, set_command);
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- // Verify that we only get back 1 checkpoint
- nof_checkpoints = list_checkpoint_ids(tc, checkpoint_ids, sizeof(checkpoint_ids)/sizeof(uint32_t));
- CuAssertIntEquals(tc, 1, nof_checkpoints);
-}
-
-void checkpoint_enable_works(CuTest *tc) {
- int length;
- uint32_t brknum;
-
- // set
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xad, 0xde, 0x34, 0x12,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x00,
- 0x04,
- 0x00,
- };
-
- unsigned char toggle_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xad, 0xde, 0xad, 0xde,
-
- 0x15,
-
- 0xff, 0xff, 0xff, 0xff,
- 0x01,
- };
-
- unsigned char get_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xef, 0xbe, 0x34, 0x12,
-
- 0x11,
-
- 0xff, 0xff, 0xff, 0xff,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
-
- // toggle
-
- write_uint32(brknum, &toggle_command[COMMAND_HEADER_LENGTH]);
-
- send_command(toggle_command);
-
- length = wait_for_response_id(tc, toggle_command);
-
- CuAssertIntEquals(tc, 0x15, response[RESPONSE_TYPE]);
-
- // get
-
- write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
-
- send_command(get_command);
-
- length = wait_for_response_id(tc, get_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- // enabled
- CuAssertIntEquals(tc, 0x01, response[HEADER_LENGTH + 10]);
-}
-
-void checkpoint_disable_works(CuTest *tc) {
- int length;
- uint32_t brknum;
-
- // set
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xad, 0xdf, 0x35, 0x11,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x01,
- 0x04,
- 0x00,
- };
-
- unsigned char toggle_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xa6, 0xe0, 0xab, 0xdf,
-
- 0x15,
-
- 0xff, 0xff, 0xff, 0xff,
- 0x00,
- };
-
- unsigned char get_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xf2, 0xba, 0x39, 0x10,
-
- 0x11,
-
- 0xff, 0xff, 0xff, 0xff,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
-
- // toggle
-
- write_uint32(brknum, &toggle_command[COMMAND_HEADER_LENGTH]);
-
- send_command(toggle_command);
-
- length = wait_for_response_id(tc, toggle_command);
-
- CuAssertIntEquals(tc, 0x15, response[RESPONSE_TYPE]);
-
- // get
-
- write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
-
- send_command(get_command);
-
- length = wait_for_response_id(tc, get_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- // enabled
- CuAssertIntEquals(tc, 0x00, response[HEADER_LENGTH + 10]);
-}
-
-void condition_set_works(CuTest *tc) {
- int length;
- uint32_t brknum;
-
- // set
-
- unsigned char set_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xad, 0xdf, 0x35, 0x11,
-
- 0x12,
-
- 0xe2, 0xfc,
- 0xe3, 0xfc,
- 0x01,
- 0x01,
- 0x04,
- 0x00,
- };
-
- unsigned char cond_set[] =
- "\x02\x01"
- "\xff\xff\xff\xff"
- "\xa6\xe0\xab\xdf"
-
- "\x22"
-
- "\xff\xff\xff\xff"
- "\x0e"
- "$9531 == $9531"
- ;
-
- unsigned char get_command[] = {
- 0x02, API_VERSION,
- 0xff, 0xff, 0xff, 0xff,
- 0xf2, 0xba, 0x39, 0x10,
-
- 0x11,
-
- 0xff, 0xff, 0xff, 0xff,
- };
-
- setup(tc);
-
- send_command(set_command);
-
- length = wait_for_response_id(tc, set_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- brknum = little_endian_to_uint32(&response[HEADER_LENGTH + 0]);
-
- // toggle
-
- write_uint32(brknum, &cond_set[COMMAND_HEADER_LENGTH]);
-
- send_command(cond_set);
-
- length = wait_for_response_id(tc, cond_set);
-
- CuAssertIntEquals(tc, 0x22, response[RESPONSE_TYPE]);
-
- // get
-
- write_uint32(brknum, &get_command[COMMAND_HEADER_LENGTH]);
-
- send_command(get_command);
-
- length = wait_for_response_id(tc, get_command);
-
- CuAssertIntEquals(tc, 0x11, response[RESPONSE_TYPE]);
-
- // condition set
- CuAssertIntEquals(tc, 0x01, response[HEADER_LENGTH + 21]);
-}
-
void registers_set_works(CuTest *tc) {
int length, count, i;
int assert_count = 0;
@@ -774,7 +86,7 @@
// set
- setup(tc);
+ connection_setup(tc);
send_command(set_command);
@@ -827,7 +139,7 @@
0x01,
};
- setup(tc);
+ connection_setup(tc);
send_command(get_command);
@@ -890,7 +202,7 @@
0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(reset_command);
@@ -955,7 +267,7 @@
"/dev/null"
;
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1008,7 +320,7 @@
" "
;
- setup(tc);
+ connection_setup(tc);
/* reset */
send_command(reset_command);
@@ -1055,7 +367,7 @@
// set mem
- setup(tc);
+ connection_setup(tc);
// keyboard
@@ -1097,9 +409,9 @@
"\x53\x59\x53\x20\x32\x30\x36\x31\x0d"
};
- // set mem
+ // directly load the program into memory, then manually start it by typing out the sys line
- setup(tc);
+ connection_setup(tc);
CuAssertIntEquals(tc, 0, fseek(fil, 0, SEEK_END));
prg_size = ftell(fil);
@@ -1117,7 +429,7 @@
CuAssertIntEquals(tc, 0x02, response[RESPONSE_TYPE]);
- // keyboard
+ // keyboard (sys 2061)
send_command(keyboard_command);
@@ -1126,6 +438,139 @@
CuAssertIntEquals(tc, 0x72, response[RESPONSE_TYPE]);
}
+void mem_set_sidefx(CuTest *tc) {
+ int length;
+ #define sidefx_size 0x10000
+ FILE* fil = fopen("./cc65-test.prg", "rb");
+
+ unsigned char get_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xae, 0xed, 0xdf, 0xcb,
+
+ 0x01,
+
+ 0x00, // sidefx
+ 0x00, 0x00, // start
+ 0xff, 0xff, // end
+ 0x00, // memspace
+ 0x00, 0x00, // bank id
+ };
+
+ unsigned char set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xae, 0xeb, 0xe1, 0xcb,
+
+ 0x02,
+
+ 0x01, // sidefx
+ 0x00, 0x00, // start
+ 0xff, 0xff, // end
+ 0x00, // memspace
+ 0x00, 0x00, // bank id
+ };
+
+ unsigned char color_set_command[] = {
+ 0x02, API_VERSION,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xad, 0xeb, 0xe3, 0xc9,
+
+ 0x02,
+
+ 0x01, // sidefx
+ 0xd0, 0x20, // start
+ 0xd0, 0x21, // end
+ 0x00, // memspace
+ 0x00, 0x00, // bank id
+ 0x00, // border color
+ 0x00, // bg color
+ };
+
+ unsigned char real_command[sizeof(set_command) + sidefx_size];
+ unsigned char border_color;
+ unsigned char bg_color;
+ uint16_t border_addr = 0xd020;
+ uint16_t bg_addr = 0xd021;
+ unsigned char *border_ptr = &real_command[sizeof(set_command) + border_addr];
+ unsigned char *bg_ptr = &real_command[sizeof(set_command) + bg_addr];
+
+ // read the entire memory
+
+ connection_setup(tc);
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ memcpy(real_command, set_command, sizeof(set_command));
+
+ memcpy(&real_command[sizeof(set_command)], &response[HEADER_LENGTH + 2], sidefx_size);
+
+ // assert the end of the memory contains the cold reset address
+
+ CuAssertIntEquals(tc, 0xfce2, little_endian_to_uint16(&real_command[sizeof(real_command) - 4]));
+
+ // check that the memory is still the same
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ for(int i = 0; i < sidefx_size; i++) {
+ usleep(0);
+ fprintf(stderr, " Comparing memory@%4x\r", i);
+ // compare to previous value
+ CuAssertIntEquals(tc, real_command[sizeof(set_command) + i], response[HEADER_LENGTH + 2 + i]);
+ }
+
+ fprintf(stderr, "\nMemory hasn't changed between multiple reads.\n");
+
+ // flip border and background colors
+ border_color = *border_ptr;
+ bg_color = *bg_ptr;
+
+ *border_ptr = bg_color;
+ *bg_ptr = border_color;
+
+ // write only the two bytes
+
+ color_set_command[COMMAND_HEADER_LENGTH + 8] = bg_color;
+ color_set_command[COMMAND_HEADER_LENGTH + 9] = border_color;
+
+ send_command(color_set_command);
+
+ length = wait_for_response_id(tc, color_set_command);
+
+ // assert the two bytes
+ send_command(get_command);
+
+ CuAssertIntEquals(tc, bg_color, response[HEADER_LENGTH + 2 + border_addr]);
+ CuAssertIntEquals(tc, border_color, response[HEADER_LENGTH + 2 + bg_addr]);
+
+ // write the entire memory
+
+ send_command(real_command);
+
+ length = wait_for_response_id(tc, set_command);
+
+
+ // check that the memory is still the same
+
+ send_command(get_command);
+
+ length = wait_for_response_id(tc, get_command);
+
+ for(int i = 0; i < sidefx_size; i++) {
+ usleep(0);
+ fprintf(stderr, " Comparing memory@%4x\r", i);
+ // compare to previous value
+ CuAssertIntEquals(tc, real_command[sizeof(set_command) + i], response[HEADER_LENGTH + 2 + i]);
+ }
+
+ fprintf(stderr, "\nMemory hasn't changed after writing.\n");
+}
+
void mem_get_works(CuTest *tc) {
int length;
uint16_t mem_size;
@@ -1144,7 +589,7 @@
0x00, 0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1170,7 +615,7 @@
0xaa,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1197,7 +642,7 @@
0x01, 0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1281,7 +726,7 @@
// set mem
- setup(tc);
+ connection_setup(tc);
CuAssertIntEquals(tc, 0, fseek(fil, 0, SEEK_END));
prg_size = ftell(fil);
@@ -1361,7 +806,7 @@
0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1375,7 +820,7 @@
int strpos = COMMAND_HEADER_LENGTH + 4;
unsigned char command[] =
- "\x02\x01"
+ "\x02\x02"
"\xff\xff\xff\xff"
"\xaf\xe9\x23\x3d"
@@ -1393,7 +838,7 @@
strcpy((char *)&command[strpos + strlen((char *)&command[strpos])], "/cc65-test.prg");
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1410,6 +855,44 @@
CuAssertIntEquals(tc, 0x62, response[RESPONSE_TYPE]);
}
+void autoload_works(CuTest *tc) {
+ int length;
+ int strpos = COMMAND_HEADER_LENGTH + 4;
+
+ unsigned char command[] =
+ "\x02\x02"
+ "\xff\xff\xff\xff"
+ "\x45\x09\x90\xae"
+
+ "\xdd"
+
+ "\x00"
+ "\x00\x00"
+ "\xd2"
+ " "
+ " "
+ " "
+ ;
+
+ getcwd((char *)&command[strpos], 0xd2);
+
+ strcpy((char *)&command[strpos + strlen((char *)&command[strpos])], "/cc65-test.prg");
+
+ connection_setup(tc);
+
+ send_command(command);
+
+ length = wait_for_response_id(tc, command);
+
+ // autoload
+ CuAssertIntEquals(tc, 0xdd, response[RESPONSE_TYPE]);
+
+ // wait for resumed
+ length = wait_for_response_type(tc, 0x63);
+
+ CuAssertIntEquals(tc, 0x63, response[RESPONSE_TYPE]);
+}
+
void banks_available_works(CuTest *tc) {
int length, i, count;
int assert_count = 0;
@@ -1423,7 +906,7 @@
0x82,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1473,7 +956,7 @@
0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1535,7 +1018,7 @@
"\x02\x00"
;
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1558,7 +1041,7 @@
"VICIIBorderMode"
;
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1588,7 +1071,7 @@
0x01 /* VIC-II */
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1642,7 +1125,7 @@
0xff, 0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1664,7 +1147,7 @@
0xff, 0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1688,7 +1171,7 @@
0x00,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1726,7 +1209,7 @@
0x85,
};
- setup(tc);
+ connection_setup(tc);
send_command(command);
@@ -1750,7 +1233,7 @@
CuAssertTrue(tc, little_endian_to_uint32(&response[HEADER_LENGTH + 6]) > 38911);
}
-CuSuite* get_suite(void)
+static CuSuite* get_suite(void)
{
CuSuite* suite = CuSuiteNew();
@@ -1771,6 +1254,7 @@
SUITE_ADD_TEST(suite, registers_get_drive_works);
SUITE_ADD_TEST(suite, mem_set_works);
+ //SUITE_ADD_TEST(suite, mem_set_sidefx);
SUITE_ADD_TEST(suite, mem_get_works);
SUITE_ADD_TEST(suite, dump_works);
@@ -1798,11 +1282,12 @@
SUITE_ADD_TEST(suite, reset_works);
SUITE_ADD_TEST(suite, autostart_works);
+ SUITE_ADD_TEST(suite, autoload_works);
return suite;
}
-int run_tests(CuSuite* inner)
+static int run_tests(CuSuite* inner)
{
CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew();
@@ -1817,7 +1302,7 @@
return suite->failCount;
}
-void mon_quit() {
+static void mon_quit() {
int length;
unsigned char command[] = {
@@ -1838,6 +1323,7 @@
char* single_test_name = NULL;
int ret;
int i;
+ int port;
CuSuite* suite = get_suite();
if (argc < 2 || strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-help") == 0) {
@@ -1860,6 +1346,8 @@
return EXIT_FAILURE;
}
+ connection_set_port(port);
+
if (single_test_name) {
for (i = 0 ; i < suite->count ; i++) {
CuTest* test = suite->list[i];
@@ -1880,7 +1368,7 @@
mon_quit();
}
- close(sock);
+ connection_close();
return ret;
}
Added: testprogs/remotemonitor/binmontest/util.c
===================================================================
--- testprogs/remotemonitor/binmontest/util.c (rev 0)
+++ testprogs/remotemonitor/binmontest/util.c 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,51 @@
+/*
+ * util.c - Utility functions for converting to/from little endian, header constants
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ *
+ * 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 <stdint.h>
+
+uint32_t little_endian_to_uint32(unsigned char *input) {
+ return (input[3] << 24) + (input[2] << 16) + (input[1] << 8) + input[0];
+}
+
+uint16_t little_endian_to_uint16(unsigned char *input) {
+ return (input[1] << 8) + input[0];
+}
+
+unsigned char *write_uint16(uint16_t input, unsigned char *output) {
+ output[0] = input & 0xFFu;
+ output[1] = (input >> 8) & 0xFFu;
+
+ return output + 2;
+}
+
+unsigned char *write_uint32(uint32_t input, unsigned char *output) {
+ output[0] = input & 0xFFu;
+ output[1] = (input >> 8) & 0xFFu;
+ output[2] = (input >> 16) & 0xFFu;
+ output[3] = (uint8_t)(input >> 24) & 0xFFu;
+
+ return output + 4;
+}
\ No newline at end of file
Added: testprogs/remotemonitor/binmontest/util.h
===================================================================
--- testprogs/remotemonitor/binmontest/util.h (rev 0)
+++ testprogs/remotemonitor/binmontest/util.h 2024-07-14 17:22:40 UTC (rev 45228)
@@ -0,0 +1,45 @@
+/*
+ * util.h - Utility functions for converting to/from little endian, header constants
+ *
+ * Written by
+ * Empathic Qubit <emp...@en...>
+ *
+ * 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 BINMONTEST_UTIL_H
+#define BINMONTEST_UTIL_H
+
+#define HEADER_LENGTH 12
+#define RESPONSE_TYPE 6
+#define RESPONSE_ERROR 7
+#define RESPONSE_ID 8
+
+#define COMMAND_ID 6
+#define COMMAND_HEADER_LENGTH 11
+#define COMMAND_LENGTH 2
+#define API_VERSION 0x02
+
+uint32_t little_endian_to_uint32(unsigned char *input);
+uint16_t little_endian_to_uint16(unsigned char *input);
+unsigned char *write_uint16(uint16_t input, unsigned char *output);
+unsigned char *write_uint32(uint32_t input, unsigned char *output);
+
+#endif
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-14 15:09:11
|
Revision: 45227
http://sourceforge.net/p/vice-emu/code/45227
Author: rhialto
Date: 2024-07-14 15:09:10 +0000 (Sun, 14 Jul 2024)
Log Message:
-----------
fsdevice: fix file name pattern matching.
The 1581 allows matches with text following a * wildcard and that case
was not handled correctly. The code allows one * with following text.
If we want to go completely generic, allowing multiple * wildcards, I
would propose we take the algorithm from
https://dogankurt.com/wildcard.html#Iterative_Algorithms .
Modified Paths:
--------------
trunk/vice/src/fsdevice/fsdevice-read.c
Modified: trunk/vice/src/fsdevice/fsdevice-read.c
===================================================================
--- trunk/vice/src/fsdevice/fsdevice-read.c 2024-07-14 15:05:49 UTC (rev 45226)
+++ trunk/vice/src/fsdevice/fsdevice-read.c 2024-07-14 15:09:10 UTC (rev 45227)
@@ -432,18 +432,31 @@
l = (int)strlen(bufinfo->dirmask);
+ /* fix 2 bugs:
+ * - pattern A*Z would not match AZZ because it jumped to the first Z
+ * only.
+ * - pattern FOO* didn't match filename FOO
+ */
+
for (p = finfo->name, i = 0;
*p && bufinfo->dirmask[i] && i < l; i++) {
if (bufinfo->dirmask[i] == '?') {
p++;
} else if (bufinfo->dirmask[i] == '*') {
- if (!(bufinfo->dirmask[i + 1])) {
+ if (bufinfo->dirmask[i + 1] == '\0') {
f = 0;
break;
} /* end mask */
- while (*p && (*p != bufinfo->dirmask[i + 1])) {
- p++;
+ /* Handle ONE * followed by text but no more (like 1581):
+ * When at the * in A*XYZ, skip to 3 positions before
+ * the end of the file name to try to match XYZ. */
+ int rest_of_filename = strlen((const char *)p);
+ int rest_of_pattern = strlen(&bufinfo->dirmask[i + 1]);
+
+ if (rest_of_filename < rest_of_pattern) {
+ break; /* no match: file name too short */
}
+ p = p + rest_of_filename - rest_of_pattern;
} else {
if (*p != bufinfo->dirmask[i]) {
break;
@@ -450,11 +463,19 @@
}
p++;
}
- if ((!*p) && (!(bufinfo->dirmask[i + 1]))) {
+ if (*p == '\0' && bufinfo->dirmask[i + 1] == '\0') {
f = 0;
break;
}
}
+ /* Check for an edge case missed by the loop:
+ * pattern "FOO*" should match filename "FOO". */
+ if (f > 0 &&
+ *p == '\0' &&
+ bufinfo->dirmask[i ] == '*' &&
+ bufinfo->dirmask[i + 1] == '\0') {
+ f = 0;
+ }
if (f > 0) {
fileio_close(finfo);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-14 15:05:51
|
Revision: 45226
http://sourceforge.net/p/vice-emu/code/45226
Author: rhialto
Date: 2024-07-14 15:05:49 +0000 (Sun, 14 Jul 2024)
Log Message:
-----------
fsdevice: fix bug #2047.
Directory loading of "$:" was loading the full directory but should have
matched no files at all. It is actually a degenerate case where you
specify an empty pattern and that matches no names.
- $ should list all
- $: should match nothing
- $0 should list all
- $0: should match nothing
- $:pattern should match the pattern
- $0:pattern should match the pattern
- $pattern should match the pattern
Modified Paths:
--------------
trunk/vice/src/cbmdos.c
trunk/vice/src/fsdevice/fsdevice-open.c
Modified: trunk/vice/src/cbmdos.c
===================================================================
--- trunk/vice/src/cbmdos.c 2024-07-13 23:44:12 UTC (rev 45225)
+++ trunk/vice/src/cbmdos.c 2024-07-14 15:05:49 UTC (rev 45226)
@@ -178,7 +178,7 @@
int cmdlen;
#ifdef DEBUG_CBMDOS
- log_debug("CBMDOS parse cmd: '%s' cmdlen: %d", cmd_parse->cmd, cmd_parse->cmdlength);
+ log_debug("CBMDOS parse cmd: '%s' cmdlen: %u", cmd_parse->cmd, cmd_parse->cmdlength);
#endif
cmd_parse->atsign = 0;
@@ -206,6 +206,7 @@
if (*++p == '\0') {
/* "Nothing" after a colon is actually an empty pattern.
* Make it match nothing -- count the NUL byte.
+ * At the end, parselength will be the pattern's length.
*/
++cmd_parse->cmdlength;
}
@@ -292,7 +293,7 @@
cmd_parse->recordlength = comma[1]; /* Changing RL causes error */
#ifdef DEBUG_CBMDOS
- log_debug("L recordlength=%d", cmd_parse->recordlength);
+ log_debug("L recordlength=%u", cmd_parse->recordlength);
#endif
/* Don't allow REL file record lengths less than 2 or
greater than 254. The 1541/71/81 lets you create a
@@ -351,7 +352,7 @@
int i, templength = 0;
#ifdef DEBUG_CBMDOS
- log_debug("CBMDOS parse plus cmd: '%s' cmdlen: %d", cmd_parse->full, cmd_parse->fulllength);
+ log_debug("CBMDOS parse plus cmd: '%s' cmdlen: %u", cmd_parse->full, cmd_parse->fulllength);
#endif
cmd_parse->command = NULL;
Modified: trunk/vice/src/fsdevice/fsdevice-open.c
===================================================================
--- trunk/vice/src/fsdevice/fsdevice-open.c 2024-07-13 23:44:12 UTC (rev 45225)
+++ trunk/vice/src/fsdevice/fsdevice-open.c 2024-07-14 15:05:49 UTC (rev 45226)
@@ -119,12 +119,17 @@
mask = rname;
}
- /* Test on wildcards. */
- if (cbmdos_parse_wildcard_check(mask, (unsigned int)strlen(mask))) {
- if (*mask == '/') {
+ /* Test if a pattern was given (even the NUL one that matches nothing) */
+ if (cmd_parse->parselength > 0) {
+ if (mask[0] == '/') {
strcpy(bufinfo[secondary].dirmask, mask + 1);
*mask++ = 0;
} else {
+ /* For the NUL pattern, use a character that can't appear
+ * in file names: the directory separator. */
+ if (!mask[0]) {
+ mask = ARCHDEP_DIR_SEP_STR;
+ }
strcpy(bufinfo[secondary].dirmask, mask);
lib_free(cmd_parse->parsecmd);
cmd_parse->parsecmd = lib_strdup(fsdevice_get_path(vdrive->unit));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-13 23:44:15
|
Revision: 45225
http://sourceforge.net/p/vice-emu/code/45225
Author: gpz
Date: 2024-07-13 23:44:12 +0000 (Sat, 13 Jul 2024)
Log Message:
-----------
fix UI for the 'standard' Plus4 parallel cable
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_drive.c
trunk/vice/src/drive/iec/plus4exp/Makefile.am
trunk/vice/src/drive/iec/plus4exp/plus4exp-resources.c
trunk/vice/src/plus4/plus4parallel.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_drive.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_drive.c 2024-07-13 16:00:20 UTC (rev 45224)
+++ trunk/vice/src/arch/gtk3/widgets/settings_drive.c 2024-07-13 23:44:12 UTC (rev 45225)
@@ -541,6 +541,7 @@
int right_row,
int unit)
{
+ GtkWidget *label;
int index = unit - DRIVE_UNIT_MIN; /* index in widget arrays */
/* Left column widgets */
@@ -566,6 +567,15 @@
/* Right column widgets (none at the moment) */
+
+ /* Parallel cable */
+ label = create_left_aligned_label("Parallel cable");
+ drive_parallel[index] = drive_parallel_cable_widget_create(unit);
+ gtk_widget_set_margin_top(label, 8);
+ gtk_widget_set_margin_top(drive_parallel[index], 8);
+ gtk_grid_attach(GTK_GRID(right_grid), label, 0, right_row, 1, 1);
+ gtk_grid_attach(GTK_GRID(right_grid), drive_parallel[index], 1, right_row, 1, 1);
+ right_row++;
}
/** \brief Create layout for xpet, xcbm5x0 and xcbm2
Modified: trunk/vice/src/drive/iec/plus4exp/Makefile.am
===================================================================
--- trunk/vice/src/drive/iec/plus4exp/Makefile.am 2024-07-13 16:00:20 UTC (rev 45224)
+++ trunk/vice/src/drive/iec/plus4exp/Makefile.am 2024-07-13 23:44:12 UTC (rev 45225)
@@ -5,6 +5,7 @@
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/drive \
-I$(top_srcdir)/src/drive/iec \
+ -I$(top_srcdir)/src/userport \
-I$(top_srcdir)/src/lib/p64 \
-I$(top_srcdir)/src/core/rtc
Modified: trunk/vice/src/drive/iec/plus4exp/plus4exp-resources.c
===================================================================
--- trunk/vice/src/drive/iec/plus4exp/plus4exp-resources.c 2024-07-13 16:00:20 UTC (rev 45224)
+++ trunk/vice/src/drive/iec/plus4exp/plus4exp-resources.c 2024-07-13 23:44:12 UTC (rev 45225)
@@ -30,9 +30,12 @@
#include "drive.h"
#include "drivemem.h"
+#include "init.h"
#include "lib.h"
#include "plus4exp-resources.h"
#include "resources.h"
+#include "uiapi.h"
+#include "userport.h"
static void set_drive_ram(unsigned int dnr)
@@ -39,8 +42,9 @@
{
diskunit_context_t *unit = diskunit_context[dnr];
- if (unit->type != DRIVE_TYPE_1570 && unit->type != DRIVE_TYPE_1571
- && unit->type != DRIVE_TYPE_1571CR) {
+ if ((unit->type != DRIVE_TYPE_1570) &&
+ (unit->type != DRIVE_TYPE_1571) &&
+ (unit->type != DRIVE_TYPE_1571CR)) {
return;
}
@@ -52,6 +56,7 @@
static int set_drive_parallel_cable(int val, void *param)
{
diskunit_context_t *unit = diskunit_context[vice_ptr_to_uint(param)];
+ int userport_device = -1;
switch (val) {
case DRIVE_PC_NONE:
@@ -64,6 +69,35 @@
unit->parallel_cable = val;
set_drive_ram(vice_ptr_to_uint(param));
+ /* some magic to automatically insert or remove the parallel cable into/from the user port */
+ resources_get_int("UserportDevice", &userport_device);
+
+ if ((val == DRIVE_PC_NONE) && (userport_device == USERPORT_DEVICE_DRIVE_PAR_CABLE)) {
+ int hasparcable = 0;
+ int dnr;
+ /* check if any drive has a parallel cable enabled */
+ for (dnr = 0; dnr < NUM_DISK_UNITS; dnr++) {
+ int cable;
+ resources_get_int_sprintf("Drive%iParallelCable", &cable, dnr + 8);
+ if (cable != DRIVE_PC_NONE) {
+ hasparcable = 1;
+ }
+ }
+ /* if no drive uses parallel cable, disable it in the userport settings */
+ if (hasparcable == 0) {
+ resources_set_int("UserportDevice", USERPORT_DEVICE_NONE);
+ }
+ } else if (val != DRIVE_PC_NONE) {
+ if (userport_device == USERPORT_DEVICE_NONE) {
+ resources_set_int("UserportDevice", USERPORT_DEVICE_DRIVE_PAR_CABLE);
+ } else if (userport_device != USERPORT_DEVICE_DRIVE_PAR_CABLE) {
+ if (init_main_is_done()) {
+ ui_message("Warning: the user port is already being used for another device.\n"
+ "To be able to use the parallel cable, you must also set up the user port accordingly.");
+ }
+ }
+ }
+
return 0;
}
Modified: trunk/vice/src/plus4/plus4parallel.c
===================================================================
--- trunk/vice/src/plus4/plus4parallel.c 2024-07-13 16:00:20 UTC (rev 45224)
+++ trunk/vice/src/plus4/plus4parallel.c 2024-07-13 23:44:12 UTC (rev 45225)
@@ -36,6 +36,22 @@
#include "types.h"
#include "userport.h"
+/* Standard drive parallel cable (PLUS4)
+
+ PLUS4 | NOTES
+---------------
+ B | P0 <-> Drive VIA1 PA0
+ K | P1 <-> Drive VIA1 PA1
+ 4 | P2 <-> Drive VIA1 PA2
+ 5 | P3 <-> Drive VIA1 PA3
+ 6 | P4 <-> Drive VIA1 PA4
+ 7 | P5 <-> Drive VIA1 PA5
+ J | P6 <-> Drive VIA1 PA6
+ F | P7 <-> Drive VIA1 PA7
+
+ Note that this is NOT the "SpeedDOS" cable, the pinout is different!
+*/
+
static uint8_t parallel_cable_cpu_value = 0xff;
static uint8_t parallel_cable_drive_value[NUM_DISK_UNITS] = { 0xff, 0xff, 0xff, 0xff };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-13 16:00:21
|
Revision: 45224
http://sourceforge.net/p/vice-emu/code/45224
Author: gpz
Date: 2024-07-13 16:00:20 +0000 (Sat, 13 Jul 2024)
Log Message:
-----------
fix spelling
Modified Paths:
--------------
trunk/vice/src/core/ciacore.c
Modified: trunk/vice/src/core/ciacore.c
===================================================================
--- trunk/vice/src/core/ciacore.c 2024-07-13 15:56:09 UTC (rev 45223)
+++ trunk/vice/src/core/ciacore.c 2024-07-13 16:00:20 UTC (rev 45224)
@@ -2576,7 +2576,7 @@
mon_out("\nTimer A IRQ: %s running: %s mode: %s\n",
(cia_context->c_cia[CIA_ICR] & 1) ? "on" : "off",
ciacore_peek(cia_context, 0x0e) & 1 ? "yes" : "no",
- ciacore_peek(cia_context, 0x0e) & (1 << 3) ? "one-shot" : "continues");
+ ciacore_peek(cia_context, 0x0e) & (1 << 3) ? "one-shot" : "continuous");
mon_out("Timer A counts: %s PB6 output: %s (%s)\n",
ciacore_peek(cia_context, 0x0e) & (1 << 5) ? "CNT transitions" : "System clock",
ciacore_peek(cia_context, 0x0e) & (1 << 1) ? "yes" : "no",
@@ -2588,7 +2588,7 @@
mon_out("Timer B IRQ: %s running: %s mode: %s\n",
(cia_context->c_cia[CIA_ICR] & (1 << 1)) ? "on" : "off",
ciacore_peek(cia_context, 0x0f) & 1 ? "yes" : "no",
- ciacore_peek(cia_context, 0x0f) & (1 << 3) ? "one-shot" : "continues");
+ ciacore_peek(cia_context, 0x0f) & (1 << 3) ? "one-shot" : "continuous");
switch (ciacore_peek(cia_context, 0x0f) & (3 << 5)) {
default:
case (0 << 5): s = "System clock"; break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-13 15:56:11
|
Revision: 45223
http://sourceforge.net/p/vice-emu/code/45223
Author: gpz
Date: 2024-07-13 15:56:09 +0000 (Sat, 13 Jul 2024)
Log Message:
-----------
remove 'synergy' userport joystick adapter from all emulators except plus4
Modified Paths:
--------------
trunk/vice/src/c128/c128.c
trunk/vice/src/c64/c64.c
trunk/vice/src/cbm2/cbm2.c
trunk/vice/src/pet/pet.c
trunk/vice/src/scpu64/scpu64.c
trunk/vice/src/userport/userport_synergy_joystick.c
trunk/vice/src/vic20/vic20.c
Modified: trunk/vice/src/c128/c128.c
===================================================================
--- trunk/vice/src/c128/c128.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/c128/c128.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -884,10 +884,6 @@
init_resource_fail("userport starbyte joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/c64/c64.c
===================================================================
--- trunk/vice/src/c64/c64.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/c64/c64.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -829,10 +829,6 @@
init_resource_fail("userport starbyte joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/cbm2/cbm2.c
===================================================================
--- trunk/vice/src/cbm2/cbm2.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/cbm2/cbm2.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -428,10 +428,6 @@
init_resource_fail("userport oem joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/pet/pet.c
===================================================================
--- trunk/vice/src/pet/pet.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/pet/pet.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -438,10 +438,6 @@
init_resource_fail("userport oem joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/scpu64/scpu64.c
===================================================================
--- trunk/vice/src/scpu64/scpu64.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/scpu64/scpu64.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -649,10 +649,6 @@
init_resource_fail("userport starbyte joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/userport/userport_synergy_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -24,18 +24,18 @@
*
*/
-/* Synergy userport joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* Synergy userport joystick adapter (PLUS4)
-C64/C128 | CBM2 | PET | PLUS4 | VIC20 | I/O | NOTES
----------------------------------------------------
- C | 14 | C | B | C | I | PB0 <- JOY1/2/3 UP
- D | 13 | D | K | D | I | PB1 <- JOY1/2/3 DOWN
- E | 12 | E | 4 | E | I | PB2 <- JOY1/2/3 LEFT
- F | 11 | F | 5 | F | I | PB3 <- JOY1/2/3 RIGHT
- H | 10 | H | 6 | H | I | PB4 <- JOY1/2/3 FIRE
- J | 9 | J | 7 | J | O | PB5 -> JOY1 SELECT
- K | 8 | K | J | K | O | PB6 -> JOY2 SELECT
- L | 7 | L | F | L | O | PB7 -> JOY3 SELECT
+ PLUS4 | I/O | NOTES
+--------------------
+ B | I | PB0 <- JOY1/2/3 UP
+ K | I | PB1 <- JOY1/2/3 DOWN
+ 4 | I | PB2 <- JOY1/2/3 LEFT
+ 5 | I | PB3 <- JOY1/2/3 RIGHT
+ 6 | I | PB4 <- JOY1/2/3 FIRE
+ 7 | O | PB5 -> JOY1 SELECT
+ J | O | PB6 -> JOY2 SELECT
+ F | O | PB7 -> JOY3 SELECT
*/
#include "vice.h"
Modified: trunk/vice/src/vic20/vic20.c
===================================================================
--- trunk/vice/src/vic20/vic20.c 2024-07-13 15:17:20 UTC (rev 45222)
+++ trunk/vice/src/vic20/vic20.c 2024-07-13 15:56:09 UTC (rev 45223)
@@ -722,10 +722,6 @@
init_resource_fail("userport oem joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-13 15:17:21
|
Revision: 45222
http://sourceforge.net/p/vice-emu/code/45222
Author: rhialto
Date: 2024-07-13 15:17:20 +0000 (Sat, 13 Jul 2024)
Log Message:
-----------
CRTC: add explanatory comment about ycounter.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2024-07-13 10:09:42 UTC (rev 45221)
+++ trunk/vice/src/crtc/crtc.c 2024-07-13 15:17:20 UTC (rev 45222)
@@ -820,6 +820,14 @@
}
crtc.frame_start = crtc.rl_start;
} else {
+ /* It could be argued that because of this increment, which
+ * also happens if we just left the first VTOTAL text lines
+ * and ycounter has been made 0, that ycounter counts
+ * differently in this area (effectively starting at 1 when
+ * in the "top scanline" of the VTOTALADJust area).
+ * 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;
}
@@ -855,7 +863,7 @@
}
#endif /* CRTC_BEAM_RACING */
}
-/*
+#ifdef DEBUG_CRTC
if (crtc.venable && !new_venable)
printf("disable ven, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
@@ -864,8 +872,6 @@
printf("enable ven, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
-*/
-/*
if (crtc.vsync && !new_vsync)
printf("disable vsync, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
@@ -874,7 +880,8 @@
printf("enable vsync, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
-*/
+#endif /* DEBUG_CRTC */
+
if (crtc.venable && !new_venable) {
/* visible area ends here - try to compute vertical centering */
/* FIXME: count actual number of rasterlines */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-13 10:09:44
|
Revision: 45221
http://sourceforge.net/p/vice-emu/code/45221
Author: rhialto
Date: 2024-07-13 10:09:42 +0000 (Sat, 13 Jul 2024)
Log Message:
-----------
CRTC: Make the fix for bug #2054 nicer.
- Simplify the condition (a >= b + 1) to (a > b).
- Split the if/else into 2 if statements with opposite conditions.
- Swap their order because the code in the second can make the condition
of the first true and in that case we want to execute it (that's what
the goto did).
- Also get rid of the + 1 in if (ycounter + 1 >= VTOTALADJ) since it was
wrong - we now nicely got rid of TWO annoying "+ 1"s.
There was nothing to fix for cases where the VTOTALADJ register > 0,
which is fortunately most/all of the interesting test cases.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2024-07-11 17:50:16 UTC (rev 45220)
+++ trunk/vice/src/crtc/crtc.c 2024-07-13 10:09:42 UTC (rev 45221)
@@ -717,58 +717,8 @@
* 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.
- *
- * Are we past the end of the screen, i.e. the top border?
*/
- if (crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
-#if CRTC_BEAM_RACING
- if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
- crtc.current_line == 32*8 + 4 - 1) {
- /* Set the retrace/vertical blank alarm, to end the IRQ,
- * at the rhs of the visible text area but 1 line above it.
- * Non-crtc timings are fixed so we might as well use the
- * more efficient expression to check for the top line. */
- alarm_set(crtc.adjusted_retrace_alarm,
- crtc.rl_start + crtc.rl_visible);
- }
-#endif
- /* The real end is VTOTALADJ scan lines futher down, for fine tuning */
- if ((crtc.raster.ycounter + 1) >= crtc.regs[CRTC_REG_VTOTALADJ]) {
-hack:
- long cycles;
-
- /* Do vsync stuff. Reset line counters to top (0). */
- /* printf("new screen at clk=%d\n",crtc.rl_start); */
- crtc_reset_screen_ptr();
- crtc.raster.ycounter = 0;
- crtc.current_charline = 0;
- new_venable = 1; /* Re-enable video */
-
- /* expected number of rasterlines for next frame */
- crtc.framelines = crtc.current_line;
- crtc.current_line = 0;
-
- /* hardware cursor handling */
- if (crtc.crsrmode & 2) {
- crtc.crsrcnt--;
- if (!crtc.crsrcnt) {
- crtc.crsrcnt = (crtc.crsrmode & 1) ? 16 : 32;
- crtc.crsrstate ^= 1;
- }
- }
-
- /* cycles per frame, for speed adjustments */
- cycles = crtc.rl_start - crtc.frame_start;
- if (crtc.frame_start && (cycles != crtc.cycles_per_frame)) {
- machine_set_cycles_per_frame(cycles);
- crtc.cycles_per_frame = cycles;
- }
- crtc.frame_start = crtc.rl_start;
- } else {
- crtc.raster.ycounter++;
- crtc.raster.ycounter &= 0x1f;
- }
- } else {
+ if (crtc.current_charline <= crtc.regs[CRTC_REG_VTOTAL]) {
/* 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]) {
@@ -810,14 +760,6 @@
}
new_vsync++; /* compensate for the first decrease below */
}
- /*
- * This is a horrible hack and a better flow of control should
- * be possible!
- */
- if (crtc.regs[CRTC_REG_VTOTALADJ] == 0 &&
- crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
- goto hack;
- }
}
/* Enable or disable the cursor, if it is in the next character line */
if (crtc.raster.ycounter == (unsigned int)(crtc.regs[CRTC_REG_CURSORSTART] & 0x1f)) {
@@ -828,6 +770,60 @@
crtc.henable = 1;
}
+ /*
+ * This is not structured as the else-part of the previous condition,
+ * because this condition can become true in the previous then-part.
+ *
+ * Are we past the end of the screen, i.e. the top border?
+ */
+ if (crtc.current_charline > crtc.regs[CRTC_REG_VTOTAL]) {
+#if CRTC_BEAM_RACING
+ if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
+ crtc.current_line == 32*8 + 4 - 1) {
+ /* Set the retrace/vertical blank alarm, to end the IRQ,
+ * at the rhs of the visible text area but 1 line above it.
+ * Non-crtc timings are fixed so we might as well use the
+ * more efficient expression to check for the top line. */
+ alarm_set(crtc.adjusted_retrace_alarm,
+ crtc.rl_start + crtc.rl_visible);
+ }
+#endif
+ /* The real end is VTOTALADJ scan lines futher down, for fine tuning */
+ if (crtc.raster.ycounter >= crtc.regs[CRTC_REG_VTOTALADJ]) {
+ long cycles;
+
+ /* Do vsync stuff. Reset line counters to top (0). */
+ /* printf("new screen at clk=%d\n",crtc.rl_start); */
+ crtc_reset_screen_ptr();
+ crtc.raster.ycounter = 0;
+ crtc.current_charline = 0;
+ new_venable = 1; /* Re-enable video */
+
+ /* expected number of rasterlines for next frame */
+ crtc.framelines = crtc.current_line;
+ crtc.current_line = 0;
+
+ /* hardware cursor handling */
+ if (crtc.crsrmode & 2) {
+ crtc.crsrcnt--;
+ if (!crtc.crsrcnt) {
+ crtc.crsrcnt = (crtc.crsrmode & 1) ? 16 : 32;
+ crtc.crsrstate ^= 1;
+ }
+ }
+
+ /* cycles per frame, for speed adjustments */
+ cycles = crtc.rl_start - crtc.frame_start;
+ if (crtc.frame_start && (cycles != crtc.cycles_per_frame)) {
+ machine_set_cycles_per_frame(cycles);
+ crtc.cycles_per_frame = cycles;
+ }
+ crtc.frame_start = crtc.rl_start;
+ } else {
+ crtc.raster.ycounter++;
+ crtc.raster.ycounter &= 0x1f;
+ }
+ }
/* If we're in the vertical sync area, count down how many lines are left. */
if (new_vsync) {
new_vsync--;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-11 17:50:19
|
Revision: 45220
http://sourceforge.net/p/vice-emu/code/45220
Author: rhialto
Date: 2024-07-11 17:50:16 +0000 (Thu, 11 Jul 2024)
Log Message:
-----------
De-spacify the endline.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2024-07-11 16:21:27 UTC (rev 45219)
+++ trunk/vice/src/crtc/crtc.c 2024-07-11 17:50:16 UTC (rev 45220)
@@ -814,7 +814,7 @@
* This is a horrible hack and a better flow of control should
* be possible!
*/
- if (crtc.regs[CRTC_REG_VTOTALADJ] == 0 &&
+ if (crtc.regs[CRTC_REG_VTOTALADJ] == 0 &&
crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
goto hack;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-11 16:21:30
|
Revision: 45219
http://sourceforge.net/p/vice-emu/code/45219
Author: rhialto
Date: 2024-07-11 16:21:27 +0000 (Thu, 11 Jul 2024)
Log Message:
-----------
Ugly bug fix for bug #2054.
Essentially, when the screen length is set to N text lines plus 0 scan
line (CRTC_REG_VTOTALADJ == 0), the detection of getting to the end is
done 1 scan line too late. For other values of VTOTALADJ the detection
is ok. Just the case of 0 is missed the first time around by an
apparently unfortunate order of cheking conditions.
The plan is to clean up the hack by rearranging the order of the code
into something nice and without goto.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2024-07-10 18:53:27 UTC (rev 45218)
+++ trunk/vice/src/crtc/crtc.c 2024-07-11 16:21:27 UTC (rev 45219)
@@ -734,6 +734,7 @@
#endif
/* The real end is VTOTALADJ scan lines futher down, for fine tuning */
if ((crtc.raster.ycounter + 1) >= crtc.regs[CRTC_REG_VTOTALADJ]) {
+hack:
long cycles;
/* Do vsync stuff. Reset line counters to top (0). */
@@ -809,6 +810,14 @@
}
new_vsync++; /* compensate for the first decrease below */
}
+ /*
+ * This is a horrible hack and a better flow of control should
+ * be possible!
+ */
+ if (crtc.regs[CRTC_REG_VTOTALADJ] == 0 &&
+ crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
+ goto hack;
+ }
}
/* Enable or disable the cursor, if it is in the next character line */
if (crtc.raster.ycounter == (unsigned int)(crtc.regs[CRTC_REG_CURSORSTART] & 0x1f)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2024-07-10 18:53:30
|
Revision: 45218
http://sourceforge.net/p/vice-emu/code/45218
Author: rhialto
Date: 2024-07-10 18:53:27 +0000 (Wed, 10 Jul 2024)
Log Message:
-----------
Un-indent this needlessly indented code.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2024-07-09 16:45:15 UTC (rev 45217)
+++ trunk/vice/src/crtc/crtc.c 2024-07-10 18:53:27 UTC (rev 45218)
@@ -709,127 +709,125 @@
vsync_do_vsync(crtc.raster.canvas);
}
- {
- /* FIXME: charheight */
- /*
- * The screen starts at the first scan line of the first char of the
- * first character line. In each scan line, the text part is followed
- * by right border, horizontal sync/retrace, left border.
- * 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.
- *
- * Are we past the end of the screen, i.e. the top border?
- */
- if (crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
+ /* FIXME: charheight */
+ /*
+ * The screen starts at the first scan line of the first char of the
+ * first character line. In each scan line, the text part is followed
+ * by right border, horizontal sync/retrace, left border.
+ * 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.
+ *
+ * Are we past the end of the screen, i.e. the top border?
+ */
+ if (crtc.current_charline >= crtc.regs[CRTC_REG_VTOTAL] + 1) {
#if CRTC_BEAM_RACING
- if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
- crtc.current_line == 32*8 + 4 - 1) {
- /* Set the retrace/vertical blank alarm, to end the IRQ,
- * at the rhs of the visible text area but 1 line above it.
- * Non-crtc timings are fixed so we might as well use the
- * more efficient expression to check for the top line. */
- alarm_set(crtc.adjusted_retrace_alarm,
- crtc.rl_start + crtc.rl_visible);
- }
+ if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
+ crtc.current_line == 32*8 + 4 - 1) {
+ /* Set the retrace/vertical blank alarm, to end the IRQ,
+ * at the rhs of the visible text area but 1 line above it.
+ * Non-crtc timings are fixed so we might as well use the
+ * more efficient expression to check for the top line. */
+ alarm_set(crtc.adjusted_retrace_alarm,
+ crtc.rl_start + crtc.rl_visible);
+ }
#endif
- /* The real end is VTOTALADJ scan lines futher down, for fine tuning */
- if ((crtc.raster.ycounter + 1) >= crtc.regs[CRTC_REG_VTOTALADJ]) {
- long cycles;
+ /* The real end is VTOTALADJ scan lines futher down, for fine tuning */
+ if ((crtc.raster.ycounter + 1) >= crtc.regs[CRTC_REG_VTOTALADJ]) {
+ long cycles;
- /* Do vsync stuff. Reset line counters to top (0). */
- /* printf("new screen at clk=%d\n",crtc.rl_start); */
- crtc_reset_screen_ptr();
- crtc.raster.ycounter = 0;
- crtc.current_charline = 0;
- new_venable = 1; /* Re-enable video */
+ /* Do vsync stuff. Reset line counters to top (0). */
+ /* printf("new screen at clk=%d\n",crtc.rl_start); */
+ crtc_reset_screen_ptr();
+ crtc.raster.ycounter = 0;
+ crtc.current_charline = 0;
+ new_venable = 1; /* Re-enable video */
- /* expected number of rasterlines for next frame */
- crtc.framelines = crtc.current_line;
- crtc.current_line = 0;
+ /* expected number of rasterlines for next frame */
+ crtc.framelines = crtc.current_line;
+ crtc.current_line = 0;
- /* hardware cursor handling */
- if (crtc.crsrmode & 2) {
- crtc.crsrcnt--;
- if (!crtc.crsrcnt) {
- crtc.crsrcnt = (crtc.crsrmode & 1) ? 16 : 32;
- crtc.crsrstate ^= 1;
- }
+ /* hardware cursor handling */
+ if (crtc.crsrmode & 2) {
+ crtc.crsrcnt--;
+ if (!crtc.crsrcnt) {
+ crtc.crsrcnt = (crtc.crsrmode & 1) ? 16 : 32;
+ crtc.crsrstate ^= 1;
}
+ }
- /* cycles per frame, for speed adjustments */
- cycles = crtc.rl_start - crtc.frame_start;
- if (crtc.frame_start && (cycles != crtc.cycles_per_frame)) {
- machine_set_cycles_per_frame(cycles);
- crtc.cycles_per_frame = cycles;
- }
- crtc.frame_start = crtc.rl_start;
- } else {
- crtc.raster.ycounter++;
- crtc.raster.ycounter &= 0x1f;
+ /* cycles per frame, for speed adjustments */
+ cycles = crtc.rl_start - crtc.frame_start;
+ if (crtc.frame_start && (cycles != crtc.cycles_per_frame)) {
+ machine_set_cycles_per_frame(cycles);
+ crtc.cycles_per_frame = cycles;
}
+ crtc.frame_start = crtc.rl_start;
} else {
- /* 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]) {
+ crtc.raster.ycounter++;
+ crtc.raster.ycounter &= 0x1f;
+ }
+ } else {
+ /* 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]) {
#if CRTC_BEAM_RACING
- if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
- /* crtc.current_charline + 1 == crtc.regs[CRTC_REG_VDISP] &&
- crtc.raster.ycounter + 1 == crtc.regs[CRTC_REG_SCANLINE] */
- crtc.current_line == 25*8 - 1) {
- /* Set the retrace/vertical blank alarm, to cause an IRQ,
- * at the end/rhs of the visible text area.
- * Non-crtc timings are fixed so we might as well use the
- * more efficient expression to check for the bottom line. */
- alarm_set(crtc.adjusted_retrace_alarm,
- crtc.rl_start + crtc.rl_visible);
- }
+ if ((crtc.retrace_type & CRTC_RETRACE_TYPE_CRTC) == 0 && /* no CRTC */
+ /* crtc.current_charline + 1 == crtc.regs[CRTC_REG_VDISP] &&
+ crtc.raster.ycounter + 1 == crtc.regs[CRTC_REG_SCANLINE] */
+ crtc.current_line == 25*8 - 1) {
+ /* Set the retrace/vertical blank alarm, to cause an IRQ,
+ * at the end/rhs of the visible text area.
+ * Non-crtc timings are fixed so we might as well use the
+ * more efficient expression to check for the bottom line. */
+ alarm_set(crtc.adjusted_retrace_alarm,
+ crtc.rl_start + crtc.rl_visible);
+ }
#endif
- crtc.raster.ycounter++;
- crtc.raster.ycounter &= 0x1f;
- } else {
- /* Start a new character line */
- crtc.raster.ycounter = 0;
- crtc.cursor_lines = 0;
- crtc.current_charline++;
- crtc.current_charline &= 0x7f;
+ crtc.raster.ycounter++;
+ crtc.raster.ycounter &= 0x1f;
+ } else {
+ /* Start a new character line */
+ crtc.raster.ycounter = 0;
+ crtc.cursor_lines = 0;
+ crtc.current_charline++;
+ crtc.current_charline &= 0x7f;
- if (crtc.henable) {
- crtc.screen_rel += crtc.rl_visible * crtc.hw_cols;
+ if (crtc.henable) {
+ crtc.screen_rel += crtc.rl_visible * crtc.hw_cols;
+ }
+ /* Are we past the text area? */
+ if (crtc.current_charline == crtc.regs[CRTC_REG_VDISP]) {
+ new_venable = 0; /* disable video */
+ }
+ /* Should the vertical sync signal start? */
+ if (crtc.current_charline == crtc.regs[CRTC_REG_VSYNC]) {
+ /* printf("vsync starts at clk=%d\n",crtc.rl_start); */
+ new_vsync = (crtc.regs[CRTC_REG_SYNCWIDTH] >> 4) & 0x0f;
+ if (!new_vsync) {
+ new_vsync = 16;
}
- /* Are we past the text area? */
- if (crtc.current_charline == crtc.regs[CRTC_REG_VDISP]) {
- new_venable = 0; /* disable video */
- }
- /* Should the vertical sync signal start? */
- if (crtc.current_charline == crtc.regs[CRTC_REG_VSYNC]) {
- /* printf("vsync starts at clk=%d\n",crtc.rl_start); */
- new_vsync = (crtc.regs[CRTC_REG_SYNCWIDTH] >> 4) & 0x0f;
- if (!new_vsync) {
- new_vsync = 16;
- }
- new_vsync++; /* compensate for the first decrease below */
- }
+ new_vsync++; /* compensate for the first decrease below */
}
- /* Enable or disable the cursor, if it is in the next character line */
- if (crtc.raster.ycounter == (unsigned int)(crtc.regs[CRTC_REG_CURSORSTART] & 0x1f)) {
- crtc.cursor_lines = 1;
- } else if (crtc.raster.ycounter == (unsigned int)((crtc.regs[CRTC_REG_CURSOREND] + 1) & 0x1f)) {
- crtc.cursor_lines = 0;
- }
-
- crtc.henable = 1;
}
- /* If we're in the vertical sync area, count down how many lines are left. */
- if (new_vsync) {
- new_vsync--;
+ /* Enable or disable the cursor, if it is in the next character line */
+ if (crtc.raster.ycounter == (unsigned int)(crtc.regs[CRTC_REG_CURSORSTART] & 0x1f)) {
+ crtc.cursor_lines = 1;
+ } else if (crtc.raster.ycounter == (unsigned int)((crtc.regs[CRTC_REG_CURSOREND] + 1) & 0x1f)) {
+ crtc.cursor_lines = 0;
}
+
+ crtc.henable = 1;
+ }
+ /* If we're in the vertical sync area, count down how many lines are left. */
+ if (new_vsync) {
+ new_vsync--;
+ }
#if CRTC_BEAM_RACING
- if (new_venable) {
- crtc_fetch_prefetch();
- }
+ if (new_venable) {
+ crtc_fetch_prefetch();
+ }
#endif /* CRTC_BEAM_RACING */
- }
/******************************************************************
* signal retrace to CPU
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-09 16:46:12
|
Revision: 45216
http://sourceforge.net/p/vice-emu/code/45216
Author: gpz
Date: 2024-07-09 16:20:20 +0000 (Tue, 09 Jul 2024)
Log Message:
-----------
improve makefiles, patch by uffe jakobsen
Modified Paths:
--------------
testprogs/general/Lorenz-2.15/src/Makefile
testprogs/general/Lorenz-2.15/src/Makefile.dtv
testprogs/general/Lorenz-2.15/src/Makefile.plus4
Modified: testprogs/general/Lorenz-2.15/src/Makefile
===================================================================
--- testprogs/general/Lorenz-2.15/src/Makefile 2024-07-09 13:55:51 UTC (rev 45215)
+++ testprogs/general/Lorenz-2.15/src/Makefile 2024-07-09 16:20:20 UTC (rev 45216)
@@ -365,7 +365,7 @@
mmu.prg \
cpuport128.prg \
cputiming.prg
-
+
DISK2NEXT = irq.prg
DISK3PROGSOLD = \
@@ -423,13 +423,13 @@
ALLPROGSOLD = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD)
ALLPROGSNEW = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSNEW)
-
+
ALLPROGS = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD) $(DISK3PROGSNEW)
ALLDISKS = Disk1.d64 Disk2.d64 Disk3.d64 Disk3new.d64 Lorenz.d81 Lorenznew.d81
ALLPROGSOLD128 = $(DISK1PROGS) $(DISK2PROGS128) $(DISK3PROGSOLD)
ALLPROGSNEW128 = $(DISK1PROGS) $(DISK2PROGS128) $(DISK3PROGSNEW)
-
+
ALLPROGS128 = $(DISK1PROGS) $(DISK2PROGS128) $(DISK3PROGSOLD) $(DISK3PROGSNEW)
ALLDISKS128 = Disk1.d64 Disk2c128.d64 Disk3.d64 Disk3new.d64
@@ -509,7 +509,7 @@
64tass $(ASFLAGS) -D NEWCIA=0 -i cia2tb.s -o cia2tb.prg
cia2tbnew.prg: cia2tb.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEWCIA=1 -i cia2tb.s -o cia2tbnew.prg
-
+
nextdisk1.prg: nextdisk.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEXT=1 -i nextdisk.s -o nextdisk1.prg
nextdisk2.prg: nextdisk.s $(COMMONSRC)
@@ -541,7 +541,7 @@
Disk3new.d64: $(DISK3PROGSNEW)
c1541 -format "test suite 2.15+,#3" d64 Disk3new.d64 > /dev/null
for I in $(basename $(DISK3PROGSNEW)); do \
- c1541 Disk3new.d64 -write "$$I.prg" `echo "$$I" | sed -e 's:new$$::'`; \
+ c1541 Disk3new.d64 -write "$$I.prg" $$(echo "$$I" | sed -e 's:new$$::') > /dev/null; \
done
# c1541 Disk3new.d64 -list
Lorenz.d81: $(ALLPROGSOLD)
@@ -553,7 +553,7 @@
Lorenznew.d81: $(ALLPROGSNEW)
c1541 -format "test suite 2.15+,#1" d81 Lorenznew.d81 > /dev/null
for I in $(basename $(ALLPROGSNEW)); do \
- c1541 Lorenznew.d81 -write "$$I.prg" `echo "$$I" | sed -e 's:new$$::'`; \
+ c1541 Lorenznew.d81 -write "$$I.prg" $$(echo "$$I" | sed -e 's:new$$::') > /dev/null; \
done
# c1541 Lorenznew.d81 -list
@@ -560,7 +560,7 @@
Disk2c128.d64: $(DISK2PROGS128) nextdisk2.prg
c1541 -format "test suite 2.15+,#2" d64 Disk2c128.d64 > /dev/null
for I in $(basename $(DISK2PROGS128)); do \
- c1541 Disk2c128.d64 -write "$$I.prg" `echo "$$I" | sed -e 's:128$$::'`; \
+ c1541 Disk2c128.d64 -write "$$I.prg" $$(echo "$$I" | sed -e 's:128$$::') > /dev/null; \
done
c1541 Disk2c128.d64 -write "nextdisk2.prg" "$(basename $(DISK2NEXT))" > /dev/null
# c1541 Disk2c128.d64 -list
Modified: testprogs/general/Lorenz-2.15/src/Makefile.dtv
===================================================================
--- testprogs/general/Lorenz-2.15/src/Makefile.dtv 2024-07-09 13:55:51 UTC (rev 45215)
+++ testprogs/general/Lorenz-2.15/src/Makefile.dtv 2024-07-09 16:20:20 UTC (rev 45216)
@@ -293,7 +293,7 @@
template-dtv.prg
ALLPROGSOLD = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD)
-
+
ALLPROGS = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD)
ALLDISKS = Disk1DTV.d64 Disk2DTV.d64 Disk3DTV.d64 LorenzDTV.d81
@@ -355,7 +355,7 @@
64tass $(ASFLAGS) -D NEWCIA=0 -i cia2ta.s -o cia2ta-dtv.prg
cia2tb-dtv.prg: cia2tb.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEWCIA=0 -i cia2tb.s -o cia2tb-dtv.prg
-
+
nextdisk1-dtv.prg: nextdisk.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEXT=1 -i nextdisk.s -o nextdisk1-dtv.prg
nextdisk2-dtv.prg: nextdisk.s $(COMMONSRC)
@@ -367,27 +367,27 @@
Disk1DTV.d64: $(DISK1PROGS) nextdisk1-dtv.prg
c1541 -format "test suite 2.15+,#1" d64 Disk1DTV.d64 > /dev/null
for I in $(basename $(DISK1PROGS)); do \
- c1541 Disk1DTV.d64 -write "$$I.prg" `echo "$$I" | sed 's:-dtv::g'` > /dev/null; \
+ c1541 Disk1DTV.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-dtv::g') > /dev/null; \
done
- c1541 Disk1DTV.d64 -write "nextdisk1-dtv.prg" `echo "$(basename $(DISK1NEXT))" | sed 's:-dtv::g'` > /dev/null
+ c1541 Disk1DTV.d64 -write "nextdisk1-dtv.prg" $$(echo "$(basename $(DISK1NEXT))" | sed 's:-dtv::g') > /dev/null
# c1541 Disk1DTV.d64 -list
Disk2DTV.d64: $(DISK2PROGS) nextdisk2-dtv.prg
c1541 -format "test suite 2.15+,#2" d64 Disk2DTV.d64 > /dev/null
for I in $(basename $(DISK2PROGS)); do \
- c1541 Disk2DTV.d64 -write "$$I.prg" `echo "$$I" | sed 's:-dtv::g'` > /dev/null; \
+ c1541 Disk2DTV.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-dtv::g') > /dev/null; \
done
- c1541 Disk2DTV.d64 -write "nextdisk2-dtv.prg" `echo "$(basename $(DISK2NEXT))" | sed 's:-dtv::g'` > /dev/null
+ c1541 Disk2DTV.d64 -write "nextdisk2-dtv.prg" $$(echo "$(basename $(DISK2NEXT))" | sed 's:-dtv::g') > /dev/null
# c1541 Disk2DTV.d64 -list
Disk3DTV.d64: $(DISK3PROGSOLD)
c1541 -format "test suite 2.15+,#3" d64 Disk3DTV.d64 > /dev/null
for I in $(basename $(DISK3PROGSOLD)); do \
- c1541 Disk3DTV.d64 -write "$$I.prg" `echo "$$I" | sed 's:-dtv::g'` > /dev/null; \
+ c1541 Disk3DTV.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-dtv::g') > /dev/null; \
done
# c1541 Disk3DTV.d64 -list
LorenzDTV.d81: $(ALLPROGSOLD)
c1541 -format "test suite 2.15+,#1" d81 LorenzDTV.d81 > /dev/null
for I in $(basename $(ALLPROGSOLD)); do \
- c1541 LorenzDTV.d81 -write "$$I.prg" `echo "$$I" | sed 's:-dtv::g'` > /dev/null; \
+ c1541 LorenzDTV.d81 -write "$$I.prg" $$(echo "$$I" | sed 's:-dtv::g') > /dev/null; \
done
# c1541 LorenzDTV.d81 -list
Modified: testprogs/general/Lorenz-2.15/src/Makefile.plus4
===================================================================
--- testprogs/general/Lorenz-2.15/src/Makefile.plus4 2024-07-09 13:55:51 UTC (rev 45215)
+++ testprogs/general/Lorenz-2.15/src/Makefile.plus4 2024-07-09 16:20:20 UTC (rev 45216)
@@ -274,7 +274,7 @@
template-plus4.prg
ALLPROGSOLD = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD)
-
+
ALLPROGS = $(DISK1PROGS) $(DISK2PROGS) $(DISK3PROGSOLD)
ALLDISKS = Disk1plus4.d64 Disk2plus4.d64 Disk3plus4.d64 LorenzPlus4.d81
@@ -336,7 +336,7 @@
64tass $(ASFLAGS) -D NEWCIA=0 -i cia2ta.s -o cia2ta-plus4.prg
cia2tb-plus4.prg: cia2tb.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEWCIA=0 -i cia2tb.s -o cia2tb-plus4.prg
-
+
nextdisk1-plus4.prg: nextdisk.s $(COMMONSRC)
64tass $(ASFLAGS) -D NEXT=1 -i nextdisk.s -o nextdisk1-plus4.prg
nextdisk2-plus4.prg: nextdisk.s $(COMMONSRC)
@@ -348,27 +348,27 @@
Disk1plus4.d64: $(DISK1PROGS) nextdisk1-plus4.prg
c1541 -format "test suite 2.15+,#1" d64 Disk1plus4.d64 > /dev/null
for I in $(basename $(DISK1PROGS)); do \
- c1541 Disk1plus4.d64 -write "$$I.prg" `echo "$$I" | sed 's:-plus4::g'` > /dev/null; \
+ c1541 Disk1plus4.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-plus4::g') > /dev/null; \
done
- c1541 Disk1plus4.d64 -write "nextdisk1-plus4.prg" `echo "$(basename $(DISK1NEXT))" | sed 's:-plus4::g'` > /dev/null
+ c1541 Disk1plus4.d64 -write "nextdisk1-plus4.prg" $$(echo "$(basename $(DISK1NEXT))" | sed 's:-plus4::g') > /dev/null
# c1541 Disk1plus4.d64 -list
Disk2plus4.d64: $(DISK2PROGS) nextdisk2-plus4.prg
c1541 -format "test suite 2.15+,#2" d64 Disk2plus4.d64 > /dev/null
for I in $(basename $(DISK2PROGS)); do \
- c1541 Disk2plus4.d64 -write "$$I.prg" `echo "$$I" | sed 's:-plus4::g'` > /dev/null; \
+ c1541 Disk2plus4.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-plus4::g') > /dev/null; \
done
- c1541 Disk2plus4.d64 -write "nextdisk2-plus4.prg" `echo "$(basename $(DISK2NEXT))" | sed 's:-plus4::g'` > /dev/null
+ c1541 Disk2plus4.d64 -write "nextdisk2-plus4.prg" $$(echo "$(basename $(DISK2NEXT))" | sed 's:-plus4::g') > /dev/null
# c1541 Disk2plus4.d64 -list
Disk3plus4.d64: $(DISK3PROGSOLD)
c1541 -format "test suite 2.15+,#3" d64 Disk3plus4.d64 > /dev/null
for I in $(basename $(DISK3PROGSOLD)); do \
- c1541 Disk3plus4.d64 -write "$$I.prg" `echo "$$I" | sed 's:-plus4::g'` > /dev/null; \
+ c1541 Disk3plus4.d64 -write "$$I.prg" $$(echo "$$I" | sed 's:-plus4::g') > /dev/null; \
done
# c1541 Disk3plus4.d64 -list
LorenzPlus4.d81: $(ALLPROGSOLD)
c1541 -format "test suite 2.15+,#1" d81 LorenzPlus4.d81 > /dev/null
for I in $(basename $(ALLPROGSOLD)); do \
- c1541 LorenzPlus4.d81 -write "$$I.prg" `echo "$$I" | sed 's:-plus4::g'` > /dev/null; \
+ c1541 LorenzPlus4.d81 -write "$$I.prg" $$(echo "$$I" | sed 's:-plus4::g') > /dev/null; \
done
# c1541 LorenzPlus4.d81 -list
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-09 16:45:17
|
Revision: 45217
http://sourceforge.net/p/vice-emu/code/45217
Author: gpz
Date: 2024-07-09 16:45:15 +0000 (Tue, 09 Jul 2024)
Log Message:
-----------
fix brkn test for plus4, patch by uffe jakobsen
Modified Paths:
--------------
testprogs/general/Lorenz-2.15/readme-plus4.txt
testprogs/general/Lorenz-2.15/src/brkn.s
testprogs/general/Lorenz-2.15/src/common/target.inc
Modified: testprogs/general/Lorenz-2.15/readme-plus4.txt
===================================================================
--- testprogs/general/Lorenz-2.15/readme-plus4.txt 2024-07-09 16:20:20 UTC (rev 45216)
+++ testprogs/general/Lorenz-2.15/readme-plus4.txt 2024-07-09 16:45:15 UTC (rev 45217)
@@ -7,13 +7,9 @@
- 00/01
- brk vector
- there are various absolute memory addresses used as buffers in various tests
-
+
Not all tests are working right now:
-Disk1:
-
-brkn - breaks into monitor
-
Disk2:
trap1-17 - hangs (waitborder)
Modified: testprogs/general/Lorenz-2.15/src/brkn.s
===================================================================
--- testprogs/general/Lorenz-2.15/src/brkn.s 2024-07-09 16:20:20 UTC (rev 45216)
+++ testprogs/general/Lorenz-2.15/src/brkn.s 2024-07-09 16:45:15 UTC (rev 45217)
@@ -7,10 +7,10 @@
.include "printhb.asm"
.include "showregs.asm"
-;------------------------------------------------------------------------------
+;------------------------------------------------------------------------------
thisname .null "brkn" ; name of this test
nextname .null "rtin" ; name of next test, "-" means no more tests
-;------------------------------------------------------------------------------
+;------------------------------------------------------------------------------
main:
lda #%00011011
sta db
@@ -72,11 +72,8 @@
sbc #3
sta sr
- lda #127
- sta $dc0d
- lda $dc0d
- lda #$30
- sta 1
+ #SET_IRQ_DISABLE
+ #SET_ROM_DISABLE
ldx sb
txs
@@ -99,10 +96,8 @@
tsx
stx sa
- lda #$37
- sta 1
- lda #129
- sta $dc0d
+ #SET_ROM_ENABLE
+ #SET_IRQ_ENABLE
jsr check
Modified: testprogs/general/Lorenz-2.15/src/common/target.inc
===================================================================
--- testprogs/general/Lorenz-2.15/src/common/target.inc 2024-07-09 16:20:20 UTC (rev 45216)
+++ testprogs/general/Lorenz-2.15/src/common/target.inc 2024-07-09 16:45:15 UTC (rev 45217)
@@ -1,5 +1,5 @@
-; the TARGETXXX constants are referred to by their absolute value in makefiles,
+; the TARGETXXX constants are referred to by their absolute value in makefiles,
; so do not change them, only append new ones
TARGETC64 = 0
@@ -61,11 +61,31 @@
pla
.endm
+SET_IRQ_ENABLE: .macro
+ lda #$81
+ sta $dc0d
+ .endm
+
+SET_IRQ_DISABLE: .macro
+ lda #$7f
+ sta $dc0d
+ lda $dc0d
+ .endm
+
+SET_ROM_ENABLE: .macro
+ lda #$37
+ sta $01
+ .endm
+
+SET_ROM_DISABLE: .macro
+ lda #$35
+ sta $01
+ .endm
+
RESET_MEMORY_MAP: .macro
- lda #$37
- sta 1
lda #$2f
sta 0
+ #SET_ROM_ENABLE
.endm
RESET_KERNAL_IO: .macro
@@ -77,6 +97,7 @@
lda #0 ; black
sta $d020
.endm
+
RESET_CURSOR: .macro
lda #0
sta $d3
@@ -126,11 +147,31 @@
pla
.endm
+SET_IRQ_ENABLE: .macro
+ lda #$81
+ sta $dc0d
+ .endm
+
+SET_IRQ_DISABLE: .macro
+ lda #$7f
+ sta $dc0d
+ lda $dc0d
+ .endm
+
+SET_ROM_ENABLE: .macro
+ lda #$37
+ sta $01
+ .endm
+
+SET_ROM_DISABLE: .macro
+ lda #$35
+ sta $01
+ .endm
+
RESET_MEMORY_MAP: .macro
- lda #$37
- sta 1
lda #$2f
sta 0
+ #SET_ROM_ENABLE
.endm
RESET_KERNAL_IO: .macro
@@ -201,11 +242,31 @@
pla
.endm
+SET_IRQ_ENABLE: .macro
+ lda #$81
+ sta $dc0d
+ .endm
+
+SET_IRQ_DISABLE: .macro
+ lda #$7f
+ sta $dc0d
+ lda $dc0d
+ .endm
+
+SET_ROM_ENABLE: .macro
+ lda #$37
+ sta $01
+ .endm
+
+SET_ROM_DISABLE: .macro
+ lda #$35
+ sta $01
+ .endm
+
RESET_MEMORY_MAP: .macro
- lda #$37
- sta 1
lda #$2f
sta 0
+ #SET_ROM_ENABLE
.endm
RESET_KERNAL_IO: .macro
@@ -221,6 +282,7 @@
lda #0
sta $d3
.endm
+
.endif
;------------------------------------------------------------------------------
@@ -260,8 +322,29 @@
pla
.endm
+SET_IRQ_ENABLE: .macro
+ lda #$a2
+ sta $ff0a
+ .endm
+
+SET_IRQ_DISABLE: .macro
+ lda #$00
+ sta $ff0a
+ .endm
+
+SET_ROM_ENABLE: .macro
+ sta $ff3e
+ .endm
+
+SET_ROM_DISABLE: .macro
+ sta $ff3f
+ .endm
+
RESET_MEMORY_MAP: .macro
- ; nothing to do here
+ lda #0
+ sta $fb
+ sta $fdd0
+ #SET_ROM_ENABLE
.endm
RESET_KERNAL_IO: .macro
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-09 13:55:55
|
Revision: 45215
http://sourceforge.net/p/vice-emu/code/45215
Author: gpz
Date: 2024-07-09 13:55:51 +0000 (Tue, 09 Jul 2024)
Log Message:
-----------
remove 'userport hummer joystick adapter' from all emulators, except DTV - this device is built into the dtv-hummer and it makes no sense to support it elsewhere
Modified Paths:
--------------
trunk/vice/src/c128/c128.c
trunk/vice/src/c64/c64.c
trunk/vice/src/cbm2/cbm2.c
trunk/vice/src/pet/pet.c
trunk/vice/src/plus4/plus4.c
trunk/vice/src/scpu64/scpu64.c
trunk/vice/src/userport/userport_hummer_joystick.c
trunk/vice/src/vic20/vic20.c
Modified: trunk/vice/src/c128/c128.c
===================================================================
--- trunk/vice/src/c128/c128.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/c128/c128.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -868,10 +868,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
Modified: trunk/vice/src/c64/c64.c
===================================================================
--- trunk/vice/src/c64/c64.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/c64/c64.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -813,10 +813,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
Modified: trunk/vice/src/cbm2/cbm2.c
===================================================================
--- trunk/vice/src/cbm2/cbm2.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/cbm2/cbm2.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -424,10 +424,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
Modified: trunk/vice/src/pet/pet.c
===================================================================
--- trunk/vice/src/pet/pet.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/pet/pet.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -434,10 +434,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/plus4/plus4.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -545,10 +545,6 @@
init_resource_fail("joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_synergy_resources_init() < 0) {
init_resource_fail("userport synergy joystick");
return -1;
Modified: trunk/vice/src/scpu64/scpu64.c
===================================================================
--- trunk/vice/src/scpu64/scpu64.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/scpu64/scpu64.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -633,10 +633,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
Modified: trunk/vice/src/userport/userport_hummer_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_hummer_joystick.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/userport/userport_hummer_joystick.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -24,15 +24,15 @@
*
*/
-/* C64DTV HUMMER userport joystick adapter (C64/C128/C64DTV/CBM2/PET/PLUS4/VIC20)
+/* C64DTV HUMMER userport joystick adapter (C64DTV)
-C64/C128 | C64DTV | CBM2 | PET | PLUS4 | VIC20 | JOY | NOTES
-------------------------------------------------------------
- C | USR0 | 14 | C | B | C | 1 | PB0 <- JOY UP
- D | USR1 | 13 | D | K | D | 2 | PB1 <- JOY DOWN
- E | USR2 | 12 | E | 4 | E | 3 | PB2 <- JOY LEFT
- F | USR3 | 11 | F | 5 | F | 4 | PB3 <- JOY RIGHT
- H | USR4 | 10 | H | 6 | H | 6 | PB4 <- JOY FIRE
+ C64DTV | JOY | NOTES
+---------------------
+ USR0 | 1 | PB0 <- JOY UP
+ USR1 | 2 | PB1 <- JOY DOWN
+ USR2 | 3 | PB2 <- JOY LEFT
+ USR3 | 4 | PB3 <- JOY RIGHT
+ USR4 | 6 | PB4 <- JOY FIRE
The c64dtv uses 3.3v, so NO +5VDC pin is supported on the userport.
Modified: trunk/vice/src/vic20/vic20.c
===================================================================
--- trunk/vice/src/vic20/vic20.c 2024-07-09 13:01:33 UTC (rev 45214)
+++ trunk/vice/src/vic20/vic20.c 2024-07-09 13:55:51 UTC (rev 45215)
@@ -718,10 +718,6 @@
init_resource_fail("userport pet joystick");
return -1;
}
- if (userport_joystick_hummer_resources_init() < 0) {
- init_resource_fail("userport hummer joystick");
- return -1;
- }
if (userport_joystick_oem_resources_init() < 0) {
init_resource_fail("userport oem joystick");
return -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-09 13:01:34
|
Revision: 45214
http://sourceforge.net/p/vice-emu/code/45214
Author: gpz
Date: 2024-07-09 13:01:33 +0000 (Tue, 09 Jul 2024)
Log Message:
-----------
in vsid call machine_specific_reset() again later in initcmdline_check_attach() so the psid driver will get copied to RAM after the initial RAM init. fixes bug #2048
Modified Paths:
--------------
trunk/vice/src/c64/vsid.c
trunk/vice/src/initcmdline.c
Modified: trunk/vice/src/c64/vsid.c
===================================================================
--- trunk/vice/src/c64/vsid.c 2024-07-08 23:09:10 UTC (rev 45213)
+++ trunk/vice/src/c64/vsid.c 2024-07-09 13:01:33 UTC (rev 45214)
@@ -258,6 +258,10 @@
}
/* C64-specific reset sequence. */
+/* NOTE: this function is called a second time during startup, via initcmdline_check_attach(),
+ to make sure the psid driver is copied to RAM after the RAM was initialized with the
+ startup pattern. what really should be done is that the psid file is loaded just like
+ any other autostarted program at the respective time - but that is not easily done. */
void machine_specific_reset(void)
{
ciacore_reset(machine_context.cia1);
Modified: trunk/vice/src/initcmdline.c
===================================================================
--- trunk/vice/src/initcmdline.c 2024-07-08 23:09:10 UTC (rev 45213)
+++ trunk/vice/src/initcmdline.c 2024-07-09 13:01:33 UTC (rev 45214)
@@ -614,6 +614,13 @@
log_error(LOG_DEFAULT, "Cannot attach tape image `%s'.",
startup_tape_image[TAPEPORT_PORT_2]);
}
+ } else {
+ /* HACK: call machine specific reset (only) for vsid here, which makes sure
+ the vsid "driver" code is copied to RAM _after_ the initial startup
+ sequence initialized the RAM with the init pattern. what should really
+ happen is that the psid file is loaded here instead - but that is not
+ trivially done. */
+ machine_specific_reset();
}
cmdline_free_autostart_string();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 23:09:16
|
Revision: 45213
http://sourceforge.net/p/vice-emu/code/45213
Author: gpz
Date: 2024-07-08 23:09:10 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
revert r45212 - the device ONLY works with Plus4, and must be removed everywhere else instead. *sigh*
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_synergy_joystick.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-08 23:03:03 UTC (rev 45212)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 23:09:10 UTC (rev 45213)
@@ -109,9 +109,7 @@
#include "userport.h"
#include "userport_hummer_joystick.h"
#include "userport_io_sim.h"
-#include "userport_joystick.h"
#include "userport_petscii_snespad.h"
-#include "userport_spt_joystick.h"
#include "userport_synergy_joystick.h"
#include "userport_woj_joystick.h"
#include "vice-event.h"
@@ -551,6 +549,10 @@
init_resource_fail("userport hummer joystick");
return -1;
}
+ if (userport_joystick_synergy_resources_init() < 0) {
+ init_resource_fail("userport synergy joystick");
+ return -1;
+ }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/userport/userport_synergy_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-08 23:03:03 UTC (rev 45212)
+++ trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-08 23:09:10 UTC (rev 45213)
@@ -24,18 +24,18 @@
*
*/
-/* Synergy userport joystick adapter (C64/C128/CBM2/PET/VIC20)
+/* Synergy userport joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
-C64/C128 | CBM2 | PET | VIC20 | I/O | NOTES
--------------------------------------------
- C | 14 | C | C | I | PB0 <- JOY1/2/3 UP
- D | 13 | D | D | I | PB1 <- JOY1/2/3 DOWN
- E | 12 | E | E | I | PB2 <- JOY1/2/3 LEFT
- F | 11 | F | F | I | PB3 <- JOY1/2/3 RIGHT
- H | 10 | H | H | I | PB4 <- JOY1/2/3 FIRE
- J | 9 | J | J | O | PB5 -> JOY1 SELECT
- K | 8 | K | K | O | PB6 -> JOY2 SELECT
- L | 7 | L | L | O | PB7 -> JOY3 SELECT
+C64/C128 | CBM2 | PET | PLUS4 | VIC20 | I/O | NOTES
+---------------------------------------------------
+ C | 14 | C | B | C | I | PB0 <- JOY1/2/3 UP
+ D | 13 | D | K | D | I | PB1 <- JOY1/2/3 DOWN
+ E | 12 | E | 4 | E | I | PB2 <- JOY1/2/3 LEFT
+ F | 11 | F | 5 | F | I | PB3 <- JOY1/2/3 RIGHT
+ H | 10 | H | 6 | H | I | PB4 <- JOY1/2/3 FIRE
+ J | 9 | J | 7 | J | O | PB5 -> JOY1 SELECT
+ K | 8 | K | J | K | O | PB6 -> JOY2 SELECT
+ L | 7 | L | F | L | O | PB7 -> JOY3 SELECT
*/
#include "vice.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 23:03:05
|
Revision: 45212
http://sourceforge.net/p/vice-emu/code/45212
Author: gpz
Date: 2024-07-08 23:03:03 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
remove support for 'synergy userport joystick adapter' from xplus4. The device does not work with a Plus4 as-is
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_synergy_joystick.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-08 22:56:37 UTC (rev 45211)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 23:03:03 UTC (rev 45212)
@@ -551,10 +551,6 @@
init_resource_fail("userport hummer joystick");
return -1;
}
- if (userport_joystick_synergy_resources_init() < 0) {
- init_resource_fail("userport synergy joystick");
- return -1;
- }
if (userport_joystick_woj_resources_init() < 0) {
init_resource_fail("userport woj joystick");
return -1;
Modified: trunk/vice/src/userport/userport_synergy_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-08 22:56:37 UTC (rev 45211)
+++ trunk/vice/src/userport/userport_synergy_joystick.c 2024-07-08 23:03:03 UTC (rev 45212)
@@ -24,18 +24,18 @@
*
*/
-/* Synergy userport joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* Synergy userport joystick adapter (C64/C128/CBM2/PET/VIC20)
-C64/C128 | CBM2 | PET | PLUS4 | VIC20 | I/O | NOTES
----------------------------------------------------
- C | 14 | C | B | C | I | PB0 <- JOY1/2/3 UP
- D | 13 | D | K | D | I | PB1 <- JOY1/2/3 DOWN
- E | 12 | E | 4 | E | I | PB2 <- JOY1/2/3 LEFT
- F | 11 | F | 5 | F | I | PB3 <- JOY1/2/3 RIGHT
- H | 10 | H | 6 | H | I | PB4 <- JOY1/2/3 FIRE
- J | 9 | J | 7 | J | O | PB5 -> JOY1 SELECT
- K | 8 | K | J | K | O | PB6 -> JOY2 SELECT
- L | 7 | L | F | L | O | PB7 -> JOY3 SELECT
+C64/C128 | CBM2 | PET | VIC20 | I/O | NOTES
+-------------------------------------------
+ C | 14 | C | C | I | PB0 <- JOY1/2/3 UP
+ D | 13 | D | D | I | PB1 <- JOY1/2/3 DOWN
+ E | 12 | E | E | I | PB2 <- JOY1/2/3 LEFT
+ F | 11 | F | F | I | PB3 <- JOY1/2/3 RIGHT
+ H | 10 | H | H | I | PB4 <- JOY1/2/3 FIRE
+ J | 9 | J | J | O | PB5 -> JOY1 SELECT
+ K | 8 | K | K | O | PB6 -> JOY2 SELECT
+ L | 7 | L | L | O | PB7 -> JOY3 SELECT
*/
#include "vice.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 22:56:42
|
Revision: 45211
http://sourceforge.net/p/vice-emu/code/45211
Author: gpz
Date: 2024-07-08 22:56:37 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
remove support for 'OEM userport joystick adapter' and 'PET userport joystick adapter' from xplus4, these devices do not work with a Plus4 as-is
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_joystick.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-08 22:49:54 UTC (rev 45210)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 22:56:37 UTC (rev 45211)
@@ -547,18 +547,10 @@
init_resource_fail("joystick");
return -1;
}
- if (userport_joystick_pet_resources_init() < 0) {
- init_resource_fail("userport pet joystick");
- return -1;
- }
if (userport_joystick_hummer_resources_init() < 0) {
init_resource_fail("userport hummer joystick");
return -1;
}
- if (userport_joystick_oem_resources_init() < 0) {
- init_resource_fail("userport oem joystick");
- return -1;
- }
if (userport_joystick_synergy_resources_init() < 0) {
init_resource_fail("userport synergy joystick");
return -1;
Modified: trunk/vice/src/userport/userport_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_joystick.c 2024-07-08 22:49:54 UTC (rev 45210)
+++ trunk/vice/src/userport/userport_joystick.c 2024-07-08 22:56:37 UTC (rev 45211)
@@ -62,32 +62,32 @@
- | - | - | - | 13 | - | 4 | JOYx RIGHT INPUT 1 <- JOY2 RIGHT
*/
-/* PET userport joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* PET userport joystick adapter (C64/C128/CBM2/PET/VIC20)
-C64/C128 | CBM2 | PET | PLUS4 | VIC20 | JOY1 | JOY2 | NOTES
------------------------------------------------------------
- C | 14 | C | B | C | 1 | - | PB0 <- JOY1 UP
- D | 13 | D | K | D | 2 | - | PB1 <- JOY1 DOWN
- E | 12 | E | 4 | E | 3 | - | PB2 <- JOY1 LEFT
- F | 11 | F | 5 | F | 4 | - | PB3 <- JOY1 RIGHT
- H | 10 | H | 6 | H | - | 1 | PB4 <- JOY2 UP
- J | 9 | J | 7 | J | - | 2 | PB5 <- JOY2 DOWN
- K | 8 | K | J | K | - | 3 | PB6 <- JOY2 LEFT
- L | 7 | L | F | L | - | 4 | PB7 <-> JOY2 RIGHT
+C64/C128 | CBM2 | PET | VIC20 | JOY1 | JOY2 | NOTES
+---------------------------------------------------
+ C | 14 | C | C | 1 | - | PB0 <- JOY1 UP
+ D | 13 | D | D | 2 | - | PB1 <- JOY1 DOWN
+ E | 12 | E | E | 3 | - | PB2 <- JOY1 LEFT
+ F | 11 | F | F | 4 | - | PB3 <- JOY1 RIGHT
+ H | 10 | H | H | - | 1 | PB4 <- JOY2 UP
+ J | 9 | J | J | - | 2 | PB5 <- JOY2 DOWN
+ K | 8 | K | K | - | 3 | PB6 <- JOY2 LEFT
+ L | 7 | L | L | - | 4 | PB7 <-> JOY2 RIGHT
JOY1 FIRE is hooked up to pull down both JOY1 LEFT & JOY1 RIGHT
JOY2 FIRE is hooked up to pull down both JOY2 LEFT & JOY2 RIGHT
*/
-/* VIC20 OEM userport joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* VIC20 OEM userport joystick adapter (C64/C128/CBM2/PET/VIC20)
-C64/C128 | CBM2 | PET | PLUS4 | VIC20 | JOY | NOTES
----------------------------------------------------
- F | 11 | F | 5 | F | 6 | PB3 <- JOY FIRE
- H | 10 | H | 6 | H | 4 | PB4 <- JOY RIGHT
- J | 9 | J | 7 | J | 3 | PB5 <- JOY LEFT
- K | 8 | K | J | K | 2 | PB6 <- JOY DOWN
- L | 7 | L | F | L | 1 | PB7 <- JOY UP
+C64/C128 | CBM2 | PET | VIC20 | JOY | NOTES
+-------------------------------------------
+ F | 11 | F | F | 6 | PB3 <- JOY FIRE
+ H | 10 | H | H | 4 | PB4 <- JOY RIGHT
+ J | 9 | J | J | 3 | PB5 <- JOY LEFT
+ K | 8 | K | K | 2 | PB6 <- JOY DOWN
+ L | 7 | L | L | 1 | PB7 <- JOY UP
*/
/* ------------------------------------------------------------------------- */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 22:49:58
|
Revision: 45210
http://sourceforge.net/p/vice-emu/code/45210
Author: gpz
Date: 2024-07-08 22:49:54 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
remove support for 'Userport Stupid Pet Tricks joystick adapter' from xplus4, this device does not work with a real Plus4 as-is
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_spt_joystick.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-08 22:39:43 UTC (rev 45209)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 22:49:54 UTC (rev 45210)
@@ -559,10 +559,6 @@
init_resource_fail("userport oem joystick");
return -1;
}
- if (userport_spt_joystick_resources_init() < 0) {
- init_resource_fail("userport spt joystick");
- return -1;
- }
if (userport_joystick_synergy_resources_init() < 0) {
init_resource_fail("userport synergy joystick");
return -1;
Modified: trunk/vice/src/userport/userport_spt_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_spt_joystick.c 2024-07-08 22:39:43 UTC (rev 45209)
+++ trunk/vice/src/userport/userport_spt_joystick.c 2024-07-08 22:49:54 UTC (rev 45210)
@@ -24,7 +24,7 @@
*
*/
-/* Userport Stupid Pet Tricks joystick adapter (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* Userport Stupid Pet Tricks joystick adapter (C64/C128/CBM2/PET/VIC20)
C64/C128 | CBM2 | PET | VIC20 | NAME
------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 22:39:46
|
Revision: 45209
http://sourceforge.net/p/vice-emu/code/45209
Author: gpz
Date: 2024-07-08 22:39:43 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
update comment
Modified Paths:
--------------
trunk/vice/src/userport/userport_woj_joystick.c
Modified: trunk/vice/src/userport/userport_woj_joystick.c
===================================================================
--- trunk/vice/src/userport/userport_woj_joystick.c 2024-07-08 22:37:56 UTC (rev 45208)
+++ trunk/vice/src/userport/userport_woj_joystick.c 2024-07-08 22:39:43 UTC (rev 45209)
@@ -28,8 +28,15 @@
https://github.com/SukkoPera/WheelOfJoy
-NOTE: This device CAN NOT work on other computers than the Plus4 (without rewiring)
+FIXME: The original pinout of this device was not compatible as-is with the Plus4
+ userport. However, the hardware designer adapted the "re-wiring" that resulted
+ from the VICE internal "re-wiring" to make the real device work with a real
+ Plus4.
+ As a consequence, when the userport system will be fixed to no more rely
+ on such "internal adapter", the code must be changed accordingly to use
+ a different pinout for Plus4.
+
C64/C128 | CBM2 | PET | PLUS4 | VIC20 | I/O | NOTES
---------------------------------------------------
C | 14 | C | B | C | I | PB0 <- JOY1/2/3 UP
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 22:37:57
|
Revision: 45208
http://sourceforge.net/p/vice-emu/code/45208
Author: gpz
Date: 2024-07-08 22:37:56 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
remove support for 'userport DAC' from xplus4. This device does not work with a real Plus4 as-is
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_dac.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-08 22:03:36 UTC (rev 45207)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 22:37:56 UTC (rev 45208)
@@ -107,7 +107,6 @@
#include "trapthem_snespad.h"
#include "types.h"
#include "userport.h"
-#include "userport_dac.h"
#include "userport_hummer_joystick.h"
#include "userport_io_sim.h"
#include "userport_joystick.h"
@@ -572,10 +571,6 @@
init_resource_fail("userport woj joystick");
return -1;
}
- if (userport_dac_resources_init() < 0) {
- init_resource_fail("userport dac");
- return -1;
- }
if (userport_petscii_snespad_resources_init() < 0) {
init_resource_fail("userport petscii snes pad");
return -1;
@@ -895,9 +890,6 @@
digiblaster_sound_chip_init();
speech_sound_chip_init();
- /* Initialize userport based sound chips */
- userport_dac_sound_chip_init();
-
drive_sound_init();
datasette_sound_init();
video_sound_init();
Modified: trunk/vice/src/userport/userport_dac.c
===================================================================
--- trunk/vice/src/userport/userport_dac.c 2024-07-08 22:03:36 UTC (rev 45207)
+++ trunk/vice/src/userport/userport_dac.c 2024-07-08 22:37:56 UTC (rev 45208)
@@ -26,18 +26,18 @@
*
*/
-/* 8bit userport DAC (C64/C128/CBM2/PET/PLUS4/VIC20)
+/* 8bit userport DAC (C64/C128/CBM2/PET/VIC20)
-C64/C128 | CBM2 | PET | PLUS4 | VIC20 | NAME
---------------------------------------------
- C | 14 | C | B | C | PB0 -> D0
- D | 13 | D | K | D | PB1 -> D1
- E | 12 | E | 4 | E | PB2 -> D2
- F | 11 | F | 5 | F | PB3 -> D3
- H | 10 | H | 6 | H | PB4 -> D4
- J | 9 | J | 7 | J | PB5 -> D5
- K | 8 | K | J | K | PB6 -> D6
- L | 7 | L | F | L | PB7 -> D7
+C64/C128 | CBM2 | PET | VIC20 | NAME
+------------------------------------
+ C | 14 | C | C | PB0 -> D0
+ D | 13 | D | D | PB1 -> D1
+ E | 12 | E | E | PB2 -> D2
+ F | 11 | F | F | PB3 -> D3
+ H | 10 | H | H | PB4 -> D4
+ J | 9 | J | J | PB5 -> D5
+ K | 8 | K | K | PB6 -> D6
+ L | 7 | L | L | PB7 -> D7
*/
#include "vice.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-08 22:03:38
|
Revision: 45207
http://sourceforge.net/p/vice-emu/code/45207
Author: gpz
Date: 2024-07-08 22:03:36 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
add support for the 'PETSCII SNES ADAPTER' to xplus4
Modified Paths:
--------------
trunk/vice/src/plus4/plus4.c
trunk/vice/src/userport/userport_petscii_snespad.c
Modified: trunk/vice/src/plus4/plus4.c
===================================================================
--- trunk/vice/src/plus4/plus4.c 2024-07-07 11:40:13 UTC (rev 45206)
+++ trunk/vice/src/plus4/plus4.c 2024-07-08 22:03:36 UTC (rev 45207)
@@ -111,6 +111,7 @@
#include "userport_hummer_joystick.h"
#include "userport_io_sim.h"
#include "userport_joystick.h"
+#include "userport_petscii_snespad.h"
#include "userport_spt_joystick.h"
#include "userport_synergy_joystick.h"
#include "userport_woj_joystick.h"
@@ -575,6 +576,10 @@
init_resource_fail("userport dac");
return -1;
}
+ if (userport_petscii_snespad_resources_init() < 0) {
+ init_resource_fail("userport petscii snes pad");
+ return -1;
+ }
if (userport_io_sim_resources_init() < 0) {
init_resource_fail("userport I/O simulation");
return -1;
Modified: trunk/vice/src/userport/userport_petscii_snespad.c
===================================================================
--- trunk/vice/src/userport/userport_petscii_snespad.c 2024-07-07 11:40:13 UTC (rev 45206)
+++ trunk/vice/src/userport/userport_petscii_snespad.c 2024-07-08 22:03:36 UTC (rev 45207)
@@ -24,13 +24,13 @@
*
*/
-/* - PETSCII SNES PAD (C64/C128/PET/VIC20)
+/* - PETSCII SNES PAD (C64/C128/PET/VIC20/Plus4)
-C64/C128 | PET | VIC20 | CBM2 | SNES PAD | I/O
--------------------------------------------------------
- F (PB3) | F (PA3) | F (PB3) | 11 | CLOCK | O
- J (PB5) | J (PA5) | J (PB5) | 9 | LATCH | O
- K (PB6) | K (PA6) | K (PB6) | 8 | DATA | I
+C64/C128 | Plus4 | PET | VIC20 | CBM2 | SNES PAD | I/O
+-----------------------------------------------------------------
+ F (PB3) | F (P7) | F (PA3) | F (PB3) | 11 | CLOCK | O
+ J (PB5) | J (P6) | J (PA5) | J (PB5) | 9 | LATCH | O
+ K (PB6) | K (P1) | K (PA6) | K (PB6) | 8 | DATA | I
*/
#include "vice.h"
@@ -137,6 +137,18 @@
uint8_t new_clock = 0;
uint8_t new_latch = 0;
+ /* FIXME: Currently the userport system ignores the different pinout of the
+ Plus4 userport, and instead "re-wires" the userport lines so all C64 port B
+ lines go to respective Plus 4 port lines. The following reverts this, since
+ the actual "Petscii SNES Adapter" can be plugged into a Plus 4 as is and
+ requires no extra re-wiring at all.
+ The following code should be removed once the Userport system is fixed tp
+ no more do such "re-wiring" */
+ if (machine_class == VICE_MACHINE_PLUS4) {
+ value = (((value >> 7) & 1) << 3) |
+ (((value >> 6) & 1) << 5);
+ }
+
new_clock = (value & 0x08) >> 3;
new_latch = (value & 0x20) >> 4;
@@ -211,6 +223,17 @@
retval <<= 6;
+ /* FIXME: Currently the userport system ignores the different pinout of the
+ Plus4 userport, and instead "re-wires" the userport lines so all C64 port B
+ lines go to respective Plus 4 port lines. The following reverts this, since
+ the actual "Petscii SNES Adapter" can be plugged into a Plus 4 as is and
+ requires no extra re-wiring at all.
+ The following code should be removed once the Userport system is fixed tp
+ no more do such "re-wiring" */
+ if (machine_class == VICE_MACHINE_PLUS4) {
+ retval = (((retval >> 6) & 1) << 1);
+ }
+
return (~retval);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2024-07-07 11:40:14
|
Revision: 45206
http://sourceforge.net/p/vice-emu/code/45206
Author: gpz
Date: 2024-07-07 11:40:13 +0000 (Sun, 07 Jul 2024)
Log Message:
-----------
fix plus4 joystick/controlport/autofire settings
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_autofire.c
trunk/vice/src/arch/gtk3/widgets/settings_controlport.c
trunk/vice/src/arch/gtk3/widgets/settings_joystick.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_autofire.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_autofire.c 2024-07-06 21:28:39 UTC (rev 45205)
+++ trunk/vice/src/arch/gtk3/widgets/settings_autofire.c 2024-07-07 11:40:13 UTC (rev 45206)
@@ -165,14 +165,14 @@
1, row, 1, 1);
row++;
- /* Userport 1-3 (joy 3-5) */
- row = add_userport_widgets(layout, row, 3);
+ /* Userport 1-8 (joy 3-10) */
+ row = add_userport_widgets(layout, row, 8);
- /* SID Card joyport (joy 6) */
- if (joyport_has_mapping(5)) {
+ /* SID Card joyport (joy 11) */
+ if (joyport_has_mapping(10)) {
gtk_grid_attach(GTK_GRID(layout),
- joystick_autofire_widget_create(6, "SIDCard Joystick"),
- 1, row - 1, 1, 1);
+ joystick_autofire_widget_create(11, "SIDCard Joystick"),
+ 0, row, 1, 1);
}
return row;
}
Modified: trunk/vice/src/arch/gtk3/widgets/settings_controlport.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_controlport.c 2024-07-06 21:28:39 UTC (rev 45205)
+++ trunk/vice/src/arch/gtk3/widgets/settings_controlport.c 2024-07-07 11:40:13 UTC (rev 45206)
@@ -303,10 +303,10 @@
*/
static int layout_add_sidcard_port(GtkGrid *layout, int row)
{
- GtkWidget *widget = create_joyport_widget(JOYPORT_5, "SIDCard Joystick Port");
+ GtkWidget *widget = create_joyport_widget(JOYPORT_PLUS4_SIDCART, "SIDCard Joystick Port");
gtk_grid_attach(layout, widget, 0, row, 1, 1);
- if (joyport_port_is_active(JOYPORT_5)) {
+ if (joyport_port_is_active(JOYPORT_PLUS4_SIDCART)) {
gtk_widget_show(widget);
} else {
gtk_widget_hide(widget);
@@ -465,7 +465,7 @@
int row = 0;
row = layout_add_control_ports(layout, row, 2);
- row = layout_add_adapter_ports(layout, row, 3);
+ row = layout_add_adapter_ports(layout, row, 8);
row = layout_add_sidcard_port(layout, row);
row = layout_add_bbrtc_widget(layout, row);
Modified: trunk/vice/src/arch/gtk3/widgets/settings_joystick.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_joystick.c 2024-07-06 21:28:39 UTC (rev 45205)
+++ trunk/vice/src/arch/gtk3/widgets/settings_joystick.c 2024-07-07 11:40:13 UTC (rev 45206)
@@ -328,11 +328,11 @@
*/
static int layout_add_sidcard_port(GtkGrid *layout, int row)
{
- /* not JOYPORT_5 because the API is retarded: JOYPORT_5 == 4 */
- if (joyport_has_mapping(5)) {
- device_widgets[JOYPORT_5] = joystick_device_widget_create(
- JOYPORT_5, "SIDCard Joystick");
- gtk_grid_attach(layout, device_widgets[JOYPORT_5], 0, row, 1, 1);
+ /* not JOYPORT_PLUS4_SIDCART because the API is retarded: JOYPORT_PLUS4_SIDCART == JOYPORT_11 == 10 */
+ if (joyport_has_mapping(10)) {
+ device_widgets[JOYPORT_PLUS4_SIDCART] = joystick_device_widget_create(
+ JOYPORT_PLUS4_SIDCART, "SIDCard Joystick");
+ gtk_grid_attach(layout, device_widgets[JOYPORT_PLUS4_SIDCART], 0, row, 1, 1);
}
return row + 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|