Archive for the 'NetBSD' Category

18
Apr
15

Xsokoban on NetBSD

Having been busy and stressed out lately I haven’t had much time for tinkering or gaming. This is where smaller games that you can play as a quick distraction can help, as they are easy to squeeze in between other jobs, and todays game is one such game.

Xsokoban is obviously a clone of the old classic game sokoban. The original was made for the PC-8801 way back in 1982 by Thinking Rabbit. It has since been implemented and ported to pretty much every system, Xsokoban is one such port for Unix systems running X windows.

There isn’t anything really remarkable about this particular port. The quality of the graphics is quite reasonable, and it works well on pretty much any system I’ve tried it on including my older machines such as the Sparcstation 20. I’ve even played it over SSH via my comparatively slow ADSL2 connection, and it worked really quite well.

Interestingly the game has been studied in the field of computer science, it turns out it’s quite a difficult problem computationally, being PSPACE-complete. Lots of different researchers have worked on different algorithms for solving and producing optimal solutions. The complexity certainly makes me feel better about getting temporarily stuck on level 6!

As far as enjoyment goes, it’s really enjoyable for the puzzle solver in me, even when I’m stuck. It doesn’t take a huge commitment to play for a short while, and is quite challenging! This particular port isn’t any better or worse than any other, so don’t go out of your way, but NetBSD and FreeBSD users will find it easy to get running.

This slideshow requires JavaScript.

20
Oct
14

3rd Aniversary and Work on the Sparcstation

This weekend marks the third year I’ve been writing this blog. The first thing I wrote about was my Sparcstation 20, which I had just acquired at the time. I installed NetBSD 4.01 on it, which was reasonable then, but has become quite out of date now. So 186 posts and 3 years later I’m in the process of upgrading the machine to NetBSD 6.1.5.

Machine without the PSU

Machine without the PSU

This has been a long time coming, and there are a number of reasons for the upgrade. Firstly, the older version of NetBSD was becoming more difficult to keep software up to date on. I had stuck with 4.01 for some time because of performance issues I had when trying out 6.1.2 last year. But some packages didn’t update properly lately and I had been left with some software working and others just becoming broken. I could have stuck with an older version of pkgsrc, but that has problems as well.

Another reason is I’ve received the hardware required to use the machine as a desktop machine with screen,keyboard and mouse instead of a headless server. I retired the machine from active server duty and built a replacement server quite recently to facilitate both upgrading the OS and hardware to try and make it a practical desktop workstation. I was very fortunate to receive a donation of a keyboard and mouse suitable for the machine, and have since bought the frame buffer card and adapter to complete the hardware necessary.

Frame Buffer

Frame Buffer

I got the hardware up and running last weekend and powered up the machine with everything set up for the first time. I was happy that without upgrading the OS, I had the display, keyboard and mouse all working with an X server with little effort. I was impressed that the X server seemed quite speedy compared to what I expected. However X server (Xsun) was really outdated and didn’t seem to support everything thrown at it.

So I began to install NetBSD 6.1.4. I found it was best to use the serial console for the install as the install disk does not handle the sun console on the frame buffer properly. It seems that it just doesn’t have the TERMCAP entries for the sun console, as once the system is installed the console works fine. The install worked pretty much the same as the older version with a few minor changes. The performance of 6.1.4 seemed better than the last time I tried an upgrade, but still isn’t as fast as the older 4.01 release.

So I’ve begun building the system from sources to take advantage of the V8 Supersparc. I’m assuming the binary distributions you download are actually built for the slower V7 Sparc that can be common in some of the other older and slower machines. The build process is surprisingly very easy to follow. We will see if there is any significant difference when it’s finished building.

 

08
Sep
14

Building a Replacement Server

I’ve been using my old SparcStation 20 for about 3 years for storing my source repositories, allowing VPN access and web serving among other functions. I originally set it up like this as an interesting project to see if I could make good use of exceptionally old hardware with more modern software (NetBSD in this case) and it turned out to be quite handy. The experience as a whole has been a very positive one.

Sun Keyboard and Mouse

Sun Keyboard and Mouse

