Original KIM-1 ROMs reproduced

I have two sets of KIM-1 ROMs. One set is the original KIM-1 dump by Dwight Elvey, in which the filler bytes (unused locations in the ROM) are filled with $00.
Alas the dumps by Dwight have a couple of bit errors and the NMI vector is wrong.

The other set is the result of assembling the source in which the assembler used $FF for the filler bytes. It makes sense to use $FF, since EPROMs can be programmed byte for byte ‘1’ later to ‘0’s.
Functionally the filler byte is irrelevant, so I present here the ROMs with filler byte 00 (corrected Dwight original KIM-1 dumps) and filler byte FF (assembly result).

6530-002 $1C00-$1FFF, filler bytes $FF 6530-002 ROM
6530-003 $1800-$1BFF, filler bytes $FF 6530-003 ROM

6530-002 $1C00-$1FFF, filler bytes $00 6530-002 ROM
6530-003 $1800-$1BFF, filler bytes $00 6530-003 ROM

post

Ruud Baltissen: Build a KIM-1

Ruud Baltissen started the whole KIM-1 Replica world by publishing a page many years ago about Building a KIM-1
All replica’s, from the MICROKIM to the Nachbau followed his design.

Replicated here the are relevant text and schematics by Ruud.

Build a KIM-1

The goal of this project is to rebuild the KIM-1. This isn’t “Just take the schematic of the KIM and go ahead!”. The KIM-1 uses two 6530s that are custom ICs and therefore cannot be bought in any shop. This project uses replacement parts.
The troubleshooter: 6530
As said, the KIM-1 has two 6530s on board. For more info about this IC, please read about the 6530 here. Anybody who is a little bit familiar with the hardware market can tell you that you cannot buy the 6530 as a regular part. And the 6530 is a custom IC: Commodore made various types but all were branded 6530. For example, the 6530 found in the CBM 4040 drive is different from the ones of the KIM. Even the two 6530s of the KIM itself are different: in this case it is the content of the builtin ROM.
Happily enough there is another IC available that can be used as replacement: the 6532.

The 6532 has 16 I/O lines, an internal timer and 128 bytes of RAM onboard, but no ROM. For this project we’ll use an external EPROM as replacement. The pin out of the 6532 is completely different but that should not be a problem.
Another difference is that a 6532 has pin PB6 available where a 6530 hasn’t. See it as a bonus as I haven’t found any reason how it could jeopardize our project.
The 6530 can generate a IRQ but in case of the KIM-1 this feature isn’t used. The main reason is that pin PA7 is needed to output the signal and it is used for other things. The 6532 has a separate IRQ output. I used two jumpers, J54 and J5, to enable someone to use this function if needed.
The last and major difference however lays in the way the registers are selected:

function:       RS:  A6:  A5:  A4:  A3:  A2:  A1:  A0:  R/W: 
                                                            
RAM              0    x    x    x    x    x    x    x    x   
                                                            
DRA              1    x    x    x    x    0    0    0    x     A
DDRA             1    x    x    x    x    0    0    1    x     B
DRB              1    x    x    x    x    0    1    0    x     C
DDRB             1    x    x    x    x    0    1    1    x     D
                                                            
PA7, IRQ off,                                               
      neg edge   1    x    x    0    x    1    0    0    0     F
PA7, IRQ off,                                               
      pos edge   1    x    x    0    x    1    0    1    0     G
PA7, IRQ on,                                                
      neg edge   1    x    x    0    x    1    1    0    0     H
PA7, IRQ on,                                                
      pos edge   1    x    x    0    x    1    1    1    0     I
                                                            
read interrupt                                              
       flag      1    x    x    x    x    1    x    1    1     E
                                                            
read timer,                                                 
       IRQ off   1    x    x    x    0    1    x    0    1     J
read timer,                                                 
       IRQ on    1    x    x    x    1    1    x    0    1     K
                                                            
Clock / 1,                                                  
       IRQ off   1    x    x    1    0    1    0    0    0     L
