Experimenting with an Arduino and a SN76489
Stick to ruby2.3 or else have to install msys2 version of dev kit and the 750Mb of disk space that monster eats up Jekyll now seems to need to compile some native libs so install is a bit more fiddly than it used to be.
Install chocolatey
Install ruby --version 2.3.3
gem install bundler
choco install ruby2.devkit
cd c:\tools\devkit2
ruby dk.rb init
{ | |
"version": "0.1.0", | |
"command": "cmd", | |
"isShellCommand": true, | |
"showOutput": "always", | |
"echoCommand": true, | |
"suppressTaskName": true, | |
"args": [ | |
"/C" | |
], |
We use Deflemask to author SN76489 chip music, for which support is aimed mainly at NTSC Sega Master System. We export these tunes as VGMs from Deflemask and then to get them working on a BBC Micro we have to do some shenanigans because the BBC version of the SN76489 has two key differences from the SMS:
- It is clocked at 4Mhz not 3.58Mhz
- It has a 15-bit linear-feedback shift register (LFSR) for noise channel generation (the SMS version has 16-bits).
Because the squarewave output of the sound chip is driven by its clockspeed, to transpose frequencies from NTSC to 4Mhz we have to adjust every pitch value sent to the chip registers. This is done mathematically by converting the NTSC pitch register value to Hz and then calculating the equivalent pitch register value on a 4Mhz clocked chip to deliver the same Hz frequency.
That bit is easy (ish).
The tricky bit is when musicians use the tuned periodic noise function on the chip to create basslines. In this scenario channel 2 pitch controls the pitch of t
Objective is to create a simple toolchain that can compile a bunch of code or data assets into a single file.
- compression
- load time
- more than 31 files per disk, and no need to load bloaty 512 byte disk catalogs
- can control disk layout order for optimum seeks
- toolchain can take a pak-config file as input, and output a TOC file. This can be directly INCBIN'd in the runtime code.