Now the time has come to not so much retire the SparcStation, but move it into a new function as a vintage workstation. I was very fortunate to receive a donation of a type 5c keyboard and mouse suitable for use with it, all I have to get is a frame buffer card and I can plug in a screen and use it as a desktop. Fortunately frame buffer cards are much easier to find than keyboard/mouse combinations so I shouldn’t have an issue finding one.

Having decided to build a new server machine, I went looking through my collection of old hardware to see what I could build out of my spare parts. I already had the large tower case recently donated, so I checked out what was installed in it. Turns out it was a Duron 800, which is quite reasonable, but after measuring its power consumption (about 70W without hard drives) I decided I could make a machine that was cheaper to run with some other parts.

Obviously I want something more efficient than the SparcStation, which uses around 130W with everything installed. It turned out to be quite difficult to find x86 hardware that is efficient once everything is installed. After looking at what I have and doing a bit of research I decided to try out the old Coppermine Celeron 800Mhz as it had quite a low TDP. Powered up with a graphic card but no hard disks it used about 60W, unfortunately it didn’t want to boot, and no amount of prodding got it to work.

Looking in my collection of old hardware I didn’t have many alternatives. I could use a socket 7 based system, but that would likely be _slower_ than the sparc and may use a similar amount of power. I have some Pentium II boards, but I wanted them as spares for my Win98 system. In the end I used some suitable socket 478 (Pentium 4) hardware, which initially looked bad efficiency wise. The P4 of course was known for running hot, and hence also using lots of power.

My older brother donated a MSI socket 478 mainboard to me some time ago without a CPU. I looked through my collection of CPUs and found a Celeron 2.4Ghz and heat sink. I installed it and 1Gbyte of DDR and it worked with little effort, but the power consumption without hard disks was about 80 something watts, not ideal. I decided to press on with this hardware as I had no other vintage parts that would be suitable, and that power usage ought to be the worst for the board and processor. That and I don’t have money for new hardware at the moment.

Machine Assembled

Machine Assembled

So I assembled the machine in the chassis with a Pioneer DVD drive and two Western Digital hard drives. I selected two 80Gb ATA WD drives as they turned out to have the best power consumption and reasonable capacity. All together, just sitting at the BIOS screen the machine used about 100W. Again a worst case and not that great a saving, but at least it’s significantly faster.

I decided to stick with NetBSD for this build for a few reasons, firstly it is simpler to migrate the configuration and data from the old machine. Secondly I like NetBSD because of how light it is and how easy it is to work with. I downloaded the latest version (6.1.4 as of this writing) and went through the install process. Installation was fairly easy, but I couldn’t get X to work correctly on my hardware. I didn’t have a local X server before, so I didn’t worry about getting it to work beyond XDMCP.

After installation I measured the power consumption of the machine at idle, I was pleasantly surprised that it dropped to about 65-70 Watts, a nice improvement over the sparc. Power usage peaks at about 100W when the machine is under full load as I first thought. After setting up the hard disks to power down after idle for a while I managed to reduce this to just bellow 60W.

I’m now happy with the hardware I have set up, although I could use modern hardware and save even more power. I’m currently in the process of setting up the software. I’m rebuilding the kernel and userland for NetBSD. It’s a surprisingly easy process, and well worth it especially for older hardware. I’m not ready to deploy the machine yet, but it looks like it will work well.

14
Apr
14

Artsoft games on NetBSD

R'n'D Menu Screen

R’n’D Menu Screen

Today I am looking at two games for Unix systems called Rocks’n’Diamonds (R’n’D for short) and Mirror Magic. Both were developed by Artsoft which seems to consist of one person, Holger Schemel. Both games are sort of clones of older games for much older platforms. Rock’n’Diamonds is a Boulder Dash like game that was first released in 1995 and last updated at the end of 2013. Mirror magic is very much like Deflektor, originally released in 1995 and updated until 2003. Whilst both games are based on older games they both add features to the old formula. Today I’ve built and played these under NetBSD on my SparcStation 20.

Text Box

Text Box

Being made by the same person, both games share some similarities, particularly in the art style. The menus and sprites are very colourful, they almost look like they belong at a carnival. Everything is well drawn, animated and items look like they should. Items brought over from the older games have been updated graphically, they don’t look identical to the originals but are also easily identifiable for players of the old games.

Green Goo

Green Goo

