Unusual KIM-1 Memory Design Question

282 views
Skip to first unread message

Michael McLaren

unread,
Oct 31, 2024, 1:35:46 AM10/31/24
to PAL 6502 computer
A question, if I may, please?  I'd like to experiment with a reasonably hardware-compatible KIM-1 / PAL-1 type SBC with  64K RAM, a 128K Flash ROM "image store", and built-in ROM Emulator.  Basically, I use a $2 Nano clone as a ROM Emulator that will copy either the 64K 'A' or 'B' ROM image into RAM at start-up.  The ROM Emulator is also used to load one or more hex files directly into 64K RAM at 115,200 bps over the Nano USB serial interface and then allows switching back into 6502 "run" mode or burning the 64K RAM image into the 64K 'A' or 'B' ROM.

I intend to load RAM and burn the 64K 'A' ROM with an image that includes the KIM-1 Monitor at $1800..$1FFF and the ROM Expansion Card 'Bank 0' programs at $A000..$DFFF.  Then I'd like to load RAM and burn the 64K 'B' ROM with the KIM-1 Monitor and the ROM Expansion Card 'Bank 1' programs ($A000..$DFFF).  This way I can set the ROM 'A' / 'B' jumper to select which ROM Expansion Card programs are loaded into RAM and available after start-up or reset.  

My question is...  Should I also include the KIM-1 monitor at $F800..$FFFF in the ROM images or can I get away with simply including the three vectors at $FFFA, $FFFC, and $FFFE?  

TIA.  Cheerful regards, Mike, K8LH (Michigan, USA)

Blind Interface 688 KIM-1.png
A work-in-progress prototype board;

BE6502-RE Proto Build (b).png

Michael McLaren

unread,
Nov 5, 2024, 2:54:13 AM11/5/24
to PAL 6502 computer
I think I have a way to provide the Single-Step "inhibit" signal necessary to prevent single-stepping through KIM-1 ROM at $1800..$1FFF in a 64K system.  Will this work, guys?    

Blind Interface 688 KIM-1 SST.png

Hans Otten

unread,
Nov 5, 2024, 4:55:35 AM11/5/24
to PAL 6502 computer
Interesting design!  

What makes a KIM-1 a KIM-1 is the bit banging of the 6530s I/O ports . TTY, LED displays, the KIM-1 monitor needs the 6530 (6532) I/O ports.

Are you planning to emulate the 6530 I/O ports in the  microcontroller? Or intercept the ROM entry points for TTY?
Or rewrite the KIM-1 monitor to use the 65C22 I see on the PCB?
Most KIM-1 software is very picky about changes to the KIM-1 ROM entrypoints and I/O ports. I learned that in writing my KIM-1 emulator.
Echo suppression, break detection etc.

Michael McLaren

unread,
Nov 5, 2024, 7:29:58 AM11/5/24
to PAL 6502 computer
The prototype board I pictured is a "Ben Eater 6502" compatible proof-of-concept for the ROM Emulator/Programmer add-on.  The KIM-1 board will have a 6532 instead of a 6522 and use the standard KIM-1 monitor.  It will be similar to the KIM-1 / PAL-1 but with RAM and ROM expansion built-in as well as a full-blown ROM Emulator/Programmer.

If anyone is interested, here's some info' for the Ben Eater compatible board which can also be used to program 28C256 EEPROM's and 39SF010A Flash ROM's;

BE6502_RE1.png
BE6502-RE on BB ZIF.png

Voyageur

unread,
Nov 6, 2024, 1:26:53 AM11/6/24
to PAL 6502 computer
When I made my travel board of the PAL-1 computer, I used a Beta 84 Computer 'mod' board (Thanks to Hans for his site, especially on the Beta computer). TravelPAL1.JPG

The goal is to initially use only the 6532-002 monitor (with Display and/or TTL USB module, as on the original PAL-1 computer). I have displaced it in the ROM memory so I needed to have new values for the Vectors in $FFFA....
I was also obliged to modify the monitor code. I know that other stuff won't easily work with my TravelPAL1. But it's fun and good for my study of 6502 assembly.
This version is only 16K RAM and 16K ROM (of which 8 are directly available for storage). The single chip used for both RAM and ROM is a ferroelectric random access memory ( FRAM ), no need of battery. Codes in RAM can also stay after shutting down.  The addressing logic is provided by a GAL 18V8D and RESET by an EconoReset (like DS1813 type).
And I know the keyboard layout will offend some people but you get used to it pretty quickly.
A+

