Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 8:45 am on July 28, 2014 Permalink | Reply

    Categories: Podcast, Themes, WordPress ( 45 )

    How to use the TwentyThirteen Theme by Automattic 

    In this screencast I’ll show you how to use TwentyThirteen, a simple yet powerful WordPress theme that looks gorgeous and is mobile friendly. I’ll explain Post Formats and their impact, how to show images in galleries and how to embed videos to your WordPress site too.

    I’ll finish it off by demonstrating how the site looks like on a desktop browser as well as the iOS Simulator on iPad and iPhone. I’m using WordPress 3.9 for this demo.

    I’m referencing some related articles in this video – here they are:

  • Jay Versluis 5:59 pm on July 25, 2014 Permalink | Reply
    Tags: Firefox,   

    Categories: How To ( 24 )

    How to clear your Browser Cache 

    Apple SafariWeb Browsers like to save websites that you’ve visited earlier to speed up how quickly they can be displayed.

    Everything that should be downloaded from the web is saved as local files (up to a point), and if a browser sees that you’re visiting site again that you’ve just been to, he serves the saved files rather than request them from the web again.

    You can clear this cache and force the browser to load the results from the web. Eventually the cache clears itself, but it depends on “when the browser feels like it”.


    If you’re using Safari, you can clear the cache by heading to Safari – Reset Safari. Tick “reset all website data” is usually enough, but you can clear several other things while you’re there too (like the history).

    Screen Shot 2014-07-25 at 17.33.20


    On Firefox this option is option is rather hidden under Firefox – Preferences – Advanced – Network, and under Cached Web Content there’s a button “clear now”. It’s always good to have a second browser installed just so you can check up on the other one (and trust neither).

    Screen Shot 2014-07-25 at 17.33.20

    Alternatively, hold down CMD on Mac (or CTRL on Windows) and reload a page – this sometimes works on a “per page” basis, especially if you don’t trust what you’re seeing.

    iOS also has this option under Settings – Safari – Clear History and Website Data.

    Just something to keep in mind when you’re seeing unexpected results.

    Thanks to Jerry and his new book for this article – I just explained this to him in an email and thought this would make an excellent blog post ;-)

  • Jay Versluis 9:01 am on July 25, 2014 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 13 )

    How to merge BASIC programmes on your Commodore C64, C128 and Plus/4 

    Commodore LogoYou can merge / combine / concatenate BASIC programmes on a Commodore computer. It’s often useful to develop shorter chunks of code and put them together for a larger app.

    Sadly there’s no built-in command that lets you do this, even though the C128 user guide hints that the CONCAT command can do this (if you’ve ever tried you know that this is not the case and only works for sequential data files).

    With a few peeks and pokes we can accomplish what we need. Here’s how:

    • after loading the fist programme, we’ll set the start of BASIC to the end of programme 1
    • then we’ll load the second programme
    • and finally return the start of BASIC to the first one

    We’re left with both programmes in memory – without any changes in line numbers. Depending on how you write the code a quick RENUMBER command may be necessary here. Even though you can run a programme when the line numbers are out of sequence, GOSUB and GOTO routines may not work as expected.

    The commands are slightly different for each machine.

    On the C64

    The start of BASIC is stored in 43/44, and ends just before the variables begin – which is stored in 45/46. Load your first programme, then type this:

    poke 44,n/256
    poke 43,n-256*peek(46)

    Load the second part, then reset the BASIC pointers to where the first part resides:

    poke 43,1
    poke 44,8

    On the Plus/4

    The Plus/4 works almost identical to the C64 in regards to storing the BASIC pointers, however the start of BASIC is at a different address. Load your first programme, then type this (just like on the C64):

    poke 44,n/256
    poke 43,n-256*peek(46)

    Load the second part, then reset the BASIC pointers:

    poke 43,1
    poke 44,16

    On the C128

    The C128 stores variables in a different memory bank. Therefore it has a dedicated pointer to the end of BASIC which is missing on the other computers. The memory map is slightly different, and the start of BASIC is stored in 45/46. Load your first programme, then type this:

    poke 46,n/256
    poke 45,n-256*peek(46)

    Load the second part, then reset the BASIC pointers:

    poke 45,1
    poke 46,28

    And there you have it! Run any of these routines right after a reset or restart.

    Thanks to Rick Kephart for this tip. You may also be interested in another (more complex) solution to this puzzle by Jim Butterfield in which he reads each byte and merges them back on disk.

  • Jay Versluis 9:28 am on July 21, 2014 Permalink | Reply  
    Categories: iOS, Podcast ( 218 )

    Creating In-App Purchases in iOS 7 

    In this 7-part series I’ll show you how to create an In-App Purchase in iOS 7 with Xcode 5.1. The course will run you through everything from setting up your product in iTunes Connect, creating a custom shop class for easy re-use, making “first contact” with the App Store and how to deal with its responses.

    These are Parts 1+2 which are free to watch. You can see the rest of the course here:

  • Jay Versluis 9:20 pm on July 16, 2014 Permalink | Reply

    Categories: Commodore ( 13 )

    How to listen to your Commodore Datasette 

    datasetteDid you know that there’s a way to “listen” to a Datasette Drive, even though it’s not meant to play back the latest top twenty mixtapes?

    I’ve recently acquired a Commodore Plus/4 with 1531 Datasette. I remember having one of those in the eighties (with an adaptor to connect it to my C64 back then).

    The datasette is misbehaving, allegedly saving programmes but never loading them back in. Power is working fine, but as I no longer have a “cassette player” as such, I have no idea if it’s actually recording anything on the tape, or hearing what’s on it.

    I needed a way to playback the tape when I found this super short and very useful machine code snippet:

    0600 LDA $01 
    0602 ADC #$38 
    0604 STA $FF11 
    0607 STA $FF19 
    060A JMP $0600 

    When started with SYS 1536 the outer border of the Plus/4 will change according to what’s coming from the tape when you press play, and audio is quasi-modulated to the speaker output. It sounds rather distorted, but nevertheless you can hear what’s on the tape!

    To enter the programme, first type MONITOR which will take your out of BASIC and into the machine language monitor. Then type A 0600 followed by the first command (LDA $01). Now TEDMON will give you the next hex address, so just type the next command.

    When you’re done hit return, then type X (and return) to exit to BASIC. Here you can start the programme with SYS 1536, then PRESS PLAY ON TAPE. Enjoy!

    Note that this will not work on the C64, but you can hunt around for several “tape alignment” programmes which will work with similar principles – but I couldn’t find one for the Plus/4.

    Thanks for Marton for the code:

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

    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, Podcast ( 218 )

    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 ( 13 )

    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, Podcast ( 218 )

    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 ( 13 )

    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.

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