More updates on the 4.2BSD project thing

I updated the website after 2+ years of stagnation… lol

http://bsd42.sourceforge.net/

I know its sad, and mostly all licensing… Anyways I’m in the process of moving so no major updates in the next week to two… But once I’m settled up in New York, I’ll crank out another set of releases to include working cursor control for games, and a loaded version of Uwisc BSD with all the fun stuff ready to roll… I’m also going to do a “HP” install of Reno so it won’t be an 80Mb download anymore… I figure if people are actually using them, they can modify the configs, add more disks etc etc….

Which reminds me if there is a online 1st edition copy of the “Unix System Administration Handbook”.. That’d be cool, but otherwise, I’d recommend people to get a copy of the 1st edition as it covers the tail end of the VAX era BSD’s.

Qemu 0.10.5 released!

Well qemu keeps on improving! Personally I like the new approach of more releases… the 0.10 road has been rocky for me with my old stuff at any rate…

Qemu 0.10.5 can be downloaded from here.

For windows users, you are going to have to build your own stuff, there doesn’t seem to be any provided binaries…….

Tera Term ‘fix’ for all *BSD/*UNIX

I’ll have to redo a bunch of stuff, to fix the distributions, and I think there is a ‘bug’ as it were in the installer that if you pick a different directory name, it’ll screw up… I need to test some more.

Anyways to fix the arrow keys, you need to load a keyboard binding into the emulator. If you go to the Tera Term site, and install it, you can copy out the file IBMKEYB.CNF and put it in the various “program files\******” directory for each emulator. Then alter the ‘attach a pty’ shortcut to go from this:

“C:\Program Files (x86)\bsd42\ttermpro.exe” localhost 42323

To this:

“C:\Program Files (x86)\bsd42\ttermpro.exe” localhost:42323 /K=”.\IBMKEYB.CNF”

Oh it’s also comming up for the 40th birthday of UNIX! I’m going to probably package up all the research editions that I can find into easy to install pacakages.. I figure it’d make all these releases more accessable much like the v1 unix package that I’ve done. If anyone can submit any good product links from the pre SYSV days that’d be awesome. It’s too bad that SYSVr2 or prior cannot be released into the wild.. I’d hardly call them ‘competitive’ in this day & age… Heck even SYSVr4 isn’t but sadly the lawyers say otherwise.

back to fun with pread.c

Well I know this topic keeps comming up over & over that the pread.c that I had used to build my Xenix on Qemu is long lost.

Anyways someone else was asking me for it, and I stumbled accross this Microsoft Memo:

http://support.microsoft.com/kb/100027

which means the device name I was listing was wrong… I’m unsure if it means in 2003 it change from what it was since 1991….

Anyways here is my new ‘pread’.

#include <stdio.h>
#include <stdlib.h>

define BUFFSIZE 1024*1024
void main(void)
{
FILE *disk;
FILE *ofile;
int disknumber;
char fname[255];
char oname[255];
char *buffer;
int rc;
int pass;
buffer=(char)malloc(BUFFSIZE); if(buffer==(char)NULL)
{printf("\nError allocating buffer!!\n");return;}
printf("please tell me the disk NUMBER that you want to read\n");
printf("for \\.\PhysicalDrive1 just answer 1\n\n:");
memset(fname,0x0,sizeof(fname));
scanf("%d",&disknumber);
sprintf(fname,"\\.\PhysicalDrive%d",disknumber);
printf("reading the device %s\n",fname);
disk=fopen(fname,"rb");
memset(oname,0x0,sizeof(oname));
printf("\nWhat is the output file name?\n\n:");
scanf("%s",oname);
ofile=fopen(oname,"wb");
if(ofile==NULL){printf("\n\nERROR with %s\n",oname);return;}
if(disk==NULL){printf("\n\nERROR with disk %s\n",fname);return;}
rc=5;
pass = 0;
while(rc!=0)
{
memset(buffer,0x0,sizeof(buffer));
rc=fread(buffer,1,BUFFSIZE,disk);
printf("\r%d\t%d:Megabytes processed",rc,pass);
fwrite(buffer,1,rc,ofile);
pass++;
}
fclose(disk);
fclose(ofile);
printf("\n\n\nDone!%c",7);
}

GLFrontier

FWIW I was checking links, and Tom’s site has moved to

http://tom.noflag.org.uk/glfrontier.html, which of course itself is now gone.  However with a lot of leg work, I did manage to snag the source to a few versions, and put them onto my CVS server, linked here: on unix.superglobalmegacorp.com.  And of course you can replicate it via CVS.

As mentioned over here, the steps basically are:

cvs -d:pserver:[email protected]:/frontvm login
cvs -d:pserver:[email protected]:/frontvm checkout frontvm
cvs -d:pserver:[email protected]:/frontvm log -h | grep -P '^\t' | awk '{print $1}' | sort|uniq| sed -e 's/://g'

With the last step showing you the various commit levels….
In this case they are:

  • frontvm-20040517
  • frontvm2-20061120
  • frontvm3-20060613
  • frontvm3-20060623

So to checkout the first and oldest code I’ve found, you would execute:

cvs -d:pserver:[email protected]:/frontvm checkout -r frontvm-20040517 frontvm

And there you go.

The Frontier wiki is still here.

Packages so far on Uwisc 4.3BSD

I’ve been compiling quite a bit of stuff.. Looking back it was something I intended to do back in October of 2007… Well no time like the present then! I’ve done my best to include all the relevant bits for each of the following packages. It’s entirely possible I’ve missed stuff, so feel free to re-build the stuff as you wish. Some of the packages require you to build them with GCC as the default CC won’t work. However if you are going to build it yourself you won’t be able to jump to gcc 2.7.2.2 as it requires gperf which in turn requires a working c++ compiler. So far here are the following packages:

bash-1.14.7
bash-2.0
binutils-2.8.1
bison-1.25
flex-2.5.4
gcc-1.42
gcc-2.4.5
gcc-2.5.8
gcc-2.7.2.2
gdb.3.1
gzip-1.2.4
hack.1.0.3
irc2.8.21
ircii-4.4
lynx-2.8.2
make-3.75
pine-3.87
screen-3.7.1
unzip522

All of these can be downloaded from here. I’m keeping all the source code (unaltered) in tap format for the SIMH emulator right here.

To get the C compilers going I had to build gcc 1.42 with the system compiler (cc/PCC) then use that version of GCC to build the next version. Once I had gcc 2.5.8 building, then I was able to build binutils 2.8.1 without issues, then rebuild gcc 2.5.8 to use binutils instead of the default system assembler so that I could build lynx and it wouldn’t barf because of the massive switch statement…

And no, -J didn’t help.

Speaking of lynx the search ability is broken because the function simply isn’t in 4.3 BSD (bsearch), and for pine, I had to make a fake tmpfile function that uses the /tmp/pinebox directory.

The gcc 2.5.8 package includes the C++ components, and I’m pretty sure I did with 2.7.2.2 as well. I’m not sure if GCC 3.x kept the VAX cpu so I haven’t pushed forward, but seeing that the cc1 exe is over 1mb it doesn’t seem worth it to push ahead.

I’ll have to see about including more games. The selection in this 4.3 release is kind of weak,

aardvark* boggle* hack@ monop* snake*adventure* ching* hangman* quiz* snscore*backgammon* cribbage* hunt* robots* teachgammon*battlestar* doctor* lib/ rogue* trek*bogdict* fortune* mille* sail* zork*

I’ll have to see what’s missing from where.. Also I notice that the arrow key bindings in terraterm are not working… I’ll have to dive into that as well. It may end up with a new re-relase of the emulator or a patch thing. I’ll have to see.

I should add a quick note on how to unpack these tap files. First you will need bzip2 on your native pc. You should be able to get one here.

Now just uncompress the file..

C:\Program Files (x86)\uwiscbsd>bzip2 -d lynx-2.8.2.binary.BSD-4.3.Uwisc.tap.bz2

Now you need to go to the SIMH console window. It will say something like this in it:

VAX780 simulator V3.8-1
Listening on port 42221 (socket 376)
Waiting for console Telnet connection
Running

Hit Control+E and it’ll interrupt the simulator. Then we need to attach the tap file like so:

Simulation stopped, PC: 800018A3 (MTPR #0,#12)
sim> att ts0 lynx-2.8.2.binary.BSD-4.3.Uwisc.tap
sim> c

the att command will attach the tap file to the ts0 device. the c will tell the simulator to continue. Now just switch to a tty windows (or attach a pty), then it’s a simple matter of running the following commands:

myname# cd /
myname# mt rew
myname# tar -xvmf /dev/rmt12
x /usr/local/bin/gzip, 66560 bytes, 130 tape blocks
x /usr/local/bin/lynx, 949248 bytes, 1854 tape blocks
x /usr/local/lib/lynx.cfg, 97203 bytes, 190 tape blocks
myname# rehash

Thats about all it takes, now you can run lynx. If you so wish, you can run back to the SIMH console, and tell it to “det ts0” which will detach the tape image.

Update for HACK

I just found out that hack will run properly if it’s built with the default compiler PCC (cc). However there is a single file that will not build, but gcc can be used to build the single file, and the build process can continue as normal.

Here is a quick log:

myname# make
cc -g -c hack.Decl.c
cc -g -c hack.apply.c
cc -g -c hack.bones.c
cc -g -c hack.c
hack.c: 799: missing endif
*** Error code 1

Stop.
myname# gcc -g -c hack.c
myname# make
cc -g -c hack.cmd.c

cc -g -c rnd.c
cc -g -c alloc.c
Loading …
myname# size hack
text data bss dec hex
158720 47104 30404 236228 39ac4
myname# ls -l hack
-rwxrwxr-x 1 root 694272 May 10 10:23 hack
myname# strip hack
myname# ls -l hack
-rwxrwxr-x 1 root 206848 May 10 10:23 hack

And with that being said, it seems just about any version of GCC will do… from 1.27 to 2.45. I’ve test played it, and you get the tombstone when you die, not a core dump. This applies to 4.2 BSD and all the 4.3 BSD’s. I’ve updated the sourceforge binary packages that I have made for Hack to include this hybrid exe that seems to work just fine.

Happy hacking!

Hack

 

Hack is the precursor to NetHack, and the follower of rogue. It’s a fun game, however I thought it would be a great addition to my 4.2 BSD project stuff. Thanks to the awesome site NetHackWiki I was able to quickly find Hack 1.0.3, download it, convert it into a tape for SIMH, and get it compiled. In it’s present state it does core dump when exiting, I’m not all that sure as to why, and to be honest I’m not all that good with adb. Perhaps a project for another time.

At any rate, the game is somewhat playable.

GCC is required to compile the source, pcc chokes when trying to build. I have made minor modifications to the source with regards to some variables, and renaming variables called ‘inline’..

If the COMPAT_42 is built with any later BSD it should run the binary otherwise producing your own ought to be trivial.

The binary is located here.

The modified source is here.

I’m sure there are all kinds of mods like PC hack to run it under DOSBOX or some kind of Windows thing, but it’s more fun running it under a VAX 11/780 emulator…

New versions of Qemu!

While I’ve been playing with 386BSD, it seems a bunch of new versions of Qemu have been released. Sadly they all crash at the same point on 386BSD so it’s kind of moot. Also my OS/2 2.0 image doesn’t work on the new Qemu, it hangs at the switch to graphical mode…. So I suspect there will be more quick revisions to Qemu.

At any rate, they have added all kinds of features and stuff to it, I’d say check it out, but hold on tightly to older versions that you have working now…

You can find the source code to Qemu here.

The win32 binary is lagging, so you’ll have to build it yourself. I’ve been using my old MinGW environment that I had detailed it’s setup here.

The new Qemu works with GCC’s greater than version 3 which is a good thing for the many platforms with ONLY GCC 4.

Windows XP Mode in Windows 7

Well it seems to be all the rage in the world of emulation on Windows 7. Windows XP mode, from the user standpoint is just like the old days of WIN/OS2 from OS/2 2.0 and above.

While WIN/OS2 used specialized device drivers that could ‘punch thru’ the virtual machine, and render each window on the OS/2 PM display, Windows XP mode, takes the Citrix like approach of using Terminal Services (RDP) to initiate a remote display to the local desktop.

Since RDP is the mechanism used, only XP and above will work, sorry Windows 2000 users. Another minor (is it?) annoyance is that the new version of Virtual PC has NO floppy driver support! It also seems to not have sound support, although it’s totally unverified at the moment. I’ll have to snag a VHD with MS-DOS pre-installed along with whatever integration tools I have around.

Anyways, the install is a snap, you can find all the components here.

Setup is straight forward, just install the Virtual PC component, then Windows 7 will want to reboot. Then install the Windows XP msi file (it’s over 450MB) and you’ll get a fully installed copy of Windows XP ready to go, and best of all you don’t have to configure anything. Start Windows XP in a “normal” desktop environment, install whatever it is you want to run. Publishing apps to the Windows 7 desktop is easy, just paste a shortcut under the “all users” start menu, and the screen will blink and it’s available.

The down side, is that other OS’s seem to perform poorly under this version of VPC. The mouse is very erratic on RHEL 4 that I had to setup to emulate a production environment. Also you need to have a CPU with the new virtualization extensions. It seems this VPC version is more like the hypervisor in 2008, then like the old Virtual PC we all knew. I almost wonder if there is a way to run VPC 2004 or 5 on Windows 7 natively for running older stuff…

It will be interesting to see where Microsoft goes with this, as this could leave a major rift in their product lineup. And as I’m sure a few people will find out, just because you have a ‘new’ machine doesn’t mean the CPU is up to the task… Not all new CPUs have the virtualization environment built in…

Another issue I’ve been having is that the network from time to time disconnects and will remain disconnected… It seems if you shut down & power the VM on/off (no hibernation!) eventually the NAT adapter will reconnect. Clearly it’s a beta. Also it won’t let you publish solitary, pinball, nor any of the other games. However it will let you publish cmd.exe so you can run them that way.