Altair 680 (Altair-Duino 680)

648 views
Skip to first unread message

Chris Davis

unread,
Jun 26, 2025, 4:59:23 PMJun 26
to Altair-Duino
Here's a project I started a few weeks ago, and I finally have it running:
Screenshot 2025-06-26 at 9.15.37 AM.png
This is the Altair 680 monitor running on an Arduino Due emulating a 6800 processor.  So far I have been able to load Altair 680 BASIC (although the formatting is kind of messed up and it's echoing my type characters twice):

Screenshot 2025-06-26 at 3.58.14 PM.png

But at least it's a start!  I'll work on the echo problem later, I want to get the LEDs and switches going next.

Tom Lake

unread,
Jun 26, 2025, 7:24:29 PMJun 26
to Altair-Duino
Does this mean a 680 clone is on the horizon? If it is, then great! I might hafta get my plastic ready once more.

Chris Davis

unread,
Jun 26, 2025, 10:24:22 PMJun 26
to Altair-Duino
That's the plan.  But don't expect it soon!

Walt Perko

unread,
Jun 27, 2025, 12:01:42 AMJun 27
to Altair-Duino
Hi, 

Before you go too far ... do some math tests on the TINY BASIC ... a few years ago I programmed a DUE with the sim software and when I was running some fairly simple BASIC programs with very basic math, it was giving me incorrect answers.

Then I think I tried just printing X=0 to 1000 or 10000 and X = X+1, maybe X^2 and SQR(X) etc. 


.

Chris Davis

unread,
Jul 1, 2025, 2:24:30 PMJul 1
to Altair-Duino
If you're talking about the SWTPC emulator, the 6800 code has been updated since by Jim Nichols, a former CPU architect at AMD.  He said he was "puzzled at the original code" and said it would handle printing "HELLO WORLD" fine but couldn't do much math.

Walt Perko

unread,
Jul 1, 2025, 2:27:28 PMJul 1
to Altair-Duino
Hi, 

Hey, you're right!  I forgot about that one.  I still have the DUE sitting in a box with the original program in it.  Do you have a link to the fixed software?  


.

Chris Davis

unread,
Jul 1, 2025, 2:30:53 PMJul 1
to Altair-Duino
Here's the code Jim sent me.  I believe all his changes were in the m6800.cpp file.
SWTPC_due.zip

Walt Perko

unread,
Jul 1, 2025, 2:35:50 PMJul 1
to Altair-Duino
Hi, 

Thanks!  Cool, now I gotta figure out how to program the DUE again!  


.

Chris Davis

unread,
Jul 1, 2025, 2:42:43 PMJul 1
to Altair-Duino
If anyone is interested in playing with the nascent Altair-Duino 680, here is the GitHub link: https://github.com/davischris/AltairDuino680

Tom Lake

unread,
Jul 1, 2025, 2:53:40 PMJul 1
to Altair-Duino
I tried compiling with IDE 2.3.6 and I get this:
In file included from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\tlake\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from C:\Users\tlake\AppData\Local\arduino\sketches\2633F0456A3B8566F923A3EF7515B1F6\sketch\Altair680_Emulator.ino.cpp:1:
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected unqualified-id before 'volatile'
 extern int32_t SP;
                ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected ')' before 'volatile'
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected ')' before 'volatile'
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:9:26: error: size of array 'RAM_0000_BFFF' is too large
 char RAM_0000_BFFF[0xC000];
                          ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino: In function 'int32_t CPU_BD_get_mbyte(int32_t)':
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:74:16: error: 'RAM_0000_BFFF' was not declared in this scope
         return RAM_0000_BFFF[addr];
                ^~~~~~~~~~~~~
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino: In function 'void CPU_BD_put_mbyte(int32_t, int32_t)':
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:97:9: error: 'RAM_0000_BFFF' was not declared in this scope
         RAM_0000_BFFF[addr] = val & 0xFF;
         ^~~~~~~~~~~~~
In file included from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\tlake\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from C:\Users\tlake\AppData\Local\arduino\sketches\2633F0456A3B8566F923A3EF7515B1F6\sketch\Altair680_Emulator.ino.cpp:1:
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino: At global scope:
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:116:93: error: expected ')' before '(' token
 void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP)
                                                                                             ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:116:93: error: expected ')' before '(' token
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:116:93: error: initializer provided for function
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:116:95: error: expected ',' or ';' before ')' token
 void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP)
                                                                                               ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino: In function 'void setup()':
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\Altair680_Emulator.ino:138:12: error: 'RAM_0000_BFFF' was not declared in this scope
     memset(RAM_0000_BFFF, 0x00, sizeof(RAM_0000_BFFF));
            ^~~~~~~~~~~~~
In file included from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\tlake\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\tlake\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:19:
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:97:9: error: expected unqualified-id before 'volatile'
 int32_t SP = 0;                           /* Stack pointer */
         ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:97:9: error: expected ')' before 'volatile'
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:97:9: error: expected ')' before 'volatile'
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:109:100: error: expected ')' before '(' token
 extern void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP);
                                                                                                    ^
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:109:100: error: expected ')' before '(' token
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:109:100: error: initializer provided for function
E:\Users\tlake\Downloads\Altair 680\AltairDuino680-main\Altair680_Emulator\m6800.cpp:109:102: error: expected ',' or ';' before ')' token
 extern void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP);
                                                                                                      ^
exit status 1

Compilation error: expected unqualified-id before 'volatile'

Tom Lake

unread,
Jul 1, 2025, 3:05:40 PMJul 1
to Altair-Duino
Oops! Wrong board. When I switched to Arduino Due, all the errors and warnings went away.
The AltairDuino is so stable, it's been a while since I've had to do a compile!

Chris Davis

unread,
Jul 3, 2025, 11:15:52 AMJul 3
to Altair-Duino
I have the monitor working, and I have compiled a version of Altair 680 BASIC that seems to work great.

Screenshot 2025-07-03 at 10.04.51 AM.png

It would be great if you guys would test it and let me know if everything is working for you.

Kelly Loyd

