post

Amazing it works!

After publishing the photos of the transistors used in the KIM-1 a discussion started on forum64.de in the ‘Instandsetzung und Nachbau eines Kim-1’ thread about some transistors were placed wrong in later revisions. And the KIM-1 involved functions well.

The User manual states:

 --------+-------------------+------+---------------------------------------
 | ITEM  | PART              | QTY. | DESCRIPTION                          |
 +-------+-------------------+------+--------------------------------------+
 |  18.  | Q7                | 1    | NPN Transistor B>20, VCE>12 - 2N5371 |
 |  19.  | Q1 through Q6     | 6    | PNP Transistor B>20, VCE>6  - 2N5375 |
 --------+-------------------+------+---------------------------------------

which are quite generic general purpose transistors.
MOS Technology used those parts in the first edition, Rev A and Rev B. Commodore then took over and parts used changed to equivalents.

In my KIM-1 collection I have found (see also the list in this page, Q1..Q6 also have this quirk on some KIM-1s)

Transistor Q7

Rev D 2N3904
Rev E 2N3904
Rev F 2N4401
Rev G 2N4401
Rev G 2N4401

which are functionally equivalent, but have a different pinout. But are placed exactly like the 2N5371.

My first KIM-1, Rev F has a BC239C, which is OK, my trusty old KIM-1, functioning perfectly over the serial interface with thsi CBE transistor.

The 2N5371 pinout is CBE, Collector Base Emitter. The 2N3904 and 2N4401 are EBC.

2N5371 pinout


The actual pinout of the 2N5371 is CBE. The letters in the image are beneath the actual wire, and the Base wire is bent to the back.

2N3904 pinout

2N4401 pinout

BC338 pinout

Those are EBC pinouts. But they are placed exactly like the 2N5371, which is CBE. It should be the other way around. But it works!

On the Rev D Replica by Eduardo Casino and the Nachbau KIM-1 by Ralph02 the BC327(2N5375) and BC338(2N5371) are used. These have the same pinout.

How does that work?

Well, it seems that it does not matter here. An NPN transistor can be wired this way, exchanging Collector and Emitter. It functions the same, but the specs are much worse like the amplification factor. Since this is an emitter follower and the input voltage can be (via a limiting resistor to be added) go to 5V it works reliable.

Part of the KIM-1, the TTY serial interface

Amazing it works: transistors placed wrong and they still work in the KIM-1

After publishing the photos of the transistors used in the KIM-1 a discussion started on forum64.de in the ‘Instandsetzung und Nachbau eines Kim-1’ thread about some transistors were placed wrong in later revisions. And the KIM-1 involved functions well.

The User manual states:

 --------+-------------------+------+---------------------------------------
 | ITEM  | PART              | QTY. | DESCRIPTION                          |
 +-------+-------------------+------+--------------------------------------+
 |  18.  | Q7                | 1    | NPN Transistor B>20, VCE>12 - 2N5371 |
 |  19.  | Q1 through Q6     | 6    | PNP Transistor B>20, VCE>6  - 2N5375 |
 --------+-------------------+------+---------------------------------------

which are quite generic general purpose transistors.
MOS Technology used those parts in the first edition, Rev A and Rev B. Commodore then took over and parts used changed to equivalents.

In my KIM-1 collection I have found (see also the list in this page, Q1..Q6 also have this quirk on some KIM-1s)

Transistor Q7

Rev D 2N3904
Rev E 2N3904
Rev F 2N4401
Rev G 2N4401
Rev G 2N4401

which are functionally equivalent, but have a different pinout. But are placed exactly like the 2N5371.

My first KIM-1, Rev F has a BC239C, which is OK, my trusty old KIM-1, functioning perfectly over the serial interface with thsi CBE transistor.

The 2N5371 pinout is CBE, Collector Base Emitter. The 2N3904 and 2N4401 are EBC.

2N5371 pinout


The actual pinout of the 2N5371 is CBE. The letters in the image are beneath the actual wire, and the Base wire is bent to the back.

2N3904 pinout

2N4401 pinout

BC338 pinout

Those are EBC pinouts. But they are placed exactly like the 2N5371, which is CBE. It should be the other way around. But it works!

On the Rev D Replica by Eduardo Casino and the Nachbau KIM-1 by Ralph02 the BC327(2N5375) and BC338(2N5371) are used. These have the same pinout.

How does that work?

Well, it seems that it does not matter here. An NPN transistor can be wired this way, exchanging Collector and Emitter. It functions the same, but the specs are much worse like the amplification factor. Since this is an emitter follower and the input voltage can be (via a limiting resistor to be added) go to 5V it works reliable.

Part of the KIM-1, the TTY serial interface

Which transisors are used in the KIM-1?

Even a microprocessor based computer as the KIM-1 required some simple transistors.
To drive the LEDs some extra current is needed, so there are 6 PNP transistors there.
And in the serial circuit an NPN transistor is used.

I investigated which types are used in my KIM-1s and clones.

post

Transistors in the KIM-1

Even a microprocessor based computer as the KIM-1 required some simple transistors.
To drive the LEDs some extra current is needed, so there are 6 PNP transistors there.
And in the serial circuit an NPN transistor is used.

The User manual states:

 --------+-------------------+------+---------------------------------------
 | ITEM  | PART              | QTY. | DESCRIPTION                          |
 +-------+-------------------+------+--------------------------------------+
 |  18.  | Q7                | 1    | NPN Transistor B>20, VCE>12 - 2N5371 |
 |  19.  | Q1 through Q6     | 6    | PNP Transistor B>20, VCE>6  - 2N5375 |
 --------+-------------------+------+---------------------------------------

which are quite generic general purpose transistors.

This is what I found in my KIM-1s. The first ones, made by MOS Technology, to Rev B, used the 2N5371 and 2N5373. Thereafter it seems any useable and available transistor was used.

Q1 tot Q6 LED drivers PNP general purpose transistors

First edition 2N5375
Rev A 2N5375
Rev B 2N5375
Rev D B564 MI58
Rev E B564 MI58
Rev F 2N5375
Rev F BC327
Rev G 2N4403
Rev G 2N5375

Q7 serial circuit NPN general purpose transistor

First edition transistor missing in action, only a socket!
Rev A 2N5371
Rev B 2N5371
Rev D 2N3904
Rev E 2N3904
Rev F BC239C
Rev F 2N4401
Rev G 2N4401
Rev G 2N4401

On the Rev D Replica by Eduardo Casino and the Nachbau KIM-1 by Ralph02 the BC327(2N5375) and BC338(2N5371) are used.
The Micro-KIM and PAL-1 and PAL-2 use the 2N4401 and 2N4403.
The KIM-1 Reproductions by Dave Williams a BC338 and MPSA92.

Last KIM-1 production date: KIM is Dead!!! Long live KIM!!!

While we may date the first commercial shipping of the KIM-1 to January 1976 (date of the first edition of the User Manual), we can date the end of KIM-1 production to mid 1981.

50 years of KIM-1: a demo to celebrate

A demo by friend Nils

source@github: https://github.com/netzherpes/KIM1-Demo

Why the KIM-1? Jim Butterfield has a good explanation

Jim Butterfield
Aug 19, 1999, 9:00:00 AM
to
Joe Forster/STA wrote:
>
> Can you, please, explain me in short what this KIM-1 machine
> is: CPU, RAM, video, sound, periphery, lookout, startup
> screen, programming? A URL would also be fine, I guess…
> I haven’t seen a KIM-1 before… Thanks in advance!

Shortly after MOS Technology, Inc. developed the 6502 processor chip,
they designed a single-board computer called the KIM-1 to show off the
capabilities of the chip family, and to allow engineering prototyping.

Apart from the obvious things that a computer must have (CPU, RAM, I/O
chips), they threw on the board just about anything that they thought
someone might like to have as an interface. For example: the basic
monitor program allowed a hex keypad input (hey, KIM stands for Keyboard
Input Monitor) and 6-digit LED display; it had a bit-banger audio output
which could be used to store programs on a cassette tape unit; it had a
corresponding PLL audio input line that would read back from such a
cassette tape; and it had teletype input/output facilities (again,
bit-banger). Its basic RAM was 1K, supplemented by a little extra RAM in
the 6530 I/O chips.

A feature of the board that many users never realized, perhaps, is that
all on-board devices were selectable via external connections. What that
means is that you could plug the KIM-1 board into a mother housing, which
could, as desired, disconnect any or all of the peripheral circuits, I/O
chips, RAM, or the ROMs containing the monitor.

It’s likely that MOS Technology designed the board as a tool for
engineers, with the message “Hey, design your own system and copy the
things you like from this board”. I suspect they were quite amazed when
sales started to approach the 100,000 mark!

