Playing spacewar on the Pi's HDMI monitor

719 views
Skip to first unread message

Obsolescence

unread,
Nov 29, 2016, 7:27:15 AM11/29/16
to PiDP-8
Hi,

In response to a question of a few days ago:

Here is a version of spacewar that plays on the Pi's HDMI monitor.
You play on the front panel switches (SR12-9, player 2, and SR1-4, player 1).
-- even better: solder joystick buttons on the back of those switches.

This is a replacement for the default spacewar (bootscript 4), which works with a Processing screen emulation program.

The code is awful, because it was just a quick hack. And only because of its awfulness, it needs a Pi 3 (or 2) to run at full speed.
But it works as intended... feel free to improve or replace :)

Kind regards,

Oscar.

spacewar_on_hdmi.zip

Ian Schofield

unread,
Dec 4, 2016, 1:28:30 PM12/4/16
to PiDP-8
Dear Oscar,

 Brilliant. However, where can the sw* and vc8* sources be found? In the meanwhile, I have more or less sorted out a simh integrated vc8 system which requires even more resources on our hard pressed raspberrypis!! This was quite tricky as Bob Supnik's structure for simh devices is a bit involved. I have used X11 for this and it is not too bad. But, the OpenVG option is appealing.

Regards, Ian.

Oscar Vermeulen

unread,
Dec 5, 2016, 6:10:26 AM12/5/16
to Ian Schofield, PiDP-8
Ian,

On 4 December 2016 at 19:28, Ian Schofield <isy...@gmail.com> wrote:
Dear Oscar,

 Brilliant. However, where can the sw* and vc8* sources be found?

In the zip file of the original post? I just checked.
- sw2 is the Raspberry program to emulate the scope screen;
- spacewar is a modified version, of Kyle Owen's adaptation. I basically changed the code to respond to the front panel switches instead of keypresses for the rotate, fire, and throttle functions.

 
In the meanwhile, I have more or less sorted out a simh integrated vc8 system which requires even more resources on our hard pressed raspberrypis!! This was quite tricky as Bob Supnik's structure for simh devices is a bit involved.

It is... very flexible and serves a huge number of possibilities, but not easy to see through.
 
I have used X11 for this and it is not too bad. But, the OpenVG option is appealing.

Knowing your coding skills (and the hack that is my 'sw2' program), I'm pretty sure your option will be the better one... I hope you'll publish it!

Kind regards,

Oscar.

Ian Schofield

unread,
Dec 5, 2016, 3:48:44 PM12/5/16
to PiDP-8
Dear Oscar,

 My mistake. Examined the Spacewar code and realised that it is configured to send data via an emulated serial port to the sw2 app which is the client (server!!). Not bad. However, will continue the VC8 build for the PiDP8 and hopefully run the whole thing as a single app. (Nearly there .... need 3 cores now!!!).

Best of, Ian.

Erik Ruud

unread,
Feb 11, 2021, 11:25:38 AM2/11/21
to PiDP-8
Hello,

I am trying to get this working on a new build of the pidp8i.

I am sure I am missing a detail somewhere but I can't get the make to work for sw2.

root@pidp8i:~# cd /openvg/client/
root@pidp8i:/openvg/client# ls
clip.c       desert1.jpg  desert3.jpg  desert5.jpg  desert7.jpg  hellovg.c  Makefile.bak     particles.c   shapedemo    starx.jpg
desert0.jpg  desert2.jpg  desert4.jpg  desert6.jpg  desert8.jpg  Makefile   mouse-hellovg.c  screensize.c  shapedemo.c  sw2.c
root@pidp8i:/openvg/client# make sw2
gcc -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I..  -o sw2 sw2.c ../libshapes.o ../oglinit.o -L/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lpthread  -ljpeg
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
collect2: error: ld returned 1 exit status
Makefile:17: recipe for target 'sw2' failed
make: *** [sw2] Error 1


Any advice would be appreciated.

Erik Ruud

unread,
Feb 11, 2021, 11:48:39 AM2/11/21
to PiDP-8
Nevermind.  I figured it out.

The Makefile in the zip file needed to be updated.

I changed this line...
LIBFLAGS=-L/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lpthread  -ljpeg

to this...
LIBFLAGS=-L/opt/vc/lib -lbrcmEGL -lbrcmGLESv2 -lbcm_host -lpthread  -ljpeg

Andrew Trice

unread,
Feb 12, 2021, 11:12:08 AM2/12/21
to Erik Ruud, PiDP-8

Hi Erik,
I've been playing spacewar with Process but always intended to get it working with sw, so thanks for the research and posting!

-Andy

--
You received this message because you are subscribed to the Google Groups "PiDP-8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-8+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-8/8e125f33-27bf-4051-8a58-46a913975f77n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages