SWIV digitised speech as easter egg?

edited November 2013 in Games
I read in the permission from one of the authors of the game that the game had a "easter egg" with a speech from Aliens. I have never tried it myself, and I have only found it in the forums here once mentioned. Is it really working for the Spectrum version? (I cant try now)

And, another question that comes to mind now is, how much memory do these things take when programming for Spectrum? Im surprised that being such a huge game, they still had room to include that!
Post edited by Ivanzx on

Comments

  • edited November 2013
    Don't know the answer to the first question, but regarding memory usage, it depends. Before the 128K Spectrum days, digitised speech had to be kept short because of the amount of RAM it needed. If I remember correctly you could store about 6 seconds of speech with the best possible quality but it would use the entire RAM. Reducing the quality and keeping speech short was the only way to include it with a game. With the appearance of Spectrums with AY chips things changed for the better. The AY chip can be used to play speech (undocumented feature if I'm not mistaken), it sounds a lot better and it doesn't use as much RAM. Robocop and Chase HQ use this.
  • edited November 2013
    Yep, keeping the S and W keys held down as the last data block finishes loading will cause the border to stay white when complete. You can then press enter to be treated to the easter egg :)

    (I knew this from back in the day but had to check the Tipshop to remind myself!)

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • fogfog
    edited November 2013
    you might find it's stored in the games "level" memory.. as when you play.. it asks you to go to side b and maybe it's over written, if you can only access it once at the start.

    a tape loader vs 5 levels or whatever of game code is a lot smaller.. some games i'd love to see as multiload that have missing levels... 1 that comes to mind straight away is commando, and that's also c64 version as well.

    go look at the c64 version of turbo outrun / savage if you want to see crazy amount of samples in 20k.. but some of it was trickery, using the same word twice but in difference context.
  • edited November 2013
    With clever techniques you can have around 1 second of speech in one kilobyte.
  • edited November 2013
    Regarding Brunos post re speech on the AY chip it has been done on the ZX81 with ZXpand and AY unit.

    http://www.sinclairzxworld.com/viewtopic.php?f=6&t=703&p=7350&hilit=ay+speech#p7350

    7th post down.
  • edited November 2013
    moggy wrote: »
    Regarding Brunos post re speech on the AY chip it has been done on the ZX81 with ZXpand and AY unit.

    http://www.sinclairzxworld.com/viewtopic.php?f=6&t=703&p=7350&hilit=ay+speech#p7350

    7th post down.
    That's interesting. Never knew how that worked.

    I've borrowed one of those samples from the original german thread to test and here's the result.

    http://www.sendspace.com/file/2tn1i3

    Not bad for one hour of "work". (well, mostly cut and paste :) )
  • edited November 2013
    A sample rate of 8kHz can do justice to most human voices. To achieve that you need to send a beeper bit every 1/8000 of a second, or every 437 T states. 1K of memory (1024 bytes) can store 8192 bits or a little over 1 second of audio. You have 437 cycles to find a way to compress that further.

    This treats the beeper as a 1 bit DAC -- it's either fully flexed or fully relaxed and approximating an analogue signal as an up or down is very rough and introduces a lot of noise. You can do better if you try to modulate the position of the beeper's diaphragm by very rapidly firing 0s and 1s at it. The diaphragm has mass and takes time to move so by sending a 0 followed by a 1 in succession very quickly, you can get it to hover at a center position. How quickly you can send the 1s and 0s and how much mass the diaphragm has will determine how much tiny wiggle there will be around that center position. Then you can do things like send two 0s and one 1 and try to get the diaphragm to a 1/3 position. The more levels like this you can define, the more effective bits of a DAC you can simulate. People have done 4-6 bits of DAC resolution on a spectrum beeper like this, 4 bits being most successful.

    The tiny wiggle of the diaphragm that I mentioned can be audibly heard as a high pitched quiet hum. In routines I've written, this carrier has been at 16kHz for mid position and lower for other positions. Human hearing is around 100Hz to 18kHz. Sample tracker in the archive can play sampled instruments through either AY or beeper. It is using this technique for the beeper rendtion and you can hear that high pitch squeal buried in the sound.


    For AY: each channel has 4 bit resolution so it's easy to do four bit samples, simply by controlling a channel's output level. But it's also possible to go up to 8 bits (7 has less harmonic distortion) because the AY has not just one channel, but three channels and their volumes add logarithmically. You can make a table of three channel volumes that can approximate a 7 bit dac output. There are many demos around doing this; I even have the volume table somewhere.
  • edited November 2013
    Lol, I forgot the file I uploaded earlier was made when I sped up my emulator, so here's a real version :)

    http://www.sendspace.com/file/yyi9m3

    (it's only a speech of 2 seconds so if you have problems with sendspace then dont download it.)
Sign In or Register to comment.