logic-agent-mcp 0.0.0-stage → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.cmd +5 -0
- package/CAPTURE.cmd +8 -0
- package/CHECK.cmd +7 -0
- package/FIRMWARE-RECOVER.cmd +6 -0
- package/FIRMWARE-STATUS.cmd +8 -0
- package/INSTALL-DRIVER.cmd +6 -0
- package/INSTALL-MCP.cmd +16 -0
- package/LICENSE +31 -0
- package/MCP.cmd +5 -0
- package/README.md +127 -2
- package/SELF-TEST.cmd +6 -0
- package/THIRD-PARTY-NOTICES.md +32 -0
- package/VERIFY-FILES.cmd +6 -0
- package/VERSION.txt +17 -0
- package/VIEW.cmd +16 -0
- package/checksums.sha256 +449 -0
- package/docs/DRIVER.md +54 -0
- package/docs/DSLOGIC-PLUS.md +180 -0
- package/docs/FIRMWARE.md +53 -0
- package/docs/INSTALL.md +74 -0
- package/docs/MCP-CLIENTS.md +200 -0
- package/docs/PROTOCOLS.md +200 -0
- package/docs/TROUBLESHOOTING.md +41 -0
- package/docs/UPSTREAM-SYNC.md +141 -0
- package/docs/WAVEFORM-VIEWER.md +48 -0
- package/firmware/DSLogicPlus.fw +0 -0
- package/firmware/LICENSE-DreamSourceLab.txt +20 -0
- package/launcher/logic-agent-mcp.mjs +106 -0
- package/package.json +56 -6
- package/runtime/app/logic_agent/__init__.py +4 -0
- package/runtime/app/logic_agent/analysis.py +84 -0
- package/runtime/app/logic_agent/backends/__init__.py +7 -0
- package/runtime/app/logic_agent/backends/base.py +37 -0
- package/runtime/app/logic_agent/backends/dslab.py +278 -0
- package/runtime/app/logic_agent/backends/mock.py +101 -0
- package/runtime/app/logic_agent/backends/sigrok.py +252 -0
- package/runtime/app/logic_agent/cli.py +387 -0
- package/runtime/app/logic_agent/decoders.py +868 -0
- package/runtime/app/logic_agent/errors.py +50 -0
- package/runtime/app/logic_agent/importer.py +129 -0
- package/runtime/app/logic_agent/mcp_clients.py +956 -0
- package/runtime/app/logic_agent/mcp_server.py +345 -0
- package/runtime/app/logic_agent/models.py +150 -0
- package/runtime/app/logic_agent/protocols.py +233 -0
- package/runtime/app/logic_agent/service.py +378 -0
- package/runtime/app/logic_agent/signal.py +206 -0
- package/runtime/app/logic_agent/store.py +197 -0
- package/runtime/bin/_bz2.pyd +0 -0
- package/runtime/bin/_ctypes.pyd +0 -0
- package/runtime/bin/_decimal.pyd +0 -0
- package/runtime/bin/_elementtree.pyd +0 -0
- package/runtime/bin/_hashlib.pyd +0 -0
- package/runtime/bin/_lzma.pyd +0 -0
- package/runtime/bin/_multiprocessing.pyd +0 -0
- package/runtime/bin/_socket.pyd +0 -0
- package/runtime/bin/_sqlite3.pyd +0 -0
- package/runtime/bin/_ssl.pyd +0 -0
- package/runtime/bin/dslab.exe +0 -0
- package/runtime/bin/libglib-2.0-0.dll +0 -0
- package/runtime/bin/libiconv-2.dll +0 -0
- package/runtime/bin/libintl-8.dll +0 -0
- package/runtime/bin/libpcre2-8-0.dll +0 -0
- package/runtime/bin/libusb-1.0.dll +0 -0
- package/runtime/bin/libwinpthread-1.dll +0 -0
- package/runtime/bin/msvcp100.dll +0 -0
- package/runtime/bin/msvcr100.dll +0 -0
- package/runtime/bin/pyexpat.pyd +0 -0
- package/runtime/bin/python34.dll +0 -0
- package/runtime/bin/python34.zip +0 -0
- package/runtime/bin/res/DSCope.bin +0 -0
- package/runtime/bin/res/DSCope.fw +0 -0
- package/runtime/bin/res/DSCope1.def.dsc +88 -0
- package/runtime/bin/res/DSCope2.def.dsc +54 -0
- package/runtime/bin/res/DSCope20.bin +0 -0
- package/runtime/bin/res/DSCope20.fw +0 -0
- package/runtime/bin/res/DSCopeC20B.bin +0 -0
- package/runtime/bin/res/DSCopeC20P.bin +0 -0
- package/runtime/bin/res/DSCopeU2B100.bin +0 -0
- package/runtime/bin/res/DSCopeU2B20.bin +0 -0
- package/runtime/bin/res/DSCopeU2P20.bin +0 -0
- package/runtime/bin/res/DSCopeU3P100.bin +0 -0
- package/runtime/bin/res/DSLogic.fw +0 -0
- package/runtime/bin/res/DSLogic0.def.dsc +297 -0
- package/runtime/bin/res/DSLogic1.def.dsc +82 -0
- package/runtime/bin/res/DSLogic2.def.dsc +52 -0
- package/runtime/bin/res/DSLogic33.bin +0 -0
- package/runtime/bin/res/DSLogic50.bin +0 -0
- package/runtime/bin/res/DSLogicBasic.bin +0 -0
- package/runtime/bin/res/DSLogicPlus-pgl12-2.bin +0 -0
- package/runtime/bin/res/DSLogicPlus-pgl12.bin +0 -0
- package/runtime/bin/res/DSLogicPlus.bin +0 -0
- package/runtime/bin/res/DSLogicPlus.fw +0 -0
- package/runtime/bin/res/DSLogicPro.bin +0 -0
- package/runtime/bin/res/DSLogicPro.fw +0 -0
- package/runtime/bin/res/DSLogicU2Basic-pgl12-2.bin +0 -0
- package/runtime/bin/res/DSLogicU2Basic-pgl12.bin +0 -0
- package/runtime/bin/res/DSLogicU2Basic.bin +0 -0
- package/runtime/bin/res/DSLogicU2Pro16.bin +0 -0
- package/runtime/bin/res/DSLogicU3Pro16.bin +0 -0
- package/runtime/bin/res/DSLogicU3Pro32.bin +0 -0
- package/runtime/bin/res/license.txt +20 -0
- package/runtime/bin/res/virtual-demo1.dsc +68 -0
- package/runtime/bin/select.pyd +0 -0
- package/runtime/bin/sigrok-cli.exe +0 -0
- package/runtime/bin/unicodedata.pyd +0 -0
- package/runtime/bin/winsound.pyd +0 -0
- package/runtime/bin/zlib1.dll +0 -0
- package/runtime/decoders/ac97/__init__.py +38 -0
- package/runtime/decoders/ac97/pd.py +477 -0
- package/runtime/decoders/ad5626/__init__.py +25 -0
- package/runtime/decoders/ad5626/pd.py +62 -0
- package/runtime/decoders/ad79x0/__init__.py +25 -0
- package/runtime/decoders/ad79x0/pd.py +137 -0
- package/runtime/decoders/ade77xx/__init__.py +31 -0
- package/runtime/decoders/ade77xx/lists.py +102 -0
- package/runtime/decoders/ade77xx/pd.py +131 -0
- package/runtime/decoders/adf435x/__init__.py +29 -0
- package/runtime/decoders/adf435x/pd.py +230 -0
- package/runtime/decoders/adns5020/__init__.py +27 -0
- package/runtime/decoders/adns5020/pd.py +116 -0
- package/runtime/decoders/adxl345/__init__.py +26 -0
- package/runtime/decoders/adxl345/lists.py +96 -0
- package/runtime/decoders/adxl345/pd.py +453 -0
- package/runtime/decoders/am230x/__init__.py +36 -0
- package/runtime/decoders/am230x/pd.py +229 -0
- package/runtime/decoders/amulet_ascii/__init__.py +28 -0
- package/runtime/decoders/amulet_ascii/lists.py +73 -0
- package/runtime/decoders/amulet_ascii/pd.py +699 -0
- package/runtime/decoders/arm_etmv3/__init__.py +25 -0
- package/runtime/decoders/arm_etmv3/pd.py +567 -0
- package/runtime/decoders/arm_itm/__init__.py +25 -0
- package/runtime/decoders/arm_itm/pd.py +373 -0
- package/runtime/decoders/arm_tpiu/__init__.py +28 -0
- package/runtime/decoders/arm_tpiu/pd.py +131 -0
- package/runtime/decoders/atsha204a/__init__.py +30 -0
- package/runtime/decoders/atsha204a/pd.py +323 -0
- package/runtime/decoders/aud/__init__.py +31 -0
- package/runtime/decoders/aud/pd.py +108 -0
- package/runtime/decoders/avr_isp/__init__.py +25 -0
- package/runtime/decoders/avr_isp/parts.py +163 -0
- package/runtime/decoders/avr_isp/pd.py +278 -0
- package/runtime/decoders/avr_pdi/__init__.py +42 -0
- package/runtime/decoders/avr_pdi/pd.py +574 -0
- package/runtime/decoders/caliper/__init__.py +36 -0
- package/runtime/decoders/caliper/pd.py +146 -0
- package/runtime/decoders/can/__init__.py +31 -0
- package/runtime/decoders/can/pd.py +519 -0
- package/runtime/decoders/cc1101/__init__.py +28 -0
- package/runtime/decoders/cc1101/lists.py +115 -0
- package/runtime/decoders/cc1101/pd.py +294 -0
- package/runtime/decoders/cec/__init__.py +25 -0
- package/runtime/decoders/cec/pd.py +311 -0
- package/runtime/decoders/cec/protocoldata.py +117 -0
- package/runtime/decoders/cfp/__init__.py +34 -0
- package/runtime/decoders/cfp/pd.py +110 -0
- package/runtime/decoders/cjtag/__init__.py +36 -0
- package/runtime/decoders/cjtag/pd.py +323 -0
- package/runtime/decoders/common/__init__.py +19 -0
- package/runtime/decoders/common/plugtrx/__init__.py +20 -0
- package/runtime/decoders/common/plugtrx/mod.py +192 -0
- package/runtime/decoders/common/sdcard/__init__.py +20 -0
- package/runtime/decoders/common/sdcard/mod.py +150 -0
- package/runtime/decoders/common/srdhelper/__init__.py +20 -0
- package/runtime/decoders/common/srdhelper/mod.py +98 -0
- package/runtime/decoders/counter/__init__.py +28 -0
- package/runtime/decoders/counter/pd.py +145 -0
- package/runtime/decoders/dali/__init__.py +24 -0
- package/runtime/decoders/dali/lists.py +98 -0
- package/runtime/decoders/dali/pd.py +244 -0
- package/runtime/decoders/dcf77/__init__.py +28 -0
- package/runtime/decoders/dcf77/pd.py +311 -0
- package/runtime/decoders/dmx512/__init__.py +25 -0
- package/runtime/decoders/dmx512/pd.py +361 -0
- package/runtime/decoders/ds1307/__init__.py +25 -0
- package/runtime/decoders/ds1307/pd.py +270 -0
- package/runtime/decoders/ds2408/__init__.py +25 -0
- package/runtime/decoders/ds2408/pd.py +129 -0
- package/runtime/decoders/ds243x/__init__.py +25 -0
- package/runtime/decoders/ds243x/pd.py +270 -0
- package/runtime/decoders/ds28ea00/__init__.py +25 -0
- package/runtime/decoders/ds28ea00/pd.py +93 -0
- package/runtime/decoders/dsi/__init__.py +24 -0
- package/runtime/decoders/dsi/pd.py +157 -0
- package/runtime/decoders/edid/__init__.py +35 -0
- package/runtime/decoders/edid/pd.py +671 -0
- package/runtime/decoders/edid/pnpids.txt +2135 -0
- package/runtime/decoders/eeprom24xx/__init__.py +25 -0
- package/runtime/decoders/eeprom24xx/lists.py +214 -0
- package/runtime/decoders/eeprom24xx/pd.py +443 -0
- package/runtime/decoders/eeprom93xx/__init__.py +32 -0
- package/runtime/decoders/eeprom93xx/pd.py +163 -0
- package/runtime/decoders/em4100/__init__.py +24 -0
- package/runtime/decoders/em4100/pd.py +238 -0
- package/runtime/decoders/em4305/__init__.py +24 -0
- package/runtime/decoders/em4305/pd.py +394 -0
- package/runtime/decoders/enc28j60/__init__.py +32 -0
- package/runtime/decoders/enc28j60/lists.py +161 -0
- package/runtime/decoders/enc28j60/pd.py +294 -0
- package/runtime/decoders/flexray/__init__.py +32 -0
- package/runtime/decoders/flexray/pd.py +413 -0
- package/runtime/decoders/graycode/__init__.py +24 -0
- package/runtime/decoders/graycode/pd.py +197 -0
- package/runtime/decoders/guess_bitrate/__init__.py +40 -0
- package/runtime/decoders/guess_bitrate/pd.py +79 -0
- package/runtime/decoders/hdcp/__init__.py +27 -0
- package/runtime/decoders/hdcp/pd.py +191 -0
- package/runtime/decoders/i2c/__init__.py +25 -0
- package/runtime/decoders/i2c/pd.py +364 -0
- package/runtime/decoders/i2cdemux/__init__.py +27 -0
- package/runtime/decoders/i2cdemux/pd.py +80 -0
- package/runtime/decoders/i2cfilter/__init__.py +37 -0
- package/runtime/decoders/i2cfilter/pd.py +106 -0
- package/runtime/decoders/i2s/__init__.py +29 -0
- package/runtime/decoders/i2s/pd.py +179 -0
- package/runtime/decoders/ieee488/__init__.py +26 -0
- package/runtime/decoders/ieee488/pd.py +849 -0
- package/runtime/decoders/ir_irmp/__init__.py +25 -0
- package/runtime/decoders/ir_irmp/irmp_library.py +168 -0
- package/runtime/decoders/ir_irmp/pd.py +139 -0
- package/runtime/decoders/ir_nec/__init__.py +25 -0
- package/runtime/decoders/ir_nec/lists.py +93 -0
- package/runtime/decoders/ir_nec/pd.py +300 -0
- package/runtime/decoders/ir_rc5/__init__.py +24 -0
- package/runtime/decoders/ir_rc5/lists.py +93 -0
- package/runtime/decoders/ir_rc5/pd.py +182 -0
- package/runtime/decoders/ir_rc6/__init__.py +24 -0
- package/runtime/decoders/ir_rc6/pd.py +205 -0
- package/runtime/decoders/ir_sirc/__init__.py +26 -0
- package/runtime/decoders/ir_sirc/lists.py +201 -0
- package/runtime/decoders/ir_sirc/pd.py +215 -0
- package/runtime/decoders/jitter/__init__.py +29 -0
- package/runtime/decoders/jitter/pd.py +198 -0
- package/runtime/decoders/jtag/__init__.py +30 -0
- package/runtime/decoders/jtag/pd.py +235 -0
- package/runtime/decoders/jtag_ejtag/__init__.py +25 -0
- package/runtime/decoders/jtag_ejtag/pd.py +408 -0
- package/runtime/decoders/jtag_stm32/__init__.py +29 -0
- package/runtime/decoders/jtag_stm32/pd.py +269 -0
- package/runtime/decoders/lfast/__init__.py +35 -0
- package/runtime/decoders/lfast/pd.py +335 -0
- package/runtime/decoders/lin/__init__.py +28 -0
- package/runtime/decoders/lin/pd.py +247 -0
- package/runtime/decoders/lm75/__init__.py +25 -0
- package/runtime/decoders/lm75/pd.py +186 -0
- package/runtime/decoders/lpc/__init__.py +25 -0
- package/runtime/decoders/lpc/pd.py +365 -0
- package/runtime/decoders/ltc242x/__init__.py +25 -0
- package/runtime/decoders/ltc242x/pd.py +86 -0
- package/runtime/decoders/ltc26x7/__init__.py +25 -0
- package/runtime/decoders/ltc26x7/pd.py +187 -0
- package/runtime/decoders/maple_bus/__init__.py +25 -0
- package/runtime/decoders/maple_bus/pd.py +222 -0
- package/runtime/decoders/max72xx/__init__.py +25 -0
- package/runtime/decoders/max72xx/pd.py +130 -0
- package/runtime/decoders/mcp230xx/__init__.py +25 -0
- package/runtime/decoders/mcp230xx/pd.py +143 -0
- package/runtime/decoders/mcs48/__init__.py +31 -0
- package/runtime/decoders/mcs48/pd.py +126 -0
- package/runtime/decoders/mdio/__init__.py +39 -0
- package/runtime/decoders/mdio/pd.py +325 -0
- package/runtime/decoders/microwire/__init__.py +40 -0
- package/runtime/decoders/microwire/pd.py +194 -0
- package/runtime/decoders/midi/__init__.py +28 -0
- package/runtime/decoders/midi/lists.py +840 -0
- package/runtime/decoders/midi/pd.py +627 -0
- package/runtime/decoders/miller/__init__.py +26 -0
- package/runtime/decoders/miller/pd.py +190 -0
- package/runtime/decoders/mlx90614/__init__.py +25 -0
- package/runtime/decoders/mlx90614/pd.py +82 -0
- package/runtime/decoders/modbus/__init__.py +28 -0
- package/runtime/decoders/modbus/pd.py +941 -0
- package/runtime/decoders/morse/__init__.py +28 -0
- package/runtime/decoders/morse/pd.py +250 -0
- package/runtime/decoders/mrf24j40/__init__.py +25 -0
- package/runtime/decoders/mrf24j40/lists.py +165 -0
- package/runtime/decoders/mrf24j40/pd.py +188 -0
- package/runtime/decoders/mxc6225xu/__init__.py +28 -0
- package/runtime/decoders/mxc6225xu/pd.py +217 -0
- package/runtime/decoders/nes_gamepad/__init__.py +54 -0
- package/runtime/decoders/nes_gamepad/pd.py +92 -0
- package/runtime/decoders/nrf24l01/__init__.py +29 -0
- package/runtime/decoders/nrf24l01/pd.py +332 -0
- package/runtime/decoders/nrf905/__init__.py +26 -0
- package/runtime/decoders/nrf905/pd.py +301 -0
- package/runtime/decoders/numbers_and_state/__init__.py +41 -0
- package/runtime/decoders/numbers_and_state/pd.py +377 -0
- package/runtime/decoders/nunchuk/__init__.py +30 -0
- package/runtime/decoders/nunchuk/pd.py +207 -0
- package/runtime/decoders/onewire_link/__init__.py +56 -0
- package/runtime/decoders/onewire_link/pd.py +347 -0
- package/runtime/decoders/onewire_network/__init__.py +56 -0
- package/runtime/decoders/onewire_network/pd.py +185 -0
- package/runtime/decoders/ook/__init__.py +36 -0
- package/runtime/decoders/ook/pd.py +484 -0
- package/runtime/decoders/ook_oregon/__init__.py +25 -0
- package/runtime/decoders/ook_oregon/lists.py +75 -0
- package/runtime/decoders/ook_oregon/pd.py +389 -0
- package/runtime/decoders/ook_vis/__init__.py +25 -0
- package/runtime/decoders/ook_vis/pd.py +194 -0
- package/runtime/decoders/pan1321/__init__.py +25 -0
- package/runtime/decoders/pan1321/pd.py +164 -0
- package/runtime/decoders/parallel/__init__.py +45 -0
- package/runtime/decoders/parallel/pd.py +285 -0
- package/runtime/decoders/pca9571/__init__.py +25 -0
- package/runtime/decoders/pca9571/pd.py +122 -0
- package/runtime/decoders/pjdl/__init__.py +27 -0
- package/runtime/decoders/pjdl/pd.py +723 -0
- package/runtime/decoders/pjon/__init__.py +25 -0
- package/runtime/decoders/pjon/pd.py +603 -0
- package/runtime/decoders/ps2/__init__.py +26 -0
- package/runtime/decoders/ps2/pd.py +126 -0
- package/runtime/decoders/pwm/__init__.py +24 -0
- package/runtime/decoders/pwm/pd.py +167 -0
- package/runtime/decoders/qi/__init__.py +25 -0
- package/runtime/decoders/qi/pd.py +244 -0
- package/runtime/decoders/rc_encode/__init__.py +40 -0
- package/runtime/decoders/rc_encode/pd.py +215 -0
- package/runtime/decoders/rfm12/__init__.py +25 -0
- package/runtime/decoders/rfm12/pd.py +497 -0
- package/runtime/decoders/rgb_led_spi/__init__.py +25 -0
- package/runtime/decoders/rgb_led_spi/pd.py +72 -0
- package/runtime/decoders/rgb_led_ws281x/__init__.py +27 -0
- package/runtime/decoders/rgb_led_ws281x/pd.py +267 -0
- package/runtime/decoders/rtc8564/__init__.py +25 -0
- package/runtime/decoders/rtc8564/pd.py +254 -0
- package/runtime/decoders/sae_j1850_vpw/__init__.py +24 -0
- package/runtime/decoders/sae_j1850_vpw/pd.py +296 -0
- package/runtime/decoders/sbus_futaba/__init__.py +35 -0
- package/runtime/decoders/sbus_futaba/pd.py +273 -0
- package/runtime/decoders/sda2506/__init__.py +24 -0
- package/runtime/decoders/sda2506/pd.py +146 -0
- package/runtime/decoders/sdcard_sd/__init__.py +24 -0
- package/runtime/decoders/sdcard_sd/pd.py +554 -0
- package/runtime/decoders/sdcard_spi/__init__.py +68 -0
- package/runtime/decoders/sdcard_spi/pd.py +518 -0
- package/runtime/decoders/sdq/__init__.py +28 -0
- package/runtime/decoders/sdq/pd.py +131 -0
- package/runtime/decoders/seven_segment/__init__.py +24 -0
- package/runtime/decoders/seven_segment/pd.py +186 -0
- package/runtime/decoders/signature/__init__.py +25 -0
- package/runtime/decoders/signature/pd.py +142 -0
- package/runtime/decoders/sipi/__init__.py +30 -0
- package/runtime/decoders/sipi/pd.py +181 -0
- package/runtime/decoders/sle44xx/__init__.py +26 -0
- package/runtime/decoders/sle44xx/pd.py +541 -0
- package/runtime/decoders/smart_qspi/PORTING.md +22 -0
- package/runtime/decoders/smart_qspi/__init__.py +1 -0
- package/runtime/decoders/smart_qspi/pd.py +826 -0
- package/runtime/decoders/spdif/__init__.py +25 -0
- package/runtime/decoders/spdif/pd.py +295 -0
- package/runtime/decoders/spi/__init__.py +32 -0
- package/runtime/decoders/spi/pd.py +347 -0
- package/runtime/decoders/spiflash/__init__.py +30 -0
- package/runtime/decoders/spiflash/lists.py +178 -0
- package/runtime/decoders/spiflash/pd.py +537 -0
- package/runtime/decoders/ssi32/__init__.py +28 -0
- package/runtime/decoders/ssi32/pd.py +127 -0
- package/runtime/decoders/st25r39xx_spi/__init__.py +31 -0
- package/runtime/decoders/st25r39xx_spi/lists.py +231 -0
- package/runtime/decoders/st25r39xx_spi/pd.py +360 -0
- package/runtime/decoders/st7735/__init__.py +27 -0
- package/runtime/decoders/st7735/pd.py +173 -0
- package/runtime/decoders/stepper_motor/__init__.py +25 -0
- package/runtime/decoders/stepper_motor/pd.py +95 -0
- package/runtime/decoders/swd/__init__.py +34 -0
- package/runtime/decoders/swd/pd.py +350 -0
- package/runtime/decoders/swim/__init__.py +28 -0
- package/runtime/decoders/swim/pd.py +303 -0
- package/runtime/decoders/t55xx/__init__.py +25 -0
- package/runtime/decoders/t55xx/pd.py +326 -0
- package/runtime/decoders/tca6408a/__init__.py +25 -0
- package/runtime/decoders/tca6408a/pd.py +157 -0
- package/runtime/decoders/tdm_audio/__init__.py +25 -0
- package/runtime/decoders/tdm_audio/pd.py +116 -0
- package/runtime/decoders/timing/__init__.py +24 -0
- package/runtime/decoders/timing/pd.py +194 -0
- package/runtime/decoders/tlc5620/__init__.py +24 -0
- package/runtime/decoders/tlc5620/pd.py +212 -0
- package/runtime/decoders/uart/__init__.py +40 -0
- package/runtime/decoders/uart/pd.py +635 -0
- package/runtime/decoders/usb_packet/__init__.py +43 -0
- package/runtime/decoders/usb_packet/pd.py +401 -0
- package/runtime/decoders/usb_power_delivery/__init__.py +24 -0
- package/runtime/decoders/usb_power_delivery/pd.py +642 -0
- package/runtime/decoders/usb_request/__init__.py +49 -0
- package/runtime/decoders/usb_request/pd.py +386 -0
- package/runtime/decoders/usb_signalling/__init__.py +50 -0
- package/runtime/decoders/usb_signalling/pd.py +348 -0
- package/runtime/decoders/wiegand/__init__.py +28 -0
- package/runtime/decoders/wiegand/pd.py +148 -0
- package/runtime/decoders/x2444m/__init__.py +25 -0
- package/runtime/decoders/x2444m/pd.py +111 -0
- package/runtime/decoders/xfp/__init__.py +38 -0
- package/runtime/decoders/xfp/pd.py +486 -0
- package/runtime/decoders/xy2-100/__init__.py +28 -0
- package/runtime/decoders/xy2-100/pd.py +242 -0
- package/runtime/decoders/z80/__init__.py +36 -0
- package/runtime/decoders/z80/pd.py +358 -0
- package/runtime/decoders/z80/tables.py +1083 -0
- package/runtime/dslab.cmd +5 -0
- package/runtime/licenses/DreamSourceLab-res-MIT.txt +20 -0
- package/runtime/licenses/dslab-GPL-3.0.txt +674 -0
- package/runtime/licenses/logic-agent-MIT.txt +31 -0
- package/runtime/licenses/python-PSF.txt +645 -0
- package/runtime/licenses/sigrok-cli-GPL-3.0.txt +674 -0
- package/runtime/licenses/smart_qspi-PORTING.md +22 -0
- package/runtime/licenses/source/patches/dsview-v1.3.2-dslab.patch +124 -0
- package/runtime/logic-agent-mcp.cmd +9 -0
- package/runtime/logic-agent.cmd +9 -0
- package/runtime/python/LICENSE.txt +645 -0
- package/runtime/python/_asyncio.pyd +0 -0
- package/runtime/python/_bz2.pyd +0 -0
- package/runtime/python/_ctypes.pyd +0 -0
- package/runtime/python/_decimal.pyd +0 -0
- package/runtime/python/_elementtree.pyd +0 -0
- package/runtime/python/_hashlib.pyd +0 -0
- package/runtime/python/_lzma.pyd +0 -0
- package/runtime/python/_multiprocessing.pyd +0 -0
- package/runtime/python/_overlapped.pyd +0 -0
- package/runtime/python/_queue.pyd +0 -0
- package/runtime/python/_socket.pyd +0 -0
- package/runtime/python/_sqlite3.pyd +0 -0
- package/runtime/python/_ssl.pyd +0 -0
- package/runtime/python/_uuid.pyd +0 -0
- package/runtime/python/_wmi.pyd +0 -0
- package/runtime/python/_zoneinfo.pyd +0 -0
- package/runtime/python/libcrypto-3.dll +0 -0
- package/runtime/python/libffi-8.dll +0 -0
- package/runtime/python/libssl-3.dll +0 -0
- package/runtime/python/pyexpat.pyd +0 -0
- package/runtime/python/python.cat +0 -0
- package/runtime/python/python.exe +0 -0
- package/runtime/python/python3.dll +0 -0
- package/runtime/python/python313._pth +3 -0
- package/runtime/python/python313.dll +0 -0
- package/runtime/python/python313.zip +0 -0
- package/runtime/python/pythonw.exe +0 -0
- package/runtime/python/select.pyd +0 -0
- package/runtime/python/sqlite3.dll +0 -0
- package/runtime/python/unicodedata.pyd +0 -0
- package/runtime/python/vcruntime140.dll +0 -0
- package/runtime/python/vcruntime140_1.dll +0 -0
- package/runtime/python/winsound.pyd +0 -0
- package/runtime/scripts/deploy-check.ps1 +171 -0
- package/scripts/check.ps1 +14 -0
- package/scripts/firmware-recover.ps1 +27 -0
- package/scripts/install-driver.ps1 +30 -0
- package/scripts/self-test.ps1 +14 -0
- package/scripts/verify-files.py +39 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Root = (Split-Path -Parent $PSScriptRoot),
|
|
3
|
+
[switch]$SkipHardware,
|
|
4
|
+
[switch]$SkipMcp
|
|
5
|
+
)
|
|
6
|
+
$ErrorActionPreference = 'Stop'
|
|
7
|
+
$Root = [System.IO.Path]::GetFullPath($Root)
|
|
8
|
+
$bin = Join-Path $Root 'bin'
|
|
9
|
+
# The packaged layout puts dslab.exe in bin/; the source layout builds it under
|
|
10
|
+
# dslab/build/. Resolve either so the same self-check works for developers.
|
|
11
|
+
$exe = @(
|
|
12
|
+
(Join-Path $bin 'dslab.exe'),
|
|
13
|
+
(Join-Path $Root 'dslab\build\dslab.exe')
|
|
14
|
+
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
|
15
|
+
if (-not $exe) { $exe = Join-Path $bin 'dslab.exe' }
|
|
16
|
+
$python = @(
|
|
17
|
+
(Join-Path $Root 'python\python.exe'),
|
|
18
|
+
(Get-Command python -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source -First 1)
|
|
19
|
+
) | Where-Object { $_ -and (Test-Path -LiteralPath $_) } | Select-Object -First 1
|
|
20
|
+
$app = @(
|
|
21
|
+
(Join-Path $Root 'app'),
|
|
22
|
+
(Join-Path $Root '..')
|
|
23
|
+
) | Where-Object { Test-Path -LiteralPath (Join-Path $_ 'logic_agent\mcp_server.py') } | Select-Object -First 1
|
|
24
|
+
$checks = [ordered]@{}
|
|
25
|
+
|
|
26
|
+
function Add-Check([string]$Name, [bool]$Ok, [string]$Detail = '') {
|
|
27
|
+
$checks[$Name] = [pscustomobject]@{ ok = $Ok; detail = $Detail }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Add-Check 'dslab.exe' (Test-Path $exe) $exe
|
|
31
|
+
Add-Check 'runtime-dlls' ((Get-ChildItem (Split-Path -Parent $exe) -Filter '*.dll' | Measure-Object).Count -ge 6) 'expected glib/usb/zlib runtime'
|
|
32
|
+
Add-Check 'python' (Test-Path $python) "bundled=$python"
|
|
33
|
+
Add-Check 'app' ([bool]$app -and (Test-Path (Join-Path $app 'logic_agent\mcp_server.py'))) $app
|
|
34
|
+
$sigrok = Join-Path $bin 'sigrok-cli.exe'
|
|
35
|
+
$decoderDir = Join-Path $Root 'decoders'
|
|
36
|
+
Add-Check 'sigrok-cli' (Test-Path -LiteralPath $sigrok) $sigrok
|
|
37
|
+
Add-Check 'decoders' ((Test-Path (Join-Path $decoderDir 'i2c\pd.py')) -and (Test-Path (Join-Path $decoderDir 'i2s\pd.py')) -and (Test-Path (Join-Path $decoderDir 'spi\pd.py'))) $decoderDir
|
|
38
|
+
Add-Check 'smart_qspi' (Test-Path (Join-Path $decoderDir 'smart_qspi\pd.py')) (Join-Path $decoderDir 'smart_qspi')
|
|
39
|
+
$expanded = @('can', 'jtag', 'swd', 'onewire_link', 'ps2', 'mdio', 'ir_nec', 'spdif', 'usb_signalling', 'cjtag', 'sdcard_sd', 'spiflash', 'sdcard_spi', 'modbus', 'lin', 'onewire_network', 'jtag_stm32', 'jtag_ejtag')
|
|
40
|
+
$missingExpanded = @($expanded | Where-Object { -not (Test-Path -LiteralPath (Join-Path $decoderDir "$_\pd.py")) })
|
|
41
|
+
Add-Check 'expanded-decoders' ($missingExpanded.Count -eq 0) ($(if ($missingExpanded.Count) { 'missing: ' + ($missingExpanded -join ', ') } else { '18 direct/stacked decoders present' }))
|
|
42
|
+
|
|
43
|
+
$env:DSLAB_EXE = $exe
|
|
44
|
+
$env:DSLAB_RES_DIR = (Join-Path $bin 'res')
|
|
45
|
+
$env:PYTHONPATH = $app
|
|
46
|
+
$env:LOGIC_AGENT_DECODER_EXE = $sigrok
|
|
47
|
+
$env:SIGROKDECODE_DIR = $decoderDir
|
|
48
|
+
|
|
49
|
+
$doctor = & $exe doctor --json 2>&1 | Out-String
|
|
50
|
+
# Without a device doctor reports ok=false by design; still require the
|
|
51
|
+
# library and DSView resources to load so a broken bundle is caught.
|
|
52
|
+
$doctorOk = if ($SkipHardware) { $doctor -match '"lib_init":true' } else { $doctor -match '"ok":true' }
|
|
53
|
+
Add-Check 'doctor-json' $doctorOk $doctor.Trim()
|
|
54
|
+
|
|
55
|
+
if (-not $SkipHardware) {
|
|
56
|
+
$devices = & $exe devices --json 2>&1 | Out-String
|
|
57
|
+
Add-Check 'device-visible' ($devices -match 'DSLogic') $devices.Trim()
|
|
58
|
+
$capDir = Join-Path $Root 'runs\deploy-smoke'
|
|
59
|
+
$cap = & $exe capture once --channels D0 --rate 10k --samples 2000 --out $capDir --json 2>&1 | Out-String
|
|
60
|
+
Add-Check 'capture' ($cap -match '"ok":true' -and $cap -match '"sample_count":[1-9]') $cap.Trim()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (-not $SkipMcp) {
|
|
64
|
+
$request = '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}'
|
|
65
|
+
$reply = $request | & $python -m logic_agent.mcp_server 2>&1 | Out-String
|
|
66
|
+
Add-Check 'mcp-initialize' ($reply -match 'logic-agent') $reply.Trim()
|
|
67
|
+
|
|
68
|
+
$capabilityRequest = '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"capabilities","arguments":{}}}'
|
|
69
|
+
$requests = Join-Path $Root 'runs\deploy-smoke\mcp-requests.jsonl'
|
|
70
|
+
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $requests) | Out-Null
|
|
71
|
+
Set-Content -Encoding ascii -LiteralPath $requests @($request, $capabilityRequest)
|
|
72
|
+
$capabilityOut = Join-Path $Root 'runs\deploy-smoke\mcp-reply.jsonl'
|
|
73
|
+
cmd /c "`"$python`" -m logic_agent.mcp_server < `"$requests`" > `"$capabilityOut`" 2>&1"
|
|
74
|
+
$capabilityReply = if (Test-Path -LiteralPath $capabilityOut) { Get-Content -LiteralPath $capabilityOut -Raw } else { '' }
|
|
75
|
+
$protocolCount = 0
|
|
76
|
+
try {
|
|
77
|
+
$messages = @(Get-Content -LiteralPath $capabilityOut -ErrorAction Stop | ForEach-Object {
|
|
78
|
+
if ($_.Trim()) { $_ | ConvertFrom-Json }
|
|
79
|
+
})
|
|
80
|
+
$capability = $messages | Where-Object {
|
|
81
|
+
$_.id -eq 2 -and $_.result.structuredContent.protocol_decoding.supported_protocols
|
|
82
|
+
} | Select-Object -First 1
|
|
83
|
+
if ($capability) {
|
|
84
|
+
$protocolCount = @($capability.result.structuredContent.protocol_decoding.supported_protocols).Count
|
|
85
|
+
}
|
|
86
|
+
} catch {
|
|
87
|
+
$protocolCount = 0
|
|
88
|
+
}
|
|
89
|
+
Add-Check 'mcp-capabilities-22-protocols' ($protocolCount -eq 22) "count=$protocolCount"
|
|
90
|
+
|
|
91
|
+
# One-command client setup. Runs against a throwaway home so the real user
|
|
92
|
+
# config is never touched, then proves the launch spec is self-contained:
|
|
93
|
+
# no cmd.exe, no DSLAB_* env, absolute paths only.
|
|
94
|
+
$fakeHome = Join-Path $Root 'runs\mcp-install-home'
|
|
95
|
+
foreach ($dir in '.codex', '.kiro', '.dsh\profiles\desktop') {
|
|
96
|
+
New-Item -ItemType Directory -Force -Path (Join-Path $fakeHome $dir) | Out-Null
|
|
97
|
+
}
|
|
98
|
+
$setupText = & $python -m logic_agent.cli mcp-install --home $fakeHome --no-verify --json 2>&1 | Out-String
|
|
99
|
+
$setup = $null
|
|
100
|
+
try { $setup = $setupText | ConvertFrom-Json } catch { $setup = $null }
|
|
101
|
+
$codexConfig = Join-Path $fakeHome '.codex\config.toml'
|
|
102
|
+
$kiroConfig = Join-Path $fakeHome '.kiro\settings\mcp.json'
|
|
103
|
+
$dshConfig = Join-Path $fakeHome '.dsh\profiles\desktop\cordis.patch.yml'
|
|
104
|
+
$kiroEntry = $null
|
|
105
|
+
if (Test-Path -LiteralPath $kiroConfig) {
|
|
106
|
+
$kiroEntry = (Get-Content -LiteralPath $kiroConfig -Raw | ConvertFrom-Json).mcpServers.'logic-analyzer'
|
|
107
|
+
}
|
|
108
|
+
$launchOk = $false
|
|
109
|
+
if ($setup) {
|
|
110
|
+
$command = [string]$setup.launch.command
|
|
111
|
+
$launchOk = (Test-Path -LiteralPath $command) -and
|
|
112
|
+
($command -like '*python*.exe') -and
|
|
113
|
+
(@($setup.launch.args) -contains 'logic_agent.mcp_server') -and
|
|
114
|
+
(@($setup.launch.args) -contains '--data-dir')
|
|
115
|
+
}
|
|
116
|
+
$entryOk = $null -ne $kiroEntry -and $kiroEntry.command -eq $setup.launch.command -and
|
|
117
|
+
(@($kiroEntry.args) -contains 'logic_agent.mcp_server')
|
|
118
|
+
# DeepSeek Harness: the YAML patch layer must carry our marked entry and keep
|
|
119
|
+
# a valid top-level list (no YAML parser in the bundle, so check the shape).
|
|
120
|
+
$dshOk = $false
|
|
121
|
+
if (Test-Path -LiteralPath $dshConfig) {
|
|
122
|
+
$dsh = Get-Content -LiteralPath $dshConfig -Raw
|
|
123
|
+
$dshOk = $dsh -match 'id: mcp-logic-agent' -and
|
|
124
|
+
$dsh -match '@deepseek-ai/dsh-mcp-client' -and
|
|
125
|
+
$dsh -match 'serverName: logic' -and
|
|
126
|
+
$dsh -match '(?m)^- insert:' -and
|
|
127
|
+
([regex]::Matches($dsh, '>>> logic-agent').Count -eq 1)
|
|
128
|
+
}
|
|
129
|
+
Add-Check 'mcp-install' ([bool]$setup -and $setup.ok -and $launchOk -and $entryOk -and $dshOk -and (Test-Path -LiteralPath $codexConfig)) $setupText.Trim()
|
|
130
|
+
Remove-Item -LiteralPath $fakeHome -Recurse -Force -ErrorAction SilentlyContinue
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (Test-Path -LiteralPath $sigrok) {
|
|
134
|
+
$decoderList = & $sigrok -L 2>&1 | Out-String
|
|
135
|
+
Add-Check 'decoder-runtime' ($decoderList -match 'smart_qspi' -and $decoderList -match 'i2c' -and $decoderList -match 'can' -and $decoderList -match 'spiflash' -and $decoderList -match 'modbus') 'sigrok-cli -L'
|
|
136
|
+
|
|
137
|
+
# Offline decoder smoke test: no hardware and no external dependencies.
|
|
138
|
+
# Build a tiny I2C transaction by hand and require a deterministic ACK.
|
|
139
|
+
$probeDir = Join-Path $Root 'runs\decode-smoke'
|
|
140
|
+
New-Item -ItemType Directory -Force -Path $probeDir | Out-Null
|
|
141
|
+
$probe = Join-Path $probeDir 'i2c-probe.bin'
|
|
142
|
+
$sc = New-Object System.Collections.Generic.List[byte]
|
|
143
|
+
$sd = New-Object System.Collections.Generic.List[byte]
|
|
144
|
+
for ($i = 0; $i -lt 4; $i++) { $sc.Add(1); $sd.Add(1) }
|
|
145
|
+
$sc.Add(1); $sc.Add(1); $sd.Add(1); $sd.Add(0)
|
|
146
|
+
foreach ($value in @(0xA0, 0x4B)) {
|
|
147
|
+
for ($bit = 7; $bit -ge 0; $bit--) {
|
|
148
|
+
$v = if ((($value -shr $bit) -band 1) -ne 0) { 1 } else { 0 }
|
|
149
|
+
$sd.Add($v); $sd.Add($v); $sd.Add($v)
|
|
150
|
+
$sc.Add(0); $sc.Add(1); $sc.Add(0)
|
|
151
|
+
}
|
|
152
|
+
$sd.Add(0); $sd.Add(0); $sd.Add(0)
|
|
153
|
+
$sc.Add(0); $sc.Add(1); $sc.Add(0)
|
|
154
|
+
}
|
|
155
|
+
$sd.Add(0); $sd.Add(1); $sc.Add(1); $sc.Add(1)
|
|
156
|
+
for ($i = 0; $i -lt 4; $i++) { $sc.Add(1); $sd.Add(1) }
|
|
157
|
+
$bytes = New-Object byte[] $sc.Count
|
|
158
|
+
for ($i = 0; $i -lt $sc.Count; $i++) { $bytes[$i] = [byte](($sc[$i] -band 1) -bor (($sd[$i] -band 1) -shl 1)) }
|
|
159
|
+
[System.IO.File]::WriteAllBytes($probe, $bytes)
|
|
160
|
+
$decoded = & $sigrok -i $probe -I 'binary:numchannels=2:samplerate=1000000' -P 'i2c:scl=0:sda=1' -A i2c --protocol-decoder-ann-class 2>&1 | Out-String
|
|
161
|
+
Add-Check 'i2c-offline-decode' ($decoded -match 'Address write: 50' -and $decoded -match 'Data write: 4B' -and $decoded -match 'ACK') $decoded.Trim()
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
$failed = @($checks.GetEnumerator() | Where-Object { -not $_.Value.ok })
|
|
165
|
+
$result = [pscustomobject]@{
|
|
166
|
+
ok = ($failed.Count -eq 0)
|
|
167
|
+
root = $Root
|
|
168
|
+
checks = $checks
|
|
169
|
+
}
|
|
170
|
+
$result | ConvertTo-Json -Depth 6
|
|
171
|
+
if ($failed.Count -gt 0) { exit 1 }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Root = (Split-Path -Parent $PSScriptRoot),
|
|
3
|
+
[switch]$SkipHardware,
|
|
4
|
+
[switch]$SkipMcp
|
|
5
|
+
)
|
|
6
|
+
$ErrorActionPreference = 'Stop'
|
|
7
|
+
$Root = [System.IO.Path]::GetFullPath($Root)
|
|
8
|
+
$runtime = Join-Path $Root 'runtime'
|
|
9
|
+
$deploy = Join-Path $runtime 'scripts\deploy-check.ps1'
|
|
10
|
+
if (-not (Test-Path -LiteralPath $deploy)) { throw "runtime not found: $deploy" }
|
|
11
|
+
$env:DSLAB_FIRMWARE = Join-Path $Root 'firmware\DSLogicPlus.fw'
|
|
12
|
+
& $deploy -Root $runtime -SkipHardware:$SkipHardware -SkipMcp:$SkipMcp
|
|
13
|
+
exit $LASTEXITCODE
|
|
14
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Root = (Split-Path -Parent $PSScriptRoot)
|
|
3
|
+
)
|
|
4
|
+
$ErrorActionPreference = 'Stop'
|
|
5
|
+
$Root = [System.IO.Path]::GetFullPath($Root)
|
|
6
|
+
$dslab = Join-Path $Root 'runtime\bin\dslab.exe'
|
|
7
|
+
$fw = Join-Path $Root 'firmware\DSLogicPlus.fw'
|
|
8
|
+
$env:DSLAB_RES_DIR = Join-Path $Root 'runtime\bin\res'
|
|
9
|
+
$env:DSLAB_FIRMWARE = $fw
|
|
10
|
+
if (-not (Test-Path -LiteralPath $dslab)) { throw "missing dslab.exe: $dslab" }
|
|
11
|
+
if (-not (Test-Path -LiteralPath $fw)) { throw "missing firmware: $fw" }
|
|
12
|
+
Write-Host 'Firmware recovery is only for a DSLogic Plus that enumerates as USB 2A0E:0001.' -ForegroundColor Yellow
|
|
13
|
+
$statusText = (& $dslab firmware status --json 2>&1 | Out-String).Trim()
|
|
14
|
+
Write-Host $statusText
|
|
15
|
+
if ($statusText -match '"plus_present":true') {
|
|
16
|
+
Write-Host 'DSLogic Plus is already running normally; no firmware write is needed.' -ForegroundColor Green
|
|
17
|
+
exit 0
|
|
18
|
+
}
|
|
19
|
+
if ($statusText -notmatch '"bootloader_present":true') {
|
|
20
|
+
throw 'No DSLogic Plus or FX3 bootloader found. Check the cable, USB port and driver first.'
|
|
21
|
+
}
|
|
22
|
+
Write-Host ''
|
|
23
|
+
Write-Host 'The device is in bootloader mode. A firmware write is destructive; this tool will NOT do it automatically.' -ForegroundColor Yellow
|
|
24
|
+
Write-Host 'Run this command yourself after reviewing docs\FIRMWARE.md:' -ForegroundColor Cyan
|
|
25
|
+
Write-Host (" `"{0}`" firmware install --file `"{1}`" --pid 0020 --json" -f $dslab, $fw)
|
|
26
|
+
Write-Host 'If uploaded=true but reenumerated=false, unplug and replug USB, then run FIRMWARE-STATUS.cmd.' -ForegroundColor Cyan
|
|
27
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Root = (Split-Path -Parent $PSScriptRoot),
|
|
3
|
+
[switch]$OpenZadig
|
|
4
|
+
)
|
|
5
|
+
$ErrorActionPreference = 'Stop'
|
|
6
|
+
$Root = [System.IO.Path]::GetFullPath($Root)
|
|
7
|
+
$driverDir = Join-Path $Root 'driver\DSView-Drivers'
|
|
8
|
+
$dpinst = Join-Path $driverDir 'dpinst-amd64.exe'
|
|
9
|
+
$zadig = Join-Path $Root 'driver\zadig.exe'
|
|
10
|
+
Write-Host 'Installs WinUSB for DreamSourceLab USB VID_2A0E devices.' -ForegroundColor Cyan
|
|
11
|
+
Write-Host 'Close DSView and unplug other capture software first.' -ForegroundColor Yellow
|
|
12
|
+
|
|
13
|
+
# Public bundles ship only Zadig; the DreamSourceLab driver package is
|
|
14
|
+
# included only in bundles built on a machine with DSView installed.
|
|
15
|
+
if (-not $OpenZadig -and -not (Test-Path -LiteralPath $dpinst)) {
|
|
16
|
+
Write-Host 'DreamSourceLab driver package is not bundled; using Zadig instead.' -ForegroundColor Yellow
|
|
17
|
+
$OpenZadig = $true
|
|
18
|
+
}
|
|
19
|
+
if ($OpenZadig) {
|
|
20
|
+
if (-not (Test-Path -LiteralPath $zadig)) {
|
|
21
|
+
throw "Zadig not found: $zadig. Install DSView (it installs the driver) or download Zadig from https://zadig.akeo.ie/"
|
|
22
|
+
}
|
|
23
|
+
Start-Process -FilePath $zadig
|
|
24
|
+
Write-Host 'In Zadig: Options > List All Devices, select the DSLogic device (USB ID 2A0E 0020),' -ForegroundColor Cyan
|
|
25
|
+
Write-Host 'choose WinUSB and click Install Driver. Do not select unrelated USB devices.' -ForegroundColor Cyan
|
|
26
|
+
exit 0
|
|
27
|
+
}
|
|
28
|
+
$p = Start-Process -FilePath $dpinst -ArgumentList @('/S', '/SE') -Verb RunAs -Wait -PassThru
|
|
29
|
+
if ($p.ExitCode -ne 0) { throw "driver installer exited with $($p.ExitCode); retry with -OpenZadig" }
|
|
30
|
+
Write-Host 'Driver installer completed. Run CHECK.cmd.' -ForegroundColor Green
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[string]$Root = (Split-Path -Parent $PSScriptRoot)
|
|
3
|
+
)
|
|
4
|
+
$ErrorActionPreference = 'Stop'
|
|
5
|
+
$Root = [System.IO.Path]::GetFullPath($Root)
|
|
6
|
+
$runtime = Join-Path $Root 'runtime'
|
|
7
|
+
$dslab = Join-Path $runtime 'bin\dslab.exe'
|
|
8
|
+
if (-not (Test-Path -LiteralPath $dslab)) { throw "missing dslab.exe: $dslab" }
|
|
9
|
+
$out = Join-Path $Root 'data\selftest'
|
|
10
|
+
$env:DSLAB_RES_DIR = Join-Path $runtime 'bin\res'
|
|
11
|
+
$env:DSLAB_FIRMWARE = Join-Path $Root 'firmware\DSLogicPlus.fw'
|
|
12
|
+
& $dslab capture once --channels D0 --operation internal --samples 4096 --out $out --json
|
|
13
|
+
if ($LASTEXITCODE -ne 0) { throw "internal self-test failed with exit code $LASTEXITCODE" }
|
|
14
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main() -> int:
|
|
9
|
+
root = Path(sys.argv[1]).resolve() if len(sys.argv) > 1 else Path(__file__).resolve().parent.parent
|
|
10
|
+
manifest = root / "checksums.sha256"
|
|
11
|
+
if not manifest.is_file():
|
|
12
|
+
print(f"missing manifest: {manifest}", file=sys.stderr)
|
|
13
|
+
return 1
|
|
14
|
+
failed = 0
|
|
15
|
+
checked = 0
|
|
16
|
+
for line in manifest.read_text(encoding="ascii").splitlines():
|
|
17
|
+
line = line.strip()
|
|
18
|
+
if not line:
|
|
19
|
+
continue
|
|
20
|
+
expected, relative = line.split(" ", 1)
|
|
21
|
+
path = root / relative
|
|
22
|
+
if not path.is_file():
|
|
23
|
+
print(f"MISSING {relative}")
|
|
24
|
+
failed += 1
|
|
25
|
+
continue
|
|
26
|
+
digest = hashlib.sha256(path.read_bytes()).hexdigest()
|
|
27
|
+
checked += 1
|
|
28
|
+
if digest != expected.lower():
|
|
29
|
+
print(f"MISMATCH {relative}")
|
|
30
|
+
failed += 1
|
|
31
|
+
if failed:
|
|
32
|
+
print(f"{failed} file(s) failed; checked {checked}")
|
|
33
|
+
return 1
|
|
34
|
+
print(f"All {checked} files verified.")
|
|
35
|
+
return 0
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
raise SystemExit(main())
|