They run of the same graphics engine originally developed for R’n’D which supports X11 and SDL mainly. The X11 versions work quite well, even on exceptionally old hardware like my old SparcStation 20 which is quite impressive. They work moderately well over longer distances via SSH, but the latency and bandwidth can be a problem on slower links whilst LAN speeds works flawlessly. There is a SDL version, but the version I installed (from Macports on my macbook) seems to be significantly slower than even X over SSH. This is hopefully just something peculiar to the Macports version on Mac OSX.

Playing Via SSH

Playing Via SSH

Both also have the same sort of sound engine and from what I can experience on the Macports version they are good for what they are. I only got to test sound in R’n’D and unfortunately during game play you can get swamped with the same sounds playing repetitively. So you might enjoy your playing experience more with the sound off. Playing on NetBSD on the old Sparc machine this wasn’t an issue as sound doesn’t work there.

Mirror Magic Menu Screen

Mirror Magic Menu Screen

The game play for R’n’D is interesting in that it combines elements from games such as Boulder Dash and Sokoban, and includes most of the elements added by Supaplex and Emerald Mines to Boulder Dash. The game has three game engines that any level can use. Rocks’n’Diamonds, Supaplex and Emerald Mines. The later allowing levels from those games to be played and solved as they are in the original. I haven’t played enough of the levels to give a good impression of what they are like as a whole, but those that I have played have been fun. I did try levels from the older games and they seemed to work quite well.

Holy balls of steel!

Holy balls of steel!

Mirror Magic similarly has its roots in older games, specifically Deflektor and Mindbender. Basically there is a Laser, a bunch of mirrors, obstacles, and stuff to destroy in the levels. You need to direct the laser with the mirrors to destroy objects in the way and get the beam to the target. Usually this requires destroying all of the metal spheres in the level. You have a limited amount of fuel, and the laser can over heat if the beam hits the wrong type of object. It’s important to keep an eye on both the fuel and heat gauges as running out of fuel or over heating can sneak up on you. What I’ve played so far has been quite fun, although I was disappointed that only levels from the old games were included.

Balls busted

Balls busted

Both games have a level editor which is easy to use. The editor in R’n’Ds is quite flexible and allows users to create their own custom objects that behave differently to the stock ones. This allows people to make all sorts of different creations, one even claiming to have recreated Zelda! There are lots of different level packs available on the Artsoft website for R’n’Ds, but not really any for Mirror Magic. In either case, if you do happen to beat all the levels there is still lots of gameplay in the user created levels and building some of your own.

What Mc Duffin?

What Mc Duffin?

Despite being based on older games that are well known, I think both of these games bring something new to the table. R’n’Ds brings many more levels including user created ones and variety in game play that the original games didn’t have. Mirror Magic is a decent remake of the originals with the addition of a level editor. Both run on Windows, Mac OSX, Linux, and BSD. There is even a DOS port of both although the port of R’n’Ds is a little out of date. If you like any of the old games on which these are based you might wanna give them a try.

01
Dec
13

Some NetBSD Games

XV

XV

Having recently upgraded the disk space on the Sparcstation I decided I would go about installing a bunch more useful utilities and some games. I installed some image processing and capture software called XV so I could capture screenshots on the machine, this is what I’ve used to capture todays screenshots. Todays games were too small to justify a whole post to themselves, so I thought I’d post about a few of them together.

greed

greed

Greed

One of the first games I built and tried was greed. It runs in a colour terminal and can be played via SSH or telnet. The game is very simple, you are an @ symbol in a playfield full of numbers. You move in the direction of one of the numbers which causes you to move that distance, erasing numbers as you go. In order to be allowed to move in a direction you must be able to travel the full distance specified by the number without hitting a border or an area you’ve already erased. The game ends when you can’t make any more valid moves.

You use the numeric keypad to move, which for me felt reasonably intuitive. The game has some nice in game help, and is simple to get running and play. It doesn’t take long to play so it’s good to for a quick distraction.

icbm3d

icbm3d

Icbm3d

This game is modeled after missile command from the arcades, but with one difference, it’s in 3d. The vector graphics are quite nice but can be a little slow over a network connection for some reason. Fortunately the game has some built in commands to change the graphics settings. The controls are also a bit awkward, I found that it was too sensitive, such that small mouse movements often moved my targetting reticule way too far. Fortunately the difficulty curve isn’t too steep, but the control for this really let it down.

