Emulator changes for 8800B front panel

195 views
Skip to first unread message

wils...@gmail.com

unread,
Jun 15, 2022, 1:38:19 PM6/15/22
to Altair-Duino
Hi, guys. I decided to start a new thread for the emulator changes for the Altairduino 8800B. This is a reprise of the same suggestion I posted on the "kit status" thread.

Here's my suggestion:
  1. A short press on Aux1 or Aux2 does the "B" function (display/load A, input/output)
  2. A long press on Aux1 or Aux2 performs the classic action
And in the Configuration menu:
8800(B) mode: Off | On

I have also reached out directly to David with the same suggestion and offered to code the changes. On the technical side, this would add a bit to the "flags2" bitmask flag, and it would be necessary to change the switch logic so that the Aux switches are activated on release


Tom Wilson

unread,
Jun 15, 2022, 4:07:19 PM6/15/22
to Rodney Hester, Altair-Duino
FYI, don't forget to hit "Reply to all" when responding to the mailing list.

That's a quirk in the 8800B's behavior I hadn't expected. I was expecting the value to stay on the LEDs after the switch was released, not revert back to the memory value.

The alternative is a chord with another switch on the front panel. It would have to be a switch that doesn't modify memory or start the computer running again. So EXAMINE is the only other switch we could use in a chord with both Aux Switches. 

So in B mode:
EXAMINE+Aux1 Up would start the preset program
EXAMINE+Aux1 Down starts the program selected by the switches
EXAMINE+Aux2 Up starts recording
EXAMINE+Aux2 Down replays examples

It's actually simpler to code than the 2 second method, anyway.

Can anyone poke holes in this?



On Wed, Jun 15, 2022 at 12:07 PM Rodney Hester <rhes...@gmail.com> wrote:
Concern about long/short press is that (for example) the display function, in order for the operator to actually read the display, could easily be considered a 'long' press as they hold it in position to read/interpret the numbers.

Perhaps taking a cue from how RESET is handled, you toggle 8800B mode (the default?) with AUX1 and AUX2 up simultaneously and 'classic' mode by toggling them both down simultaneously?  (I'm unaware of any function of any mode that requires both AUX switches toggled simultaneously.)

--
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 on the web visit https://groups.google.com/d/msgid/altair-duino/3a8e2f75-b801-4771-89bb-144ccbbeef8cn%40googlegroups.com.

Rodney Hester

unread,
Jun 15, 2022, 4:42:57 PM6/15/22
to Tom Wilson, Altair-Duino
To be clear, my interpretation of the function of those switches comes from the 8800b operations manual, specifically:


PROM data is here:


Further confirmation of at least DISPLAY/LOAD ACC remaining a momentary switch and the display reverting when released is here:


While (re)reading the manual, I forgot one other nuance that I believe is speciic to the b model - SLOW, discussed here:

Tom Wilson

unread,
Jun 15, 2022, 5:11:07 PM6/15/22
to Rodney Hester, Altair-Duino
Thanks, Rodney.

It's easy enough to code it so the display is momentary and reverts when the switch is released. And I think the EXAMINE chord is probably going to work for running the samples.

As to SLOW: That's already implemented in the emulator, 

b n

unread,
Jun 16, 2022, 6:27:55 AM6/16/22
to altair...@googlegroups.com
Thanks for this, Tom.

I'm a fan of 'code what you love'.

Trying to think Easter Egg here.

Undocumented keybindings in the Config menu (STOP + AUX1 UP) seem like
an obvious place to put things, that aren't there yet.

Claimed bindings (main Config screen):

ftTpidmcuUsEPDCBHIMSRLx  .. leaves:

AbcdeFGhiJKlmNOpQrstuVWXYZ

Unclaimed keybindings shown in upper case; seeking only upper case
unused bindings, here.

V for Maverick Mode; Z for 'zeta' (beta) mode. ;)

Something like that came to mind.  Just typing stuff into this computer;
not at all attached to these ideas.

