post

TTY Console

TTY console mode

Press the TTY console switch to let the KIM simulator use a glass teletype in a console window. The standard KIM user interface is shown, see the manual how to use.
Note: set the PC keyboard to CAPS Lock, only uppercase is used in the KIM monitor.
Note the menu options to record a session, (Load Text to Console) or play (Save text from Console, followed by Stop saving text ) a text file in the console.
This is in fact the same functionality as a teletype with high speed papertape punch or reader. You can use this to load and save Basic programs as ASCII text files. Or use the KIM-1 tape routines built in KB9 Basic!

The console

The console is an emulation video terminal (ANSI color, subset) connected to an ACIA (a Motorola 6850) in the KIM-1. The KIM Monitor is patched to send or receive via the ACIA and is transparant to the user of the KIM-1 I/O routines (even the quirks like flags and returned register values!)

Keyboard input, when the console window has focus, is sent to the serial input of the ACIA. No local echo. The KIM-1 monitor only accepts uppercase (hint: Caps lock!), user programs are free to use upper or lowercase.

Characters sent tot to ACIA output are received by the console window and handled as a VT100 would do, a subset of the ANSI/VT100 is implemented.
All keys of the PC are usable, SHIFT works. Note the translation of codes from the PC keyboard to ASCII characters is for the keybaord choosen in Settings.
Other mappings are possible by changing the routine in console.pas: procedure TFconsole.FormKeyDown

Received characters by the console are handled as follows, a subset of the ANSI set.

Single control character

$01 : CursorHome 
$04 : CursorRight 
$05 : CursorUp 
BS  : Backspace 
TB  : Tab 
LF  : LineFeed 
FF  : ClearScreen 
CR  : CarriageReturn 
$13 : CursorLeft 
$16 : DeleteToEndofLine 
$18 : CursorDown 
DEL : Backspace  

