Jump to content
Jet Set Willy & Manic Miner Community

A test file for JSW


Norman Sword

Recommended Posts

I like that its very good. :) My only slight suggestion (and it is off topic somewhat) the attribute cycling does not seem to suit it. I'd suggest either just blue/black or perhaps none ? Blue/Black is quite easy to do, the 'C' projects both have this.

 

Yes, I think just black would be suitably sombre.

 

EDIT: For what it's worth, I've just re-uploaded the file with the above suggestion implemented (attached to original post on previous page of this thread).

 

If anyone should be apologising for taking the thread off-topic, it's me, as this doesn't really have anything to do with Norman Sword's original post/attachment (I'm not sure how I ended up diverting it with this particular micro-project!)

Edited by IRF
Link to comment
Share on other sites

  • 8 months later...

Re Game Over.

 

In JSW their are a multitude of sound effects.

 

The title tune and in game tune plays their notes in a differing method to all the other sound FX's.

Both the title tune and in game tune attempt to play the note over a fixed period of time.

 

Your simple demo routine plays the tune, were each notes length is dictated by its pitch. The overall length of each note is the product of a fixed length and a pitch variable. This has several repercussions. The obvious visual one is the speed change in the boot as it descends. The obvious audio effect would be shifting tempo.

 

Your routine might benefit from using a routine more similar to the in game tune routine. Whereby the length of each note is fixed (sort of).

 

;in game tune

;Pitch of note held in D which should be copied to E before playing

;a=border colour

8B60 LD BC,$0003 ;length of the note overall

8B63 OUT ($FE),A

8B65 DEC E

8B66 JR NZ,$8B6B

8B68 LD E,D

8B69 XOR $18

8B6B DJNZ $8B63

8B6D DEC C

8B6E JR NZ,$8B63

I think I've figured out the reason behind the "sort of" comment highlighted in bold in the above quote from Norman Sword.

 

My first attempt at the Funeral March caused a fixed number of oscillations of the speaker diaphragm. That meant that the higher the pitch, the shorter the delay between each oscillation and therefore the shorter the overall duration of the note.

 

As Norman said, the tune routines play each note for a fixed period, in an attempt to make each note of equal duration. However, there is a slight over-compensation involved, because in reality each execution of the Z80 operation which causes the speaker to oscillate (i.e. each XOR #18) takes a short but finite amount of time (i.e. a certain number of T-States).

 

This is usually insignificant in terms of the overall length of the notes, but when you have an extremely high pitch note, it can start to cause a perceptible increase in the duration of the note.

 

In the previous test file which I uploaded a while ago - 'Game Over Test 3' - I used data bytes with value #01 in the table of Funeral March notes, in order to punctuate the tune. This means that the tune routine attempts to oscillate the diaphragm during each and every pass through the inner loop controlled by the B register via a DJNZ command (that's 256 times per pass through the outer loop, controlled via the C register). The cumulative effect is that those notes are sustained for slightly longer, and the descending foot perceptively slows down at those moments in the tune when the 'silent notes' are being played.

 

I have now created a further test file - 'Game Over Test 4' - in which data bytes holding the value #00 are used to punctuate the Funeral March, instead of #01. The oscillation of the diaphragm now only occurs once for every 256 passes through the inner loop, which is only once during each pass through the outer loop (i.e. 256 times less often than before), so the cumulative impact of the T-States of time spent executing XOR #18 commands becomes insignificant. As a result, the 'silent notes' are of roughly the same duration as the notes of intermediate pitch, and therefore the foot descends much more smoothly (at an even pace) down the Game Over screen.

 

I have attached to this post both of the files referred to above, for convenient comparing and contrasting of the Game Over sequence.

Game Over Test 3.z80

Game Over Test 4.z80

Edited by IRF
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.