Michael McLaren

unread,
Nov 8, 2024, 1:17:43 PM11/8/24
to PAL 6502 computer
That really looks nice.  May I ask how you wired up the serial interface, please?  Also, I see you're using a '145 and a ULN2803 to drive the 'CA' displays.  I was considering using a '145 and a ULN2003 but now I wonder if I could use the '145 as a sinking driver and a UDN2981A "sourcing" or "high side" driver with 'CC' displays?  Has anyone tried this before?

Take care.  Have fun.  Regards, Mike
KIM-1 Display Mod 2.png

Voyageur

unread,
Nov 8, 2024, 5:26:22 PM11/8/24
to PAL 6502 computer
Hi Mike,
I've had the same idea for my project but in my drawer there were plenty of ULN2803... I don't see any reason why you couldn't use this display.
Considering the serial interface, I've adapted the "Modification for TTL USB interface" (found on Hans' website) and I used one 74LS00, a BC547 and 3 resistors :

Serial_schema.JPG
I've made it on a small PCB, with some wires (PA7, PB0, PB5, +5V and GND) and then glued on the stripboard I use to link the Beta 84 computer and the Display-Keyboard.
With a CH340 mini-module, it's good enough when 2400 Bauds are selected...
Cheers
A+

Michael McLaren

unread,
Nov 10, 2024, 1:26:22 PM11/10/24
to PAL 6502 computer
Thank you for the TTL serial info' from Hans' site.

Another question, please?  Does an incoming character from a terminal get automatically sent back on the TX line to the terminal (echo)?

GN Liu

unread,
Nov 10, 2024, 6:23:45 PM11/10/24
to PAL 6502 computer
Based on my study, the characters are sent by the KIM-1 monitor.

Jim McClanahan

unread,
Nov 10, 2024, 7:14:29 PM11/10/24
to GN Liu, PAL 6502 computer
Hans has a software hack I used in most of the ROM programs to turn it off, but going from memory I think that it isn't so much an "echo" as a "loop back" where whatever is on the input (high or low, 1 or 0, or whatever you want to call it) is mirrored on the output. I has no awareness of "characters" like I would tend to think of as part of what I would describe as an echo.

I retired earlier this year and literally haven't had a chance to fire up the PAL 1 since. I've been learning the guitar and catching up on chores. I need to build an amplifier kit and finish rewiring a guitar, and then some 6502 assembly programming. :-)

Thanks,
Jim W4JBM

--
You received this message because you are subscribed to the Google Groups "PAL 6502 computer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pal6502+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pal6502/04773d74-bf97-42e2-ad81-ee58675e7ee7n%40googlegroups.com.

Michael McLaren

unread,
Nov 10, 2024, 8:10:25 PM11/10/24
to PAL 6502 computer
Ok.  Thank you guys.  Hans' site comes to the rescue, again.  The circuit does provide a "hardware echo".  

Hans Otten

unread,
Nov 11, 2024, 4:02:22 AM11/11/24
to PAL 6502 computer
On this page I try to describe how the hardware echo of incoming characters works. No interaction at all via the KIM Monitor (sorry Liu, you are wrong there!) at all except for the port settings of the RRIOT.  
And how to suppress the echo with a software trick. 

When you do a KIM-1 replica copy that circuit, together with the KIM ROM it is what makes the serial part of the KIM-1. Leave the logic for the audio circuit also in, even if you do not implement the analog audio part.   
It all plays together! 
What you also can leave out is the 20 mA interface part, TTL level I/O is fine. Going to RS232C levels is not handy with the current USB TTL interfaces.
 
Hans

GN Liu

unread,
Nov 11, 2024, 7:41:40 AM11/11/24
to PAL 6502 computer
Sorry for the misinformation.

