Peter G Posted September 23, 2013 Share Posted September 23, 2013 I'll play with the sound library that was linked tomorrow -- it's getting late for me, and my brain is not following programming very well right now. But, until tomorrow, if I can ask just a few more questions: 1) Is it possible under bB to, say, change the sprite clones so you have one copy looking like one thing and the other looking like another? Or are there just not enough cycles to do that? 2) Speaking of that -- is it possible to implement the 48-bit megasprite under bB? I don't want to use the title screen routine because that calls for bankswitching and I want something I can stick on a 4K cart without doing anything special. 3) I don't know if I'm just overtired, but looking at the sample code for making sounds, there is this line: if joy0fire then if !_Sound01 then _Sound01 = 15 What does the !_Sound01 mean? From C++, I see that and think it means "not _Sound01". But not what? It clearly does something -- remove that from the program, and the sound tone runs for a pre-determined length of time even if you release the fire button. Quote Link to comment Share on other sites More sharing options...
bogax Posted September 23, 2013 Share Posted September 23, 2013 3) I don't know if I'm just overtired, but looking at the sample code for making sounds, there is this line: if joy0fire then if !_Sound01 then _Sound01 = 15 What does the !_Sound01 mean? From C++, I see that and think it means "not _Sound01". But not what? It clearly does something -- remove that from the program, and the sound tone runs for a pre-determined length of time even if you release the fire button. something like that non zero is true so it's equivalent to if _Sound01 = 0 but it doesn't do an explicit comparison which if _Sound01 = 0 does (it uses a zero flag in the processor that gets set automatically) so it saves a couple bytes and a couple cycles. but it's not boolean Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 23, 2013 Share Posted September 23, 2013 3) I don't know if I'm just overtired, but looking at the sample code for making sounds, there is this line: if joy0fire then if !_Sound01 then _Sound01 = 15 What does the !_Sound01 mean? From C++, I see that and think it means "not _Sound01". But not what? It clearly does something -- remove that from the program, and the sound tone runs for a pre-determined length of time even if you release the fire button. Can you post a link to the program? Quote Link to comment Share on other sites More sharing options...
Peter G Posted September 26, 2013 Author Share Posted September 26, 2013 Can you post a link to the program? Sorry for the delay in response, it's been a crazy busy couple of days. Anyway, here's the code: dim _Sound01 = a __Main_Loop if joy0fire then if !_Sound01 then _Sound01 = 15 if !_Sound01 then goto __Skip_Sound01 AUDV0 = 8 : AUDC0 = 4 : AUDF0 = 19 : _Sound01 = _Sound01 - 1 if !_Sound01 then AUDV0 = 0 __Skip_Sound01 drawscreen goto __Main_Loop Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 26, 2013 Share Posted September 26, 2013 3) I don't know if I'm just overtired, but looking at the sample code for making sounds, there is this line: if joy0fire then if !_Sound01 then _Sound01 = 15 What does the !_Sound01 mean? From C++, I see that and think it means "not _Sound01". But not what? It clearly does something -- remove that from the program, and the sound tone runs for a pre-determined length of time even if you release the fire button. Anyway, here's the code: OK, so it looks like you got it from here: randomterrain.com/atari-2600-memories-batari-basic-commands.html#sound_examples_no_data "if !_Sound01" is quicker than using "if _Sound01 = 0". It makes sure the sound is done before starting up again. It makes a Surround kind of noise instead of a constant noise. Quote Link to comment Share on other sites More sharing options...
Peter G Posted September 26, 2013 Author Share Posted September 26, 2013 OK, so it looks like you got it from here: randomterrain.com/atari-2600-memories-batari-basic-commands.html#sound_examples_no_data "if !_Sound01" is quicker than using "if _Sound01 = 0". It makes sure the sound is done before starting up again. It makes a Surround kind of noise instead of a constant noise. Yup, that's exactly where it came from. ...ah, so it DID sort of mean what I thought it meant, I just confused myself. Thank you for being patient with me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.