Negative Charge
banner
negativecharge.bsky.social
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.

⎍∧∿⩘
I think the best way is to decode the whole file and compare the output with the original, uncompressed version. If I find time I’ll give that a go. Your code is significantly different from DMSC’s original with the use of the buffer offset, so not easy to compare directly.
October 2, 2025 at 6:59 PM
Ah, okay. I’m using the original code I linked to from DMSC. check_end_song looks correct to me there unless I’m missing something?
October 2, 2025 at 6:05 AM
Thanks! Trying to locate the issue in the original code. Is your fix the addition of the bne and bcs here?

github.com/dmsc/lzss-sa...
github.com
October 2, 2025 at 5:27 AM
It's mightily impressive. Chris is the master. I've something slightly different in mind... sample playback alongside SN playback.
September 9, 2025 at 1:06 PM
Sound chip you say? 😊

Unlike the BBC Micro, the Acorn Electron has no dedicated sound chip. It simply has a counter built into the system's ULA that can be programmed to drive a speaker as a primitive square wave generator with two volumes - on/off.
August 19, 2025 at 4:53 PM
It really just increases the pitch, so that would need to be adjusted on the SWRAM version if I can get that to work. The audio quality is mostly affected by the 4-bit samples that play on two channels on the Beeb being reduced to a 1-bit threshold on a singlr channel with no volume control.
August 16, 2025 at 10:40 AM
Yes, I think further change is required to the BBC code. When I get some time I’ll investigate. There’s also no optimisation of the original code except for reducing two delay loops.
August 16, 2025 at 10:30 AM
Nice job! Hope the driver wasn’t too painful to work with. I must give the conversion another go at some point. I’m pretty sure I can get it to sound better.
August 13, 2025 at 9:22 PM
It’s already sounding better in my latest build. The original code contains a delay loop for the sample playback, which when halved sounds a lot better. Still many cycles to reclaim though.
August 13, 2025 at 8:45 AM
Thanks. No, this is from main memory. Had to relocate it as the Beeb version uses memory close to the start of Mode 7. I’ll compile an SWRAM version soon to see if it makes any difference.
August 13, 2025 at 4:21 AM
Not tried SWRAM on the Electron yet. Hopefully the code is similar enough to the BBC Micro implementation. I’ll have to research.
August 2, 2025 at 11:26 AM
...and here's an attempt on the Acorn Electron. There are additional timing differences to be resolved, but it's basically working.
June 21, 2025 at 9:39 AM