Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 7:49 pm on September 2, 2014 Permalink | Reply

    Categories: Commodore ( 18 )

    Commodore Plus/4 Screen Memory Map (Display RAM) 


    The Commodore Plus/4 – like his other brothers – has memory areas in which screen characters and colour values are stored independently from each other. Because it uses the TED chip these memory addresses are different from the C64 and C128.

    Each character from the top left corner to the bottom right corner occupies one byte of memory, 40 columns across in 25 rows.

    Screen Memory

    • starts at 3072 (decimal) or $0C00 (hex)
    • ends at 4071 (decimal) or $0FE7 (hex)

    You can POKE screen display codes into each position using this formula:

    POKE 3072 + X + 40 * Y, Z
    // where 
    // X = current column
    // Y = current row
    // Z = screen display code
    // write the letter X into the top left corner of the screen
    POKE 3072, 24

    Note that there’s a difference between screen display codes (A = 1, B = 2…) and ASCII/PETSCII codes (A = 65, B = 66…). The latter are used when printing single charters via CHR$ or returning their values via ASC.


    Colour Memory

    • starts at 2048 (decimal) or $0800 (hex)
    • ends at 3047 (decimal) or $0BE7 (hex)

    You can POKE colour values into each cursor position using the following formula:

    POKE 2048 + X + 40 * Y, C + L * 16
    // where 
    // X = current column
    // Y = current row
    // C = colour value (0 to 15)
    // L = luminance value (0 to 7)
    // turn the character in the top left corner of the screen light red
    POKE 2048, 2 + 7 * 16
    // or
    POKE 2048, 114

    Luminance is a TED feature. It was an attempt to increase the colour palette which still only consisted of 16 colours (like on the C64) by adding brightness to each value. When compared to the “pure” 16 colours of its brothers, the Plus/4 palette looks a little weird (for example, the standard BASIC background is white according to its colour value, even though it appears to be some shade of “dirty grey”).

    You can add 128 to each value to make the character flash at the same frequency as the cursor.

    Contrary to the Plus/4 user guide, the colour values are as follows:

    0 black
    1 white
    2 red
    3 cyan
    4 purple
    5 green
    6 blue
    7 yellow
    8 orange
    9 brown
    10 yellow-green
    11 pink
    12 blue green
    13 light blue
    14 dark blue
    15 light green


  • Jay Versluis 4:27 pm on September 1, 2014 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 18 )

    The evolution of Flow Control in Commodore BASIC 

    Commodore-Logo-PaddedWhen I had a C64 back in the days, the only IF/THEN statement we could create in BASIC v2 was just that: IF and THEN.

    There was no ELSE, and everything had to be on a single line. It was the only flow control we had back in those days, and it was a severe limitation compared to what we can do with higher level languages today.

    Here’s an example:

    10 input x
    20 if x=1 then print"x is one" : goto 100

    Such constructs weren’t very convenient when you wanted to react to anything other than the tested value. Instead you had to write an IF statement for every possible other outcome which could make the code very cluttered with several GOTO statements.

    When the Plus/4 came out Commodore added the ELSE statement. It still had to be on the same line as the IF and THEN, but at least we had ELSE as an option:

    10 input x
    20 if x=1 then print "x is one" : else print "x is not one"

    ELSE needs to be on the same line as the IF/THEN statement and separated by a colon.

    ELSE was a very handy addition to the BASIC arsenal, but it still didn’t solve the problem that your evaluation had to be cramped into a single line. This was improved on the C128 with the introduction of BEGIN/BEND.

    BEGIN and BEND allowed you to execute as many lines of code as you wanted between those statements when a condition was true (or false). Used together with IF, THEN and ELSE it was a very useful thing to have:

    10 input x
    20 if x=1 then begin
    30 print "x is one"
    40 print "which is like totally awesome"
    50 rem more code here
    60 bend : else begin
    70 print "x was obviously not one"
    80 print "which is a shame"
    90 print "but that's life"
    100 bend

    BEGIN means that everything starting from now until BEND is met will be executed as part of the IF/THEN statement – as many lines of code you like.

    When BEND is met the code continues as normal – but we can also use ELSE after a colon on the same line, indicating that this is still part of the first IF/THEN statement. Here we can use BEGIN again for as many lines as we like, until we finish with BEND again.

    It was very very cool!


    sys 32800,123,45,6 to show these credits (thanks, team!)

  • Jay Versluis 3:54 pm on September 1, 2014 Permalink | Reply

    Categories: Commodore ( 18 )

    How to map your Commodore Keyboard in VICE 2.4 

    Commodore-Logo-PaddedVICE on the Mac isn’t without it’s vices (har har) – and one of them is the way the keyboard is mapped.

    There are two approaches to choose from: positional and symbolic. Positional means that the Commodore keyboard is mapped into the physical positions of your “contemporary” keyboard. So no matter what language keyboard you are typing on, the key next to the L will be a colon, the key next to that will be a semicolon, and so forth.

    Symbolic attempts to map your current keyboard’s characters to the ones you expect to appear on screen. Both approaches are of course approximations and you may need to tweak either layout to get the desired results.

    You can switch which between the positional and symbolic approach under Settings – Keyboard:

    Screen Shot 2014-09-01 at 15.25.56

    Creating your own layout

    You can also create your own keyboard layout by dumping the current keyset into a file (.vkm) and then selecting this file in either symbolic or positional. When you do, and every time you make a change to this file you need to reset VICE for the changes to take effect.

    If you examine the file you’ll see a list of seemingly random numbers that don’t make sense at first. The top part of the file is made of comments (starting with #) and attempt to explain what’s happening here. I must admit it didn’t help me much.

    The second part of the file shows you a bunch of numbers like these:

    0 1 2 8   # R
    1 1 5 8   # P
    2 2 2 8   # D
    3 2 5 8   # F
    4 3 5 8   # H
    5 3 2 8   # G
    6 1 4 8   # Z
    7 2 7 8   # X
    8 2 4 8   # C
    9 3 7 8   # V

    I’ve added the comments, so you may only have four numbers per row. Here’s what they mean:

    • the first number is the actual key on the Commodore keyboard
    • the second number is the COLUMN of the Commodore Keyboard Matrix
    • the third number is the ROW on the Commodore Keyboard Matrix
    • the fourth number is still a total mystery to me

    This mysterious Commodore Keyboard Matrix I was referring to can be found at Joe Forster’s page: (thanks, Joe!)

    In case the above link ever goes down, here’s a screenshot I’ve taken as a reference:

    Screen Shot 2014-09-01 at 15.34.50

    Both columns and rows start at zero, so if you’f like to change what is printed when you hit key number 5, change the two following numbers to the key you’d like to see.

    For example, on my VICE Plus/4 emulator the backspace/delete key wasn’t working. Turns out it wasn’t mapped in either file. Looking at both the C64 and C128 keyboard mapping files I found that the key in question is number 51. I’d like the INST/DELETE key to be printed when I press my backspace/delete key, so I’ve added the following line to my custom file:

    51 0 0 8   # Insert/Delete

    After saving, selecting and resetting the virtual machine, I was able to use the delete key as I hoped. Result!

    Note that the Mac mappings aren’t as good as the Windows ones. For example, the C128 Mac mapping always defaults to the positional layout, even when you select symbolic. It’s a bug and I’m sure it’ll be fixed at some point. International keyboards are another issue (I’m using a UK keyboard which makes things even more awkward).

    But with the aforementioned tweaks it’s easy to personalise every VICE emulator just the way you like it.

  • Jay Versluis 8:41 am on September 1, 2014 Permalink | Reply  
    Categories: Plesk, Screencasts, WordPress ( 36 )

    How to use the WordPress Toolkit in Plesk 12 

    In this screencast I’ll show you how to use the WordPress Toolkit in Plesk 12.

    I’ll demonstrate how to update WordPress Core, Plugins and Themes selectively and across the entire server directly from within Plesk.

    Among many other features I’ll also show you how to secure WordPress instances, install and remove themes, and how to exclude WordPress instances from mass management.


  • Jay Versluis 1:42 pm on August 30, 2014 Permalink | Reply
    Tags: , , , sd2iec   

    Categories: Commodore ( 18 )

    How to use SD2IEC: a quick command reference 

    Photo 28-08-2014 19 30 57
    I’ve ordered an SD2IEC a few weeks ago from Nic over at It’s an SD card reader for Commodre computers and emulates many features of the 1541 Floppy Disk Drive.

    I went for the Limited Edition made from authentic recycled C64 plastic – so this little critter used to be a real C64! This has to be one of the coolest gadgets for any Commodore fan in the 21st century.

    Nic and several other sellers on eBay build the hardware, while the software was developed by Ingo Korb with contributions from others. In this article I’ll explain how you can get the most out of the SD2IEC.

    Reading and Writing Files

    The SD2IEC works out of the box with standard disk commands (such as LOAD and SAVE). This will save a BASIC programme as PRG just like your Commodore would save it to floppy disk.

    You can create, switch into and remove directories on the SD card with your SD2IEC (or your “contemporary” computer of course). You can also read from and write to D64/D71/D81 image files and I’ll explain how this works further down.

    When you’re in a subdirectory (or a disk image) all read/write operations are performed there until you switch images or directories. We can do this by communicating with the SD2IEC via the command channel, as if we’re speaking to a 1541.

    Looks like the SD card is hot-swappable without the need to “safe-eject” as long as none of the lights are on, indicating read/write access.

    Speaking to your SD2IEC

    To issue commands on your SD2IEC we must open that trusty old command channel on the device (number 15), PRINT# the command and then optionally close the channel again. Here’s how to do that:

    OPEN 15,8,15
    PRINT#15,”your command here”
    CLOSE 15

    You can also write this on a single line:

    OPEN 15,8,15,”your command”:CLOSE 15

    You can also leave channel 15 open and issue more commands. Notice though that if you use any other disk command after opening channel 15 (such as LOAD or SAVE) all channels including 15 are closed automatically. Commands such as DIRECTORY do not close the channel.

    I find it helpful to add these things to one my my programmable keys (C128 and Plus/4) via the KEY command:

    // open command with trailing quotes
    KEY 1,"OPEN 15,8,15,"+CHR$(34)

    Hit F1, then type one of the commands below. If the channel is already open, simply issue the command via PRINT#15,”command”.


    The CD command lets you navigate the directory structure much like you would in Linux and Windows from the command line.

    // change into the root directory
    // enter directory “mydir” (relative to where you are)
    // enter directory “mydir” (absolute from root directory)
    // navigate up one level (like the Linux cd .. command)

    You can also create directories to start organised without the need for other tools. That’s where the MD command comes in handy:

    // create directory in the current location
    // create directory inside another directory
    // create a directory absolute to root

    When you’re done with a directory you can delete it with RD. Note that only empty directories can be deleted, otherwise you’ll get a FILE EXISTS error:

    // remove in current directory
    // remove directory absolute to root

    Mounting Disk Images

    The CD command can also be used to mount D64/D71/D81 image files, just as if they were standard directories. The same syntax applies as with switching directories:

    // mount “myimage.d64” in current directory
    // mount “myimage.d64” in subdirectory /mydir (relative)
    // or absolute
    // unmount a disk image (go back SD card directory in which the image resides)

    You don’t have to mount disk images of course and can instead use a FAT or FAT32 formatted SD card just like it was a floppy disk. However, CBM DOS can only address a maximum of 144 files in a directory which means that a cheap 4GB SD card will be exhausted by this limitation before it’s anywhere near full.

    Changing the Device Address

    By default the SD2IEC is set to be drive number 8. But like its vintage counterpart you can change this to 9,10 or 11 using the following command:

    // change from drive 8 to drive 9
    OPEN 15,8,15
    CLOSE 15

    Replace the CHR$ value with the desired drive number. Just like a real 1541 drive, the SD2IEC will not remember this change upon reset. You can however save the above to its internal EEPROM which will survive subsequent reboots:

    // save drive number to EEPROM
    OPEN 15,9,15
    CLOSE 15

    Replace 9 with your actual drive number.


    If you encounter flashing lights on your device, then the SD2IEC is trying to tell you something. On the C128 and Plus/4 you can read out the disk error channel by looking at the DS$ system variable:

    // print disk error channel on C128 and Plus/4

    This will show you what went wrong (FILE EXISTS, FILE NOT FOUND, etc). On the C64 this is a little harder and requires you to write a small programme to read those values out. This is necessary because the INPUT# command can not be used in direct mode:

    // read disk error channel on C64
    10 open 15,8,15
    20 input#15,a,b$,c,d
    30 print a;b$,c,d
    40 close 15

    There’s a lot more you can do with this device – check out the full documentation in the README file at Ingo Korb’s website:

  • Jay Versluis 12:52 pm on August 26, 2014 Permalink | Reply

    Categories: Linux ( 46 )

    What is the End-of-Life (EOL) for CentOS Distributions 

    The End-of-Life (EOL) for CentOS Distributions is as follows:

    Screen Shot 2014-08-26 at 12.46.37

    More under Section 21 in this article:

  • Jay Versluis 8:13 am on August 25, 2014 Permalink | Reply  
    Categories: Plesk, Screencasts ( 36 )

    Managing Email Accounts in Plesk 12 

    In this screencast I’ll explain how to setup Email Accounts in Plesk 12. I will show you how to setup mailboxes, use forwarding and create aliases. I’ll also show you the Spam Filter and Auto Responder.

    This all happens in Plesk, there’s another video which will show you how to check email from an external client and via webmail.

  • Jay Versluis 6:07 pm on August 23, 2014 Permalink | Reply
    Tags: , Yosemite   

    Categories: How To ( 25 )

    How to enable automatic user logins on Mac OS X Yosemite 

    Screen Shot 2014-08-23 at 17.49.01By default Yosemite doesn’t like users to auto-login when the system starts. Instead you have to select a user, type in the password, and then the system starts to boot. Not necessarily what we want.

    To disable this feature you usually head over to

    • System Preferences
    • Users and Groups
    • Login Options

    and pick your default user from that handy drop down menu. Notice however that this is greyed out on Yosemite:

    Screen Shot 2014-08-23 at 17.47.59

    So what gives?

    Turns out that this option is not available if you’ve agreed to encrypt your disk via FileVault. And it makes sense too: otherwise your hard disk data could be accessed upon boot without a password, rendering this feature useless.

    Hence, to bring back automatic logins, turn off FileVault under

    • System Preferences
    • Security and Privacy
    • FileVault

    Screen Shot 2014-08-23 at 17.56.24

    According to this system, I can do that in about 32 days…

    Notice that if you use your iCloud password as the login password, auto-logins are also disabled. In which case, change your login password to a “separate password”, switch off FileVault and voila – auto logins are back at your disposal.

    Screen Shot 2014-08-23 at 18.02.06

  • Jay Versluis 7:01 am on August 18, 2014 Permalink | Reply
    Tags: Health Monitor   

    Categories: Plesk, Screencasts ( 36 )

    How to adjust Health Monitor Alarms in Plesk 

    In this screencast I’ll show you how to adjust the Health Monitor thresholds. Those are the ones that tell Health Monitor when to send an email and when to display a “Needs Attention” or “Problem” message.

    Health Monitor works with XML configuration files which can easily be changed to suit your needs.

    In this example, one of my servers has seen an increase in Apache CPU usage and has been bombarding me with emails because the “Problem” threshold is set to trigger at 25%. After investigating the issue I’ve increased this value to 95% and now I can sleep a little easier.

  • Jay Versluis 7:32 am on August 11, 2014 Permalink | Reply

    Categories: Plesk, Screencasts ( 36 )

    How to upgrade from Plesk 11.5 to Plesk 12 on CentOS 

    In this screencast I’m showing you how to upgrade from an older version to Plesk 12. Specifically, I’m showing this with a Plesk 11.5 installation, but the principles still apply from Plesk 10.x onwards.

    Plesk 12 comes in four flavours, and depending on the previous license you’ve held you’ll be upgraded to one of the new types – check them out here:

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc