aboutsummaryrefslogtreecommitdiff
path: root/mkmusiclabels.pl
blob: f47cbfebdc19acb7897cb0f798488f48b1a1d375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl -w

$startaddr = 0;
$entry = 0;
do {
	$startaddr = 0x8FC3 + $entry * 5;
	printf 'range { name "mus%02d_addr1"; start $%04x; end $%04x; type addrtable; };%s',
			 $entry, $startaddr, $startaddr+1, "\n";
	printf 'range { name "mus%02d_addr2"; start $%04x; end $%04x; type addrtable; };%s',
			 $entry, $startaddr+2, $startaddr+3, "\n";
	printf 'range { name "mus%02d_len_or_tempo"; start $%04x; end $%04x; type bytetable; };%s',
			 $entry, $startaddr+4, $startaddr+4, "\n";
	print "\n";
	$entry++;
} while($startaddr < 0x8fff);