Recent Updates Page 2 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 8:09 pm on July 14, 2014 Permalink | Reply  
    Categories: Commodore ( 14 )

    How to use ZoomFloppy 

    Commodore LogoZoomFloppy is an ingenious contraption by Nate Lawson which lets you connect real Commodore disk drives via USB to modern computers. It allows you to read and write old floppy disks from drives like the 1541, 1571, 1581 and several others.

    ZoomFloppy itself is a board with a USB connector (which also acts as the link to the modern machine), and a Commodore serial type connector (the standard cable used to connect a 1541 to a C64 for example). An optional parallel cable can also be attached which allows to transfer data faster and from copy protected disks. Other ports are also available but their use is probably only known to the inventor himself.


    Using ZoomFloppy is kind of half documented, the other half has to be guessed – perhaps my notes on how I got this working may help others.

    The manual explains that the software to talk to ZoomFloppy can be obtained on the following link, together with a copy of the manual:

    The page contains links to an installer for Windows and Mac, as well as source files for Linux which have to be compiled from source (which did not work on CentOS). The Windows installer is very straightforward and installs the OpenCBM tools in c:/opencbm.

    A driver needs to be installed manually (i.e. plugin in ZoomFloppy, wait for Windows to complain, then navigate to the OpenCBM directory and let it search there for the driver). Once complete ZoomFloppy can be operated via the OpenCBM command line tools without further need to install anything:

    CBMXfer GUI (Windows)

    Those of us more comfortable (and spoilt by) graphic user interfaces will be pleased to hear that several GUIs have been written to take advantage of OpenCBM. CBMXfer by Steven Gray is such an endeavour. It’s only available on Windows and makes reading from and writing to a Commodore disk drive as easy as using the Windows Explorer.

    Once downloaded and extracted, copy all files into the OpenCBM directory from which you can run the app by the same title. It is important for CBMXfer to live in the same directory as OpenCBM as it will execute those very files.

    One thing no piece of documentation mentions is that to open disk images (d64 / d71 / d81 etc) you need to add another file to this directory which comes with neither OpenCBM nor CBMXfer. The file is called c1541 and is part of the VICE Emulator:

    This tool can read disk images and is necessary to display a directory contained in such an image. You can find this file in the tools directory in VICE.


    Using CBMXfer

    CBMXfer allows you to copy single PRG files back and forth from your computer to a floppy, as well as read/write an entire disk image.

    For single files, simply select it on the left (your PC), then click the arrow pointing right (your Commodore floppy disk drive) and the file will be written. Proceed from right to left to copy a file from disk to your hard drive. You can of course select multiple files too.

    To copy an entire disk image to hard disk, do not select a file (or use the unselect option), then click the green arrow going right. It will prompt you to type a name for your image. Likewise, to copy a disk image back to floppy, select the image, then click the left arrow.

    Note that writing to floppy disks requires a formatted disk (and enough space in the case of single files).

  • Jay Versluis 8:51 am on July 14, 2014 Permalink | Reply  
    Categories: iOS, Screencasts ( 219 )

    How to use a Popover on iPad 

    In this series I’ll show you how to create Popovers on iPad. They’re fairly easy to create once you get the hang of the inner workings of the UIPopoverController.

    I’ll show you how to create basic Popover in code and in your Storyboard, and we’ll discuss how you can retrieve data from a Popover when it’s dismissed. We’ll do this with a simple UIDatePicker. In the last video I’ll demonstrate how you can pick images from the camera roll using the UImagePickerController with a Popover – which is how you’re meant to do it on iPad.

    The series contains three videos in total. The first one is “free to air”, and the other two are for members only.

    You can watch the whole course here:

  • Jay Versluis 1:33 pm on July 8, 2014 Permalink | Reply
    Tags: ,   

    Categories: Commodore ( 14 )

    How to load and save binary data on the C128 and Plus/4 

    Commodore LogoThanks to BASIC 7.0′s powerful commands we can load and save arbitrary sections of memory to disk using BLOAD and BSAVE.

    This was useful for dealing with machine code as well as raw image data. Both commands work on the C128 and Plus/4, but sadly the C64 was lacking in this area.

    BLOAD and BSAVE work much like DLOAD and DSAVE with the addition that you can specify a section of memory – like this:

    // save contents of the 40 column display
    BSAVE "FILENAME", P1024 TO P2023
    // save the contents of hi-res graphics and colour separately
    BSAVE "IMAGE", P8192 TO P16181
    BSAVE "COLOURS", P7168 TO P8167
    // save graphics and colour information together
    BSAVE "FULL IMAGE", P7168 TO P16181

    BLOAD doesn’t need additional parameters and will load a file back into memory where it originally resided – just like the standard LOAD “FILE”,8,1 (with the 1 at the end). You can however provide the starting memory and make the file load somewhere else instead:

    // load file to a different place in memory
    BLOAD "FILENAME", P10000
  • Jay Versluis 6:18 am on July 7, 2014 Permalink | Reply
    Tags: iPad, UIStoryboard,   

    Categories: iOS, Screencasts ( 219 )

    How to change a UIStoryboard from iPhone to iPad in Xcode 5 

    In this screencast I’ll show you how to make an iPhone storyboard display as an iPad storyboard in Xcode 5.1′s Interface Builder. Under the hood a UIStoryboard is just an XML file, and with a small tweak we can make Xcode display it like an iPad or an iPhone. This is a good strategy if you’d like to use your iPhone storyboard as a starting point for an iPad version.

    You can read my full article on my iOS Dev Diary:

  • Jay Versluis 8:29 pm on July 6, 2014 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 14 )

    How to set the time on your Commodore C64 / C128 

    Commodore LogoDid you know that the Commodore computers had a built-in clock? It wasn’t an exact science, and it didn’t show the date, but it was able to display a 24hr clock.

    It did this by counting how many seconds your machine was switched on, accessible in two variables TI and TI$ (short for TIME).

    TI$ is a string value in the format HHMMss, counting seconds. 112347 would mean 11:23am and 47 seconds. TI$ will be 000000 when you switch on the system. You can set it just like any other variable to set the time:

    TI$ = "094500"

    TI counts the number of 60th seconds since the system was switched on (don’t ask):

    print int(ti/60);" seconds since startup"

    Both values reset when you reset the system. Like all internal computer clocks it is relatively accurate, but does drift a second or two per day (we don’t notice this on modern systems because those talk to an NTP server once every day and sync themselves).

    TI and TI$ are present on the C64, C128, Plus/4 and many other Commodore variants.

  • Jay Versluis 1:15 pm on July 3, 2014 Permalink | Reply  
    Categories: MySQL ( 15 )

    How to find and replace in MySQL 

    Sometimes you need to change some text in a MySQL table. For example, imagine you want to correct a spelling mistake or a reference in all your WordPress posts without having to change them one by one.

    Here’s how to do it with a raw SQL command. This works only on a single table – repeat this for each table:

    update `wp_posts`
    set `post_content` = replace(post_content, 'Old Text', 'New Text')

    Note the use of standard ticks and back ticks here. First we’ll select the table in question (in this case wp_posts), then we’ll issue the find and replace query by selecting the column in the table (post_content), followed by the replace command.

    As soon as MySQL comes back all references will have changed from “Old Text” to “New Text”.

    Careful here: there is no undo function! Once executed, all changes are live instantly. Make a backup copy of your database before you do anything!

  • Jay Versluis 1:05 pm on July 3, 2014 Permalink | Reply  
    Categories: WordPress ( 83 )

    How to avoid 500 Internal Server Errors when using the WordPress Importer 

    wordpress-iconI’ve used the WordPress Importer on many occasions – most of which gave me more grief than results. Usually I end up with a white screen telling me that there was an “Internal Server Error”. It basically means that something went wrong, but nobody knows what it was – and there is no way to find out.

    While entertaining ideas of finding another hobby, I searched the web one last time to sift through the hundreds of posts by other users sharing the same woes – until I came across this forum post by Anon who had the same problem:

    Anon did not give up so easily and found a solution which WORKS GREAT – even though it doesn’t make sense, or is in any way documented:

    Rather than simply importing the XML file you receive from Tools – Export, turn this file into a GZIP file, and then import it.

    I have no idea why this works, but I’ve just tried it with WordPress 3.9.1 and it works like a charm. On a Mac, simply

    • open Terminal
    • type “gzip ” (with a space)
    • then drag the file in question into the Terminal session
    • this will paste the full path of that file

    Hit return and you have a .gz file. The original file is deleted automatically.

    You can also do this from the command line like this:

    gzip yourfile.xml

    Anon suggests that if you’re a Windows user you can use 7zip to create a .gz file.

  • Jay Versluis 12:53 pm on June 30, 2014 Permalink | Reply

    Categories: WordPress ( 83 )

    How to swap the post title and date in P2 

    wordpress-iconI’ve just posted this tweak in the WordPress P2 forum to help a user and thought I’d add it here too before I forget what I did.

    To swap the post title and date in P2 we’ll first grab a reference to each element, then we move one up and the other down.

    Like so:

    /* swap post title and date */
    #main h4 {
      margin-top: 30px;
      margin-bottom: 15px;
    #main .postcontent h2 {
      margin-top: -65px;

    Note that the date line does not have a selector for the author, so it’s difficult to remove it if that’s required. You can remove the entire line though (#main h4).

    Add padding where appropriate.

  • Jay Versluis 6:16 am on June 30, 2014 Permalink | Reply
    Tags: ,   

    Categories: iOS, Screencasts ( 219 )

    How to use iCloud in your iOS App 

    In this series I’ll show you how to use iCloud in your iOS apps. We’ll discuss how to setup Xcode and your app, including App ID and Provisioning Profiles and I’ll demonstrate how to use all three flavours of iCloud: Key Value Storage, Document Storage and iCloud with Core Data.

    The rest of this series is for members of my iOS Dev Diary only – you can watch it here:


  • Jay Versluis 7:12 am on June 28, 2014 Permalink | Reply
    Tags: , ,   

    Categories: Linux ( 45 )

    How to enable Touchpad Taps as Mouse Clicks on your NC10 in CentOS 

    CentOS-LogoThe NC10′s integrated Synaptics Touch Pad works out of the box in CentOS 6, both under GNOME and KDE. No drivers or patches requried.

    But I remember that when it was running Windows XP I could “tap” the pad instead of clicking the dedicated key (that loud CLACK noise annoys the neighbours). How can we bring this behaviour to CentOS?

    A quick serach reveals this post by Russel in the CentOS forum:

    his suggests that a configuration file needs to be created somewhere. However I found that there’s an easier solution which – at least on the NC10 – works with just one click. I assume this will work for other latops too:

    • head over to System – Preferences – Mouse
    • select the Toucpad tab at the top
    • tick the box “enable mouse clicks with touchpad”
    • works instantly


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