Integration of TinyBASIC

It’s been a productive weekend!   I’ve been able to integrate TinyBASIC into the monitor program.  Btw, if case you were wondering why the monitor states that it is G-DOS, it is motivation (and my intent) to integrate a FAT file system into the computer.  Likely using a SD card.  I’m currently working on the design.

But wait!  Integrating TinyBASIC into my monitor program is not all that I’ve done!  I’ve also been working on expanding TinyBASIC with the following items: IN, OUT, PEEK, POKE, and CALL.  That’s right, TinyBASIC will actually have some use other than just printing to the screen.  This will be a great tool for testing hardware designs.

As it is right now, I’ve added the IN and OUT routines.  OUT performs exactly how you’d expect:  ‘OUT NN NN’ where NN is a two digit hexadecimal number.  IN on the other hand I’m still working on.  The routine itself works, but I’m unsure how to finish it off.  What I mean by that is that I need a way to be able to assign a variable, and I haven’t looked deep enough into the code to be able to determine how to do so at this time.  For now, it simply writes the value to a specific address in memory: 0x8015. Which required me toying with memory locations built into the original TinyBASIC source.

Once I can figure out how to assign a variable to the command, it will become much more useful.  And that same scheme can be applied to the PEEK command as well.  POKE on the other hand should be as straight forward as OUT.  And this gives TinyBASIC a new level of functionality, and no more limitations on variables, as you’d be able to access memory directly.

And the best thing about this is that I believe that after expanding TinyBASIC I can keep the entire ROM (including filesystem routines) under 8K. Currently with the Monitor and BASIC the ROM is just under 5K (5013 bytes). I do not see why I wouldn’t be able to keep the I/O routines for an SD card and the Filesystem routines under 3k.  And I should only need a few hundred more bytes for the additional commands.  Of course one must also take into consideration the ability to save files from BASIC and load them again.  Who knows, but 8k is my goal.  We’ll see how well we can accomplish this.

TinyBASIC for the z80 – TinyBASIC 2.0g

In celebration of 41 years of Li-Chen Wang’s TinyBASIC (the original Open Source Operating System), and the fact my G80-S Computer needed a version of BASIC, I am proud to announce the z80 port of TinyBASIC.

Version 2.0g was derived from the original TinyBASIC 2.0 source.  The method of it’s conversion was thorough.  First the original source was compiled in 8080 mnemonics.  It was then disassembled, and compared to the original source.  It was then modified for the z80 Instruction Set.  And finally, streamlined in order to make it a little more portable.  The link to the download is below.


However, if you’d like the assembly file for the G80-S computer, here is the link to that source code.  Enjoy!


G80-S Runs Microsoft Basic 4.7b (sort of…)

As a followup to my post on interrupts, I decided to have a go at modifying Grant Searle’s I/O routines for his 7-chip z80 Computer. After quite a bit of work, I had the routines in his handler changed to conform with his code (at least I think), and function as intended (at least as far as I was able to test).

The next task was to try it with his modified version of the Nascom Rom.  And, after splicing the code, I compiled and tested…..and tested…..and tested…..

Well, the short of it is that it kind of works.  The video above says it all.  The serial routines seem to work fine up until BASIC starts up.  And at that point, my serial routines work fine, but there is some disconnect with Grant’s code that either doesn’t like my own code, or is simply amiss.

The video really does say it all.  If anyone has any ideas, or has ported Grants work over to using either the DART or SIO, I’d love to see your code.  Help a brother out… But seriously, watch the video.  It’s hilarious….

On the Subject or Intereupts

Although I have learned a lot by designing my own z80 computer, I have yet to learn much about interrupts. It’s just not something that I initially saw a strong need for.

However, since I have been looking at porting other people’s code over to my system I have come to realize just how important other people see interrupts to be. In fact, from what I can tell,  more often than not this is the case. At least with the code I have examined.

This means, that if I am to port some of the code I would like to use, I need to learn about interrupts.

The first thing of note is the hardware situation. On my first run of boards, what I’m calling the Beta Boards, the IEI line on the DART was left disconnected/floating. As it turns out, this is a no-no. This pin is the Interrupt Enable Input. Meaning it’s the enable on the SIO for interrupts. Without a High signal on this pin, there are no interrupts. So, I’ve fixed this issue on my new design by adding a resistor between IEI and VCC, and I’ve used a bodge resistor as a solution on my Beta Board.

