haker
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Haker Game Design

Haker is going to be a game about hacking. My idea is for a game that is a cross between Uplink and the programming aspect of 0x10c, the famous DCPU16. At the core of the game will be the WOPR CPU. It is a simple CPU, with limited memory and few peripherals, but nevertheless with real instructions, interrupts, initialization, stack etc. At the most basic level, I hope that the people who liked idea of 0x10c can and will write whatever programs they wish, games, operating systems, anything.
Read full post gdoc_arrow_right_alt

File System

This is a specification for the file system. It is yet to be implemented in System 42. Please check the backlog for implementation progress. Specifications For now, we will call it CATFS… Until we find a better name. CAT is for cluster allocation table. FS is self explanatory. I need a good name for this fictional file system. Suggestions are welcome. CATFS is reminiscent of FAT16 family of file systems, but simplified.
Read full post gdoc_arrow_right_alt

Disk

Device Type: 0x0004 Disk is a persistent storage device. A disk is divided into data sectors, each of identical size and individually addressable. Sector size can be 0-65535. While the sector size can be arbitrary, it should be practical as well, because any read or write operation will require at least one sector size of memory for a buffer. So for example, sector size of 32768 would require half of WOPR memory.
Read full post gdoc_arrow_right_alt

Local Variables

Local storage refers to variables local to the function currently executing. This is in contrast to global variables. Using stack frames and allocating variables on the stack is a common practice. WOPR is little different in that stack frames are supported directly by the CPU, while commonly stack frames are implemented in higher level languages. This choice was made to make WOPR programming a little easier and to make WOPR code more compact, especially since it has only 64K of memory.
Read full post gdoc_arrow_right_alt

Starting on the Operating System 42

The answer to the life, the universe and everything. (Courtesy of Fat Owl Tees.) System 42 Considering that we are building a hacking simulator, our operating system should provide all the goodies we need, memory management, file system, networking, but without all the boring bits like memory/process protection, security etc. As I have been thinking of what we need, more and more it looks to me that System 42 will be a DOS like OS.
Read full post gdoc_arrow_right_alt

Assembly

This article is a work in progress and will be expanded with more information. Assembly Files Assembly files are plain text files, usually with .wopr extension. Comments begin with ;, and extend to the end of the line. They can appear at the beginning of the line or after an instruction. ; this is a full line comment push 0 ; this is an in line comment Empty lines are ignored.
Read full post gdoc_arrow_right_alt

WOPR CPU

This specification is a work in progress. It is not complete and is being changed regularly. This draft notice will be removed and document given version once it is finalized. WOPR is 16-bit stack based CPU. It has 65536 bytes of memory. All operations operate on 16 bit words on the evaluation stack. Pointers are 16 bit as well. 16 bit words are stored in little endian format. Being stack based machine, this means that parameters are loaded onto the eval stack before being operated on.
Read full post gdoc_arrow_right_alt

Devices

WOPR CPU can be expanded with multiple devices. The CPU can use OUT instruction, memory mapping and interrupts to communicate to the devices. The common instructions below are used to enumerate, identify and initialize the device. However all devices have device specific commands used to access device specific functionality. Common Commands Instruction OUT is used to talk to devices. Parameter P0 to OUT is always the device being addressed. Parameter P1 is the command.
Read full post gdoc_arrow_right_alt

WOPR CLI

WOPR command line interface is currently the only way to use WOPR CPU. It implements all commands necessary to write and run WOPR programs. $ ./wopr wopr v2019.1 Usage: wopr help [command] wopr asm [source].wopr [output].wopr-bin wopr debug [program].wopr-bin asm will compile your WOPR program into a binary. .wopr and .wopr-bin are standard extensions for WOPR programs, but this is not enforced. Assembler attempts to catch as many mistakes as possible, and will produce descriptive output for each error.
Read full post gdoc_arrow_right_alt

Debugger

WOPR debugger in action. WOPR is an all-in-one CLI executable. One of the commands is to debug an application. Screen Layout As you can see above, WOPR debugger is separated into several sections. Screen is the 80x25 virtual screen where the output of your program will be displayed. WOPR currently implements only monochrome display, which is the one shown here. Disasmbly shows disassembly of the program. One line in this window is highlighted.
Read full post gdoc_arrow_right_alt