Bootstrap and boot blocks

Everything about programming, including VDP and Sound programming.
Bill B
Posts: 187
Joined: 26 Jan 2014 16:31

Re: Bootstrap and boot blocks

Post by Bill B » 22 Jul 2019 18:26

Dave,

Standard Unix / Linux / Fuzix / Raspbian :)

Unlike Windows, the current directory is not (generally) in the path. Therefore if you want to run a file in the current directory you have to specify "./filename" not just "filename. That is a "dot" (for current directory), a "slash" (the path separator) followed by the file name.

Bill.

User avatar
Dave
Posts: 757
Joined: 11 Aug 2012 18:16
Contact:

Re: Bootstrap and boot blocks

Post by Dave » 22 Jul 2019 18:41

Ahh, thanks a lot Bill!

Now that you mention it, I came across that ages ago, then promptly forgot all about it.

(I was trying to run something on RPi and spent ages searching for that info - memory like a sieve !!!!)

regards
Dave

stephen_usher
Posts: 205
Joined: 27 Nov 2016 19:58

Re: Bootstrap and boot blocks

Post by stephen_usher » 23 Jul 2019 10:20

Assuming that FUZIX has a POSIX shell then type this when you're in your home directory:

echo 'PATH=$PATH:/usr/games' >> .profile

The next time you log in the /usr/games directory will be in the executable search 'path' and so you can merely type the program name for the shell to find it and then run it.

stephen_usher
Posts: 205
Joined: 27 Nov 2016 19:58

Re: Bootstrap and boot blocks

Post by stephen_usher » 23 Jul 2019 10:23

Bill B wrote:
22 Jul 2019 18:26
Dave,

Standard Unix / Linux / Fuzix / Raspbian :)

Unlike Windows, the current directory is not (generally) in the path. Therefore if you want to run a file in the current directory you have to specify "./filename" not just "filename. That is a "dot" (for current directory), a "slash" (the path separator) followed by the file name.

Bill.
This is only usually the case for the superuser 'root' for security reasons. Most installations add '.' to the PATH for normal users.

Merely edit the user's '.profile' file and append ':.' to the end of the PATH variable setting line.

stephen_usher
Posts: 205
Joined: 27 Nov 2016 19:58

Re: Bootstrap and boot blocks

Post by stephen_usher » 23 Jul 2019 10:32

Dave wrote:
22 Jul 2019 12:59
I need to do some more reading, I thought that I would be able to run the programs when logged into the /usr/games directory, but it seems that I ned to run them from my home directory with the path specified
I've always found it strange that MSDOS terminology for setting the current working directory in the shell to be "logged into" a drive or directory as there's no logging involved. On all other systems "logging in" is the act of authentication and creation of a session using that user's permissions (and logging the entry).

This is even more puzzling as MSDOS (version 2) copied the UNIX command names for directory operations when Microsoft added them. (Microsoft even tried changing the "switch" character from '/' to '-' so that directory separators could change to '/' to follow the UNIX format but it was already too engrained in applications and software houses were too lazy.)

Anyway, it's weird talking about UNIXy things on the Memotech forum. :-)

User avatar
Dave
Posts: 757
Joined: 11 Aug 2012 18:16
Contact:

Re: Bootstrap and boot blocks

Post by Dave » 23 Jul 2019 15:15

Alan,

the games files include some adventure (Advx) and Mystery (Mystxx) files, when I try them, there is a carriage return after every word printed to the screen. Is there something that I need to do to tell the programs about the (emulated) MTX screen?

Also, Invaders reports that the TERM variable is not set, how do I do that please?

regards
Dave

EtchedPixels
Posts: 30
Joined: 07 Feb 2019 01:12

Re: Bootstrap and boot blocks

Post by EtchedPixels » 23 Jul 2019 18:00

TERM=vt52
export TERM

(will work nicely for the 40 col screen, the 'real' 80 col display but not yet the propellor one)

You can also set the screen size with

stty cols 80
stty rows 25

or similar.

If it still misbehaves please let me know. I'd expect the adventure games to 'just work' on the 40 column screen. They will redisplay the location info in annoying ways some of the time as the original games are split screen, but I've got changes for that I'm testing at the moment.

Old Unix did have "." on the path often at the start. It was removed because doing something like "ls" in another users directory and running the program they wrote and left there as "ls" is bad (happy memories of the 'ls virus' at university)

Alan

User avatar
Dave
Posts: 757
Joined: 11 Aug 2012 18:16
Contact:

Re: Bootstrap and boot blocks

Post by Dave » 23 Jul 2019 19:34

Hi Alan,

thanks for the info, no joy for me though.

Even on the 40 column screen, I get carriage return between all words when running, say ADV01.

I am running Bill's CFX-II emulation in his windows version of MEMU, so that might be the issue.

I did try to download the vanilla MTX MEMU version from Fuzix.org, but, that seems to only run on Unix platforms?
(The startup command line that you show as an example relies on the serial port emulation, using names pipes in Unix. Those are not supported on the Windows version of MEMU though)

(I will try on real hardware when I get a chance)

regards
Dave

EtchedPixels
Posts: 30
Joined: 07 Feb 2019 01:12

Re: Bootstrap and boot blocks

Post by EtchedPixels » 26 Jul 2019 01:44

What does

printenv

and

stty -a

show

I suspect it's just a good old fashioned bug so I'll try and test it on my Memotech when I get a moment.

User avatar
Dave
Posts: 757
Joined: 11 Aug 2012 18:16
Contact:

Re: Bootstrap and boot blocks

Post by Dave » 26 Jul 2019 12:31

80.jpg
80.jpg (171.79 KiB) Viewed 503 times
40.jpg
40.jpg (167.22 KiB) Viewed 503 times

Post Reply