The second thing to note is the different types of interrupt modes on the z80. There are three: Mode 0, Mode 1, and Mode 2. From what I can tell, Mode 1 is the most straight forward. In this Mode a low on INT will call the z80 to perform a RST 38H instruction. Which is essentially the same thing as a CALL 0038H. However, in order to return from this instruction the system requires a RETI instruction. So keep that in mind.

Mode 2 is interesting because it allows you to jump to a specific routine pointed to by a reset vector. In this Mode the upper 8-bits of the address is held in a register. And the lower 8-bits is placed onto the data bus by the peripheral. Trying to understand this Mode almost caused my head to explode. A little complex for our needs.

Mode 0, as I understand it, is a reset mode that is designed to be compatible with the 8080. Where in the peripherals place data on the data bus. I’m not going to presume to understand anything about this Mode.

So therefore we’ll be using IM 1 where polling is not usable. But wait, what if we need multiple devices? Well, luckily there is a way around this. Although I suppose it could be a little slow. When the z80 receives an interrupt the routine checks all the peripherals before deciding how to react. Good thing our system clock is at 6mhz. We may even need a little more speed. But in the end, if we have to, we can always use IM 2.

Here is an example of working code of Interrupt Mode 0.  I found interrupts a little difficult to understand at first.  But hopefully a very simple example of an interrupt routine will be enough to help the beginner.

IM 1 Example

G80-S Micro Schematic and Source

I’ve been meaning to upload the source and the schematic for the G80-S Micro for some time now.  I just haven’t gotten around to it.  However, I had some time to do so this evening.  So attached here is the schematic, and the source code.  It’s the v0.25b version of the software.  Use them well.

Also, a link to the Source has been placed on the product’s page in the store for the Beta boards.  So if you want to buy a board, you can download the software there.  If you don’t want to buy a board, but want to play with my design, the schematic is here and the source as well.  Have fun!

Kaypro Restore Pt 1: Replaced Sockets and Video Activity Capture

The Kaypro restoration is coming along, but not a lot of headway has been made.  I’ve manage to convert the board back the way it was when it left the factor, as can be seen in the picture below.  However, there is at least one problem with this.  U87 was factory suggested modification, and I have learned both from a reader on this blog as well as a guy on Facebook that it was a service repair of some sorts.  Something about corrupted data.  So that repair will be redone.  I guess it is for the best, seeing as how the previous sockets were worn from the constant pressure of the machine pins over the course of the last 30 years.  Rather that just sacrifice the chip, the person who did the original repairs sacrificed both a chip and a socket.  And the sockets caused the factory placed sockets extra wear. In other words, it needed to be replaced.

The next step was to take a look at the CPU’s activity, and see how everything was going.  And It appears that the CPU is hopping along quite normally.  However, I did notice that the clock appears to not quite be 2.5mhz.  Rather, it appears to be a stable 2.4mhz.  The picture below shows (from top to bottom) the clock signal, the MREQ signal, and the IORQ signal.

All and all, it appears that the machine is running, executing code, and generally performing routine memory operations as well as I/O operations.

As for the video problem.  Well, the good news is that there is at least some type of video signal.  But I’m not sure if it is garbage or actually has something to it.  The pictures below shows (from top to bottom) the Vertical Sync, the Video signal, and the Horizontal Sync.

I’d love to know if anyone knows if this looks pretty standard.  Or if there appears to be something amiss with these video signals.  Because, like I have mentioned in the past, I have no knowledge of video signals or CRT displays.

However, I have see mention before of a pretty easy circuit to fabricate that combines the vertical, horizontal and video signals into a single composite video signal (this was for the Commodore PET). And I may end up sitting down at the bench one day in the next week or so and solder this up.  However, I find it hard to justify using the time for that.  Since I do have my G-80S prototype video board under construction at the moment (another project involving video signals which I have no understanding of).  However, I’ve attached the following picture of a schematic I have found for the mod.  It seems interesting enough.

I have no idea if it’ll work.  But I cannot imagine that the signals are that different.  But who knows, like I said, I know nothing about CRTs or video signals.

So, a little work has progressed, and will hopefully continue.  Also, I’m still looking for a boot disk for the working Kaypro 2X.  If anyone has the ability to make me one for a decent price I’d be a paying customer.  Shoot me a email, and we can talk.

