Thursday, June 6, 2013

GBA SP Speaker Impulse Response



Looks fun? This is what I did for each and every speaker impulse in chipcrusher's Post Processing section.

The goal is to capture not only the frequency response of the speaker itself, but also the effect of its casing and internal components: resonance, cancellations etc.

Its thus very important to make sure to properly close the unit (which can be complicated by the tight confined space) with your soldered speaker leads dandling out without changing the tonal balance of the unit.

A few carefully created test tones are then 'injected' through the leads and recorded with one or more microphones in a mostly anechoic space at a few inches from the device. 

Next the recordings are processed with custom software.

Once thats done, and we are sure the recorded IR data is valid, we need to do the inverse: reopen, unsolder,
close and make sure it works. While the microphones are set up I usually also record native console sounds (games or test code), through that same setup, for later comparison.

Luckily no unit were destroyed, and everything worked just like it did before.

(But you can imagine the stack of devices that I have in the office and in my basement)... there is a psychological condition for that, and also a TV show about it.... Rest assured I ONLY keep tech stuff. :)

Saturday, September 8, 2012

Galaxian's digital oscillator explained.

The Namco Galaxian arcade PCB generates a few different types of sounds:

  1. Analog Fire sound.
  2. Analog Explosion sound
  3. Three Analog 'Rack Noises' (alien drones)
  4. Monophonic Digital Oscillator, which does the quirky intro tune and the aliens being destroyed.

The latter being digitally controlled and generated, it makes it a perfect candidate for the chipsounds bandlimited oscillator generators. The following explains how the digital part is generated:


First, a variable speed pulse is created by using two cascaded 4-bit counters (74LS161) (B). The input clock (2H @ 1.536MHz) is divided by a variable amount according to the last 8-bit value received from the 74LS273 (A)  flip flop. This is done by the Z80 CPU (which runs the game code) when it indirectly sets the !PITCH signal and the required pitch value into the "I/0 & Ram Data Bus" by writing to a specific address in external memory.

This pulse then drives pin 13 of a 74LS393 binary counter (C) which in turn outputs a 4-bit (16 step) binary pattern: 0000, 0001,0010,0011,(...),1111  or  0,1,2,3,(...),15 in decimal.
If those 4 output bits were to be sent to a 4-bit DAC, the result would have been a pretty standard saw waveform with no volume control. But this is obviously not what the Namco engineers wanted...

In this particular design, only 3 output bits of the '393 are used (QA, QC and QD, but NOT QB).
Resistors (D) (15k, 22k, 10k and 33k) are inserted onto the bits to create a weird R-2R 'esque ladder DAC. Also some 'components' of the signal are only added into the DAC depending on two extra
CPU controlled bits (Vol1 and Vol2).  Each driving two of the four available analog gates in the 4066 (E)


If you are following so far you understand that this can generate 4 different waveforms. Once you know this, its relatively trivial using voltage divider maths to figure out what those waveforms would look like.
I used an excel sheet for these maths:




From tests on my board the Vol1 bit is always 0 during gameplay, so logically only the [0,0] and [0,1] waveforms are actually ever used in the game. My guess its that vol1 never gets to be 1 to match the volume of the analog sounds this PCB also generates.

I successfully compared the two available waveforms with actual recordings of the board:



And they were included as oscillators definitions in chipsounds 1.6 under "05 - Arcade/Galax"

Wednesday, July 25, 2012

NES eprom carts



Clockwise from top:

1)Esper Dream 2 Aratanaru Tatakai, Famicom, VRC6, mapper 26, can use regular 27C020 EPROM
2)Lagrange Point, Famicom, VRC7, mapper 85, can use regular 27C040 EPROM
3)Castlevania, NES, UNROM, mapper 2, needs modification to use 27c010/27c020 eproms
4)Super Mario Bros, NES, NROM, mapper 0, no mods needed

Currently using 1 and 3 to run tests for my next updates.
I would also need to add my Dragon Ninja NAMCOT-163 (iNES Mapper 19) in there, but I didnt eprom-ise it yet.