Varvara

From Fantasy Console Wiki
Revision as of 21:05, 27 November 2022 by Pixelbath (talk | contribs) (initial page; incomplete)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article is incomplete. You can help this wiki by expanding it.

Varvara is a fantasy computer system that uses runs a stack-based virtual machine called Uxn. Its main programming language is a Forth-like language called Uxntal.

Uxn

Memory

The Uxn virtual CPU can address 64kb of memory; programs can move stacks into addressable range to allow reading and writing directly into stack memory. In this way, peripherals such as a controller, mouse, and keyboard can be addressed.

Memory RAM Data 64kb
Stacks Working Stack Data 254 bytes
Error 1 byte
Pointer 1 byte
Return Stack Data 254 bytes
Error 1 byte
Pointer 1 byte
I/O Devices Data 256 bytes

Uxn is a single-page virtual machine with 32 opcodes. This system has no registers, and instead uses a 127-level stack.

Devices

Devices are external systems connected to the Uxn CPU, such as the screen, the mouse and the keyboard. Each device has 16 bytes, also called ports, of I/O memory. Vectors are ports holding an address in memory to evaluate when a device event is triggered, such as when the mouse is moved, or a key is pressed.

  • 00 - System device
  • 10 - Console device
  • 20 - Screen device
  • 30, 40, 50, 60 - Audio device
  • 70 - MIDI device
  • 80 - Controller
  • 90 - Mouse
  • a0, b0 - File
  • c0 - Datetime
  • d0 - Unused
  • e0, f0 - Reserved

The two reserved devices can be used for implementation specific features that do not need to be part of the specs, or other Uxn/Varvara instances.


[Category: Fantasy Computers]