Friday, 20 October 2017

Arkracknix

Arkanix Labs has just released my entry to the 'Crack Intro Music Competition 2017'.  The C64 SID is called 'Arkracknix', a portmanteau of 'Arkanix' and 'crack'.


The competition was organised by Didi and Jammer and had the following rules:

- max. playtime 1:00 min. (PAL playing speed), then repeat or fade.
- max. size: $1000 bytes (preferably located in memory at $1000-$2000)
- single speed only
- no SID model preference (should sound good on all SID models)
- must be handed in as executable format .sid or .prg (might be embedded in .t64 or .d64)
- no graphics or even intro-like presentation is allowed to be included.
- Productions using the music might be released after the voting deadline. The voting should be focused on the music itself.
- the participating musics may not have been released or used in a public production before.
- multiple entries per musician allowed.


My entry was written in Goattracker and as per the rules, plays on both 6581 and 8580 versions of the SID chip.  The SID loops at around the 53s mark.

Information about the competition, including all the entries and any results can be found on CSDb here...

There  was quite an extensive forum thread about the competition here...

You can download my entry from CSDb here...

However!  If you download from this blog, you will get a zip file containing: the tune in SID format, the tune in PRG format that can be dropped into an emulator or transferred to a real C64 and is ready to run, the tune on a D64 image along with SIDPLAY64 ready to run and the tune in the Goattracker native SNG format so you can load it into the editor to poke around with.  As a bonus, there is also a folder called 'unused' which contains another tune that I did not enter because it was too long and I didn't have time to finish.  This tune is in both SID format and SNG format, so you can mess with that too.  Grab all that here...

UPDATE:

After voting, my entry came 52nd out of 85 entries.  That may not sound great, but it scored quite highly on CSDb (8.4 / 10), higher than some tunes that were higher placed.  The scoring system used the CSDb voting system and I didn't understand it... ;)

Saturday, 7 October 2017

Modular Sounds 10

I've just noticed that my 'Uridium 2 Loader' music from the Arkanix Labs 2015 music collection 'SID Doing Paula' has been used by Artstate in their music collection called 'Modular Sounds 10'.


The 'Modular Collection' series contains SID covers of classic Amiga music modules.  My cover is part of the intro to the music collection.

The Artstate collection can be downloaded from CSDb here...

Sunday, 25 June 2017

PureBasic Array Flood Fill

PureBasic CartographPC - Click to Enlarge
I'm coding a mapping application in PureBasic for my group Arkanix Labs, that will be used to produce maps for a C64 RPG called 'Crimson Twilight'.

Actually, a mapping application already exists called 'CartographPC', produced by Arkanix Labs to do just that job, but it is coded in VisualBasic 6, itself no longer supported by Microsoft and increasingly difficult to run on more modern OS's.

