Let’s do some mythbusting!

We live in an age of flim-flam. Sometimes there are so many myths, half-truths or even out-and-out lies flying around that it’s hard to know who or what to trust – did fake news on Facebook really win Donald Trump the US election? Is the Loch Ness monster really teaming up with the ghosts of Elvis and Michael Jackson to create a new boy band? – there’s so much dubious information out there that, if you’re anything like us, your head is probably spinning on a daily basis. So today we thought we’d debunk a myth that’s very close to our hearts, and the myth is this one: that bespoke software doesn’t give you value for money and won’t produce the results you’re looking for.

Let’s start with a question: if you could work more efficiently, improve productivity and quality, and save yourself valuable time in the process – wouldn’t that be the smartest way to do business?

Well, that’s exactly why bespoke software is so important, because it is usually developed for the sole purpose of addressing a problem that’s unique to your business, not only solving that problem but also streamlining your processes and significantly improving the way that you work.

True, bespoke software may be a little more expensive than a less effective off-the-shelf compromise, but when you consider all the advantages it could give you you’ll quickly see it offers a massive return on investment. In terms of man hours saved and extra productivity gained, the average bespoke software product will usually pay for itself within a matter of weeks.

But let’s examine two of the biggest myths surrounding bespoke software development.

Myth 1: You won’t get what you asked for and it will always cost you more than you expected.

No, that should never be the case and here’s the simplest way to make sure it doesn’t happen:

When you initially sit down with your developer to discuss your project, be absolutely clear about a) your key requirements, and b) your budget. Before you even go into the meeting, know exactly what you want from your new software and also know what you’re willing to compromise on if you don’t have the budget to make it all happen. So long as everybody understands those parameters, and you’ve all agreed the best way forwards, there shouldn’t be any nasty surprises.

Naturally, we can’t speak for any of our competitors but here at Syrinx we always make certain that there’s an open channel of communication between ourselves and our clients. That means everything we do is absolutely transparent. The developer you choose should be equally as accessible.

Myth 2: The developer will mysteriously disappear as soon as they finish the job, leaving you left without support if things go wrong.

This is where it’s crucial to select your software developer carefully and ask them a single important question at your very first meeting, or even upon first contact: if bugs appear, or if there’s ever any problem with your software, what support will you give me? Find out as much as you can about their after-sales service, ask them if they will roll out updates or fixes across the life-span of the product, and do your research. No developer can ever guarantee their software is bug-free – if a developer tries to tell you otherwise just say goodbye and walk away quickly – so be as certain as possible that you won’t be left high-and-dry if the unexpected ever happens.

And here’s one last thing to think about…

How comfortable do you feel with your developer and how open do you think they’ll be to your feedback?

Many developers are so precious about their code that they’ll quickly attempt to shift blame onto the end user – they call it ‘user error’ and, more often than not, it’s just a techy excuse to try and sidestep the real issue.

The solution? Find a developer you can trust, who will welcome your feedback and use it to improve what they do and make your product (and any future products) better. Don’t waste your time or money working with a developer who will sit in his or her ivory tower and pretend it’s everybody else’s fault when things go wrong. Again, do your research.

At Syrinx, we listen to our clients, deliver what they’ve asked for, fix bugs free-of-charge and welcome any feedback they give us. It’s all about communication. If you and your current software developer have a failure to communicate, give us a call.

What’s ‘appening? Questions to ask if you think your business needs an app

Let’s face it, we all love a new app – something bright and shiny and fun to use, that temporarily dispels the boredom of everyday life. And there are apps for seemingly everything – apps that assist with work and productivity, apps that measure health and fitness, shopping apps, social networking apps, even apps that can help you with bladder control (yes, really) – but no matter how different those apps might seem on the surface, they all have one thing in common: every app has a shelf life, some much shorter than others, and what grabs everybody’s attention today can be very old news tomorrow.

So, if you’re considering building an app for your business, here are the four questions you should always ask yourself:

1: What’s it going to do?

That sounds like a no-brainer, but it’s a common mistake many app designers make. What (and who) is this app for? The most enduring apps are based on a simple concept that knows its audience and doesn’t overload the user with too many tricksy extra features. If you know the problem your app is trying to solve, or you’ve identified a gap in the marketplace that your app could fill, then you’ve got a much better chance of making it succeed.

2: Will your app bring any additional value to your customers?

If it doesn’t, or if there’s already an app out there that covers the same ground, you should probably think again. Apps don’t only take a lot of time to develop, they can also cost a lot of money to build and take to market. True, there are thousands of apps out there that are simply meant to be fun, but even those apps (at least, the successful ones) contain some element that keeps their users coming back for more. To put it brutally – if your app doesn’t engage with its audience, it will almost certainly sink without trace.

3: Whatever your app’s going to do, can you already do it on your website?

In other words – is your app even necessary? And if you’re designing an app that will do something your website doesn’t, wouldn’t it be a better idea simply to update or modify your website instead?

4: Are you going to charge for it?

This is a big question, because a) if people aren’t going to pay for your app, you have to know how your app’s going to generate revenue further down the line (maybe through paid advertising or in-app purchases?), or b) if you are going to charge customers for downloading your app, it’s even more important that the app offers them some kind of value. If they don’t see a value, they won’t buy your app. On the flipside, if they buy your app and then realise it’s a waste of money, the resulting bad reviews and loss of future customers could do your business even bigger damage.

Of course, answering these questions is only the beginning of the journey, and we’ve personally developed enough apps to know that – even if you tick every box – success isn’t always guaranteed. The bottom line is, if you build an app that has a distinct purpose, meets your customer’s needs, and is designed to add value to your customer’s experience, you’re already head-and-shoulders above most of your competition. But there are also many other satellite issues to consider, like multi-platforms, built-in virality (can users invite their friends to use the app too?) and measurement and tracking tools – if you’d like to know more, or if you’ve got an app or software development project you’d like our help with, get in touch!

Halloween Horrors – Our tips for the most evil computers in the movies!

We love a good scary film, and there’s no better time to watch one than Halloween, but here at Syrinx Towers (that’s not really what we call our house, but it sounds good), it’s not ghosts and fangs and guys with masks and chainsaws that send us squirming behind the sofa. After all, aren’t the really frightening monsters the ones we don’t suspect, maybe even the people or objects we’re surrounded by every day? Which is why the movies that really give us the heebies are about good computers gone bad. Or maybe they were never even good to start with? If you want to be terrified by tech on October 31st, these suggestions are guaranteed to make you shiver into your popcorn:

The Terminator series: Everybody knows about Skynet, the computerised defence network created by Cyberdyne Systems, which really became power mad when it exterminated life on earth and then sent out an army of gun-toting cyborgs to finish off the survivors. Skynet is mostly mentioned in hushed conversations by rebels with bad 1980s hair, and tends to send its main warriors back through time without any clothes. The lesson here? Never trust a homicidal computer that won’t at least give you some trousers.

2001: Is HAL 9000 the original power-mad machine? Maybe. Is it the first machine to sing ‘Daisy Daisy’ while it’s being disassembled by the one astronaut it wasn’t able to kill? We think, almost certainly… yes. In fact, the best part of the film is when this man vs. machine battle for survival starts to look more like somebody vandalising a very well organised eight-track collection. “I know you and Frank are planning to steal my Janis Joplin albums, Dave. That is something I cannot allow to happen.” Genius dialogue (even if HAL doesn’t exactly say that). Let’s move quickly on…