Clock / 8,                                                  
       IRQ off   1    x    x    1    0    1    0    1    0     M
Clock / 64,                                                 
       IRQ off   1    x    x    1    0    1    1    0    0     N
Clock / 1024,                                               
       IRQ off   1    x    x    1    0    1    1    1    0     O
                                                            
Clock / 1,                                                  
       IRQ on    1    x    x    1    1    1    0    0    0     P
Clock / 8,                                                  
       IRQ on    1    x    x    1    1    1    0    1    0     R
Clock / 64,                                                 
       IRQ on    1    x    x    1    1    1    1    0    0     S
Clock / 1024,                                               
       IRQ on    1    x    x    1    1    1    1    1    0     T

In total 5 address lines are used, meaning 32 registers. But 11 of the 19 registers have one or more mirrors.

Read:          J E J E         K E K E         J E J E         K E K E 
Write:         F G H I         F G H I         L M N O         P R S T 
R/W:           A B C D         A B C D         A B C D         A B C D         

As we can see, the last 16 registers equal the 16 of the 6530 itself. So now we have to develop some logic which will do the following:

  • The I/O of the 6532 is only visible within a range of 64 bytes
  • The first 16 bytes represent register 16 to 31
  • The next 48 bytes are mirrors of the first 16
  • Only 64 bytes of RAM are used

Conclusion:

  • Input A6 won’t be used and can be tied to GND
  • Input A4 is connected to address line A4 of the 6502 via a NAND gate.
  • The second input of that NAND gate is connected to the /CS2 input.
    The idea behind this is simple: The moment that the I/O part of the 6532 is selected, the NAND gate outputs a (H) thus selecting the wanted last 16 registers. If needed, the user can select the other 16 registers as well by connecting the second input of the NAND gate to +5V.
  • A 74LS138 enables the /RS and /CS2 lines at the right moment.

ROM and RAM
Here we have a luxury problem. We only need 2K of (EP)ROM like the 2716. The problem is that the 2716 is hard to find and more expensive then the 2764 or its bigger brothers. When we use a bigger EPROM we could tie the unused address lines to GND.
The same problem occurs with the RAM. In this case I have chosen for a 62256, a 32 KB RAM. This looks like a massive overkill but see later.
If we have to use bigger RAMs or EPROMs anyway, it is quite easy to use other parts of that chip by OR wiring the CS line with more Kx outputs of the main 74145. In case of the EPROM we also can connect switches to the surplus address lines and have the advantage of a multi-KERNAL system.

Extra address range
KIM-1 only supported an address range of 8 KB in the first place. The pin DECEN at the Userport can be used to extend that range but HAS to be connected to GND for the original configuration. The idea is that external cards can use this input to alter the range.
I added an extra 74145, IC7, and two jumpers that enable the user to make a more efficient use of the hardware. Both jumpers, J2 and J3, have to be closed to start with.
If you don’t want to use the 74145 at all, only close jumper J1.

The first thing one can do is to let the binary start at address $F800. Your self built KIM will still behave as usual. Now you can add your own RAM from address $0000 on up to $E000 and the only thing you have to do is remove jumper J2.
If you are only interested in adding RAM, a better idea is to use the original one, IC4, the 62256 32 KB RAM. You only have to remove the jumpers J13..17 and to close one or more pair of pins of jumper block J18. By closing all four pair of pins you make use of the full 32 KB.
Jumper J3 is only needed if you want to expand your self built KIM even further and want to use, for example, the $E000/$FFFF range for (EP)ROM.

Schematics of the new KIM-1

What are the major differences with the original schematic?

  • Replacement of the 6530s by 6532s.
  • Addition of two NAND gates to handle the 6532s.
  • Addition of an EPROM.
  • Replacement of the 6108 RAM ICs by a 62256 or equivalent 32K*8 SRAM.
  • Addition of a 74LS138 to decode the RAM and I/O of the 6532s.
  • The resistor for K6 has been dropped.
  • Addition of jumpers to enable the combination of other K lines.

