Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SN76489 Spectrogram Test Results

Reply to topic
Author Message
  • Joined: 14 Sep 2018
  • Posts: 26
  • Location: Earth
Reply with quote
SN76489 Spectrogram Test Results
Post Posted: Wed Oct 03, 2018 10:12 pm
So I discovered the ominous beauty of spectrogram sound art. Since I'm also a chiptune musician I had yet another crazy idea... Is spectogram art possible within the limitations of chiptune?..

With Deflemask & Sonic Visualizer, I learned through trial-&-error on how spectograms display sound data, once I figured that out I attempted to try something simple first; a message.

It also seems that note B-6 is the highest you can possibly go for an image height limit, any higher and the notes start behaving erratically, skipping/repeating tunes & whatnot. Not sure if its a bug in the sound chip or the emulation, or me being stupid again, idk honestly.

I quickly realized the square wave channels display horizontal lines with no problem, this can be done with a single note if all you're trying to draw is a simple horizontal line. The real challenge was displaying vertical lines, I got around this by playing a multiplexed sequence of specific note strobes, this could be done with a single square channel but I figured its probably better with at least 2 working together for the sake of quality.

The next challenge was displaying multiple horizontal lines in parallel of one another. This too can theoretically be done in a specific multiplexed note strobe if you're trying to keep the number of channels used at a minimum, the only cost though is quality. In this instance however I didn't really do that, 2 channels were more than enough for this. Ultimately, I used square 1 to display the bottom half of the message, then I used square 2 to display the top half. I only used square 3 to fill in some of the middle parts, I could've multiplexed square 1 & 2 for that but I didn't want to sacrifice quality too much. This was all done in emulation so I'm not certain what it will look like when played on actual hardware, I would test it on my Game Gear but I don't have the necessary audio jack cable for a direct recording.

To tidy things up, I used the white noise channel in the background to fill in the gaps of silence between letters but it ended up sounding a little creepy O_o Now it sounds like a signal from outer space or something...

.....yea I might be crazy.

*edit; Oh wow.. after posting this I just now realized I've been spelling spectrogram wrong this whole time (-_-)

*edit again; re-uploaded the files with spelling fixed, epic fail. Sorry guys >_<

Below, is an image of the results, along with an audio recording (be warned, it doesn't exactly sound pritty). There is also a .zip containing both the .vgm & .dmf project. Feel free to experiment, improve upon or freely use this in any way you see fit.

  View user's profile Send private message
  • Joined: 24 Sep 2018
  • Posts: 39
Reply with quote
Post Posted: Wed Oct 10, 2018 6:18 pm
Out of interest, what's the horizontal scale and by what means are you counting time? Just a tight loop, or an interrupt source?

The only reason I'm asking is that I was peeking at the schematics earlier and I noticed that the SC1000 and SG3000 have the z80's WAIT signal connected to the corresponding SN76489 whereas the Master System isn't shown as having anything that can cause the CPU to WAIT. I therefore assume — though they were just schematics, so not exact, and not necessarily accurate — that the SN76489's READY output is used to halt the Z80 briefly each time it tries to load an SN76489 register.

Which is a long-winded way of saying that if it's a tight loop, the text might look a little fatter on an SC1000/SG3000 than a Master System. Though I dare imagine there aren't any emulators that would reproduce this.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Sep 2018
  • Posts: 26
  • Location: Earth
Reply with quote
Post Posted: Thu Oct 11, 2018 8:08 am
TomHarte wrote
Out of interest, what's the horizontal scale and by what means are you counting time? Just a tight loop, or an interrupt source?


That was just a quick image export from Sonic Visualizer, the x axis is supposed to be time measurement but for some reason is wasn't included in the snapshot, the y axis is for frequency measurement.

TomHarte wrote
The only reason I'm asking is that I was peeking at the schematics earlier and I noticed that the SC1000 and SG3000 have the z80's WAIT signal connected to the corresponding SN76489 whereas the Master System isn't shown as having anything that can cause the CPU to WAIT. I therefore assume — though they were just schematics, so not exact, and not necessarily accurate — that the SN76489's READY output is used to halt the Z80 briefly each time it tries to load an SN76489 register.


I wouldn't know honestly, its beyond my comprehension. I'm not sure how .vgm data works on an assembly-level basis nor do I know how Deflemask handles/produces .vgm data. If anything, I'd ask I_olivera about that, he's far more knowledgeable about these kinds of things than I am.

TomHarte wrote
Which is a long-winded way of saying that if it's a tight loop, the text might look a little fatter on an SC1000/SG3000 than a Master System. Though I dare imagine there aren't any emulators that would reproduce this.


That's why I shared this, just in case anyone might be interested in testing it out on real hardware. Thankfully Deflemask has a ROM builder so I can test it on my Game Gear & SMS sometime when I have the necessary cables to properly capture an audio sample. I don't currently own any SG1000 or SC3000 hardware so I have no way to capture an audio sample from those systems. It would be neat to see if there are any differences given how their sound chips work differently.

As for emulation, apparently Deflemask uses MAME for the SMS SN76489 chip. Unfortunately it doesn't go into any specifics or details on it.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!