Space99 - Music and Sound Effect Forum

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:ok, have fixed channel C issue.
Please advise if u need anything else. 8)

btw, you mentioned ages ago an issue with the graphics, moreover the scoreboard where some colour changes in the game area got carried into the scoreboard.. is this still something i need to correct?
Great!!!

Out of town at the moment, so will try to merge everything into the game as soon as I am back :)

Yep. There is an attribute problem near Helena's head. In addition I need tweaking of some graphics I made :(

Will contact you as soon as I am home again...

Cheers!!
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Back at home !

I have put all your code in overlay (ALL, so I have more then 3K left for game things :twisted: ) and started integrating sound.

It works perfectly.

I figured out how to wait for a sfx to finish, how to avoid the stepping sound to stop others that go in the same channel, how to distribute ambient sounds like computer beeps in other channels...

I put all alarms and beeps in channel B and keep C for steps, doors, picks, etc.

Still have to integrate most of them, which will take some time, but it is not hard to do at all!

BTW is there any possibility of tweaking the volume? I am not sure if I would do it, but could be interesting for playing tracks in background...

I would like to add some more text with credits in the start up screen and maybe some more dangers (energy balls and maybe even fire) around Alpha... have to think about it.

Still have to send you graphics that need tweaking, but you already have the game frame with scores etc. The attribute missing is just below Helena's eyes.

Another point we should discuss is the name of the game. "Out of Memory" no longer reflects the plot... any ideas?

Also some testers told me that number "2" in the font is hard to read... maybe you can also tweak that?

I need some other graphics, but have no time now to search for them. Basically one for the inventory item of an oil bottle, and inventory and iso versions of the coil of wire. Nothing more difficult...

Cheers.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Chema wrote:I have put all your code in overlay (ALL, so I have more then 3K left for game things ) and started integrating sound.

It works perfectly.
That is fantastic news. I was worried if only because people do not often (if at all) take my source code for their own stuff. Also the labels did not have any unique pretext which i should have done like jcb... or twi...
Chema wrote:BTW is there any possibility of tweaking the volume?
hehe, i guess i should have seen that one coming. The Music is a little loud against the SFX. Yes it is possible.
I can possibly provide one of three methods.
1) Three Maximum volume registers for A,B,C
2) Two Registers for Music Volume and Effect Volume
3) One Register for Music Volume and modifying call to control volume of SFX
Chema wrote:Still have to send you graphics that need tweaking, but you already have the game frame with scores etc. The attribute missing is just below Helena's eyes.
No problem, just need an example and probably lost the original scoreboard so best resend.
Chema wrote:Another point we should discuss is the name of the game. "Out of Memory" no longer reflects the plot... any ideas?
I would need my memory refreshed as to the plot, but i guess you should get your testers to choose the name aswell, ie post this question in games forum.
Chema wrote:Also some testers told me that number "2" in the font is hard to read... maybe you can also tweak that?
Sure, i can change that too.
Chema wrote:I need some other graphics, but have no time now to search for them. Basically one for the inventory item of an oil bottle, and inventory and iso versions of the coil of wire. Nothing more difficult...
Sounds like fun. Drop me email of all graphic changes required.
Can't wait to see (and hear) the next version :P
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote: That is fantastic news. I was worried if only because people do not often (if at all) take my source code for their own stuff. Also the labels did not have any unique pretext which i should have done like jcb... or twi...
Well, I had to change a couple of labels, because I ended up duplicating the random routine :oops: but else it works perfectly. I just have a file sound.s and I add it to the project just after frame.s (guess what does it include?) which, as it fills up to the end of HIRES screen, ends up with

Code: Select all

.bss
*=$c000
This way I use the same source file when compiling and creating the overlay data in disk.
Chema wrote:BTW is there any possibility of tweaking the volume?
hehe, i guess i should have seen that one coming. The Music is a little loud against the SFX. Yes it is possible.
I can possibly provide one of three methods.
1) Three Maximum volume registers for A,B,C
2) Two Registers for Music Volume and Effect Volume
3) One Register for Music Volume and modifying call to control volume of SFX
Well which one is the easiest? I would just need (in the most complicated case):
1- making a track sound at lower volume (like when speeches or at infoposts).

