K-1008

http://www.6502.org/users/sjgray/projects/microuk101/

PBC for the UK101 project by Grant Searle.

post

OSI 300 page restored

Somehow during the migration I managed to loose the OSI Model 300 trainer page.

Restored and with some additions!

 

Micro-KIM

The Micro-KIM is a SBC designed and built by Vince Briel. First sold in 2007 and alas not available anymore.
Based upon the ideas of Ruud Baltissen how to replace the 6530 with a 6532, it was the first KIM-1 clone that was running the unmodified KIM-1 ROM.

Manuals, circuit diagrams, single step fix, tape devices, support Cd images
Photos
Videos


Specifications

  • 6502 CPU running at 1Mhz
  • 2K EPROM replacing built in ROM on 6530s
  • 5K RAM using the KIM-1 memory map
  • RS232 interface made to work with TIM built in KIM-1
  • Single-Step mode for debugging
  • debounced RESET and STEP switches
  • 40 pin header for future expansion
  • Expansion board for expansion connector with four slots available
  • 32K RAM card
  • Second 6532 board
  • The I/O of the 6 digit display and keyboard are memory mapped exactly like the KIM-1 for full program compatibility

See the KIM-1 page for more KIM-1 info and programs.

First impressions

  • It really feels like a KIM-1. Smaller, but just as simple to operate. Easy to connect a serial RS232 (USB) cable and connect to a terminal program. Minicom on Linux, Realterm on Windows e.g., no high demands on terminal emulation, just plain simple teletype at 9600 baud or less and the ability to capture output to a textfile or send a text file via the terminal
  • No cassette port. This means the programs with real nostalgic value like the editor/assembler Micro Ade will not have much sense.
  • Second 6532 is an option(though the 6530-002 and 003 ROM is present!).
  • 32K RAM extension option. Yes, this makes the machine worthwhile! Now you can run KB9 Microsoft Basic or otehr KIM-1 software.
  • Some small mistakes are on the version 1 Rev 0 board, fixed in the later version rev 1, this needs three hardware fixes to be made, so I have to get the soldering iron into action. Simple fixes, see below.
  • Loading programs via the serial interface by sending a text file in papertape format is slow. But it works! Fun to test all those KIM-1 programs. KIMTAPE and KIMPAPER help a lot here also look at the 8 bit hex file conversion program there.

Tested programs

Most of the First Book of KIM programs work. Some require the presence of the second 6530 (6532 here).
See the KIM-1 software and manual pages. Also see the photos section for TinyBasic and KB 9 Basic.

See the PC utilities page for papertape and other conversion utilities.

Memory map

Micro-KIM KIM-1
$0000-$03FF 1024 Bytes of RAM $0000-$03FF 1024 Bytes of RAM
$0400-$07FF 1024 Bytes of RAM $0400-$07FF Optional Memory Area
$0800-$0BFF 1024 Bytes of RAM $0800-$0BFF Optional Memory Area
$0C00-$0FFF 1024 Bytes of RAM $0C00-$0CFF Optional Memory Area
$1000-$13FF 1024 Bytes of RAM $1000-$13FF Optional Memory Area
$1400-$16FF Optional Memory Area $1400-$16FF Optional Memory Area
$1700-$173F Optional 2nd 6532 I/O, Timer $1700-$173F 6530-002 I/O, Timer
$1740-$177F 6532 I/O and Timer $1740-$177F 6530-003 I/O, Timer
$1780-$17BF 64 Bytes RAM from 6532 $1780-$17BF 64 Bytes from 6530-003
$17C0-$17FF 64 Bytes RAM from 6532 * $17C0-$17FF 64 Bytes from 6530-002
$1800-$1BFF 1024 Bytes of EPROM $1800-$1BFF 1024 Bytes of ROM in 6530-003
$1C00-$1FFF 1024 Bytes of EPROM $1C00-$1FFF 1024 Bytes of ROM in 6530-002
$2000-$FFFF Unused memory $2000-$FFFF Unused memory or 32K RAM baord

* The 6532 has 128 bytes of RAM vs. only 64 bytes on the 6530. The Micro-KIM utilizes all 128 bytes from
the single onboard 6532 so all original memory locations are available.

Manuals, circuit diagrams, notes and support Cd images

Micro-KIM setup and Users Manual July 2007 Rev 0 Ed 1
Micro-KIM setup and Users Manual September 2007 Rev 1 Ed 2
Circuit diagram Micro-KIM rev 0, has serious errors
Circuit diagram Micro-KIM Rev 1
Support Cd contents Rev 0 July 2007
Support Cd contents Rev 1 September 2007
Fix for Micro-KIM Rev 0 for second 6532
Aart Bik’s programming the Micro-KIM, see also his KIM page