At some point (and I can't remember when or why), I started rewriting the application in PureBasic.  All the basic features are included so far, but then it was suggested that I add a 'flood fill' feature to randomly fill areas of the map with selected graphics, to produce random looking patches of dirt, grass, paths and so on, without having to manually fill whole areas.  Hmmm...  flood fill.

A bit of research on the internet about flood fill turned up quite a few theories, the most common being 'recursion'.  Basically, a routine repeatedly calls itself until a certain stage is reached at which point the routine exits itself.

In CartographPC (at least in the PureBasic version) the map data is held in an array, so I needed to find a way to fill an array with certain numbers (which represent graphic blocks) which observed other existing graphics and potential boundaries such as the edge of the map or enclosed area.  To the more seasoned coder, this may present no issue, but I'm new(ish) to PureBasic coding so it was a bit of a challenge and this is what I came up with:


Procedure floodfill(x, y)
  
If a_MAPDATA(x, y) <> blnkchar
 ProcedureReturn 0
EndIf
  
If a_MAPDATA(x,y) = blnkchar
 rnd = Random(rancharsel)
 rnd = rnd - 1
If rnd < 0
 rnd = 0 
EndIf
 a_MAPDATA(x, y) = a_RNDCHARS(rnd)
EndIf
  
If x > 0  ; fill left
 floodfill(x - 1, y)
EndIf
  
If y > 0 ; fill up
 floodfill(x, y - 1)
EndIf
  
If x < mcw ; fill right
 floodfill(x + 1, y)
EndIf
  
If y < mch ; fill down
 floodfill(x, y + 1)
EndIf
 
EndProcedure


The routine is contained in a 'procedure' called 'floodfill(x, y)' that can be called from the main program.  A quick explanation of some of the things in the code above:

  • a_MAPDATA(x, y) is my array holding the map layout with 'x' and 'y' being a location in the 2D array (matrix).
  • 'blnkchar' is a variable which holds the number of the graphic block which is 'blank' on the map.
  • 'rancharsel' is a variable containing the number of graphic blocks the user wants to use in the random fill.
  • a_RNDCHARS(rnd) is an array that contains the graphic blocks the user wants to use in the flood fill.
  • 'mcw' and 'mch' are variables holding the width and height of the map.

So what does each part of that routine do?

If a_MAPDATA(x, y) <> blnkchar
 ProcedureReturn 0
EndIf

The above is the base case which basically says that if the map or area being filled is no longer 'empty', then exit the procedure, or in PureBasic terminology 'ProcedureReturn 0'.

If a_MAPDATA(x,y) = blnkchar
 rnd = Random(rancharsel)
 rnd = rnd - 1
If rnd < 0
 rnd = 0 
EndIf
 a_MAPDATA(x, y) = a_RNDCHARS(rnd)
EndIf

This section checks if the element of the array we are currently on is empty (blnkchar) and if so, it generates a random number (rnd) between 0 and the number variable held by 'rancharsel'. The element in the map array is then changed to contain the number held in the random chars array (previously filled with graphic blocks selected by the user) at position 'rnd'.

If x > 0  ; fill left
 floodfill(x - 1, y)
EndIf

Now some magic (at least in my eyes) starts to happen.  The above checks to see if we are at the far left of the array and therefore map (x > 0).  If not, our 'x' position in the array is moved left (x -1) and the procedure returns to the beginning to change the map array and draw a graphic block on the map.  If we are at the far left of the array / map (x = 0), then we proceed to the next section in the procedure.

If y > 0 ; fill up
 floodfill(x, y - 1)
EndIf

Now we start moving up the map / array, checking and drawing until our 'y' position is '0', the top of the map.  Each time the routine loops around, it check left in the array first and then up in the array.  But of course, we could also move right or down in the array until we reach the far right or bottom of the map / array.  This is checked by the following:

If x < mcw ; fill right
 floodfill(x + 1, y)
EndIf
  
If y < mch ; fill down
 floodfill(x, y + 1)
EndIf

So each time the routine loops, the array is checked left, up, right then down from the current position.  If the drawing was updated on the screen slowly for every graphic block, which in the application it isn't because that would be too slow, the fill would snake around the screen up, left, right and down until boundaries or existing graphics are encountered, eventually leading to the array / map being filled with the desired graphics.

I'm sure that more seasoned coders could refine the code further and make it better / more efficient, but in this state it works for my application and that is fine by me!

If you want the raw code to copy and paste into PureBasic, grab it from Pastebin here...

Friday, 19 May 2017

Rowman

I was asked not so long ago for permission to use one of my SID's in a game that was being made.  The game 'Rowman' by Darro99, was released today.


The SID used was 'Bambam', a cover I did of the Amiga original by Jozz/TRSI.  The SID itself was originally used in the Arkanix Labs music collection called 'SID Doing Paula', which you can read about here...

To download a copy of the game in which my SID appears, visit CSDb here...

Monday, 15 May 2017

UltrafontPC V1.0

Today, Arkanix Labs released Ultrafont V1.0.  UltrafontPC is an application for designing hires character sets for the C64. This Windows application is inspired by the C64 native Ultrafont by Charles Brannon.


This version is a follow up to UltrafontPC V0.9b, an application that I coded in PureBasic.

Changes since UltrafontPC V0.9b include:

Added
- Application window no longer limited to 1975x1124 (experimental)
- Status bar shows hex number of char and which charset is being edited
- Two charsets that can be in memory at same time, displayed at bottom of the main editor window
- Import of previously save charset images in PNG/JPG/BMP format
- Simple screen editor to allow typing test of custom charset/font, with various tools
- Screen editor can switch between U.S. and U.K. keymaps
- Slide up, down, left, right of entire charset without individual char wrap
- Preview of 1x2, 2x1, and 2x2 auto-created fonts in preview window
- Preview window of 1x2, 2x1, and 2x2 fonts can now remain open while editing
- If scanline emulation is selected from main menu, this carries over to auto-create preview window
- Brightness of char edit/preview windows selectable (high, medium, low) and state saved
- Flip char vertical / horizontal
- Status bar showing original ROM symbol and number of char being edited
- Dump charset as image to clipboard
- Both x86 and x64 versions available

Changed
- Image dumps now uses name of current file instead of hard-coded filename to avoid overwrites

Fixed
- Random crashes when exporting charset as PNG/JPG/BMP image
- Redo no longer crashes when at end of list
- changelog.txt file decodes and displays correctly in 'About' window change log panel

The application can be downloaded from CSDb here...

It can also be downloaded from this blog directly using the following links:

UltrafontPC V1.0 x86 Installer (.exe)
UltrafontPC V1.0 x64 Installer (.exe)
UltrafontPC V1.0 No-Installer (.zip)


Tuesday, 14 March 2017

MD201703 - The Bat-Tro

Na Na Na Na Na Na Na Na, Na Na Na Na Na Na Na Na, BATMAN!!!

Cosine has released 'MD201703' otherwise know as 'The Bat-Tro'.  This one file C64 demo features my cover of the music from the first level of Batman on the SEGA Megadrive, Gotham City Street.


T.M.R explains the existence of the demo:

"After the Batman Group uploaded to the C64 Scene Database a series of wired images from their productions on other platforms, T.M.R was inspired to spend a little time producing a version of the Batman logo in high resolution bitmap. Once it was finished, the idea of making it into an instalment of the Monthly Demo popped up so a scrolling message was added from a prototype with a newly drawn Art Deco character set and aNdy was unceremoniously dragged into the fray to produce the music."

At my request, on the Cosine website T.M.R goes onto explain the slight rough edges to the music and instruments in the tune... I was given a *very* short period of time to complete it!  I didn't have time to spend my customary fortnight just tweaking waveform settings!

The demo can be downloaded from CSDb here or from the Cosine website here...

By downloading directly from this blog, you'll get the demo itself, along with the music SID file and the SNG file that will load into Goattracker so you can see the rough edges for yourself as the notes fly past.  Grab those files here...

If you are so inclined, you can watch and listen to the demo on YouTube.  Hopefully the player appears below, if not click here...


Friday, 24 February 2017

UltrafontPC V0.9b

Today, Arkanix Labs released Ultrafont V0.9b.  UltrafontPC is an application for designing hires character sets for the C64. This Windows application is inspired by the C64 native Ultrafont by Charles Brannon.


I've coded the application in PureBasic.  It was heavily adapted from code by Mark Thomas Ross (AuMTRoN), with me fixing / changing large sections as well as adding lots of new code.

Thanks for suggestions and for testing go to Jon Mines (Moloch) and Ray Lejuez (Warlock).

The application can be downloaded via the Arkanix Labs forum here...

It can also be downloaded from CSDb here...

It can also be downloaded from this blog directly using the following links:

UltrafontPC V0.9b x86 Installer (.exe)
UltrafontPC V0.9b No-Installer (.zip)

Sunday, 1 January 2017

Refix 2017

Hot on heels of 'Koalatro' comes Cosine's second entry into the 2016 CSDb Intro Creation Competition.  As with Koalatro, T.M.R coded everything and pixelled the screen, while I provided the music.


According to T.M.R:

"The general design is based on an intro that Cosine were using in the mid 1990s for various releases, although this new iteration doubles the resolution on the logo, splits the background colour on the text lines and expands into the upper and lower borders."
 
The music is a cover of one of my favourite Amiga modules, 'Macrocosm' by Firefox.  Searching for it on YouTube will find a recording of the original.  My cover was written over the period of a few months using Goattracker.

The demo can be downloaded from the Cosine website here...

By downloading from this blog, as well as a D64 disk image of the demo, you'll get the music as a SID file and the music in it's original Goattracker SNG format, so you can load it into Goattracker and see how it was 'built'.  Also included are a series of 'work-stages' of the tune so you can see how it progressed and how different instruments were experimented with.  Grab the files here...

You can watch and listen to the demo on YouTube.  Hopefully the player will appear below, but if not you can watch it by clicking here...