• Please review our updated Terms and Rules here

Hacking a bit with spacewar without EAE, detailed info about AX08 programming wanted.

Roland Huisman

Veteran Member
Joined
Mar 24, 2011
Messages
1,464
Location
The Netherlands
I've been playing a little bit with the Spacewar software for the LAB8 with AX08.
The AX08 is an external unit for digital I/O, Analog I/O, programmable RTC and
a point plot display. It is not compatible with a VC8E or other point plot hardware.

But this version doesn't need the EAE option. So I thought let's try to get it to work on a VC8E
with an DK8E RTC. With a few hours of experimenting (thanks to the PALBART assembler!)
I got something on my screen and my RTC hack seems to work also...

This is how it looks now on my oscilloscope at the moment. 4 times more or less the same image.
Does anyone have detailed programming info about the AX08?

I'm toggling the switches of my 8M here. I was surprised by the text "TWO WINS!" :D
That text is only in that corner and not in the 'four' screens.


So I've got to figure out some stuff here :sarcasm: I'm not a real star in PDP8 programming.
But I thought it is fun to try. And maybe others have ideas to make this version a success...

Regards, Roland
 
Last edited:
I've converted the 9 bits of the AX08 to 10 bits for the VC8E by just shifting the data one bit to the left.
So the picture quality stays at 9 bit but the size matches the screen now.

BUT... The AX08 seems to be a linear DAC and the VC8E is two complement.
So the screen is not right yet. I have to invert bit 2 before writing to the VC8E.
That is the most significant bit for the VC8E.

CLL RAL /shift one bit to the left before writing to screen
> code to invert bit 2 in AC<
DILX /SET X VALUE

Any PDP8 coding specialist here who can tell me how I can invert that bit in an easy way?

I was thinking to just add 001 000 000 000. When the bit is "0" it becomes a "1" and
if it is a "1" it becomes a "0". In the last case Bit 1 becomes a one but that bit doesn't
affect the DAC... Now I've used TAD 1000 to invert the bit and that works at least...
But there is probably a better way to do this... Suggestions are always welcome.

ships.jpg

Both ships show up now. I can already rotate them, shoot and the jet engine shows up.
But I can't move them, I think I've killed something... Things to figure out... Fun :D
 
Last edited:
I was thinking to just add 001 000 000 000. When the bit is "0" it becomes a "1" and
if it is a "1" it becomes a "0". In the last case Bit 1 becomes a one but that bit doesn't
affect the DAC... Now I've used TAD 1000 to invert the bit and that works at least...
But there is probably a better way to do this... Suggestions are always welcome.

A general purpose XOR takes 10 instructions so what you are doing is best for this situation. A specific case takes eight instructions, two constants and two variables.

DCA TMP1
TAD TMP1
CMA
AND C1000
DCA TMP2
TAD TMP1
AND C6777
TAD TMP2


C1000, 1000
C6777, 6777

If the flipping of bit 1 turned out to be an issue the fastest way would be to build a lookup table of 1024 words and just look it up.

TAD PTRTBL /BUILD POINTER INTO TABLE
DCA TMP1 /STORE POINTER
TAD I TMP1 /DE-REFERENCE THE POINTER

TMP1, 0
PTRTBL, TABLE /POINTER TO THE TABLE
TABLE, 1000
1001
1002
...

You could even incorporate the RAL into the table which would cut the table size in half. But your TAD solution is still faster.

However, you might look at how they are generating the number. It could be that you can generate it correctly more quickly than having to fix it up.
 
Last edited:
Hi Doug,

Thanks for the explanation! Good to know that I'm at least thinking in the right way.

It seems I'm getting somewhere now :D The ships are flying, I can turn on the jet
motors and shoot each other. Also collisions between ships works. There is a part of the
software there I can't use the TAD 1000 because I have to backup the AC value first.
That is why the text is now still very small...


The picture still looks a bit ugly because I don't turn off the electron beam.
The bright star is not in the middle yet and I have some more work to do.

