A Virtual CPU by APRK
A lightweight ARM64 virtual CPU for Apple Silicon Macs, built using Apple's Hypervisor Framework. Features real-time graphics, mouse input, keyboard demo, and a live debug dashboard.
- SDL2 Graphics - 320x200 framebuffer @ 60fps
- Mouse Support - Cursor tracking with click detection
- Keyboard Input - Real-time key capture and display
- UART - Serial I/O for debugging
- Framebuffer - Pixel-level graphics control
- Mouse - Position and button state
- Network - Ping and HTTP fetch (experimental)
- VirtIO Block - Disk storage
- ImGui System Monitor - Apple-style UI
- Live Registers - X0-X7, PC, SP
- ARM64 Disassembly - Via Capstone
- macOS 11.0+ (Apple Silicon M1/M2/M3/M4)
- Xcode Command Line Tools
brew install sdl2 capstone# Clone
git clone https://github.com/APRK01/VCPU-AR1.git
cd VCPU-AR1
# Build Kernel
./build_os.sh
# Build VCPU
mkdir -p build && cd build
cmake .. && make
# Run
./ar1_vcpu ../kernel.binThe keyboard demo shows:
- 7-Segment Counter - Shows how many characters typed
- Visual Blocks - Last 10 typed characters
- Blinking Cursor - Shows input position
- Status Bar - System status
| Key | Action |
|---|---|
| Any key | Type character |
| Backspace | Delete last |
| ESC | Clear all |
| Address | Device |
|---|---|
0x09000000 |
UART |
0x0A000000 |
VirtIO Block |
0x0B000000 |
Framebuffer |
0x0C000000 |
Mouse |
0x0D000000 |
Network |
0x40000000 |
RAM (64MB) |
VCPU-AR1/
├── src/
│ ├── cpu/ # HVF wrapper, registers
│ ├── device/ # Display, mouse, network
│ └── soc/ # Bus, RAM, GIC
├── os/
│ └── kernel.c # Bare-metal kernel
└── include/
- ✅ Keyboard demo with visual feedback
- ✅ 7-segment digit display
- ✅ Character counter and blocks
- Mouse cursor support
- System Monitor improvements
- Color format fixes
- Network device (ping/fetch)
- Non-blocking UART
- ImGui debug dashboard
- Live ARM64 disassembly
MIT License
AR1 VCPU by APRK 🖥️