Permalink
Browse files

Changes for the switch from SubVersion to git

- Fixed line endings of all text files
- Set executable bit on m.bat
- Added basic .gitignore
- Added freq.pl file for sound table generation
- Added pacemu-master.dsk containing BASIC greeting
- Removed plain assembled pacemu.dsk image
  • Loading branch information...
simonowen committed Feb 4, 2010
1 parent a52d3c0 commit bad7fba0cc8355346323aed7bdd60283cc16ef71
Showing with 2,366 additions and 2,323 deletions.
  1. +3 −0 .gitignore
  2. +40 −0 freq.pl
  3. +2 −2 m.bat
  4. BIN pacemu-master.dsk
  5. +2,321 −2,321 pacemu.asm
  6. BIN pacemu.dsk
View
@@ -0,0 +1,3 @@
.*
!.gitignore
pacemu.dsk
View
40 freq.pl
@@ -0,0 +1,40 @@
#!/usr/bin/perl -w
#
# Generates a look-up table to map frequency to SAA 1099 octave/note numbers
#
# Used by the SAM Pac-Man emulator, available from:
#
# http://simonowen.com/sam/pacemu/
$|=1;
# Loop over 8 octaves
for ($o = 0 ; $o < 8 ; $o++)
{
# Loop over 256 note numbers
for ($n = 0 ; $n < 256 ; $n++)
{
# Determine and store the frequency for the octave/note combination
my $f = (15625 << $o) / (511-$n);
$f{$f} = [$o,$n];
}
}
# Build a list of frequency values (unsorted)
@f = keys %f;
open FILE, ">sound.dat" and binmode FILE or die "$!\n";
# Loop over frequencies from 0Hz to 8KHz
for ($f = 0 ; $f < 8192 ; $f++)
{
# Find the closest frequency in the list built earlier (slow)
my $f2 = (sort { abs($f-$a) <=> abs($f-$b) } @f)[0];
# Write the corresponding octave and note values to the output file
print FILE pack "CC", @{$f{$f2}};
printf("\rBuilding table... %d%%", $f*100/8192) unless $f & 0x7f;
}
print "\rDone. \n";
close FILE;
View
4 m.bat 100644 → 100755
@@ -1,2 +1,2 @@
pyz80.py -I samdos2 -s length pacemu.asm
@if %errorlevel%==0 start pacemu.dsk
pyz80.py -I samdos2 -s length pacemu.asm
@if %errorlevel%==0 start pacemu.dsk
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit bad7fba

Please sign in to comment.