This weekend we, iNSANE, attended GERP 2016, an annual Amiga party held in Skövde, Sweden. We made a small 40k intro for the compo and got 3rd place.
The demo was coded pretty much from scratch in two days. On Friday I wanted to see if I could make the "3D rasters" (which you can see in the 2nd part of the demo), and they turned out so well I had to make a production out of it.
In case you're curious, here's some background info on the parts:
Part 1: Seesaw scroller with zooming checkerboard. The Z rotations and distortions on the scroller is the product of combining tech-tech and sinus scroller, both moving in a seesaw pattern. The zooming checkerboard is animated from a single image, where each line is stretched down the screen. Rasterbars are alternated down the screen in a similar fashion to make the checkerboard pattern.
Part 2: 3D rasters. Maybe there's a simpler ways to make these, I don't know. I started off with a simple 3D vector routine, stripped the X and Y rotations and was left with Z only. The calculations are now so heavily optimized that I cannot read it myself anymore. The values from the Z rotation are then used to select a line from a triangle bitmap, and that's what you see on the screen. The background starfield are sprites, and the logo on top is a 3 bitplane (8 colors) bitmap.
The Amiga is one of my favorite machines, especially when it comes to the audio. Most of you who had an Amiga back in the day (and maybe still do) remember that it had four eight-bit, stereo-separated sample based audio channels. But what if I told you there's a way to get a fifth audio channel?
Ok, so it's not a real, real audio channel, but I'm talking about something capable of outputting audio: the Amiga composite video port. It's the same socket as the other two audio ports, it outputs terrible video quality and is not in use on most Amigas. So why not put it to work?
The concept is simple: a bright color outputs a high voltage, while a dark color outputs a low. By changing the screen colors at just the right speed, I'm able to generate audio frequencies and use them to play music.
Let's look at it in detail by examining the video signals for a perfectly black screen:
Now, compare this to a white screen:
The first obvious thing you'll notice are the "dips" in the curve every 64µS. These are the horizontal sync signals, one "dip" per line, and they cannot be disabled. Consequentally, they will also produce an audible humming sound, which you will hear in the video further down.
It is clear that we can easily manipulate the video signals by changing the screen graphics, and by carefully changing the graphics at just the right time, we should be able to make video that's.. well, audible.
I wrote a simple assembly program that fills the screen with 285 raster lines from top to bottom. This means that one line represents the voltage level between two horizontal syncs (or "dips" if you like) as seen in the pictures above. All lines are updated 50 frames per second with the next values from the audio sample.
The code automatically adds a DC offset to the AC audio waveform so the sample data varies from 0..255 instead of -127..127. And since the Amiga only has 16 gradients from black to white, we only use the upper 4 bits of the sample. (Using gradients of various colors will not increase the sound quality, look up how colors are encoded in composite video.)
Now, what I needed next was some way of composing music with this fifth audio track. There are existing programs that emulate multiple tracks through software mixing, but I decided to take the short route and use spare 800 commands in Protracker for playing the last track. To keep things simple, I'm dedicating the 5th track just to the drums, so I don't have to worry about adding support for various notes. The command 8xx simply plays the instrument xx at a preset pitch. As you can see above, instrument 1 (801) is the bassdrum, 2 (802) is the snare, and 6 (806) is the hi-hat. The Protracker replay routine was modified to support these "video samples."
Just like the other audio ports, this one needs to be amplified to be heard. I connected a set of active PC speakers via this adapter cable. Although I built this one myself, similar cables are dirt cheap on eBay, if you want to try this out for yourself.
Take a chill pill, Picard, and listen.
Here's the proof-of-concept demo. The audio is a bit low, but if you listen closely, you can hear that I'm gradually spending all 4 audio channels before introducing the drums.
I've had the longest vacation in my lifetime this summer. 4 weeks of nothingness! Well, not exactly - I attended the Solskogen 2016 demoparty, and contributed with a demo called "Kaimana", coded for (and on) an OCS Amiga.
The demo ended up 5th in the Oldschool demo compo. Most of the code was ready before the party, but all linking and transitions was done on-site. The Pouët page for the demo is here.
The name "Kaimaina" is Hawaiian, and means "The power of the ocean", which explains the nautic theme. The demo features effects such as a textured twistraster, RGB plasma tunnel and a cylindrical textured twister. There's a metric shit tonne of assembly code behind it.
If anyone out there are interested in technical details on how it was done, let me know and I'll make a post on it.
When I received this laser engraver, I read warnings against attempting to engrave transparent or metallic materials. Good thing I'm not a smart guy, so I decided to try it anyway. It had to work. Guess what? Turns out it works a treat!
I decided to try and make LED illuminated signs, kind of like those "exit" signs you see places. The principle is simple: light passes through the sheet, and wherever there are bumps, engravings or scars, light will exit.
I bought two sheets of 300x300x2mm styrene acrylonitrile. They are easy to cut and come with a protective film on each side. This is a good thing, because these guys scratch easily. The sheets were cut by tracing the desired route with an utility knife, and then giving it a friendly whack to split the board.
Here's the sheet with the protective film on each side intact.
Here you can see the transparent sheet (without the protective film) being engraved. It's from another project, but shows the job being done. It had to run at a low speed in order to have an impact on this particular material.
Dickbutts aside, here's the first successful project I made. A square blue LED is superglued in an bottom insert, flush with the rest of the board. The edges are quite illuminated, this can be prevented either with electrical tape, or painting the edges with a solid colour. I think it looks cool the way it is.
Here's the CR2025 battery wedged between the LED's cathode and anode pins, which conveniently serves as a rest. The internal resistance of this battery is so high that a current limiting resistor is not required.
By adjusting the focus and the burn time, I was actually able to cut through the 2mm styrene acrylonitrile completely. However, while experimenting with this I stumbled across something unexpected - but I'll save that for a later post. (How's that for a cliffhanger ending?)
A couple of weeks ago I ordered a NEJE DK-8-KZ 1W laser engraver/cutter from China, basically because the price was too good to let go. I spent a couple of hours yesterday trying to etch and cut a few different materials.
Fume extractor and lights mounted on top.
The Neje was surprisingly easy to set up and use. After unboxing and connecting the cables, simply install the CH340 driver and the software from the supplied MicroSD card and off you go. The device did not require any assembly or calibration.
It needs power from two 5VDC USB sources, one for the motors and one for the laser. I used an old 2A iPad charger and the PC's USB port for the other, which also happens to control the device.
The overall build quality is good. I went over all the screws and tightened them with the included Allen key, but all seemed to be sufficiently fastened. No loose ends, no rattling, no cracks or unwanted gaps in the plastic.
The software included is very simple to use. Basically, all you need is to drag'n'drop a 500x500 pixels image and start printing. The program supports some basic image rotation/translation/zooming. Before engraving, the printer goes into preview mode, hit the red button to switch to print mode.
I tested a few different materials out of curiosity. It easily engraved paper, cardboard, colored plastic, FR4 PCB, paper based PCBs. It would cut thin plastic, colored plastic foam, paper and thin cardboard. Unfortunately, but not surprisingly, it did not engrave transparent acrylic glass. Metals and other reflective surfaces were not tested.
Pros and cons time.
Pretty much plug and play
Small and compact
Beginner friendly software
Very small print area, about the size of a box of matches.
Bottom plate easily gets engraved/cut if you're not careful
Overall conclusion: I'll make use of it, and I'm satisfied. Money well spent.