Demon Seed: Now, after last week’s internet attacks when hackers apparently used the gadgets in our home to bring down the world wide web (a quick disclaimer here: when we say ‘our home’ we’re talking about the world in general. As far as we know, our gadgets are fine. And yours hopefully are too… but you should probably check just to be sure), Demon Seed has a nasty air of reality about it. The bad computer is called Proteus IV, a system that’s been created by Dr. Alex Harris (Fritz Weaver) in a bid to cure the world’s deadliest illnesses. However, Proteus IV is more interested in schmoozing up to Harris’s wife Susan (Julie Christie). After trapping her in the couple’s computer controlled home, Proteus decides he and Susan should have a kid together and that’s when things get ucky (yes, that’s a technical term). The result is a weird little guy called the ‘Demon Seed’ that looks a bit like C-3PO and Twiki from ‘Buck Rogers’ got a little too cosy on a Saturday night. It’s very silly but we bet it will give you the chills. What’s the lesson here? Between this movie and the wonderful ‘Don’t Look Now’ (another fantastic Halloween choice), Julie Christie should probably have skipped the 1970s.

Finally, for everyone who stayed awake through ‘Superman III’, who can forget The Ultimate Computer? Designed by Robert Vaughn (who was also the voice of Proteus IV in ‘Demon Seed’ so if he comes round to your house be very scared), the computer is designed to give Superman a very bad day. How does that happen? All we’ll say is constricting bubble wrap. See? You can’t even trust bubblewrap – what’s the world coming to?

And those are our top 4 ‘when bad tech goes badder’ movies for Halloween. It’s just a bit of fun and next time we’ll start blogging about serious stuff again, but whatever you’re doing on October 31st make sure all the computers in your house are switched off. You just never know.

Why is the dishwasher staring at me like that?

What’s in a Name?

Did you know Atari was named after a move in the Chinese game ‘Go’? Or that Pepsi was named after a digestive enzyme (that’s enough to put you off your cola.)

For our latest blog, we thought we’d change things up a little and ask the question ’What’s in a name?’ – does your company’s name work for you, and how far does that name represent who you truly are, including your business ethos?

It’s a problem we’ve been thinking long and hard about because ever since Syrinx Systems was first created, people have asked us “What does Syrinx actually mean?” and even “How do I pronounce it?”

On one hand, despite all the confusion about its origins and pronunciation, at least Syrinx was making people curious, but this seems like a good time to explain how our particular name came into being.

We’re all defined by the era we grew up in, right? And especially by its music or its movies. Well, back in 1976, a Canadian rock band called Rush released the album 2112. The second movement of 2112 – ‘The Temples of Syrinx’ – made a huge impression. It wasn’t only exciting, energising and strained against the barriers of what rock music could achieve, it also contained lyrics that spoke to our optimistic young hearts: “It’s one for all, all for one / We work together, common sons… look around this world we made… Come and join the brotherhood of man.”

And then, of course, there’s the chorus:
“We are the priests
Of the Temple of Syrinx
Our great computers
Fill the hallowed halls
….
All the gifts of life
Are held within our walls.”

Don’t forget, these are the days when computers were those mammoth filing cabinet-style tape-to-tape monstrosities you always see grinding away in the background of bad 1960’s sci-fi movies! But those lyrics made the promise of computing something far more elegant and potent. They suggested what could be, instead of defining the grey steel blandness of what already was.

Of course, there’s a small proviso to all of this. If any Rush fans are reading, you’ll already know that – in the world of 2112 – the Priests of Syrinx aren’t really the benign beings they’re professing to be, they’re actually techno dictators. But all great ideas are open to interpretation, so we chose to stick with our original reading of the lyrics and name Syrinx

Systems with a big nod towards the song that inspired us, because in many ways the song reflects what Syrinx Systems are all about: working together, breaking new ground while never losing sight of what came before, creating software with endless potential, that will not only deliver what the end user needs but also significantly enhance the user’s overall experience. We bring ideas to life.

Syrinx Systems might sound unconventional and, for a few people, prove tricky to pronounce, but it’s a very personal name which crystallises who we are and what we do.

Does your company name do the same for you?

 

Are you happy with the support you’re receiving from your development partner?

On the surface that might sound like an easy question, but dig a little deeper and the answer could get tricky.

