Author Archive

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 4   Leave a comment

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 4

The_Machine_Language_Book_for_the_Commodore_64

We’re still examining this book 

 

Now it‘s time to get on with actually doing something based on the knowledge in this book. There‘s also a follow up to this book, called “The Advanced Machine Language Book of The Commodore 64“, which continues in the same vein.

 

I‘m going to try and attempt to explain and demonstrate the very daunting tasks of drawing lines (the whole basis of graphics) and playing polyphonic music on the C64, which is child‘s play on other contempory computers, such as the Sinclair ZX Spectrum (drawing lines, but only playing monophonic music), Atari 8 bit, BBC Micro, Acorn Electron (one channel sound only), and MSX computers.

 

Readers are actually supposed to carry out these exercises for themselves instead of just sitting back, reading these articles, and looking at any accompanying pics and videos. To do this you‘ll need to either install an emulator such as VICE, or C64 Forever, or have a Commodore 128, or even a C64 at the ready.

 

How to install VICE

I think that VICE and C64 Forever are the worst (or best, depending on your opinion) C64 emulators out there, so here are the links.

http://vice-emu.sourceforge.net/

https://www.c64forever.com/

It‘s important to remember that the C64 graphics screens are bitmapped into character cells. This seems to make things more difficult when plotting lines, because you have to keep track of when your line passes a character cell boundary, entering a new section of RAM. This is just one way Commodore/Jack Tramiel made things more difficult.

We‘ll need to decide which 6502 opcodes to use in our line drawing programs. It‘s fairly obvious that they‘ll include LDA #number, LDA address, and STA address, as well as loops including the use of LDX #number, and LDA address,X but not clear what else. You should refer back to the previous posts on programming horizontally scrolling text on https://commodore64crap.wordpress.com/2013/10/29/the-commodore-128-the-fixed-and-upgraded-commodore-64-part-2/

 

There‘s also Bresenham‘s algorithm to consider. This was mentioned but never explained in some crappy C64 programming books I read, probably by Sunshine publications. It turns out that this was developed as long ago as 1962, on an amazingly advanced for the time IBM computer called the IBM 1401, connected to a Calcomp plotter. I don‘t know if the computer could display graphics on a screen, but it could plot them on the Calcomp plotter. Unfortunately, Bresenham‘s algorithm is a complicated algebraical formula. This means I can‘t understand it because I‘m useless at maths, so I‘ll have to design my own alrorithm, based on calculations as simple as possible, as well as tailor made for the C64 screen mapping where the graphics screens are divided into 40 x 25 character cells.

 

I think the C64 graphics screen can be located at any one of FOUR locations in Assembly Language, so I think first of all I need to decide where to locate it. After this, I must choose a pixel where I want the line to start. This start point shouldn‘t be at the top left pixel of a character cell, otherwise a line could be simulated just by printing backslash characters to the screen. Perhaps I could find out whereabouts this point is on the screen, meaning in which character cell by dividing it, but I don‘t think there are any 6502 Assembly Language instructions which do division. This was mentioned once by TMR of the rival blog https://c64crapdebunk.wordpress.com . All there seems to be are the instructions LSR meaning Logical Shift Right, and ROR, meaning Rotate Right, which are both ways of dividing by 2 each time they‘re carried out. This means an easier way of doing it is for me to choose whereabouts in a character cell I start. This could be 4 pixels across the 8 pixel wide cell. This means that after plotting 5 pixels, the line would definitely enter another character cell. As each row of pixels is a bit pattern, this means transferring the sequence of bytes $10, $08, $04, $02, and $01 into the relevant bytes of screen RAM. Following this, the sequence $80, $40, $20, $10, $08, $04, $02, and $01 would be placed into the next character cell, wherever that was. It could be the cell to the right, or diagonally right and down.

 

Don‘t forget that Commodore‘s own manuals were crap! It took lots of third parties, often from Germany, like the author of this book, to unveil the secrets of the C64!

 

As for my other learning activities, I‘ve been studying Japanese, as well as programming in Python. I have completed 75% of the Michel Thomas Method Japanese Foundation Course, so this proves that learning to speak Japanese is far easier than learning to program the Commodore 64.

 

That‘s all for now! Look out for another post in this blog very soon, about a different subject. This series of articles about “The Machine Language Book of the Commodore 64“ will continue ASAP though.

Advertisements

Posted August 25, 2017 by C64hater in Uncategorized

WHERE HAVE I BEEN?   Leave a comment

WHERE HAVE I BEEN?

Debunking “Learning by the book – part 3”

TheresaMayElection

Theresa May kept me busy part of the time

 

I thought I should post this as some kind of reply to the latest “C64 Crap Debunk” post by TMR on “C64 Crap Debunk” which you can find by clicking on https://c64crapdebunk.wordpress.com/2017/06/18/learning-by-the-book-part-3/

 

TMR starts off by wondering where I’ve been since February, in the light of “important events” since then. These were the triggering on March 29, 2017 of Article 50 of The Lisbon Treaty to start the suicidal process of the UK leaving the EU by British Prime Minister Theresa May, AND the snap British General Election of June 8, 2017, a process also started by Theresa May, although the final decision on whether or not to hold it had to be taken by Parliament.

 

This blog isn’t actually about current events, although I do sometimes mention them to make my posts more interesting. What I’ve been doing in connection with these events is as follows…

 

1. I’ve been going to meetings, demos, and a march to try and stop Brexit.

 

