WinDriver/.claude/settings.local.json
2026-02-21 18:01:54 -06:00

106 lines
10 KiB
JSON

{
"permissions": {
"allow": [
"Bash(wc:*)",
"WebSearch",
"WebFetch(domain:wuffs.org)",
"WebFetch(domain:www.os2museum.com)",
"WebFetch(domain:github.com)",
"WebFetch(domain:betawiki.net)",
"WebFetch(domain:raw.githubusercontent.com)",
"Bash(curl:*)",
"WebFetch(domain:techshelps.github.io)",
"WebFetch(domain:fragglet.github.io)",
"WebFetch(domain:dos-help.soulsphere.org)",
"WebFetch(domain:library.thedatadungeon.com)",
"Bash(dpkg:*)",
"Bash(apt list:*)",
"Bash(snap list:*)",
"Bash(flatpak list:*)",
"Bash(apt-cache search:*)",
"WebFetch(domain:packages.debian.org)",
"WebFetch(domain:sourceforge.net)",
"Bash(flatpak --version:*)",
"Bash(flatpak remotes:*)",
"Bash(flatpak remote-add:*)",
"Bash(flatpak search:*)",
"Bash(~/djgpp/bin/i586-pc-msdosdjgpp-gcc:*)",
"Bash(~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-gcc:*)",
"Bash(flatpak install:*)",
"Bash(make:*)",
"Bash(ldd:*)",
"Bash(~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-gcc-ar:*)",
"Bash(apt-get download:*)",
"Bash(dpkg-deb -x:*)",
"Bash(LD_LIBRARY_PATH=/tmp/libfl2-extract/usr/lib/x86_64-linux-gnu ~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-ar:*)",
"Bash(unzip:*)",
"WebFetch(domain:archive.org)",
"WebFetch(domain:theretroweb.com)",
"WebFetch(domain:files.mpoli.fi)",
"WebFetch(domain:www.dosdays.co.uk)",
"Bash(xxd:*)",
"Bash(chmod:*)",
"Bash(pip3 install:*)",
"Bash(objdump:*)",
"Bash(find:*)",
"Bash(ls:*)",
"Bash(~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-objdump:*)",
"Bash(~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-nm:*)",
"Bash(LD_LIBRARY_PATH=/home/scott/claude/windriver/tools/lib /home/scott/djgpp/djgpp/bin/i586-pc-msdosdjgpp-objdump:*)",
"Bash(LD_LIBRARY_PATH=/home/scott/claude/windriver/tools/lib /home/scott/djgpp/djgpp/bin/i586-pc-msdosdjgpp-nm:*)",
"Bash(LD_LIBRARY_PATH=tools/lib ~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-objdump:*)",
"Bash(ndisasm:*)",
"Bash(flatpak run:*)",
"Bash(pkill:*)",
"Bash(/tmp/analyze_patterns.py:*)",
"Bash(/tmp/analyze_patterns2.py:*)",
"Bash(/tmp/analyze_patterns3.py:*)",
"Bash(/tmp/analyze_patterns4.py:*)",
"Bash(/tmp/analyze_patterns5.py:*)",
"Bash(/tmp/final_analysis.py:*)",
"Bash(/tmp/detailed_decode.py << 'EOF'\n#!/usr/bin/env python3\nimport re\n\n# Read the ERROR.LOG\nwith open\\('/home/scott/claude/windriver/bin/ERROR.LOG', 'r'\\) as f:\n lines = f.readlines\\(\\)\n\n# Extract hex dumps from DIAG lines\ndiag_lines = {}\nfor line in lines:\n if 'windrv: DIAG seg5' in line:\n match = re.match\\(r'.*windrv: DIAG seg5 \\([0-9A-F]+\\):\\\\s*\\(.*\\)', line\\)\n if match:\n offset = match.group\\(1\\)\n hex_str = match.group\\(2\\).strip\\(\\)\n diag_lines[offset] = hex_str\n\n# Build full hex dump\nhex_dump = {}\nfor offset_str, hex_str in sorted\\(diag_lines.items\\(\\)\\):\n offset = int\\(offset_str, 16\\)\n bytes_list = [int\\(b, 16\\) for b in hex_str.split\\(\\)]\n for i, byte_val in enumerate\\(bytes_list\\):\n hex_dump[offset + i] = byte_val\n\ndef format_byte\\(offset\\):\n b = hex_dump.get\\(offset\\)\n return f\"{b:02X}\" if b is not None else \"??\"\n\ndef show_instructions\\(start, end\\):\n \"\"\"Show hex bytes with manual instruction decode\"\"\"\n offset = start\n while offset < end:\n b1 = hex_dump.get\\(offset\\)\n if b1 is None:\n break\n \n # Get instruction mnemonic\n b2 = hex_dump.get\\(offset + 1\\)\n b3 = hex_dump.get\\(offset + 2\\)\n \n instr_len = 1\n mnemonic = None\n \n # Decode some common instructions\n if b1 == 0x8B and b2 is not None and b3 is not None: # MOV reg, r/m\n mod_rm = b2\n mod = \\(mod_rm >> 6\\) & 3\n reg = \\(mod_rm >> 3\\) & 7\n rm = mod_rm & 7\n regs = ['AX', 'CX', 'DX', 'BX', 'SP', 'BP', 'SI', 'DI']\n rm_names = ['BX+SI', 'BX+DI', 'BP+SI', 'BP+DI', 'SI', 'DI', 'BP', 'BX']\n \n if mod == 0:\n if rm == 6:\n disp16 = b3 | \\(hex_dump.get\\(offset + 3, 0\\) << 8\\)\n mnemonic = f\"MOV {regs[reg]}, [0x{disp16:04X}]\"\n instr_len = 4\n else:\n mnemonic = f\"MOV {regs[reg]}, [{rm_names[rm]}]\"\n instr_len = 2\n elif mod == 1: # disp8\n disp = b3 if b3 < 128 else b3 - 256\n mnemonic = f\"MOV {regs[reg]}, [{rm_names[rm]}+{disp:+d}]\"\n instr_len = 3\n elif mod == 2: # disp16\n disp16 = b3 | \\(hex_dump.get\\(offset + 3, 0\\) << 8\\)\n mnemonic = f\"MOV {regs[reg]}, [{rm_names[rm]}+0x{disp16:04X}]\"\n instr_len = 4\n elif mod == 3: # register\n mnemonic = f\"MOV {regs[reg]}, {regs[rm]}\"\n instr_len = 2\n \n elif b1 == 0xC7 and b2 is not None and b3 is not None: # MOV r/m, imm16\n mod_rm = b2\n mod = \\(mod_rm >> 6\\) & 3\n rm = mod_rm & 7\n rm_names = ['BX+SI', 'BX+DI', 'BP+SI', 'BP+DI', 'SI', 'DI', 'BP', 'BX']\n \n if mod == 1: # [bp+disp8], imm16\n disp = b3 if b3 < 128 else b3 - 256\n imm_l = hex_dump.get\\(offset + 3\\)\n imm_h = hex_dump.get\\(offset + 4\\)\n imm = \\(imm_l if imm_l else 0\\) | \\(\\(imm_h if imm_h else 0\\) << 8\\)\n mnemonic = f\"MOV [BP+{disp:+d}], 0x{imm:04X}\"\n instr_len = 5\n \n elif b1 == 0xC4 and b2 is not None and b3 is not None: # LES\n mod_rm = b2\n reg = \\(mod_rm >> 3\\) & 7\n rm = mod_rm & 7\n regs = ['AX', 'CX', 'DX', 'BX', 'SP', 'BP', 'SI', 'DI']\n rm_names = ['BX+SI', 'BX+DI', 'BP+SI', 'BP+DI', 'SI', 'DI', 'BP', 'BX']\n mod = \\(mod_rm >> 6\\) & 3\n \n if mod == 1:\n disp = b3 if b3 < 128 else b3 - 256\n mnemonic = f\"LES {regs[reg]}, [{rm_names[rm]}+{disp:+d}]\"\n instr_len = 3\n \n elif b1 == 0xF3 and b2 == 0xA5: # REP MOVSW\n mnemonic = \"REP MOVSW\"\n instr_len = 2\n \n elif b1 == 0xF3 and b2 == 0xA4: # REP MOVSB\n mnemonic = \"REP MOVSB\"\n instr_len = 2\n \n if mnemonic:\n hex_str = ' '.join\\(format_byte\\(offset + i\\) for i in range\\(instr_len\\)\\)\n print\\(f\"0x{offset:04X}: {hex_str:20s} {mnemonic}\"\\)\n offset += instr_len\n else:\n hex_str = format_byte\\(offset\\)\n print\\(f\"0x{offset:04X}: {hex_str:20s} \\(unknown\\)\"\\)\n offset += 1\n\nprint\\(\"=\" * 80\\)\nprint\\(\"INSTRUCTION DECODE - KEY REGIONS FOR lpData ACCESS\"\\)\nprint\\(\"=\" * 80\\)\nprint\\(\\)\n\nprint\\(\"REGION 1: REP MOVSW \\(0x02C0-0x02E0\\) - GDIINFO copy\"\\)\nprint\\(\"-\" * 80\\)\nshow_instructions\\(0x02C0, 0x02E0\\)\n\nprint\\(\\)\nprint\\(\"REGION 2: [BP+12] access at 0x0A65 and 0x0A83\"\\)\nprint\\(\"-\" * 80\\)\nshow_instructions\\(0x0A60, 0x0AA0\\)\n\nprint\\(\\)\nprint\\(\"=\" * 80\\)\nprint\\(\"COMPLETE [BP+offset] REFERENCES\"\\)\nprint\\(\"=\" * 80\\)\nprint\\(\\)\n\n# Comprehensive search for all [BP+offset] patterns\nbp_refs = {}\nfor offset in sorted\\(hex_dump.keys\\(\\)\\):\n if offset + 2 <= max\\(hex_dump.keys\\(\\)\\):\n b1 = hex_dump.get\\(offset\\)\n b2 = hex_dump.get\\(offset + 1\\)\n b3 = hex_dump.get\\(offset + 2\\)\n \n if b1 is None or b2 is None or b3 is None:\n continue\n \n # Look for ModRM patterns with mode=01, r/m=101 \\(which is [BP+disp8]\\)\n if \\(b2 & 0xC7\\) == 0x45:\n disp = b3 if b3 < 128 else b3 - 256\n if disp not in bp_refs:\n bp_refs[disp] = []\n bp_refs[disp].append\\(\\(offset, b1\\)\\)\n\n# Show summary\nfor disp in sorted\\(bp_refs.keys\\(\\)\\):\n refs = bp_refs[disp]\n print\\(f\"\\\\n[BP{disp:+d}]:\"\\)\n for offset, b1 in refs:\n print\\(f\" 0x{offset:04X}: {b1:02X}\"\\)\n if disp == 6:\n print\\(f\" <- style parameter \\(WORD\\)\"\\)\n elif disp == 12:\n print\\(f\" <- lpGDIInfo output buffer \\(FAR POINTER\\)\"\\)\n\nEOF)",
"Bash(timeout 120 bash:*)",
"Bash(timeout 60 bash:*)",
"Bash(timeout:*)",
"Bash(LD_LIBRARY_PATH=tools/lib ~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-gcc:*)",
"Bash(pgrep:*)",
"Bash(xargs kill:*)",
"Bash(tail -3 ls -la /tmp/dosbox_caps/screenshot.*)",
"Bash(kill:*)",
"Bash(DISPLAY=:0 ffmpeg:*)",
"Bash(DISPLAY=:0 flatpak run:*)",
"Bash(ffmpeg:*)",
"Bash(sort:*)",
"Bash(wget:*)",
"WebFetch(domain:winworldpc.com)",
"WebFetch(domain:www.networkdls.com)",
"Bash(git clone:*)",
"Bash(gh release list:*)",
"WebFetch(domain:api.github.com)",
"WebFetch(domain:pdos.csail.mit.edu)",
"WebFetch(domain:stanislavs.org)",
"WebFetch(domain:en.wikipedia.org)",
"WebFetch(domain:www.thejat.in)",
"WebFetch(domain:wiki.osdev.org)",
"WebFetch(domain:osdev.miraheze.org)",
"WebFetch(domain:mirror.math.princeton.edu)",
"WebFetch(domain:fd.lod.bz)",
"WebFetch(domain:www.delorie.com)",
"WebFetch(domain:helppc.netcore2k.net)",
"WebFetch(domain:grokipedia.com)",
"Bash(head -10 echo \"=== -O2 -fno-gcse \\(working\\) ===\")",
"Bash(/tmp/count_callbacks.txt:*)",
"Bash(/tmp/full_mapping.txt:*)",
"Bash(/tmp/callback_analysis.txt:*)",
"WebFetch(domain:www.bitsavers.org)",
"Bash(~/djgpp/djgpp/bin/i586-pc-msdosdjgpp-size:*)",
"WebFetch(domain:dosbox-x.com)",
"WebFetch(domain:www.vogons.org)",
"Bash(# Check for any Win3x driver files in the broader eXo tree find \"\"/mnt/storage/mnt/pve/cephfs/emulation/ugly/Scanned/eXo/eXoWin3x/\"\" -iname \"\"*.drv\"\" -o -iname \"\"*.dr_\"\")",
"Bash(msexpand:*)",
"Bash(import -window root /tmp/dosbox_video/et4000_demo.png)",
"Bash(git lfs:*)",
"Bash(while read f)"
]
}
}