Skip to main content

Overview

The devcpc run command launches your project in RetroVirtualMachine emulator, supporting both DSK (disk) and CDT (tape) media with automatic detection and flexible override options.

Syntax

devcpc run [options]

Options

--dsk
flag
Force execution from DSK (disk). Ignores RUN_MODE configuration.
--cdt
flag
Force execution from CDT (tape). Ignores RUN_MODE configuration.

Configuration

Configure in devcpc.conf:
# Emulator path
RVM_PATH="/Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2"

# CPC model (464, 664, or 6128)
CPC_MODEL=464

# File to auto-execute (DSK only)
RUN_FILE="8BP0.BIN"

# Execution mode: auto, dsk, or cdt
RUN_MODE="auto"

Platform-Specific RVM_PATH

RVM_PATH="/Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2"

Execution Modes

RUN_MODE: auto

Automatically detects which media to use:
  • If CDT and CDT_FILES are configured and CDT exists → uses CDT
  • Otherwise → uses DSK
RUN_MODE="auto"
devcpc run  # Auto-detects

RUN_MODE: dsk

Always uses DSK (disk):
  • Mounts DSK image
  • Auto-executes RUN_FILE if configured
  • Direct file access
RUN_MODE="dsk"
devcpc run  # Always uses DSK

RUN_MODE: cdt

Always uses CDT (tape):
  • Mounts CDT image
  • Auto-plays tape
  • Executes RUN"
  • Sequential loading
RUN_MODE="cdt"
devcpc run  # Always uses CDT

Override Options

Command-line flags override RUN_MODE:
# Force DSK (ignores RUN_MODE)
devcpc run --dsk

# Force CDT (ignores RUN_MODE)
devcpc run --cdt

# Use configured RUN_MODE
devcpc run

DSK Execution

When running from DSK:
# Command sent to emulator
-b cpc464 -i disk.dsk -c 'run"8BP0.BIN\n'
Behavior:
  • Mounts DSK as drive A:
  • Auto-executes RUN_FILE if configured
  • Fast random access to files
  • Works on all CPC models

CDT Execution

When running from CDT:

CPC 464 (Tape-only model)

# Command sent to emulator
-b cpc464 -i tape.cdt -c 'run"\n' -p
Behavior:
  • Mounts CDT as tape
  • -p flag auto-plays tape
  • Executes RUN"
  • Sequential loading from tape

CPC 664/6128 (Disk models)

# Command sent to emulator
-b cpc6128 -i tape.cdt -c '|tape\nrun"\n' -p
Behavior:
  • Uses |TAPE command to switch from disk to tape
  • Then executes RUN"
  • -p flag auto-plays tape
  • Sequential loading from tape

Output Example

═══════════════════════════════════════
  Ejecutar en RetroVirtualMachine
═══════════════════════════════════════

ℹ Emulador: /Applications/Retro Virtual Machine 2.app/Contents/MacOS/Retro Virtual Machine 2
ℹ Modelo:   464
ℹ Modo:     auto (DSK)
ℹ Archivo:  dist/mi-juego.dsk
ℹ Ejecutar: 8BP0.BIN

⚠ Cerrando sesión anterior de RetroVirtualMachine...

→ Iniciando emulador...
✓ RetroVirtualMachine iniciado

Session Management

The command automatically:
  • Detects running RetroVirtualMachine sessions
  • Closes previous sessions
  • Launches new session with correct media
  • Runs in background

Media Comparison

FeatureDSK (Disk)CDT (Tape)
SpeedFast (instant access)Slow (sequential)
LoadingDirect file accessMust load in order
AuthenticityModern conveniencePeriod-accurate
File OrderDoesn’t matterCritical
Auto-executeVia RUN_FILEVia RUN"
CPC ModelsAll modelsAll models (auto-adapts)

Workflow Examples

Quick Test (DSK)

devcpc build
devcpc run --dsk

Tape Testing (CDT)

# Configure CDT in devcpc.conf
CDT="${PROJECT_NAME}.cdt"
CDT_FILES="loader.bas 8BP0.bin"

devcpc build
devcpc run --cdt

Auto Mode

# Detects DSK or CDT automatically
RUN_MODE="auto"
devcpc build
devcpc run

Development Loop

# Edit code
vim asm/make_all_mygame.asm

# Build and run
devcpc build && devcpc run

Requirements

Important: Only RetroVirtualMachine v2.0 BETA-1 R7 (10/07/2019) is supported, as it’s the only version with development features enabled.Download from: RetroVirtualMachine

Error Handling

# RVM_PATH not configured
devcpc run
# Error: RVM_PATH no está configurado en devcpc.conf

# Emulator not found
devcpc run
# Error: RetroVirtualMachine no encontrado en: /path/to/rvm

# DSK not found
devcpc run --dsk
# Error: DSK no encontrado: dist/project.dsk
# ℹ Ejecuta 'devcpc build' primero

# CDT not configured
devcpc run --cdt
# Error: CDT no encontrado: dist/project.cdt
# ℹ Configura CDT y CDT_FILES en devcpc.conf

CPC Model Selection

Choose the appropriate model:
ModelTypeFeaturesUse Case
464Tape-only64KB RAM, no diskTape games, authentic experience
664Disk64KB RAM, disk driveDisk games, faster loading
6128Disk128KB RAM, disk driveAdvanced games, banking
# CPC 464
CPC_MODEL=464

# CPC 6128
CPC_MODEL=6128

Background Execution

The emulator runs in background:
devcpc run
# Emulator opens in new window
# Terminal remains available
To close:
# Closes automatically on next run
devcpc run

# Or close manually
pkill -9 "Retro Virtual Machine"

Build docs developers (and LLMs) love