UPDATE: Roadrunner Author Lead

Great news. Evan from the VCF has emailed me concerning the possible identity of the individual responsible for the Roadrunner Monitor. His email was very brief, but I plan on following up with it.

I have contact information including an address and phone number. However, considering this would be a cold contact, I’ve elected to write the gentleman a letter to confirm his identity, and attempt to engage in conversation about the history of the code.

For the time being, all further details are on hold. However, once more information is obtained, I’ll be making another update. Until then, we will all have to wait in anticipation.

FYI, I think I’m just as excited about this as anyone!

Kaypro II ROM Dump – Surprise

This story just keeps developing.  I decided to restore the computer to it’s original state, since the modification appeared to be unfinished, and redundant.  I carefully pulled the ROM, very carefully bent the pin back into the place, and placed the rom into my programmer to preserve the code that was within.

Upon reading the code to memory, I was stunned.  I half way expected to see something along the lines of two separate versions of code.  However, what I saw was something entirely different.  What I saw was this:

This ROM was an aftermarket ROM developed by a gentleman by the name of Howard Saltzman, of Baltimore Maryland.  And was sold by Highland Microkit.  How cool!  But what was it?  I hadn’t the faintest idea.  So, I went to google…and came up empty handed.  Searching for “Howard Saltzman” and “Baltimore” didn’t return much.  And I spent a few hours trying different combinations.  That is until I searched for “Highland Microkit” and “Saltzman”.

I then came up with something odd.  A hit for a PDF file from a magazine called “Profiles.”  It was apparently a magazine geared towards the Kaypro in one way or another, but not excluding other computers entirely.  The particular magazine I found was this one here.  Or, if the link dies, you can download from Retro Depot here.  On Page 77 there is an add for a company called Highland Microkit, which advertises a rom called the “Roadrunner Custom Monitor”.  Well, sure enough if I scroll down to 0x01B0 it clearly identifies itself as the Roadrunner ROM v1.5.  But what does it do?  And why have I not seen this ROM listed on any websites which store backups of Kaypro images?

In either case, you can download the ROM Image right here.  It is saved as a text file, but it is actually a binary.  So you’ll need to rename it to “.bin”.  It’s the only way my server would allow it to upload, since it poses a “security risk” being a binary.

I’ve tried to track down Mr. Saltzman, and the closest I’ve come so far is that he attended an engineering college in Maryland, may have become a professor, and ultimately retired some time ago.  He is likely 61 years old from what I can gather on LinkedIn.  But I cannot find any contact information on him.  But if ANYONE knows who this man is, I’d LOVE to talk with him about this ROM.  Who knows, maybe I have the only surviving example out there.  And if that is the case, he very well may want a copy.

Details will be given as they are learned, but it would appear that we are learning quite a bit about this old work horse.  But lets see if we can track down Mr. Saltzman.

Operation Speed Racer Was A Success

