• Stars
    star
    104
  • Rank 319,991 (Top 7 %)
  • Language
    Assembly
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yet another KC emulator

YAKC (Yet Another KC Emulator)

NOTE: this project is abandoned. This is the followup project: https://floooh.github.io/tiny8bit/

Build Status

Despite the name this is a multi-system emulator for 8-bit home computers.

It started as a KC85 emulator because this was the system I spent most of my youth on: https://en.wikipedia.org/wiki/KC_85

Live Demo

http://floooh.github.io/virtualkc/

This is a WebAssembly version. If this doesn't work, switch to the asm.js version through the top-left hamburger icon.

How to Build:

> python --version
Python 2.7.10
> cmake --version
cmake version 3.3.2
> git clone https://github.com/floooh/yakc
> cd yakc
> ./fips build
> ./fips run yakcapp

In debug mode, the emulator tries to load additional ROMs and games from a local HTTP server at port 8000. Just do this:

> cd yakc/files
> python -m SimpleHTTPServer
...

And run the emulator from another terminal window. When building in release mode, the emulator will load the data directly from the webpage at http://floooh.github.io/virtualkc/

Overview

YAKC currently emulates the following 8-bit systems:

  • KC85/2, KC85/3, KC85/4, KC Compact (VEB Mikroelektronik Muehlhausen)
  • Z9001 (aka KC85/1) and KC87 (Robotron Dresden)
  • Z1013 (Robotron Riesa)
  • Sinclair ZX Spectrum 48k and 128k
  • Amstrad CPC464 and CPC6128
  • Acorn Atom

Source code of the system emulators is here: https://github.com/floooh/yakc/tree/master/src/yakc/systems