2- set a general volume for sfx
3- set a general volume for music

or

2- set a general volume for sfx and music

I think I saw in your code it was possible to set volume to zero (maybe in PlayAudio when loading reg a with 0?). I could use something similar if you tell me how...

I also have one problem. When ending the game I play the ending tune (depending on success or death) and wait for a keypress to begin again, doing something like:

Code: Select all

; End up track
lda #0
jsr PlayAudio

; Reboot the machine
jsr reboot_oric
The problem is that it seems it does not have time to run the IRQ and perform the turn off of all channels and sound keeps on while rebooting, distorting the tune when restarting.

Can I directly call ProcMusic to achieve this? I was about to try, but as I had to write this... :)
Sounds like fun. Drop me email of all graphic changes required.
Can't wait to see (and hear) the next version :P
Just sent you an email with those... both at googlemail and bitinternet. I am now noticing I did not send you the character set... If you need it to tweak the "2" just tell me.

Just need to add ambient sounds like computer beeps and alarms (and make it to successfully ,mix alarms with other sfx and music, when necessary...)

Then I can send you a first version with sound :)

I also want to add some scrolling text with credits in the main screen at game start. Need to do the scroll routine, as they will work in the empy area of the initial screen.

I wonder how is Dbug going with the intro... :roll:

Cheers.
[/code]
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Chema wrote:Well which one is the easiest? I would just need (in the most complicated case):
1- making a track sound at lower volume (like when speeches or at infoposts).

2- set a general volume for sfx
3- set a general volume for music

or

2- set a general volume for sfx and music

I think I saw in your code it was possible to set volume to zero (maybe in PlayAudio when loading reg a with 0?). I could use something similar if you tell me how...
Ok, i think the easiest way is to provide you with the second option and so you will first need this new variable in the code

Code: Select all

MaximumVolume
 .byt 14	;0(Loud)-15(Mute)
This variable will range from 0 to 15 where 15 is silence and 0 is loudest.
This may seem the wrong way round but it makes the code shorter doing it this way round :P

For the code changes insert this piece of code just before SendAY in the ProcMusic subroutine..

Code: Select all

ControlMaximumVolume
        ldx #02
.(
loop1   lda ReferenceBank+8,x
        cmp RegisterBank+8,x
        beq skip2
        lda AY_Volume,x
        sec
        sbc MaximumVolume
        bcs skip1
        lda #00
skip1   sta AY_Volume,x
skip2   dex
        bpl loop1
.)
And now an explanation/breakdown of what this does..

Code: Select all

ControlMaximumVolume
        ldx #02
.(
loop1   lda ReferenceBank+8,x
        cmp RegisterBank+8,x
        beq skip2
Compare the volume register (that may have been changed by music or SFX) with the reference register and if the same we know it has not been changed in this irq so don't modify the maximum volume. 8)

Code: Select all

        lda AY_Volume,x
        sec
        sbc MaximumVolume
        bcs skip1
        lda #00
skip1   sta AY_Volume,x
Adjust the current volume by the maximum volume allowed. If the result falls below zero then reset volume to zero. 8)

I tried this code with the test program and it works just fine. Interesting sounds when you set maxvolume to 14 (Almost silent) and then play the main tune or the drum pattern of track 02. :D

If you decide to take the bull by its horns, you could do this instead (in the code above)..

Code: Select all

        sbc MaximumVolume,x
and then control the maximum volumes of all 3 channels individually. :idea:
Chema wrote:I think I saw in your code it was possible to set volume to zero (maybe in PlayAudio when loading reg a with 0?). I could use something similar if you tell me how...
Well almost, Passing 0 in PlayAudio will stop the music. :wink:
Chema wrote:Can I directly call ProcMusic to achieve this? I was about to try, but as I had to write this...
Yes the problem you face is indead a matter of time, but perhaps not the way you see it.. :!:
PlayAudio will set up the music for the IRQ routine to pick up when it starts, so simply calling PlayAudio then rebooting the oric will not stop the sound in time.
I think you are looking for a SilenceAll routine, so do this..