Hans,  the TTY output characters are controlled by the KIM-1 monitor, but the echo part is not, is that correct? seems I confused the echo with the output data.

Liu

pete mcquain

unread,
Nov 11, 2024, 9:59:21 AM11/11/24
to PAL 6502 computer
Sorry, a bit off-topic, but what are you using to create those "schematics"? Is that Fritzing?

Michael McLaren

unread,
Nov 11, 2024, 10:07:29 AM11/11/24
to PAL 6502 computer
Thank you for the clarifications, guys.  I was thinking about simplifying the serial interface for my first prototype by eliminating the four NAND gates and temporarily ignoring the PB5 "tty/audio" output (like the Corsham KIM-1 board).  I tried something like this on my Ben Eater 6502 compatible board when bit-banging serial off of the VIA chip for the G-Pascal package and it worked well.

KIM-1 Serial Mod.png


Michael McLaren

unread,
Nov 11, 2024, 10:19:09 AM11/11/24
to PAL 6502 computer
Hey, Pete.  The drawings are Excel spreadsheets.  The solderless breadboard and Nano pictures are imported and all the other objects, lines, ICs, etc., were created using the built-in drawing tools.  Excel is not a drawing program so it's really a PITA to try and use it that way.

Cheerful regards, Mike, K8LH

Hans Otten

unread,
Nov 11, 2024, 10:20:42 AM11/11/24
to PAL 6502 computer
That will do fine!

Michael McLaren

unread,
Apr 13, 2025, 11:46:47 AMApr 13
to PAL 6502 computer
So I'm getting closer to trying this 'serial only' demo and I realize the hardware to sample the Keypad/TTY switch is missing.  Can anyone help me identify the Monitor code that samples that switch and the modifications I would need to force 'TTY' (serial) mode?

TIA.  Cheerful regards, Mike

KIM-1 Serial BB.png 
KIM-1 Schema 1.png


Hans Otten

unread,
Apr 13, 2025, 12:52:29 PMApr 13
to PAL 6502 computer
6530-003.pdf page 17 
1C52
1C7C
Checks bit 0 of SAD, the RRIOT Port A.  

Michael McLaren

unread,
Apr 13, 2025, 3:52:33 PMApr 13
to PAL 6502 computer
Thank you, Sir.  I will check it out...

Stefan S

unread,
Apr 20, 2025, 1:34:47 PMApr 20
to PAL 6502 computer
I liked your design with the UDN2981A (TD62783AP should be an equivalent) so cobbled together this, the little part in the left is a dummy alternative to this display keyboard Modul and enforces TTY mode:
Screenshot 2025-04-20 193312.png

Stefan S

unread,
Apr 20, 2025, 4:17:10 PMApr 20
to PAL 6502 computer
I'm sorry, I did post a bit too early, I decided to put the debounce circuit for RS and ST also on the Keyboard and Display Unit (KDU).
The 74LS85 circuit to force TTY mode with unchanged ROM, should work but does not make any sense, as it does not save parts or do any thing better or easier.
A better option would be to use the 74LS145 variant below and plug the 74LS145 in a socket on the main board if no KDU is used, and if one is used, plug it into the socket on the KDU.
The idea is to reuse some old floppy cable to connect the KDU with the mainboard. I would remove the Drive A connector(s).
I am still unsure if I want a 3.5" style connector or a 5.25" Style Edge connector on the KDU. If I use a 3,5" one, I would use one as pictured. 
floppy-kabel-34-pin-fuer-35-und-525-diskettenlaufwerke-3x-idc-buchsenleiste-2x-card-edge-buchsenleiste-67cm.jpgC151_PSL_34W.jpg
Screenshot 2025-04-20 221258.png

Michael Doornbos

unread,
Apr 24, 2025, 6:17:09 PMApr 24
to PAL 6502 computer
What are you using to create these drawings?

Stefan S

unread,
Apr 26, 2025, 11:43:28 AMApr 26
to PAL 6502 computer
The questions was asked before and answered in a bit more detail, he is using Excel to create this drawings they look good but creating them is painfull.
Maybe Copilote can make it easier with some reference drawings?

Reply all
Reply to author
Forward
0 new messages