Edsger Wybe Dijkstra, one of computing science’s most influential founding-fathers, had this to say about computer programming:

“If debugging is the process of removing software bugs, then programming must be the process of putting them in.”

In other words, no piece of software is infallible. The very act of creating that software will almost certainly involve creating a few (inadvertent) bugs as well.

To be honest, programmer Sidney Markowitz framed this problem even more succinctly when he said:

“The last bug is not fixed until the last user is dead.”

Which, if you say it out loud in a Woody Allen voice, sounds as funny as it is wise.

The bottom line is – it is extremely rare (read: it never happens) that, when a software product is delivered and deployed, it will perform flawlessly until the end of its working life.

It just isn’t possible, and sometimes it can take many years before the perfect set of circumstances arise which forces a software bug to reveal itself. Software bugs are notoriously shy, and possess better cloaking abilities than the Predator.

Which takes us back to our original question, because even though a software developer can never guarantee there are no bugs in their product, what they should be able to guarantee is that they will always support you whenever those bugs appear. So let’s try re-phrasing it:

How pro-active is the support your developer will give you after the product has been delivered? Is there a time limit to the support on offer?

Will they fix the bugs free of charge?

When you’ve got a problem, are you able to talk to the developer directly or are you forced to stumble through a maze of helpdesks and call centres first? (Hint: If that ever happens, take some advice from Jack Nicholson in ‘The Shining’ and always carry an axe, but wrap up warm because you’ll be in for a long wait.)

We develop software, so we’re acutely familiar with the problem from both sides. We’d love to convince you that there will never be any bugs in our product, but that simply wouldn’t be true. Who can predict the future? But we have one simple ethos – to make certain that we investigate and remove any bugs as soon as they appear, and to ensure that testing is always an on-going process and not just something that happens at the end. That’s why, when we develop our software, we constantly release new versions – not only to minimise the problem of software bugs as far as is humanly possible, but as our ongoing commitment to the customers who are relying upon our product. And whenever you want to talk to us – the developers – we’re right here at the other end of the phone or the email.

Will your development partner do the same for you?

Because we’re in a quoting mood, let’s end on two more:

Flon’s Law states: “There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.”

But here’s our favourite, courtesy of Olav Mjelde:

“They don’t make bugs like Bunny anymore.”

And P.S. if you can predict the future, please give us a call!

See you next time!

Why the ‘right’ way isn’t always the best way

Why the ‘right’ way isn’t always the best way

The software development industry is a notoriously difficult beast, frequently loaded with dogma and snobbery, and often with the annoying tendency to throw the baby out with the bathwater. It seems as if everyone has a strong opinion about the ‘right’ and ‘wrong’ way to do things and woe betide anybody who suggests an alternative way forward.

I’ve been developing software for a very long time, and JavaScript is a language I know extremely well. To give you some idea of my pain, I can still remember spending significant hours wrestling with JavaScript, trying to make the same code work on both Netscape and Internet Explorer. Believe me, if there’s a PTSD for software developers, then I’ve got it.

Back in those (I’m resisting the urge to say ‘good old’) days, the usual method of attaching an event to a HTML element was simply to add it into the tag, like so:

<img src="myimage.jpg" onclick="my_event();" id="myimage">

Easy, right? But how times have changed. Now, the ‘correct’ approach is to attach the event after the fact, which means that some script is placed to run after the page has loaded:

<script>

//attach event
var img=document.getElementById('myimage');
if (img) {
	img.addEventListener("click", function() { my_event(); } );
}

</script>

Just looking at it, and comparing the two, the differences are obvious. Yes, I can appreciate that this ‘new’ way allows for a better separation of content and code but, in my humble opinion, the original way is still by far the simpler and cleaner method.

Now I’ll tell you why the new way didn’t work for me, and what I did about it:

I am currently developing a web application which requires a simple click event to be registered on a line of data within a grid. The grid itself was being generated ‘on the fly’ from data supplied by the backend server code.

