Since the 6532 is in fact a subset of the 6530 (no ROM, more RAM), it seems not too difficult to make a 6532 replacement this way.
The reDIP RIOT is an open source FPGA board which combines the following in a DIP-40 size package:
Lattice iCE40UP5K FPGA
1Mbit FLASH
5V tolerant I/O
The reDIP RIOT provides an open source hardware platform for 6530 RRIOT / MOS 6532 RIOT replacements.
4 february 2025 2025 I have built the PAl-2 kit, now designing and building a I/O card.
This information is based upon the available documentation: User manual, Schematic, BOM.
The PAL-2 is for sale by Liu Ganning at Tindie
Just followed the interactive BOM, passive components first, ICs last.
Nothing special to note, compare yours with the photo on the PAL-2 Tindie site.
Orientation of IC sockets and IC’s, check twice!
Check your soldering joints, not too much sodler, but covered with the right color solder.
And the three slider switches,: the SST keyboard one has a higher slider that the other two!
Please be careful with the Dupont power cables, double check the polarity! If in error: magic smoke!
I do not like the Dupont wires for power, serial, TTY switch. Too easy to make a mistake in the power connection.
I am now designing and building a simple I/O card for the Application connector, experimenters print, point to point wires, male pin connector to PAL-2, on board female connector for USB to Serial, power switch, TTY/Keypad switch.
That may grow later to SD or 1541 or Corsham SD card interfaces.
Video of PAl-2 #4, by Nils, running!
What is a PAL-2?
The PAL-2 is a kit for an SBC in the now large family of KIM-1 clones. Ranging from the Micro-KIM to the PCB exact replica by Eduardo Casino, all share the KIM-1 ROMs, LED display and TTY interface and the 6532 RIOT instead of the 6530 RRIOT.
What makes the PAL-2 unique:
It is a real and complete KIM-1 clone.
Available as a DIY kit with high quality components.
The layout is close to the KIM-1.
The good looking keypad is very close to the KIM-1
Application and Expansion connector with all relevant KIM-1 signals.
Lots of RAM in many configurable options.
Both RRIOTS 6532 on board.
TTY interface on TTL level, USB to TTL adapter included in the kit, quality serial!
Power can come from the USB to TTL adapter or from external 5V supply (same as for the KIM-1)
The PAL-2 differs from a KIM-1
No Audio cassette interface for file I/O circuit, but see below for a solution
Application and Expansion connector as 22×2 pinheader instead of PCB edge connectors
The signals on the Application connector are not all identical: no audio, TTY instead of 20 mA loop, decoding lines added
Not the same size PCB
The PAL-2 differs from the PAL-1:
The many quality improvements and enhancements make the base PAL-2 kit more expensive then a base PAL-1 kit.
If you expand the PAL-1 to the level of a PAL-2 you need to spend money on a motherboard, a RAM 32K, a second RRIOT kit, an RS232 cable and gender changer and a 9V power supply.
Improved keypad, with labels and look of the KIM-1
No need for a Motherboard
No external RAM module required
No external RRIOT required
E000-FFFF can be used freely from ROM expansion
The vectors (Reset, NMI, IRQ) can be placed in external ROM.
RAM decoding
The PAL-2 has a very flexible RAM memory layout, as shown in the next parts of the schematics:
Internal ROM and external ROM
The PAL-2 has a 2K ROM with the KIM-1 monitor. Since there is no audio in and out circuitry, the ROM from 1800-1BFF could be used for other programs, like the KIM Clone by Corsham Technology (Which also did not have the audio circuitry). The 28C16 is easy to program.
One of the first expansions that is to be expected is an external 8K ROM. The decoding for this ROM, e.g. an 28C64 is already present on the connectors and in the decoding circuit.
The decoding signals are 8K7_SELECT (CE on 28C64) and 8K7_ROM (OE on 28C64). Just the 28C64 IC has to be connected to address and data lines.
DIP Switches
The PAL-2 has a full 64K address decoder onboard, while the KIM-1 has only a 5K onboard address decoder for expansion. These two DIP switches on the PAL-2 are designed both to expand the KIM-1’s RAM and to maintain compatibility with its basic configuration.
On the PAL-2, the 4-bit DIP switch enables the onboard K1 to K4 RAM spaces, with each bit controlling 1K of memory. The K1 to K4 naming follows the definitions in the KIM-1 user manual, covering the address range from $0400 to $13FF. If all four DIP switches are set to ON, the entire 5K RAM space becomes available to the system.
The 8-bit DIP switch controls the “big segment decoder,” with each bit corresponding to an 8K memory block. These blocks range from 8K0 to 8K7, with 8K0 ($0000 to $1FFF) being the KIM-1’s default occupied address space. Since the PAL-2 is a KIM-1 replica, if you want to use it as a KIM-1 system, 8K0 must be set to OFF to allow the onboard KIM-1 logic to function. However, if you’re building a completely new system on the PAL-2, you can set 8K0 to ON to bypass the KIM-1’s onboard logic for the lowest 8K of memory.
The 8K1 block starts at $2000, controlling an 8K space beyond this address, and so on. If a bit is set to ON, the KIM-1 system will be able to access the corresponding address space, which will function as RAM. If a bit is set to OFF, the KIM-1 system will still work, but with reduced available address space. When performing expansion or add-on modifications on the PAL-2, you may need to disable certain address spaces to prevent the onboard logic from accessing the RAM chip.
The 8K7 block, representing the highest 8K memory segment, offers additional flexibility on the PAL-2. If 8K7 is set to ON, you can choose how to use this space—either as RAM or ROM—by adjusting the 8K7 SEL switch. For example, if you write a program (such as a tiny OS for the KIM-1) and burn it onto a ROM chip—similar to the well-known Jim’s ROM (but smaller)—you can connect the ROM to the PAL-2 (with some additional hardware, which is still under development). To boot from your ROM chip, use the VECTOR SEL switch to select ROM, allowing the system to retrieve the top three vectors from the ROM chip instead of the onboard KIM-1 ROM.
Application and Expansion connectors
KIM-1 Application connector
Differences on the Application connector with the KIM-1:
AUDIO IN -> 8k7_SELECT
AUDIO OUT LO -> 8K7-ROM
TTY in and out now at TTL level for USB to TTL converter
TTY PTR and KYBD, +1wV, AUDIO OUT LO not connected
This means, even if the edge to pin connector issue is solved, the standard KIM-1 I/O boards will not work for TTY and audio.
The expansion connector is identical to the KIM-1.
KIM-1 Expansion connector
Power supply
Power has to be applied in the standard KIM-1 manner to the application connector Pin 1 = GND, pin A = 5V. Note that reversing these pins will mean the dead of the PAL-2!
Expansion
As a first suggestion for a PAL-2 extension I see a board connected to Application and Extension connectors with:
Power switch
28C64 (or bigger, switchable in 8K chunks) EEPROM
Connector for the USB to TTL
External power connector, switchable between this and USB to TTL connector
TTY/LED keyboard switch
connector for the Application I/O ports PA0-PB7
Power switch
Optional:
Pin connector for PAL-1 Cassette Interface audio board
The KIM-1 has hardware and software in the 6530-003 ROM to save and dump files on audio tape.
Not used by most KIM clone users, so it is not present on the Corsham KIM Clone and the PAL-2.
But it is possible to have the audio in/out with one patch wire between pin 11 of U12D and the application connector!
KIM-1 Audio and TTY circuit
PAL-2 Audio and TTY circuit
On the KIM-1 circuit you can see the audio I/O is seen by the CPU at pin PB7 of the 6530-003. It is either an input or an output under control of the audio routines in the ROM.
The U26 (also present on the PAL-2 as U12d) is an open collector NAND feding PB7. On one input of U26 is PB5 from the 6530/32 (inverted by U16 (KIM-1_ or U10D (PAL-2), on the other is the output of the audio circuit generating TTL pulses from the audio sound input. This way PB7can be used both as input and output.
The PAL-2 and the KIM-1 has on the extension connector the signal PLL(_TEST), which is connected to U126/U12D. This is on the KIM-1 the output of the audio circuit.
So we have audio in (at TTL level) on the PAL-2 covered!
Audio out is available at PB7 at TTL level. With a patch wire between PB7 (or pin 11 of the U12D) to the application connector.
With the PAL-1 Cassette interface we can have the PAL-2 read and write KIM-1 audio cassette files this way. PLL_TEST to TAPE and a wire from PB7 to PB7 is all you need to connect to the Cassette Interface (and GND and +5V ofcourse).
Leaving R9 out of the Cassette Interface may be a good idea, there is already a pullup in the PAL-2 of 1K.
Physical Dimensions
The connector on the PAL-2 is a 2.54 mm pitch 2×22 female pin header connector.
The dimensions of the PAL-2 PCB are 168 mm x 218 mm.
Next two images show the connector, first shows the distance between the two connectors, while the second shows the distance from the PCB edge to the connector’s outer side.
Where is KIM Going?
Richard Simpson, KIM Forum, Kilobaud 1977
One of the questions most frequently asked me was “what are the future plans for KIM?” Most KIM owners are aware that MOS offers a KIM-2 4K RAM expansion board and a KIM-3 8K RAM expansion board. Either of these can be attached directly to a KIM-1. To expand further, a motherboard (KIM-4) must be added and MOS has planned a KIM-5 ROM expansion board, which will hold up to eight MCS6504 (2K by 8) mask-programmed ROMs (the ROMs are not provided with the KIM-5 but must be purchased separately). At present, there are two sets of software which are planned for release in ROMs – KIMath and a resident assembler/editor.
KIMath
KIMath will occupy a single ROM and consists of a set of subroutines for doing floating-point arithmetic. All calculations are done in BCD to avoid the round-off errors which are inherent in binary floatingpoint routines. The subroutine user can specify the precision (in decimal digits) of any calculation. The more precision specified, of course, the longer the computation time. The package will handle a maximum of sixteen decimal digits of precision plus a two digit exponent so numbers in the range of ±1 times 10E±98 can be handled. The subroutines occupy memory locations F800-FFF8 and were written so they could be used with any 650Xbased system – not just KIM. The subroutines include code for addition, subtraction, multiplication, division, square roots, logs, exponents, tangents and arctangents. All the other trig functions can be generated through the use of trigonometric identities. A subroutine is also provided for evaluating user-specified polynomials, so any continuous function can be approximated.The KIMath ROM should be available by the time you read this. If you don’t want to pay $50 for the ROM, the Programming Manual for KIMath is available for $15 and it includes a complete listing of both source and object code. The manual also contains thirtyseven pages of information on using the subroutines, including a worked-out sample application. If you want to use the ROM but balk at paying $80 for the KIM-5 board to hold it, you’ll be happy to know that the 6540 ROM can be attached directly to the KIM address and data busses, although you’ll need a couple of extra ICs to send the right signal to the KIM-1 Decode Enable line. I’ll provide an interface schematic for this in a future issue of the KIM forum.
The Resident Assembler /Editor
To create any large-scale software on a microcomputer, an assembler is a necessity. Industrial microcomputer users can use the crossassemblers available on several commercial timesharing systems, but the expense of going this route is too much for any but the most affluent hobbyist. Thus, the introduction of the KIM resident assembler should facilitate user software generation and make a lot more software available. The assembler and text editor are available as a set of three MCS6540 ROMs – a total of 6K of code. The $150 which MOS charges for the set may seem exorbitant until you realize that you don’t have to buy 6K of RAM to store it in (which would cost as much or more) and you’ll never have to load it or have it clobbered by errant statements in the program you are developing. Like KIMath, the Assembler/ Editor will work on any 650X-based system. Since the program has to do terminal I/O, locations are reserved in memory page zero to contain the address of the terminal input and output routines. These locations are automatically initialized for KIM owners; users of other 6500 systems (JOLT, TIM, Apple, Baby!, OSI, etc.) can preset those locations with the addresses for the device service routines of their own system. The Editor/Assembler occupies the memory space from E000 to F7FF; thus the editor, assembler, and KIMath fit together in the top 8K of memory.The text editor is a standard line-numbered text editor; it provides much the same editing capability you would find in a BASIC system. You can enter or insert new lines, replace old lines, resequence the line numbers, dump the text file to audio cassette or paper tape, list out lines in the file, and locate lines in the file which contain any specified text string. There is also a special command (actually, any command which begins with an X) to allow you to jump to a user-written subroutine so that you can extend the editor’s capabilities to meet your own needs. Naturally, both the editor and assembler require that you have a terminal connected to the serial port on the KIM-1.The assembler is a singlepass assembler; if your source text is on paper tape or audio cassette, you only have to feed it through once. Normally your source text will be in memory and the assembled code is always written to memory. The source code, symbol table, and object code can be located anywhere in memory you wish. You may have several different source files in memory simultaneously. If you have insufficient memory space to store a large source program, you can break it into several segments, store each segment on audio tape, then bring back one segment at a time for assembly. The assembler will assemble the successive segments until it encounters an “END” statement. It will then put out the symbol table and terminate assembly. Although the editor is fairly limited (it has no capability to edit within a given line, for instance) it is quite sufficient for editing assembly language programs. The assembler is very fast and with good error diagnostics. Perhaps its only serious fault is that the printed symbol table is not sorted alphabetically and no crossreferences are given.
MOS 6540 ROM
The MOS Technology 6540 is a 16k (2KByte) ROM. Factory burned. Mask options for specification of chip select equations. 5! chip selects, requires Phi2 6502 system clock. 24 pin, very uncommon for a small ROM.
A strange and uncommon device, AFAIK only used in the KIM-5 Resident Assembler/Editor and early PET computers. Has a bad reputation, and there are many replacement solutions with standard E(E)PROMs for PET computers.
The 6540’s in the KIM-5 Resident Assembler/Editor on a KIM-5 ROM board are in an excellent condition, dumping with the Backbit Pro chip tester was very easy.
KIM-5 ROM board
The 3 KIM-5 Resident Assembler/Editor ROMs as placed on the KIM-5 ROM board.
Besides the sockets for the ROMs is some glue logic, 2x 74125 buffers, 2x 7485 address decoders, a 7402 TTL IC and some DIP switches.
The KIM-5 ROM board is to be placed in the KIM-4 Motherboard. The manual is not available alas.
MOS Technology, part of Commodore in 1977, not only sold the KIM-1 SBC but added hardware and software as KIM System Products.
Not only hardware, a Motherboard (KIM-4), RAM memory expansions (KIM2, -3, -3B) and a prototype board (KIM-6) but also software, like KIM Math subroutines (KIMath), TIM (RRIOT + document).
This has been documented for quite some time now on this website with photos and manuals.
I have been looking for years for the KIM-5 Resident Assembler/Editor. Manuals on Assembler and Editor are already known. The software, delivered in 3 ROMs of type 6540, on a KIM-5 ROM board was never dumped before, and the existence, besides the pricelist shown here and some advertisements, doubted by many, including old Commodore employees.
Many years I searched on the internet on fora, websites and friends in the retro world, it did not lead to a dump of the KIM-5 ROMs.
A couple of years ago I saw a listing on ebay.de of a lot with a a KIM-5 with ROMs and a KIM-3B board. I was too late to bid. I could not contact the seller or buyer afterwards. But now I knew the KIM-5 did exist, and had some photos as proof.
A year later Stefan Hamann approached me to ask for information on KIM-1 material he bought from ebay. He was the buyer of the lot!
Stefan was so nice to lent me the KIM-5 (and KIM-3B) and the EPROMs he obtained. I have finally a KIM-5 in my hands with ROMs!
The ROMS have been dumped, tested in the (updated KIM-1 Simulator to 1.5.1) and source recreated. The KIM-5 Resident Assembler/Editor is preserved!
The KIM-5 Resident Assembler/Editor is a 6502 version of the MOS Technology Cross Assembler. See the pages on the MOS Technology/Commodore assemblers on pagetable.com
The Resident Assembler was written by Michael Corder (of MOS contractor COMPAS Microsystems) by hand-assembling the Cross-Assembler FORTRAN code to native 6502 assembly.
Consequently, both assemblers were compatible in that they understood the same source format, with the same math features and the same directives and options. That way, they defined the basic format supported by all future Commodore assemblers. This means that the Resident Assembler took uppercase ASCII source files.
John Feagans on the origin of the KIM-5 Resident Assembler/Editor: As a grad student at Iowa State University, Ames, I had access to all the development of these KIM boards as the local contractor for MOS was Compass Microsystems. The original 6502 assembler was written in Fortran and available on Tymshare. First Michael Corder (aka The Cordless Electric Programmer) hand compiled the Fortran to 6502 assembler. Even the Fortran line numbers were used as labels. This became the basis of the MDT 650, an ICE for 6502, and the KIM assembler. Compass developed another product called the MiniMac–a 6502 development system on a plugin for a DEC PDP-11. I took Corders 6502 assembler and hand translated line by line from 6502 assembler to PDP-11 assembly. When I joined Commodore I ported the assembler one more time to become the PET assembler and later C64 assembler.
In 1977, Commodore announced the Resident Assembler/Editor for the KIM-1, which shipped in the form of the KIM-5 ROM board with three 6540 ROM chips (6 KB total) containing the assembler and a simple editor.
The manuals (see below) from 1977 do not mention the .DBYTE, .PAGE and .SKIP directives. In the source (see below) they seem to be recognized and lead to an error.
The assembler could read source from cassette tape or paper tape, but it could not write OBJ files; instead, it would write the binary to RAM.
If the source was too big to be placed in memory, the assembler could read source files from tape until the .END directive was encountered.
The KIM-5 Resident Assembler/Editor ROMs
Many years I searched on the internet on fora, websites and friends in the retro world, it did not lead to a dump of the KIM-5 ROMs. It was even doubted the KIM-5 with Assembler/Editor was ever sold, despite the adverts in magazines of that period.
A couple of years ago I saw a listing on ebay.de of a.o. a KIM-5 and a KIM-3B board. I was too late, could not contact the seller or buyer, but I knew the KIM-5 did exist!
A year later Stefan Hamann approached me to ask for information on KIM-1 material he bought from ebay. He was the buyer!
Stefan was so nice to lent me the KIM-5 (and KIM-3B) and the EPROMs he obtained. I have finally a KIM-5 in my hands with ROMs!
The KIM-5 Resident Assembler/Editor is placed in three 2K ROMs of type MOS 6540, and the KIM-5 board configured to show these in memory at E000-E7FF.
With the excellent Backbit Pro Chip Tester I managed to dump the 6540-007, -008, and 009 ROMs. 6540 are strange ROMs, see below. To my surprise the ICs were in excellent condition.
In the other EPROMs (2x 4K 2532) I found a copy of the KIM-5 Resident Assembler/Editor ROMs, nearly identical to the 6540’s. So the dumps are reliable.
ROM dump archives
This archive has the ROM dumps of the KIM-5 Resident Assembler/Editor for KIM-1 Mos Technology Commodore:
EPROM dump (4K ROMs) (has valid KIM-1 Reset/NMI/IRQ vectors at high memory)
Small changes like jmp to tape dump routine in the ROM (see sources)
KIM E000
KIM F000
Combined to one binary
kim e000-ffff
With the binaries dumped I have
loaded in the KIM-1 Simulator (version V1.5.0. with RAM at E000-F7FF added) and started the Editor. See the screenshots below (in which I did not configure the symbol table as instructed in the manual!).
disassembled and recreate assembler source which assembles to identical binary and documented as much as possible with the assembler sources on pagetable (PET, AIM 65)
Source of KIM-5 Resident Assembler/Editor Recreated source of KIM-5 Resident Assembler/Editor with the aid of TASM32, result is binary identical with the ROM dumps.
Tables, data, jump tables, all recreated. A lot is commented, the editor part needs some attention. Assembles fine.
Eduardo Casino helped me to find the last location dependent statements, and now the program runs at other locations like $9000 after adjusting the .org directive and reassembly.
Eduardo Casino created a CC65 version of the source: Recreated source in CC65 Assembler format of KIM-5 Resident Assembler/Editor
Symbol table at $3000
Resident Assembler/Editor at 9000-A7FF
Assembling branch instructions
While working with the assembler Eduardo found weird behaviour by the assembler of the code generated.
Backward branches are done in the usual way. Forward branches generate an extra NOP instruction.
It is not doing any damage, it just wastes space and execution time.
There is a subtle difference between the NMOS 6532 and the CMOS G65SC32 datasheet regarding the timer of 1 in elapsed time.
It is in the paragraph starting at ‘Once the time has counted down to 00000000, an interrupt will occur ….’
On the 6532 that takes 27T (T is the clock tick), on the G65SC32 28T.
That makes in the example the total elapsed time 443T on the 6532 and 444T on the G65SC32.
Look at these pages about the timer from the datasheets of the R6532 and 6G5SC32 (see below and here)