Code: Select all

SilenceAll
        lda #128
        sta MusicStatus
        lda #00
        sta AY_Volume
        sta AY_Volume+1
        sta AY_Volume+2
        jmp SendAY
Not tested this but should be fine.
Chema wrote:Just sent you an email with those... both at googlemail and bitinternet. I am now noticing I did not send you the character set... If you need it to tweak the "2" just tell me.
Please send me Character set
:P

So much to do!
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote: Ok, i think the easiest way is to provide you with the second option and so you will first need this new variable in the code

Code: Select all

MaximumVolume
 .byt 14	;0(Loud)-15(Mute)
Perfect! So I can have an option for the player to set volume level...
:)
This variable will range from 0 to 15 where 15 is silence and 0 is loudest.
This may seem the wrong way round but it makes the code shorter doing it this way round :P
LOL
I tried this code with the test program and it works just fine. Interesting sounds when you set maxvolume to 14 (Almost silent) and then play the main tune or the drum pattern of track 02. :D
Will do a test as soon as possible...
I think you are looking for a SilenceAll routine, so do this..
Added, and working.

Now I can also have ambient sounds, stop them when playing a track and restore them properly... Thanks.
Please send me Character set
:P
As you wish :) Notice I added some chars to the unused positions to support French!

Code: Select all

