Downloads of my BSD on Windows..

bsd42 downloads

I just noticed that sourceforge is making changes to their downloads, so it’ll probably break a tonne of my stuff on this blog (and other places)… but look at the nice picture!

1. United States 913
2. China 321
3. Hungary 152
4. United Kingdom 111
5. Germany 73
6. Canada 36
7. Russia 36
8. Argentina 26
9. Japan 22
10. Greece 16

Which is interesting… well to me anyways. I wonder if it’s more representative of internet penetration, or language barrier?

NetBSD 1.2 & the MicroVAX II

So I’ve been working on some instructions to install the first NetBSD I could find that would run on SIMH’s MicroVAX II… Think of it as a lineage continuation from the 4.3 BSD to the Net/2. Anyways the 1.2 install proved to be.. .difficult to say the least, however once it’s installed I found a weird snag, that NetBSD 1.2 doesn’t seem to have curses…. And I though curses was one of those things that made any BSD a BSD.

I haven’t put together an install just yet, I figure I’ll have to download ncurses over, and build with that but I just don’t have the time today, so I’m leaving things where they are for now. Although I did manage to get a bunch more other stuff built, which I’ve posted package tapes on my sourceforge page here. And if anyone is that motivated they can always follow the above instructions, and install their own NetBSD 1.2 VAX, although I’m not holding my breath.. lol

Also I noticed that NetBSD 1.2 doesn’t have any fortran, so I built f2c, and managed to get dungeon running. woo!

Yep, it runs Dungeon!

Oh well it’s all good fun from 1996.

Your submission has been rejected by our reviewers. Please read the notes below regarding your submission:

Reviewer Notes: REJECTED – Issues with plug-in
There appears to be an issue with the plug-in not working with local speex files once an http version is played and shows a messagebox of ‘Speex Error’ – ‘Not a Speex stream’. Restarting Winamp will then play the local file but am sure this shouldn’t be happening. Please fix and then re-submit the fixed version.

Don’t you hate it when you focus so much on the big things you forget the small stuff, like switching between local and remote?

Sigh.

Thankfully the fix was trivial, and only involved one line of code… I spent more time re-building a VM with Visual C++ 4.2 then I did fixing the code & recompiling…

Naturally the download is on the sourceforge page, and I bumped the version to 0.76a … If anyone ever wonders years from now what the deal was… lol

Net Hack wiki moved

I just received notice that the NetHack wiki has now moved and the new site is nethackwiki.com.

It’s great when old software just doesn’t revive for a little while then fade back to obscurity, so update your links, or just browse the site and be blown away by all their information on such a great (and difficult) game.

And of course, I have NetHack for the Windows NT 4.0 MIPS, and various 4.X BSD on sourceforge under the package tapes….

Qemu compression & encryption

Well after I gave up on one VPS I’ve had for a long time, I picked up a handful of $5 ones world wide… Some in nations I’ve been to, and others.. I’m not so sure I trust at all..

Which really calls into question just how much can you trust on the internet, esp when it’s data you can’t or seemingly don’t encrypt.. This is where Qemu’s qcow format can step in and provide either…

Or simply you are on a particular VPS, and you want to run something completely different, but you don’t want to be short of disk space.

From what I’ve found with qemu it’s quite easy, with only one snag for the whole thing. That being no matter if you decide to Compress or Encrypt, you can only CONVERT a disk into this schema, not create one.

So if you have an existing disk image, it’s a snap, otherwise, it’s a 2 step process that I’m sure is here for a good reason. Anyways the process for both goes like this:

qemu-img create -f qcow2 template.disk 2G
Formatting ‘template.disk’, fmt=qcow2 size=2147483648 encryption=off cluster_size=0

qemu-img convert template.disk -O qcow2 compressed.disk -c

qemu-img convert template.disk -O qcow2 encrypted.disk -e
Disk image ‘encrypted.disk’ is encrypted.
Password: password

Which naturally first creates a 2GB ‘template’ disk, which then we create a compressed disk, and an encrypted disk image. And it is here were the encryption will ask you for a password… Sadly it doesn’t verify your input, so make sure you type it in correctly. Thankfully the original isn’t destroyed so if you screw it up you can encrypt it again……

So now mounting the compressed disk is no different then before, however the encrypted will need a password, passed to the qemu monitor…

Now you may want to run this behind something like screen if you are on any *NIX or telnet into yourself if you are on windows to shove the service in the background to not rely on a console… So I’ve worked up this:

qemu -L pc-bios -hda encrypted.disk -monitor telnet:127.0.0.1:23,server

And for UNIX people who can run it interactivly because their stdio driver isn’t broken..

qemu -L pc-bios -hda encrypted.disk -monitor stdio

Now when you start either one, Qemu will start paused, and you must continue, then enter the disks password (if you have more then one disk, it’ll pause and ask for each disk!), then it’ll execute.

QEMU 0.11.1 monitor – type ‘help’ for more information
(qemu) c
ide0-hd0 (encrypted.disk) is encrypted.
Password: ********
(qemu)

And away you go… From what I understand qemu uses zlib for the compression, and AES for the encryption… Which for free is snazzy, so enjoy!

For anyone shopping around for a VPS

check out this incredible site, lowendbox.com. I was thinking of having a cheap backup site for some of my stuff in my own cloud (thanks google!) and we aren’t talking any major investment here… And for the added sake of paranoia they even review and list places in the UK and heck Egypt at a glance…

And of course the tags make it nice to jump around to see nations, hosting types etc etc….

And check the prices, you can actually find some VPS’s for around $2.50 USD a month!!! (on a month to month basis!!).

I’m kind of glad in retrospect to have not really gotten into this business it is way too cut throuat.

Building 32bit binaries on x86_64 Debian 7 / Wheezy

I’ve been going in circles with slirp trying to really get it to run on x86_64 mode so far to no avail…

So first thing, hello from the future of 2020 (I wrote this quick blurb in 2010), and Wheezy has been pulled from the main mirrors. So annoying! You need to update your apt sources to use the archive:

deb http://archive.debian.org/debian/ wheezy main
deb-src http://archive.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib

Do your apt-get update;apt-get upgrade and you’ll be ready to roll!

But it’d sure help to be able to compile code in 32bit/64bit on the same machine. Anyways after looking for far too long I managed to find that it’s really simple.

apt-get install lib32bz2-dev

And away we go!

Naturally, you’ll need a compiler already installed ( build-essential).

# cat x.c
#include
int main(){printf(“int is %d\n”,sizeof(int));return 0;}
#
# gcc -m64 x.c -o x64
# gcc -m32 x.c -o x32
# file x32 x64
x32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
x64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
# ./x32
int is 4
# ./x64
int is 4

Which alone is… interesting.

Research Unix v7 on the PDP-11

Boot
: hp(0,0)unix
mem = 2020544
# RESTRICTED RIGHTS: USE, DUPLICATION, OR DISCLOSURE
IS SUBJECT TO RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.
WED DEC 31 19:02:48 EST 1969

login: root
Password:
You have mail.
#

Wee that was fun. I installed it from tape, so… it was a a bit more challenging. But luckily with all the SIMH & TUHS resources I was able to extract out the setup guide and step through it for the most part.

I’ve documented the steps here, and I even uploaded a tape image to sourceforge.

I’m trying to work out installing 1 BSD, as it was just a collection of userland stuff for Unix v7, however I’m having some issues with floatingpoint, but I have some hopes I can sort my way through it.

I have some hopes of being able to get a 1 BSD & 2 BSD machine up in SIMH… These are the versions that were not full operating system, just supplements to Unix v7 from what I can tell.

SIMH benchmark numbers…

I have to admit, I’m really surprised. In the past Visual C++ had been a clear winner every time I’d checked performance vs Gcc. And the tide seems to have really turned under Windows 7 x64. While not a massive lead, the winner after all these iterations of my simh benchmark was Gcc 4.5.2 for x86_64.

Just in the same fashion here, it seems that on some platforms -O1 is faster then -O2, and you really won’t find out until you run some comparisons.

gcc version 3.4.5 (mingw-vista special r3)

gcc O0
21.33333333333333
Dhrystone(1.1) time for 500000 passes = 23
This machine benchmarks at 21739 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 20
This machine benchmarks at 25000 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 21
This machine benchmarks at 23809 dhrystones/second

gcc O1
15.33333333333333
Dhrystone(1.1) time for 500000 passes = 16
This machine benchmarks at 31250 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 15
This machine benchmarks at 33333 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 15
This machine benchmarks at 33333 dhrystones/second

gcc 02
12.33333333333333
Dhrystone(1.1) time for 500000 passes = 12
This machine benchmarks at 41666 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 12
This machine benchmarks at 41666 dhrystones/second

gcc version 4.5.2 20101002 (prerelease) [svn/rev.164902 – mingw-w64/oz] (GCC)

gcc O0
21.33333333333333
Dhrystone(1.1) time for 500000 passes = 21
This machine benchmarks at 23809 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 22
This machine benchmarks at 22727 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 21
This machine benchmarks at 23809 dhrystones/second

gcc O1
13.33333333333333
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 14
This machine benchmarks at 35714 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second

gcc O2
12
Dhrystone(1.1) time for 500000 passes = 11
This machine benchmarks at 45454 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 12
This machine benchmarks at 41666 dhrystones/second

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

VC /Od /Bi0
21.33333333333333
Dhrystone(1.1) time for 500000 passes = 21
This machine benchmarks at 23809 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 21
This machine benchmarks at 23809 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 22
This machine benchmarks at 22727 dhrystones/second

VC /O2 /Ob2 /Oi
13
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second

VC /O2
13.66666666666667
Dhrystone(1.1) time for 500000 passes = 14
This machine benchmarks at 35714 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 14
This machine benchmarks at 35714 dhrystones/second

Vc /Og /Ox
13
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80×86
VC /Og /Ox
13.33333333333333
Dhrystone(1.1) time for 500000 passes = 14
This machine benchmarks at 35714 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second
Dhrystone(1.1) time for 500000 passes = 13
This machine benchmarks at 38461 dhrystones/second

And this is on my laptop, an Intel Core i7 Q 720 running at 1.6Ghz with 4GB of ram & Windows 7 Home Premium.

Windows 95 & DLL’s…

I hope nobody ever needs to know this, but I found out the hard way, that dll’s built with Visual C++ 6.0 wont’ load correctly on Windows 95… But luckily Visual C++ 4.2 is still available on MSDN, and the speex files built with only 40 or so changes.

I think I’m finally done with the whole winamp thing.

Phew!