unread,
Jul 4, 2025, 11:10:16 AMJul 4
to Altair-Duino
I cloned the repo, compiled and downloaded to the Due, all good.
I connected terminal emulator to the Due and was greeted with 
Starting Altair 680 Emulator

.
.L
sent 'basic680.s19' as a binary file. 

... time passes, reminiscent of running a paper tape but faster ...

Press <return> after file download...
MEMORY SIZE?
TERMINAL WIDTH?
WANT SIN-COS-TAN-ATN? Y

42690 BYTES FREE

MITS ALTAIR 680 BASIC VERSION 1.1 REV 3.2
COPYRIGHT 1976 BY MITS INC.

OK

Yippee. I ran some benchmarks.  (https://github.com/rprouse/8bit-benchmarks)
Plus a sieve program of my own. Looks good so far!

Interesting test of RND function.
10 PRINT "ACCURACY RANDOM"
20 FOR N = 1 TO 100: A = N
30 FOR I = 1 TO 10: A = SQR(A): R = R + RND(0): NEXT I
OK
40 FOR I = 1 TO 10: A = A ^2: R = R + RND(0): NEXT I
50 S = S +A:NEXT N
60 PRINT ABS(1010-S/5);ABS(1000-R)
RUN
ACCURACY RANDOM
 .304047  623.287 

Chris Davis

unread,
Jul 4, 2025, 2:52:59 PMJul 4
to Altair-Duino
Thanks!  I thought this was just going to be an easy project to convert Béla Török's SWTPC emulator to Altair 680 but it wasn't.  Yes both use the same CPU and ACIA but the memory map and other things were far different.  Once I got that working, I could not find an original distribution tape for Altair 680 BASIC.  The only version of that BASIC is a memory dump with a few glitches in it.  I finally got that cleaned up.  I can't wait to get the toggles and LEDs working.

Charley Jones

unread,
Jul 4, 2025, 5:12:58 PMJul 4
to Chris Davis, Altair-Duino
Needless to say, but should be said away, beautiful work.

Sent from my iPhone 15pm!
Charley Jones, PMP

On Jul 4, 2025, at 11:53 AM, Chris Davis <famousd...@gmail.com> wrote:

Thanks!  I thought this was just going to be an easy project to convert Béla Török's SWTPC emulator to Altair 680 but it wasn't.  Yes both use the same CPU and ACIA but the memory map and other things were far different.  Once I got that working, I could not find an original distribution tape for Altair 680 BASIC.  The only version of that BASIC is a memory dump with a few glitches in it.  I finally got that cleaned up.  I can't wait to get the toggles and LEDs working.
--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/altair-duino/abe6cb0d-0726-40e8-a187-e6c4b1c46e0an%40googlegroups.com.
Message has been deleted

Kelly Loyd

unread,
Jul 5, 2025, 8:32:07 AMJul 5
to Altair-Duino
Chris, 
The availability of an Altair 680 specific version for the Due caused me to go back and start watching Mike Douglas' youtube series on the Altair 680. While the front panel lacks the features of "big brother 8800" it's still pretty neat.
So I got curious and started trying to run VTL-2 as Mike demonstrates. 
I grabbed the assembler source from deramp.com ( https://deramp.com/downloads/altair/software/altair_680/VTL-2%20(Very%20Tiny%20Language)/ ) and tried to run it. 
My assembler keeps outputting S19 records for the zero page memory, even though there is no code there - that's a separate problem for me later)
It refused to put data at $FC00 then I went and read the memory map... whups it runs out at $BFFF and $FF00 is the standard 256 byte ROM with monitor.
So for experiments, I org'd at $BC00, chopped out the beginning of the S19 (sending S19 records to page zero makes the monitor have kittens and halts the sim! hahaha)
.L 
.J BC00
OK
# We have a winner!

Kudos to Mike for providing this resource! 
Following his video, my Due worked fine.
?=2+2
4
OK
A=?
4

OK
B=1

OK
?=1+2*3
9
OK
?=3>4
0
OK
?=4>3
1
OK



It would be very cool to incorporate VTL-2 into the emulator somewhere. Maybe loadable from SD? I didn't want to hack the Arduino Source just yet. 

Thanks again for getting this project rolling! My second computer ever was a Tandy Color Computer ... yes the 4K Standard Basic with "chiclet" keyboard, and so I have always enjoyed the 680x CPUs. 

Kind regards,
Kelly

Mike Douglas

unread,
Jul 5, 2025, 8:38:20 AMJul 5
to Altair-Duino
Chris,

Did you try, or have problems with, the tape images at https://deramp.com/downloads/altair/software/altair_680/BASIC/ ? I have used both the cassette and paper tape versions without issues, but if there is something wrong with them, I’d like to get it corrected.

Mike D

On Friday, July 4, 2025 at 1:52:59 PM UTC-5 famousd...@gmail.com wrote:

Chris Davis

unread,
Jul 5, 2025, 10:12:37 AMJul 5
to Altair-Duino
Thanks Mike, I'll give those a try.

Chris Davis

unread,
Jul 5, 2025, 11:00:16 AMJul 5
to Altair-Duino
I can tell Paper BASIC V1.1 R3.2.S19 has the same issues as the version I've found several places on the internet.  I'm sure it comes from the same memory-dump from a running system who knows how many years ago.  While it runs, it "double-echos" the user's input:

Screenshot 2025-07-05 at 9.27.17 AM.png
You can see it also cuts off the last character of lines and tokens (it's actually has the high bit set).  I was able to fix that by changing A flag that causes the INCH and OUTCH routines to use 6800 code in the asm file rather than calls to ROM functions.

Cassette BASIC V1.1 R3.2.S19 seems to have the same behavior:

Screenshot 2025-07-05 at 9.35.35 AM.png

I tried it in my real Altair 680, and got the same behavior:

altairbasic.png

Although when the high bit is set on the end of the lines and tokes, you can see the character.

Does this run fine on your Altair 680?  If so, I suspect it's due to a different PROM monitor.  I have tried three different ROM images and they all behave this way.  I *think* I tried the PROM monitor you have shared on your site.

Walt Perko

unread,
Jul 5, 2025, 2:04:00 PMJul 5
to Altair-Duino
Hi, 

How do I "save" the Altair 680 image including the "basic680.s19" together on the DUE?  

I'm thinking, if I power down, the DUE will only have the Altair680 stuff and the "basic680.s19" will need to be reloaded.  

Is there a .bin I can use to upload a fully functional emulator that is the operating system and BASIC?  


.

Chris Davis

unread,
Jul 5, 2025, 3:43:49 PMJul 5
to Altair-Duino
This is a project in the beginning stages.  While I can see adding a method to launch BASIC from within in the emulator (the way the Altair-Dunio can load 16k ROM BASIC) it's probably far away in this project.  As far as I know, there was never an official ROM BASIC for the Altair 680.

Walt Perko

unread,
Jul 5, 2025, 3:54:08 PMJul 5
to Altair-Duino
Hi, 

Okay, I get it.  I thought I was missing something.  

I ran a little BASIC program to run through a bunch of numbers ... counting up towards infinity, multiplying and getting the square root ... ran overnight and looking at random samples it was getting numbers to the -11th ... 

10 LET X = 0
20 PRINT X, X*X, SQR(X)
30 LET X = X+1
40 GOTO 20



.

Tom Wilson

unread,
Jul 5, 2025, 4:05:24 PMJul 5
to Walt Perko, Altair-Duino
The 680 did have a cassette interface, so it should be possible to re-create that with the new emulator. Maybe a virtual paper tape reader, too...  or build an external device that can connect to the second serial port; that could be a paper tape/cassette emulator... 





--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Chris Davis

unread,
Jul 5, 2025, 5:26:28 PMJul 5
to Altair-Duino
It has a "virtual paper reader". Type "L" in monitor and transmit a Motorola S-Record file (basic6890.s19).

Walt Perko

unread,
Jul 5, 2025, 5:45:54 PMJul 5
to Altair-Duino
Hi, 

That's how I loaded the "basic6890.s19" via TeraTerm.  

When I typed an "L" at the "." prompt, then I opened the "basic6890.s19" file in Notepad, Copy the giant list of numbers and did an Alt-V to paste the data into the Altair 680 ... it took awhile at 9600 BAUD, but then I'm able to run BASIC programs.  I've tested a few programs like CRAPS.BAS and they work fine. 


.

Mike Douglas

unread,
Jul 5, 2025, 11:19:37 PMJul 5
to Altair-Duino
Hi Chris,

The cold-start entry point for BASIC is $0000, not $0004, so use a J 0000 to start BASIC (not J 0004) and the double-echo will go away.

The "missing" character at the end of each string (or odd looking character on TeraTerm) is because BASIC sets the MSBit to mark the end of internal strings and the output character routine does not strip the MSBit. On TeraTerm, choose 7 bits, space parity and it will ignore the MSBit. I'm not sure what the equivalent setting will be for your Arduino console window.

Mike D

Walt Perko

unread,
Jul 5, 2025, 11:35:51 PMJul 5
to Altair-Duino
Hi, 

I made a little video showing what I did to get the Altair 680/SWTPC into the Arduino DUE (it doesn't work with a DUE-CH340 board) ... 

20250705 Installing via UpLoad & RUN Altair 680    https://youtu.be/XNBT4w7js6s


I've attached the two files I sent to the Arduino DUE ... the UpLoad files are on https://www.adwaterandstir.com/wp-content/uploads/UploadBinaryDue.zip  

Tom provided the .bin file for me since the Arduino IDE fails on my computer with conflicts with other software.  

The "basic6890.s19" came from inside this https://github.com/davischris/AltairDuino680 which was provided by Chris Davis ... 


.
Altair680_Emulator.ino.bin
basic680.s19
Message has been deleted

Chris Davis

unread,
Jul 6, 2025, 9:33:12 AMJul 6
to Altair-Duino
And I'll try 7S1 and see if it makes a difference in the display.


On Sunday, July 6, 2025 at 8:31:10 AM UTC-5 Chris Davis wrote:
Mike,

I tried "J 0000" and it just returned a monitor prompt.  So I examined the S-record file and I found that the instructions at $0000-$0003 (0D 76 00 F3) really don't disassemble to anything valid on a 6800.  I saw a JMP at $0004 (JMP $18F9) so I tried that.

The behavior is exactly the same on my physical Altair 680 - can't start at $0000, and you can see the results in my screen capture.

Does this version of BASIC work exactly as expected on your Altair 680?  If so, I'm back to my hypothesis, that your PROM is different than mine.  If so, can you share your PROM code?  It's only 256 bytes, so that should be easy to just send the bytes.

Chris Davis

unread,
Jul 6, 2025, 1:47:21 PMJul 6
to Altair-Duino
You're right, Mike.  "7S1" on my Altair 680 was the secret sauce.  The paper tape version of BASIC is working just fine, even with the jump to 0000.  I still don't know what is happening at 0000, but it works with the correct serial settings.  I'll give that a try on my emulator and see how that works.

Chris Davis

unread,
Jul 6, 2025, 1:55:12 PMJul 6
to Altair-Duino
I did a little digging (mostly because I wanted it to make sense to me).  It looks like back in 1976 systems were designed around 7-bit ASCII.  The 8th bit was reserved for internal purposes, like marking the end of tokens, lines,  etc.  BASIC was probably echoing it's own output because it was not recognizing the 8-bit ASCII already being output.

Tom Wilson

unread,
Jul 6, 2025, 2:18:43 PMJul 6
to Chris Davis, Altair-Duino
Yeah, ASCII only defines 127 character codes. Codes 128-255 are not part of ASCII at all. The top bit is usually used as a parity bit or not used at all for terminal communication, so BASIC and other programs use the top bit as things like the end of string marker or (in BASIC 2) string or integer tags. 

And that top bit is easy to test, needing only one instruction in some cases. 



--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Chris Davis

unread,
Jul 6, 2025, 3:29:21 PMJul 6
to Altair-Duino
After some research, this creates a puzzling situation - Arduino Due can't natively communicate at 7S1.  That, and many modern terminal applications don't support space parity.  I'll have to find an alternate way to handle this.  If anyone has any ideas, let me know.

Charley Jones

unread,
Jul 6, 2025, 3:51:37 PMJul 6
to Chris Davis, Altair-Duino
Incredible conversation guys.  I’m very impressed. 

Sent from my iPhone 15pm!
Charley Jones, PMP

On Jul 6, 2025, at 12:29 PM, Chris Davis <famousd...@gmail.com> wrote:

After some research, this creates a puzzling situation - Arduino Due can't natively communicate at 7S1.  That, and many modern terminal applications don't support space parity.  I'll have to find an alternate way to handle this.  If anyone has any ideas, let me know.
--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Mike Douglas

unread,
Jul 6, 2025, 6:06:42 PMJul 6
to Altair-Duino
Hi Chris,

0D 76 00 F3 at $0000 assembles to:
 SEC
 ROR $00F3

This ensures the value in $F3 has the MSBit set. $F3, in turn, is the ECHO flag for the Altair 680 PROM monitor. By setting the MSbit at $F3, BASIC turns OFF echo in the PROM's input character routine because BASIC wants to control the echo. If you "J 0000" after loading BASIC returns to the monitor prompt, something else is wrong.

I demonstrate loading these same Altair 680 BASIC tape images from both paper tape and cassette in several of my videos.

Mike D

David Williams

unread,
Jul 6, 2025, 6:09:13 PMJul 6
to Altair-Duino
The simplest fix would be to have the emulator strip the high bits if the user sets the port to 7 bits. After all, that's what would happen if you were able to set the serial port to 7S1.

Mike Douglas

unread,
Jul 6, 2025, 6:16:52 PMJul 6
to Altair-Duino
Chris,

You do not need to get the Arduino to communicate at 7S1 (for example, the Altair 680 is not using 7S1), but instead, you need the terminal application you're using to ignore bit 7. Teletypes and early video terminals typically ignored bit 7, so it was safe for BASIC and other programs to use bit 7 as a flag internally and not bothering controlling its specific state upon output. In Teraterm, setting its communication parameters to 7S1 makes it ignore bit 7 on input. Going the other direction (TeraTerm to the Altair 680), the Altair doesn't care about bit 7 either (it ANDs it off in the input character routine).

Mike D

Mike Douglas

unread,
Jul 6, 2025, 6:20:28 PMJul 6
to Altair-Duino
Note that the terminal emulator setting can 7 data bits and ANY parity option as long as the terminal emulator does not throw an error when the incoming byte has incorrect parity.

Mike D

Chris Davis

unread,
Jul 6, 2025, 7:03:39 PMJul 6
to Altair-Duino
I actually have set the emulator to strip the high bits.  But apparently that is not enough.  I suspect there may be something wrong with the SIMH 6800 code I'm using.  That wouldn't be unprecedented since Jim Nichols (a former CPU architect at AMD) told me he was puzzled at the original code.  Me made some fixes (which I have included) but I think it may need more work.  For example, it apparently did not recognize "SEC ROR $00F3" from the first four bytes.

Chris Davis

unread,
Jul 6, 2025, 10:21:25 PMJul 6
to Altair-Duino
Holy smokes, I found the error, and it was all mine!  Early in development I needed to trap when the Program Counter was 0x0000, but I forget and left that code in the 6800 CPU emulator code.  That's why "J 0000" would never work, and it would never turn the ECHO flag off.  Now that I've removed that debug code and stripped the high bit, everything is working perfect.

Thanks for your help Mike!

Mike Douglas

unread,
Jul 6, 2025, 10:26:01 PMJul 6
to Altair-Duino
Great!

Chris Davis

unread,
Jul 9, 2025, 11:50:56 AMJul 9
to Altair-Duino
I ordered some boards, so hopefully get one or two up and running with minimum functionality by VCFMW.

Screenshot 2025-07-09 at 10.47.29 AM.png

John Kennedy

unread,
Jul 10, 2025, 1:06:53 PMJul 10
to Altair-Duino
Oh cool :-) Have you considered - and this is obviously too late after you ordered PCBs - moving to a different microcontroller - a Raspberry Pico for example?

Charley Jones

unread,
Jul 10, 2025, 1:38:28 PMJul 10
to John Kennedy, Altair-Duino
Wow, flood gates open.
Incredible find Chris.

Sent from my iPhone 15pm!
Charley Jones, PMP

On Jul 10, 2025, at 10:06 AM, John Kennedy <johntk...@gmail.com> wrote:

Oh cool :-) Have you considered - and this is obviously too late after you ordered PCBs - moving to a different microcontroller - a Raspberry Pico for example?
--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Chris Davis

unread,
Jul 10, 2025, 1:45:12 PMJul 10
to Altair-Duino
I only ordered five PCBs (the minimum order), so that's not an issue.  I've invested too much time and money with the Arduino Due.  I have my preferred vendors and I don't want to have to stock different boards for different projects.  I also really like the instant on/instant off ability of the Arduino.  I don't wan to wait for emulator software to boot up, and then worry about corrupting the OS if I shut down incorrectly (which I have done a couple times with my PiDP-8).

Although Picos in bulk are only around $4.50 each, so that is appealing...

Tom Wilson

unread,
Jul 10, 2025, 2:13:20 PMJul 10
to Altair-Duino
As I started going through the benefits and drawbacks in my head, I pretty much came to the same conclusion. The RP2040W is a great microcontroller, but you'd need to add bit shifters to get enough I/O lines. This increases both the complexity of the build and adds some considerations to the emulation.

However.... and RP2040 or ESP32 can be a huge benefit for the system overall. Some people have already been experimenting with FabGL based terminals, and with the built in wireless interface, that's an attractive option as a replacement for the PIC based terminal.

John Kennedy

unread,
Jul 10, 2025, 2:19:53 PMJul 10
to Altair-Duino
Yes, it would not be a trivial shift and I know the Arduino has been the backbone of the line since it started.
On the other hand, the Pico is cheap, fast, easy to find and has built-in storage so it's not going to corrupt itself like your PiDP-8.
The development tools are good too.

Now, I'm not sure on the practicality of writing up all the lights and switches to it, so at this point just an idea for you to ponder :-)
Ooo.. creating a dedicated driver board based on the even cheaper IC at the heart of the Pico, acting as a drop-in replacement for the Arduino might see you busy.

Walt Perko

unread,
Jul 10, 2025, 3:20:18 PMJul 10
to Altair-Duino
Hi, 

I would vote for the ESP32 if there's a shift away from the DUE ...  


.

Chris Davis

unread,
Jul 10, 2025, 4:51:13 PMJul 10
to Altair-Duino
There will be no shift away from the Due!  This is not a democracy! :)

Walt Perko

unread,
Jul 10, 2025, 4:57:52 PMJul 10
to Altair-Duino
Hi, 

That's why I said; "IF there's a shift ..."  

I don't see any reason to change away from the DUE, the boards can be had super cheap.  


.

John Kennedy

unread,
Jul 11, 2025, 4:32:41 PMJul 11
to Altair-Duino
Well, not super super cheap. At $50, a DUO  is ten times more expensive than a Pico.

However, it is indeed true: this is not democracy nor a design-by-committee which is probably why the product exists in the first place :-) But I thought it would be interesting to mention it as an idea; and it was. 

