BeRo1985/pasriscvemu

The PasVulkan-based emulator frontend for the PasRISCV RV64GC RISC-V emulator

Pascal

5

72 commits

updated Aug 24, 2026

See the code

README

[!IMPORTANT] The primary repository has moved to git.rosseaux.net/BeRo1985/pasriscvemu. This GitHub repository is kept up-to-date via push mirroring.

pasriscvemu

This is the PasVulkan-based emulator frontend for the PasRISCV RV64GC RISCV-V emulator.

Getting Started

Prerequisites

You need to have the following installed:

  • FreePascal (unstable dev version) + Lazarus or a recent version of Embarcadero Delphi
  • PasVulkan with all its dependencies and submodules (which includes PasRISCV and PasTerm already)

Setup

Clone this pasriscemu repository with all submodules into the projects directory of the PasVulkan repository:

cd /path/to/pasvulkan/projects
git clone --recurse-submodules https://github.com/BeRo1985/pasriscvemu.git

But not other way around, because the pasriscvemu repository is dependent on the PasVulkan repository, because of relative paths in the project files. PasVulkan itself has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu, where PasRISCV is the actual RISCV-V emulator core and PasTerm is the terminal emulator for the serial console when the framebuffer isn't currently active.

Building

Just open the pasriscvemu.lpi in Lazarus or 'pasriscvemu.dproj' in Delphi and compile it. The executable will be in the bin directory.

Running

Just run the pasriscvemu executable in the bin directory. Otherwise look below for the command line options.

Command Line Options

Command LineDefaultDescription
-gdb [port]Enable GDB remote debugging on specified port
-debugEnable local debugging
-no-debugDisable local debugging
-smp [cpucores]2Number of CPU cores to emulate
-memory [ram]2GiBAmount of RAM to emulate
-bios [filename]fw_jump.binFilename of the BIOS firmware image
-kernel [filename]kernel.binFilename of the kernel image
-no-kernelDo not load a kernel image
-initrd [filename]Filename of the initial ramdisk image
-no-initrdDo not load an initial ramdisk image
-virtioblock [filename]Filename of the VirtIO block device image
-no-virtioblockDo not load a VirtIO block device image
-nvme [filename]Filename of the NVMe block device image
-no-nvmeDo not load a NVMe block device image
-bootargs [bootparams]root=/dev/mem rw earlyprintk console=$LINUXUART$ console=tty0 earlycon=sbiBoot arguments for the kernel
-aiaEnable Advanced Interrupt Architecture (AIA)
-no-aiaDisable Advanced Interrupt Architecture (AIA)
-display [mode]simplefbDisplay mode: simplefb, virtiogpu, bochsvbe, or cirrus
-rtc [mode]goldfishRTC mode: goldfish, ds1742, ds1307, or virtio
-i2c [mode]designwareI2C mode: opencores (or oc), designware (or dw)
-soundmode [mode]virtioSound mode: virtio, fm801, cmi8738 (also cmipci, cmi), hda
-natnetUse user mode networking backend for VirtIO Net (default, no root/TAP needed). Aliases: -nat, -usernet, -user, -usermodenet, -usermode
-tunnetUse TUN/TAP networking backend for VirtIO Net (requires a TUN/TAP device)
-nonetUse isolated network mode: guest gets DHCP/ARP/ICMP locally, but no external access
-no-ipv6Disable IPv6 user mode networking (ICMPv6/UDPv6/TCPv6 and router advertisements are suppressed)
-ipv6Enable IPv6 user mode networking (default)
-hostfwd [spec]Add a user mode networking port forward (requires -usernet/-natnet). Format: tcp|udp::hostport-[guestip]:guestport, e.g. -hostfwd tcp::2222-:22. Can be repeated.
-centeredCenter the monitor on the screen (default)
-no-centeredDo not center the monitor on the screen (default)
-centertonearestpixelCenter the monitor to the nearest pixel (no fractional offset)
-no-centertonearestpixelDo not center the monitor to the nearest pixel (default)
-scaledScale the monitor to fit the window (default)
-no-scaledDo not scale the monitor to fit the window
-scaletonearestScale the monitor to fit the window in integer steps
-no-scaletonearestDo not scale the monitor to fit the window in integer steps (default)
-strictcompliantfpuEnable strict IEEE 754-compliant software FPU (slower, but fully spec-correct)
-no-strictcompliantfpuDisable strict IEEE 754-compliant software FPU, use host FPU (default)
-virglEnable VirtIO-GPU 3D/VirGL acceleration (requires libvirglrenderer; needs -display virtiogpu)
-no-virglDisable VirtIO-GPU 3D/VirGL acceleration (default)
-jitEnable just-in-time compiler (default)
-no-jitDisable just-in-time compiler
-console-outputSerial console output
-no-console-outputNo serial console output
-console-port [port]Serial console TCP port

