Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

KLH10 and Pi

298 views
Skip to first unread message

Stan Barr

unread,
Aug 20, 2013, 2:53:41 AM8/20/13
to
Hi,

Anyone got KLH10 running on a raspberry pi? I remember something
being said a while back.

--
Stan Barr pla...@dsl.pipex.com

John Forecast

unread,
Aug 20, 2013, 8:08:17 PM8/20/13
to
In article <slrnl164jl...@ID-309335.user.uni-berlin.de>,
Stan Barr <pla...@dsl.pipex.com> wrote:

> Hi,
>
> Anyone got KLH10 running on a raspberry pi? I remember something
> being said a while back.

Yes, I have it running. Here are the changes I made to get it running:

src/Mk-lnxarm.mk:
src/Mk-lnxppc.mk:

Add -funsigned-char to CFLAGS since Debian (at least) has changed
the default to signed char.

src/cenv.h:

Fix syntax error when defining _FILE_OFFSET_BITS for Linux and
Solaris.

src/feload.c:

Include "cenv.h" before all other include files so that wfoff_t
is
correctly set to 64-bits when needed.

src/klh10.c:

Only compile fc_lights() if KLH10_DEV_LITES is non-zero.

src/kn10defs.h:

Fix macro which GCC4 optimizes away (KS only).

#if KLH10_EXTADR
# define PC_ADDXCT(x) { register pcinc_t i__ = (x); if (i__)
PC_ADD(i__); }
#else
# define PC_ADDXCT(x) { register pcinc_t i__ = (x); cpu.mr_PC += i__; }
#endif


src/tapedd.c:
src/vdkfmt.c:

Change logf to logfile since GCC4 has a built-in function logf.


For Tops-20 on the raspberry Pi we need to modify lines 357 and 358 os
Makefile.mk from:

-DKLH10_ITIME_INTRP=1 \
-DKLH10_CTYIO_INT=1 \

to:

-DKLH10_ITIME_SYNCH=1 \
-DKLH10_CTYIO_INT=0 \

Tops-10 requires the original Makefile.mk settings.

Stan Barr

unread,
Aug 21, 2013, 2:53:55 AM8/21/13
to
On Tue, 20 Aug 2013 20:08:17 -0400, John Forecast
<johnforec...@comcast.net> wrote:
> In article <slrnl164jl...@ID-309335.user.uni-berlin.de>,
> Stan Barr <pla...@dsl.pipex.com> wrote:
>
>> Hi,
>>
>> Anyone got KLH10 running on a raspberry pi? I remember something
>> being said a while back.
>
> Yes, I have it running. Here are the changes I made to get it running:

Many thanks, much appreciated.

--
Stan Barr pla...@dsl.pipex.com

David Todd

unread,
Feb 19, 2014, 11:25:20 AM2/19/14
to
On Tuesday, August 20, 2013 8:08:17 PM UTC-4, John Forecast wrote:
> In article <slrnl164jl...@ID-309335.user.uni-berlin.de>,
>
> Stan Barr <pla...@dsl.pipex.com> wrote:
>
>
>
> > Hi,
>
> >
>
> > Anyone got KLH10 running on a raspberry pi? I remember something
>
> > being said a while back.
>
>
>
> Yes, I have it running. Here are the changes I made to get it running:
>
>

...


Thanks, John, for your change notes. With these notes, I was able to get KLH10 running on my RPi pretty quickly. [And thanks, Bob & Stan, for your earlier notes -- I was encouraged to try it because of others' successes.]

I did run into one other problem not documented here. osdsup.c references IPC_R and IPC_W, which aren't defined in the RPi's ipc.h file (at least, in my Raspian dated 2014\01\07).

So just before those symbols are used in osdsup.c, I inserted:

#ifndef IPC_R
#define IPC_R 0
#endif

#ifndef IPC_W
#define IPC_W 0
#endif

The code compiles and runs just fine with these definitions.

I looked on my Mac and found that it defines IPC_W to be 000400 and IPC_R to be 000200; I tried those values in the code on my Raspberry, thinking it might be best to define the symbols in a way that would be consistent with other OSes, and those bits aren't used other places in RPi's ipc.h module. Nah. Bad idea. TOPS-20 loaded and started, but Galaxy and others failed to load or failed when they started executing. So I reset to define them both to be 0, and it works just fine again.

Re the ITIME_SYNCH/ITIME_INTRP/CTYIO_INT settings, I didn't see that edit initially and didn't make the change to Makefile.mk, and though TOPS booted, it generated sporadic DTE errors and wouldn't let me log in from the console. So for others attempting this, make sure you change those settings in order to get a working system.

Thanks again for your work on this. It's pretty amusing to have a DEC-20 the size of a pack of cigarettes (wow! been a long time since I've seen one of those!) that costs less than $100.

David





David Todd

unread,
Feb 21, 2014, 6:10:08 PM2/21/14
to
On Tuesday, August 20, 2013 2:53:41 AM UTC-4, Stan Barr wrote:
> Hi,
>
>
>
> Anyone got KLH10 running on a raspberry pi? I remember something
>
> being said a while back.
>
>
>
> --
>
> Stan Barr

Has anyone gotten the network interface to work? I used the same klt20.ini defines as on my Mac, where the NI20 works in shared mode, and I can't get it to work on the RPi.

What I was really trying to do was to get the eth0 interface dedicated to klh10 and use the wlan0 interface to get into Raspbian. Has anyone gotten it to work with a dedicated network interface?

David Todd

unread,
Feb 22, 2014, 8:01:54 AM2/22/14
to
Never mind ... got it. Take the interface down on the Raspbian side with
sudo ifdown eth0
then bring up the klh10 with the NI20 defined in klt20.ini as
devdef ni0 564 ni20 dedic=true ifc=eth0

I'll comment out eth0 in the /etc/network/interfaces file so eth0 isn't brought up by Raspbian in the first place (hoping that works) so I can avoid the ifdown above and just boot up as a Raspbian system on wlan0 and DEC20 on eth0.

0 new messages