Maybe I could experiment using one of my own Altair-Duinos :-)

David Williams

unread,
Jul 11, 2025, 4:39:47 PMJul 11
to Altair-Duino
It would be perfectly possible to use a Due hat dev board, and put your Pico plus some shift registers on it, if you wanted to experiment with porting the emulation to that platform.

Walt Perko

unread,
Jul 11, 2025, 4:44:11 PMJul 11
to Altair-Duino
Hi, 

I bought mine for $10ea. ... but not directly from the Arduino store.   


.

On Friday, July 11, 2025 at 1:32:41 PM UTC-7 johntk...@gmail.com wrote:

Richard Deane

unread,
Jul 13, 2025, 12:48:26 PMJul 13
to Walt Perko, Altair-Duino
It would be helpful to tell us where!

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Walt Perko

unread,
Jul 13, 2025, 12:55:49 PMJul 13
to Altair-Duino
Hi, 

Search on Google, eBay and AliExpress ... 

I bought a half dozen a few years ago for $30 including shipping, the prices have gone up a little, but they're $10/board + shipping now.  





.

Richard Deane

unread,
Jul 13, 2025, 10:28:32 PMJul 13
to Walt Perko, Altair-Duino
Thank you, my own search didn't find anything below 30 dollars so that's good to know. I often use AliExpress but their searches are erratic, though if I can find the item, cheaper than suppliers like Mouser.
Richard


Walt Perko

unread,
Jul 13, 2025, 11:16:11 PMJul 13
to Altair-Duino

Tom Lake

unread,
Jul 13, 2025, 11:19:15 PMJul 13
to Altair-Duino
Those aren't genuine Arduino Dues, though. They're knock-offs. For a difference of $30-$40.00, I'd rather use the real thing.

Michael J. Kupec

unread,
Jul 16, 2025, 5:37:50 PMJul 16
to Altair-Duino, Walt Perko, Richard Deane
Do a search on eBay for “DevTu 32-bit 84MHz”   (without quotes)
You’ll get a first result for one for $9.77 (plus $5.85 S&H)

NOTE: This is an Arduino clone but does work like real thing. 

Below that is similar selection of a true (used) Arduino for $20 (free delivery). 

BTW:  It’s called an Arduino DUE,  not DUO.  Probably what had thrown some folks searches off!

Have a great Day!
Michael J Kupec 
Sent from my iPhone

On Jul 13, 2025, at 10:28 PM, Richard Deane <rwd...@gmail.com> wrote:



Michael J. Kupec

unread,
Jul 16, 2025, 5:38:04 PMJul 16
to Altair-Duino, Walt Perko, Richard Deane

Have a great Day!
Michael J Kupec 
Sent from my iPhone

On Jul 13, 2025, at 11:03 PM, Michael J. Kupec <michae...@gmail.com> wrote:

Do a search on eBay for “DevTu 32-bit 84MHz”   (without quotes)
Message has been deleted

Charles Wall

unread,
Jul 19, 2025, 6:45:39 PMJul 19
to Altair-Duino
I was excited to see this!  I have regretted not buying a Altair 680 when they first came out in the late 70s.  I had an 8800 and just couldn't afford another computer at the time.  I am planning to get one of these!

I downloaded the code from GitHub and brought up the emulator on an OEM Due with some Arduino IDE help from a friend.  I won't go into the fun I had there other than to say I confirmed that I am not smarter than a fifth grader.  I wanted to try the eBay $9.77 clone Due as well, so I ordered a couple of those and the one I tried seems to work okay with simple Basic code.

Thanks for the exciting work you are doing and the information everyone is sharing!

Message has been deleted

da...@hansels.net

unread,
Jul 20, 2025, 9:39:50 AMJul 20
to Altair-Duino
After some research, this creates a puzzling situation - Arduino Due can't natively communicate at 7S1.  That, and many modern terminal applications don't support space parity.  I'll have to find an alternate way to handle this.  If anyone has any ideas, let me know.

Sorry, chiming in a bit late here...

As an alternative to setting your terminal to ignore bit 7 as Mike suggested, I wanted to mention that the AltairDuino firmware
deals with this by offering the "Use 7 bits" setting for each emulated serial card. When enabled, this just clears bit 7 of any
data byte transmitted via the serial port. That way the actual serial parameters don't matter and you don't need to use a terminal
that can ignore bit 7. Maybe you can do something similar in your Altair-Duino 680 firmware.

Chris Davis

unread,
Jul 20, 2025, 4:41:04 PMJul 20
to Altair-Duino
Yes, I have the Arduino code ignoring bit 7.

Tom Lake

unread,
Jul 20, 2025, 10:51:42 PMJul 20
to Altair-Duino
I'd like to use a real Teletype (7 bits, Even parity,  1 or 2 stop bits) with the 860. Will it be possible to use a real serial device, not through a USB serial port?

Tom Lake

unread,
Jul 21, 2025, 5:07:36 PMJul 21
to Altair-Duino
Where did you find  basic680.s19? I Googled for it but all I could find was Paper BASIC V1.1 R3.2.S19. When I try to send it
all that happens is I get back to the dot prompt. I tried both binary and text. Neither works. I'm using TeraTerm.



Chris Davis

unread,
Jul 21, 2025, 5:14:24 PMJul 21
to Altair-Duino
BASIC680.S19 is no longer part of the Github project.  After you load Paper BASIC V1.1 R3.2.S19 you need to enter "J 0000" (Jump to address 0x0000).

Walt Perko

unread,
Jul 21, 2025, 5:17:34 PMJul 21
to Altair-Duino
Hi, 

Tom at the "DOT" you type an "L"  ... NOT ENTER!  Then open the attached file into the Notepad ... Highlight all the HEX code,  and then in TeraTerm do an "ALT-V" to past all the text into the Altair 680 ... 

When it's done, just hit <ENTER> on how much RAM, etc.  


.

basic680.s19

Tom Lake

unread,
Jul 21, 2025, 5:27:01 PMJul 21
to Altair-Duino
Thanks! This file did work for me. 

One question (the first of many, I fear, since I'm an 8080 guy)
Is the incoming data supposed to be displayed as the monitor is loading the BASIC interpreter?
Here's how mine ends:

S1231A9E5620332EB20D0A434F505952494748542031393736204259204D4                               
S1231ABE43AE0D0A004D454D4F52592053495AC5000020495320495420524                               
S1231ADE20424551204F55540D2042524120494E5441504520474554204E4                               
S11E1AFE415241435445520D20454E440D000000000000000000000000000                               
S12100E006060606060604FFFDFFFDFFFFFFFDFDFFFDFD00FDFFFDFDFDFFF                               
DFFFF649D

MEMORY SIZE?
TERMINAL WIDTH?
WANT SIN-COS-TAN-ATN? Y

42690 BYTES FREE

MITS ALTAIR 680 BASIC VERSION 1.1 REV 3.2
COPYRIGHT 1976 BY MITS INC.

OK

Tom Lake

unread,
Jul 21, 2025, 5:34:47 PMJul 21
to Altair-Duino
After the data loads, I type

J 0000

but all that happens is the dot prompt reappears.

Walt Perko

unread,
Jul 21, 2025, 5:35:15 PMJul 21
to Altair-Duino
Hi, 

That's what I get too and then you're in BASIC to run programs, but no saving anything at this point.  


OTOH, I downloaded the new Giothub files:  https://github.com/davischris/AltairDuino680  

But when I try to compile and upload into my Arduino DUE this is what I get, and I know next to nothing about Arduino stuff ... this is why I need a .BIN file with everything compiled and ready to send to the DUE.  

FQBN: arduino:avr:diecimila
Using board 'diecimila' from platform in folder: C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\Altair680_Emulator.ino.cpp -o nul
C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\host_due.cpp -o nul
C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\m6800.cpp -o nul
Generating function prototypes...
C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\Altair680_Emulator.ino.cpp -o C:\Users\wperk\AppData\Local\Temp\1149344360\sketch_merged.cpp
C:\Users\wperk\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\wperk\AppData\Local\Temp\1149344360\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\Altair680_Emulator.ino.cpp" -o "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\Altair680_Emulator.ino.cpp.o"
"C:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\host_due.cpp" -o "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\host_due.cpp.o"
"C:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\wperk\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\m6800.cpp" -o "C:\\Users\\wperk\\AppData\\Local\\arduino\\sketches\\6EC1210F987D2D48F87A0B3023E40DFF\\sketch\\m6800.cpp.o"
In file included from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\Altair680_Emulator.ino.cpp:1:
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected unqualified-id before 'volatile'
 extern int32_t SP;
                ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected ')' before 'volatile'
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:7:16: error: expected ')' before 'volatile'
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:9:26: error: size of array 'RAM_0000_BFFF' is too large
 char RAM_0000_BFFF[0xC000];
                          ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino: In function 'int32_t CPU_BD_get_mbyte(int32_t)':
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:68:16: error: 'RAM_0000_BFFF' was not declared in this scope
         return RAM_0000_BFFF[addr];
                ^~~~~~~~~~~~~
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino: In function 'void CPU_BD_put_mbyte(int32_t, int32_t)':
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:91:9: error: 'RAM_0000_BFFF' was not declared in this scope

         RAM_0000_BFFF[addr] = val & 0xFF;
         ^~~~~~~~~~~~~
In file included from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from C:\Users\wperk\AppData\Local\arduino\sketches\6EC1210F987D2D48F87A0B3023E40DFF\sketch\Altair680_Emulator.ino.cpp:1:
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino: At global scope:
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:110:93: error: expected ')' before '(' token

 void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP)
                                                                                             ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:110:93: error: expected ')' before '(' token
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:110:93: error: initializer provided for function
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:110:95: error: expected ',' or ';' before ')' token

 void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP)
                                                                                               ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino: In function 'void setup()':
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\Altair680_Emulator.ino:132:12: error: 'RAM_0000_BFFF' was not declared in this scope
     memset(RAM_0000_BFFF, 0x00, sizeof(RAM_0000_BFFF));
            ^~~~~~~~~~~~~
In file included from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\io.h:99:0,
                 from c:\users\wperk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\pgmspace.h:90,
                 from C:\Users\wperk\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:28,
                 from C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:19:
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:97:9: error: expected unqualified-id before 'volatile'

 int32_t SP = 0;                           /* Stack pointer */
         ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:97:9: error: expected ')' before 'volatile'
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:97:9: error: expected ')' before 'volatile'
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:109:100: error: expected ')' before '(' token

 extern void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP);
                                                                                                    ^
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:109:100: error: expected ')' before '(' token
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:109:100: error: initializer provided for function
C:\Users\wperk\Documents\Arduino\Altair 680\AltairDuino680-main -01\Altair680_Emulator\m6800.cpp:109:102: error: expected ',' or ';' before ')' token

 extern void trace(int32_t PC, char *opcode, int32_t CCR, int32_t B, int32_t A, int32_t IX, int32_t SP);
                                                                                                      ^