;73 Characters + 7 for special chars (Not defined yet) [CHEMA: 73=', 74=-, 75=ç (put *)]
;80 Characters == 400($190) Bytes 

character_bitmap_row0   ;80 Bytes 
    .byt  $40,$70,$40,$46,$40,$5c,$7e,$70,$58,$4c,$58,$58,$40,$40,$40,$40 
    .byt  $40,$40,$40,$44,$40,$40,$40,$40,$40,$40,$7e,$7e,$7e,$7e,$7e,$7e 
    .byt  $7e,$72,$5c,$5c,$72,$5c,$7e,$7e,$7e,$7e,$7e,$7e,$7e,$7e,$72,$72 
    .byt  $6a,$72,$72,$7e,$7c,$7c,$7e,$7c,$7e,$7e,$7e,$7e,$7e,$7e,$58,$7e 
    .byt  $5c,$7e,$5c,$5c,$40,$40,$40,$40,$5f,$4c,$40,$5e,$40,$40,$40,$40 
character_bitmap_row1   ;80 Bytes 
    .byt  $5e,$7e,$5e,$7e,$5e,$50,$72,$7e,$40,$40,$5a,$58,$76,$7e,$5e,$7e 
    .byt  $7e,$7e,$5e,$7e,$72,$72,$6a,$72,$72,$7e,$66,$72,$66,$66,$70,$70 
    .byt  $60,$72,$5c,$5c,$72,$5c,$7e,$66,$72,$72,$72,$72,$70,$5c,$72,$72 
    .byt  $6a,$72,$72,$74,$5c,$66,$66,$6c,$60,$60,$66,$72,$72,$72,$72,$72 
    .byt  $5c,$68,$58,$4c,$40,$40,$4c,$4c,$53,$46,$40,$66,$40,$40,$40,$40 
character_bitmap_row2   ;80 Bytes 
    .byt  $66,$66,$66,$66,$66,$7e,$7e,$66,$58,$4c,$5c,$58,$7e,$66,$72,$72 
    .byt  $72,$70,$78,$5c,$72,$72,$6a,$5e,$72,$6c,$7e,$7e,$60,$66,$7e,$7e 
    .byt  $6e,$7e,$5c,$5c,$7c,$5c,$6a,$66,$72,$72,$72,$7c,$7e,$5c,$72,$72 
    .byt  $6a,$5c,$7e,$48,$5c,$5c,$5e,$6c,$7e,$7e,$4c,$7e,$7e,$72,$5e,$4e 
    .byt  $48,$7e,$58,$4c,$40,$40,$40,$40,$7c,$40,$7e,$60,$40,$40,$40,$40 
character_bitmap_row3   ;80 Bytes 
    .byt  $66,$66,$60,$66,$78,$5c,$46,$66,$58,$4c,$56,$58,$6a,$66,$72,$7e 
    .byt  $7e,$70,$4e,$5c,$72,$5c,$7e,$7c,$7e,$5a,$66,$72,$66,$66,$70,$70 
    .byt  $66,$72,$5c,$5c,$66,$5c,$6a,$66,$72,$7e,$72,$66,$46,$5c,$72,$5c 
    .byt  $7e,$66,$5c,$56,$5c,$72,$66,$7e,$46,$66,$4c,$66,$46,$72,$72,$40 
    .byt  $40,$4a,$58,$4c,$4c,$4c,$4c,$4c,$53,$40,$40,$7e,$40,$40,$40,$40 
character_bitmap_row4   ;80 Bytes 
    .byt  $7f,$7e,$7e,$7e,$7e,$5c,$7e,$66,$58,$5c,$56,$58,$6a,$66,$7e,$70 
    .byt  $46,$70,$7c,$5c,$7e,$48,$5c,$66,$46,$7e,$66,$7e,$7e,$7e,$7e,$70 
    .byt  $7e,$72,$5c,$7c,$66,$5e,$6a,$66,$7e,$70,$7f,$66,$7e,$5c,$7e,$48 
    .byt  $5c,$66,$5c,$7e,$5c,$5e,$7e,$4c,$7e,$7e,$58,$7e,$7e,$7e,$7e,$4c 
    .byt  $48,$7e,$5c,$5c,$4c,$46,$46,$40,$5f,$40,$40,$44,$40,$40,$40,$40 

So much to do!
Nah :lol:

I am trying to keep sfx and music so playing is confortable (not allways sounding things... as this is not an arcade). I think the result is pretty good. Just need to add one alarm and a couple of sfx I am not using (numbers $12 and $0f) and it will be done!!

Will send it to you, so you can have a look and tell me what you think.

Cheers
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Code: Select all

character_bitmap_row0   ;80 Bytes
    .byt $40,$70,$40,$46,$40,$5c,$7e,$70,$58,$4c,$58,$58,$40,$40,$40,$40
    .byt $40,$40,$40,$44,$40,$40,$40,$40,$40,$40,$7e,$7e,$7e,$7e,$7e,$7e
    .byt $7e,$72,$5c,$5c,$72,$5c,$7e,$7e,$7e,$7e,$7e,$7e,$7e,$7e,$72,$72
    .byt $6a,$72,$72,$7e,$7c,%01111110	;$7c
    .byt $7e,$7c,$7e,$7e,$7e,$7e,$7e,$7e,$58,$7e
    .byt $5c,$7e,$5c,$5c,$40,$40,$40,$40,$5f,$4c,$40,$5e,$40,$40,$40,$40
character_bitmap_row1   ;80 Bytes
    .byt $5e,$7e,$5e,$7e,$5e,$50,$72,$7e,$40,$40,$5a,$58,$76,$7e,$5e,$7e
    .byt $7e,$7e,$5e,$7e,$72,$72,$6a,$72,$72,$7e,$66,$72,$66,$66,$70,$70
    .byt $60,$72,$5c,$5c,$72,$5c,$7e,$66,$72,$72,$72,$72,$70,$5c,$72,$72
    .byt $6a,$72,$72,$74,$5c,%01000010	;$66
    .byt $66,$6c,$60,$60,$66,$72,$72,$72,$72,$72
    .byt  $5c,$68,$58,$4c,$40,$40,$4c,$4c,$53,$46,$40,$66,$40,$40,$40,$40
character_bitmap_row2   ;80 Bytes
    .byt $66,$66,$66,$66,$66,$7e,$7e,$66,$58,$4c,$5c,$58,$7e,$66,$72,$72
    .byt $72,$70,$78,$5c,$72,$72,$6a,$5e,$72,$6c,$7e,$7e,$60,$66,$7e,$7e
    .byt $6e,$7e,$5c,$5c,$7c,$5c,$6a,$66,$72,$72,$72,$7c,$7e,$5c,$72,$72
    .byt $6a,$5c,$7e,$48,$5c,%01111110	;$5c
    .byt $5e,$6c,$7e,$7e,$4c,$7e,$7e,$72,$5e,$4e
    .byt $48,$7e,$58,$4c,$40,$40,$40,$40,$7c,$40,$7e,$60,$40,$40,$40,$40
character_bitmap_row3   ;80 Bytes
    .byt $66,$66,$60,$66,$78,$5c,$46,$66,$58,$4c,$56,$58,$6a,$66,$72,$7e
    .byt $7e,$70,$4e,$5c,$72,$5c,$7e,$7c,$7e,$5a,$66,$72,$66,$66,$70,$70
    .byt $66,$72,$5c,$5c,$66,$5c,$6a,$66,$72,$7e,$72,$66,$46,$5c,$72,$5c
    .byt $7e,$66,$5c,$56,$5c,%01110000	;$72
    .byt $66,$7e,$46,$66,$4c,$66,$46,$72,$72,$40
    .byt $40,$4a,$58,$4c,$4c,$4c,$4c,$4c,$53,$40,$40,$7e,$40,$40,$40,$40
character_bitmap_row4   ;80 Bytes
    .byt $7f,$7e,$7e,$7e,$7e,$5c,$7e,$66,$58,$5c,$56,$58,$6a,$66,$7e,$70
    .byt $46,$70,$7c,$5c,$7e,$48,$5c,$66,$46,$7e,$66,$7e,$7e,$7e,$7e,$70
    .byt $7e,$72,$5c,$7c,$66,$5e,$6a,$66,$7e,$70,$7f,$66,$7e,$5c,$7e,$48
    .byt $5c,$66,$5c,$7e,$5c,%01111110	;$5e
    .byt $7e,$4c,$7e,$7e,$58,$7e,$7e,$7e,$7e,$4c
    .byt $48,$7e,$5c,$5c,$4c,$46,$46,$40,$5f,$40,$40,$44,$40,$40,$40,$40
Done :P

Can u send me the .s file for Title screen?, then i can remove the colour leak from Helena.

btw, use gmail (googlemail) email only now, thanks.
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Greetings.

Ok. Corrected the frame and included your wonderful designs for inventory items (they are incredible!).

Did not include the iso versions, as I don't have the masks. I will prepare them when I have time, if you did not have them yet.

I have to change the description for the oil bottle (it is no more a 'bottle').

Also included the possibility of setting the volume for music and sfx. Even if we can use up to 16 different sets, I thought it could be enough to have predefined values, and add some fun, such as:

Code: Select all

Disturb neighbours
Nice background   
Got a headache  
Late at night  
"Late at night" is a reference to Batman (IIRC) :)