Keys

CTRL+F12 toggles between the framebuffer and the serial console.

FAQ

Why is the emulator not a part of the PasRISCV repository itself?

Because pasriscvemu is just a PasVulkan-based frontend for the PasRISCV emulator core, which is a standalone library and can be used in other projects as well.

Why is the emulator not a part of the PasVulkan repository itself?

Because pasriscvemu is a separate project and not directly related to Vulkan, but it uses PasVulkan as a frontend for the framebuffer output. But PasVulkan maybe get a dependency on PasRISCV in the future, for example for cross-platform "scripting" purposes and so on, but not the other way around. So PasVulkan has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu.

  • PasVulkan - PasVulkan itself
  • PasRISCV - The RISCV-V emulator core
  • PasTerm - The terminal emulator for the serial console
  • PasMP - A parallel-processing/multi-processing library for Object Pascal
  • RNL - RNL - Realtime Network Library - The opensource reliable UDP network library, including cryptography, which is used by PasRISCV for various purposes
  • And more at here

Support

Creating is my passion, and with your support, I can keep it alive. Support my work and help me continue innovating. Every contribution makes a difference: You can donate and support me here. Thank you!

License

This project is licensed under the zlib License - see the LICENSE file for details.

delphi
emulator
emulators
freepascal
instruction-decoding
object-pascal
pascal
risc-v
riscv
riscv64
riscv-emulator
riscv-linux
rv64
rv64gc
virtio
virtual-machine
vm
vulkan

BeRo1985/pasriscvemu

The PasVulkan-based emulator frontend for the PasRISCV RV64GC RISC-V emulator

Pascal

5

72 commits

updated Aug 24, 2026

See the code

README

[!IMPORTANT] The primary repository has moved to git.rosseaux.net/BeRo1985/pasriscvemu. This GitHub repository is kept up-to-date via push mirroring.

pasriscvemu

This is the PasVulkan-based emulator frontend for the PasRISCV RV64GC RISCV-V emulator.

Getting Started

Prerequisites

You need to have the following installed:

  • FreePascal (unstable dev version) + Lazarus or a recent version of Embarcadero Delphi
  • PasVulkan with all its dependencies and submodules (which includes PasRISCV and PasTerm already)

Setup

Clone this pasriscemu repository with all submodules into the projects directory of the PasVulkan repository:

cd /path/to/pasvulkan/projects
git clone --recurse-submodules https://github.com/BeRo1985/pasriscvemu.git

But not other way around, because the pasriscvemu repository is dependent on the PasVulkan repository, because of relative paths in the project files. PasVulkan itself has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu, where PasRISCV is the actual RISCV-V emulator core and PasTerm is the terminal emulator for the serial console when the framebuffer isn't currently active.

Building

Just open the pasriscvemu.lpi in Lazarus or 'pasriscvemu.dproj' in Delphi and compile it. The executable will be in the bin directory.

Running

Just run the pasriscvemu executable in the bin directory. Otherwise look below for the command line options.

Command Line Options