Extensions and audio interface solutions

65C02 Single step fix by Timali

My Micro-KIM shipped with a 65C02, and apparently there is a timing issue which prevents single-step from working with the 65C02. I tried an original NMOS 6502, and single-step worked ok with it, but not with any of my 65C02s. I did some debugging with my scope and determined that there is a small timing difference causing the SST signal to be erroneously asserted (pulled low) for 100-200 ns during EEPROM accesses with the 65C02, which is just enough to cause a problem. The easiest way I could think of to fix this was to delay the SYNC signal briefly with a small RC circuit, which prevents the glitch in the SST signal. I cut a trace on the back side of the board and added a small resistor and capacitor, and single-step is now working correctly with my 65C02’s. It still works with the original 6502, also. Click on the image to see a larger picture.

Photos

Tiny Basic

Microsoft Basic KB9



Videos















https://www.youtube.com/watch?v=R_zD5T_khKs



KIM 6530 to 6532

Replace the 6530-002 and -003 in a KIM-1: a KIM-1 clone.

The base for all ‘modern’ KIM clones, KIM reproductions, MICRO KIM, PAL-1 and more.

Credits to Ruud Baltissen for the idea and details. ‘I’ means Ruud in this page!

RRIOTs are mask programmed for address selection, choices are:

Pin 18 PB6 or CS1
Pin 19 PB5 or CS2
Pin 17 PB7 can have a pullup
ROM selection on RS0, CS1 und CS2 s
RAM on RS0, CS1, CS2, A9, A8, A7 and A6
I/O on RS0, CS1, CS2, A9, A8, A7 and A6
See the various 6530/6532 datasheets for (some) more detail.

The troublemaker: 6530, detailed background information

The KIM-1 has two 6530s on board. For more info about this IC, please read the datasheet. Anybody who is a little bit familiar with the hardware market can tell you that you cannot buy the 6530 anymore. Happily enough there is another IC available which you could call its brother: the 6532. The 6532 has 16 I/O-lines, an internal timer and 128 bytes of RAM on board, but no ROM. The internal ROM of the 6530 can be selected independently from the I/O. So 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.

The next difference is the fact that the 6532 has a separate IRQ and PB7 line. As we will see, the functionality of both lines is the same as with the 6530. To create the same circumstances we only have to connect them together.

The third difference is the availability of PB6 with a 6532. See it as a bonus as I haven’t found any reason how it could jeopardize our project.
The fourth difference is that it is possible to generate an interrupt depending on the behaviour of PA7. But this is an option, which is out of function by default after a reset.

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 6532 is only visible within a range of 128 bytes
  • The first 16 bytes represent register 16 to 31
  • The next 48 bytes are mirrors of the first 16
  • The last 64 bytes appear as RAM

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 an inverter.
  • A 74LS138/74LS08 construction or equivalent enables the RS- and CS-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 expansive then the 2764 or its bigger brothers. When we use a bigger EPROM we only have to tie the unused address lines to GND. The same problem occurs with the RAM.

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. (Don’t forget the address lines!) In case of the EPROM we also can tie switches to the surplus address lines and have the advantage of a multi-KERNAL system.

Schematics of the new KIM-1

What are the major differences with the original circuit:

  • Replacement of the 6530s by 6532s.
  • Replacement of the 6108 RAM-ICs by one 6264 or equivalent 8K*8 SRAM.
  • Adding an EPROM.
  • Adding a 74LS138 to decode the RAM and I/O of the 6532s.
  • Combining K6 and K7 to one line, dropping the resistor for K6.
  • Adding jumpers to enable combining other K-lines as well.

You may notice that Ruud did not change things which are more or less obvious like replacing the clock circuit by a module or replacing the various 74XX TTL-ICs by their LS or HCT equivalents.

6530’s KIM-1 specification

(Thanks to J Coville)
Back in the day, a designer ordering a custom 6530 would have to specify certain parameters in addition to the ROM contents. During my KIM-1 restoration effort, I found a datasheet for the Synertek version of the part. The datasheet has quite a bit of information describing how to provide the ROM contents. There is also a form for “Additional Pattern Information” (tables to describe the desired chip-select and addressing information). They look like this:

Chip Select Code (Check one square in each block)

CS1
PB6
CS2
PB5
Pull-up on PB7
YES
NO

ROM/RAM/I-O SELECTS (Specify H or L or N (don’t care) in each box.)

RS CS1 CS2 A9 A8 A7 A6
ROM Select N N N N
RAM Select
I/O Select

