Recent Updates Page 2 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 10:31 am on May 10, 2018 Permalink | Reply
    Tags: ,   

    Categories: Commodore ( 41 )   

    How to enter C64 Mode on a Commodore 128 

    The Commodore 128 was marketed as being “three computers in one”. I guess technically they were correct when they made that statement. Although I’m very find of the native 128 mode, the system saw its uses mostly as a games machines in C64 mode. I don’t recall anybody ever looking at CP/M mode longer than half an hour (if that).

    There are three ways to put the C128 into C64 mode. Two of which I always knew about, ever since my friend Frank Jagow bought himself a whole C128 system from his paper route money in 1986. But the third option’ve only recently learnt about – after over 30 years of being a C128 fanboy. How exciting!

    Here are all three options. (More …)

     
  • Jay Versluis 9:40 am on May 9, 2018 Permalink | Reply  
    Categories: Commodore ( 41 ), Screencast ( 87 )   

    Discovered: Commodore 64C used in an auto repair shop (2018) 

    I’ve recently discovered a tweet that showed a Commodore 64C complete with green monitor and 1541-II drive, heavily dust covered, but still working and being used in a Polish Auto Shop. The picture itself was fascinating enough, but I’ve also discovered that it was a screen grab from a video – which I’m including here as well (had to replace the music with something royalty free).

    You can find the original article here: https://www.trojmiasto.pl/wiadomosci/Warszatat-samochodowy-zaslynal-dzieki-26-letniemu-komputerowi-Commodore-n106004.html

    The tweet I found is here: https://twitter.com/HistoryToLearn/status/928821265783250945

    Enjoy!!

     
  • Jay Versluis 9:35 am on May 8, 2018 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 41 ), Screencast ( 87 )   

    How to write a text input routine in Commodore BASIC 

    In this screencast I’ll show you how to write your own INPUT routine in Commodore BASIC. This comes in handy when you want to reject certain keys from being used when asking users for keyboard input. In my example I’m going to allow all alpha characters (A-Z), as well as SPACE, RETURN and the DELETE key.

    Here’s the code:

     
  • Jay Versluis 9:28 am on May 6, 2018 Permalink | Reply
    Tags: , GitHub   

    Categories: How To ( 33 ), Screencast ( 87 )   

    How to embed images in GitHub Readme Files 

    In this screencast I’ll show you how to add images to your GitHub Readme files. You can use the Markdown or HTML syntax for this, I’ll show you both versions. Make sure to upload images to your own repository and provide the relative path to them.

    Here’s the syntax:

    In Markdown

    In Markdown syntax, use the following example to embed an image:

    ![](path/to/image.png)

    In HTML

    GitHub also supported the HTML syntax, which uses the standard IMG tag. Pasting HTML code in a website is always a little tricky, but let me try:

    Should you have spaces in your file names, you can replace them with %20, just like in standard HTML (like “file%20name”).

    Now go and make those Readme.md files look handsome!

     
  • Jay Versluis 5:29 pm on May 4, 2018 Permalink | Reply  
    Categories: Plesk ( 75 )   

    How to remove the Promo Box in Plesk Service Provider View 

    A few years ago, when Plesk started supporting Extensions, I gave a talk together with Any Kugaevskiy from at Parallels Summit in New Orleans. My part was about how to get started with Plesk Extensions in general.

    As a demo project, I removed the big blue promo box in Plesk Service Provider View – and only last week I remember that I’ve never made that project public. It’s about time I thought, and quickly created a GitHub repo to share it with the world.

    But then I thought, I best make a video to show people how to use this thing – so here it is. In the above screencast I’ll show you how to install the extension in Plesk Onyx 17.2 and how it looks with and without it. You can download the Extension here:

    All you need is the ZIP file that’s part of the repo. Upload it to your Plesk Server (under Extensions – My Extensions), then enable it and enjoy an promo free home screen experience.

    If you want to try your hand at writing your own Plesk extension, have a look at my article from 2014 (as mentioned in the video):

    The presentation Andy and I gave at Parallels Summit that year can be found here:

    Enjoy!

     
  • Jay Versluis 10:25 am on May 3, 2018 Permalink | Reply  
    Categories: Plesk ( 75 )   

    How to unlock subscriptions in Plesk Onyx 

    When parameters for a subscription in Plesk have been modified, Plesk may lock them. This means that when a change is made to the service plan itself, locked subscriptions are not updated by default.

    To unlock subscriptions and re-integrate them into the service plan, head over to the subscription in question (from the Subscriptions list in Service Provider View), then on the right hand side find the widget that reads Account.

    At the bottom, there’s an “unlock and sync” option. Click that and the subscription will be unlocked and synced with the service plan it was once part of.

    Why are subscriptions locked in the first place?

    Good question! One example is this: imagine you had a specific version of PHP as the default on your service plan. Say PHP 7.2. But then, some subscriptions use content that’s not compatible with that version of PHP and instead require version 5.6. No trouble, you’ll just change it in that particular subscription and all is well.

    Until you decide that some other parameter needs to be changed on that service plan – say the amount of webspace or the number of databases. If you were to sync all subscriptions on that plan with the new default parameters, then the default version of PHP would also be synced and set to 7.2 – which would break the subscription’s content and make one of your customers unhappy.

    Locking a subscription means this subscription is “exempt” from syncing, which means all other subscriptions can get the new parameter, leaving you to deal with the locked subscription individually (and – more importantly – without breaking it).

     
  • Jay Versluis 3:44 pm on April 18, 2018 Permalink | Reply
    Tags: , ,   

    Categories: Commodore ( 41 )   

    Flashing Border Colors on the Commodore 128 in Machine Language 

    In this screencast I’ll show you how to create the iconic flashing borders on Commodore machines. Back in the day, when the system was loading, this was a nice way to indicate that the computer is busy doing something rather than being dead. I’ll show you the principle both in BASIC and in Machine Language on the C128. The VIC-II chip is the same on the C64 though, so this will also work on the Commodore 64.

    The same approach can be used on the Plus/4, however the addresses for the border and background colours are different (decimal 65305, or hex $FF19).

    The VIC-20 is another story, as the border and background colour are changed using the same address (decimal 36879, or hex $900F). This link may help though: http://www.sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?t=5905

    As always, enjoy 🙂

     
  • Jay Versluis 3:42 pm on April 17, 2018 Permalink | Reply
    Tags: , , ,   

    Categories: Commodore ( 41 )   

    Programmatic Loops in Commodore BASIC 

    In this screencast I’ll demonstrate how to use programmatic loops in Commodore BASIC.

    I’ll show you how to use the FOR/NEXT loop (available in all versions of Commodore BASIC), as well as the DO/WHILE loops (available on the Plus/4 and C128).

    Enjoy!

     
  • Jay Versluis 3:29 pm on April 16, 2018 Permalink | Reply
    Tags: , , ,   

    Categories: Commodore ( 41 )   

    Flow Control in Commodore BASIC 

    In this screencast I’ll explain the concept of Flow Control in Commodore BASIC. It’s kind of a video update of a post I did a while ago.

    In essence, it means that we can tell the programme to take a different route in the code depending on a condition that’s met. We’ll explore the IF/THEN and ON… GOTO/GOSUB statements (available on all versions of Commodore BASIC), as well as the expanded IF/THEN/ELSE version (available on the C128 and Plus/4 only).

    In addition, I’ll also show you how to use the BEGIN and BEND clauses that were introduced with the C128.

     
  • Jay Versluis 3:26 pm on April 16, 2018 Permalink | Reply
    Tags:   

    Categories: Commodore ( 41 ), Linux ( 99 ), Mac OS X ( 35 ), Screencast ( 87 )   

    How to run Commodore BASIC as a Scripting Language on macOS 

    Did you know you can run Commodore BASIC v2 on your Mac and Linux systems as a scripting language? It’s true – thanks to the marvellous efforts of Michael Steil and James Abbatiello. They’ve adapted the original BASIC v2 as featured on the VIC-20 and C64 with additional routines so that it works natively on modern machines. It’s ingenious!

    You can get the full source code on GitHub – it works a treat!

    For those who don’t quite know what to do with it, here are some instructions that’ll help you get CBM BASIC up and running on macOS.

    Download

    GitHub provides a convenient way to either clone a repository on your local machine if you have GitHub for Desktop installed, or you can download a ZIP file and unZIP it somewhere on your system. Once done, you should see a directory structure that looks exactly like the repo on GitHub.

    Compile

    You need a few utilities installed your your Mac to be able to compile files. Downloading Xcode will ptovide you with an excellent (and free) IDE as well as the command line tools needed to do that (gcc, make and several other goodies). You might be able to bring those components in using the Homebrew package manager.

    Using your Terminal app, navigate to your unZIPped folder. It includes a MAKEFILE so there’s no need to mess with any parameters. Enter “make” at the command prompt, and after a few moments you should have a file called “cbmbasic” without an extension in the same directory. That’s the binary for your Mac.

    To make it executable, we’ll have to tweak the file permissions – otherwise our operating system won’t be able to run it. We’ll do it using the chmod command:

    chmod +x ./cbmbasic

    You can test if it works by calling the binary without any parameters like this:

    ./cbmbasic

    If all goes well you should see something like this:

    For easy access, copy the binary over to your /usr/bin directory. That’s where common command line utilities are installed on Mac and Linux systems. The added benefit is that the path to that folder is already in your local $PATH variable, and as such you can simply type “cbmbasic” from any location when you’re on the command line.

    Here’s how to copy the binary over (this will ask for your administrator password):

    sudo cp ./cbmbasic /usr/bin

    Using Direct Mode

    When you run the binary it will bring up something like the standard BASIC command prompt we’re used to seeing on the Commodore 64. There are however a few important differences between a C64 emulator and this implementation:

    • this is NOT an emulator
    • cursor keys DO NOT work
    • all commands typed in must be CAPITALISED

    Other than that, you can start typing like on a real machine. Be careful with certain POKE commands though as those may call system routines that might not be implemented.

    LOAD and SAVE commands have been tweaked to reference the command line structure. They work just fine, but will load and save files in Commodore file format (which is not clear text ASCII – more on that later). For example:

    LOAD"$"
    
    LIST
    
    0 "/Users/versluis/Desktop/cbmbasic" 00 2A
    4    "."                PRG  
    2    ".."               PRG  
    2    ".git"             PRG  
    567  "cbmbasic"         PRG  
    7350 "cbmbasic.c"       PRG  
    593  "cbmbasic.o"       PRG  
    19   "cbmbasic.vcproj"  PRG  
    20   "console.c"        PRG  
    3    "console.h"        PRG  
    8    "console.o"        PRG  
    4    "glue.h"           PRG   
    1    "Makefile"         PRG  
    2    "Makefile.sun32"   PRG  
    3    "Makefile.win32"   PRG  
    27   "plugin.c"         PRG  
    
    ...
    
    READY.

    The above displays the directory of the current folder, much like it was an attached floppy drive. How cool is that? You can reference folders using both LOAD and SAVE just as if you were on the command line.

    You can also type in programmes and run them – however the cursor keys won’t work, so there’s no screen editing options. Programmes SAVEd from direct mode cannot be loaded from the command line, only from direct mode (i.e. when launching the binary without parameters).

    To quit direct mode, hit CTRL+C.

    Running Programmes from the Command Line

    The real power of this implementation can be seen when we run files from the command line. Those files must not be SAVEd from direct mode, but instead are simple clear text files. The extension doesn’t matter, but for good practice, let’s store them as .BAS files (much like shell scripts are stored with the.SH extension, or PHP files would be stored with the .PHP extension… you get the idea).

    You can write standard BASIC programmes use your favourite text editor (like vi from the command line), or try one from the “test” directory that’s provided with the repository.

    Imagine we had a file called “hello.bas” that we’ve created with vi, looking like this:

    10 PRINT "Hello World!"

    To run our file, we can simply define it behind the binary like this:

    cbmbasic hello.bas

    This will greet us with the “Hello World” message on the command line.

    Running Script Files

    Alternatively, we can specify the full path to cbmbasic at the beginning of a file (she-bang notation) and run it just like any other script file. Observe please:

    #!/usr/bin/cbmbasic
    10 PRINT “Hello World”
    20 PRINT “from CBM BASIC :-)”

    If the file was called “hello”, we’d need to change the permissions again so that the file can be executed:

    chmod +x ./hello

    Now we can run it like this:

     ./hello
    
    Hello World
    from CBM BASIC :-)

    Sweet – but I can’t work out how to compile this on macOS…

    Fear not – I’ve got a macOS binary that was compiled on 10.12 “Sierra”. You can find it in my fork of the project. Check out the “binaries” folder.

    Does it work on Windows? Or on Linux?

    I’ve tested compiling and running this puppy on CentOS 6 and 7 with roaring success. The above steps worked fine for it, so I’m assuming it’ll work on other Linux flavours just as well (the beauty of portable C code).

    According to the author, it works fine on Windows too – however I have no idea how to compile source code on Windows, so you’ll have to figure that out for yourself. I hear good things about Visual Studio  – if I work out how to do it, I’ll add it to the “binaries” folder on my GitHub Fork.

    Can I write my own extensions to BASIC?

    Apparently so – check our Michael’s site and repo for details:

    Right now, if you run SYS 1 from direct mode first, you can use the SYSTEM command (followed by anything you’d like to execute on the command line in “double quotes”) as well as LOCATE (followed by an x and y coordinate to place the text cursor) and WAIT.

    Have fun hacking BASIC and letting it run with the blistering speed of modern CPUs 🙂

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel