A new 1-bit music album has been released digitally a couple weeks back (took me that long to post here). Some quite nice authentic sounding stuff from an author I've never heard of before. Made with Beepola, with some extra post-processing at places, but without going too far from the pure 1-bit aesthetics.

Original announcement post
Bandcamp page

I did implement the viznut waveforms for the VIC-20. It was full of nasty surprises for sure, given the difficulty of making well timed 6502 code (added cycles here and there depending on code/vars locations), and really lacking debug tools. Even worse, VICE has some weird audio filtering going on, and MAME does not support expanded RAM for VIC (5K default model only), so I was not able to hear the sound properly, and my test code didn't fit to run in MAME.

It worked in the end, however, it wasn't much suitable for music. The thing is that these waveforms always contains 8 zeroes and 8 ones, just arranged in different ways. So it can't do the usual 50-25-12-7 duty cycle, or arbitrary bit patterns of PET, it just adds high pitched harmonics into square wave. So a special arrangement for music is a must, that would mostly rely of square wave and emphasize some parts using waveforms.

Here is the key part of the code (waveform_table there is to attempt to arrange waveforms in order from regular bold square to the thinest one):

set_pitch_and_wave:

    pha    
    tya
    bne :+
    
    sta <PV_WAVE_PREV,x
    lda #$7e
    sta VIC20_LOW,x
    pla
    rts
:
    
    asl a
    tay
        
    lda waveform_table,y
    iny
    
    cmp PV_WAVE_PREV,x
    beq @skip_wave
    
    sta PV_WAVE_PREV,x
    sta PV_WAVE_PTN
    
    lda #$7e
    sta VIC20_LOW,x
    
    lda waveform_table,y
    
    ldy #100/5                ;delay t-states/5
:
    dey
    bne :-

    tay

@loop:

    lda <PV_WAVE_PTN        ;3
    and #$80                ;2
    ora wavecnt_table,x        ;4+
    sta VIC20_LOW,x            ;4+
    asl <PV_WAVE_PTN        ;5
    lda <PV_WAVE_PTN        ;3
    nop                        ;2
    nop                        ;2
    nop                        ;2
    dey                        ;2
    bne @loop                ;2/3=32t

@skip_wave:

    pla
    tay
    lda (PV_NOTE_TABLE),y
    sta VIC20_LOW,x
    
    rts

wavecnt_table:

    .byte $7d,$7b,$79
    
waveform_table:

    .byte %11000000,3    ;00
    .byte %10010000,6    ;14
    .byte %10100000,5    ;09
    .byte %10100000,4    ;12
    .byte %10110000,6    ;11
    .byte %10110000,5    ;07
    .byte %10000000,2    ;01
    .byte %10000000,3    ;04
    .byte %11010000,5    ;08
    .byte %10101000,6    ;13
    .byte %10010000,5    ;06
    .byte %11100000,4    ;03
    .byte %10110000,4    ;02
    .byte %11000000,5    ;10
    .byte %10000000,4    ;05
    .byte %00000000,0    ;15

In fact, I think I'll release the whole sound code sometime later. Released album code contains most of it anyways, it only missing VIC-20, C64 and NES dependent parts.

I did finish code for PET, VIC, and C64, but integration failed on the last mile - something conflicted or glitched, and my code didn't work in PET and C64 versions inside actual game by reasons unknown. As the integration was done on binary level (not source level), and I don't have a real PET or C64, and available debuggers leave a lot to be desired, and the game was already released anyways (first copies were done without sound), we're ended up with only using VIC-20 part for sound effects. David opted to do his own sound code and even a native tracker for PET instead.

As for music, initially it was supposed that I'll compose it all, to the strengths of my sound code, but as its development was lagging behind a lot, it was decided that Noelle will do SID music in goattracker, and I'll have to convert it for PET/VIC, which didn't work well, of course. So none of my music was used, and that's why I decided to release it as a standalone album.

