Negative Charge

Negative Charge

@negativecharge.bsky.social

Retro-musician, 8-Bit, 6502. Mainly creating music drivers, players and conversion tools from 8 & 16-bit sound chips to the BBC Micro’s SN76489 and Acorn Electron’s ULA. ⎍∧∿⩘

368 followers116 following208 posts

C64 SID Playback on the Acorn Electron This is better! I used the same output routine from the PT3 player for 1-bit sound, and it's a significant improvement. Shouldn't make your ears bleed as much. 😂🔊

Returning to the Acorn Electron and my ongoing mission to get better sound out of it... I've taken the Vortex II PT3 player engine from the BBC Micro player I put together and created a new 1-bit Electron ULA stage to dynamically play the PT3 files. Sounds better than the SID attempt so far. 🔊

So, I kicked out the OS and employed all 4 6522 VIA timers to map to envelopes plus the three MFP timers to bring Mad Max's (Jochen Hippel) famous track "There Aren't Any Sheep in Outer Mongolia" from the "Ooh Crikey Wot A Scorcher" Atari ST demo to the BBC Micro as it should be heard. 🔊

Here's a second Atari ST YM2149F tune converted to the BBC Micro SN76489. This one uses both hardware envelopes and timer effects across all three MFP timers that have to reproduced in software / 6522 IRQs on the BBC. There are a few glitches due to CPU demand, but working on reducing that. 🔊

Things the BBC Micro SN76489 shouldn't be able to do - Part 2 So it's possible to create a basic software emulation of the SID chip. Now, what should be an easier task of emulating the YM2149F, as we're dealing with square waves and hardware envelopes, but also MPF timer effects - it wasn't. 🔊

Here's how the same track now sounds on the BBC Micro's SN76489. Remember... there's no hardware SID involved here at all. I've managed to push the sampling rate up quite a bit now. 🔊

So... this shouldn't really be possible (and to some degree it isn't), but here's a version of my SoftSID emulator that plays C64 SID files now running on an Acorn Electron on it's ULA... 1-bit sound... on and off. Carrier noise and artefacts, but it's running.... ⚠️🔊 Turn down your speakers!⚠️

A few more updates... starting to look more like a game, but still a little too slow to be playable. Added in opponent cars - sprites are all placeholders (as is the music). Included code from one of my old sample players as well. I may remove the road shading to see if I can get more speed. 🔊

A quick palette change at the top half of the screen (leaves no longer changing colour at the horizon), and a fix to the disappearing trees, along with better tracking of road curvature and height. Next to see if I can add opponents to the track without severely impacting performance. 🔊

A little more progress... the music is in, added some trees (which randomly disappear at the moment, and don't look right above the horizon due to the palette change) and a mountain range. The small map (you might recognise it) will eventually mirror the curves on screen, but not quite working yet🔊

...and here's what I'll be adding next. Rather than play back the complete SID file I've extracted the original sequencer from the C64 driver (order lists -> patterns -> notes/commands) so I don't have to dynamically convert the SID frequencies to the SN76489. Let's hope there's enough space! 🔊

A few updates.... horizon moved to middle of the screen, now has three lanes for the road, dithering improved and applied to grass too, and added some clouds (which don't move at the moment). It's slightly slower but working on reclaiming cycles. Here's the code running in the beebjit emulator:

A few updates to the SID emulation on the SN76489. Playback speed is better. I'll put all three players (SoftSID, HardSID & NoSID) up on GitHub soon. Just sorting out the automatic memory relocation to filter out digi tracks these players can't yet handle. 🔊

Just a small update, but I now have 4x speed SID files dynamically playing on the SN76489. Cycles are very tight so I had to disable the scope and colour cycling, but sounds good. 🔊

Added in IRQ software bass by default... this is less harsh than using periodic noise via the LFSR. Also improved the scope visualization a little. Still lots of issues with SID files that trample all over the BBC Micro memory map, but this one appears to work just fine. 🔊

Inspired by @kieranhj.bsky.social 's realtime AKS player on the BBC Micro, I reused the AY-3-8912 to SN76489 converter to expand this to realtime playback of PT3 files from Vortex Tracker. This opens up another tracker that can now be used for BBC Micro music composition. Much smaller than ym files.

Kieran HJ Connell@kieranhj.bsky.social

Working with Claude to investigate why AY register streams compress so much better than SN register streams, has led to a v3 of the VGI format which puts it in touching distance of VGC compression ratios whilst maintaining the lower and bounded (less spikey) runtime cost: github.com/kieranhj/vgm...

A little side project I've been working on... a lightweight streaming ZX02 music driver for the BBC Micro. Supports main memory as well as multiple chunks spread over SWRAM banks. Without giving too much away, the ultimate platform for this driver isn't just the SN76489... more to come 🔊

A bit of a diversion from SoftSID. I realised that with a few minor changes I could add support for the BeebSID device which interfaces with a hardware SID. Also added a rudimentary menu system and tools to automate the batch relocation of SID files. Should be ready to publish to GitHub soon. 🔊

Quite a significant improvement in sound quality. SID files are now played back via all three tone channels of the SN76489 all set to play PCM audio. A mass of optimisations allows for a higher sampling rate. 🔊

Working on getting some of the more complex SIDs playing. Created a Mode 7 version to free up more base memory, and updated the command line parsing to allow loading from any drive. Still some problematic SIDs that relocate to memory regions not writable on the BBC Micro which need recompiling.

A little more progress on SoftSID for the BBC Micro. Thanks to @kieranhj.bsky.social for testing on real hardware, which highlighted subtle inconsistencies on all emulators... they may sound fine, but the real hardware doesn't like it when you try an over-optimise the writes to the SN76849.

A little more work on SoftSID for the BBC Micro. More SID files are working now once I realised several want to unpack into memory between &c000 and &8000, so I page in a writeable SWRAM bank if available. Also fixed VBI track playback speed (correcting Out Run) and implemented NTSC support. 🔊

Check my latest post here for the updated .SSD to try on your hardware. I realise the previous version I posted had a serious bug that meant it only worked in B-em. This version should work everywhere (hopefully): stardot.org.uk/forums/viewt...

stardot.org.ukSoftSID - BBC Micro software-based SID emulatorHere's something I've been working on for a long while but finally have something to show. This is a pure software-based C64 SID emulator (no additional

SoftSID 0.0.6 for the BBC Micro Added ability to specify the .sid file and track number on the command line. Many optimizations to bring the cycle count down too. Should be ready for a preview release soon once I've chased a few more cycles and relocated some more example SIDs. 🔊

BBC Micro SoftSID v0.03 Now working on other emulators, and directly parsing relocated .sid files. This is the track I've always wanted to get playing properly on the BBC Micro. Getting closer.... 🔊

SoftSID v0.02 for the BBC Micro This is a bit more like it. Upped the audio rate to 6.1 kHz to match the VIC-20 version. Also re-located the SID to &1100 which was the cause of the random hangs and inability to playback on the Model B due to a DFS clash. I need to relocate a different SID now 😊🔉

Ever wanted to play Commodore 64 SID tunes on a BBC Micro without needing additional hardware? Having seen similar attempts on the VIC-20, Atari 800 and ZX Spectrum I thought I'd give it a go. Early days, unstable, and sound fidelity needs to be improved, but it works! (sort of...). SoftSID v0.01 🔊

I previously had a go at converting Tim Follin's 1-bit ZX Spectrum beeper routine for Agent X II to the BBC Micro's SN76489. Here's a follow up attempt with Chronos. The percussion isn't quite right, but the melody is perfectly recognisable. 🔊

Negative Charge@negativecharge.bsky.social

Putting the BBC Micro compressed VGM to the side for now as I can't get it to work at the required speed. Instead, I've been looking at some of the Tim Follin archives posted by @breakintoprogram.co.uk to GitHub to see if I can get any of the classic beeper music playing back on the SN76489: 🔊

I haven't posted any demos for a long while, so here's a version of 2D Pipes in Mode 2 which works as quite a good screensaver for the BBC Micro. No music on this one as I waste 20kb just on the screen mode. No random teapots at the moment either. It might look better in Mode 1 with square pixels.

I've replaced the compression with zx02 from lzss, which on average is giving 2kb smaller files. I've also implemented a new SID converter to handle some of the trickier tunes. Doesn't look any different, but I can now squeeze a few extra tracks onto the BBC Micro music disks. 🔊

Some progress! I now have compressed VGM files (.VGZ) streaming from disk and decompressing on the fly. How do I know it's working? At the very end of the clip you can make out the GD3 strings. Very close to having a streaming, decompressing, SN76489 VGM playback engine. 14KB expanding to 95KB.

Buffer size reduced to 2kb which leaves plenty of memory for vgz decompression. 8271 floppy disk controller support fixed. 60Hz VGM playback fine. So now I'll work on a basic streaming decompressor to a ring buffer for VGZ. The window should be 32kb (which I don't have free) but we won't need that.