wrt 'how to access new functions/features without changing the 'purist
mode' that's there already'.
> /emulator/ changes for the Altairduino 8800B. This is a
> reprise of the same suggestion I posted on the "kit status"
> thread.
>
> Here's my suggestion:
>
> 1. A short press on Aux1 or Aux2 does the "B" function
> (display/load A, input/output)
> 2. A long press on Aux1 or Aux2 performs the classic action
>
> And in the Configuration menu:
> 8800(B) mode: Off | On
>
> I have also reached out directly to David with the same
> suggestion and offered to code the changes. On the technical
> side, this would add a bit to the "flags2" bitmask flag, and
> it would be necessary to change the switch logic so that the
> Aux switches are activated on /release/.
>
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/altair-duino/3a8e2f75-b801-4771-89bb-144ccbbeef8cn%40googlegroups.com
> <https://groups.google.com/d/msgid/altair-duino/3a8e2f75-b801-4771-89bb-144ccbbeef8cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/altair-duino/CALt8mqQ_qUdFCFDeNheZnOU3S3uw5wm7%2BmPta%2B9CEz6LQ-_Tig%40mail.gmail.com
> <https://groups.google.com/d/msgid/altair-duino/CALt8mqQ_qUdFCFDeNheZnOU3S3uw5wm7%2BmPta%2B9CEz6LQ-_Tig%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Belknap K

unread,
Jun 16, 2022, 6:37:58 AM6/16/22
to altair...@googlegroups.com
Sorry - I tried using my email client; I thought the 'mailing list' made
my byline 'canonical'.  Oops.

On 6/16/22 10:27, b n wrote:
> Thanks for this, Tom.
>
> I'm a fan of 'code what you love'.
>
snip

wils...@gmail.com

unread,
Jun 19, 2022, 1:52:25 AM6/19/22
to Altair-Duino
Hey, guys. Here's my first test release.

Here are the changes so far: 
  • Config: Added a "B" option in the Config menu. B mode must be enabled for the B Mode commands to work. 
  • Help: When Serial Input is enabled, press ? in WAIT mode for help to get a list of keyboard commands
  • Display: In WAIT mode, press AUX1 Up to display the CPU's accumulator on the Data LEDs.
  • Load: In WAIT mode, press AUX1 Down to load the CPU's accumulator with the value on switches A0-A7.  
TODO:
  • Making the register display momentary
  • INPUT/OUTPUT switch
You'll need the Arduino IDE installed and configured to load this release. 

wils...@gmail.com

unread,
Jun 22, 2022, 6:45:26 PM6/22/22
to Altair-Duino
Hey, all. The 8800B behavior changes are now basically complete. Display/Load and Input/Output now do what the front panel says.

What I have not done yet is make the LED state momentary: ie, when you press up to see the Accumulator value, the LEDs will stay on. However, I've had enough "interesting" behaviors while debugging this that I want get the changes into other people's hands first and get your feedback before I go any further. 

So please grab the latest code from https://github.com/tomxp411/Altair8800 and give it a try on your unit. 

Things to test: 
  • Help menu for serial input ("i" on Config menu to enable, press ? when in STOP mode to get a menu.) 
  • Aux1 Up: Display the Accumulator on the data LEDs
  • Aux1 Down: Load the value from the right 8 switches into the Accumulator
  • Aux2 Up: Read from the port set by the left 8 switches. This places the value in the Accumulator
  • Aux2 Down: Output the Accumulator to the port set by the left 8 switches. 
An easy way to test the input/output is to read from and write to port 1. Port 1 is the serial port's data port, so the last keyboard key pressed will be present on 1 when you read from it, and writing to the port will send a character to the terminal. So you can try something like loading in 40 to the accumulator with LOAD, then pressing OUTPUT. That should display a @ on your terminal. 

Another test is to read port FF. That should always return FF, since you have all the sense switches up to read the port. 

I'm especially interested in getting results from anyone using the I/O module. I have no way to test whether this works, but since I'm simply calling David's existing port I/O code, I am expecting normal behavior.

Belknap K

unread,
Jun 23, 2022, 11:16:09 AM6/23/22
to altair...@googlegroups.com
Thanks, Tom W! Nice revision.