I covered up the story in my Patreon blog, there is a few posts, you can follow it up by the 'pet robots' tag. Planning to do two more, one on the music editing process (1tracker this time) and data format (pretty compact, the songs 1000-1500 bytes large each), and another one on making of the album itself.

Long story short, I made a 8-song album for Commodore PET. It works kinda like PC Speaker music, just a single channel, but with wave shaping capabilities (different bit patterns) instead of regular square wave. No multichannel synthesis there, although it is sure possible on this beast.

https://www.youtube.com/watch?v=JEhGa5avUKM

205

(1 replies, posted in General Discussion)

Those were mostly produced by the Battle of the Bits gang, when beeper stuff was a novelty to them. I guess they're tired of it, and we're still not provided them with good enough tools to spark interest for newer engines. Like, both 1tracker or bintracker certainly isn't as easy to use as Beepola, and more recent engines don't have an XM converter either.

206

(166 replies, posted in Sinclair)

It is just matter of personal taste. There are dozens of popular trackers in the history that didn't follow the line. There are sequencers in the history that didn't display anything at all, yet was very handy to create music.

It is impossible to do with this design, anyways.

207

(166 replies, posted in Sinclair)

Thanks for report. Yeah, just noticed there is still issues with that, even though it does not do segfault to me. Damnit. Alright, more work to do!