Here’s my take on what happened: computer hobbyists discovered that, for
the first time, there was a standard preassembled board that would be the
same for all users. Back in those days, most computers came as a printed
circuit board and a bag of parts which you had to assemble yourself.
More, everybody made a slightly different system: some had a CRT
display, some had LEDs, some had teletype; varying amounts of memory were
fitted, mapped to a variety of addresses; and operating systems were
whatever you could scare up.

But suddenly there was the KIM-1. It was fully assembled (although you
had to add a power supply). Everybody’s KIM-1 was essentially the same
(although the CPU added an extra instruction during the KIM-1’s
production life).

And this created something that was never before part of the home
computer phenomenon: users could quite happily exchange programs with
each other; magazines could publish such programs; and people could talk
about a known system.

We knew the 6502 chip was great, but it took quite a while to convince
the majority of computer hobbyists. MOS Technology offered this CPU at a
price that was a fraction of what the other available chips cost. We
faced the attitude that “it must be no good because it’s too cheap,” even
though the 6502, with its pipelined architecture, outperformed the 8080
and the 6800.

The arrival of the KIM-1 and its user group was, I think, a landmark in
early personal computer history.

–Jim

Post from here

50 years of KIM-1 and me

With any product it is not always easy to establish a ‘day of birth’.
For the 6502 it is the WESCON trade show in San Francisco beginning on September 16, 1975.

For the KIM-1 no introduction event is known. The first publications in magazines about the KIM-1 were in the second quarter of 1976, so press releases and first products must have come from MOS Technology in the first quarter.
Design of the KIM monitor (the ROM in the 6530-002) happened at the same time as development of the TIM monitor (the ROM in the 6530-004) in 1975. The ICs became available end of 1975, see the Hardware manual.

The KIM-1 computer development, with 6530-002 and 6530-003 (the ROM with the audio tap routines), most likely was done in the second half of 1975.

The only real date I can pinpoint is the publication date of the User Manual, January 1976. So I date the ‘birth’ of the KIM-1 computer in January 1976.

I have collected some KIM-1’s over the years. The first KIM-1 in 1978 I bought and sold many over the years. Now I have nine original KIM-1s, from first edition to Rev A, B, D, E , 2x F, 2xG.
The KIM-1 replica by Eduardo Casino (still building, I have original 6530-002 and -003 for it), and a Digitus Sweden clone.
And several reproductions with 6532’s as replacements.


Top row : first edition, Rev A, Rev B, Rev D, Rev E
Middle row: Rev F, REV F, Rev G, Rev G, Digitus
Botton row: Rev D Eduardo Casino, KIM-1 Ralph, KIM-1 Dave Williams, KIM-1 Dave Williams (not shown an unbuilt blue Dave Williams KIM-1).

KIM-1 clones! (Briel MicroKIM, Corsham KIM clone, PAL-1, PAL-2).
Vince Briel was the first to design and sell a KIM-1 clone, the Micro-KIM. Essential was the replacement of the 6530 RRIOT with a 6532 RIOT and an external ROM. The idea came from Ruud Baltissen. The PAL-1 and PAL-2 are still available as kit. The design files for the Micro-KIM are on github.

Top row: Briel MicroKIM, Corsham KIM Clone and PAL-2.
Bottom row: PAL-1 , Corsham breadboard

10 PRINT for KIM-1 and AIM 65

