Skip to content

Repository files navigation

OpenVSM

OpenVSM lets Proteus VSM components implement their simulation behavior and optional schematic graphics in Lua. One 32-bit openvsm.dll can serve many device types and instances; every component loads its configured script into an isolated Lua state.

Download a release · Read the user guide · Browse the documentation · Report an issue

A Z80 computer simulated in Proteus, running NASCOM BASIC and plotting a sine wave in the virtual terminal

A Z80 computer on a Proteus schematic: a real EPROM, RAM and glue logic, with the CPU and the serial chip modelled in Lua, running Microsoft BASIC. See the Z80 example.

A minimal model

This script implements a two-input NAND gate. The names in device_pins match the terminal names on the Proteus component.

device_pins = {
    {name = "A", on_time = 100000, off_time = 100000},
    {name = "B", on_time = 100000, off_time = 100000},
    {name = "Q", on_time = 100000, off_time = 100000}
}

function device_simulate()
    Q:set(1 - (A:get() * B:get()))
end

Install OpenVSM, configure the component with MODDLL=openvsm.DLL and LUA=device.lua, then place the script beside the Proteus project. The user guide covers device properties, script lookup, pins, buses, callbacks, graphics, and troubleshooting.

Examples

Example What it demonstrates
NAND The smallest useful digital model
Active display Lua drawing and mouse input on the schematic
CHIP-8 A complete VM with a display, keypad, timers, and per-instance ROM selection
Z80 A Z80 computer on real EPROM, RAM and glue logic, with a 6850 ACIA, running NASCOM BASIC
Optional modules UART and third-party control helpers

Documentation

OpenVSM v0.7 uses Lua 5.4 and builds as a 32-bit Windows DLL with C++20 and MSVC. It is licensed under GPL-2.0-or-later.

About

Create your model for Proteus VSM CAD (7/8) in Lua!

Resources

Stars

27 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages