New book added tot the KIM-1 Books resources: (thanks netzherpes)
G.Eisenack Programmieren von Mikrocomputern CPU 6502 Skriptum
About small SBC systems
New book added tot the KIM-1 Books resources: (thanks netzherpes)
G.Eisenack Programmieren von Mikrocomputern CPU 6502 Skriptum
Motherboard 6 slot, 32K RAM , second 6532 board, now on Tindie for the PAL-1 (and Micro-KIM)
By Bob Applegate
Adding I/O devices that don’t need much address space. On the KIM-1, the space from 1400-17FF is grouped into the K0 block but only 17xx are used, leaving 1400-16FF open for use. To decode that range into four blocks of 256 bytes is easy using a single chip and a few signals from the KIM Clone expansion bus:
Everyone has a 74LS138 in their parts collection, so just connect a few signals from the expansion bus and use one of the three signals from the 138 to decode which block you want to use. Use the A0-A7 address lines to decode into smaller pieces.
A new KIM-1 clone kit in 2021, the PAL-1. In fact, this is a Micro-KIM clone, which is a KIM-1 clone .. Look and specs are like the Micro-KIM, with some improvements like larger keys and a very affordable price. Motherboard, 32K RAM, second 6532 board, RAM board, ROm board, Cassette board, a full KIM-1 and more compatible system.
Designer and seller is software engineer, Liu Ganning, KJXZZ, from Shenzhen, Guangdong, China
The PAL-1 has its own discussion platform at google groups.
For software: se the KIM-1 software page, as the PAL-1 is a KIM-1 with lots of memory!
PAL-1’s difference
First, PAL-1 is a kit, you can assemble it, test it and run it all by yourself —— an unique experience!
The PAL-1 addressing mode is completely implemented in accordance with the design of KIM-1, so it is compatible with most programs developed on KIM-1.
PAL-1 has 2K bytes ROM (complete KIM-1 Monitor), 5K bytes RAM, one 6532 RIOT chip on board, provides two 8-bit bidirectional I/Os, these I/Os are mainly used to support 23-key keyboard input and drive 6 seven-segment LED displays. In addition, PAL-1 also provides RS232 serial port to support terminal operation and 40-pin expansion port for future upgrade. The TTY/RS232 interface and expansion interface pinout uses the design of Rich Dreher and Vince Briel (MicroKIM compatible).
Besides the PAL-1 also a 6 slot motherboard, a 32K RAM board and a RIOT board (the second 6532 making it a complete KIM-1) and a cassette interface baord are available. A ROM boards adds many programs like programming languages Basic, Forth etc.
The main differences between PAL-1 and KIM-1 are illustrated by the following two figures in the “KIM-1 User Manual”.
PAL-1 absence half I/O and Timer (red) Picture 11 (see the RIOT board how to add this!)
PAL-1 onboard RAM increased to 5K (all green spaces are available) Picture 10
What is included
The PAL-1 Kit includes mainboard PCB, ICs, pre-programmed ROM, passive components, sockets & headers.
Print version BOM, Pinout, Schematic.
The two following images show how to adapt the PAL-1 to a TTL USB interface instead of RS232. also supplying power from USB.
The ROM card v1.0 is designed for using 27C256 and 27C512 EPROM, but these UV-erase chip will need much patient when you’re doing a lot of ROM program. So the PAL-1 got a new version ROM card, v1.2, to support the more convenience EEPROM, the 28C256.
Even the v1.0 ROM card designed for the 27Cxxx, you can also use the 28C256 on it. Just one soldering work need to do, populate the high 32K switch using a switch (like K3-2235D-F1) or 3-pin 2.54mm pin header (solder at the inner side of the high 32K switch).
When you need to using a 28C256, you can set and keep the low 32K switch to HIGH, then using the high 32K switch/jumper to select the low 16K bank or the high 16K bank of 28C256 just like normal.
A second RAM board can be modified to add 16K extra.
Modify a 32K RAM card for the upper RAM area. Just need to cut 1 wire and solder 2 jumper wires like below:
The KIM ROM needs the highest area of 64K for the vectors, so the Exxx to FFFF cannot be decoded with the second 32K RAM card.
We can use $A000~$DFFF (16K) more RAM with the second RAM card installed.
Some pictures of the two RAM card system running.
KIM Clone software
Look at the KIM-1 software page for a wide offer of KIM-1 software, suitable also for the KIM Clone.
KIM Monitor
The Corsham variant of the KIM Monitor is for the most part made up of the code in the 6530-002 ROM. The 6530-003 (audio cassette save/load) ROM was removed.
Placed in the main ROM of the KIM Clone.
List of changes to the original KIM-1 ROMs:
There is no technical reason why you could not load the original KIM 6530-002 and 6530-003 ROMs into the KIM Monitor EPROM. The Corsham KIM Monitor is a bit more convenient.
xKIM Monitor
Placed in the extra EEPROM
Extra commands in teletype mode.
? ........... Show this help 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 P ........... Ping disk controller T ........... Type disk file ! ........... Do a cold start
Source of Corsham KIM Monitor
a>
Corsham eXtended KIM Monitor Manual | |
Source of Corsham KIM Monitor |
Microsoft 8K BASIC
Download the original KB9 binary, dumped from official Micro-soft (no typing error, original name!) cassette audio tape, and documentation from this site.
Or build your own version from the pagetable blog (for which my KB9 was the KIM-1 version as input!) Install the CC65 package, then run the make.sh command, then look at the file tmp/kb9.bin, You’ll need to convert that raw binary image to a file suitable for downloading to the KIM, see the KIM-1 tools for a utility. All of these needs at least 12K of RAM starting at $2000 in the KIM-1
Binaries of KB9
Here is a file suitable for downloading onto a KIM-1. It loads at $2000 but to run it you’ll need to start at $4065. Use the L command in KIM-1’s monitor, then upload the file. I strongly suggest that you change your terminal emulator so it adds a 200 ms pause at the end of each line. Once it loads, run it by going to 4065 and running it.
4065 G
To see the easter egg, answer “A” when it asks for memory size.
Original KIM-1 Microsoft BASIC KB9
This is still experimental but I have a version which uses functions in the xKIM monitor (present on the KIM Clone or on the 60K RAM/EPROM board) to save/load from the SD Card System. It also has a DIR command. This is an Intel HEX file and must be loaded from the xKIM “L” command:
This loads and runs at $2000.
Tom Pittman’s Tiny BASIC
Tom distributed a very small BASIC that needed about 3K to run, and was available on paper tape for $5!!! He has quite a bit about it at:
http://www.ittybittycomputers.com/IttyBitty/TinyBasic/
Here is the source code, listing, and binary to my disassembly which includes a lot of comments and notes from Tom Pittman:
Tiny Basic source
Tiny Basic listing
A ready-to-run binary which loads at $0200 and should have RAM up to $13FFL
Tiny Basic hex file
Bob’s Tiny BASIC
by Bob Applegate
All the early issues of Dr Dobb’s Journal discussed using using an intermediate language (IL) to write a general interpreter, then writing a BASIC interpreter using the IL language. Nobody used this except for Tom Pittman. I liked the idea and about five years ago wrote my own BASIC using that approach. It is buggy, but the sources are on the Corshams github so anyone can take them, hopefully debug things, and put fixes back in place. My version also has commands to save/load programs to/from a Corsham Technologies’ SD Card System.
Source and documentation of Bob’s Tiny Basic
And a binary version that can be run starting at address 0200
AS65 assembler
The software above was assembled with the AS65 Kingwoods assembler, a command line utility for Windows (including 10).
A typical build for a bianry and hex output would be:
REM Build xKIM as65 -l -s2 xKIM.asm as65 -l xKIM.asm
Memory Test
by Bob Applegate
This memory test was originally based on Jim Butterfield’s memory test program in the First Book of Kim, but has grown a bit. This now tests every memory location using a rolling 9-bit pattern. Ie the pattern repeats every 9 bytes, so this will detect most shorted address line problems. I use this to test memory boards, so it will run forever unless an error is detected. At the end of each pass, a ‘.’ is printed.
This does output to the TTY port, so if you’re only using the default KIM display, the output functions will need to be tweaked. Not hard to do, but I didn’t need it.
Written February 2006 by Bob Applegate, but it uses some bits of code from Jim Butterfield, and Ross Archer
Memory test soource and hex file
Microchess Peter Jennings
Adapted for KIM clone by tennyson.neil
Source and hex file Microchess for the KIM clone
KIM Clone Proto Board
KIM Clone Proto Board User Manual |
SD Card System.
This is a two board system that provides a very inexpensive, flexible, and long-lasting storage option for our KIM Clone , SS-50 based designs, or almost any third party system.
The main board is the Corsham SD Shield. It plugs into an Arduino Mega and provides for insertion of a micro SD card, and also includes a DS3231 based real time clock (RTC). The Arduino does the hard work of providing an interface between the host processor (6502, 6800, 6809, etc) and the SD card and RTC. It connects to the host via a ribbon cable.
The board also contains three LEDs used for status, a RESET switch, a four position DIP switch, a DS3231 RTC, backup battery, and it maintains the Arduino Mega headers so additional shields can be placed on top. Since the source code is available you can add additional drivers for whatever shields you add. Want to add an LCD shield that displays which files are mounted? Just plug in the shield and modify the user interface class in the source code. Only one of the DIP switches has a defined purpose, so the rest are free for you to add your own logic.
The protocol between the host and the SD Card System is completely defined in The Remote Disk Protocol Guide available for download below.
The source for the Arduino Mega is also available for download.
The KIM-1. my first computer. Still have it, and it is still operational.
But I fear to use it for experiments and daily use, it is too valuable for me.
So I invested in KIM-1 clones and replica’s:
– Micro-KIM by Vince Briel
– KIM Clone by Bob Applegate, Corsham Technologies
– MOS KIM-1 Reproduction by Dave Williams
– KIM Uno by Oscar Vermeulen
Each has it advantages. And not all are still for sale.
Corsham is till in business and has an awful KIM Clone, with motherboard, I/O card, experimenters board and SD file system. A real enhanced KIM-1 on real KIM-1 hardware.
The KIM Uno is also available, affordable,now an emulator on an Arduino, soon on ESP32. Fun to have a KIM-1 look and feel.
All are documented on the KIM-1 replica’s and clone page.
KIM replica’s and clones
I have several KIM-1 replica’s or clones, and there are more available.
For me a KIM-1 Replica/clone needs a KIM-1 keypad and LED dispaly, a serial TTY interface, and the original KIM-1 software. Some have a layout close to the KIM-1, others look different, but all are functionally equivalent.
The CPU is of course a 6502 at 1 MHz crystal clock frequency. And they have at least the KIM-1 ROM 6530-002, the keypad/LED/TTY monitor.
Since 6530 RRIOT ICs (the 002 and 003 variant) are not available anymore, the same solution as in the other clones is chosen: a 6532 RIOT with a 2K EEPROM and some logic ICs (3) to get a hardware solution that makes it look exactly the same for the KIM-1 ROM software. The PCB is mostly a new design, not the typical 70ties KIM-1 rounded lines PCB design (except the KIM-1 Nachbau and the accurate reproduction by Eduardo Casino).
All this started with a design by Ruud Baltissen, who found out how the 6530 can be replaced with a 6532.
The result is great: it feels, looks and operates as an original KIM-1 with hex keyboard and LED display and TTY serial interface.
First Book of KIM programs run, All KIM-1 software runs, Microsoft KIM-1 Basic and Microchess run, when additional RAM is connected.
Photos by Peter Offterdinger of ralf02 KIM clones and MTU backplane and K-1013 Visable Memory