It shouldn't be difficult to use numeric values in the range 0-15, anyway.

However I noticed some 'glitches' when setting the volume to a value different than maximum. Sometimes it disrupts sfx (such as lift arriving) and from time to time high-volume sounds (just 'quircks') appear.

I still have one menu item left... Let's see if we can end up using it somehow or it should be removed.

Just hunting a couple of small bugs and we will have something complete (or near) to test!

Cheers.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Chema wrote:However I noticed some 'glitches' when setting the volume to a value different than maximum. Sometimes it disrupts sfx (such as lift arriving) and from time to time high-volume sounds (just 'quircks') appear.
Aha, yes.. this will be a problem that i am totally unable to avoid or fix.
The problem is that i use the Envelope generator inside the AY sound chip. This is a great set of registers for messing with the sound. Its original intention was to be used to control the volume of a channel through just hardware but in later years and for this implementation it is setup to rapidly repeat producing sawtooth and triangle waveforms but at the cost of either being on or off (ie. no volume).
So those quirks must exist, unless you remove all other options than On or Off !!
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Correction, it is possible to integrate a "Soft" setting either by limiting the EG waveform to Triangle rather than Sawtooth or by replacing the EG with the chip tone it is linked to and changing the volume on that. Its what i've done in my most recent project shown at CEO last saturday :P
Post Reply