Ran your code this morning, on the full A-D hardware (installed on the
Altair-Duino mainboard).

BUG:

H)ex upload in the main (non-Config) session no longer responds, in 'B'
mode.

https://github.com/tomxp411/Altair8800/blob/master/Altair8800.ino#L1083-L1087

The logic that makes Lines 1083-1087 do their job isn't functioning, in
(B) mode, would be my guess on this.

The lines themselves are unchanged; the bug is elsewhere, I think.


Reverting to 8800 mode (rather than 8800B mode) accesses the H)ex upload
function, correctly, in your code-base.

When the 'H' keybinding is unresponsive, I have:

 8800(B) Mode : 8800B

 Enable serial (p)anel : no
 Enable serial (i)nput : yes
 Enable serial (d)ebug : yes

I have config.h reverting all electives, back to dhansel's version.

I (of course) kept the new code intact:

 $   git show | sed 4q
commit 4cc9fb4a8343a7f3cfdba6c6196132b484e28223
Author: David Hansel <da...@hansels.net>
Date:   Sun Jun 13 15:26:01 2021 -0400

 $  diff ./config.h ../tomxp.d/Altair8800/config.h
5a6,8
> // Thu 23 Jun 12:49:45 UTC 2022
> // cloned upstream and modded just config.h just now, to say:
>
223a227,231
>
> bool config_b_mode();
> void set_b_mode(uint32_t Enabled);
> void toggle_b_mode();
> void print_b_mode();

bk

Northwest Connecticut USA


On 6/22/22 22:45, wils...@gmail.com wrote:
> Hey, all. The 8800B behavior changes are now basically complete.
> Display/Load and Input/Output now do what the front panel says.
>
> What I have /not/ done yet is make the LED state momentary: ie, when
> you press up to see the Accumulator value, the LEDs will stay on.
> However, I've had enough "interesting" behaviors while debugging this
> that I want get the changes into other people's hands first and get
> your feedback before I go any further.
>
> So please grab the latest code from
> https://github.com/tomxp411/Altair8800 and give it a try on your unit.
>
> Things to test:
>
> * Help menu for serial input ("i" on Config menu to enable, press ?
> when in STOP mode to get a menu.)
> * Aux1 Up: Display the Accumulator on the data LEDs
> * Aux1 Down: Load the value from the right 8 switches into the
> Accumulator
> * Aux2 Up: Read from the port set by the left 8 switches. This
> places the value in the Accumulator
> * Aux2 Down: Output the Accumulator to the port set by the left 8
> switches.
>
> An easy way to test the input/output is to read from and write to port
> 1. Port 1 is the serial port's data port, so the last keyboard key
> pressed will be present on 1 when you read from it, and writing to the
> port will send a character to the terminal. So you can try something
> like loading in 40 to the accumulator with LOAD, then pressing OUTPUT.
> That should display a @ on your terminal.
>
> Another test is to read port FF. That should always return FF, since
> you have all the sense switches up to read the port.
>
> I'm especially interested in getting results from anyone using the I/O
> module. I have no way to test whether this works, but since I'm simply
> calling David's existing port I/O code, I am expecting normal behavior.
>
>
>
> On Saturday, June 18, 2022 at 10:52:25 PM UTC-7 wils...@gmail.com wrote:
>
> Hey, guys. Here's my first test release.
>
[truncated remaining quoted text - bk]


Tom Wilson

unread,
Jun 23, 2022, 11:36:02 AM6/23/22
to Belknap K, Altair-Duino
Ah. It looks like I missed an AUX1-based keyboard shortcut. I'll add that to the to-do list. 

Thanks.




--
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.

Belknap K

unread,
Jun 23, 2022, 2:31:36 PM6/23/22
to Altair-Duino
8800-b mode Accumulator examine (AUX1_UP)

First impressions


   ;)  Apologies if this is too long or hard to follow. ;)



I single stepped a keyboard echo program, and tried the AUX1_UP function
to display the Accumulator.

It did display it, but wasn't necessarily non-invasive, as it did so. ;)

(You could just stop reading right there; that says it all)