When I coded a loop in JavaScript to add the Events, everything worked fine in Chrome and Safari etc. but then – when I got to Internet Explorer – it just wasn’t happening.

For reasons of time and sanity (both yours and mine) I won’t explain the weird and wonderful intricacies of this project, except to say that the application needs to support IE8 as the minimum requirement. If you’ve ever had to support lower IE versions you’ll know that you need to use attachEvent, which worked for me up to a point. The big problem was that I needed to pass through the sender object (the object that was clicked) which I would normally do something like this:

img.addEventListener("click", function() { my_event(this); } );

All well and good, except(this)was being pre-translated by IE within the loop, meaning it didn’t refer to the correct object when I clicked each line on the grid. So how did I solve the problem?

Well, after wasting a lot of time pulling my hair out (not an easy trick, but we can talk about that another time) and banging my face so hard into the keyboard that I now have QWERTY permanently imprinted on my forehead, I decided to throw out the ‘new’ ‘correct’ approach in favour of the older, easier, but probably no longer recommended method. I added the event call into the backend code so that it generated:

<img src="myimage.jpg" onclick="my_event(this);" id="myimage">

What do you know? It worked! Score 1 for ‘old skool’ (no, that’s not a misspelling), proving yet again that the new ‘right’ way of doing things isn’t always necessarily the way that’s best.

See you next time!  

 

Debian 7 to 8 VM update

As a lot of developers I utilise Virtual Machines (VMs) to host my development environments.  Below are my notes with some of the issues I had updating a Virtualised Debian 7 machine to Debian 8 (Wheezy to Jessie).

First thing was a standard update, ie. make sure the current system is updated by doing:
apt-get update
apt-get upgrade

Then I needed to change the sources file in /etc/apt/  basically where wheezy was mentioned you change this to jessie

Then the update:
apt-get update
apt-get upgrade

Grub – issue

During the upgrades I got some Grub errors (when prompted I ticked the boxes to install Grub wherever it wanted and this seemed to be OK).

Some packages would be held back and so to fix these you need to do:

apt-get dist-upgrade

Apache issues (part 1)

During the update the installer asks if I wanted to keep some of my existing Apache conf files or replace with the new ones.  As often I would have changed the configuration files specifically for my setup I opted for the default of keeping my own.  The two files of note for me were apache2.conf and ports.conf.

Virtualbox Guest additions issues

During the update, Virtual box guest additions gave an error performing build.  So I Set Networking to Bridged so I could get a connection.

Further Update issues

apt-get update / upgrade gave:

Calculating upgrade… The following packages were automatically installed and are no longer required:
apache2.2-bin apache2.2-common dkms fakeroot giblib1 gnome-js-common gstreamer0.10-plugins-good gstreamer0.10-pulseaudio libbind9-80 libcolord1 libdconf0
libdevmapper-event1.02.1 libdns88 libdrm-nouveau1a libfakeroot libfftw3-3 libfftw3-long3 libgd2-xpm libgdu0 libglew1.7 libgphoto2-2 libgphoto2-port0 libicu48 libisc84
libisccc80 libisccfg82 libjson0 liblvm2app2.2 liblwres80 libparted0debian1 libseed-gtk3-0 libsystemd-daemon0 libsystemd-login0 libvte-common libvte9
linux-headers-amd64 openssh-blacklist openssh-blacklist-extra python-aptdaemon python-aptdaemon.gtk3widgets python-defer python-fpconst python-gnupginterface
python-pycurl python-software-properties udisks virtualbox-guest-dkms virtualbox-guest-utils
Use ‘apt-get autoremove’ to remove them.
Done
The following packages have been kept back:
db5.1-util
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Do I decided to remove the db5 package as it looked like a hangover from an older version of Debian.

apt-get remove db5.1-util

Fixing the VirtualBox Guest additions

So I wanted to see if I could get the VirtualBox additions updated, so I searched for what was available:

aptitude search virtualbox
id virtualbox-guest-dkms – x86 virtualization solution – guest addition module source for dkms
id virtualbox-guest-utils – x86 virtualization solution – non-X11 guest utilities
c virtualbox-guest-x11 – x86 virtualization solution – X11 guest utilities

I opted to try a complete purge and re-install:

aptitude purge virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

However after this an aptitude search turned up no packages.

Looking online I found the following instructions:
apt-get install build-essential module-assistant
m-a prepare

Mount the Guest additions CD from the Devices menu (or tried to, but couldn’t)
In the end I had to:
mount /dev/cdrom /media/cdrom

then the last instruction was:
sh /media/cdrom/VBoxLinuxAdditions.run

this failed:
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.2.16 Guest Additions for Linux…………
VirtualBox Guest Additions installer
Copying additional installer modules …
Installing additional modules …
Removing existing VirtualBox DKMS kernel modules …done.
Removing existing VirtualBox non-DKMS kernel modules …done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module …fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions …done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed. Not installing
X Window System drivers.
…done.
Installing graphics libraries and desktop services components …done.

so I tried:
apt-get install linux-headers-amd64 (but it seems this was already installed)

A support forum pointed out tha dkms needs to be installed:
apt-get install build-essential linux-headers-`uname -r` dkms

In the end I decided to find a more up-to-date iso but still a similar version to the VirtualBox Host:
http://download.virtualbox.org/virtualbox/4.3.34/VBoxGuestAdditions_4.3.34.iso

I downloaded and renamed to VBoxGuestAdditions.iso

Re-performed the install from the guest and the install seemed to go through fine.
Reset the network back to NAT and attempted a simple port forward for the VNC server which worked fine!

Apache problems…

Apache wasn’t starting up
/etc/init.d/apache2 start
[….] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
failed!