But it runs on my VC8E clone boards and with my DK8E RTC clone.

Yesterday I got two M863 I/O boards which I want to use with two joysticks.
(I've repaired already one board. The other needs a new DEC8251)

When you don't have a M863 you can use the front panel switches
which I had to do with one hand in the demo... I have to implement the M863 now.

Maybe other people like to have this Spacewar program as well when I'm done...
It is fun to see these ships fly :D

Regards, Roland
 
Roland,

>>> Maybe other people like to have this Spacewar program as well when I'm done...

Oh yes Sir!!!

This was on my project list for next year - but if you are having a crack at it now :)...

Dave
 
I built hand controls for using with the digital I/O part of the M8316, DKC8A in my 8a machine. Had to change one instruction than normally fetches the switch register to fetch the digital input of the DKC8A board to use them with Spacewar.
 
I found something which is strange to me in the original code btw...

CRF=6072 and CCF=6052 are defined and I don't really understand why...
The AX08 address is 63xx.

The 605x and 607x are the IOT addresses for a primary and secondary VC8E.
The 6052 and 6072 IOTs are "DISD, Display Skip if Done" on a VC8E.
It is under a comment " /CLEAR OTHER REMAINING LIKELY FLAGS ".

But why would you sent a VC8E command if it isn't even in the system?
I've just removed it from the code but I wonder what was the meaning is of this...
Or does the AX08 have an extra IOT address? I haven't found it.
So if anyone knows the story behind it, please speak up :)
Maybe a leftover from another version which was just made for the VC8E?

In the meanwhile I've got the game writing to the screen in the official way.
So write the data, intensify and check if it's done already... That looks much better.

I have to fine tune the RTC clock a bit... Baby steps... :computer:

Regards, Roland
 
I built hand controls for using with the digital I/O part of the M8316, DKC8A in my 8a machine. Had to change one instruction than normally fetches the switch register to fetch the digital input of the DKC8A board to use them with Spacewar.

Hi Anders,

Do you know the switch functions of the EAE software version you have?
In this version they are for the front switches:

0 SHIP ONE ROTATES LEFT
1 SHIP ONE ROTATES RIGHT
2 SHIP ONE ACCELERATES
3 SHIP ONE FIRES
8 SHIP TWO ROTATES LEFT
9 SHIP TWO ROTATES RIGHT
10 SHIP TWO ACCELERATES
11 SHIP TWO FIRES

At the start of the program you can make a choice between the SR or
the contingency inputs of the AX08. I want to edit the contingency
input code to read the M863 board.

If someone does not have that card, you can always use the front panel switches...

Do you remember what inputs are used for the version that you are running?
The front panel of this version uses 0-3 and 8-11 but the contingency inputs use 0-3 and 4-7.
I think your version also uses 0-3 and 8-11? I think I'm going to change the M863 part to that.

First I have to find the program instructions for the M863...

It is all well documented, but sometimes hard to find in all those documents...
So if anyone can point me to the programming documentation of that board? :confused:
-found it-

Regards, Roland
 
Last edited:
spacewar-control.jpg
0 Fire (Red)
1 Rotate L
2 Rotate R
3 Thrust (Green)
4 Yellow

7 Yellow
8 Fire (Red)
9 Rotate L
10 Rotate R
11 Thrust (Green)

My idea was to change the code so that the yellow triggered hyper space, but I never came to it. In the implementation I have hyper space is triggered by pushing both rotate L and rotate R at the same time. I wanted a hyper space button because I saw that there where one on the original Spacewar! control. Michel Thompson has made the same, but solved the problem by letting the hyper space button trigger both rotate buttons at the same time using two diodes in the control. I'll do the same any day...
 
Hi Anders,

Thanks!

My idea was to change the code so that the yellow triggered hyper space, but I never came to it.
In the implementation I have hyper space is triggered by pushing both rotate L and rotate R at the same time.

I want to use the hyperspace as well. But I will fix that with just
two diodes to trigger both L and R switches with one contact.
You can do that as well...

Regards, Roland
 
To get the M863 trough the maindec I had to configure it to the standard jumper settings.
But at first I could not get it to work in SpaceWar. Spacewar doesn't like the data buffered into the 7474 chips.
So I had to move the jumpers from the red arrow position (xA) to the green arrow position (xB).
Then the switches are read unbuffered into AC with the DBRI (read inputs from M863) command.

IMG_20191026_191335.jpg

I know these look a bit to modern for a PDP8 but these
ordinary commodore 64 joysticks are just working fine here.

IMG_20191030_153736.jpg

This is my connection diagram. Here you can see what I mean by the two diodes for Hyperspace.

atari_stick.jpg

So the joysticks are working fine now in the software :D

And now hopefully the last step to fix the slow response on THRUST.
There seems to be a clock divider in the code which expected 10KHz clock and not 100Hz.

To be continued...

Does a version exist for the pdp11?

To be honest, I've no idea. But I guess it should be possible to make it
for a system like the GT40... But I don't know if anyone has done that.

Regards, Roland
 
Last edited:
I know that this will offend purists, but the PIDP8 (or just SimH) does a credible job with this game or a variant thereof, playing over networks and displayable with a program written for the Processing environment. I've found numerous variants for the PDP8 but my knowledge of PDP8 assembly is sketchy so I can't tell what may or may not work with what simulated PDP8 hardware.

I built a wireless version that could be hooked up to a Tektronix X-Y display (https://hackaday.io/project/18375-wireless-spacewar-x-y-display-for-pidp-8i). But I don't know if anyone else has ever built one. Spacewar is still a fun game almost 60 years after it was created!

Even a small X-Y display is better as a display than a very good analog oscilloscope for these games (I've found the dot size smaller and linearity much better on the 604 than on my 464 oscilloscopes). I also have some Tektronix 620's in various states of semi-disrepair (shorted HV transistors, softish tubes, that kind of thing).
 
Fixed the slow response on the Thrust part. The ships are now very responsive to the
joysticks or front panel switches. Still a few things to do.

I've found numerous variants for the PDP8 but my knowledge of PDP8 assembly is sketchy
so I can't tell what may or may not work with what simulated PDP8 hardware.

A list of all known SpaceWar! versions would be great. For what I found there is no version which could run
on the VC8E without the need of an EAE. The version that I'm changing here to VC8E was made for the AX08.
I've never used simh so I can't tell if the AX08 is supported. But I guess not because just since recently
the VC8E is supported.

I built a wireless version that could be hooked up to a Tektronix X-Y display (https://hackaday.io/project/18375-wireless-spacewar-x-y-display-for-pidp-8i). But I don't know if anyone else has ever built one. Spacewar is still a fun game almost 60 years after it was created!

Nice project. And yes it's still a fun game indeed.

What I would love to see is that there comes a version which has a one player mode.
It would be fun to play against the PDP8 ! :mrgreen:
 
That would be fun &#55357;&#56833; Do you have a graphics controller for it?

There are provisions in the I/O backplane for a 34H Oscilloscope display. It has 1024 x 1024 resolution and is normally used to drive a display like a Tektronix RM503 'scope. My guess is that it works like the PDP-8 and PDP-12 graphics. It even supports a light pen.

We need six A601, two A604, a A704, and a W681 flipchips. I think that we have everything else. We will need to make a cable that goes from a flipchip paddle card to BNC connectors for the 'scope.

One of the PDP-9 systems in Sweden has this option, so we have something we can look at to duplicate it.
 
That's mine, you are welcome to have a look. I even have a working RM503 scope...

I guess that you will play spacewar on your PDP-9 before I can play it on mine, even if you are missing parts. Unfortunately I don't have any of those boards that you need as spares. (Roland, sorry for getting a bit of topic).
 
Back
Top