2. I was campaigning for one of the smaller parties which wants to stop Brexit by electing candidates, delivering leaflets for the local candidate, attending meetings, and going to the local count representing my party to sample votes which were being counted from certain Constituency Wards, meaning very small local districts. This means counting as many of the votes as possible while they’re being counted by the official counters. The purpose of this is to build a picture of which wards our support is strongest in. Before I started counting, I saw a TV exit poll predicting a hung parliament (i.e. no party getting a majority), so I was relieved that this meant a total isolationist permanent one party dictatorship was less likely. After sampling some votes, I mainly watched the actual results coming in on TV, but took the trouble to watch the local results being declared in the venue, and booed as loudly as possible at a re elected Labour MP who had actively supported the Leave campaign.

 

Since the election, I’ve been watching and reading lots of news, and trying to predict the date of the next General Election. It seems this will now be in about December or January, meaning about six months after the last election. It will probably be caused by defeats for the Conservative minority government, brought on by rebellions by some of its own MPs, and possibly a vote of no confidence. The result will be about the same as in June 2017, unless a Proportional Representation electoral system is introduced before the election. Some people refer to this as “the popular vote”, where for example if one party gets 30% of the votes, they get about 30% of the seats. More parties need to put up lots of candidates for this to make a big difference now. These parties may include Left Unity (who refused to stand against Labour in June 2017), The Women’s Equality Party (WEP), and The Pirate Party. A real possibility is also the formation of a new party with the main policy of staying in the EU, although I think they’d need some other policies as well.

 

Now back to the Commodore 64. Of course, not all dialects of BASIC apart from Commodore BASIC V2 supported hexadecimal numbers, but Locomotive BASIC on the Amstrad CPC range, as well as MSX BASIC did support them. Even Sinclair BASIC on the Sinclair ZX Spectrum supported binary numbers, but Commodore BASIC V2 and Atari BASIC only supported decimal.

 

I remember reading lots of Commodore BASIC V2 listings which assigned variables to the locations of the VIC-II and SID chips, then used two digit offsets for the different registers. In spite of this, the impression I got was that there were a lot more memory locations I needed to learn than all the registers of these chips. There was also the weird command sequences working on these registers using the commands AND as well as OR, without any explanation from Commodore about why this was. It was explained in a magazine article I found a few years ago as “bitwise programming”, meaning setting certain bits in the VIC-II and SID chip registers. Not only that, but it seemed to me that there was NO END to the number of locations to PEEK and POKE. I thought the total number of locations to PEEK and POKE may be as many as 65,535 or perhaps it might be 65,535 minus the number of locations occupied by BASIC, which had 38,911 bytes free, meaning a total of 26,624 locations left. There was no indication anywhere in the Commodore manuals how many memory locations I’d have to use, so faced with the nightmare scenario of having to deal with 65,535 or even 26,624 memory locations, I gave up.

 

Assembly Language makes things much easier, with techniques such as meaningful labels in a pre prepared text file standing for memory locations, as well as those locations in hexadecimal being more memorable, such as $D000 which I posted some time ago could stand for display block, meaning where the VIC-II chip starts.

 

As for books about Machine Code/Assembly Language which aren’t dedicated to a particular computer, before you can actually do anything with them on a specific computer, first off all you have to read up on your memory map to find the screen memory, a routine to print text on the screen, etc. Without this information, all you can do is carry out calculations and store them somewhere in the RAM, then examine the contents of those locations to see the results, which isn’t very interesting at all.

The artwork of the slum I grew up in was quite rough. It’s still early days of me using Multipaint, so I hope to do some better graphics in that package soon. Another program I’ve heard about is Swanky Paint, which is supposed to be based on the Amiga’s excellent Deluxe Paint, so I plan to try that.

C64Multisound

Multisound Synthesizer might have persuaded me to keep my C64, 

 

I’m now getting close to understanding the process of how other people managed to program the C64. In the near future, I hope to use Assembly Language to program lots of lines being drawn across the screen, then erased and replaced by some other lines, to produce simple animation, as well as to program a three channel polyphonic tune, without being dependent on specific software such as Synthy, or Multisound Synthesizer (my copy wouldn’t load and VicSoft failed to replace it, just sent a refund) and whatever restrictions they placed on how people could use the music they’d composed. That would be a proof of concept, then I may decide to stop writing this blog.

 

Other ideas of mine include a printed book based on this blog, as well as a graphic novel including my Dad with his “I know best” attitude (IKBA), the offices of “The A-Z of Personal Computers” with staff enjoying presents sent by Commodore in exchange for not mentioning that their BASIC was crap, etc. I may be setting up a crowd funder for these projects. There could even be separate crowd funders. One could be for people who want to see the book or graphic novel published, while the other could be for people who don’t want to see them published, such as the Tramiel family. Revenge is sweet!

LinuxWelt

“Linux Welt XXL” magazine, some previously forbidden knowledge from Germany

 

