09
Apr
19

Modern BASIC: PCBasic and QB64

Last month I had intended to make the next Sparcstation desktop post, but unfortunately have been having trouble getting the software I had intended to cover to build. So that’s still in the works and today we’re going to look at something else interesting: modern implementations of old BASIC Languages. It seems I’m not the only one that feels nostalgia for the old BASIC interpreters that were common to almost every machine. The two I’m looking at today are particularly nostalgic for me as I learned to program on the original interpreters.

The first, PC-BASIC is made by Rob Hagemans and is an extremely well polished GWBasic emulator. It seems to be 100% compatible as I’ve been able to run all of my old basic programs including ones that use graphics and sound. Here are some images of programs running.

This slideshow requires JavaScript.

The graphics and sound are indeed very accurate compared to MS-DOS hardware and the original interpreter. There is good support for all the graphics modes including those from special machines such as the Tandy/PCjr and Olivetti machines that had special versions of the interpreter. The PC speaker is emulated quite well (better than under Dosbox) and support for Tandy 3-voice sound is included. I’m not sure if it was deliberate, but it seems that the processing speed on my laptop is similar to what I used to experience on our old 386sx back in the day.

The next program, QB64, is a new language designed to mimic QBasic and QuickBasic with extensions that provide access to modern graphics and sound libraries. It can build native executables for Linux, Windows and Mac OS, so it’s pretty impressive and capable of producing programs for modern systems. Here are some programs running.

This slideshow requires JavaScript.

I tried to compile some of my old programs, from both GWBasic and Qbasic, and found some worked without modification whilst others didn’t work or required modification. I had some issues with the programs that did build, the first and most obvious is that the programs started in what is initially a very small window. Resizing the window doesn’t stretch the display, but pressing alt+enter does give a nice full screen display. The second issue is more complex and arises from the fact the programs are compiled and not interpreted. Basically they run way too fast because they are running at native speeds on modern hardware. This issue however should be fixable by modifying your programs with better timing code. Thirdly I’ve found one or two features from the old languages aren’t implemented, meaning some old programs won’t work, the Gorilla game that came with Qbasic being one.

An IDE is provided which looks almost identical to QBasic, so it’s very familiar and relatively easy to use. Auto indentation seems to fix old programs as they are loaded and parsed, and there is some very nice syntax highlighting, making even old programs much more readable. Although one negative point is the built-in help only covers items specific to QB64 and has omitted a language reference for the base QBasic language.

Given that we can run the original interpreters in Dosbox, how do these modern interpretations compare?

PC-BASIC is quite good in the compatibility department, working with basically everything I threw at it. The only real disadvantage it has is speed compared to running GWBasic in Dosbox, and the ability to change the emulation speed. On the other hand it has some features that appeared in real hardware, but aren’t emulated in Dosbox. (such as screen borders on CRTs) It also gives access to features found on special versions of GWBasic, such as the special Tandy graphics and sound that would be otherwise inaccessible on the standard interpreter. You can get this interpreter from his github website, I recommend using the development version as it is more compatible and has fewer bugs.

QB64 doesn’t fair so well with every older program, those that work do so quite well however. Many programs will work with a little modification, whilst others will require major re-working. I suspect the main benefit of QB64 is less about running old programs and more about building new programs. It features some extensions to the QBasic/QuickBasic language that allow more modern features of the operating system to be used such as 3d graphic acceleration and digital sound. You can get QB64 from their website, I used the stable version and found it worked quite well.

28
Feb
19

QB Debugger Heroes for DOS

I wasn’t sure whether I should include today’s game as a home brew as it’s creator, Gemini (Kris Asick), has produced commercial games. From the file date it was made sometime in November 2017. He made it using QBasic during a live stream, which is certainly interesting, unfortunately there doesn’t seem to be a recording to watch now.

QB Debugger Heroes is a fairly simple Robotron 2084 clone using text mode for graphics and lacking any sound effects. This is relatively common for games implemented using gwbasic or Qbasic languages as it makes development much faster, and whilst there are graphics commands they don’t generally perform well so aren’t suited for action games. Although it is technically possible. Whilst it’s just textmode style graphics, they are nice to look at and includes some basic animation that looks quite nice.

The game controls requires the numpad on your keyboard, so you won’t be playing on a laptop. It works kinda like the twin stick design of the arcade game, with two clusters of keys, one for movement and the other for directing your fire. However unlike a real joystick each keypress changes your movement and gun fire, but you continue moving and firing in that direction until you press a key to change it. This is partly because of limitations within Qbasic when reading input from the keyboard.