Command LineDefaultDescription
-gdb [port]Enable GDB remote debugging on specified port
-debugEnable local debugging
-no-debugDisable local debugging
-smp [cpucores]2Number of CPU cores to emulate
-memory [ram]2GiBAmount of RAM to emulate
-bios [filename]fw_jump.binFilename of the BIOS firmware image
-kernel [filename]kernel.binFilename of the kernel image
-no-kernelDo not load a kernel image
-initrd [filename]Filename of the initial ramdisk image
-no-initrdDo not load an initial ramdisk image
-virtioblock [filename]Filename of the VirtIO block device image
-no-virtioblockDo not load a VirtIO block device image
-nvme [filename]Filename of the NVMe block device image
-no-nvmeDo not load a NVMe block device image
-bootargs [bootparams]root=/dev/mem rw earlyprintk console=$LINUXUART$ console=tty0 earlycon=sbiBoot arguments for the kernel
-aiaEnable Advanced Interrupt Architecture (AIA)
-no-aiaDisable Advanced Interrupt Architecture (AIA)
-display [mode]simplefbDisplay mode: simplefb, virtiogpu, bochsvbe, or cirrus
-rtc [mode]goldfishRTC mode: goldfish, ds1742, ds1307, or virtio
-i2c [mode]designwareI2C mode: opencores (or oc), designware (or dw)
-soundmode [mode]virtioSound mode: virtio, fm801, cmi8738 (also cmipci, cmi), hda
-natnetUse user mode networking backend for VirtIO Net (default, no root/TAP needed). Aliases: -nat, -usernet, -user, -usermodenet, -usermode
-tunnetUse TUN/TAP networking backend for VirtIO Net (requires a TUN/TAP device)
-nonetUse isolated network mode: guest gets DHCP/ARP/ICMP locally, but no external access
-no-ipv6Disable IPv6 user mode networking (ICMPv6/UDPv6/TCPv6 and router advertisements are suppressed)
-ipv6Enable IPv6 user mode networking (default)
-hostfwd [spec]Add a user mode networking port forward (requires -usernet/-natnet). Format: tcp|udp::hostport-[guestip]:guestport, e.g. -hostfwd tcp::2222-:22. Can be repeated.
-centeredCenter the monitor on the screen (default)
-no-centeredDo not center the monitor on the screen (default)
-centertonearestpixelCenter the monitor to the nearest pixel (no fractional offset)
-no-centertonearestpixelDo not center the monitor to the nearest pixel (default)
-scaledScale the monitor to fit the window (default)
-no-scaledDo not scale the monitor to fit the window
-scaletonearestScale the monitor to fit the window in integer steps
-no-scaletonearestDo not scale the monitor to fit the window in integer steps (default)
-strictcompliantfpuEnable strict IEEE 754-compliant software FPU (slower, but fully spec-correct)
-no-strictcompliantfpuDisable strict IEEE 754-compliant software FPU, use host FPU (default)
-virglEnable VirtIO-GPU 3D/VirGL acceleration (requires libvirglrenderer; needs -display virtiogpu)
-no-virglDisable VirtIO-GPU 3D/VirGL acceleration (default)
-jitEnable just-in-time compiler (default)
-no-jitDisable just-in-time compiler
-console-outputSerial console output
-no-console-outputNo serial console output
-console-port [port]Serial console TCP port

Keys

CTRL+F12 toggles between the framebuffer and the serial console.

FAQ

Why is the emulator not a part of the PasRISCV repository itself?

Because pasriscvemu is just a PasVulkan-based frontend for the PasRISCV emulator core, which is a standalone library and can be used in other projects as well.

Why is the emulator not a part of the PasVulkan repository itself?

Because pasriscvemu is a separate project and not directly related to Vulkan, but it uses PasVulkan as a frontend for the framebuffer output. But PasVulkan maybe get a dependency on PasRISCV in the future, for example for cross-platform "scripting" purposes and so on, but not the other way around. So PasVulkan has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu.

  • PasVulkan - PasVulkan itself
  • PasRISCV - The RISCV-V emulator core
  • PasTerm - The terminal emulator for the serial console
  • PasMP - A parallel-processing/multi-processing library for Object Pascal
  • RNL - RNL - Realtime Network Library - The opensource reliable UDP network library, including cryptography, which is used by PasRISCV for various purposes
  • And more at here

Support

Creating is my passion, and with your support, I can keep it alive. Support my work and help me continue innovating. Every contribution makes a difference: You can donate and support me here. Thank you!

License

This project is licensed under the zlib License - see the LICENSE file for details.

delphi
emulator
emulators
freepascal
instruction-decoding
object-pascal
pascal
risc-v
riscv
riscv64
riscv-emulator
riscv-linux
rv64
rv64gc
virtio
virtual-machine
vm
vulkan

Languages

Pascal

89.7%

Shell

9.8%