xbomber

xbomber

XBomber

Xbomber is based on the bomberman series of games. It is interestingly a multiplayer game, but not implemented the way you might expect. The one program can connect to multiple X servers, allowing two players per server sharing the one keyboard. There is a maximum of four players over four X servers. You can also play solo against the computer AI, but it really is quite a weak player, it looks like it is just making random movements. It is probably not the easiest thing to set up the multiple displays, X authority stuff would surely get in the way, but I’m sure it can be done.

xjump

xjump

XJump

XJump is a simple platform game where you have to climb a tower. If you fall off the bottom of the screen the game is over. Controls are simply the arrow keys and work quite well. The part of game that will catch you out most often is the seemingly frictionless movement of your character. It is quite easy to jump and fly off the other end of the platform you’re jumping for. So it means you have to be quite careful how fast you move when jumping larger distances. Another game that is quite fun, but short.

xroads

xroads

XRoads

I’m not sure where the name from this one comes from, it is a simple maze shooter, where you have to collect a number of animating stars around the level. You have to either avoid or shoot the badies around the levels, some of them will shoot at you. I’ve been caught out by bullets wrapping around the edges of the screen, I often shot myself! You can use this to your advantage, but more often than not it ends up hurting you. It’s a good little distraction, but the graphics could have been a little prettier.

xworm

xworm

XWorm

Finally XWorm is basically a snake game plain and simple. It has some nice graphics, and simple controls that are easy to use. It plays quite fast, so you have to have pretty good reflexes to play for very long. There is only a bunch of mushrooms on screen to avoid, and a fence around the edge, so even Qbasic Nibbles has a bit more variety! Otherwise it plays quite well.

So there you have it, a few simple games that work on pretty much anything you can run NetBSD on with an X server (or from an XTerminal). Most of these were simple little distraction type games rather than anything you’d spend a lot of time playing. They are for the most part quite fun, and a reminder of what games under *nix like systems used to be like.

17
Nov
13

Upgrading the SparcStation

This weekend I was fortunate in that I finally got another mbus module for my Sparcstation 20. I was however  unfortunate in that my data drive in it has failed. Because I back up on a regular basis, nothing much was lost, just some work I had done over the week that I also have stored elsewhere.

The machine had only 2 2Gb drives in it previously so I decided I would take the opportunity to also upgrade the hard disks. I had two fujitsu 18G  10K rpm drives set aside for just this purpose. Seeing as this would mean re-installing the OS, I thought I’d give the latest NetBSD (6.1.2) a try on the machine.

The mbus module I got is a SM61 that fortunately works out-of-the-box with the dual 50Mhz processor board I already have. Sun Sparc machines are unusual in that they support mismatched processors running in the same system. In this case as long as the motherboard is happy, and the processors are the same architecture (supersparc) everything is peachy.

So I burned a copy of the NetBSD 6.1.2 install disk and began the installation process. I noticed straight away a performance difference between 6.1.2 and the older 4.0.1. It seemed bogged down and slow compared to the older release for some reason, and the install disk would not extract the system from the CD. I had to instead use HTTP to get the base system installed.

I installed some packages including a benchmark utility called bytebench. Benchmarks like it are useful for determining if there is any change in speed of the system. I was unimpressed that the test results said the machine was _slower_ despite having an extra processor and faster hard disks. The old NetBSD with old hard disks and only 2 cpus would get about 7.2, where as the new setup maxed out at 6.2.

It may be possible that it requires a recompile to make it work faster. I suspect the distribution is compiled for the lowest cpu in mind, a V7 sparc. This system has V8 processors and should be faster. I however don’t really want to spend the time compiling the entire system, just for what might be a small gain.

Instead I’m reinstalling the old 4.0.1 version of NetBSD. Fortunately there isn’t much disadvantage in doing so. I’ve been able to build packages from recent versions of pkgsrc without a problem, and everything seems to work. I noticed the improved speed as soon as I fired up the installer. I have a bunch of binary package builds from the last install I had so that will also save me some time. I may try building this system from sources eventually if I have time, we’ll see if it makes a difference.

14
Nov
13

Some words on X windows