Robin of the Wood game is from 1985, Follin started to do his stuff including Vectron the same year, so it is difficult to say, but it is sure one of the earliest. Also features kinda unusual channel mixing with a single out per loop, take a look (guess that's where ZX-3/10 and Squeeker roots are?).

208

(166 replies, posted in Sinclair)

v0.31 is out. Many fixes in the front-end and many engines. Minimal examples and docs for each and every engine. The classic two-channel engine from Robin Hood is added, in all of its original glory.

209

(136 replies, posted in Sinclair)

hellraver is Alexey Krivtsov of ZX BITLES group, they're actually have a website that was name of one of the entires: http://zxbitles.com/. As I understand, the guys are just recently come the the scene, and is not known by prior works, besides their 2020 game.

210

(136 replies, posted in Sinclair)

My congratulations, utz, and Tufty, on stealing my imminent victory once again! Took me some time to figure out who is behind these amazing tracks, it wasn't too obvious this time, even though I did have clues that engines likely were used and your preferences.

211

(6 replies, posted in Sinclair)

Great stuff!

As I understand, the amount of bits involved into an LFSR directly affects to the length of evolutions of the sound in time, while bits change density per second (like, how fast LFSR is counting) affects to the richness of the harmonic content. So here we have 6144*8 bits large LFSR, even though these bits may be used not the most efficient way. Overall it is just like a regular LFSR-based noise generator like in all old sound chips, but with tricky looped sub-periods (noise harmonics?) in it.

212

(9 replies, posted in Other Platforms)

I'm not a BK user, I think I've never seen one working, so I have about as much clues as you do. Even knowing Russian does not help much there, it all looks extremely cryptic.

Don't put your expectations high, this was only supported by hobbyists who just did their first steps in software development. What you can expect from a computer with a keyboard that looks like it came straight up from a cartoon? In fact I think it is part of the puzzle, it had a ton of cryptic named keys.

https://www.computer-museum.ru/images/soviet-pk/soviet_pk_8_b.jpg

213

(9 replies, posted in Other Platforms)

I was able to run Klavesin in BKBTL Windows, using the BK 0010.01 FDD configuration. Reset machine, Load BIN, then it'll automatically type in S1000 command (start from the load address). Press Enter, and it starts. Had to also enable sound emulation, it was disabled by default.

214

(9 replies, posted in Other Platforms)

There is also BKBTL that has a Qt port and is supposedly works under Linux.

To be honest, I have no idea what the BIN format is, and where it comes from.

177716 has a lot of other stuff, ranging from tape controls to CPU reset vector (!). Don't forget, it is a 16-bit register with plenty a bits on a really oldschool architecture.

215

(9 replies, posted in Other Platforms)

Yes, it is direct bit-banging just like on ZX. There is register 177716 (oct), bit 6 drives both speaker and tape output.

BK uses a PDP-11 compatible single chip CPU, but other than that it is not compatible. It has either a BASIC or FOCAL built-in interpreter (different models), custom graphics mode, etc.

I vaguely remember there was a Tritone port to UT-88 with 8253, just three channels of square wave without duty cycle or different volumes. Maybe it was Apogee or Vector-06C, though. These two has 8253 built-in as well, with all three channels routed to the speaker. All of these are 8080-based machines.

216

(9 replies, posted in Other Platforms)

Here is a list of emulators for Windows. The list says there are better options, but I prefer to stick to one I'm most familiar with, Bashkiria-2M emulator (called just Emu).

So far I have found about 5 beeper editors, but was able to load and hear something from with only one, with a 3-channel engine, called Klavesin (attached).

How to get it started:

Start Emu
Select BK-0010_01
File/Open, set filter to all, select klaves.bin

All others are disk based ones, so you have to be a bit familiar with the MK-DOS on BK-0011, which looks much like Norton Commander from DOS era. Then it gets worse, as neither of the editors have a demo song loaded (but there are some on disks), it is all in Russian, and it considers you know something about the thing. So I wasn't able to figure out any of those yet. Seen that one has loadable 2-ch and 4-ch drivers and a few songs ripped from ZX Spectrum (judging by the filenames).

217

(9 replies, posted in Other Platforms)

I think we've never discussed this one. This is an obscure Soviet era Russian home computer from 1983, one of earliest here. Actually a range of computers, kinda like ZX48/128 series. It is a 16-bit system, based on the LSI-11 architecture. It has extremely ugly graphics, much worse than CGA (imagine that), and of course no sound hardware besides our beloved beeper. Later models like BK-0011M had 128K, disk drive, Covox and AY-3-8910 hooked up, mostly borrowed from Spectrums of the era, but these are minority.

The platform wasn't much popular, always being in the shadow of ZX clones, but it had a following nevertheless, and was one of the second-popular platforms at demoparties. As it is not even remotely compatible with any game computer in existence, all software was created by its enthusiasts. A lot of stuff, from graphics to ideas, has been borrowed from other platforms, including ZX Spectrum. There are some impressive efforts, too, like, Prince of Persia and Monkey Island ports.

To my knowledge, there is a reasonable amount of beeper music. Mostly ripped from ZX Spectrum games, however, with engines rewritten into PDP-11 code, so the sound is much different. There is some original stuff, too, including a couple of music editors with multichannel engines. I would guess that it is the third beeper-heaviest platform after ZX and Apple II, by the sheer amount of stuff.

One problem is that there isn't much videos on YouTube. One can use an emulator (there is a few) and use this archive. Another one is that nearly everything you can find about this platform is written in Russian, so you're going to need a translator. For now a couple videos for you, hopefully will dig out and post some more.

https://www.youtube.com/watch?v=xuy59tQ-8B0
https://www.youtube.com/watch?v=OmR_vR_kEO8
https://www.youtube.com/watch?v=TE8L7-hrNx4

218

(10 replies, posted in Sinclair)

If you'll go the Nth/note with time signatures route, it will be not possible to properly support in tracker-alike editors (I had to replace such formats in some classic engines in 1tracker). Many also consider this format to be difficult to write by hand. So while it may have its own benefits, it dooms the format to never gain popularity.

219

(13 replies, posted in Other Platforms)

Sure, would be nice if it get fixed.

Here is the proof. Run this PRG in VICE, and you'll hear ~245 Hz sound, as expected. Run it in MAME, and you'll hear it twice higher.

The code is:

    lda #$10        ;shift out free running at T2 rate
    sta VIA_CR
    lda #255        ;lowest possible frequency, 1000000/16/255=245hz
    sta VIA_T2CL
    lda #%00001111
    sta VIA_SR

220

(13 replies, posted in Other Platforms)

Thanks to utz's input I got PET running in MAME. Turned out that MAME emulates 6522 quirks better, like, VICE would allow incorrect code to work just fine. However, MAME's SR produced pitch is twice higher than it should be.

221

(2 replies, posted in Sinclair)

Phaser1 in the first song, Music box for second one. BeepFX default set for sound effects.

222

(13 replies, posted in Other Platforms)

I'm working with VICE, as I wasn't able to set up MAME properly. Judging by MAME source code, it does emulate IRQ on shifting, or trying to do so, at least. Latest updates to 6522 emulation there were doing in August, so it is kinda alive.

Emulation quality in VICE, on the other hand, is kinda questionable. It is incomplete, and the way the sound emulated is really weird. Like, direct CB2 control sounds unfiltered, while SR-driven sound is clearly filtered with very weird curve, it gets quieter as the pitch rises, up to the point of being really faint, then gets back to normal volume. So it sounds like a mess in a normal music. Also pitch and frame rate seem to be a bit off.

I didn't find any in-depth docs other than that you're mentioned, and I missed pet-io-2.txt altogether (thanks!). I also used 6522 datasheets, there is three of them, and they're actually different. Synertek SY6522 from 1982 (not 1978!) seem to be more detailed in the timers section. I also looked up VICE and MAME source code.

As I don't have access to the real thing, and active back-and-forth is kinda difficult to do (David is busy man), I can't say for sure. However, Synertek datasheet mentions it explicitly - first enable shifting, then load value to the register to start shifting. As for bit 5 of ACR and loading $ff, I did it other way, by toggling bit 5 of PCR - it does work on the HW regardless of the shift register contents. However, there is the missing notes issue, may be related to either of these things. Will try your approach (looks more elegant), thank for hints.

223

(13 replies, posted in Other Platforms)

6522 is not a real serial interface, it is merely a timer plus shift register, so it does not really know about start and stop bits, it is all up to software to implement actual communication protocols.

When 6522 used for CB2 sound, the free running mode driven by T2 counter is used, that is, a 8-bit counter divides 0.5 MHz and clocks a 8-bit output shift register that is looped. Naive approach for PET sound is to load %11110000, %11001100, or %10101010 into the shift register, then set up T2 counter to some desired frequency. This means you can't go below 500000/255 Hz (~245), but you can have wave shapes other than regular square wave.

There is another mode where you can also output an arbitrary bit stream, getting an IRQ every time when shift register gets empty, thus getting some buffered playback. This mode is not emulated, unfortunately.

224

(13 replies, posted in Other Platforms)

T2 high byte is not supposed to work in the free running mode. I hoped there is some hack to make it work, but considering not so precise emulation and lack of real hardware (not even sole 6522 chip) on my end, I can't do tests. Well, the main issue with pushing PET is that it isn't emulated well (not all timer modes covered, for one), and there is like 1.5 PET emulators around (.5 in MAME, difficult to setup).

To me it seem the only viable way at the moment is to use IRQ to toggle CB2, I did it as a software Shift Register imitation there. However, there is some issue on the real HW that is not figured out yet is that some tones disappear when you switching between IRQ and Shift Register (just on the transition point, maybe IRQs get skipped?), and this behavior is not emulated (works just fine in emulator).

Another issues are that default IRQ handler pushes all the registers before going IRQ trampoline, which wastes a ton of time; default system handler still need to be called once a frame (to make keyboard input work for the game), which introduces clicks; and unexpectedly annoying one, speaker in PET barely can reproduce low frequencies, they're getting very quiet.

225

(13 replies, posted in Other Platforms)

I liked the achievement, but the bit pointed at Mr. Murray was kinda uncool. The 'wrong' person 'hired' implied there is me, I'm working on sound code for his project. Not to mention it questions my abilities, it also does not consider Mr. Murray has a vision on what he wants in his project. Sure I proposed multichannel stuff, sampled SFX, and other advanced things a while back for Planet X3, and once again for this one, but these ideas were all rejected in favor of the standard monophonic sound, not even going below the 245 Hz limit was considered at first. It also needs to be cross-platform (VIC-20, C64, with their native sound as well), and fit into mere 2.5K with code, SFX, and a music track.