Steffest digitale pulptuur

Naphta

Another demoparty, another demo ...

I made NAPHTA!

Released at RSYNC 2025.

An OldSkool demo for Amiga OCS inspired by a live performance I attended and captured of NAFT, a Belgian Live Analog Techno band.
The music is partially based on, or at least HEAVILY inspired by "Paroxysm" by Naft.
If you want to check out the MOD file -> here in Bassoontracker.
It runs on an Amiga 500 with 512k fast ram or beyond.

Technically, it's a big step up compared to my previous production, but still: baby steps.
I really wanted to use assembler, but progress was just too slow.
I got to the point where I could load some graphics and put them on a custom screen in assembler.
Yay! almost a demo! But then each additional step took another week of dabbling and tinkering.

Deadline Rsync was approaching, so I made the executive decision to move back to C.
Hardware banging this time.
I found this YouTube series "Amiga hardware programming in C" that I could wrap my head around, and it gave me some much-needed direction.
Thanks Wei-ju Wu!

Another "aha moment" came when Gigabates explained what the copper actually does, and - in essence - how simple it is.
He said "For graphics, you can think of the copper as timed palette changes: You just wait for a certain position on the screen, and then you can set any color index to any color, and then it will use that color from that position going forward"

"Ping! ..."
Ooh!!! I can do something with that!

I started some experiments to have a patterned image on screen. the image stays static but when you start switching colors, you can target each pattern section individually and give it a unique color, circumventing the usual 32 color limit.
This is of course a well known "copper chunky" trick, but I found it interesting that each "pixel" doesn't have to be square, it can be anything you want.
This formed the basis of most of the effects in Naphta. (can you call them effects?)

I aimed for some sort of stained-glass visual.
To keep things simple, I used horizontal patterns in 16 or 8 colors, so I could avoid swapping colors midway on a scanline.
Also, I stayed away from color 0 to avoid having to reset it each line when entering the overscan areas.
Yeah.... not the most hires copper-chunky, but it was a nice experiment and usefully to wrap my head around the copper.

This is the image for the soft pixel blur anims. The picture doesn't move, the animation is just the copper, setting palette colors like crazy.
The "slowness" is not the copper, by the way, it's the C code that has to calculate the correct copperlist index of each position. I probably should/could precalculate that too.

grid15.png

I'm still largely clueless in C-land. I really should dive into BartMans toolchain and set up a proper monitor/compiler.
But even now:
Boy, oh Boy, oh Boy, now I FINALLY understand why everybody loves those custom Amiga chips.
What a beautiful system.


Another interesting bit - Or at least I though so - was the use of the music to drive the timing of the effects, and not the other way around.
I'm using the excellent PTPlayer replay library and this supports reading out the "E8" command.



This way you can let the music control which part of the code should be triggered, and you still can use all the Fxx commands you like to set the music speed.
Double handy in my case as I don't have a clue how fast my code runs (I know it's sloooow though :-) ) and often routines take several frames to complete, so having an external thingie to keep the timing is nice.

And a third concept was that I got somewhat obsessed with "transparency" on Amiga.
Fact is: transparency doesn't exist on Amiga OCS but ... we have bitplanes!
Bitplanes are layers stacked on top of each other, and you can use that to "fake transparency" if you reduce the color count.
For example this scene uses 5 bitplanes, 32 colors.
trumpeta.png


The first 3 bitplanes are the base image in 8 colors.
trumpetb.png


Then the spotlights are on bitplane 4, forming colors 9 to 16.
trumpetd.png

So if you set those colors to a slight variation of the first 8 colors, you get the impression of a transparent layer.

And we still have 1 bitplane left, so we can repeat this trick on bitplane 5, forming the colors 17 to 32, giving the impression of 2 transparent layers.
trumpetc.png

The way the display works on the Amiga is that each bitplane is "just a chunk of memory".
You can just point to other memory sections if you want to display something else so you don't have to copy things around.
This means that scrolling a bitplane is just "setting the pointer to the address of the row below".
This is trivial if you know it, but it took me quite some time to switch my mental model of a "a screen is something you draw to" to "a screen is just a display of several memory blocks".
Once you make that switch, suddenly you realise you can do some pretty cool tricks.
Combined with the careful palette mapping, you then get - for example - the appearance of a semi-transparent layer that is moving on a background.

Some key takeaways for future productions:

In general: I feel I'm just scratching the surface, still so much to discover and to learn, and making small productions like this is an excellent way to do so, so ... on to the next one!

Source code is on https://github.com/steffest/naphta/

ADF version is here.

Some more background info:

Tools Used:
Graphics:
Based on live footage from the band "NAFT"
Images where first sketched on paper and then produced in PhotoShop, including the Generative Fill tool, so I guess they are not AI free.
So yeah: those nice smoke effects are generated, not pixelled by hand.
Images were finalized and pixel optimised in Dpaint.js.
Some chunky-pixel animations were taken from Giphy.

Music:
The main theme and some samples where lifted from the song "Paroxysm" by Naft using various stem-splitting tools.
The mod file was composed by hand using BassoonTracker:
The disk version of naphta uses a lower-quality compressed mod file to make it fit on a single disk and in 512k chip ram.

Code:
Home-cooked hardware banging C.
Compiled with SAS-C on the Amiga (but written in modern editors)



Steffest on 1/12/2025 4:36:00 PM
Comments:0


Back to index

This is http://blog.stef.be optimised for your mobile device