Resource centre for ZX Spectrum games
      using Manic Miner and Jet Set Willy game engines

 

Archive of the

Manic Miner & Jet Set Willy Yahoo! Group

messages

 

 

 

Message: 7206

Author: ian.rushforth

Date: 03/10/2018

Subject: Re: Manic Miner: Format of title-screen tune

 

Andrew wrote:


> As in the in-game tune, each pitch is represented according to Richard Hallas's tone-chart (I have not

> researched the effects of values 0 and 255).


They both yield notes of extremely low pitch.


> But the two pitches must be different, otherwise no sound is heard (this can, of course, be exploited

> deliberately to introduce rests). If only one note is to be played, the standard solution is to set the third byte to > the value of the second byte plus one, e.g. 128, 129.


The reason why no note is heard if you attempt to play two notes of identical pitch, is because the timing of execution of the XOR #18 command [at #9300] when the first note's pitch counter (the D register) reaches zero, is exactly coincident (happens during the same pass through the Title Tune routine's inner loop) with the execution of the XOR #18 command [at #9308] when the second note's pitch counter (the E register) reaches zero.  So bits 3 and 4 of A are flipped and flipped back again, before the signal from A is sent to the speaker port.  As a result, the speaker diaphragm is not flipped at all for the whole duration that this pair of identical notes is played!

 

 

arrowleft
arrowright