Thats right boys and girls.  Operation Speed Racer was about acquiring two, yes two, Kaypro “luggable” Computers.   I found out about the computers on Tuesday the 19th of September.  They were located over in Springdale Arkansas.  That being a drive of about two hours from Tulsa, I figured that it was worth the shot of seeing if they were still available.  To my surprise, since they had been listed for about two weeks, the were still available.  And best news yet, the prices was $57.  And that included not one, but two computers, and the documentation that came with the original software package (MS Basic, S-Basic, CP/M, Perfect Writer, etc.), but no disks.  :o(

I made arraignments with the owner to drive over and meet the owner on Saturday.  And hoped that someone didn’t pick up the computers from him/her while I was forced to wait due to work.  Friday came, and I emailed the owner to confirm that he/she would be available on Saturday, and very quickly I had a reply with a phone number and address.  Everything was looking good.

I loaded up my son after having worked part of the morning, and we hit the road headed to Springdale.  Once at the address, I called the number to confirm I was at the right location.  An older lady answered the phone, and told me she was coming outside.  She promptly came out and and guided me over to where she had placed the computer.  Showed me what she had, and told me the story of where these machines came from.

The story is that she was friends with the Widow of a Professor from the local university.  And that these computers were his babies.  She didn’t know exactly what he had taught.  But that he was supposed to be the original owner of at least one of the computers.  But she she wasn’t sure about the second.  She let me know that he had died about 15 years ago, and that the widow had eventually given these computers to her.  And after quite some time she figured they were just collecting dust, and decided to be rid of them.  After looking closer at the computers when I returned home there seems to be a name scratched into the keyboard G.L. Wheeler.  I’d love to hear about the guy if anyone knew him.

I explained that I collected older computers, and she seemed happy that they were finding a good home.  We exchanged money for computers, wished each other a wonderful weekend, and the boy and myself were back on the road headed home.

Several hours later we were unloading the car and bringing the computers into our home.  I made room on the kitchen table (i.e. My workspace), and began examining the computers.  I had noticed upon picking them up that one had a switch that had been placed internally.  I assumed it was for bank switching the ROM (it’s a pretty common thing to see this on older computers).  But I wasn’t entirely sure.

After an initial inspection i took note that both computers looked to be in ok shape.  However, the computer that had the toggle switch coming out the back vent hole appeared to be modified (I’m assuming to allow bank switching).  See below.

These ICs have been removed from the socket, placed into another socket, modified with bodge wires, and then reseated into the original sockets with a toggle switch running to the back of the machine, and a single wire running to the floppy header.  Interesting, but I have no idea what the owner was doing here.  It would seem that it would definitely have something to do with banking memory though.  Seeing as one of the ICs was connected to a 2732’s  A11 pin.  What I’m not entirely sure of yet is whether this is a character ROM, as the bios seems to be another chip towards the back of the board.

After inspecting the computers I tried powering them on. Now, the first computer, a Kaypro 2X, boots just fine from what I can tell.  However, I have no boot disk to confirm that it does in fact work.  And no way to currently make a boot disk. So I’m going to be stuck for a little while.

The second computer, a Kaypro II, did not boot.  And had a high frequency low volume chirp coming from the power supply area.  I probed around on the power rails for a few moments and noticed that there were no DC voltages.  So, it’s time to start unplugging things.  The first two things which seemed to be the easiest were the Floppy Drives.  After unplugging them, the chirping was gone, and the rail voltages read +4.8v, +11.8v, and -12.0v.  Ok, so now I have power.

However, there was still a problem.  First, obviously one of the drives has a problem (likely a shorted capacitor, not a big deal).  But more importantly, the CRT wasn’t showing any signs of life.

Rats.  I know nothing about CRTs.  The only thing I do know is that it did not appear to turn on.  However, looking at the back of the neck of the CRT while it was turned on it is clear it is getting voltage.  As there was a red glow coming from the back of the neck.  But, I’m deathly afraid of high voltage, so I’m not sure I want to mess with it.  It may be a job for an old TV repair man.  I’m not entirely sure there is even a video signal coming from the board.  I’ll have to break out my oscilloscope and see.  But that will have to wait until there is more time to tinker with it.

But until then, if anyone has any idea what could be going on, I’d love to hear from you.  Also, if anyone has, or can write, a boot disk for a Kaypro 2X I’d love to discuss it with you.

Operation Speed Racer

I have recently stumbled onto an opportunity to acquire another z80 computer.  This is not a homemade computer, but rather a commercial variant.  I’m not releasing the details just yet.  However, I have decided it is worth it to update the community as to the nature of the operation.

I’m calling it Operation Speed Racer because I’m going to be running short on time, and need to meet the individual to grab this computer before he/she decides to let it go to someone else.  From what I can gather he/she has been sitting on it for a while, and is ready to be rid of it.  But the price that they’re letting it go for is ridiculously low.  The big part of the transaction is the drive.  I have to drive several hours away to pick up the computer.  But luckily, the current owner has acknowledged that I’m willing to drive several hours away to acquire what he has.  Let just hope that doesn’t work against me when I get there (read: price jump).

Either way, the operation is a go and I will be spending about 5 hours of the day driving over to meet with the current owner and coming back before I’ll have any additional information to post.  Of course, this all comes after I spend over half the day working at my day job (Clients always have issues).  And that doesn’t include the time I must spend once I get back examining the equipment and determining the condition.  So all things considered, I will likely not have any detailed information until later into the weekend or early next week.

However, I will make sure that I reveal the identity of the computer once the mission is successful.  But until then, I’m not counting my chickens before they hatch. You’ll have to wait to confirm that I do in fact have them in my possession.  But here is to a great Vintage Computing weekend.

Stay Posted.