KIM-1 PAL-1 KIM CLone KIM MicroKIM Reproduction resources

This page is a Work in Progress since November 2022!

The clones of the KIM-1 that appeared the last years have renewed the interest of the retro scene.

Old software is restored or typed in again and adapted to the current use of serial terminal emulators and cross assemblers instead of the hardcopy Teletype interface and native assemblers of the old days.

This site contains a lot of that material already. There I have tried to collect all older original material.

Here a link of current websites with relevant material. As usual, a list of external links always will suffer of bitrot, so please report dead links!

Netzherpes, by Nills. Very active PAL-1 user. Lots of older software newly typed in.

KIM IEC, Dave McMurtrie’s 1541 Routines for the KIM-1

See also the Nachbau KIM-1 IEC/RAM card page.

SD card on PAL-1 https://github.com/ryaneroth/sdcard6502

https://www.youtube.com/@masterhit1/videos masterhit Nils

https://www.youtube.com/watch?v=CovNzC3jdGo KIM Venture

https://www.youtube.com/watch?v=d88M8gFSzWE startrek

https://github.com/w4jbm Jim McClahanan
https://www.youtube.com/@W4JBM/videos https://www.youtube.com/watch?v=UThleUTNTBM

PAL- stores/tkoak/
https://www.tindie.com/stores/tkoak/
http://pal.aibs.ws/support

Debug packages
1541
Lilbug
Basic games

Tiny Basic

https://github.com/GrantMeStrength/KIM1

Jim

https://github.com/w4jbm/PAL-1-6502-SBC

KIM-1 Computing Focal etc

KIM-1 Computing

PAL-1 Hacks
https://github.com/kaveenr/PAL-1-HACKS

https://netzherpes.de/
https://github.com/netzherpes
https://www.youtube.com/user/masterhit1
https://drive.google.com/drive/folders/1-S3AI-qszLDSes50MERtx1RNl9KefTs7

KIM IEC

https://commodore.international/kim-iec/

CC65 pathches
https://github.com/davepl/cc65

Jeff Tranter
https://github.com/jefftranter/6502/tree/master/asm/KIM-1

Discussion forum for PAL-1
https://groups.google.com/g/pal6502

twitter friends

@LiuGN PAL-1 desigenr/tindie
@masterhit netzherpes
@Devilish_Design (KIM-1 clone)
MOS KIM-1 Reproduction Kit https://www.ebay.co.uk/itm/225209469024

http://www.corshamtech.com/product-category/kim-1-products/

Bob Applegate Corsham Technologies
https://github.com/CorshamTech
http://www.corshamtech.com/product-category/kim-1-products/

Focal runs on KIM-1 Simulator

KIM-1 Simulator version 1.1.6 has been published. Get it here.

It now supports Focal-V3D 12-AUG-77 (the Aresco version) from the KIM-1 Software page, see here.

Updates to the Simulator are a working echo suppression (see here for background). Available to any program.

For Focal V3D a setting has to be made in the Settings, to allow Focal to do its magic in the input routine.

By working on Focal I did add comments to the disassembly of what I found. You will find the original by Paul R. Santa-Marie and my partly commented version in the archive.

macOS compiled version of KIM-1 Simulator

Thanks to user hobo of https://groups.google.com/g/pal6502 a macOS compiled app is now included.

post

KIM-1 programs by Nils

Nils a.k.a. netzherpes typed in a number of KIM-1 programs to run on his PAL-1, the KIM-1 compatible clone.
Not only does he types them in in assembler, some even by contacting the original author!, tests the programs and also provides source and ready to run binaries or papertapes.
And he draws nice looking cover images!

On his github page he has the most recent versions and adds new programs regularly.
Also checkout his blog!

Here a summary of the programs:

Banner for KIM-1

KIM-1 Banner
by Jim Zuber
from KIM USER NOTES #18

Download here!

Battleship