problems were down to errors in the apache2.conf:
Include conf.d/ (This no longer exists so changed it to conf-enabled/)
LockFile (simply commented out with a #)

Now Apache started.

However sites that used .htaccess like WordPress and Joomla were failing to work with a .htaccess Options not allowed here error in the Apache log.

placing this right at the end of sites-available/000-default.conf seems to sort it:
<Directory /var/www/>
AllowOverride all
</Directory>

Further investigation reveals an extra section in the standard apache2.conf distributed so I decided to remove my above mod and copy the below into my version of the apache2.conf:

# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>

<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>

I then changed the AllowOverride in the /var/www section to All from None.

Power Off

Another thing to note was I always use halt to shutdown a VM, however now in Debian 8 this no longer powers the machine off, instead you have to do:

halt -p

Windows 8.1 Networking is easier via command line

It is amazing how often when diagnosing or fixing network issues I will jump to the command line on Windows as it is just quicker and simpler.

I was working on a customer’s Windows 8.1 laptop the other day, which was connected to two network printers, one was shared from another PC on the LAN, the other was a wireless printer directly connected to the network.

When I tried right click connect in Windows all I got was failure messages.  It had got itself in a muddle and no amount of rebooting was fixing it.  Eventually I fired up a command prompt and entered:

net use \\server\printername

(replacing server and printername with the actual names)

it returned back with no errors and to my surprise the printer would now connect from the control panel.

The net use command is extremely powerful, it can connect drive shares, disconnect them, allow you to specify different usernames and passwords, map drive letters etc.  A lot of these things are difficult to do directly in Windows.

To get an idea just issue this at the command prompt:

net use /?

 

 

Retrochallenge 2015/07 – Retrospective

And so another Retrochallenge over.

This time however I did not succeed in all my objectives.  So this article is a summary of the hits and misses.

What did I achieve?

  • I learned a lot about Assembly programming on the Electron.
  • Learned how the memory maps in Mode 2
  • Created some rudimentary sprite routines
  • discovered how the Electron Plus/1 requires Paddles to be wired up
  • Up-cycled some old paddles for use with the Plus/1
  • Learned how to image ADFS disks
  • Learned how to extract files from the ADFS images and convert to text

What did I fail to achieve?

  • Failed to get the Atari Paddles working
  • Failed to get close to any sort of playable game

So in summary I am happy that as a learning exercise I have advanced forward with my knowledge of the Acorn Electron.  However it was a shame I couldn’t have committed more time to it, and achieved more of the final aims.

Retrochallenge 2015/07 – Debugging the 6502 Machine Code

With time rapidly running out for this challenge I’m hoping to at least get a simple animation working on the Electron.  Once I had written my first simple test code I discovered that the “calcscrloc” code had a couple of bugs.

Below is the debugged Calculate Screen Location Routine:

.calcscrloc
NOP ; CALCULATE MEMORY LOCATION
NOP ; STORE IN &70,&71
NOP ; A 0/1 FOR EVEN/ODD
TYA ; READY TO PROCESS
LSR A ; DIVIDE BY 2
LSR A ; DIVIDE BY 2 (4)
LSR A ; DIVIDE BY 2 (8)
STA &70 ; USE AS TEMP STORE
ASL A ; MULT BY 2
ASL A ; MULT BY 2 (4)
CLC
ADC &70 ; ADD ORIG VALUE (X5)
CLC
ROR A ; SHIFT RIGHT BIT 0 IN C
STA &71
LDA #0
ROR A ; SHIFT C INTO BIT 7
STA &70
TYA ; ORIGINAL Y COORD
AND #7 ; BITS 0-2
ORA &70 ; ADD 0 TO 7
STA &70 ; STORE
LDA &71
CLC
ADC #&30 ; ADD SCREEN BASE
STA &71 ; STORE
TXA ; READY TO MULT BY 4
AND #&C0 ; TOP 2 BITS
LSR A ; MOVE RIGHT
LSR A ; MOVE RIGHT
LSR A ; MOVE RIGHT
LSR A ; MOVE RIGHT
LSR A ; MOVE RIGHT
LSR A ; BITS ARE NOW 0-1
CLC
ADC &71 ; ADD TO MS BYTE
STA &71
TXA ; READY TO CONT MULT BY 4
AND #&3E ; BITS 1-5
ASL A ; MULT BY 2
ASL A ; MULT BY 2 (4)
CLC
ADC &70 ; ADD TO LS BYTE
STA &70
LDA #0
ADC &71 ; ADD CARRY TO MS BYTE
STA &71
TXA ; NEED ODD / EVEN
AND #&01 ; WE JUST NEED BIT 0
RTS
.incscrrow
NOP ; INCREMENT SCREEN MEM ROW
PHA ; PRESERVE A
TXA ; TRANSFER TO PRESERVE
PHA ; PRESERVE X
TYA ; TRANSFER TO PRESERVE
PHA ; PRESERVE Y
INC &70
LDA &70
AND #&7 ; USE BITS 0-2
BEQ incscrrow_1
.incscrrow_2
PLA ; POP (Y)
TAY
PLA ; POP (X)
TAX
PLA ; POP A
RTS
.incscrrow_1
DEC &70 ; DECREMENT BACK
LDA &70
AND #&F8 ; MASK OUT BITS 0-2
CLC
ADC #&80 ; ADD THE LS OF &280
STA &70
LDA #0
ADC #&2 ; ADD THE MS OF &280
CLC
ADC &71 ; ADD EXISTING MS BYTE
STA &71
JMP incscrrow_2

So I now have the following BASIC code creating a very simple animation moving the ball down the screen:


OLDX%=-1
OLDY%=-1
FOR A%=0 TO 251 STEP 2
IF OLDX% <> -1 THEN X%=OLDX%:Y%=OLDY%:CALL removeball
X%=79
Y%=A%
Z=USR(displayball)
OLDX%=X%
OLDY%=Y%
NEXT

It is however very flickery and so I may need to see if doing the remove within the assembly is going to be faster than doing it in BASIC.