My program echoes the typed keystroke; however, if I first read the
Accumulator (onto the data LEDs) using AUX1 up, it won't echo that
keystroke to the terminal (like it'd do, otherwise).

Generally, I read the Accumulator (using AUX1_UP) after two single-step
requests past the keystroke itself.

Using the keyboard:  '..ttwtt' .. the 'w' is the keystroke I want
echoed; and the 't' keystrokes are single-stepping the program.


Code:

https://termbin.com/0shj

I ran the program to test keyboard echo; then stopped and single-stepped
through it.

After a JNZ (at 0x40E) there's five NOPs followed by (at 0x0416) IN 01
and then OUT 01.

What I do: carefully step through the five NOPs watching for IN 01
(which is when I start paying strict attention ;)

Two more 't' keypresses (to s(t)ep through the program).

That's when I type a keystroke besides a 't' ('i' and 'w' seem to work,
here).

If I type a 'w' the accumulator will show 167Q (0x77).

IF I DON'T use the AUX1_UP to peek at the Accumulator, the keystroke
typed will echo to the terminal (it's often a 't' as that is the
keystroke used to step through the program).

Sometimes it catches the keystroke, and echo's it instead (which it does
100% of the time when not single-stepping).

Also tried using the front panel Single Step switch instead of 't' on
the keyboard.  That ended up being a hybrid keyboard/front panel
switches approach, as the program requires keyboard input, to do
anything interesting.
> <mailto:altair-duino%2Bunsu...@googlegroups.com>.

Belknap K

unread,
Jun 23, 2022, 3:16:24 PM6/23/22
to Altair-Duino
Here's that termbin (https://termbin.com/0shj ):

Start address: 400H
0400: LXI SP,0521
0403: JMP 041B
0406: NOP
0407: NOP
0408: NOP
0409: NOP
040A: IN 00
040C: ANI 01
040E: JNZ 040A
0411: NOP
0412: NOP
0413: NOP
0414: NOP
0415: NOP
0416: IN 01
0418: OUT 01
041A: RET
041B: CALL 040A
041E: JMP 041B
0421: NOP

Start address: 2000o
End address: 2041o

:10040000312105C31B0400000000DB00E601C20A25
:10041000040000000000DB01D301C9CD0A04C31BA6
:020420000400D6
:0000000000

 $ cat tib_gg2.asm
        ORG     2000o
START:  LXI SP, STACK+400Q
        JMP run
        NOP
        NOP
        NOP
        NOP
KEY:    IN      000
        ANI     001
        JNZ     KEY
        NOP
        NOP
        NOP
        NOP
        NOP
FOUND:  IN      001
        OUT     001
        RET
run:
CNVSN:
.loop   CALL    KEY
        JMP     .loop
STACK:
        DB      0
        END

Tom Wilson

unread,
Jun 23, 2022, 4:00:21 PM6/23/22
to Belknap K, Altair-Duino
Hmm... I think this is working as expected. Unfortunately, "as expected" isn't what you're hoping for. Here's why (I think:)

The emulator actually reads input from the virtual SIO port for the menu and the debugger. When you press STOP to put the system in WAIT mode, the system still reads from the SIO every time you press an action switch. This is true even if you press EXAMINE or some other switch that doesn't actually execute code. If there's data in the serial port, it will still get read out by the serial debugger. 

Short version... you're not going to be able to single-step through code that uses the serial port while you have the serial debugger or serial input active. They use the same port and so destroy the data in the control and data registers while it's active.

You should be able to use different serial ports at the same time, though. Consider this setup:
(1) Configure SIO             : Primary (USB Programming Port)
(2) Configure ACR             : Not mapped
(3) Configure 2SIO port 1     : Serial (pin 18/19)
(4) Configure 2SIO port 2     : USB Native Port

This should allow you to work with the 2SIO registers separately from the SIO registers used by the console. I've actually done this in the past when testing serial I/O in BASIC programs. 



--
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 on the web visit https://groups.google.com/d/msgid/altair-duino/a7f2c835-2de5-7043-c044-c19e6cc62d1c%40gmail.com.