For best results I suggest using a modern machine with Dosbox to run it, as you’ll be able to adjust the speed as needed. 30,000 cycles was suggested and is about right for a faster more challenging play experience. If you’re playing on real hardware you’ll need a Pentium era machine to get a decent challenge. Older 286 and 386 machines will work, but it runs slower and will be significantly easier.

The game play has the main elements of Robotron, but is simplified and has some elements removed. Like the arcade game, enemies spawn in continuously (in short bursts) and you finish a wave when your destroy a set number of them. However it appears there are fewer enemy types and there aren’t any humans to rescue. This was to be expected as it was developed in a relatively small time frame, and additions such as those would have degraded the game speed. Difficulty ramps up with each wave mostly just by number of enemies present.

Obviously QB Debugger Heroes isn’t anything special as far as Robotron clones go, but it is a good example of what can be done fairly quickly with a language like QBasic. Gemini has managed to create a reasonably faithful Robotron clone that is polished in 6 hours, which in my book is pretty darn impressive. You can find a download for it on his website.

This slideshow requires JavaScript.

 

22
Jan
19

Quick Look: a not so mysterious hard disk

I’ve been quite busy over the holiday break, but whilst visiting my parents I found what I thought was a mystery hard disk. Here’s a photo.

It has Trigem on the label, something I’ve not seen before. I didn’t know until looking closer at the drive much later that it’s actually a Samsung drive manufactured for Trigem, who was the company behind e-machines. So it’s no surprise that it was in an e-machine that Dad found it.

If you look on the underside of this drive you can see that the board is even labeled as being a Samsung Voyager 3A, 4A or 5A.

Having discovered it’s not exactly as mysterious as I thought I decided to power it on and give it a quick test to see if it works. Given that it had been floating around Dad’s shed for quite some time I was quite surprised that it spun up and had no bad sectors. It achieved about 9MB/s using a USB2IDE adapter when reading the entire surface. I loaded up some disk diagnostic software to check out what kind of condition the drive is in.

It identifies itself as a Samsung SV0322A spinpoint drive and despite its age it seems in relatively good condition. It’s quite small at only 3.2Gb, but it will probably be useful for a retro machine running either DOS or Win9x, so I’ll be adding this drive to my collection of other retired hard disks.

30
Dec
18

Shaw’s Nightmare 2 for DOS

Today I’m taking at look at a sequel to the homebrew game Shaw’s nightmare, simply called Shaw’s Nightmare II it was released by Michael Muniko in 2016. There is much in common between the two games, such as being made using the Build engine and being heavily inspired by Doom, Doom 2 specifically in the case of the sequel.

Firstly there are a few things I didn’t notice when playing the first game that apply equally to both. They support VESA graphics with resolutions higher than the standard 320×200 VGA, today I’ve used 640×400, although you can go as high as 1024×768. The sprites look a little better with higher resolutions because the scaling doesn’t cut out as much detail. Also items in the game are rendered using a voxel engine that is part of the build engine.

Running at a higher resolution seemed to required more processing power, it worked reasonably well under dosbox with 60-100k cycles. Later I found turning the cycles up to maximum helped with another issue.

Artistically nothing much has changed in the sequel, although there are some new enemies and a new weapon which fit in well with the pre-existing art style. The main improvement comes from the level design, which has better enemy placement and level layout, creating less issues with sprites clipping and blocking your view. There are a couple of levels which are clearly inspired by some found in Doom II.

The basic sound effects are much the same as the first game, however there seems to be some improved music. It’s no symphony, and the quality varies by song, but it’s generally better than the first game.

The controls still suffer from input lag, and a little bit of sluggishness in the movement of the player. I tried using the mouse in combination with the keyboard, but found difficulty with mouse sensitivity. The demo in the game suggests it’s possible to get something more functional, perhaps requiring more processing power to reduce input lag. I tried setting dosbox to maximum cycles and it helped, but didn’t eliminate the problem.

Shaws Nightmare 2 is an incremental but significant improvement over the first. The control lag is still an issue, but it’s more playable. After getting used to the control issues I did start to have some fun. If you want to give it a try you can find it on the authors website here.

This slideshow requires JavaScript.

12
Nov
18

Mainboard: AOpen MX3W

Today I’m looking at a Socket 370 made by AOpen around mid 1999. It’s a clearly budget board as we will see when taking a closer look. I referenced this contemporary Anandtech article whilst writing this. I’m trying out a different device for taking the overview photos today as my old camera has seen better days. Let us begin with a shot of the whole board.

The first obvious thing is the mATX form factor and the lack of an AGP slot. So this was definitely not intended for the gaming or high performance market. It sports an Intel 810-DC100 chipset with the basic on-board video, and an AD1881 soft audio codec for sound. The chipset is interesting as it has the FSB and memory clocks separate. The memory will run at 100Mhz at a maximum, whilst the FSB can achieve speeds well in excess of this. This board can increase the FSB speed but the RAM clock cannot be changed. This means that any overclock could only be effective up until the point the memory bus becomes saturated, at which point overclocking any further would not increase performance.

