SNEcog - The sound of "Sega Master System" (Game Gear, SC-3000H, Tandy, Coleco etc )
Ahle2
Posts: 1,179
SNEcog is an emulation of the SN76489 (and variants) running in a single cog.
It was used in:
Acorn BBC
IBM PCjr
Colecovision
Sord M5
Tandy home computer
TI-99/4A
Memotech MTX-500
VTech Creativision
Sega SG-1000
Sega SC-3000
Sega Master System
Sega Game Gear
Sega Genesis / Mega Drive (it used the SN76489 for SMS compability and some FX in games)
Here is the original first post
It was used in:
Acorn BBC
IBM PCjr
Colecovision
Sord M5
Tandy home computer
TI-99/4A
Memotech MTX-500
VTech Creativision
Sega SG-1000
Sega SC-3000
Sega Master System
Sega Game Gear
Sega Genesis / Mega Drive (it used the SN76489 for SMS compability and some FX in games)
Here is the original first post
My new SN76489 emulator is finished and ready to be uploaded to the OBEX.
I'm having a problem to come up with a good name for it though; And I would like people on this forum to help me out.
For now, the name is "SNcog", but that just sounds wrong.
What should I call it?
Here is an example playback of a "dumped" tune from Sonic 1 on the Sega Master System.
SN76489_DumpPlayer - Archive [Date 2011.05.21 Time 10.42].zip
Copy the file named "Sonic1.vgm" to a sd card and run "SN76489_DumpPlayer.spin" on your Propeller!
Btw, If you want to try other ".vgm files", you will need to unpack them using winzip/7zip!!
/ Ahle2
Comments
Was this chip in the Tandy PC computers?
Well, TI did brand it "DCSG", maybe DCSGcog?
I was just listening to some SEGA chip tunes today. This chip has a distinctive sound.
There are three different variations for the "xor feedback" and my emulator handles all variations with constants at the top.
I don't know if you could call a simple square wave chip distinctive. It basically sounds as most chips from that era did; with two BIG exceptions, NES and C64.
/Ahle2
The SID is FAR more advanced than the other chips.
An indication of this is the fact that I had to optimize SIDcog for weeks before I could get it to run at a decent sample rate. (31kHz)
The SN76489 emulator was made in a day and runs at 175kHz
Compare this (Sega Master System) with this(C64).
(Compare 0:30 onwards on the SMS with 0:20 onwards on the C64)
I could forgive you for not be able to tell the sound from the NES apart from other chips though.
It was not far ahead of the SN or the AY.
/Ahle2
The SN76489 has got 16 pins and is programmed using a single memory-mapped port and an internal latch!
@potatohead
Maybe you are thinking about the wrong chip as well?
/Ahle2
I think you mean AY3-8910 and not AY3890.
I've already done an emulation of that chip for the prop (AYcog); And I'm certain that he didn't think about that one, because it is NOT programmed with resistors and capacitators and is similar to the SN764890 sound wise.
DCSGcog sounds good.
I wonder if this could be turned into a 'cogject' so it can be loaded and reloaded, and also so it could be used by C and other languages?
Technical question
Cogjects can only pass one variable to the cog, and all variables like "samplerate" need to be in an array rather than declared in the spin part. It looks possible to do as it looks like only four variables there - arg1, arg2, res1 and samplerate.
Great little chip
I wrote a music&SFX driver for it years back for the Master System and Game Gear
I may still have the source lying around somewhere!
Very interesting, what games used your driver?
@Dr_Acula
I havn't played around with cogject's, so I'm not sure how to modify it into one.
What about SNEEZEcog, SNORTcog or ANEMULATIONOFTHESOUNDCHIPUSEDINTHESEGAMSTERSYSTEMAMONGMANYOTHERcog ?
:P
Some of the early obex code was written this way, eg the keyboard and mouse drivers.
The code is very close
is passing a number of parameters via a list at 'par' Just need to change it so it passes all the parameters.
It might only be just 'samplerate'. Maybe 'writeregister_p' as well
I will have a look at making my objects into cogjects.
@potatohead
I thought you said that you couldn't tell the chips apart, but after rereading your reply I saw that you actually said the opposite.
To tell the AY 3-8910 and the SN76489 apart isn't easy for an untrained ear though. The difference in noise generation is the easiest way to distinguish which is which.
In some rare cases when the AY 3-8910 uses the envelope generator as a "wave shaper" or in some "ultra rare" cases when the SN76489 uses periodic noise (which actually is a square wave with a duty of 1/16) it's easy to tell them apart though.
But most tunes on both chips uses pure square waves and "white" noise and they tend to sound the same.
SMSANDFRIENDSCOG?
Real pickle on the name. Then again, "SNCOG" isn't so bad, after thinking about it. Could have been SNOG! (and I like that one actually) Good luck with that.
When some artifact of the design can impact a industry, often providing some differentiators, or basis for a new production, there is some element of discovery there, continuing to this day, as people hack on the old chips, looking for "extra stuff", :"in the can". I've followed the retro scene for years because of that. Seems the story almost never ends, with somebody somewhere, convincing old hardware to do new things even today.
That's what I love about the Prop, it's got all the joy of the old hardware, but the added bonus it's new fast, and 32bit, and easy to program, yet we're always finding new ways that this little gem amazes us all.
Try this on the dump player!!
For some odd reason it plays to slow on my dump player.
Change the hardcoded "80_000_000" values to "70_000_000" and it plays at the same rate as in your clip.
(I dumped it just now when playing your game on the MEKA SMS emulator)
I will not do emulations of the other SN PSGs, so I don't need the 76489 in the name anyway.
Actually three of them are almost identical and are emulated in SNEcog(yes I said it) and the last "SN76477" is mostly analog and hard to emulate; It was only used in a few arcade games like "space invader" anyway.
Next, You need to write your own sound generator to combine all the good bits from all the generators.