Jump to content
F.L

my start with RB+ - barbarian project- need help

Recommended Posts

hello

i am now addind the sound

but there is something i dont understand to how playing them....

here is an exemple of my method to play the sword in the game :

basic_r_indx=0
basic_r_size=0

DIM sfxcount

DO
	
	sfxcount=sfxcount+1
	
	vsync

	RLOCATE 0,16: RPRINT "  ": RPRINTINT sfxcount

	IF sfxcount = 60 THEN
		SNDPLAY(0,4)
		SNDFREQ(4,8000)
		sfxcount = 0
	END IF
	
LOOP

with this example, my sfx must be played each 1 second, but sometime it works :thumbsup: , and sometime it don't works :thumbsdown:

the project with assets are in attached files... thanks in advance !

sfxtest.zip

Share this post


Link to post
Share on other sites

Sorry but after trying a lot of different ideas I couldn't find a robust solution to your problem. There are simply too many hidden stuff inside raptor and u-235 sound engine for me to determine who's at fault here. My only suggestion for the moment would be to switch to Zerosquare's library. Read up on the audio tutorial for more information on this.

 

Unless anyone else has any other ideas?

Share this post


Link to post
Share on other sites

Sorry but after trying a lot of different ideas I couldn't find a robust solution to your problem. There are simply too many hidden stuff inside raptor and u-235 sound engine for me to determine who's at fault here. My only suggestion for the moment would be to switch to Zerosquare's library. Read up on the audio tutorial for more information on this.

 

Unless anyone else has any other ideas?

 

API 2.0 doesn't have any DSP code in it, it is separated out for the end user to select a player.

Share this post


Link to post
Share on other sites

API 2.0 doesn't have any DSP code in it, it is separated out for the end user to select a player.

rb+ pulls that trick years ago, it's not the issue here.

Share this post


Link to post
Share on other sites

I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though.

  • Like 2

Share this post


Link to post
Share on other sites

I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though.

 

Well that explains a lot actually :)

Share this post


Link to post
Share on other sites

I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though.

 

it's a good news !

 

 

else, if i do this with u235 the sound is played everytime , but if the sfx it too short, it plays it two times :

basic_r_indx=0
basic_r_size=0

DIM sfxcount

DO
	
	sfxcount=sfxcount+1
	
	vsync

	RLOCATE 0,16: RPRINT "  ": RPRINTINT sfxcount

	IF sfxcount > 60 THEN
		SNDPLAY(0,4)
		SNDFREQ(4,8000)
	END IF
	IF sfxcount > 65 THEN sfxcount = 0
	
LOOP

i will try with zeroplayer

Share this post


Link to post
Share on other sites

You are checking if sfxcount > 60 there and playing the sound but not resetting the counter until 65. That will cause wierdness and call the sndplay 5 times.

Share this post


Link to post
Share on other sites

yes i know its a bad method but its the only way i found to have the sfx every time with vj....

Share this post


Link to post
Share on other sites

i need your help ! (again !)

now the sound works fine but i have no pad input.......

i have read in rapapp.s that u235 is needed for the pad input... how to do please ? can't use zerosquare :?

thanks in advance

Share this post


Link to post
Share on other sites

If you change to zerosquare audio engine, that also means the input changes too. Look in quickstart document for the different constants to use and also you have to call zeropad()

 

 

Both audio engines also control their own input

Edited by Sporadic
  • Like 3

Share this post


Link to post
Share on other sites

hello

i have add zeropad, it works but in my game the main loop is slow down ( / 2 ) !

i use it like this :

basic_r_indx=1
basic_r_size=0
Input_SetNormalPadMode 
RLOCATE 0,16:RPRINT "input?"
do
	ZEROPAD()
	if zero_left_pad band Input_Pad_Left THEN RLOCATE 0,24:RPRINT "ok!"
loop

i do something wrong or is it normal ??

Share this post


Link to post
Share on other sites

hello

i have add zeropad, it works but in my game the main loop is slow down ( / 2 ) !

i use it like this :

basic_r_indx=1
basic_r_size=0
Input_SetNormalPadMode 
RLOCATE 0,16:RPRINT "input?"
do
	ZEROPAD()
	if zero_left_pad band Input_Pad_Left THEN RLOCATE 0,24:RPRINT "ok!"
loop

i do something wrong or is it normal ??

I have had (on some computers) VJ run slower when using Zeropad. It's usually fine on real hardware.

Share this post


Link to post
Share on other sites

Ok, thanks !

The most important is the real hardware

I have bought a jaguar but what a pity that an everdrive doesn't exist for jaguar !

Share this post


Link to post
Share on other sites

Ok, thanks !

The most important is the real hardware