Cache SRAM chips

The on-board graphics are fairly basic, it’s roughly equivalent to the Intel i740, a GPU that was never known for being particularly fast. It uses the system memory for much of the work involved in 3d rendering, which obviously consumes memory bandwidth the CPU could potentially require. To mitigate this flaw a 4MB cache was added to this version of the chipset, it is used mostly for storing the Z-buffer. I’d imagine this makes a fair difference whilst rendering 3d images, but doesn’t entirely solve the problem.

The on-board sound solution is similarly very basic. It’s an AD1881 audio codec, which Anandtech described as a “soft” audio device. By this they meant that much of the processing work for audio is done by the host CPU rather than specialised hardware on the sound chip. This is much like early sound cards which relied on the CPU for mixing audio channels together as the hardware only played back a stream of samples. At the time this board was made there were plenty of more advanced sound chips available that could do everything in hardware, some even turned up as integrated sound.

In terms of performance this board wouldn’t be all that good compared to the higher end. However that’s not what it was really designed for. For basic use such as office work and web browsing this would have been adequate for the time.

From a technicians point of view there are a few issues with this board. Firstly, there isn’t much variability in how you can build a system with it, only budget machines are really possible. The on-board graphics does not perform well and there is no AGP slot for an upgrade. There are only two memory slots which are limited to 100Mhz RAM, so you’re quite limited in how much and how fast the memory can be. Finally the floppy connector is in an odd spot near the AMR slot, this results in running a ribbon cable across the board which is generally bad for air flow in the case. My particular example is further hampered by one of the memory slots having a broken retaining clip.

For the end user it would probably perform well for most basic tasks, but get bogged down when they do something requiring a little more grunt. The lack of upgrade options would probably be an issue for some depending on what their needs are. Given that it’s a budget model none of this should be surprising, only people looking for a low price would have found this appealing.

09
Oct
18

Wolfenstein 3d for DOS

Todays game is very well known, and can be considered the grand father of the FPS genre. Wolfenstein 3d was released by id software in 1992. It was extremely popular, selling both in the retail and shareware markets, and received several significant awards. The engine was licensed out and resulted in a number of other games, some I’ve already covered such as Blake Stone and Corridor 7. It inspired others to make similar engines and games of their own such as Nitemare 3d and Ken’s Labyrinth. In this way it really spawned a whole generation of FPS games.

It wasn’t without controversy, partly because of the Nazi imagery used as well as the Nazi party anthem being used at the title screen. Because of this some rules were changed in Germany which resulted in the game and some other media being banned there until quite recently. It was also quite violent compared to contemporary games, although looking at it today it is comparably tame.

Today is actually the first time I’ve really sat down and played through a significant portion of Wolfenstein 3d. I’ve had brief encounters with the game in the past, but never really sat down and spent some time with it. I played through the entire shareware episode in a little over an hour total play time.

You need a VGA graphics card and at least a fast 286 machine. I’ve found that 3000 cycles in Dosbox (roughly a 20Mhz 286/386sx) is sufficient to run the game with the maximal screen size and a smooth frame rate. I quite like the art style, the UI elements are generally very minimalist in a pleasing way whilst sprites and textures are detailed and make good use of colour. It’s impressive in both an artistic and technical sense.

The sound effects are a mix of digitised and adlib sound effects, which generally sound quite good. Although it seems that it can only play one digital effect at a time, which can result in odd sound when in a noisy situation such as lots of nearby enemies. The adlib music is quite good and adds quite a bit of atmosphere to the game. Although I was startled to learn the music used at the title screen is the Nazi party anthem.

There are three different options for control, keyboard, mouse or joystick. I used the keyboard for my play through, mainly as I did it on my macbook. The keyboard works fairly well mostly, but sometimes doesn’t have the aiming precision sometimes. Using the mouse and keyboard works much better, but it wasn’t an option for me this time.

The game play is pretty simple, basically you search a maze like level for the level exit. Along the way you have to gun down enemies, pick up ammo and health as needed, and collect various score items. There are some locked areas which require a key, which are usually found simply by exploring a level.

Because of their maze like structure and how many areas look similar it can be easy to get disoriented and totally lost. There is a simple maze solving algorithm that can help, simply stick to walls on either the left or right hand side. This works well for the majority of the levels, only slipping up where there is a loop in the maze.