I’ve recently been reading about and watching a few videos about the replacement for X called Wayland. Now I know very little about Wayland itself, but I’ve been a user of X since about 1999 when I first went to university, so I can’t help it, I feel moved to write about my current and old experiences. X is actually really quite an old protocol and was designed with different goals in mind than those modern desktop environments have today. The history is written all over the internet so I won’t repeat it, but it is evident that X was originally meant for the X-terminal connected to a mainframe case that was so very common at the point of its inception.

One of the questions asked was “what does X do well?”

Lincity via SSH

Lincity via SSH

The core of the X protocol is based around drawing primitives such as lines and circles but also includes pixmaps (bitmaps for those who don’t speak X). Here is an example screen shot of a program, lincity, that was one of the first games I wrote about here on my blog. In this case I’m running it through an SSH tunnel over an ADSL line with a maximum upload rate (to the X server) of about 75Kb/s. Because of the way X works lincity is not only able to draw to my remote display, but is able to animate the play area at a reasonable rate. This situation is something which VNC and RDP just can’t do over my connection. The remote machine running lincity is my old Sparcstation 20 with 2x 50Mhz supersparc processors, running a pkgsrc build at the same time.

Working remotely

Working remotely

Here is another screenshot of me monitoring my old Sparc, again doing a pkgsrc build (they take a long time with only 50Mhz you know). I’m able to get real time performance graphs and interactive terminals, all using about 5-7Kb/s data through a SSH tunnel, and much less when the remote windows are not visible on the screen. This kind of use if very common for me, not just to old machines, but also modern ones that are around my workplace, X and SSH makes it easy to start a program from any machine. This is very handy for testing and I can run software from home or work as I need.

XDMCP Chooser

XDMCP Chooser

My machines at home are running NetBSD, FreeBSD and Gentoo currently and whilst some of them are capable, none currently have a head attached. So I frequently use XDMCP and a X server on my windows machine to access them, and it works basically flawlessly. I realise this is a less common situation now, but with thin clients becoming all the rage in different forms, it seems this feature of X could be exploited more.

FVWM on my Sparc

FVWM on my Sparc

I love that there is so much variety in window managers and that there are light ones that make even my oldest machine quite usable with recent operating systems. Pictured here is my nostalgic favourite FVWM, which incidentally is still being maintained and developed. Windowmaker, openbox, fluxbox, etc, all deserve to exist and have a dedicated user base. They are interesting and useful, but mostly truly light-weight, making using older hardware viable. People like myself who collect and use old hardware find this useful to keep life in their old pride-and-joys.

No matter how it is implemented under the hood, for users the network feature of X is seamless and very easy to use, in no small part due to the hard work of the X11 developers, many of whom are working on Wayland. So what motivated the big change?

One of the major factors is X is becoming too large and difficult a project to develop and manage. A contributing factor to this is the explosion in extensions to it that made it kind of bloated. It seems they were sort of added willy-nilly (mostly during the Xfree86 days) to meet the demands of people developing the more eye-candy based style desktop environments we see now. Fortunately the X developers have been cutting much of the debris out of the extensions and have made the X server modular. Now if only the X server was actually installed/packaged in separate modules for each extension and the core it might make having a slimmer server easier, but as far as I know that’s not possible.

Personally I’ve not had much trouble with X. I mostly had problems with getting proprietary drivers to work for my GPU back in the Xfree86 days, but I’ve not had that problem in ages. I have only really seen the flickering that has been talked about over high latency network connections, never over any LAN I’ve ever used. I understand that it probably does have huge design flaws, and that a newer system and design is needed to meet the needs of new desktop environments. I just feel somehow, that when it’s gone I’ll miss X.




Blogs I Follow

Enter your email address to follow this blog and receive notifications of new posts by email.


Mister G Kids

A daily comic about real stuff little kids say in school. By Matt Gajdoš

Random Battles: my life long level grind

completing every RPG, ever.

Gough's Tech Zone

Reversing the mindless enslavement of humans by technology.

Retrocosm's Vintage Computing, Tech & Scale RC Blog

Random mutterings on retro computing, old technology, some new, plus radio controlled scale modelling.

ancientelectronics

retro computing and gaming plus a little more

Retrocomputing with 90's SPARC

21st-Century computing, the hard way

lazygamereviews

MS-DOS game reviews, retro ramblings and more...