As best as I can determine, the designers of the KIM-1 filled out the tables for the RRIOTs like so:

6530-002:

CS1 X
PB6
CS2
PB5 X
Pull-up on PB7
YES
NO X
RS CS1 CS2 A9 A8 A7 A6
ROM Select L H N N N N N
RAM Select H L N H H H H
I/O Select H L N H H L H

6530-003:

CS1 X
PB6
CS2
PB5 X
Pull-up on PB7
YES
NO X
RS CS1 CS2 A9 A8 A7 A6
ROM Select L H N N N N N
RAM Select H L N H H H L
I/O Select H L N H H L L

In a KIM-1, K5 is asserted low by addresses 1400-17FF. It is connected to the CS1 lines of both the 6530-002 and 6530-003. A9 and A8 need to be 1 for all I/O and RAM, and A6 and A7 determine which chip and I/O or RAM you get:

0001 0111 00XX XXXX = 1700 – 173F = 6530-003 I/O
0001 0111 01XX XXXX = 1740 – 177F = 6530-002 I/O
0001 0111 10XX XXXX = 1780 – 17BF = 6530-003 RAM
0001 0111 11XX XXXX = 17C0 – 17FF = 6530-002 RAM

The RS lines are connected to different select lines, K6 for 6530-003 and K7 for 6530-002, this gives:
0001 10XX XXXX XXXX = 1800 – 1BFF = 6530-003 ROM (1k)
0001 11XX XXXX XXXX = 1C00 – 1FFF = 6530-002 ROM (1k)

All these values agree with the KIM-1 memory map documentation.

K0 $0000 – $03FF 1024 bytes of RAM (8*6102)
K1 $0400 – $07FF free
K2 $0800 – $0BFF free
K3 $0C00 – $0FFF free
K4 $1000 – $13FF free
K5 $1400 – $16FF free
$1700 – $173F I/O, timer of 6530-003
$1740 – $177F I/O, timer of 6530-002
$1780 – $17BF 64 bytes RAM of 6530-003
$17C0 – $17FF 64 bytes RAM of 6530-002
K6 $1800 – $1BFF 1024 bytes ROM of 6530-003
K7 $1C00 – $1FFF 1024 bytes ROM of 6530-002

K0..K7 = output lines from 74145

post

KIM 6530 replacement

Have a KIM-1 with faulty 6530? Look here for replacement with 6532 and some.

post

KIM-1 6530 Replacements

On this page two KIM-1 replacements are presented.

Based on the same design principles of 6530 with a 6532 + ROM and glue logic, as also used in .

Both solutions are made up of a PCB with 6532 + ROM and glue logic. The defective 6530(s) need to be replaced with an IC socket, the replacement board is fitted in the IC socket on top of the KIM-1.
Which one you choose depends on the state of the KIM-1. If only one of the 6530s is damaged, the Corsham solution is the right one. If both 6530s need replacement the Eduardo Casino design is the appropiate solution.

post

DOS65 information now complete

The DOS65 information is now complete. Last year I did document most of the system. And now I scanned the large pile of paper with manuals and source listings that were waiting to be added. Source listings of ROM, the Operating system and the Monitor and other documents. Most are in English! Enjoy!

post

6502 manuals in html format

I have added the excellent html formatted manuals by Erik van den Broek to the KIM-1 Manuals page.

6502 illegal opcodes list

Groepaz from the VICE emulator team and the C64 demo group Hitmen just released an updated PDF of 6502 illegal or perhaps more accurately called unintentional opcodes.

I would say this document and the use of illegals are for advanced programmers but they can come in very handy for generating smaller or faster code at times.

Some illegal opcodes can be unstable on certain chips

NMOS 6510 Unintended Opcodes no more secrets (v0.91 – 24/12/16)

SB-Assembler 3 released

San Bergmans has released SB-Assembler 3

Download here.

Now written in Python 3, runs on Windows, Linux, Max OS.

New Features Of The SB-Assembler 3

  • Will now run on Linux, MAC and Windows machines.
  • Written in Python3, a modern multi-platform programming language.
  • Source files will be included, allowing you to create your own cross overlays.
  • Local labels from other global labels can now be accessed.
  • Can now generate warning messages where errors would be inappropriate.
  • Include source files can now be nested as deep as you like.
  • Separate target spaces for code memory, RAM memory and EEPROM memory.
  • The .TA directive can be used to map generated code to the ROM address map easily.
  • More room, we can now use Giga bytes, in stead of some 550k bytes to do the job.
  • As from Version 3.01 label and macro names may also start with an underscore.

Read More