Modding the Altair Clone

General discussions related to the Altair 8800 Clone

Modding the Altair Clone

Postby TomXP411 » March 16th, 2018, 1:25 am

So Mike sent my notification that my Altair Clone is on the way, and I'm excited.

I have a question about the emulator; I've been doing some tweaking on the Altairduino, and I'd like to make similar changes to the Altair Clone's firmware. Is the source code for the emulator available, and how hard is this microcontroller to work with, compared to an Arduino?
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm

Re: Modding the Altair Clone

Postby AltairClone » March 17th, 2018, 2:37 pm

The Altair 8800 Clone is a fully custom hardware design using the Microchip PIC24FJ128 microcontroller. To date, I have not opened the Altair Clone firmware to public update because I envisioned the Altair Clone as a vintage computing project - all about the Altair computer and the 8080 processor - not a modern-day PIC24FJ128 microcontroller project.

Along these lines, my goal with the Altair 8800 Clone was to duplicate the features and the limitations of the original Altair 8800 as close as possible. I almost didn't put in the few "cheats" I allowed (e.g., loading a binary or hex file into memory), because that deviated from the original machine. In retrospect, I wish I had left those features out of the Altair Clone because they're very easily implemented in 8080 code using a PROM - just like you would have been required to do in the original Altair.

If you have bug fixes or ideas for new features that fit within these guidelines, I'd love to work with you on their implementation. Unfortunately, because the Microchip PIC24FJ128 microcontroller used in the Altair Clone doesn't have near the horsepower of the Cortex-M3 CPU used in the Arudino Due, the firmware is written entirely in assembly and is very unforgiving due to very tight timing issues to match the real-time performance of the original Altair. In other words, it's not a very easy project to tinker with :)

Feel free to use this forum to discuss ideas and tweaks you envision as you use your Altair Clone.

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: Modding the Altair Clone

Postby TomXP411 » March 17th, 2018, 8:10 pm

That makes sense, Mike.

Here's the general idea of what I've been doing this weekend.

I have been using David Hansel's Altair8800 Arduino emulator, compiled on the PC and Raspberry Pi. Running on the Pi, I get around a 80MHz virtual CPU speed, and on the PC I get 120+Mhz.

So what I have been experimenting with is intercepting David's front panel I/O code and sending that over USB, instead. So the Arduino ends up running a really simple, dumb program that just lights up the LEDs based on an input string and sends a 4-byte message whenever the address or command switches change position.

Ideally, when this project is complete, I'll actually run the emulation code on my Raspberry Pi and use the Altairduino as, more or less, a peripheral for the Pi.

I'm also going to build a virtual version of the Intel SDK-85 using a similar approach; an Arduino will power an 8-digit LED display and take input from a hex keypad. (I'm going to use a Genovation CP24 for that bit). Again, the PC will do the heavy lifting while the Arduino M0 just acts as a terminal. (An M0 or even Uno would work in this instance.)
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm

Re: Modding the Altair Clone

Postby AltairClone » March 18th, 2018, 7:57 am

Sounds like fun!

I can tell you from experience that you will have to update the front panel LEDs with every machine cycle if you want to avoid unusual display artifacts on the front panel LEDs. While this may not matter when running a virtual 80mhz or 120mhz clock, you’ll probably want to when running in a real-time 2mhz mode so that the front panel behavior is accurate.

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am

Re: Modding the Altair Clone

Postby TomXP411 » March 18th, 2018, 5:30 pm

Hmm... My plan right now was to lock the update rate down to around 100Hz or so. With the number of bits it takes to update the entire front panel, including a synchronization byte, I am going to hit a wall at around 1000 updates per second, so I've been throttling updates to around 10 milliseconds per update. I am actually a little concerned about visual artifacts; I figure that a serial panel won't look exactly like the real thing, and it's not possible to push 2 million updates a second through the pipe. Even on native USB, which is faster, I'm still rate-limited.

Ideally, what I want to do with the Altairduino emulator is build in a mode switch that allows the user to switch between serial panel and native mode. This would allow an Altairduino to work out of the box or attached to a PC. Since the 'duino has a nice debug monitor built in, my plan is to implement a new monitor command that will engage the serial panel mode. To get back to standard operation, the user would hit a specific switch combination, like Stop+Aux2Up. This would give users the most flexibility; they can still use the front panel with PC based emulators, for debugging or just fun, and they can also use the panel direct at CPU clock speeds when they want full fidelity.

My stand-alone sketch takes about 24k right now, but I think there's a way to reduce the size by reading directly from the CPU registers, rather than 36 lines of "If this line is high then add this bit to the switch register...". :)

I'm thinking that, ideally, I could encode the whole process in a few dozen bytes if I was assembling it for the native processor. It's basically a matter of reading a byte from the serial port, putting that byte in a register, and repeating the process four more times. The 6th byte is fixed value that I'm using a synchronization byte, to help ensure I'm seeing the start of a packet. Now that I think about it, it should really be not much bigger than the Altair's own paper tape bootloader.

... I was about to ask what ISA the PIC uses, but I just found the data sheet with the instruction set summary. I'm going to look this over.
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm

Re: Modding the Altair Clone

Postby toml_12953 » March 18th, 2018, 6:52 pm

AltairClone wrote:I almost didn't put in the few "cheats" I allowed (e.g., loading a binary or hex file into memory), because that deviated from the original machine. In retrospect, I wish I had left those features out of the Altair Clone because they're very easily implemented in 8080 code using a PROM - just like you would have been required to do in the original Altair.

Mike


Is it too late to remove those features and publish the PROM and a set of instructions on how the original would have done it? I'm all for authenticity even if it's not as convenient as using modern techniques.
toml_12953
 
Posts: 297
Joined: June 7th, 2013, 12:54 pm

Re: Modding the Altair Clone

Postby TomXP411 » March 18th, 2018, 11:41 pm

I've been thinking about this, too... the original floppy drive used an S100 slot, which you can't really simulate solely with the guest operating system. The emulator would need to place the CPU's input and output requests on a simulated bus that you'd pass in and out of the system on cable - either the RS232 port or an SIO connection.

We have two RS232 ports that can handle at least 460kbps, which is fast enough for floppy emulation. It might be a bit slow for some systems, but it's faster than my Commodore 64's disk drive, which ran at a measly 500 bytes per second!
TomXP411
 
Posts: 42
Joined: March 8th, 2018, 4:13 pm

Re: Modding the Altair Clone

Postby AltairClone » March 20th, 2018, 12:08 pm

toml_12953 wrote:Is it too late to remove those features and publish the PROM and a set of instructions on how the original would have done it? I'm all for authenticity even if it's not as convenient as using modern techniques.


I could, of course, remove the hex and binary file load options from the Configuration Monitor menu, but there probably isn't much point now that they've been standard functions for several years now. You don't have to use them, of course :)

For loading .hex files using 8080 code and a PROM, there are numerous examples out there already: In the http://altairclone.com/downloads/roms/ directory, HEXLOAD.ASM is a relocatable hex file loader and TURMONH.ASM is the Altair Turnkey monitor with a hex load feature. The ALTMON monitor at http://altairclone.com/downloads/roms/Altair%20Monitor/ includes a hex load feature, and the Altair port of the Processor Technology CUTER monitor includes a hex load feature.

Loading binary files is typically the fallback for getting code into a machine without a hex file loader in PROM. A binary loader can be very small and entered on the front panel. The standard Altair bootloaders for loading the checksum loader from paper tape or cassette are examples of a binary loader. A more straighforward binary loader is at http://deramp.com/downloads/altair/soft ... 0Transfer/ which can be used to load the binary image of the PC2FLOP program into the computer to write a bootable floppy on a cold machine which has no bootable media.

Mike
AltairClone
Site Admin
 
Posts: 632
Joined: April 5th, 2013, 10:55 am


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 19 guests

cron