VLX Compilation & Verification Guide¶
How to compile AutoLISP source files to VLX and verify against the original ConstructiVision binaries.
Note
Why Compile Instead of Decompile?
Unlike InstallShield (which has isDcc), there is no free, open-source VLX/FAS decompiler. The Visual LISP bytecode format is proprietary and protected. However, since we have the original LSP source files, we can:
Compile source → FAS → VLX
Compare against original VLX
Verify the VLX contains what we expect
Prerequisites¶
Component |
Version |
Purpose |
|---|---|---|
AutoCAD |
2000 (R15) or later |
Visual LISP compiler |
Source Files |
|
Original LISP source |
Original VLX |
|
Binary to verify against |
AutoCAD 2000 Notes:
Includes Visual LISP IDE (VLIDE)
Compiler produces FAS files compatible with R15+ format
Original ConstructiVision v3.60 was compiled with this version
Compilation Methods¶
Method 1: Visual LISP IDE (GUI)¶
Best for first-time setup and understanding the process.
1. Open AutoCAD 2000
2. Command: VLIDE
(Opens Visual LISP IDE)
3. File → Make Application → New Application Wizard
4. Wizard Steps:
a. Application Name: CSV
b. Application Location: Choose output folder
c. Application Options:
- ☑ Separate Namespace (isolates from global LISP)
- ☑ ActiveX Support (if using COM/ActiveX)
- ☑ Protected (encrypts bytecode)
d. LISP Files to Include: Add all *.lsp files
e. Resource Files: Add *.dcl dialog files
f. Build
5. Output: CSV.VLX
Method 2: Command Line Compilation (Single File)¶
Compile individual LSP files to FAS for testing.
;; In AutoCAD command line or VLIDE Console
;; Compile single file to FAS
(vlisp-compile 'st "C:/Users/chadw/Constructivision/src/x86/v3_60/v3.60/panel.lsp")
;; Output: panel.fas in same directory
;; Compilation modes:
;; 'st = Standard (smallest, optimized)
;; 'lsm = List assembly (debugging)
;; 'lsa = List assembly with source
Method 3: Batch Compile All LSP Files¶
Compile all LSP files in a directory to FAS.
;; Save this as compile-all.lsp and load it
(defun c:COMPILE-ALL ( / lsp-dir files f)
(setq lsp-dir "C:/Users/chadw/Constructivision/src/x86/v3_60/v3.60/")
(setq files (vl-directory-files lsp-dir "*.lsp" 1))
(foreach f files
(princ (strcat "\nCompiling: " f "..."))
(vl-file-compile (strcat lsp-dir f))
(princ " Done.")
)
(princ (strcat "\n\nCompiled " (itoa (length files)) " files."))
(princ)
)
;; Run with: COMPILE-ALL
Method 4: PRV Project File¶
For repeatable builds, create a project file.
Create csv.prv:
;; ConstructiVision Project File
;; AutoCAD 2000 Visual LISP
:application CSV
:output-dir "C:/Users/chadw/Constructivision/build/vlx/"
:fas-files (
"csv"
"enable"
"setvars"
"panel"
"drawpan"
;; ... list all 109 modules
)
:dcl-files (
"wall_dlg"
"panel_dlg"
;; ... list all DCL files
)
:options (
:protected T
:separate-namespace T
:active-x T
)
Build from PRV:
(vl-load-project "C:/Users/chadw/Constructivision/src/x86/v3_60/csv.prv")
(vl-make-app)
Verification Methods¶
Hash Comparison (Simple but Limited)¶
# Hash original VLX
Get-FileHash "src\x86\v3_60\v3.60\Csv.VLX" -Algorithm SHA256
# Hash newly compiled VLX
Get-FileHash "build\vlx\Csv.VLX" -Algorithm SHA256
⚠ WARNING: Hashes will likely NOT match because:
Timestamps embedded in FAS bytecode
Compiler version differences
Protection key variations
Build order differences
Hash matching is useful for detecting changes between your own builds, not for verifying against the original.
Function-Level Comparison (Recommended)¶
Compare the functions defined by each VLX.
Step 1: Capture Original VLX Functions
;; In AutoCAD with NO other LISP loaded
;; Get baseline atoms
(setq baseline-atoms (atoms-family 1))
;; Load original VLX
(load "C:/Users/chadw/Constructivision/src/x86/v3_60/v3.60/Csv.VLX")
;; Get new atoms (functions added by VLX)
(setq vlx-atoms (vl-remove-if
'(lambda (x) (member x baseline-atoms))
(atoms-family 1)))
;; Write to file
(setq fp (open "C:/temp/original-vlx-functions.txt" "w"))
(foreach a (vl-sort vlx-atoms '<)
(write-line (vl-princ-to-string a) fp))
(close fp)
Step 2: Capture Compiled VLX Functions
;; Restart AutoCAD fresh, repeat above with your compiled VLX
;; Save to compiled-vlx-functions.txt
Step 3: Compare Lists
# Compare function lists
Compare-Object `
(Get-Content "C:\temp\original-vlx-functions.txt") `
(Get-Content "C:\temp\compiled-vlx-functions.txt")
# Should show no differences if source is complete
Size Comparison¶
Rough sanity check - compiled VLX should be similar size.
# Original
(Get-Item "src\x86\v3_60\v3.60\Csv.VLX").Length
# 1,103,600 bytes
# Compiled
(Get-Item "build\vlx\Csv.VLX").Length
# Should be within ~10% of original
Behavioral Testing¶
Load both VLX files and test identical functionality.
;; Test 1: Load original, run commands, note behavior
(load "Csv.VLX")
(c:CSV) ;; Main entry point
(c:PANEL) ;; Panel command
;; Document results
;; Test 2: Restart AutoCAD, load compiled, compare
(load "Csv_compiled.VLX")
(c:CSV)
(c:PANEL)
;; Should behave identically
Source File Inventory¶
What We Have¶
# Count LSP files in v3.60
Get-ChildItem "src\x86\v3_60\v3.60" -Filter "*.lsp" -Recurse | Measure-Object
# Expected: ~80-100 files
# Count DCL files
Get-ChildItem "src\x86\v3_60\v3.60" -Filter "*.dcl" -Recurse | Measure-Object
# Expected: ~40 files
What the VLX Contains¶
The original Csv.VLX contains 109 FAS modules (from binary analysis):
CSV, ENABLE, SETVARS, UPDVAR, ERR, WARNING,
PROJECT, PJ_NAME, NEW, DWGNEW, DWGOLD,
PANEL, DRAWPAN, MAKEPAN, INSPANEL, FINPAN, RENPAN, PANATT,
BP_DLG, FH_DLG, FS_DLG, FV_DLG,
PP_DLG, SLAB_DLG, WALL_DLG, RO_DLG,
CH_DLG, DL_DLG, DR_DLG, MP_DLG, OPENING,
... (see csv-vlx-binary-notes.md for full list)
Gap Analysis¶
Compare source files to VLX modules:
# List LSP basenames
$lspFiles = Get-ChildItem "src\x86\v3_60\v3.60" -Filter "*.lsp" |
Select-Object -ExpandProperty BaseName |
ForEach-Object { $_.ToUpper() }
# Known VLX modules (from binary analysis)
$vlxModules = @("CSV", "ENABLE", "SETVARS", "PANEL", ...) # full list
# Find missing source
$vlxModules | Where-Object { $_ -notin $lspFiles }
Troubleshooting¶
“Function Not Defined” After Load¶
Cause: Missing dependent module
Fix: Check load order in original csv.lsp entry point
Compiled VLX Much Smaller¶
Cause: Not all LSP files included Fix: Cross-reference with 109-module list from VLX analysis
“Protection Error” on Load¶
Cause: Protection mode mismatch
Fix: Ensure :protected T matches original if distributing
Functions Work Differently¶
Cause: Compiler version differences or missing includes Fix: Test in AutoCAD 2000 (same as original)
Decompilation Reality Check¶
Why No Decompiler Exists¶
Aspect |
InstallShield (.ins) |
Visual LISP (.fas/.vlx) |
|---|---|---|
Format |
Documented bytecode |
Proprietary encrypted |
Protection |
None |
|
Decompiler |
isDcc v1.22 |
None (free/open-source) |
Commercial |
N/A |
vlxfas2lsp.com (paid service) |
Commercial Option (Not Recommended)¶
vlxfas2lsp.com offers paid VLX decompilation:
Requires uploading files to third party
Unknown reliability/accuracy
Legal/IP concerns for production code
Since we have source code, compilation + verification is the better path.
Recommended Workflow¶
1. Inventory: List all LSP/DCL in src/x86/v3_60/v3.60/
↓
2. Gap Check: Compare to 109 VLX modules
↓
3. Compile: Use VLIDE wizard or batch script
↓
4. Verify: Function-level comparison
↓
5. Test: Behavioral testing in AutoCAD 2000
↓
6. Document: Note any missing/different modules