Development

Starting Msx Assembly 4

Published at October 22, 2020 ·  9 min read

So lets start where we ended in part 3. We had a piece of code which printed a letter, one by one, to the screen to finally print “Hello world”.

Execute:
        LD HL, HELLO

LOOP:   LD A, (HL)
        CP 0
        RET Z
        CALL CHPUT
        INC HL
        JP LOOP	
HELLO:  db "Hello world",0

First we point register pair HL to the label HELLO. On that label we define a set of bytes (db) in memory, “Hello world”. Effectively, HL now contains the memory adress of the capital H. INC HL will increase HL so it will point to the next byte in memory, containing the letter e. Now what will happen if we use INC (HL) instead?

...

» Read more

Starting MSX Assembly part 3

Published at June 1, 2019 ·  8 min read

So we’ve seen how we can call the BIOS and how to use an assembler to create a file which can be BLOAD’ed and run on an (emulated) MSX. So now that is out of the way, lets do the mother of all tutorials: Hello world!

This can be pretty hard to start with if you want to do this in screen 2 of the MSX. But let’s do this in screen 0 because then we can get some help from the BIOS. The BIOS has a nice call that can display a character on the screen called CHPUT. There are a lot of resources which list all the BIOS calls, e.g. http://map.grauw.nl/resources/msxbios.php , so of you want to get an overview of all the BIOS calls, start reading those ;)

...

» Read more

Starting MSX assembly part 2

Published at May 11, 2019 ·  2 min read

So, in the previous post we started with a small assembly program to produce a beep:

    db $FE     ; magic number
    dw Begin    ; begin address of the program
    dw End - 1  ; end address of the program
    dw Execute  ; program execution address (for ,R option)

    org $C000   ; The program start at C000h in the MSX's RAM
Begin:
Execute:
    CALL $C0  ; Call the BEEP bios routine
    ret
End:

What I did not talk about was how to actually use an assembler to create an actual file which the MSX can execute. So let’s do that now.

...

» Read more

Starting MSX assembly part 1

Published at May 5, 2019 ·  4 min read

I somehow get the feeling every now and then that more people want to know how to program things for old computers. Since I still have a working MSX and still sometimes program for it, let’s see if I can create some tutorials.

Assembler

The MSX has a Z80 processor on board. So you need a Z80 assembler if you want to program in assembly. You can use an assembler on the MSX like Wbass-2 or Compass, or you can use a PC or Mac for cross-development and use something like Sjasm or Glass. For now I wont be covering how to use an assembler. Instead I’ll focus on assembly and the MSX bios at first.

...

» Read more

New website

Published at May 4, 2019 ·  4 min read

For some time now I wanted to really start with a new site/blog. With all the stuff that happened since 2018 I felt the need to write stuff down and to be more open then before. So to actually do that, I started this blog.

Being a software developer I wanted to create it myself of cource. So the first thing to do was to search for software or a framework to create the site in. One of the most common pieces of software to create a site or blog is Wordpress. And being the opiniated developer that I am, I quite dislike Wordpress. Why? Well, creating a good site in Wordpress can be harder then you might think. Wordpress itself simply does not have the functionality you actually need to get most things done. So you need to install 3rd party plugins to get the functionality that you need or create your own. Since my coding is mostly done in Java and Wordpress is PHP I do not like to code my own and it would take too much time to get a site up and running. Plugins are not always of the same quality and using more and more plugins will make Wordpress slow so even a lot of simple / small sites needs things like a caching plugin or even a CDN to get a speedy website.

...

» Read more

Splitting a video in a grid of videos

Published at November 24, 2018 ·  5 min read

Recently we had a nice idea for the soft-launch of our new website for the company I work for. In a symbolic way we let almost everyone take part by using their phones to display a part of the video. In the end we had 49 phones in a 7x7 grid displaying a video with a countdown timer, showing the new website afterwards.

Pictures to video

The video was made with just still pictures, ffmpeg-concat and the commandline tool FFMPEG. The first thing was to create a video of X seconds per picture we wanted to show. In our case we had a “under construction” page showing for several minutes with some effects in between. After that a countdown with numbers from 5 to 1, and finally a still of the new website.

...

» Read more