ESC sequences
ESC[K             Clear from cursor to the end of the line
ESC[0K            Clear from cursor to the end of the line
ESC[1K            Clear from the beginning of the current line to the cursor
ESC[2K            Clear the whole line
ESC[J             Clear the screen from cursor
ESC[0J            Clear the screen from cursor
ESC[1J            Clear the screen until cursor position
ESC[2J            Clear the screen and move the cursor to 0-0, defined sprites are removed, loaded bitmaps are kept

Insert / Delete
ESC[1@            Insert a blank character position (shift line to the right)
ESC[1P            Delete a character position (shift line to the left)
ESC[1L            Insert blank line at current row (shift screen down)
ESC[1M            Delete the current line (shift screen up)

Move cursor
ESC[H             Move to 0-0
ESC[f             Move to 0-0
ESC[s             Save the cursor position 
ESC[u             Move cursor to previously saved position 
ESC[(Row);(Col)H  Move to row,column
ESC[(Row};(Col)f  Move to row,column
ESC[nA            Move the cursor up n lines
ESC[nB            Move the cursor down n lines
ESC[nC            Move the cursor forward n characters
ESC[nD            Move the cursor backward n characters

Attributes
ESC[m             Reset all attributes
ESC[0m            Reset all attributes
ESC[1m            bold
ESC[4m            underline
ESC[5m            italics
ESC[7m            Turn on reverse color
ESC[27m           Turn off reverse color

Color attributes

color     FG       BG      FG high  BG high 
--------------------------------------------
black    ESC[30m  ESC[40m  ESC[90m  ESC[100m
red      ESC[31m  ESC[41m  ESC[91m  ESC[101m
green    ESC[32m  ESC[42m  ESC[92m  ESC[102m
yellow   ESC[33m  ESC[44m  ESC[99m  ESC[103m
blue     ESC[34m  ESC[44m  ESC[94m  ESC[104m
magenta  ESC[35m  ESC[45m  ESC[95m  ESC[105m
cyan     ESC[36m  ESC[46m  ESC[96m  ESC[106m
black    ESC[37m  ESC[47m  ESC[97m  ESC[107m

FG = foreground
BG = background
High = higher intensity

Note that setting colors is implemented in a limited way.
Combining attributes and fore/background in one Escape sequence is not supported
If you want to use for example

  ESC [1;31;104m (bold, red foreground, blue background)

you will have to use

  ESC[1m  ESC[31m ESC[104m

Printable character (>= $20): placed on screen where the cursor is, cursor moved to next position
Wrap around at end of line, screen scroll up when bottom line is reached 
post

SD/RTC Card System, xKIM and CP/M-65


The SD-Shield is a mass storage device designed by Bob Applegate for Corsham Technologies. He named it SD/RTC Card. Based upon an Arduino Shield, an SD card interface and RTC are made available to a computer like KIM-1 or 6800 based machines.
Bob developed supporting KIM-1 software called xKIM, as loadable on a standard KIM-1 or integrated in the KIM Clones and Memory expansions.
Corsham is no more, but you can still build one yourself by visiting Eduardo Casino’s remake or buy one ready made with a Pico at RetroSpy Technologies.
Eduardo also made a PAL-II adapter for the SD Card Shield.

The main functions of the SD Shield are to allow programs access to files on the SD card and get/set the time on the Real Time Clock.
The interface to the SD Card is described in the Remote Disk Protocol Guide..

The SD card Shield and the KIM-1 Simulator

The SD Card shield is emulated in the KIM-1 Simulator since version 2. It uses the second RRIOT PIA ports, so the LEDs and switched on the main windows are disabled when in use.
The emulator makes the SD card available as a folder on the disk of the computer, from now on called SDCARD folder. You can place any file there of interest there.

The contents of SDCARD in the KIM-1 distribution are

bootsdshield-kimrom.bin
bootsdshield.bin
bootsdshield.pap
CPM-BOOT.DSK
kb9.ihex
newimage.dsk
SD.cfg
xKIM.ihex

To start using the SD Card/RTC Shield go to the menu settings.

  1. Enable Corsham SDShield emulation
  2. Copy the folder from the KIM-1 Simulator setup distribution archive called SDCARD to your disk.
  3. Choose the Disk images directory pointing to the folder SDCARD. You will see the files on Disk 0 etc filled in, DSK files are for operating systems like CP-M/65. See below.
  4. Put the KIM-1 in TTY mode on the main window and start the emulator. The usual KIM prompt will appear and you are in the KIM-1 monitor.

Now you either start xKIM or CP/M-65.

XKIM on the KIM-1 Simulator

xKIM is developed by Bob Applegate to support his SD-Shield.
By adding SD Card/RTC Shield support to the KIM-1 Simulator by Eduardo Casino we can run xKIM there now!

KIM                                                                                              
0200 00                                                                                          
0201 48                                                                                          
E000 
E000 4C G

Extended KIM Monitor v1.8 by Corsham Technologies, LLC
www.corshamtech.com

>?
Available commands:

  ? ........... Show this help
  C ........... Show clock
  D ........... Disk directory
  E xxxx ...... Edit memory
  H xxxx xxxx . Hex dump memory
  J xxxx ...... Jump to address
  K ........... Go to KIM monitor
  L ........... Load HEX file
  M xxxx xxxx . Memory test
  O xxxx xxxx . Calculate branch offset
  P ........... Ping disk controller
  S xxxx xxxx . Save memory to file
  T ........... Type disk file
  K ........... Go to KIM monitor
  ! ........... Do a cold start


>C
Date: 03/25/2026, 15:16:47

>Disk Directory...
   bootsdshield-kimrom.bin
   bootsdshield.bin
   bootsdshield.pap
   CPM-BOOT.DSK
   kb9.ihex
   KIM-1 simulator start.jpg
   kim-1-sdshield.zip
   kimsimSETTINGS.jpg
   M2000.BIN
   newimage.dsk
   SD.cfg
   SDMP1.jpg
   SDMP2.jpg
   SDMP3.jpg
   SDMP4.jpg
   SDMP5.jpg

>T - Enter filename: SD.CFG
# SD Card Disk Configuration
# Format: drive:filename or driveR:filename (for read-only)
0:CPM-BOOT.DSK
1:newimage.dsk

>S 2000-2199
Enter filename, or Enter to display to console: K2000.BIN
..........................
>Disk Directory...
   bootsdshield-kimrom.bin
   bootsdshield.bin
   bootsdshield.pap
   CPM-BOOT.DSK
   K2000.BIN
   kb9.ihex
   KIM-1 simulator start.jpg
   kim-1-sdshield.zip
   kimsimSETTINGS.jpg
   M2000.BIN
   newimage.dsk
   SD.cfg
   SDMP1.jpg
   SDMP2.jpg
   SDMP3.jpg
   SDMP4.jpg
   SDMP5.jpg

>T - Enter filename: M2000.BIN
:102000001510922D4C000020902860A00CA900997A
:10201000922D8810FA4CD425A9FF8D942DA9008DFE
:102020009E2D60084898488A48AD942D3004A00041
:10203000911A68AA68A8682860A51A49FF2D952DED
:102040008D952DA51B49FF2D962D8D962D18602061
:10205000CD20A90F204325B02BA00CB11A8522A0BA
:102060001FB10E911A8810F920A923A00CB11AC52E
:1020700022F00AA9009002A980A00F911AA522A01F
:102080000C911A186020CD20206428A90F20432528
:102090009037A900A010911AC8C020D0F9A9E5A0D6
:1020A00000911AA901204325B01FA001B11A910E79
:1020B000C8C020D0F7ADB12DA000910E20AF26A949
:1020C0000120D22720A9231860A9FF3860A00EA9FB
:1020D00000911AA000B11A8D942D290FAACA1003DD
:1020E000AEB02DADB12D911A8A4CD42520D320202D
:1020F000A625206428A00EB11A10021860A90F208E
:01210000439B
:00000001FF
>
>L
Enter filename, or Enter to load from console: m2000.bin
.................
Success!

CP/M-65 on the KIM-1 and KIM-1 Simulator


Thanks to the work of David Given (who developed CP/M-65) and Eduardo Casino (who ported CP/M-65 to the KIM-1 with the SD-Shield (developed by Bob Applegate of Corsham Technology) and the addition of the SD-Shield simulation to the KIM-1 Simulator by Eduardo Casino I can run my Pascal-M compiler (written by Mark Rustad in 1977 and ported my Hans Otten to Lazarus and ported by david Given to CP/M-65)) on my PC in the KIM-1 Simulator (developed by me Hans Otten since 2019) compiling itself and showing it can compile ‘hello world’ program.

Pfff, long sentence showing that all this is made possible by many clever people!

Here a log of a session (captured by Teraterm connected to the KIM-1 Simulator).

KIM                                                   
0200 D8                                               
KIM                                                   
0200 D8 G                                             
                                                      
CP/M-65 for the KIM-1                                 
                                                      
A>dir                                                 
A: SCRVT100 COM : IMU      COM                        
A: IMU      TXT : SYS      COM                        
A: PASC     PAS : ASM      TXT                        
A: HELLO    ASM : DEMO     SUB                        
A: ASM      COM : ATTR     COM                        
A: BEDIT    COM : CAPSDRV  COM                        
A: COPY     COM : CPUINFO  COM                        
A: DEVICES  COM : DINFO    COM                        
A: DUMP     COM : LS       COM                        
A: STAT     COM : SUBMIT   COM                        
A: MORE     COM : BEDIT    ASM                        
A: BEDIT    TXT : DUMP     ASM                        
A: LS       ASM : CPM65    INC                        
A: DRIVERS  INC : ATBASIC  COM                        
A: ATBASIC  TXT : OBJDUMP  COM                        
A: MKFS     COM : ADM3ADRV COM                        
A: ADM3ATST COM : CLS      COM                        
A: LIFE     COM : QE       COM                        
A: SCRNTEST COM : VT52DRV  COM                        
A: VT52TEST COM : KBDTEST  COM                        
A: MBROT    COM : DS       COM                        
A: DS       TXT : PINT     COM                        
A: PASC     OBB : PLOAD    COM                        
A: HELLO    PAS : IMU3     TXT                        
A: HELLO    SYM                                       
                                                      
A>pint PASC.OBB PASC.PAS PASC.OBS                     
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: writeerr                                  
Processing: beginlin                                  
Processing: endline                                   
Processing: error                                     
Processing: stringsi                                  
Processing: nextchar                                  
Processing: insymbol                                  
Processing: enterid                                   
Processing: searchse                                  
Processing: searchid                                  
Processing: getbound                                  
Processing: hexout                                    
Processing: writeout                                  
Processing: bytegen                                   
Processing: wordgen                                   
Processing: genujpen                                  
Processing: plantwor                                  
Processing: skip                                      
Processing: test1                                     
Processing: test2                                     
Processing: intest                                    
Processing: constant                                  
Processing: comptype                                  
Processing: isstring                                  
Processing: simplety                                  
Processing: fieldlis                                  
Processing: typ                                       
Processing: constdec                                  
Processing: typedecl                                  
Processing: vardecla                                  
Processing: paramete                                  
Processing: procdecl                                  
Processing: ldcigen                                   
Processing: ldagen                                    
Processing: lodgen                                    
Processing: condgen                                   
Processing: loadsetc                                  
Processing: cspgen                                    
Processing: incgen                                    
Processing: load                                      
Processing: store                                     
Processing: loadaddr                                  
Processing: falsejum                                  
Processing: calluser                                  
Processing: selector                                  
Processing: variable                                  
Processing: processt                                  
Processing: readproc                                  
Processing: processt                                  
Processing: writepro                                  
Processing: newstate                                  
Processing: releases                                  
Processing: resetrew                                  
Processing: closepro                                  
Processing: assignpr                                  
Processing: getcomma                                  
Processing: ordfunc                                   
Processing: succfunc                                  
Processing: predfunc                                  
Processing: chrfunc                                   
Processing: oddfunc                                   
Processing: eofeolns                                  
Processing: callnons                                  
Processing: call                                      
Processing: opgen                                     
Processing: setexpre                                  
Processing: factor                                    
Processing: term                                      
Processing: simpleex                                  
Processing: expressi                                  
Processing: assignme                                  
Processing: compound                                  
Processing: ifstatem                                  
Processing: casestat                                  
Processing: repeatst                                  
Processing: whilesta                                  
Processing: forstate                                  
Processing: statemen                                  
Processing: body                                      
Processing: block                                     
Processing: stdnames                                  
Processing: enterstd                                  
Processing: enterstn                                  
Processing: enterund                                  
Processing: initiali                                  
Processing: compileh                                  
Processing: compilep                                  
Processing: skipspac                                  
Processing: getword                                   
Processing: findend                                   
Processing: openfile                                  
Processing: closefil                                  
Processing: dumperro                                  
Processing: cpascalm                                  
Compilation successful.                               
No compilation errors PASC.PAS                        
                                                      
A>pload PASC.OBS PASC.OBB                             
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 94 procedures                                    
Writing output file...                                
Closing output file...                                
Success.                                              
A>type HELLO.PAS                                      
program HelloWorld;                                   
                                                      
begin                                                 
    writeln('Hello from Pascal!')                     
end.                                                  
                                                      
A>                                                    
A>pint PASC.OBB HELLO.PAS HELLO.OBS                   
Pascal-M interpreter for CP/M-65: B66F bytes free     
Pascal-M compiler V2k1 for CP/M-65                    
Processing: hellowor                                  
Compilation successful.                               
No compilation errors HELLO.PAS                       
                                                      
B>A:pload A:HELLO.OBS HELLO.OBB                       
Opening input file...                                 
Opening output file...                                
Reading OBP...                                        
Seen 1 procedures                                     
Writing output file...                                
Closing output file...                                
Success.                                              
B>A:pint HELLO.OBB                                    
Pascal-M interpreter for CP/M-65: B66F bytes free     
Hello from Pascal!                                    
                                                      
B>                                                    
post

KIM-1 Simulator documentation

KIM-1 Simulator

Hans Otten, Eduardo Casino, 2019- 2026, Version 2.1.0


Contents

Introduction

The KIM-1 simulator is developed for personal use to aid in developing and testing software for the KIM-1. It is not meant to be a cycle exact complete KIM-1 emulation. Instead it shows as much as possible what is happening inside the KIM-1. So do not expect it to run the typical KIM games on the LED and Keypad.
Just for fun and a tribute, it looks and feels and functions as a real KIM-1. Console TYY mode and the debugger is what the purpose of this program is.
The program is developed on Windows, Linux and MacOs. Since the source is available, it will run anywhere the Lazarus IDE is available.

What is simulated

  • 6502 or 65C02 CPU (only documented behaviour)
  • KIM- LEDs and keypad
  • TTY in and out with local TTY console or serial port local or remote
  • 6530-002 and 6530-003 ROM
  • The suppress ‘echo TTYecho’ hardware
  • The TTY/LED input bit
  • KIM-1 Tape load and save
  • Apple 1 Wozmon monitor
  • MTU K-1008 Visable Memory video display
  • SD Card/RTCShield interface by Bob Applegate from Corsham Technology
    with CP/M-65 and XKIM operating systems

Limitations

What the KIM_1 Simulator does not do as the real KIM-1:

  • Light the LED segments from the RRIOTs outputs. Instead the SCANDS routine is intercepted and the LEDs show the hex output of location F9 FA FB.The simulation is not cycle exact enough to perform the KIM-1 way of flashing the LEDs. So some First Book of KIM type programs will not work.
  • The TTY in and out routines are intercepted and rerouted to an ACIA emulation. See the ACIA routines.
  • The upper pages are not mapped to the lower pages as in most KIM-1 configurations. The vectors at FFFA etc are pointing to the KIM-1 ROM vectors, so RESET. NMI and IRQ work.
  • Tape hardware is not emulated.
  • No hardware single-step via NMI, the debugger has much better facilities for that/
  • The CPU runs as fast the host CPU allows, and lets the host operating system do some work like key and display and other applications running and continue the emulation loop until the user stops the 6502 CPU.
    The speed is herefore dependent on the host CPU. Running the classic Clock program, showing a HHMMSS clock on the LEDs, on my Intel core I7 one minute real time has the clock show 1 hour 37 minutes.
    The CPU is halted every 1000 clock ticks to let the GUI of the program a chance to handle mouse and keyboard and screen updates like the stop key.
    This works well on the Intel PC, the Raspberry is sluggish to unusable in responding to GUI events if in keypad/LED mode. Dropped form distribution!
  • The CPU emulation may not be perfect, only valid and documented opcodes are implemented, especially ADC and SBC have many, not emulated here, undocumented issues.
  • IRQ handling is not present in this version, see planned enhancements. NMI key works, as does Reset.

Enhancements

The KIM-1 Simulator is a KIM-1 with:

  • 6502 or 65C02 CPU (make the choice in the Debugger)
  • RAM to $1400
  • RAM from $2000 to $FF00
  • ACIA 6850 at $1600 (equal to Corsham’s I/O card)
  • ROM at $1500 with 6850 ACIA support at $1620
  • Pages E and F are not mapped to page 0 and 1 as in most expanded KIM-1’s.
  • LEDs and switches to the user RRIOT Port A and B
  • Switch between TTY and LED/keypad
  • Emulation of the hardware echo of TTY console input, and echo suppression trick
  • MTU K-1008 Visable Memory
  • SD-Shield Corsham Technologies at user RRIOT port

    Installation

    Downloads

    Setup for Windows and Ubuntu and Raspberry Pi 5 and macOS, Version 2.1.0
    Source (requires Lazarus IDE 2.x))
    Bundled with Conversion 8 bit hex formats utility, to convert to/from various binary files like MOS Papertape, Intel Hex, Motorola S-record and more.

    Windows
    Run KIM1SIMsetup.exe or place the files KIM1SIM.EXE file in a folder of choice.

    For high DPI screens change the Properties of the KIM1SIM.EXE, Compatibility settings,
    – Change high DPI settings,
    – check high DPI scaling Override,
    – scaling performed by “System(enhanced)”.

    Linux (Intel, Raspberry Pi)
    Execute KIM1SIM from the folder where you unpacked the Linux archive Works fine on a modern PC.
    Note that the font used is Courier New. Install ttf cour.ttf on Linux in .home/.fonts to prevent substitution with artifacts

    macOS

    • Unzip the file
    • Move the KIM1SIM app to Applications
    • Remove quarantine:
      $ xattr -dr com.apple.quarantine /Applications/KIM1SIM.app

    After installation

    Start the KIM-1 Simulator and choose Settings to set the default working directory. Otherwise files may appear at locations you do not want!
    Read the SD-Shield instructions how to use CP/M-65 or XKim.

    Other platforms
    If Lazarus is available then install Lazarus (Version 2 or higher) and build from source.
    Extra package required is LAZserial, install via the package manager.
    Open the project KIM1SIM.LPI and do RUN – Build to get an executable.

    How to use as a KIM-1

    Start the emulator main program and push the ‘Run’ icon. Then press the RS key on the keyboard (or type R).
    After that the LEDs awake and the keyboard is operational as a KIM-1.

      [0] to [F]  -   Sixteen keys used to define the hex code
                      of address or data
    
      [AD]  -   selects the address entry mode
    
      [DA]  -   selects the data entry mode
    
      [+]   -   increments the address by +1 but does
                not change the entry mode
    
      [PC]  -   recalls the address stored in the Program
                Counter locations (PCH, PCL) to the display
    
      [RS]  -   causes a total system reset and a return to
                the control of the operating program
    
      [GO]  -   causes program execution to begin starting
                at the address shown on the display
    
      [ST]  -   terminates the execution of  a program and
                causes a return to the control of the
                operating program
    

    Besides pressing the keys on the KIM keyboard on the screen you can also use the PC keyboard:

      0-9 : key 0 - 9
      a-f : key A - F
      A-F : key A - F
      +   : +
      A   : AD 
      D   : DA
      P,p : PC
      G,g : GO
      S,s : ST
      R,r : RS
      S,s : ST
    

    TTY mode, console or serial

    Press the TTY switch and run/stop and you have a simple console terminal. The KIM-1 teletype commands now work and also programs line KB9 Basic can be used. See the TTY Console page.
    You can also, via settings, choose to have all TTY input and output got via a serial connection on your system. With some tools it can even be a local terminal emulator. See the TTY Serial page

    KIM-1 Tape load and save

    You can switch tape/load emulation off in Settings.

    The KIM-1 tape load ($1873) and save ($1800) programs are emulated. You will see prompts when you start these from the emulator.
    Fill in the tape ID and optionally start and end address as documented in the KIM-1 User manual.
    Start the Save at $1800 and the load at $1873 with the KIM-1 monitor.
    You will be prompted for file to load or save.

    Default working directory and other settings

    Use the menu Settings to display the possible settings that survive sessions.
    – Set default work folder to choose a folder for all files created or used by the emulator. The settings are saved between sessions.

    Default settings config file on Windows : “/home/(user)/.config/KIM1SIM.cfg” or C:\users\(user)\Appdata\local\KIM1SIM.cfg”
    Loaded at startup, updated via the Settings menu.

    Note the SD Card/RTC Shield emulation has its own SDCARD working directory and configuration save options.

    Load and Save

    The menu has Load and Save functions, you can load and save to many 8 bit binary formats as MOS papertape, Intel HEX, Motorola S record, binary and simple hex.
    The 16 bit versions of Intel Hex etc are not supported.

    The Define Type is a text file format output suitable for inclusion in assembler source.
    The layout is as follows (all in hex)

    ; <Start address> - <end address>
            <define text> $<hex data>
    		 ..
    where <define text> is what you fill in the Define text entry, may be empty.
    
    Example:
    ; 1800-1805
            .byte $A9
            .byte $AD
            .byte $8D
            .byte $EC
            .byte $17
            .byte $A9
    

    Console and the keyboard

    The debugger

    From the menu Simulator choose Debugger to show the debug window. This windows has step/single step/run buttons, shows the registers and flags, zeropage, memory and the stack. The Trace logfile facility may store a trace of what happened.The disassembler part shows a disassembly.

    Several refresh buttons let you update the current state of the machine.

    Single step, RUN, trace log

    First set the PC to the first instruction of the program to test.

    • Step in: execute next instruction
    • Step over: execute next instruction but skip JSR subroutines
    • RUN: execute at maximum speed ( wait 0) or slow (wait x seconds between steps), use the STOP button to halt execution
    • Step n: execute n instructions full speed
    • Run to: execute instructions full instructions until the breakpoint or watchpoint location is reached or STOP pressed
    • You can set 1o code breakpoints, 10 memory watch points and wacthpoinst on registers A,X,, Y and Stackpointer, press the Breakpoints and Watches button to show the form to fill in as desired.
    • Trace log on/off: first set the Trace log file directory from the file Menu, then use any Step to have every instruction logged with status in the logfile and the tracelog.Note that this slows down execution a lot and the files can become large. So clean up regularly!
      The file name of the log is set to KIM1SIMtrace(datestamp).log.

    From the Search Memory you can Search with hex 1,2 or 3 bytes in memory (leave unwanted fields blank), Fill memory and Copy/Move memory.
    With a fill byte you can replace the moved bytes, leave the field empty to leave the original value.

    Symbol table and the disassembler

    The disassembler shows locations/labels in hex format. If the assembler symbol table is available (TASM can produce that as blank delimited list) you can load it and do some symbolic disassembly.
    Load and show the symbol table from the menu “Symbol table”. Supported symbol table formats: TASM 32 bit and CA65 (part of CC65 suite).

    RRIOT status display

    From the menu Simulator choose RRIOT to show a windows with the current RRIOT status or you can enter new values for the various registers.
    Press Refresh to update to the current state, it is not updated realtime.
    The 6530-002, responsible for the KIM-1 hardware, is decoded to the relevant in/output bits.
    Note that the simulator does not perform the KIM-1 LED/key functions this way. Code for output to the LED displays is currently present but commented out in the source.
    Timing limiting is essential for this to work, the simulation now runs as fast as the host CPU can deliver.

    The Profiler

    Available from the ‘watches and breaks’ form or from the Window menu
    This facility keeps track (once activated with the Profiling Check box) how much an instruction is executed,
    Independent of the debugger, always available.

    Use the Refresh button to see the current state, not automatically updated so it is not a high performance hit.
    Any opcode, from 0 to 255, is counted. The display shows the maximum 65C02 instruction set.

    You can save the profiler data to a CSV file, with instruction mnemonic and number of times executed per line.
    Invalid instructions are marked as ‘Unknown’.

    Focal V3D from the KIM-1 Software page

    Focal V3D, an interpreter modeled after the DEC PDP-8 Focal interpreter runs on the KIM-1 and on the Simulator.
    This program uses a trick to suppress the echoing of charaters typed on the KIM-1 TTY hardware. And another trick to get a hash/random number.
    After loading both zeropage and program code, start at $2000. But first go to sSettings and choose Focal Break testing.
    Only when running Focal! Set to Normal break testing for e.g. MS Basic. This setting is not saved, and resetting the emulator makes the setting to Normal.

    Example programs

    In the Setup archive a folder with TTY programs are collected. Note that manuals etc are on the Retro website.

    kb9.bin	load 2000 start $4065 Microsoft KIM-1 Basic 9 digits (upercase only, set 00F1 to 0)
    kb6.bin	load 2000 start $3D50 Microsoft KIM-1 Basic 6 digits (upercase only, ROR instruction patched + CLD)
    kb9V2.bin	load 2000 start $3F8E Microsoft KIM-1 Basic 9 digits (upercase only, ROR instruction patched + CLD)
    
    kimGFX.BIN 	load 2000 start 2000 Demo for K1008 video display Dave Plummer
    kimGFX1.BIN	load 2000 start 2000 Demo for K1008 video display Dave Plummer
    
    kim1sim6502test.ihex start 2000 65(C)02 opcode test (lower case y/n)
    
    Focal 
    Please set in Settings Focal3D break setting 
    focalzp.bin load $0000 
    focalm.bin  load $2000 start 2000 
    
    Printing disassembler
    PRDISV3.PAP start B000
    

    Compiling and building the simulator from source

    Prerequisites

    • A modern PC and operating system. Windows 10/11 is where the software has been developed, Ubuntu are tested and binaries included.
    • Development (Compile and run everywhere!) with Freepascal and Lazarus IDE, see https://www.lazarus-ide.org/
      Any Lazarus version above 2.0 will be OK.
    • The archive with the KIM-1 Simulator sources KIM1SIMsourcesxxx.zip.
    • Unpack in a folder, avoid blanks in folder and filenames
    • Start the IDE by clicking on KIM1SIM.lpi
    • Build with Run – Build
    • On Windows a Setup installable can be made with Inno Setup, KIM1SIM.iss and compile with Inno Studio.

    Note that the font used is Courier New. Install ttf cour.ttf on Linux in .home/pi/.fonts to prevent substitution with artefacts

    The include files with KIM ROM and 6502 code

    If and when the ACIA routines and other routines in the KIM1SIM ROM are altered you need to rebuild the KIM1SIMrom.inc file.
    Subfolder ‘romtoconst’ contains the binary of the original KIM ROMS (6530-002.bin, 6530-003.bin) and the additional ROM binary with ACIA routines (kimsimrom.bin).
    The .inc files for the compilation of the KIM1SIM, to be placed in the main folder, are created with the program creatINC.exe, a console application (source included here).
    Copy the the tree .inc files to the main folder and compile the KIM1SIM program again.

    D:\myfiles\development\kim-1 simulator\romtoconst\creatINC.exe
    kimrom002 include file created
    kimrom003 include file created
    kimsimrom include file created
    

    Folder KIM-1 assembler sources

    Here you find assembler sources of various tests. Assemble with TASM, included in the folder. See TASM.HTML for information.
    It is convenient to compile from an editor like Notepad++, plugin NPPEXEC
    with command to create intel hex file

    "D:\myfiles\development\kim-1 simulator\KIM-1 assembler sources\tasm" -65 -x3 -g0 -s $(FILE_NAME) $(NAME_PART).ihex  $(NAME_PART).lst  -s $(NAME_PART).sym
    

    or to create a binary file with

    "D:\myfiles\development\kim-1 simulator\KIM-1 assembler sources\tasm" -65 -x3 -g3 -s $(FILE_NAME) $(NAME_PART).bin  $(NAME_PART).lst  -s $(NAME_PART).sym
    

    Note that also symbol files are generated which can be read in by the debugger in the KIM-1 Simulator.

    • kim1sim6502test.asm : The 65(C)02 test, a program that runs on the TTY console
    • kimsimrom.asm : the source of the KIM-1 Simulator ROM at $F000 with ACIA support for KIM-1 TTY in/out
    • Various snippets used to test the CPU emulation


    Use the Apple 1 monitor (Wozmon)

    Load in Settings the Apple 1 monitor (wozmon) into the free space of the KIM-1 tape ROM.
    Start at $1AA0, back to KIM-1 monitor with ‘X’ command.


    Changelog

    • V 0.9 October 2021 First public beta
    • V 0.9.1 November 2021 Fixed key 0 bug (Thanks Liu!)
    • V 0.9.2 November 2021 Scrollbars in Load/Save dialog boxes added, Linux tests
    • V 0.9.3 November 2021 Added CC65 format symboltable load, added search in symbol table, fixed label display error in disassembly
    • V 0.9.4 December 2021 emulated getch in kimsinrom.asm now returns with Y=$FF
    • V 0.10.0 January 2022 Added 10 breakpoints and 10 watch points in debugger
    • V 0.10.1 January 2022 Save memory bug solved
    • V 0.10.2 January 2022 Watchpoints on registers and Stackpointer added
    • V 0.11.0 January 2022 Profiler (count how much an opcode is executed) added, Windows main menu to get fast to one of the forms
    • V 0.12.0 February 2022 Console cursor control (not finished yet)
    • V 0.13.0 February 2022 Main screen updated, more help entries. Console updates (on screen menu for colors) and KIM-1 tape load and save emulation
    • V 0.13.1 February 2022 Tested on Ubuntu, small updates and bugs fixed
    • V 0.13.2 February 2022 Settings for work directory, KIM tape load/save added to Save/Load memory
    • V1.0 February 2022, all planned functionally implemented (the console is now ANSI color enabled)
    • V1.0.0.1 February 2022, NumLock numeric keypad added, request for keyboard layout tests: testkeydown program added
    • V1.1.1 March 2022 KIMDLE works: free running timer at $1704 and KIM keyboard fixes (now key returns $15)
    • V1.1.2 March 2022 Settings for keyboard layout (US International and German for now), key handling KIM keypad and keyboard/console improved, free running timer
    • V1.1.4 April 2022 Improved design, use of debugger Run buttions stops main Run/Stop run state
    • V1.1.5 August 2022 Save to Define Byte file added, Belgium(french) keyboard layout (tnx Pascal Duquenoy )
    • V1.1.6 September 2022 Suppress echo on console like the KIM-1, Focal V3D supported
    • V1.1.7 15 November 2022 Tape load/save checksum overflow fixed
    • V1.1.8 25 January 2023 Windows 11 keypad shows white image when key pressed, now nothing seen when pressed.
    • V1.2.0 30 April 2023 MTU K-1008 Visible Memory implemented
    • V1.2.1 19 May 2023 Raspberry Pi added again, compile options optimization high, no debugging
    • V1.2.2 30 May 2023 Cleanup all targets and docs. Example programs like MS Basic added
    • V1.2.3 6 June 2023 Stricter RAM boundaries in Read memory
    • V1.2.4 25 June 2023 Auto scroll bars added for larger forms like debugger. profiler
    • V 1.3.0 August 2023, V1.1.8 and changes from V1.2.4 merged
      • Auto scroll bars added to larger forms
      • Example programs added
      • Save and load to file formats bugfixes
      • Convert 8 bit Hex format program included in release
      • SST switch on keypad shows debugger window
      • MTU K-1008 Visible Memory implemented with example programs
    • V1.3.1 K-1008 video display updated with File load, Tape load and debugger Refresh button
    • V1.3.2 K-1008 images can be loaded from C header files images with GIMP, straight or dithered
    • V1.3.3 K-1008 images can be shown in normal window or stretched to correct aspect ratio
    • V1.3.4 August 31 2023 Read text file to console improved, improved K-1008 settings
    • V1.3.5 October 2 2023 Read text file to console for UNIX and DOS line endings.
      Search in Memory, Fill memory and Move/copy memory added to Debugger menu
    • V1.3.6 October 10 Added Commodore PRG formatted files (binary, starts with load address low byte, high byte
    • V1.3.7 Debugged and tested the VT100 codes in the console
    • V1.3.8 November 2023 Console now only shows ASCII code 32-126, to get Tiny Basic working.
    • V1.3.9 December 2023 TIM format, all forms show in taskbar Windows, bug fixes, file types shown in load, setup with logo
    • V 1.4.0 February 2024 Console escape sequence handling improved, more robust, added documentation on color setting, wozmon loaded in Settings
    • V 1.5.1 November 27 2025. Support ROM moved from F000 to F800. RAM now available 2000-F7FF.
    • V 1.5.2 KIM1SIM ROM moved to $1500
    • V 1.5.3 2025 Stripped KIM1SIM ROM to fit in 1500-1600
    • Can run the KIM-5 Resident Assembler loaded at E000-F7FF

    • V 1.5.4 Tape emulation is a setting now
      TTY console windows stays open if switched back to LED display, display dimmed as KIM-1 does. Switch back to LED display works if RS pressed
    • V 1.6.0 December 2025 Serial input/output local or Remote
    • V2.0.0 March 2026 SD Card/RTC Shield emulation with CP/M-65 and xKIM added by Eduardo Casino.
      Universal keyboard driver, no more language keyboard settings

    • V2.1.0 April 2026 K-1013 CP/M-65 and CODOS emulation by Eduardo Casino

The White KIM-1

Recently I acquired a ‘white’ KIM-1. Most revisions were made of green PCB material.
Rev D and Rev E were also made in blue.

This one is a Rev D with a ‘white’ PCB. The KIM-1 is working as you can see.

The ‘white’ KIM-1 as received, working but awful to look at

But the previous owner did some horrible work on it. Most IC’s were unsoldered and placed in some kind of IC sockets. The desoldering did quite some damage to print traces.
Many traces were covered with solder. Solder remains everywhere, very dirty brown spots of solder resin. Wires soldered on the connector, and the A-K wire on the board itself.

The biggest crime is the keyboard that was handmade on experimenters board. With quality switches, but with an awful appearance. It works, but it had to go.

With the DIY keypad method, based upon the work of Eduardo Casino and Pete (peo2000) I replaced the keyboard with an acceptable replica. Not too easy and tidy since the print traces were damaged

With a replica keyboard, wires and excessive solder removed and a good clean with alcohol and a brush the white KIM-1 may join my collection.

KIM-1 replica keypad

A spare KIM-1 keypad is even rarer than a KIM-1 itself. With this guide you can build a reasonable replica of the keypad.

Thanks to the work of Eduardo Casino (the PCB) and Pete (peo2000 on forum64.org) I have published a DIY guide for a good looking KIM-1 keypad replica.

post

DIY KIM-1 Keypad

The keypad mounted on a real KIM-1! It fits very well.

A spare KIM-1 keypad is even rarer than a KIM-1 itself. With this guide you can build a reasonable replica of the keypad. Updated 21 april 2026 with enhanced 3D STL designs.

Parts you need

  • PCB as designed by Eduardo
  • 19 SMD switches TL3305A
  • A slide switch JS102011SCQN
  • 2 Keypads, as source of keycaps scavenged from keypads sold as AZ-Delivery 4×4 Matrix Keypad, also available cheap on AliExpress.
  • 3D STL of frame, either with ON text embossed or without (see below)
  • 3D printer, black PLA filament or balck resin, depending on your 3D printer. Or send it off to a 3d printing service. I have used black PLA, my friend Gerben Voort a professional 3D printing service in resin and sanded.
  • At least 3 small self tapping screws
  • Several self tapping screws to connect the kaypad to the KIM-1 PCB from underneath
  • A label printer like the Dymo Pocket with White on Black tape 9 mm

Step 1. Populate the PCB with switches

Get the PCB as designed by Eduardo Casino. The design is available at his github archive. Sent the gerbers to your favorite PCB factory, I use JLCPCB. Surface mount switches and slide switch. Solder one leg first of all switches. Check if the switches are nicely in line with the others. Move if required. Only when you are satisfied with the position of all switches, solder the other legs. Fine tip, not too much solder. Next solder the two wires (A to A, B to B) on top of the PCB.

Step 2. Print the frame and the slide switch button

Depending on your printer and wish to be close to the original a choice of two 3D designs has to be made:
  1. The 3D design by Pete (peo2000 on forum64.org) You can print his one with the front on the bottom. No supports required, use fine resolution. That delivered on my 3 printer a quite smooth end result.
  2. The design enhanced by me with the embossed text ‘ON’ like the original keypad of the KIM. And a small cutout, and ribbles on the SST switch This one needs to be printed with the front of the frame on top due to the embossed text. So it needs supports. This means quite some afterwork to remove the artefacts and the top is not as smooth.
  3. The slide switch button is quite small, print in highest quality with a brim.
My friend Gerben Voort uses a 3D printing service. In resin black a near perfect result is achieved.

Step 3 Add the keys

The printed frame is meant to be used with keys scavenged from 4×4 keypads. Break the 4×4 keypad open and take the keys out. As you can see, keys 0,,9 and A..D can be used right away. The other keys (E, F, AD, DA, ST, RS, PC, +, GO) need a label. I print those with a cheap Dymo Pocket printer with white on Black 9 mm tape. The ‘E’ and ‘F’ are printed ‘wide’, the other in normal width. Cut the label to the right size and put them on the keys. I wish the color white was a bit more white, and the font more like the the other keys, but it is the best I can do with this label printer. Insert the keys in the frame with the frame top on the table. Put the slide switch button on the slide switch.

Step 4 Combine PCB and frame

You now have a PCB with switches and a frame with keys. Put the PCB on the frame and screw some small self tapping screws in the PCB into the frame.

The last step

Check if all keys ‘click’, as in this video.
Now you can mount the keypad on your KIM-1 with some self tapping screws from the backside of the KIM-1 into the keypad. Do not forget the wires on top of the PCB (A to A, B to B).

A-ONE Apple 1 replica family 2025

In 2025 Franz Achatz revived the A-ONE Apple 1 replica. The excellent design is refreshed, a new family member added: the A-ONE PLUS.

I now have the 2025 standard board, the 2025 PLUS and the 2006 EXTENDED. With the prototype boards with and without breadboard and the 2025 cassette interface.

Read all about the A-ONE here.

My Apple 1 Replica and the A-ONE PLUS

Proton Electronics

The Dutch based firm Post Electronics produced and sold lots of electronic components and computer systems.
Like the 6502 based PC-1, PC-2, PC-3, and PIM-1 and the Z80 based CB80. They also created Ultiboard, the PCB design software that became their future in the USA.

On the PROTON pages you find images, scans and software for some of these systems.With thanks to Dirk Prins for most of the material.