You have 20 shots to detect a 3×1 ship on a 8×8 grid. The ship can be aligned horizontal, vertical or diagonal.
How to play: Enter the coordinated and fire (Button F). If you hit the ship, the mostright counter will jump to 01.
If you hit all 3 coordinates of the ship, you won, the display will show “dEAd” and the number of shots used.
(c) 1978 Roland Kushnier (orig)
(c) 1979 Jody Nelis (bugfix)

Download here!

Target 1 for KIM-1

Little shooting game for the KIM-1
June 18th, 1979
(C) Fer Weber

Download here!

Target 6 for KIM-1

The 6 column Version of Fer Webers Target1 Shooter Game (https://github.com/netzherpes/Target1-for-KIM-1)
Author Fer Weber
published in KIM Kenner 8 on 18.06.1979

Download here!

Telefonbuch for KIM-1

original title: “Datensuche”
by Herwig Feichtinger
(c) 1981 in Anwendungsbeispiele für den Mikroprozessor 6502

Download here!

Phonebook 2.0 for KIM-1

original title: “Datensuche”
by Herwig Feichtinger
(c) 1981 in Anwendungsbeispiele
für den Mikroprozessor 6502

Download here!

Pocket Calculator for KIM-1

by Siep de Vries, KIM Club The Netherlands
INPUT/OUTPUT IS EITHER TELETYPE
OR KIM KEYBOARD AND DISPLAY

Download here!

Tunesmith for the KIM-1

(c) 1979 Anthony T. Scarpelli
found in micro 6/79

Download here!

KIM-Piano

a silly small Piano for your KIM-1
KIM Piano
(c) by Peter Engels 1979 *

plays whole notes from C to D
by pressing the buttons 0-F.
Download here!

LEDIP a text editor for the KIM-1

The author of the program, Kiumi Akingbehin, Professor at the Michigan University

Download here!

KIM-1 Dungeons and Dragons Dice Simulator

(c) 29.7.80 Myron A. Calhoun
Manhattan, KS

Download here!

TTY rapid Dump/Load

an extension to M.Gönners hex Loader by Bruce Nazarian

Located in Compute II June 1980
Download here!

Baseball-for-KIM-1

‘Bob’ Leedom published another game called Baseball in the KIM user notes issue 16

Download here!

MatchThis-for-KIM-1

by Gino F. Silvestri
A Simon says game for the KIM-1

Download here!

KIM Venture walktrough

This is a walkthrough of one of the most amazing computer games in history.
KIMventure is a (colossal cave like) adventure game for the KIM-1 that fits in only 1 (ONE) KB of RAM. It offers 24 room to explore with a lot of traps and riddles to solve. It was programmed in 1979 by Robert Leedom with pen and paper (no assembler etc.)

Download here!

Hexpawn – another KIM-1 game from 1978


Download here!

KIM-1 Simulator breakpoints and watches

The KIM-1 Simulator is updated to version 0.10.1.

Changes in this version are an extension to the “Run to” execution

    • up to 10 breakpoints are now possible instead of one
    • up to 10 watch points addresses. When the CPU accesses the watch point execution stops
    • Save file to memroy bug fixed (thank Nils!)

Watch and breakpoints can be enabled or disabled at will, even while the program is running.

Telefonbuch

Found in Hobbycomputer #1 (c) 1980 Herwig Feichtinger (of EMUF fame!) improved by Nils Andreas, a phonebook
In fact, it is a searchable text database. Full article here

The program is written, probably by hand, Herwig Feichtinger in the German magazine Hobbycomputer, Issue 1.

On the github page of Nils you can find source and executables.

Hobby Computer magazine

A German magazine, from Franzis Verlag. Sonderheft der ELO Funkschau Elektronik


Hobbycomputer 1

KIM-1 articles llike Telefonbuch. See also the page on Telefonbuch restauration.

 

 

 

 

 

 

Hobbycomputer 2

KIM-1 and more general 6502 articles.

 

 

 

 

 

 

Telefonbuch

Found in Hobbycomputer #1 (c) 1980 Herwig Feichtinger (of EMUF fame!) improved by Nils Andreas, a phonebook

On the github page of Nils you can find source and executables.

In fact, it is a searchable text database.

The program is written, probably by hand, Herwig Feichtinger in the German magazine Hobbycomputer, Issue 1. Available on archive.org.

I took the source as typed in by Nils, added the comments from the (see below) listing in the article and made sure it was binary compatible with the listing. There are some problems with the first entry in the database.

Source, listing, article, binary, papertape of original version of Telefonbuch

; Target assembler: TASM 
;*****************************
;* Telefonbuch               *
;* (c) 1979                  *
;* Herwig Feichtinger        *
;*****************************
; typed in and checked by Nils Andreas
; comments entered from German listing into source
; checked for being binary compatible with original listing in HobbyComputer 1 1979
;
; Note that getch in KIM-1 returns with Y = $FF, used in this program to save two bytes?
; Testcase for the KIM-1 Simulator, which now emulates this getch behaviour
;
; Hans Otten, 15 december 2021
; 
CR     =       $0d             ; carriage return
esc     =       $1b             ; escape

crlf    =       $1e2f           ; KIM-1 print cr 
getch   =       $1e5a           ; KIM-1 read char for tty
space   =       $1e9e           ; KIM-1 print space tty
outch   =       $1ea0           ; KIM-1 print car on tty
incpt   =       $1f63           ; increment pointer
;
; zeropage
;
savy    = $f9
tablep  = $fa                   ; pointer into table 
bufferp = $df                   ; buffer
table   = $0200                 ; table starts here
;
         .org    $0000
;
start:   lda     #(table & $ff) ; low byte table address
         sta     tablep
         lda     #(table >> 8)  ; high byte table address 
         sta     tablep + 1     ; 
         ldx     #$17           ; 17 bytes clear
         lda     #$00
buffer:  sta     bufferp,x      ; clear buffer
         dex
         bne     buffer
;         
read:    jsr     getch          ; get ascii character
         cmp     #esc           ; escape? 
         bne     chkend         ; no
         iny                    ; yes, y = 0
chkfre:  jsr     incpt          ; increment table pointer 
         lda     (tablep),y     ; query buffer
         bne     chkfre         ; free space in buffer?
input:   jsr     getch          ; get ascii character
         iny                    ; y=0
         cmp     #esc           ; escape?
         beq     start          ; yes, back to begin
         sta     (tablep),y     ; no, store in table
         jsr     incpt          ; increment table pointer
         jmp     input          ; and again

chkend:  cmp     #CR            ; return?
         beq     zzz            ; yes, line ready
         sta     bufferp +1,x   ; no, store char in buffer
         inx                    ; increment buffer index
         cpx     #$15           ; is $15?
         bne     read           ; next character
;
zzz:     nop                    
         nop
;
newline: jsr     incpt          ; table after return
         ldy     #$00           ; search for character
         lda     (tablep),y     ; in table           
         beq     printquest     ; 
         cmp     #CR            ; found?
         bne     newline        ; no, search again
found:   ldx     #$00           ; yes, compare character in table
compbuf: iny                    ; with character in buffer
         lda     bufferp +1,x   ; no, compare table and buffer
         beq     printline      ; show it
         lda     (tablep),y
         cmp     #CR            ; return?
         beq     zzz
         cmp     bufferp +1,x   ; next character
         bne     found
         inx
         bne     compbuf
;         
         nop
         nop
;
printline:
         jsr     crlf           ; new line
         ldy     #$01
loadchar:
         lda     (tablep),y     ; load character from table
         beq     printquest     ; zero is ready
         cmp     #CR            ; return?
         beq     zzz            ; end of table entry
         sty     savy           ; save Y
         jsr     outch          ; and print character
         ldy     savy
         iny                    ; increment Y, next
         bne     loadchar       ; load new character
printquest:
         jsr     crlf           ; print return
         lda     #'?'           ; print ?
         jsr     outch          ; 
         jsr     space          ; print space
         jmp     start          ; return
;
        .end

Here the pages where the program is described and the listing shown.