Some amazing news, is that I’ve recently gained access to some “forbidden knowledge” which the people who run newsagents in the UK don’t want me to know about. This lack of knowledge led a lot of people to vote to leave the EU. The forbidden knowledge is supplied by a service based in Sweden available on www.readly.com . I was very surprised to find about 305 Swedish magazines available, because I didn’t think Sweden with its population of just under ten million (plus another approximately 16.5 million people in other Scandinavian countries able to understand Swedish) could support that many magazines. What this means is that people in the UK now have access to the same current magazines and a few back issues as everyone else using this service anywhere else in the World. Countries covered include Germany, Sweden, and France, but not 100% of all magazines from anywhere seem to be available, based on the UK magazines on offer. It doesn’t include many magazines from France, but I found 586 magazines from Germany!! These include “Linux Welt” and “MagPi”. From “Linux Welt”, I’ve read that virus creators AND malware programmers are now targetting Linux, so it’s time to install some virus protection software and back up all my data. Apart from this, I read an article on the up and coming Linux distro Manjaro Linux which made me decide install it. A really important feature it has is that it’s not based on the Debian or Red Hat varieties of Linux, but on Arch Linux instead. This is important because Linux isn’t supposed to be controlled or dominated by any particular group. Unfortunately, in recent years Ubuntu and Mint, which are both Debian based, have been the most popular distros, as well as lots of other Debian or even Ubuntu based distros (e.g. Elementary OS, Zorin, Lite, Kali, KDE Neon, etc, etc) being released. What makes them Debian based is mainly that they use .deb package files and the apt or Aptitude package installer from the command line. The packages and the knowledge from using apt under one Debian based distro can be used with another. Arch Linux itself uses text based commands to install, which was the usual method at the turn of the Century, although distros such as the Red Hat based Mandrake soon started having graphic installers. Manjaro has a user friendly graphical installer. After that, you just have to learn a few different commands from the ones used in apt and be satisfied with a basic Synaptic like package installer called Octopi, without any equivalent to the Software Centre of Ubuntu or Software Manager of Mint. Not only that, but some more good news from the German “MagPi” is that the Raspberry Pi computer looks set to outsell the C64 in the near future, so then I’ll no longer have to listen to C64 fanatics crowing that their crappy computer was the largest selling “home computer” or whatever the term is. Meanwhile, in the latest (August 2017) issue of Linux Format (UK) there’s an article about how to make a custom distro based on Arch Linux. This may sound daunting, but after having read it, I can assure you it’s easier than trying to program the C64!

 

So that’s what I’ve been doing. In the near future I hope to get down to the depths of the C64 and explain to you how some people managed to program it! Look forward to that.

Posted July 25, 2017 by C64hater in Uncategorized

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 3   Leave a comment

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 3

The_Machine_Language_Book_for_the_Commodore_64

The actual book cover

We’re now really getting down to understanding how the Commodore 64 works and how some people managed to program it, in spite of its totally crappy built in Commodore BASIC V2 language, which had no dedicated commands for colour, graphics, or sound, and didn’t support the Hexadecimal numbering system either, as well as Commodore’s crappy manuals totally leading people off track by telling them to PEEK and POKE to 5 digit decimal memory locations, instead of having the locations stored in files as hex labelled by EQU directives.

This year (2017) marks the 35th anniversary of the C64 being released. It also marks the 35th anniversary of me and my Mum running away from the home my Dad had turned into a slum with lots of unfinished DIY jobs and hoarding. Neither of these events is anything to celebrate, especially as my Mum and me ended up having to return to that slum after only about six months.

Some big news on this subject is that since my last post in this series, the companion disk image to this book has been made available on http://www.bombjack.org/commodore/books.htm , so you should be able to download that and run it on either a C64 emulator, or on a real C64 or C128 using an SD2IEC device. This means it should be possible to use the programs in the book with the exact syntax used, instead of having to convert them for use in another Assembler. In spite of this, readers should familiarise themselves with the syntax of other Assemblers, otherwise they’ll be stuck using the LEA Assembler.

Some more news, is that I’m going to list a few more 6502 Assembler directives, this time from yet another book about 6502 Assembly Language programming. This is called, surprisingly enough “6502 Assembly Language Programming”, was published by John Wiley & Sons Inc, and was written by THREE WOMEN! You can find it on ftp://ftp.apple.asimov.net/pub/apple_II/documentation/programming/6502assembly/6502%20Assembly%20Language%20Programming.pdf and elsewhere if you look round. Their names are Judi N Fernandez, Donna N Tabler, and Ruth Ashley. According to Amazon this book was published in 1983, before computers became really popular and there were a lot of women involved in programming computers before then. The book is about Assembly Language, but not on any specific computer. The Introduction/Preface mentions Commodore, Apple, and Atari computers as being 6502 based and that it applies to all those computers as well as to any other 6502 based computer, so it wouldn’t enable you to write any C64 demos. The Assembler Directives used in this book are called DS, ASC, DFB, ORG, and EQU. The labels used in programs in this book are all in upper case text without any characters to indicate that they are labels. Some examples are how the directives are used are as follows…

DS means Define Storage. This can be for any kind of data. One example of this is DS 10 , which reserves 10 bytes of storage.

ASC stores any ASCII text contained in single quotes. An example of this is ASC ‘WHY’

DFB means define byte. Examples given are DFB 3, $15, 12, 7 and DFB ‘H’ , ‘I’

ORG means where to store your code. An example of this is ORG $8000

EQU means equate or equals. An example of this is VIDEO EQU $D000

So, that’s all you need to know for now! This book has a chapter called “Extending BASIC”, but actually there are no extended BASIC commands in the book. All it shows you is how to pass parameters to a SYS command. This isn’t good, but not as bad as certain people listing a graphics program without any way to save your creations. In the next instalment, I’ll be trying to draw some lines across a C64 graphics screen in 6502 Assembly Language, based on an example in the book. I may even try to animate these lines, but that won’t be according to any mathematical formula, because don’t forget I’m useless at maths!