exit status 1

Compilation error: expected unqualified-id before 'volatile'



.

Tom Lake

unread,
Jul 21, 2025, 6:28:52 PMJul 21
to Altair-Duino
I see one problem. You're using arduino:diecimila
That's not the same as the Arduino DUE. I did the same thing (see one of my previous messages)
Once I changed the board to the DUE, everything worked perfectly.

Walt Perko

unread,
Jul 21, 2025, 7:23:38 PMJul 21
to Altair-Duino
Hi,  

This is the only selection I have ... I can't find anything else in the "Board Manager" ... 

20250721-Arduino DUE v Diecimila.jpg


.

Chris Davis

unread,
Jul 21, 2025, 9:20:59 PMJul 21
to Altair-Duino
>> but all that happens is the dot prompt reappears.

Do you have the latest code uploaded to your Due?  That was a problem in an earlier version.

Chris Davis

unread,
Jul 21, 2025, 9:27:30 PMJul 21
to Altair-Duino
>> This is the only selection I have ... I can't find anything else in the "Board Manager" ... 

The Due is not an AVR board.  It's a SAM ARM Cortex-M3 board.

Look under Tools > Board > Arduino SAM Boards.

Walt Perko

unread,
Jul 21, 2025, 9:36:05 PMJul 21
to Altair-Duino
Hi, 

Okay, so that fixed the problems ... I don't understand why they don't just have an Arduino DUE in the first list, but anyway, everything compiled and uploaded, but this is the results I get in TeraTerm:  


Starting Altair 680 Emulator

.J 0000
Simulation halted!
Last instruction executed: PC=FFFFFFFF opcode=FF
PC=0000 SP=00F1 IX=0000
A=4A B=00 CCR=D4

Simulation halted!
Last instruction executed: PC=FFFFFFFF opcode=FF
PC=0000 SP=00F1 IX=0000
A=4A B=00 CCR=D4
Simulation halted!





.

Chris Davis

unread,
Jul 21, 2025, 10:30:17 PMJul 21
to Altair-Duino
If you just jump to a memory location with nothing loaded it’s going to do that. 

Walt Perko

unread,
Jul 21, 2025, 10:49:11 PMJul 21
to Altair-Duino
Hi,  

How do we  load Paper BASIC V1.1 R3.2.S19?  


.

Tom Lake

unread,
Jul 21, 2025, 10:50:15 PMJul 21
to Altair-Duino
Before you do the Jump, you have to do a Load to get the BASIC interpreter into memory.