Guns are an important part of every FPS game, Wolfenstein 3D has 4 basic weapons. The knife, pistol, sub-machine gun, and a rapid firing chain gun. The best weapon for most use is the sub-machine gun as it’s fast firing, but not so fast as to chew up all your ammunition. The chain gun tends to eat ammunition too fast, so is only really useful when fighting the bosses or a large group of enemies. The pistol and knife are basically starter weapons for when you’re low or out of ammunition.

So how does Wolfenstein 3d hold up today? I’d say it holds up fairly well, although there are some issues. The game play works very well, but does get repetitive after a while. The levels are generally well designed, with secrets to find and plenty of bad guys to shoot, however many areas look the same so it’s easy to get lost. I also found I had to wander empty levels after killing most bad guys but having to retrieve a key or find a locked door. On the other hand the guns are still fun to use, it still very atmospheric, and blasting through the levels is still quite fun. Later episodes shake things up by adding new enemy types and are more difficult.

You can play Wolfenstein 3d online at the internet archive, or you can get a copy on steam or GOG.

This slideshow requires JavaScript.

03
Sep
18

SS20 Desktop: Basic Web Browsing

Last time I looked at the relative performance of the CPU modules I have on hand, the HyperSPARC running at 90Mhz seemed to be the best option for using the machine in a workstation role. Today we begin to test this out by trying to browse the web. This sounds simple, but it’s actually quite challenging to do for a vintage machine as web browsers tend to require lots of graphics processing and there are very limited options available.

I have managed to get three basic web browsers compiled and working, Lynx, Links and Dillo. I’ve tried building others that are light weight with little success, more main-stream browsers such as firefox are simply too demanding to even try. Three potential candidates for future build attempts are ELinks, Midori and Netsurf.

The first program, lynx is one of the older programs, started in 1992 by students and staff at the University of Kansas it is still updated today. It runs from a terminal and has no graphical capability, because of this it is quite useful for vision impaired users as it works well with screen readers. You would be forgiven for thinking that lacking graphical display is a hindrance on the modern web, but lynx manages to make most pages quite readable. Well behaved/designed websites generally work quite well with some compromises on formatting, I tried google searches, reading on wikipedia and several wordpress blogs which all worked quite well. I was even able to use it to read my email via gmail. Unfortunately there are also plenty of sites that aren’t friendly to lynx (such as ebay), and page formatting isn’t always nice to read. These issues stem mostly from sites that haven’t crossed over to HTML 5, or ones that over use complex formatting. It performs quite well on the Sparc Station.

Links whilst having a similar name is a completely separate project to lynx. It offers the capability to run in a text-only terminal in much the same way as lynx, but can also be used graphically via X, SVGALib, or a frame buffer directly. This makes it quite useful on machines that don’t have a working X server. Much like lynx, well behaved websites are very usable and generally work quite well, again with some formatting compromises. It handles page formatting roughly as well as lynx does, but with the addition of images. This makes some websites like ebay more usable, although the formatting is still wonky at times. I’ve had gmail working on it in the past, but not today due to the current build or changes to gmail.

Example image of Links dithering capability

Dithering example

Performance on the sparc is pretty good, with short delays when images are being displayed for the first time. This happens because my sparc has an 8-bit display and Links will convert images using dithering and colour approximation. To maximise the number of colours it can use Links uses something called a private colour map. This is why other windows have their colours messed up whilst Links is in focus and vice versa. This sounds like it would result in poor image quality, however links manages this conversion quite well. The loading delay would certainly be shorter on 24 bit displays.

Dillo is a light-weight browser with a GUI that looks much more familiar for most users. It requires much more computing power compared to the others, but as a result it tends to display web pages with formatting closer to what you’d expect from the page. I found that many pages worked quite well, but others failed to display anything at all. It seemed to be an issue with SSL, I have the root certificates installed, but it still believed all connections had invalid certificates when clearly they didn’t. However you can see from the screen shot, that sites like wikipedia render exceptionally well.

Performance on the SparcStation unfortunately is quite slow, mostly whilst loading a page. Dillo can consume so much CPU as to even starve the X server of cycles, making it appear the system has frozen (when it hasn’t). From what I’ve read this could be because Dillo is multi-threaded, and is probably starting a number of threads upon loading a page. It may run significantly better on systems with more than one CPU, in my case switching to using the SuperSparc modules would possibly solve this.

Browsing the web on such an old machine was never going to be easy, some things just aren’t feasible such as javascript and video content. However it actually works reasonably well for reading static web pages and doing basic interaction such as posting a comment. Of the three browsers I’ve tried so far I think Links is probably the most usable, it provides images and formats pages reasonably well without consuming too many CPU cycles. Lynx comes second only because it doesn’t show images, it is a good option for text only browsing. Finally Dillo is probably just a smidge too demanding for my particular hardware and fails ungracefully with some sites, although it does provide the prettiest render you also have to wait the longest.




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...