Finally, here’s some artwork I did in the C64 lores screen mode. No programming was required at all, I just used some software called Multipaint, which runs on Linux, Windows, and Mac OSX. I didn’t spend all that long working on it. It gives you a rough impression of the slum I grew up in, which was in stark contrast to the semi detached house next door. I found I couldn’t convert the original graphics file from .bin or .ocp (Advanced Art Studio) to GIF, JPG, or even BMP, so in the end I had to take a pic of it with my Android phone. I hope you enjoy it! 

C64Slum

Posted June 18, 2017 by C64hater in Uncategorized

THE COMMODORE 64 THE EU AND BREXIT   Leave a comment

THE COMMODORE 64 THE EU AND BREXIT

britainisolated

Britain in isolation

 

At the beginning of 1957, the European Economic Community (EEC) was formed. This group was originally made up of West Germany, France, Italy, Belgium, the Netherlands, and Luxembourg. They were joined in 1973 by Britain, Ireland, and Denmark, then in 1981 by Greece. The following year, the Commodore 64 was released.

 

The aims of the EEC (which later became the European Communities or EC, then later still the European Union or EU) were to prevent another war between its member states, protect them from being threatened by larger countries in the World, as well as to become more or less self sufficient, involving lots of trade protectionism, meaning that although some goods from the rest of the World would be allowed in, most of the goods consumed in the EEC would be produced in the EEC. The Common Agricultural Policy (CAP) made sure that the EEC could feed itself by paying farmers to keep producing as much food and drink as possible, surplus to demand. This created what were called a “butter mountain” and a “wine lake”. Sometimes, the butter had to be sold to the USSR because there was so much of it, but the objective of being self sufficient in food and drink had been achieved.

 

Unfortunately, things didn’t go entirely according to plan. Lots of foreign computers were widely sold in the EEC and at one stage Commodore was the largest supplier. Of course, there were also lots of computer manufacturers native to the EEC, including Sinclair, Acorn, Tangerine with their Oric and Microtan computers, Thomson, and Olivetti. I remember Ian McNaught-Davis (RIP) on the BBC’s Micro Live TV series presenting some charts which showed how there was a lot of trade protectionism in the USA, where European computers weren’t popular and even more so in Japan. I also remember Tony Bastable (RIP) in the ITV series Database reporting from Japan that they couldn’t find a single computer on sale which was European or American. They were ALL Japanese!

 

There is such a thing as non tariff barriers. Some examples of these were France insisting that all video recorders sold there must have SCART sockets, as well as forcing all Japanese video recorders to be inspected by a single inspector to slow them up getting through customs. Obviously, the EEC should have blocked Commodore from ever setting up a subsidiary inside the EEC, then set up some kind of quality control or non tariff barrier to stop Commodore computers from entering the EEC, but they failed to do either of those things.

 

An emulator of the Robotron A5105 computer released in mid 1989 in the final 15 months of East Germany

 

Meanwhile, in the Eastern Bloc, Warsaw Pact, or COMECON countries, western technology was either banned or not allowed to be sold to those countries, so they made their own. Sometimes, these computers were clones or lookalikes of western computers, such as the Sinclair Spectrum, Amstrad CPC, Apple ][, as well as high end IBM minicomputers or mainframes, but produced in the east. Other times they produced fairly original computers, such as the East German Robotron A5105, which was a combination of Amstrad CPC type hardware, that had been upgraded to display more colours (320×200 with 16 colours, 640×200 with 4 colours), but with a BASIC called RBASIC, similar to MSX BASIC. This proved it could be done. A demo disk shows a another  Robotron KC Kleincomputer model, which is just a CPC clone.

Robotron Kleincomputer CPC clone demo disk

 

Meanwhile, the Brazilian government allowed Brazilian companies to copy foreign companies’ designs and sell them in Brazil.

 

A Brazilian computer enthusiast shows off the TK90X Sinclair ZX Spectrum clone

 

The EEC could have made up some rules such as that foreign computers sold in the EEC would have to have a minimum spec before getting a permit to be sold. Computers made by companies in the EEC all seemed to have quite advanced versions of BASIC, so Commodore and Sharp (whose MZ80K had NO language on ROM), could have been required to have the same. Unfortunately, they weren’t.

 

In Sweden there was a quite well thought out computer called the ABC80 https://en.wikipedia.org/wiki/ABC_80  , which came out in 1978. This was based round the Z80 CPU and had its own type of BASIC, which was self compiling, so ran much faster than other dialects of BASIC, at a similar speed to Assembly Language/Machine Code. It also had a bus extension system, allowing it to accept plug in cards. Unfortunately, it didn’t have hires graphics, but these could have been added on a plug in card later on, plus there was an upgraded version for business, called the ABC800, which did have graphics. Unfortunately, this computer wasn’t very successful outside Sweden, which was probably due to Sweden only being part of EFTA instead of the EEC. Similarly, in New Zealand they also developed some innovative computers, such as the Poly-1 https://en.wikipedia.org/wiki/Poly-1  and the Aamber Pegasus https://en.wikipedia.org/wiki/Aamber_Pegasus , which even used a dial to select one of several boot ROMs, but as New Zealand had a small population and wasn’t part of a big integrated trading bloc, they weren’t very successful outside New Zealand, or even at all.    

 

Nowadays, about 85% of countries in the World are either in or about to join a bloc of countries promoting free trade, a common market, or economic and political union. There are blocs in southern Africa, west Africa, east Africa, the Indian subcontinent, southeast Asia, South America, and elsewhere https://en.wikipedia.org/wiki/Trade_bloc

littlebritain

Prime Minister Theresa May leads Britain into isolation

 

The phenomenon known as Brexit is short for Britain exiting the EU. If this mad shit actually happens, then it will mean no free access to the EU Single Market, a lack of resources to design and produce goods, as well as individual consumers in the EU boycotting British goods, which has already started. It can be summed up as “Little Britain”, named after the BBC sitcom. After this, there might actually be a lot of manufacturing in Britain by cottage industries, making copies of foreign computers because most people wouldn’t be able to afford the real thing, the same as happened in the USSR, where there were lots of Sinclair Spectrum clones. Of course, no other countries would buy these goods. The price of computers in Britain has already started to increase, as you can read about on https://www.theguardian.com/technology/2017/feb/16/microsoft-raises-prices-of-some-laptops-by-up-to-400-due-to-brexit?utm_source=esp&utm_medium=Email&utm_campaign=GU+Today+main+NEW+H+categories&utm_term=213681&subid=15597259&CMP=EMCNEWEML6619I2

 

Apart from the above, there could be lots of very cheap and crappy goods flooding into Britain from China, with hardly any restrictions at all. A lot of these goods could lack fundamental features that buyers would automatically think should be included, similar to the BASIC on the C64. Some examples of this from the past are Amstrad video cameras and satellite receivers. In spite of marketing the excellent CPC computer range, Amstrad later brought out a camcorder with no zoom, and no playback through the non existent viewfinder, as well as satellite receivers not designed to pick up more than 16 channels, without decoders, and no facility to tune into audio carriers on different frequencies from the Astra satellites. This was OK for the original unencrypted Sky TV UK package and other channels on the Astra 1 satellite, but required add ons when Astra 2 was launched, as well as when Sky UK was encrypted. I think people should watch out in case China produces a phone which can’t make phone calls, but can only send texts and run apps. Of course, I advise everyone against subscribing to Sky TV, or to unsubscribe if they already do, because it’s owned by Rupert Murdoch, who brainwashed lots of people in the UK into voting Leave, because “When I go to Downing Street they do as I say. When I go to Brussels they usually take no notice”. I think people should just download whatever is on Sky TV that they want to watch from Torrent sites, and subscribe to or build a VPN if necessary to subvert any restrictions on Torrents by their ISP. Also don’t watch Fox productions at all (e.g. 24, (Fear) The Walking Dead, The Simpsons), because Fox is owned by Rupert Murdoch, so they may contain brainwashing and even subliminal messages.

 

Just imagine what a difference it would have made! If the Commodore 64 had been banned in the EEC !

 

Posted February 17, 2017 by C64hater in Uncategorized

MAKING MUSIC – PART 2   Leave a comment

MAKING MUSIC – PART 2

The Batman TV series theme

 

I wanted to make music. I’d tried playing in bands, but the problem was musical differences. I ended up playing with people who badly wanted to sound like someone else instead of doing their own thing.

Eventually, I found out that I could use a computer to play all the instruments. It wasn’t a really good idea on computers which had only three or even four channel synthesizer chips, but the Yamaha CX5M Music Computer was much better with its eight channel synthesizer module.

Software which enabled people to program a synthesizer to play different instrumental parts at the same time was in general called a sequencer. Vince Clarke revealed in the BBC documentary “Synth Britannia” that he left Depeche Mode after finding out that sequencers enabled him to make all the music himself, although he still needed a singer to accompany him. After leaving to form Yazoo, followed by Erasure, his musical style didn’t really change, although you might not agree on that point. As for me, I found that I was up against other musicians determined to just be a pale copy of someone else. It was no good telling them here was a song or some music I’d written, “Now just get on and play it! do as you’re TOLD!” For that, I needed a computer which would obey my commands. I even had a Grandad who thought the solution to this was him having a big win doing the football pools gambling system, after which he said “You’ll get your band”. Perhaps he was thinking of something more like a 1940’s Big Band orchestra, where musicians might have been hired and paid to do as they were told, who knows?

My first adventures playing electric music involved reading the book “Lead Guitar” by Harvey Vinson. This explained to me about the pre Rock ‘n’ Roll music called The Blues, which it said was the ancestor or basis of Jazz, Country, Rock ‘n’ Roll, and later Rock Music, as well as Soul Music. It involved playing musical phrases called riffs over the same old chord sequence called “Twelve Bar Blues” or “Blues Progression”. It can be heard in most 1950’s Rock ‘n’ Roll Music, as well as the 1960’s Batman TV series theme music, and most Status Quo songs. Of course, this same old tune couldn’t carry on forever, people had got sick of it, so that meant I had hardly ever heard any songs which used it. The chord sequence went G G7 C G G D C G D7, with mostly Major chords and a few seventh chords here and there. If you started on another chord, such as E, then it would go E  E7 A E B A E B7, for example. You go up 2.5 tones at first, followed by 1 tone. On a guitar or bass guitar, each fret represents half a tone. It said I was supposed to make up my own riffs from the Major Blues Scale which would fit over the chord progression. These riffs were supposed to be moved across the guitar fretboard as the chords changed. It was totally cliched and had been done to death years before.

“Rock ‘n’ Roll” by Led Zeppelin, a band so derivative that they’ve settled out of court for Copyright infringement at least a few times

The first tune I ever learnt to play by anyone else was “Blitzkrieg Bop” by The Ramones. I started playing it on one string before learning to play it with bar chords, which means chords that can be moved up the fretboard by placing the index finger across all 6 strings. Chords which don’t use this technique are called open chords, meaning some of the strings aren’t fingered at all. “Blitzkrieg Bop” was off their first album “The Ramones” and didn’t feature the Blues Progression, although it contained chords which were the same distance apart, meaning E, A and B. My point is that the chord sequence wasn’t the same. Most Ramones songs were a kind of three chord song, but some of them featured additional chords used briefly and they could all be played using two movable bar chords, based round the open chords E and A, so no problems there after finding out just how to press down the strings with the index finger, which took me a few months.

The book “Lead Guitar” by Harvey Vinson didn’t mention that there were variations  on the 12 bar Blues, such as the 8 bar Blues, or 16 bar Blues, and even 32 bar Blues, which would have made things less monotonous.

 

Funky 16 bar Blues

 

8 bar Blues (2 variations)

A variation on the 12 bar Blues is the song “Let’s Dance” first performed by Chris Montez, which was a hit in 1962 (not to be confused with the David Bowie song of the same name), as well as appearing on The Ramones first album “The Ramones”. As for the 12 bar Blues Progression, it may have helped me learn to play electric  guitar and bass, but I found it was best to forget about it and make up my own chord sequences, like almost everyone else seemed to have done, changing chords whenever I felt like it.

“Blitzkrieg Bop” by The Ramones

There are 12 notes in an octave, including sharps and flats. This means there are only so many combinations of these notes that can be played, which can lead to claims of Copyright theft or plagiarism. Notes which are an octave apart obviously the same note just higher up or lower down. However, the system of dividing a range of frequencies up into 12 notes is totally artificial. There is actually a much larger, some say infinite, range of notes in between two notes an octave apart. These notes can only be played by stringed instruments without frets (e.g. Violins, Cellos, Double Bass, fretless Bass Guitar), employing different tunings, bending strings, or using pitch bend on electronic keyboards, synths, or samplers. Unfortunately, a lot of people, or even most people, are so used to hearing the traditional notes that they might complain such music is out of tune.   

So that explains the basics of how to play music. After that, you need to learn how to apply it on computers.

It’s now 2017, the 35th anniversary of the release of the Commodore 64, which is nothing to celebrate. However, it’s also the 30th anniversary of the release of the Amiga A500, the computer which enabled lots more people to afford an Amiga. Don’t forget that the Amiga has nothing to do with the C64 except that Commodore bought the company. The Amiga is based on Atari 8 bit computers, both projects headed up by Jay Miner (RIP). Unfortunately, the Amiga A500 had no expansion slots which accepted plug in cards, just the less capable side expansion edge connector often used for hard drives, as well as the trapdoor slot for RAM expansions, unlike IBM PC compatibles, the Apple ][, or even early S100 bus systems based on the Altair 8800 computer. This is one reason why it wasn’t more successful. Just imagine how things could have been if Amiga A500 owners could have plugged in an amazing third party graphics card which could have given the graphics edge back to the Amiga over PCs, instead of just keeping up with PCs when the AGA chipset was released. Commodore never upgraded the sound chip at all. As the Amiga developers said “We made the Amiga, THEY fucked it up!”, referring to Commodore as THEY.

 

Posted January 13, 2017 by C64hater in Uncategorized

MAKING MUSIC – PART 1   2 comments

MAKING MUSIC – PART 1

A weird tune I recently created on my new/old Yamaha CX5M Music Computer using the Yamaha FM Music Composer Program

 

After thinking a lot about The Machine Language Book of The Commodore 64, I was writing another post about it, but of course this is a very complicated subject, so I didn’t know how to finish it. I was also involved in political campaigns for the Mayor of London and Greater London Assembly (GLA), as well as the EU Referendum. I was devastated and sidetracked by the leave result, which means the abolition of the UK/Britain, serious isolationism for England and Wales and that I must leave the country ASAP. Then, I got an email asking if I was alright and when I’d make another post. My answer to that was I was still alive, but basically that I didn’t know when I’d make another post. Now, after over three months without any new posts, I decided to do this post instead.

 

Making music was one of the reasons I bought a Commodore 64. It was one of the computers described in that lying buyers’ guide “The A-Z of Personal Computers” as containing a 3 channel synthesizer chip. This detail was true, but of course there was a catch. After I found out that some computers had built in three channel synthesizers, while other computers only had tone generators or beepers, I decided to go for a computer which did have a synthesizer chip. This more or less limited my choice to one of the range of Atari computers with FOUR sound channels, the BBC Micro, the Commodore 64, the Oric-1, a Memotech MTX, or the Texas Instruments TI-99/4A. When I was choosing one, I didn’t know about any upgrade peripherals which could add a synthesizer chip to any of the other computers. I was disgusted when I found out I could’ve bought a peripheral for the Sinclair ZX Spectrum which added such a chip. Of course, there were also replacement keyboards for the rubber calculator key ZX Sinclair Spectrum, which would have shut my Dad right up with his saying of “Word processing. Word PROCESSING!”

 

The Commodore 64 seemed to have everything I needed, although I knew I didn’t really need 64K, because plenty of computers had less than that amount of RAM. It had a three channel synthesizer chip, came with “BASIC” built in, and had a good amount of software widely available for it. I thought the Commodore 64 came with everything I needed to play music on it. I was shocked to find out that it didn’t. After that, I bought an Amstrad CPC664, then started to have lots of fun drawing lines across the screen and playing simple tunes.

 

About two years after buying a C64, in early 1986, I bought a Yamaha CX5M Music Computer. This computer was part of the MSX standard, which I’d read a lot about, but I knew it contained an FM Synthesizer Module, which wasn’t part of the MSX standard. I was previously told in a music shop (i.e which sold musical instruments) that the Yamaha CX5M is a true musical instrument, but the Amstrad CPC wasn’t. It came with everything needed to play music on it. Built in was a non standard MSX command CALL MUSIC. The command CALL on MSX always refers to something contained on a ROM other than the MSX BASIC ROM. Typing this in at the MSX BASIC 1.0 Ok prompt turned off MSX BASIC 1.0 and brought up a page allowing the user to control the FM Synthesizer Module enough to play music. It even allowed the user to save or record the data to cassette or cartridge, although I never used this facility, I only recorded compositions from the FM Music Composer, and the DMS-1 cartridge. A synthesizer is called that because it can make up or synthesize an almost infinite range of sounds. An electronic keyboard is stuck with a fixed number of sounds. A synthesizer doesn’t actually have to have a music keyboard built in either. The FM Voicing Program was what enabled me to make up my own unique sounds.

 

I originally learnt to play music on an electric guitar and bass guitar, after playing only a few notes and a couple of short tunes on pianos. The electric guitar and bass seemed a better way of making music. I first learnt to play my first tune written by anyone else on just the sixth (i.e. the thickest) string before learning to play it using bar chords, meaning that the first finger is placed across all the strings, allowing guitarists to play the same chord shapes for Major, Minor, Seventh, Ninth, Minor Ninth, Diminished, etc chords at any fret, meaning root note, on the guitar.

 

One problem with that was the need to find other musicians who would agree exactly with my musical style, have the right image, etc. The CX5M made that unnecessary.

 

Unfortunately, I couldn’t make much use of the knowledge I’d gained from playing guitar and bass, because I was suddenly given only the choice of playing on a piano type keyboard, or inputting notes using the computer keyboard. There was no way to hook up a guitar to the CX5M via MIDI. There may have been MIDI guitars and MIDI guitar adaptors, but unfortunately, due to a design fault, MIDI IN on the original CX5M SFG-01 FM Synthesizer Module didn’t work! This meant I was stuck with the music keyboard and the computer keyboard.

 

I managed to compose several tracks on my trusty Yamaha CX5M, as well as input some sheet music and play it back. After that, I got sidetracked, as follows…

 

The Soho Roses’ final gig, in 1989 which I went to, showing the guitar based Glam/Sleaze or Glam/Trash Rock with accompanying fashions and lifestyle

 

About two years after buying the Yamaha CX5M, I experienced the attitude, as mentioned in the BBC Documentary “Synth Britannia” that synthesizers had gone out of fashion and guitars were back in fashion. In my case it was about being part of a close knit group or cult, based on a personal recommendation from someone I met. There was a lifestyle attached to that, with lots of gigs and some clubs, although I hadn’t been going out much in the period just before that, because it seemed there was nowhere to go and nothing to do, or anywhere I could go was totally out of fashion, due to the rapidly changing and cliquey attitude associated with the music. This made me go back to playing the electric guitar again, which I hadn’t forgotten how to play, as well as to neglect and even stop playing the CX5M altogether.

 

Synth Britannia (BBC)

 

Some time later, I answered a Musicians Wanted ad as a guitarist. The ad was placed by a female singer. We got together and formed the nucleus of a band. She also told me about a vacant flat, which was how I got my first flat. The two of us tried recording vocals, guitar, bass, and drums, in my bedroom, as well as in rehearsal studios onto a four track Fostex machine, which used the then standard compact audio cassettes as one sided instead of two sided. These recordings were all quite distorted, though. Unfortunately, we never managed to get any more members, or at least not permanent members. I could have programmed my CX5M to play the missing instruments of bass guitar and drums, but that was totally disapproved of in this scene, so we needed people to play bass and drums live, but I tried and failed to program convincing electric guitar type sounds on the CX5M. The main problems we faced were other people not wearing the right clothes and not having the right hairstyles, as well as the people we saw at gigs and clubs not being able to play any instruments, or already being in a band. I was driven in desperation to teach a woman we’d met who had “the right image” to play the bass guitar. Unfortunately, although she actually went out and bought her own bass guitar, she wasn’t dedicated enough to learning. She was from northern England, but living in London with her family. She kept hanging round with people visiting London from northern England, then later on complained that she didn’t have any friends in London, so she decided to go back up north! If we’d all been squatting together instead, then I think things would’ve been different.

 

As for the very short track at the start of this post which I composed on my new/old Yamaha CX5M, I should explain how I did it. A well known mnemonic (i.e. memory aid) to learning standard music notation is that the lines on the treble clef stave are, from the bottom to the top, “Every Good Boy Deserves Favour”. The spaces in between can be remembered by the word “FACE”. The bass clef stave is different, so I made up my own mnemonic for the lines, which is “Good Boys Deserve Favour Always”. You might like to make up your own mnemonic for the spaces in between, with the notes ACEG. Although I know what kind of sound one note followed by a particular other note will make, I decided to input all the notes on the treble clef without thinking how they’d sound. This created a different type of tune, which I think has given me my inspiration back to create more tracks. Unfortunately, my creativity was sucked dry a few years ago after being granted so many free recording sessions that I just couldn’t think of any more tunes. Of course, bands like 1950s Rock ‘n’ Rollers, or Status Quo would just have done more riffs based on the Blues Progression.

 

That’s all for now! You can look forward to another post about making music, or about “The Machine Language Book of The Commodore 64” in the near future.

 

Posted September 3, 2016 by C64hater in Uncategorized

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 2   1 comment

THE MACHINE LANGUAGE BOOK OF THE COMMODORE 64 – PART 2

The_Machine_Language_Book_for_the_Commodore_64

The book in question

 

Now for another instalment about this amazing book, which wasn’t published or promoted by Commodore at all, but I think copies should have been given away with every Commodore 64 sold. At the very least, I think Commodore should have included a business reply card in each C64 box saying something like “Are you serious about programming your C64? If so, then you need this book! Please register your C64 with Commodore within 28 days of purchase to get a copy of this book at the discounted price of… Meanwhile we hope you enjoy using the built in Commodore BASIC V2, which is designed to produce text based applications only”. This card could also have mentioned some other amazing books by Data Becker/Abacus and by Compute! , where the exclamation mark is actually part of the name.

As I pointed out in the last post of this series, I couldn’t get the LEA Assembler I typed in to work, and couldn’t find a working copy of it for download either, so this means that I’d need to alter the Assembler Directives and syntax slightly to get any of the code in this book to Assemble and run on another Assembler.

The Merlin 64 Assembler seems to be a popular Assembler for the C64. I managed to download a PDF of this, which says that it was published in 1984, so that means I could have bought a copy while I owned my Commodore 64. The Table of Contents lists the Pseudo Opcodes or Directives as EQU (=), ORG, PUT, VAR, SAV, DSK, END, DUM, and DEND. It follows these up with lists of commands for what it calls formatting, strings, data and allocation. Some of these may be necessary, such as TXT, ASC, and .DFB, so I’ll look at the Directives and those other three commands first, then may come back to the several other commands listed in the manual later. The Directives are used as follows. Label EQU expression , or label = expression. Another one is ORG expression , which the manual explains is $8000 by default. This is much lower than the commonly used $C000 which LEA seems to use by default. PUT filename allows the user to place a filename in RAM for assembly at the location of this opcode. DSK filenme will assemble directly to disk. END denotes the end of your source file. TXT “ABC” will Assemble ABC as Commodore PETSCII, but ASC “ABC” will Assemble ABC into standard ASCII. It seems that DFB can be followed by any one byte long numbers or text, or even a list of these separated by commas.

The Machine Language Book of The Commodore 64 doesn’t list any Directives in its Table of Contents, so I’ll have to go through it to find out what they are. I’ve already mentioned in the previous post in this series that = is EQU and .EN is END , though. On page 94 it starts by telling us to define a label as some optional text in the first column. The example given is called simply LOOP , which isn’t followed by anything in that column. After this, we can use BNE LOOP to get back there. Labels can have a maximum length of five characters, which is much better than Commodore BASIC V2 limit of two significant characters for variable names. As I mentioned earlier .EN means that your source code ended with the previous line. The Directive ORG , meaning put the code at the following address, doesn’t seem to be needed, because there’s no mention of this or an equivalent in the first few example programs. On page 99, we learn that labels can also be used to stand for addresses in the memory map. In that case they have to be inputted using all three columns in the BASIC V2 editor. An example of this is VIDEO = $400 , which defines the screen memory as beginning at $400 or 1024 decimal. After this, we’re introduced to the use of *= instead of ORG. The Directive *= is placed in the second column, followed by the address $C000 in the third column. The address $C000 or 49152 decimal seems to be the most commonly used location for storing Machine Language programs on the C64, at least while the BASIC V2 interpreter is still turned on. The book explains that 4K of space is available at that location. It seems there’s a lot you can do with 4K on an 8 bit computer. On pages 100-101, we’re introduced to the Directive .BY , where it’s explained that this is used to store data or text which follows it. I think this would be .DFB in Merlin 64, DB, DEFB, or BYTE or some other Assemblers I’ve read about some time ago, but I can’t remember which ones. I think this knowledge may now be enough to convert some listings from this book for other Assemblers! Examples of .BY given are .BY 100 , .BY $7F , and .BY CR , which I think stands for carriage return, but there’s no mention of if or where this is defined. It may be that .BY is more complicated than similar directives in other Assemblers, because it can also divide a 16 bit value into two 8 bit values using the operators < and > , but I think we’ll leave that til later. Immediate addressing is carried out by prefixing operands with the # character, while zero page addressing is achieved by prefixing operands with the * character. After this, we’re told we now know enough to start using the LEA Assembler.

I’ve recently found a quite obscure book about 6502 Assembly Language and there’s also Jim Butterfield’s book, but I’ve decided to deal with them in a later post.

Unfortunately, it looks like I can’t afford to buy another C128 or even a C64 at the moment, especially as I still need to buy a frying pan, a saucepan, a sharp knife, a plunger, and go for some more badly needed nights out.

That’s all for now! The next stage is for you to absorb what you’ve read and I plan to try and convert some of the source code listings from this book for the Merlin 64 Assembler. Perhaps you’d like to have a go at this yourself.

Posted May 22, 2016 by C64hater in Uncategorized