Oricutron

Debugging

To access Oricutron's debugger you need to press the F2 key. This will show you this screen:

In the monitor, number arguments are decimal by default, or prefixed with $ for hex or % for binary. Pretty much everything is output in hex.

In most places where you can enter a number or address, you can pass a CPU or VIA register. (VIA registers are prefixed with V, e.g. VDDRA). Anywhere you can pass an address, you can also use a symbol.

Commands

To use Oricutron's debugger, you need to know some keys:

  • F2: Return to the emulator
  • F3: Toggle console/debug output/memwatch
  • F4: Toggle VIA/AY information
  • F9: Reset cycle count
  • F10: Step over code
  • F11: Step over code without tracing into subroutines.
  • F12: Skip instruction
Debugging from an external debugger

Since OSDK 2.0, Oricutron also embeds a GDB compatible debug stub. Instead of using the built-in monitor described above, an external debugger can connect to Oricutron over TCP and drive it using the standard GDB remote protocol: set and clear breakpoints, single step, run and halt, and read or write both memory and CPU registers.

The stub is enabled by giving Oricutron a port to listen on:

oricutron --gdb_port 6502 mygame.dsk

This is what the Visual Studio Code extension uses to offer source level debugging of Oric programs. Combined with a program built using OSDKDEBUG=-g1, which makes the compiler emit source line and type information, and the extended symbol file produced by the assembler, the debugger can show you C source lines and typed variables rather than raw disassembly.

There is also a KVM protocol (Keyboard and Video, there is no mouse on an Oric), which exposes the emulated screen buffer and accepts keyboard input, so external tooling can display the running program and interact with it.

Advanced features

You also have some more advanced commands:

  • ? : Help
  • a [addr] : Assemble
  • bc [bp id] : Clear breakpoint
  • bcm [bp id] : Clear mem breakpoint
  • bl : List breakpoints
  • blm : List mem breakpoints
  • bs [addr] : Set breakpoint
  • bsm [addr] [rwc] : Set mem breakpoint
  • bz : Zap breakpoints
  • bzm : Zap mem breakpoints
  • d [addr] : Disassemble
  • fd [addr] [end] [file]: Disassemble to file
  • fw [addr] [file]: Write memory to file
  • fr [addr] [file] : Read file to memory
  • m [addr] : Dump memory
  • mm [addr] [value] : Modify memory
  • mw [addr] : Memory watch at addr
  • nl [file] : Load snapshot
  • ns [file] : Save snapshot
  • r [reg] [value] : Set a value to a register
  • q, x or qm : Quit monitor
  • qe : Quit emulator
  • sa [name] [addr] : Add or move user symbol
  • sk [name] : Kill user symbol
  • sc : Symbols not case-sensitive
  • sC : Symbols case-sensitive
  • sl [file] : Load user symbols
  • sx [file] : Export user symbols
  • sz : Zap user symbols
Version numbering

Upstream Oricutron has been called version 1.2 since November 2014. Development moved to git and releases are now identified by commit hash, which makes it impossible to tell which version was released when. The build shipped with the OSDK therefore uses its own scheme, and names itself after its compile date instead:

Oricutron 2026.07.25 OSDK (SDL1)

That string appears in the title bar and in the "About Oricutron" dialog. It tells you the compile date, that this is the OSDK variant rather than an upstream build, and which major version of SDL it was linked against. Please quote it when reporting a problem. Upstream builds are unaffected and keep reporting 1.2.

The window title can be replaced with the --title option, so that each window says what it is running. That matters when you have a lot of them open at the same time, a test bench for instance, where otherwise every window looks identical:

oricutron --title "Playing Encounter" mygame.dsk

It can also be changed while the program is running, through the debug stub. Only the window title changes, the "About Oricutron" dialog keeps reporting the build identity above.




Known issues


Reported by NekoNoNiaow the Fri 29th March 2019


Issue #34: Tap file that crash on first load but not on second:
Details: This does not happen for all program files but sometimes Oricutron will not properly execute a loaded .tap file and instead display the Monitor window showing the PC stuck at address $24D. When using the monitor to examine disassembled memory, the code is correctly present at address $600.

When that happens, issuing a RESET from Oricutron and typing manually CLOAD"" and re-inserting the proper .tap file is enough for the program to run normally.
For some reason, the first run always fail as described above but after a reset everything works as expected.

As noted, this happens only for one of my program, a 23,370 bytes long .tap file.
I can provide that .tap file and associated symbols file if needed.





Resolved issues


Reported by LeWurmling the Fri 1st September 2017
Fixed in OSDK 1.12


Issue #20: Oricutron fails to start
Details: If the project is not located on the same drive as the OSDK; Oricutron will fail to launch because osdk_oricutron.bat does not point it to the right location. Using START /d "%OSDK%\Oricutron" %OSDKORICUTRON% instead fixes it.


comments powered by Disqus
Coverity Scan Build Status
History
Version 2026.07.25 OSDK
  • Added a GDB compatible debug stub, enabled with --gdb_port. An external debugger can connect over TCP and use the standard GDB remote protocol to set breakpoints, single step, run and halt, and read or write memory and CPU registers. This is what the Visual Studio Code extension uses for source level debugging of Oric programs
  • Added a KVM protocol (Keyboard and Video, there is no mouse on an Oric), which exposes the emulated screen buffer and accepts keyboard input, so external tooling can display the running program and interact with it
  • Added a --title option to change the window title, so each window can say what it is running when several are open at once. It can also be changed at runtime through the debug stub
  • The OSDK build now names itself after its compile date, Oricutron YYYY.MM.DD OSDK (SDLx), instead of reporting the upstream 1.2 which has not changed since 2014
Version 1.2 (01-Nov-2014)
  • Fixed memory access breakpoints which were broken in (at least) v1.1.
  • Added snapshot files to the filetype autodetection
  • Added a virtual on-screen keyboard, and the ability to remap keys (torguet)
  • Fixed autobooting of Jasmin disks (christian)
  • ACIA 6551 serial port emulation, including a virtual modem which lets you connect over TCP/IP (iss)
  • Fixed a bug in the V flag emulation for SBC/ADC (christian)
  • Detects invalid .tap images (encoded length larger than tape image length)
  • Added copy to clipboard (iss)
Version 1.1 (07-Dec-2013)
  • Now possible to set scanline and fullscreen options when built without OpenGL support
  • Includes patches and symbols for Pravetz 8D rom
  • Disk and tape image autodetection. Oricutron will now attempt to detect the configuration required for any disk or tape inserted via commandline or menu.
  • 'Insert disk 0/1' menu items enabled even when no disk drive is enabled. Inserting a disk will use the autodetection routines to determine which drive type to enable.
  • Autorun for Jasmin and Pravetz disks
  • Fixed crash bug when switching between software and GL rendering on builds using SDL requesters.
  • Various AY emulation improvements
  • Simplified system timing
  • Clipboard paste support
Version 1.0 (22-Oct-2013)
  • Pravetz Dos-8D disk support (iss)
  • Better Pravetz emulation (iss)
  • Telestrat now basically working
  • Fixed some rendering issues in the debugger
  • Now defaults to no joystick instead of IJK
  • Some minor fixes in the joystick code
  • Support for .ort files from commandline (stefan h)
  • Commandline options for turbotape, lightpen and scanlines
  • On windows, error messages now pop up in a message box
  • Textattrs are now properly reset at the start of each line again
  • Better telestrat VIA display in the debugger (stefan h)
  • Fixed backslash key (stefan h)
  • Various improvements to the build system (stefan h/revolf/iss)
  • 8-bit display mode for low-end systems
  • Various optimisations