I have bought a jaguar but what a pity that an everdrive doesn't exist for jaguar !

An SD cart is being worked on, but you can also get Skunkboards again. Search AtariAge posts and you will find plenty of information about them.

 

https://www.sellmyretro.com/offer/details/skunkboard-flash-cardridge-for-jaguar-27561

 

They are great for development purposes.

Edited by Sporadic
  • Like 1

Share this post


Link to post
Share on other sites

hello

a very big update of the rom today :

 

- new diplaying method of sprites and theirs palettes

- new displaying method of backgrounds

- first sound added with zerosquare !! (sword sfx)

thanks to sporadic and all who helped me again ! :)

 

caution, with this new update, the rom doesn't works with virtual jaguar anymore (too slowly #30 fps) :thumbsdown:

but it runs perfectly with project tempest (an old but simply emulator) :thumbsup:

 

i have added in attached files the zip with the new rom and PT.exe inside

(no install is needed, just launch pt and load the rom )

 

i hope this new update will works on a real jaguar without glitches or stange sound !

if someone could test, it would be nice !!

 

see ya for the next update with all sfx

 

barbarianJAGUARbeta.zip

  • Like 4

Share this post


Link to post
Share on other sites

Still adding sfx...

I have a question : how to make a nice .mod music like in the example doger ?

Is it complicate ? I have searched a wav2mod but i do't find this...

Share this post


Link to post
Share on other sites

Zero sound engine doesn't support mod files. You're better off using an MP3 or wav and then in RB+ tell it you want to use muLaw in the assets txt. It sounds great even at lower frequencies.

  • Like 3

Share this post


Link to post
Share on other sites

From the audio tutorial post here's a small side-by-side comparisons of the two audio engines:

 

U-235

Can play .mod files: yes (4 channel ones)

Can play samples: yes, up to 4 raw PCM samples alongside with the .mod

Fine control of samples: yes - pitch and volume

Supports μLaw compressed samples: no

Supports mouse input: no (it probably can, never tested)

 

Zerosquare

Can play .mod files: no

Can play samples: yes, up to 4 simultaneously

Fine control of samples: no - fire and forget affair

Supports μLaw compressed samples: yes

Supports mouse input: yes

  • Like 1

Share this post


Link to post
Share on other sites

Yes i know that zerosquare engine dont support mod but the original music of the game is very long. Converting the mp3 or ogg with rb+ it will be impossible. (Files too big)

I have the music in midi format but its not supported....

If i could convert it in mod format, i will come back to u235 to play it. The most important is that the rom runs well on real hardwarep

  • Like 1

Share this post


Link to post
Share on other sites

Yes i know that zerosquare engine dont support mod but the original music of the game is very long. Converting the mp3 or ogg with rb+ it will be impossible. (Files too big)

I have the music in midi format but its not supported....

If i could convert it in mod format, i will come back to u235 to play it. The most important is that the rom runs well on real hardwarep

Making .MOD music isn't as trivial as running a file through a converter, it requires a musician who is familiar with how trackers work and is willing to help out. Or you could just randomly find something online and use that. Careful though, not all trackers are made equally, some have extended commands and vary in how well they support them. Linko's player is pretty good, it'll play most 4 track MODs that support the standard commands pretty well. For ease of use/sanity/etc. though I'd suggest finding some public domain audio, chop it up to find a nice loop and use zero's player at least to begin with. There's plenty of room in a 4MB ROM!

  • Like 1

Share this post


Link to post
Share on other sites

Also, there's tons of royalty free music out there licensed under Creative Commons or some other similar permissive license. From our tests you can squeeze around 1 minute of audio in about 1mb if you compress it using μLaw and still sound great.

  • Like 2

Share this post


Link to post
Share on other sites

hello

i only want to use the original music.

i have added the gameover music because this music is not long

you can hear it in the new 0.53 beta

it works fine but it was a little too slow so i have replaced the frequency 46168/9233 by 46168/10233

it is a good frequency/method ?

now i will add the intro music.

i have a question again : how to stop the sfx ? in the tutorial post, it mention len=0, so i must do this :

SNDZEROPLAY(1, strptr(sfx_tete), (strptr(sfx_tete_end)-strptr(sfx_tete)+3) and 0x0, 46168/10233, Zero_Audio_8bit_muLaw|0)

?

thanks in advance

Share this post


Link to post
Share on other sites

Zeroplayer can only reply at frequencies that evenly divide into 46168

 

So:

 

46168 Hz (/1)

23084 Hz (/2)

15389 Hz (/3)

11542 Hz (/4)

9233 Hz (/5)

 

etc..

  • Like 4

Share this post


Link to post
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.

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...