29.09.2007 13:55

Jumping Jack on the big screen

Yesterday I successfully defended my diploma thesis about designing and building a replica of Galaksija microcomputer. I'm now officially an electrical engineer.

Now I can actually break those "no user serviceable parts inside" and "only to be opened by qualified personnel" stickers on electronic devices without the feeling that I'm doing something against the rules. Where's any fun in that?

Posted by Tomaž | Categories: Life | Comments »

Galaksija ROM disassembly

27.09.2007 14:20

I've put online an incomplete Galaksija ROM disassembly in HTML format (with links to functions and all).

Oh, and z80dasm 1.1.0 is in Debian Unstable now.

Posted by Tomaž | Categories: Code | Comments »

Galaksija genuine advantage

22.09.2007 20:36

There's a lot of Galaksija emulators out there. First there's one for DOS and Windows. Then you have one for ZX Spectrum and now also for SAM Coupé.

So how can you, as a simple user, be sure that you're getting the real 1980s Galaksija experience instead of some emulator of a questionable origin? Well, fear no more: Galaksija genuine advantage software will tell you exactly what kind of machine is behind the display you are looking at:

It's fake. Go get your money back!

On a more serious note. It's amazing that Galaksija can be emulated so well on another machine of its class (same CPU with similar clock frequency), but it isn't that hard tell apart emulator from the real thing.

This diagnostic program just looks at properties of different sections of Z80 address space. CNST means that you get consistent values from it, suggesting there is something attached to the bus at that address and MMRY means that it can remember a value that was previously written to it (like RAM for example). Emulators also patch some bytes in ROM, so a check sum is calculated and compared to a known value.

Update: Here's how it looks when it runs on an emulator:


Posted by Tomaž | Categories: Code | Comments »

Latex tip

21.09.2007 23:54

I have a feeling I had this problem at least once before, found the solution and forgot about it. So, here's the whole story hoping I won't forget about this the third time.

The twoside option to the article document class in Latex makes the document suitable for duplex printing (for example by making margins slightly different on odd and even pages, etc.). It's just one of those little things that make Latex documents look really nice when printed. However Latex documentation doesn't mention that it also has one nasty side effect...

It changes page layout from this:

flush-bottom style

to this:

ragged-bottom style

Why is this you ask? Some grepping through the Latex configuration brings up this little gem (in article.cls):


Which means that the raggedbottom option is not enabled if the twoside option is enabled. I'm sure a perfectly reasonable explanation exists for this (as it seems to for every other thing in Latex), however to me this kind of layout just looks plain ugly.

The solution is obviously to include a \raggedbottom command at the beginning of the document. This way the page layout you've painstakingly fine tuned doesn't break when you switch from single side to duplex printing.

Posted by Tomaž | Categories: Code | Comments »

Spam trends

20.09.2007 1:17

I guess my mail server is still a pretty quiet corner of the internet. Comparing to some scary statistics I saw recently on this amount of spam is pretty tolerable. Unfortunately there is this rising trend that worries me.

Red spam rising

Bogofilter works great by the way. I occasionally get one or two spam mails in my inbox and I haven't seen a false positive in almost a year.

Posted by Tomaž | Categories: Life | Comments »

z80dasm 1.1.0

17.09.2007 22:43

A few days ago I uploaded version 1.1.0 of z80dasm. Here are a few bits from the changelog:

Rewritten symbol table routines. Replaced old symbol table from dz80 that used statically allocated strings with some more modern code. Better comments in the symbol file regarding where and how a particular symbol is used is a nice side effect of this.

Support for input symbol files. You can now give the disassembler knowledge about known symbol values (constants, function locations, etc.) in the form of a standard Z80 assembler symbol file.

Support for splitting binary file into data and code blocks. Along with the symbol file you can also now give z80dasm a description of data and code sections in the binary file you're working on. It will then write data sections with "defb" or "defw" directives in the assembly file instead of disassembling them.

Posted by Tomaž | Categories: Code | Comments »

HDD silencer and temperature

14.09.2007 10:59

Sometime ago I mounted the disk drive in my server on Cooltek rubber mounts. The hard disk was the loudest part after I installed a silent power supply and my CPU fan regulator.

Previously the heat was conducted away from the disk through contact with the metal case but that isn't possible now since there are two centimeters of rubber separating them. So the only way left is by air convection which is less efficient. To see just how much effect this would have on the drive temperature, I started monitoring drive temperature with SMART a few days before I installed the rubber mounts.

This is the temperature graph before:

and after the modification:

The spike on both graphs is when I stressed the disk for 3 hours using a tar command in an infinite loop.

You can see that the rubber mounts caused at least 4°C temperature increase. I believe 44°C is already a bit high (at least according to this Google paper) and it's was quite cold these days. According to SMART this disk already got as hot as 43°C sometime in the past when it was still screwed directly to the case.

I'll keep monitoring the temperature but I'm afraid this isn't going to work well in the summer.

Posted by Tomaž | Categories: Life | Comments »


08.09.2007 20:56

Yesterday I went to Frisk, a "festival of computer science and modern communication" in Murska Sobota. Here are a few impressions:


This is the main hall - it was raining outside so people were gathering here instead of the open atrium that seemed to be prepared as a center of the event. Plus you could play some more and some less modern games here (there was one old PC and one Commodore 64 available).

At the back wall there was one Wii (left, surrounded by a loud crowd that was obviously having lots of fun) and one Playstation (right, with two guys nervously playing a FPS). The situation reminded me of a certain xkcd comic.

There was a talk about Apple on the schedule with an interesting title but boring contents (item by item description of their product line). Never thought I would see a room of people watching Apple "Hi, I'm a Mac" commercials on the big screen.

Last but not least there was an exhibition of old computers (some of which were from Cyberpipe's computer museum). It was the best part of the festival in my opinion, but not much I haven't seen before.

In the end I can say that it wasn't worth spending 8 hours on a train to get there (average speed was an amazing 40 km/h - hey at least nothing broke down). I did plan to make a short trip around Murska Sobota besides visiting Frisk, but the weather made that more or less impossible.

Posted by Tomaž | Categories: Life | Comments »


05.09.2007 17:30

Yesterday I watched the BBC documentary Tetris: from Russia with love.

It was the first documentary in a long time that I enjoyed watching on TV. In constract with things that are called documentaries today it has more than 5 minutes of actual content, tells an interesting story and the narrator doesn't sound like he's commenting on a football game. Seriously, I don't know how anyone can stand watching an entire 1 hour show on Discovery or National Geographic channels when you see all original footage in the first 5 minutes and the narrator just repeats over and over again how this or that is awesome and/or extremely dangerous.

There are two things though that I missed though: I don't know if that was the fault of Slovenian broadcaster removing the original overlays, but when someone is talking to the camera I'm used to seeing his name printed somewhere on the screen. Only at the middle of the movie I connected all the faces with their names.

They could also be a bit more specific about technical details... What was that russian computer called on which the first version of Tetris ran? I'm quite sure I saw a screenshot of Sinclair Spectrum version of Tetris for a moment there, but all hardware was described only as "computers" or "consoles", not with specific names (except for Gameboy I guess).

Posted by Tomaž | Categories: Life | Comments »

Vacuum tube collection

04.09.2007 22:33

Some time ago I found a box full of old vacuum tubes in my grandparent's cellar. Today I finally got to photograph and catalog them.

OMG it's full of tubes!

It looks like a loose collection of tubes gathered from TV (there are quite a lot PL 36 for example) and radio receivers. I'm told some of them were also used by my dad for high school and university projects.

I have not yet managed to identify all of them. Some markings on the glass became very fragile and can be easily destroyed by touching them so it's not surprising that a lot of them have disappeared with time. I can also only guess at their age and state. Some look like they haven't been used yet and at least one (RV2 P800 has "Wehrmacht" printed on it) appears to be from the second world war.

I would be very grateful if anyone can provide information that is missing below the pictures. Please drop me a mail. Thanks.

Posted by Tomaž | Categories: Analog | Comments »

EN-X environment control

04.09.2007 21:48

EN-X is a CPU temperature regulator I've made for my server. It is a fully analog circuit with two feedback loops (one for the fan RPM and one for the CPU temperature). This is an enhanced version of the EN-2 controller which only has one feedback loop for the temperature. It is mounted in the 5 1/4 inch case from an old CD-ROM drive.

Why two feedback loops? CPU fans have hysteresis. This means that once they begin spinning you can drop the supply line to a very low voltage and they will keep spinning. But once they stop it will take almost full 12V on the supply line to start them again. This means that with the EN-2 controller with only the temperature loop I could not use the full voltage swing on the fan supply line without fear that the fan may stop and will not start again until the CPU is very hot. The second feedback loop will ensure that the fan is spinning with the speed that is regulated with the temperature loop.

Why not use a PIC or some other microcontroller? Well, I think there is enough digital electronics in an average PC already. I also like making nifty little analog circuits that will perform a task with three transistors while your average electronics engineer won't even consider a circuit that doesn't use a microcontroller with a million or two transistors.


Let's start with the front. On the left is a panel meter which can show fan RPM or the CPU temperature. In the middle is a switch that controls what is shown on the panel meter. On the right is the temperature setting. The feedback loops will try to keep the CPU on this temperature by speeding up or slowing down the fan.

The background for the panel meter and the sticker were made in Draw program. They look nice, but it took forever to made them. I could probably have written a Postscript file by hand in half the time I wasted in


This is the case with all components ready to be put together. The case once belonged to an old CD-ROM drive and needed a few cuts with the dremel tool before it was usable for this project. The front plate was taken from a trash can in Cyberpipe. Thanks guys for letting me pick up your garbage. :)


This is the back of the printed circuit board. It is a single layer design made with PCB. Routed by hand of course, autorouter is useless (or I don't know how to use it properly). Etched with the standard photo etching procedure and using father's etching "soup".


The front of the circuit board contains all of the elements. On the left you can see the power bipolar transistor that drives the CPU fan mounted on a black heat sink. The heat sink is an overkill when driving tiny CPU fans but looks cool and who knows, maybe in a year or two we will all be using a 1 kW fan on our 10 GHz multi-core CPUs. In the middle is the LM2907 frequency-to-voltage converter IC (same chip that is used in ABS systems in cars). On the right are two double op-amps for the panel meter and the feedback loops.


Here we have again the whole thing. I forgot the screwdriver inside the first time I've put it together. :) The saw blade in the background has nothing to do with this project.


This is how EN-X looks when it is ready to install into the PC.


Back side with all the connectors. On the left there is a small connector for the temperature sensor (KTY series thermal diode), in the middle is the standard connector for the CPU fan and the standard power supply connector.

Posted by Tomaž | Categories: Analog | Comments »