The system emulators are built on top of dependency-free, header-only chip emulators written in C (https://github.com/floooh/chips).

Rendering and input is done through Oryol: https://github.com/floooh/oryol

Audio is done through SoLoud: https://github.com/jarikomppa/soloud

The extensive debugging UI is implemented with Dear Imgui: https://github.com/ocornut/imgui

Kudos to MAME for providing a reference when there was insufficient documentation available for emulated chips and computer systems: https://github.com/mamedev/mame

The following platforms are fully supported:

  • asm.js / wasm
  • OSX
  • Windows
  • Linux

The emulator should also build and run on Android, iOS and Raspberry Pi but this is less tested and there will be input- or performance-problems on those platforms.

Implementation Details

A few implementation details are worth mentioning:

  • on M6502 machines (currently only the Acorn Atom), the system is ticked per clock cycle and fully implements the M6502 memory access quirks (each cycle is a memory access, including 'junk accesses')
  • on Z80 machines, the system is ticked with machine-cycle granularity (typical 3..5 clock cycles, or more if wait states are injected)
  • all known undocumented Z80 behaviour is implemented, the M6502 implements the 'stable' undocumented instructions, but not most of the 'unstable' instructions
  • communication between chips happens (mostly) with pin bit masks instead of specialized callbacks, this means the system emulation source code mimics how the different chips are connected on the motherboard instead of relying on 'high level recipes' which describe the functions of specific I/O addresses

Emulated System Details

All the East German computer models had 'unlicensed' Z80-chip-family clones called U880 (Z80 CPU), U855 (Z80 PIO) and U857 (Z80 CTC). The East German clones had some hardware bugfixes compared to the original Z80 and thus some undocumented instructions behaved slightly different. YAKC emulates the original Z80, not the 'fixed' U880 clones (doesn't make a difference with all software I tested).

KC85/2, KC85/3 and KC85/4

These were East German home computers with fairly impressive hardware- and software-capabilities, at least given the 'real-world-socialist' economic restrictions of 80's Eastern Germany. Unlike many other Eastern computers, the KC85 line wasn't a direct clone of Western machines, but implemented some unique ideas both in hardware and software. In terms of hardware capabilities, the ZX Spectrum was the closest Western system, the KC85 had a slower CPU, but higher-resolution graphics.

  • manufactured by VEB Mikroelektronikkombinat Muehlhausen from 1985 (KC85/2) to 1989 (KC85/4)
  • Z80 CPU @ 1.75 MHz, Z80 PIO and Z80 CTC
  • 320x256 display resolution with 16 foreground and 8 background colors
  • 8x4 pixels or 8x1 pixels color attribute resolution (same idea as the ZX Spectrum but with smaller color attribute blocks)
  • 16 KByte (KC85/2 and /3) to ~128 KB RAM (KC85/4)
  • 8 KByte to 20 KByte ROM (operating system and BASIC)
  • no hardware sprites, programmable video signal generator or dedicated sound chip

A few KC85 games:

Digger: Digger

A Pengo 'clone': Pengo Intro Screen

Cave: Cave

House: House Ingame

Jungle: Jungle

KC85/3 start screen with operating system HC-CAOS 3.1:

KC85/3

Z9001 and KC87

This was another of the 'big three' East German 8-bit computer models, built by Robotron Dresden. The Z9001 was later renamed to KC85/1 even though it had no similarities with the KC85/2-based computers from Muehlhausen. The KC87 is identical to the Z9001 apart from a builtin BASIC. A color graphics module was optional (YAKC implements monochrome graphics for the Z9001 and color graphics for the KC87).

  • manufactured by Robotron Dresden from 1984 (Z9001) and 1987 (KC87)
  • Z80 CPU @ 2.5 MHz, 2(!) Z80 PIOs and a Z80 CTC
  • 16 KByte RAM
  • 4 KByte ROM, and additionally a 10 KByte ROM BASIC in the KC87
  • 40x24 or 40x20 black-and-white or 8-color character graphics

KC87 running BASIC:

KC87

Z1013

The Z1013 is the last and most simple of the East German computers emulated by YAKC. It was mostly a hobbyist computer sold as kit, and the only computer in Eastern Germany that was sold directly to citizens.

  • manufactured by Robotron Riesa from 1985
  • Z80 CPU @ 2.0 MHz, Z80 PIO
  • 16..64 KByte RAM
  • 2 KByte ROM
  • 32x32 monochrome character graphics

A Z1013 running a clone of the ZX81 game Mazogs:

Z1013 Mazogs

ZX Spectrum 48k and 128k

The ZX Spectrum was a British machine which was also popular as self-built hobbyist machine or official clone in the Eastern hemisphere because of its simple hardware architecture.

  • manufactured by Sinclair from 1982
  • 3.5 MHz Z80 CPU, custom 'ULA' chip, AY-3-8912 sound chip in the 128k
  • 256x192 @ 15 colors in 8x8 color attribute blocks

YAKC currently doesn't emulate the 'contended memory' performance penalty when accessing video memory.

The iconic 128k start screen:

ZX Spectrum 128k

The 48k version of Bomb Jack:

ZX 48k Bomb Jack

Exolon on the 48k:

ZX 48k Exolon

The start screen of Arkanoid RoD on the 128k:

ZX 128k Arkanoid

Amstrad CPC 464, 6128 and KC Compact

The Amstrad CPC had a very interesting architecture which is surprisingly tricky to emulate. Even though the video system lacked hardware sprites, it made up for it by making clever use of the fairly programmable MC6845 video signal generator chip, which allow some graphics effects otherwise only known from the much more powerful Amiga.

The KC Compact is an outlier, it was an East German CPC clone produced from 1989, and cancelled soon after the Wall came down. The KC Compact emulated the custom Amstrad gate array chip with standard TTL logic, YAKC is cheating here a bit and treats all CPC models the same (the only difference of the KC Compact is a slightly different color palette, and different ROMs).

  • manufactured by Amstrad, Schneider, MEK Muehlhausen and others from 1984
  • 4 MHz Z80 CPU (real world perf more like 3.3 Mhz because of wait state injection)
  • 64 or 128 KByte RAM
  • 32 KByte ROM
  • i8255 Programmable Peripheral Interface chip
  • MC6845 CRT Controller chip
  • AY-3-8912 Programmable Sound Generator chip
  • Amstrad 40007/40010 custom gate array chip
  • 27 hardware colors (32 with some redundant colors)
  • 160x200 @ 16 colors, 320x200 @ 4 colors or 640x200 @ 2 colors display modes

The Amstrad 6128 start screen:

CPC6128

The DTC demo by Arkos and Overlanders:

CPC DTC

The CPC version of Bomb Jack:

CPC Bomb Jack

Arkanoid on the CPC:

CPC Arkanoid

Cybernoid:

CPC Cybernoid

Acorn Atom

The Atom is one of the early Acorn 8-bit computers with a very simple but clever architecture (especially for its early release date). Apart from the Netherlands it wasn't very popular in continental Europe. Currently this is the only system in YAKC with a MOS 6502 CPU.

  • manufactured by Acorn from 1980
  • 1 MHz MOS Technology 6502 CPU
  • up to 40 KByte RAM
  • up to 16 KByte ROM
  • MC6847 Video Display Generator chip
  • i8255 Programmable Peripheral Interface chip
  • optional 6522 Versatile Interface Adapter chip
  • mixed text/semigraphics 32x16 display mode
  • various graphics display modes from 64x64 @ 4 colors up to 256x192 @ 2 colors

Acorn Atom mixed text/semigraphics mode:

Atom

The game 'Atomic Chucky Egg':

Atomic Chucky Egg

The Debugger UI

YAKC has an extensive debugging UI implemented with Dear Imgui:

YAKC Debugger UI

More Repositories

1

sokol

minimal cross-platform standalone C headers
C
5,629
star
2

oryol

A small, portable and extensible C++ 3D coding framework
C++
1,965
star
3

chips

8-bit chip and system emulators in standalone C headers
C
890
star
4

sokol-samples

Sample code for https://github.com/floooh/sokol
C
527
star
5

pacman.c

Simple Pacman clone written in C99.
C
464
star
6

fips

High-level build system for distributed, multi-platform C/C++ projects.
Python
457
star
7

chips-test

Tests and sample code for https://github.com/floooh/chips
C
366
star
8

sokol-zig

Zig bindings for the sokol headers (https://github.com/floooh/sokol)
C
264
star
9

v6502r

visual6502 remixed
C
251
star
10

pacman.zig

Simple Pacman clone written in Zig.
Zig
197
star
11

sokol-tools

Command line tools for use with sokol headers
C++
190
star
12

cimgui-sokol-starterkit

A minimal self-contained Dear ImGui starter project for Windows, Linux and macOS.
C++
184
star
13

bookmarks

Links to stuff that looks useful.
139
star
14

qoiview

QOI image viewer on top of the Sokol headers
C
123
star
15

emu-info

Various emulator-related infos from all over the net.
Assembly
105
star
16

oryol-samples

Oryol extension module samples
C++
81
star
17

rz80

Z80 chip family emulator library written in Rust.
Rust
72
star
18

sokol-nim

nim bindings for https://github.com/floooh/sokol
C
70
star
19

gliml

Minimalistic image loader library for GL projects
C++
62
star
20

fbxc

FBX cruncher (FBX + rules => JSON + vertex data blob)
C++
61
star
21

altai

Modern WebGL wrapper in TypeScript
TypeScript
53
star
22

sokol-odin

Odin bindings for the sokol headers (https://github.com/floooh/sokol)
C
46
star
23

sokol-rust

Rust bindings for the sokol headers (https://github.com/floooh/sokol)
C
44
star
24

kc85.zig

A KC85 emulator written in Zig
Zig
42
star
25

tiny8bit

WebPage for https://github.com/floooh/chips-test
HTML
36
star
26

docker-c64

C64 emulator running in docker
C
31
star
27

sokol-tools-bin

Binaries and fips integration for https://github.com/floooh/sokol-tools
Python
21
star
28

oryol-animation

Oryol animation and skinned-character-rendering modules
C++
19
star
29

oryol-imgui

Dear Imgui wrapper module for Oryol
C++
18
star
30

fips-bgfx

fipsified version of bgfx (https://github.com/bkaradzic/bgfx)
CMake
17
star
31

sokol-webgpu

HTML
15
star
32

floooh.github.io

Move blog and personal web page over to github (work in progress)
HTML
14
star
33

sokol-nim-samples

Example code for https://github.com/floooh/sokol-nim
Nim
13
star
34

vscode-kcide

Retro assembly IDE for VSCode
TypeScript
13
star
35

vscode-emscripten-debugging

Example repository for Emscripten WASM debugging in VSCode
C
11
star
36

visualz80remix

[WIP] WASM for https://github.com/floooh/v6502r with Z80 netlist
HTML
11
star
37

visual6502remix

Webpage for https://github.com/floooh/v6502r
HTML
11
star
38

oryol-tools

Asset exporter tools for Oryol engine
C++
10
star
39

drahtgitter

A toolkit for converting and processing 3d data in python.
Python
9
star
40

virtualkc

Webpage for the YAKC KC85 emulator
HTML
9
star
41

oryol-tbui

Integrate TurbobadgerUI with Oryol
C++
8
star
42

sokol-html5

webpage for https://github.com/floooh/sokol-samples
HTML
7
star
43

objc-ast-experiments

C
7
star
44

fibs

Nothing to see here, move along :)
TypeScript
7
star
45

fips-libcurl

Precompiled, stripped down libcurl libs for Oryol
C
6
star
46

visual2a03remix

webpage for the Ricoh 2A03 simulation
HTML
6
star
47

tiny8bitvs

Experiment to integrate a 'chips' WASM emulator into a VSCode tab.
TypeScript
6
star
48

kc85sdk

Experimental C-SDK for KC85 home computers
Python
6
star
49

fips-soloud

fipsified version of Soloud audio lib (https://github.com/jarikomppa/soloud)
CMake
6
star
50

voxel-test

Place to experiment with stb_voxel_renderer.h and Oryol
C
5
star
51

oryol-nuklear

Integrate Nuklear UI with Oryol engine
C++
5
star
52

oryol-test-app

Oryol testing app in its own repo
C++
5
star
53

fibs-hello-world

Most minimal fibs test project.
TypeScript
5
star
54

oryol-fileformats

Structure definitions for Oryol binary file formats.
C++
4
star
55

headeronly-perf

C
4
star
56

fibs-libs

Collection of fibs project wrappers for common 3rd-party libraries.
TypeScript
4
star
57

sokol-wgpu-preview

Temporary sneak preview website for sokol WebGPU samples.
HTML
4
star
58

emsc-interop-demo

Simple example to demonstrate calling a C function from Javascript.
HTML
4
star
59

easmx

A fork of the asmx assembler usable as embeddable library.
C
4
star
60

oryol-sound

Legacy Oryol sound module (uses OpenAL)
C++
3
star
61

docker-kc85

A KC85/4 emulator in Docker.
C
3
star
62

hcasm

8-bit home computer assembler in Typescript
TypeScript
3
star
63

fips-nuklear

fips build system wrapper for nuklear UI (https://github.com/vurtun/nuklear)
Python
3
star
64

chef-emscripten

Chef cookbook to setup an emscripten build environment.
Ruby
3
star
65

kcide-sample

Sample project for VSCode KC IDE extension
Assembly
3
star
66

oryol-webgl2

Webpage files for bleeding edge WebGL2 Oryol samples.
HTML
3
star
67

fips-hello-world

Test project for fips build system.
Python
3
star
68

fips-bullet

fips wrapper for bullet phyiscs
CMake
2
star
69

fips-spirvcross

fips wrapper for SPIRV-Cross
CMake
2
star
70

flohofwoe.www

JavaScript
2
star
71

fips-glfw

fipsified GLFW (https://github.com/glfw/glfw)
CMake
2
star
72

fips-cjson

fipsified cJSON lib
CMake
2
star
73

fibs-sokol-test

Fibs + sokol + sokol-shdc + stb
C
2
star
74

fips-cpptoml

fipsified cpptoml (https://github.com/skystrife/cpptoml)
2
star
75

fips-vld

Fipsified VLD (Visual Leak Detector)
C
2
star
76

fips-zlib

fipsified zlib
C
2
star
77

nvidia-driver-issue

C
1
star
78

fips-unittestpp

fipsified UnitTest++
C++
1
star
79

chef-cmake

Chef cookbook for installing cmake from source tarball
Ruby
1
star
80

webgl2-test

WebGL2 bug repro tests (wip)
JavaScript
1
star
81

chef-nacl

Chef cookbook to install the Google Native Client SDK
Ruby
1
star
82

fips-remotery

fipsified version of Remotery (https://github.com/Celtoys/Remotery)
CMake
1
star
83

tmp-http-test

TypeScript
1
star
84

fibs-test

Top level test project for https://github.com/floooh/fibs
C
1
star
85

oryol-simple

The most simple Oryol Gfx app
Python
1
star
86

fips-lua

fips wrapper for lua
CMake
1
star
87

fips-glm

Fipsified glm lib (https://github.com/g-truc/glm)
1
star
88

fibs-utils

Common helpers and utilities for fibs projects.
TypeScript
1
star
89

tiny8bit-preview

Temporary preview webpage repo for https://github.com/floooh/chips-test
HTML
1
star