Friday, 6 March 2020

Machine Detection Intro

I've spent twenty minutes today adding a *tiny* (and simple) little intro screen to the game before the main title screen appears.  This intro displays information about the type of machine the game is being played on as detected by the code added yesterday in the previous diary entry here...

This intro informs the user the machine type being used (PAL or NTSC) and the fact that the music and sound was designed for an 8580 SID chip.

It also gives me a chance to use the 'Cosine' sprites that I designed months ago and that have been languishing in the sprite bank unseen and unused up until now!  The sprites and messages look a little like this when running in WinVICE using NTSC...


Obviously, the message changes to PAL if such a machine is being used.

I'll own up to hacking my own code a bit!  The game essentially uses two 'modes', title screen on or title screen off, which is stored in a label called 'title_mode'.  When title screen is off, the game is in play - the two modes use slightly different code branches.  For example, the colour washing of text on the title screen is handled in one of my IRQ splits, but when the title screen mode is off, the colour washing code is skipped.

However, for this little intro and for various reasons, I need to run a little portion of title screen code and a little portion of game screen code, so there is now an intro check to skip or add certain elements and I admit to doing this in a quite hacky, yucky way!  It works, but I may need to recode this as it's stirring my OCD tendencies!

Next diary entry...