Michael Doornbos (of https://imapenguin.com/) posted two “10 PRINT” articles for our beloved small 6502 SBC’s.

The KIM-1 version displays on the seven segment LED displays. The AIM 65 prints it on the thermal printer.

KIM-1 version of 10 PRINT in BASIC and assember

10 PRINT CHR$(47+INT(RND(0)*2)*45);:GOTO 10
; BY MICHAEL DOORNBOS MIKE@IMAPENGUIN.COM; 2025 
; SOFT START AT $0200

; THIS PROGRAM GENERATES A RANDOM PATTERN OF SLASHES AND BACKSLASHES
; AND DISPLAYS IT ON THE KIM-1'S 7-SEGMENT DISPLAY.

; THE PATTERN SCROLLS TO THE LEFT, CREATING A CONTINUOUS EFFECT.

; A LOT OF THIS CODE IS BORROWED FROM:
; https://netzherpes.de/blog/index.php?entry=KIM-1-scrolltext
; kim_msg.asm
; testing lin2c64 6510 assembler
; using J. Butterfield's scan display from Wumpus
; 01/03/2013 ces



; CONSTANTS FOR 7-SEGMENT DISPLAY CHARACTERS
BACKSLASH  .EQU $64        ; BACKSLASH CHARACTER
SLASH      .EQU $52        ; FORWARD SLASH CHARACTER
SPC        .EQU $80        ; SPACE CHARACTER

; KIM-1 HARDWARE ADDRESSES
SAD     .EQU $1740      ; DATA PORT FOR PINS 1-4
SADD    .EQU $1741      ; DATA DIRECTION REGISTER A
SBD     .EQU $1742      ; DATA PORT FOR PINS 5-6
SBDD    .EQU $1743      ; DATA DIRECTION REGISTER B
TIMER2  .EQU $1747      ; OPTIONAL 2ND 6532 TIMER
LOUT    .EQU $7F        ; SET PINS AS OUTPUT TO LEFT 4 LEDS
ROUT    .EQU $1E        ; SET PINS AS OUTPUT TO RIGHT 2 LEDS

; ZERO PAGE VARIABLES
SEED    .EQU $00D0      ; RANDOM SEED LOCATION
TMR     .EQU $00DB      ; TIMER COUNTER
PTR     .EQU $00DC      ; POINTER
XFRHI   .EQU $00DD      ; USED FOR CHARACTER BUFFER HIGH BYTE
XFRLO   .EQU $00DE      ; USED FOR CHARACTER BUFFER LOW BYTE
TMP1    .EQU $00DF      ; TEMPORARY STORAGE
CBUFF   .EQU $00E8      ; CHARACTER BUFFER (6 BYTES)
MSGBUF  .EQU $0180      ; BUFFER FOR GENERATED PATTERNS (30 BYTES)

        .ORG $0200      ; START OF PROGRAM CODE

MAIN    
        ; CLEAR THE MESSAGE BUFFER FIRST TO PREVENT GLITCHES
        LDX #$00
CLRLOOP LDA #SPC        ; USE SPACE CHARACTER TO INITIALIZE
        STA MSGBUF,X
        INX
        CPX #$30        ; CLEAR THE ENTIRE BUFFER AREA
        BNE CLRLOOP
        
        LDA #$00        ; ADD NULL TERMINATOR AT THE END
        STA MSGBUF+23
        
        ; INITIALIZE THE TIMER
        LDA #$FF        ; LOAD MAXIMUM VALUE
        STA TIMER2      ; START TIMER
        
        ; USE TIMER VALUE AS SEED
        LDA TIMER2      ; READ CURRENT TIMER VALUE
        STA SEED        ; USE AS RANDOM SEED
        BNE SEEDOK      ; IF NOT ZERO, IT'S FINE
        INC SEED        ; OTHERWISE INCREMENT TO MAKE NON-ZERO
        
SEEDOK  JSR GENPAT      ; GENERATE INITIAL PATTERN
        
INFINIT LDY #>MSGBUF    ; LOAD BUFFER LOCATION
        LDA #<MSGBUF
        JSR SCAN        ; DISPLAY THE PATTERN
        
        ; GENERATE NEW RANDOM SLASH AT END OF BUFFER
        JSR RANDOM      ; GET RANDOM BIT
        BCC GENBACK     ; BRANCH IF CARRY CLEAR (50% CHANCE)
        
        LDA #SLASH      ; FORWARD SLASH
        JMP STORE
        
GENBACK LDA #BACKSLASH  ; BACKSLASH
        
STORE   STA MSGBUF+22   ; ADD NEW CHARACTER TO END OF BUFFER
        
        ; SHIFT BUFFER LEFT ONE POSITION (SCROLL EFFECT)
        LDX #$00        ; START AT FIRST POSITION
SHIFT   LDA MSGBUF+1,X  ; GET NEXT CHARACTER
        STA MSGBUF,X    ; STORE IN CURRENT POSITION
        INX             ; MOVE TO NEXT POSITION
        CPX #$22        ; CHECK IF WE&#39;RE AT END OF BUFFER
        BNE SHIFT       ; CONTINUE IF NOT AT END
        
        ; ENSURE NULL TERMINATOR IS ALWAYS PRESENT
        LDA #$00
        STA MSGBUF+23
        
        JMP INFINIT     ; LOOP FOREVER

; GENERATE INITIAL PATTERN BUFFER WITH RANDOM SLASHES
GENPAT  LDX #$00        ; START AT FIRST POSITION
GPLOOP  JSR RANDOM      ; GET RANDOM BIT
        BCC GBACK       ; BRANCH IF CARRY CLEAR
        
        LDA #SLASH      ; FORWARD SLASH
        JMP GSTORE
        
GBACK   LDA #BACKSLASH  ; BACKSLASH
        
GSTORE  STA MSGBUF,X    ; STORE IN BUFFER
        INX             ; NEXT POSITION
        CPX #$17        ; CHECK IF BUFFER IS FULL
        BNE GPLOOP      ; CONTINUE IF NOT FULL
        
        LDA #$00        ; ADD NULL TERMINATOR
        STA MSGBUF+23   ; AT END OF BUFFER
        RTS             ; RETURN

; RANDOM NUMBER GENERATOR (8-BIT LFSR)
RANDOM  LDA SEED        ; LOAD CURRENT SEED
        ASL             ; SHIFT LEFT (C GETS HIGH BIT)
        BCC NOEOR       ; SKIP EOR IF BIT 7 WAS 0
        EOR #$B4        ; APPLY FEEDBACK POLYNOMIAL
NOEOR   STA SEED        ; STORE UPDATED SEED
        RTS             ; RETURN WITH CARRY = RANDOM BIT

; SCANNING ROUTINE FROM ORIGINAL CODE
SCAN    STY XFRLO       ; Y AND A GET LOADED BEFORE JSR TO SCAN
        STA XFRHI
        LDA #$07        ; INIT SCAN FORWARD
        STA TMP1
        LDY #$05        ; INIT Y
CONT    LDX #$05        ; INIT X
CHAR    LDA (XFRHI),Y   ; GET CHARACTER
        CMP #$00        ; LAST CHARACTER?
        BNE MORE        ; IF NOT, CONTINUE
        RTS
MORE    STA CBUFF,X     ; STORE CHAR
        DEY             ; SET UP NEXT CHAR
        DEX             ; SET UP NEXT STORE LOC
        BPL CHAR        ; LOOP IF NOT 6TH CHAR
        CLD             ; BINARY MODE
        CLC             ; PREPARE TO ADD (CLEAR CARRY FLAG)
        TYA             ; GET CHAR POINTER
        ADC TMP1        ; UPDATE FOR 6 NEW CHARACTERS
        STA PTR         ; SAVE NEW POINTER
        JSR DSPDLY      ; DELAY DISPLAY
        LDY PTR         ; RESTORE POINTER
        JMP CONT        ; CONTINUE WITH REST OF MESSAGE

DSPDLY  LDX #$0A        ; SET THE DELAY RATE HERE
        STX TMR         ; PUT IN DECR. LOCATION
TIME    LDA #$52        ; LOAD TIMER
        STA TIMER2      ; START TIMER
LITE    JSR DISP        ; GOSUB DISPLAY RTN
        BIT TIMER2      ; TIMER DONE?
        BPL LITE        ; IF NOT, LOOP
        DEC TMR         ; DECREMENT TIMER COUNTER
        BNE TIME        ; NOT FINISHED
        RTS             ; NOW GET 6 NEW CHARACTERS

DISP    LDA #LOUT       ; CHANGE LEFT LED SEGMENTS
        STA SADD        ; TO OUTPUTS
        LDY #$00        ; INIT RECALL INDEX
        LDX #$09        ; INIT DIGIT NUMBER
SIX     LDA CBUFF,Y     ; GET CHARACTER
        STY $00FC       ; SAVE Y FOR MONITOR DISP ROUTINE
        JSR $1F4E       ; MONITOR ROUTINE - DISP CHAR, DELAY 500 CYCLES
        INY             ; SET UP FOR NEXT CHAR
        CPY #$06        ; 6 CHAR DISPLAYED?
        BCC SIX         ; NO
        RTS

AIM 65 version in BASIC

10 PRINTCHR$(47+(INT(RND(1)*2)*45));:GOTO 10

that print random ‘/’ or ‘\’

Replica of the MTU K‑1002 audio card and software by Eduardo Casino

A faithful replica of the K‑1002 8‑bit audio Digital‑to‑Analog Converter card and software for the KIM‑1, SYM‑1, and AIM‑65 computers, originally designed by MTU in the late ’70s.
All details, hardware and software, are available from this repository.