.L (don't press Enter)
Use your terminal program to send the BASIC interpreter file (I use basic680.s19 - see an earlier post)
Send it as a text file, not binary.
Once BASIC is loaded, the MEMORY SIZE? question will be printed.

Why don't they list the DUE first? Because there are thousands of programs that use many different boards.
The DUE is just one of the Arduino boards and is used in just a few of the thousands of programs.

Tom Lake

unread,
Jul 21, 2025, 10:52:34 PMJul 21
to Altair-Duino
How do we load Paper BASIC V1.1 R3.2.S19?  

Good question. All I get is another dot prompt after loading and doing a

J 0000

on that one.

Walt Perko

unread,
Jul 21, 2025, 10:58:06 PMJul 21
to Altair-Duino
Hi, 

That's the thing!  I can get to the BASIC prompt if I Copy/Paste the HEX or in TeraTerm "Send file" and dump the  basic680.s19, but that's the only way I know how to "L"oad BASIC into the DUE ... 

This makes me wonder, is there another high RAM address where the BASIC is sitting and we just "L"oad from that address?  


.

Walt Perko

unread,
Jul 21, 2025, 11:10:47 PMJul 21
to Altair-Duino
Hi, 

I think there are still math errors in this sim software:  

10 FOR X = 0 TO 99999
20 PRINT X;"="; X^2
30 NEXT X
RUN
 0 = 0
 1 = 1
 2 = 4
 3 = 9
 4 = 16
 5 = 25
 6 = 36
 7 = 49
 8 = 64
 9 = 81.0001
 10 = 100
 11 = 121
 12 = 144
 13 = 169
 14 = 196
 15 = 225
 16 = 256
 17 = 289
 18 = 324
 19 = 361
 20 = 400
 21 = 441
 22 = 484
 23 = 529
 24 = 576
 25 = 625
 26 = 676
 27 = 729
 28 = 784
 29 = 841
 30 = 900.001
 31 = 961
 32 = 1024
 33 = 1089
 34 = 1156
 35 = 1225
 36 = 1296
 37 = 1369
 38 = 1444
 39 = 1521
 40 = 1600
 41 = 1681
 42 = 1764
 43 = 1849
 44 = 1936
 45 = 2025
 46 = 2116
 47 = 2209
 48 = 2304
 49 = 2401
 50 = 2500
 51 = 2601
 52 = 2704
 53 = 2809
 54 = 2916
 55 = 3025
 56 = 3136
 57 = 3249
 58 = 3364
 59 = 3481
 60 = 3600
 61 = 3721
 62 = 3844
 63 = 3969
 64 = 4096
 65 = 4225
 66 = 4356
 67 = 4489
 68 = 4624
 69 = 4761
 70 = 4900
 71 = 5041
 72 = 5184
 73 = 5329
 74 = 5476
 75 = 5625
 76 = 5776
 77 = 5929
 78 = 6084
 79 = 6241
 80 = 6400
 81 = 6561
 82 = 6724
 83 = 6889
 84 = 7055.99
 85 = 7225
 86 = 7396
 87 = 7569
 88 = 7744
 89 = 7921
 90 = 8100
 91 = 8281
 92 = 8464
 93 = 8649
 94 = 8836
 95 = 9025
 96 = 9216
 97 = 9409.01
 98 = 9604
 99 = 9801


Chris Davis

unread,
Jul 21, 2025, 11:22:47 PMJul 21
to Altair-Duino
Tom, did you load the latest code?

Walt Perko

unread,
Jul 21, 2025, 11:30:15 PMJul 21
to Altair-Duino
Hi, 

I downloaded the .zip file from:  https://github.com/davischris/AltairDuino680

Then I opened the .zip file etc ... 

But the BASIC is failing!  basic680.s19 needs to be updated with the math fixes.  


.

Chris Davis

unread,
Jul 21, 2025, 11:39:35 PMJul 21
to Altair-Duino
Basic680.s19 will not be updated. It’s not part of the project anymore. 

Chris Davis

unread,
Jul 22, 2025, 12:30:57 AMJul 22
to Altair-Duino
Here is BASIC v1.1 running that code on a real Altair 680:

BASIC.png

Walt Perko

unread,
Jul 22, 2025, 12:35:44 AMJul 22
to Altair-Duino
Hi, 

That's the same faulty code as I've had before with the SWTPC emulator ... Mike tried his "BASIC" on his real SWTPC and it didn't have the errors.  


OTOH, I found these, but I haven't tried either yet:  



My rescue parrot Pancho is insisting I get to bed.  


.

Chris Davis

unread,
Jul 22, 2025, 8:55:06 AMJul 22
to Altair-Duino
My screen capture is Mike's BASIC on a real Altair 680, not an emulator.

Walt Perko

unread,
Jul 22, 2025, 11:29:06 AMJul 22
to Altair-Duino
Hi, 

Something is wrong somewhere, when the BASIC works correctly on a real SWTPC but not the Altair 680.  


.

Chris Davis

unread,
Jul 22, 2025, 12:06:58 PMJul 22
to Altair-Duino
In the research I have done, "ALTAIR 680 BASIC VERSION 1.1 REV 3.2" appears to be the latest and final official revision ever released for the Altair 680.  The 680 was not very well supported by MITS, so I'm not surprised that minor bugs like this are still present.  Here's what I was able to find out about this error:

Altair 680 BASIC uses Microsoft's original 32-bit floating point format, which stores:
- Sign: 1 bit
- Exponent: 8 bits (biased)
- Mantissa: 23 bits normalized

This gives it roughly 6–7 decimal digits of precision.  As the numbers get larger, the relative error grows because the fixed bit-length mantissa can't capture all digits.  

This is expected (but annoying).  This behavior also occurs in Microsoft 8080 BASIC 4K, 8K, and Extended, and other 8-bit BASICs with similar FP formats.  Apparently you’ll even see this on some versions of Apple II BASIC and PET BASIC, which were also Microsoft-derived.

The bottom line: Accept the fuzziness, it's part of retro charm.

Interestingly enough, while "PRINT 30^2" returns 900.001, "PRINT 30*30" returns 900.

Charles Wall

unread,
Jul 22, 2025, 12:14:52 PMJul 22
to Altair-Duino
My guess is Altair Basic and SWTPC Basic calculate squares differently, I don't know who wrote SWTPC Basic.  Just a FYI, if you calculate squares in Altair Basic as I*I rather than I^2 you get better answers.  Back in the day I calculated squares using * rather than having to look for the ^.  Lazy, I guess.

Chris Davis

unread,
Jul 22, 2025, 12:18:33 PMJul 22
to Altair-Duino
Here's the same code running on my Apple II:

IMG_9969.jpeg

Chris Davis

unread,
Jul 22, 2025, 12:24:01 PMJul 22
to Altair-Duino
All-in-all, I'm glad my emulator is true to the original quirkiness.  Thanks for pointing this out!

Charles Wall

unread,
Jul 22, 2025, 12:24:14 PMJul 22
to Altair-Duino
As I recall, the fuzziness wasn't only a "feature" in BASIC but also in FORTRAN. There was a set of FORTRAN subroutines we used when doing financial calculations on the IBM 1130 computer which would correctly add, multiply, etc. numeric fields to a specified number of positions and decimal places in order to get around the fuzziness.  That was indeed part of the charm.

John Kennedy

unread,
Jul 22, 2025, 12:27:59 PMJul 22
to Altair-Duino
This is awesome. It's like the Pentium math bug. But perhaps little less important. Maybe ;-)

Will the 680 be on display at any forthcoming VCF events?

Chris Davis

unread,
Jul 22, 2025, 12:30:50 PMJul 22
to Altair-Duino
I'm really hoping to get one done for VCFMW in September.

Walt Perko

unread,
Jul 22, 2025, 12:36:15 PMJul 22
to Altair-Duino
Hi, 

I did another test:  

10 FOR X = 0 TO 9999
20 PRINT X;"=";X^2
30 PRINT X;"=";X*X
40 PRINT X;"=";INT(X^2)
50 NEXT X



Line 40 seems to clean-up the error correctly for whole numbers, 

Then I tried this program:  

10 FOR X = 0 TO 29 STEP .1

20 PRINT X;"=";X^2
30 PRINT X;"=";X*X
40 PRINT X;"=";INT(X^2) : PRINT
50 NEXT X



Interesting that stepping .1 fixes the error.  

 8.8 = 77.44
 8.8 = 77.44
 8.8 = 77

 8.9 = 79.21
 8.9 = 79.21
 8.9 = 79

 9 = 81
 9 = 81
 9 = 81


 9.1 = 82.81
 9.1 = 82.81
 9.1 = 82

 9.2 = 84.64
 9.2 = 84.64
 9.2 = 84


.

On Tuesday, July 22, 2025 at 9:24:14 AM UTC-7 wall...@gmail.com wrote:

Tom Wilson

unread,
Jul 22, 2025, 1:23:27 PMJul 22
to Altair-Duino
Now I'm curious when Microsoft (or Commodore) switched the floating point format to 40 bits. BASIC 2 (at least on Commodore, not sure where else) used a 40 bit float, with a 31 bit mantissa. 

Rumor has it that the ZX Spectrum also used a 40 bit float, which was independently developed by Sinclair. 

It is loading more messages.
0 new messages