Belknap K

unread,
Jun 23, 2022, 5:17:15 PM6/23/22
to Altair-Duino
Thanks, Tom. That helps a lot.

Yea, I'm worried about training myself to expect things that don't map
to what's objectively going on. ;)

I know so very little about this system.

What I did (great minds think alike) was deduce that I couldn't take it
for granted that I was going to be able to use the serial debug feature
(which prints to the serial port/terminal) and expect things not to
change 'underneath' (like pulling the rug out from under you).

So I turned it off. ;)  For a while.

I've got it worked out much better now, what happens and when; if the
INP lamp is on, I can freely type several keystrokes; only the last one
matters.  The data lamps follow what I type (an '@' gives a singleton
lit; a space char gives a different singleton).

I can throw the STOP/RUN to RUN at that point and it'll echo the
keystroke (the ruling one; the last one).

The keystroke that breaks the trap/loop is on the Accumulator going in,
but I haven't decided if it's reliable or not.

Using the front panel switches more, is helping to understand what
you're doing with the B modification, wrt display of the Accumulator. 
I'm learning when to single-step; when to SLOW-step, and when to RUN (at
full speed).

A string of INR E instructions is my operator's flag (034Q).  I have
enough of them repeated in sequential addresses to alert me that a
sought condition has been trapped (a keystroke has broken the scanning
loop).

The five NOPs say that the critical part is immediately on the horizon.

I had no idea I'd be inventing these kinds of telltales when I read the
adwaterandstir ad copy. ;)  Haha.

I always wanted know what all those fp lamps were about on the Altair. 
I got a pretty good idea, now.

New code is here:

https://termbin.com/d7vl

(same program, with a string of (single-byte instruction) 'INR E' added).

Thanks for your patience and explanations.  This is a lot to take in!

bk

On 6/23/22 19:59, Tom Wilson wrote:
> Hmm... I think this is working as expected. Unfortunately, "as
> expected" isn't what you're hoping for. Here's why (I think:)
>
> The emulator actually reads input from the virtual SIO port for the
> menu and the debugger. When you press STOP to put the system in WAIT
> mode, the system still reads from the SIO every time you press an
> action switch. This is true even if you press EXAMINE or some other
> switch that doesn't actually execute code. If there's data in the
> serial port, it will still get read out by the serial debugger.
>
> Short version... you're not going to be able to single-step through
> code that uses the serial port while you have the serial debugger or
> serial input active. They use the same port and so destroy the data in
> the control and data registers while it's active.
>
> You should be able to use different serial ports at the same time,
> though. Consider this setup:
> (1) Configure SIO             : Primary (USB Programming Port)
> (2) Configure ACR             : Not mapped
> (3) Configure 2SIO port 1     : Serial (pin 18/19)
> (4) Configure 2SIO port 2     : USB Native Port
>
> This should allow you to work with the 2SIO registers separately from
> the SIO registers used by the console. I've actually done this in the
> past when testing serial I/O in BASIC programs.
>
> Tom W
>
>

Tom Lake

unread,
Nov 1, 2024, 7:28:08 PMNov 1
to Altair-Duino
Did you ever get the LED state of the accumulator momentary?

Tom Lake

unread,
Nov 1, 2024, 7:50:15 PMNov 1
to Altair-Duino
I just tried downloading from  https://github.com/tomxp411/Altair8800  and there are no changes for the 8800b front panel. Is the code for that still available?

Tom Wilson

unread,
Nov 1, 2024, 7:52:42 PMNov 1
to Tom Lake, Altair-Duino
No, it still leaves the accumulator on the display, just like the Examine switch does. I may get back to that, at some point, but using B mode seemed to create more problems than it solved, since it requires more finger gymnastics to start up the ROM  and dissk programs.






Tom Wilson

unread,
Nov 1, 2024, 7:55:51 PMNov 1
to Tom Lake, Altair-Duino
That should be on my Github. The link I posted in my previous message should include the B mode changes, as well as the ones I just put in for auto-start and  config auto-load.






Reply all
Reply to author
Forward
0 new messages