[null, {"document_url": "http://www.grauw.nl/", "unformatted_src": "http://www.grauw.nl/etc/msx/graphics/rose.png", "src": "http://www.grauw.nl/etc/msx/graphics/rose.png", "formatted_filename": "rose"}, null, {"document_url": "http://www.grauw.nl/", "unformatted_src": "http://www.grauw.nl/etc/msx/graphics/rose-original.png", "src": "http://www.grauw.nl/etc/msx/graphics/rose-original.png", "formatted_filename": "rose original"}, null, null, {"document_url": "http://www.grauw.nl/", "unformatted_src": "http://www.grauw.nl/etc/msx/graphics/rose-msx.png", "src": "http://www.grauw.nl/etc/msx/graphics/rose-msx.png", "formatted_filename": "rose msx"}, null, {"document_url": "http://www.grauw.nl/", "unformatted_src": "http://www.grauw.nl/etc/msx/graphics/rose-aseprite.png", "src": "http://www.grauw.nl/etc/msx/graphics/rose-aseprite.png", "formatted_filename": "rose aseprite"}, null]
Grauw’s web spot

Rose (ToZ) MSX pixel art

As a study, I created an MSX pixel art version of the Rose character from Tales of Zestiria: Source image: One snag I ran into is that since on MSX pixels are not square but slightly rectangular, the MSX image looked quite stretched. Narrowing the face helped a lot but it still looks a bit stretched. Something to keep in mind in the future.

How it looks in openMSX: 14 colours used, 15 if you count the background. I spent about 4 to 6 hours on it (two evenings).

For the image editor I used Aseprite which is not free but only a few bucks, and is a really good editor for pixel art. Good palette support, supports a transparent colour, layers, animations, etc. What are your thoughts? I think it turned out pretty well. I’m wondering if I overdid the anti-aliasing in the hair; it smooths the edges but also adds shadow details that weren’t there originally. Is it maybe better to remove some anti-aliasing pixels at the cost of some sharper edges, you think? Please let me hear your critiques.

Next time I’m going to try to create an original drawing.


0 comments [reply]

Gunzip for MSX

Lately I’ve been working on a gzip (.gz) decompression implementation for MSX, which as of yesterday is functional. Although I’ve been developing it for VGMPlay, I’ve implemented it as a stand-alone “gunzip” utility.

The gunzip project page is here:


The latest binary can be downloaded here:


And of course it is open source and liberally licensed, so you can reuse the code in any way you want.

I’m pretty happy with the end result because not only does it successfully decompress gzip files, it’s also pretty efficient in doing so. Here are some test results with the first disk of Aleste 2, comparing various decompression formats for MSX:

Test on Philips NMS 8245 MSX2 (openMSX) with Sunrise IDE:

Test on Panasonic FS-A1GT turboR (openMSX) with Sunrise IDE:

Note, this is just a test with a single file, however it shows the general trend. I’m pretty happy to see this result, it follows from the efficient approach I took to decoding the huffman tree.

Skipping the checksum verification further improves speed by 25% (turboR 13s, MSX2 55s), however I’ll let the code settle for a while before I expose that as a command line option.

Finally, I’ve tested with a fairly large set of gzip files, but if you encounter any errors, please send me the gz file to test with and I will fix it.

[Edit: Added gunzip 1.1 performance results.]



Glass Z80 assembler

My most recent side project is Glass, a Z80 assembler. It’s cross-platform, using the Java 7 runtime. The first version focused on getting it on par with other assemblers in terms of features. It supports regular and repetition macros, and block scopes. A little more advanced feature is that you can reference into scopes by using the dot (.). Recently I also added virtual space definitions and code sections.

In the future I’d like to add some more advanced features, which prompted me to make an assembler in the first place. Some ideas are extending macros to make them more useful for class definitions, multi-compiling procedures, static analysis, automatic optimisations, and debug output with timing information.

» Glass project page



JavaScript enumeration pattern

Although often better handled with subclasses and polymorphism, enumerations can be a convenient light-weight way to indicate some kind of state or non-boolean flag.

When one makes an enumeration in JavaScript, it is typically an old-fashioned list of constants with integer number values:

A downside of this approach is that it is not type-safe; these values can not be distinguished from any other number. Additionally, it is possible to cheat by hardcoding a value somewhere, which makes code less readable and refactoring a lot harder.

There is a better way however:

When one of these is passed to a method its type can be checked using instanceof or a function like checkTypes(). And because these are unique object references they are impossible to specify without using the constants.

Additionally, because this effectively defines a class it comes with a lot of power. E.g. you can pass meta-data and handy functions:

Finally, as you discover you want to move more and more functionality onto this enumeration, it is easy to upgrade the enumeration to a full-fledged set of subclasses:



» All blog entries…

» Blog feed