Jump to content
IGNORED

Galaga 2600 Sound Test


catlegs

Recommended Posts

Before anyone gets too excited let me say that NO I have not created a Galaga port for the VCS and the day when (if) it becomes a reality is very far off. However, I have made some sound effects and music and written a player, plus wrapped it up in a nice presentation. I'm new to programming the VCS, so I still have a ton to learn before making Galaga is anywhere near possible for me, but reading up on it over the past 3 weeks or so has gotten me very interested in writing new software for a machine that is 12 years older than I am.

 

There are three kernels at work here; the scrolling logo, stationary logo with blinking "Press Fire Button", and the sound test screen. Resetting the program at any point is supported. Select toggles whether the sound/music should be looped when on the sound test screen (the voices for sounds 2 and 3 will get out of sync if looped). The left/right directions of the left joystick cycles through the sounds/music, and fire causes the selected sound/music to play. The sound effects are based off of the NES version and use only square waves (except for the ship explosion sound, which uses the noise wave). All of the sounds/music fit tightly into 1k, and another 56 bytes is used for a table of pointers to all of the different sounds.

 

I haven't tested it on real hardware yet, as I haven't had a 2600 around since I was a kid, and I don't have a harmony cart, so if anyone wants to try it out on theirs and report back I'd appreciate it.

 

Sound/music listing:

0 - Main theme

1 - Enter challenging stage

2 - Challenging stage completed

3 - Challenging stage completed perfectly

4 - Fighter captured by Boss Galaga

5 - Fighter retrieved from Boss Galaga

6 - Captured fighter destroyed by player

7 - Extra life

8 - Kill Butterfly

9 - Kill Bee

10 - Hit Boss Galaga

11 - Kill Boss Galaga

12 - Tractor Beam extended

13 - Caught in tractor beam

14 - Enemy transforms

15 - Enemy dive bombs

16 - Fire missle

17 - Ship explosion

18 - Place badge

 

I'll add the source to my sound player after I clean the code up a bit and comment it better if anyone is interested.

 

Here's a youtube video of me demoing the NTSC version in MESS: http://www.youtube.com/watch?v=9Uap0HZ7DBg

galagaSoundTestPAL.a26

galagaSoundTestNTSC.a26

Edited by catlegs
  • Like 7
Link to comment
Share on other sites

The NTSC version downloaded for me okay. A26 is a raw binary file. I always rename mine to .bin, but Stella should also recognize the .a26 extension.

 

 

Those sounds are great in emulation! However, you will need to listen to it on real hardware as this is a known deficiency in all current 2600 emulators.

 

 

Edit:

For some reason I was getting this mixed up with Galaxian.

Link to comment
Share on other sites

EDIT: I can't seem to download the NTSC file. Also, are those raw binary, or does .A26 have a header on it? I only use Stella on rare occasions, not an emulator person.

Just checked and it worked fine for me. They're raw binaries, you'll be able to see them in Stella's internal browser.

 

Those sounds are great in emulation! However, you will need to listen to it on real hardware as this is a known deficiency in all current 2600 emulators.

I'm planning on getting a 2600 and harmony cart as soon as I have extra money that doesn't have to go toward student loans ;)

 

Thanks for the feedback so far guys.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 3 weeks later...

I'll be interested by the commented source code !

Well, I'll post some source but it's not commented well yet. Life has gotten in the way of me working on projects for fun.

 

Is this "from scratch" or pulled from the 7800's Galaga TIA sound?

 

I want to make 2600 Food Fight, but want to get the sound from the 7800 source code.

Somewhat from scratch. Most of the SFX are ripped from the NES version with me using my best judgement on what to keep while working within the limitations of the TIA.

 

 

The sound player basically works like this.

Sounds are stored with 2 bytes for every note/rest.

The first byte is how many frames long the sound should be played, if this value is read and ends up being $FF then the sound is over since we have reached the stop byte.

The second byte is the voice/distortion (3 bits) and the frequency (5 bits). Currently the voice is in the most significant 3 bits, but I could save a few cycles in my sound player if I put it in the least significant 3 bits.

Any volume information is omitted for the sake of space, so notes/sounds being played are assumed at full volume, unless it is a rest, then volume is set to off.

 

Sounds are updated once per frame. Each sound channel uses 5 bytes of RAM to store the information of what needs to be played (10 bytes total)

a 2-byte address (pointer) that stores where in ROM the sound is located.

a 1-byte note counter that indicates which note/rest in the sound should be played.

a 1-byte frame counter that indicates how many frames of the current not that have already been played.

a 1-byte looping flag that indicates whether or not when the end of the sound is reached to mute the voice or go back to the beginning and play the sound again.

 

Due to timing constraints, sounds must not cross pages.

 

There is also a table of sounds that store the address of where the sounds are stored in ROM.

There is a table of voices.

 

galagaSoundPlayer.asm is the actual sound player

galagaSounds.asm includes the tables and all of the sounds

vcsSoundsNTSC.h includes definitions that make writing the music much easier. (EDIT: i had to rename it to vcsSoundsNTSC.asm because for some reason I'm not allowed to attach a .h file)

galagaSoundPlayer.asm

galagaSounds.asm

vcsSoundsNTSC.asm

Edited by catlegs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...