swapd0 Posted February 23, 2018 Share Posted February 23, 2018 Hello I'm coding a Jaguar game and I need a sound system that allows me to play mod files and some sound effects at the same time. I've tried u235se but the object file is not compatible with vbcc, if I try to use rln as linker it doesn't recognise the compiled c source code. Thanks Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted February 23, 2018 Share Posted February 23, 2018 Never used SMAC to build any of my stuff so this may not work. Didn't throw out any warnings or errors. But could you try the attached object file instead of the release version and let me know if it works for you? U-235SE-0.22-SMAC.zip Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted February 23, 2018 Share Posted February 23, 2018 You can also take a look at the Removers' library, it's intended to be used with C and includes a 8-channel MOD player: http://atariage.com/forums/topic/193090-removers-library-version-131/ Quote Link to comment Share on other sites More sharing options...
swapd0 Posted February 23, 2018 Author Share Posted February 23, 2018 Never used SMAC to build any of my stuff so this may not work. Didn't throw out any warnings or errors. But could you try the attached object file instead of the release version and let me know if it works for you? U-235SE-0.22-SMAC.zip I'm using rmac on OSX, and the problem that I've is that it looks that it can't link c files compiled with vbcc, but I've DrTypo's tube source code and he uses vbcc, but sln as linker. rln -v -e -l -rd -a 4000 x x -o game.jag obj/main.o obj/imgobjects.o obj/blitter.o obj/player.o obj/playerGrfx.o obj/cpuPlayer.o obj/backgroundGrfx.o obj/overlaysGrfx.o obj/playfield.o obj/sprite.o obj/sound.o obj/joypad.o obj/video.o u235se/u235se.obj Reboot's Linker for Atari Jaguar Copyright (c) 199x Allan K. Pratt, 2014 Reboot V1.2.2 Feb 23 2018 (OSX/Linux) dofile() : `obj/main.o' NORMAL dofile() : `obj/imgobjects.o' NORMAL dofile() : `obj/blitter.o' NORMAL dofile() : `obj/player.o' NORMAL dofile() : `obj/playerGrfx.o' NORMAL dofile() : `obj/cpuPlayer.o' NORMAL dofile() : `obj/backgroundGrfx.o' NORMAL dofile() : `obj/ballGrfx.o' NORMAL dofile() : `obj/overlaysGrfx.o' NORMAL dofile() : `obj/playfield.o' NORMAL dofile() : `obj/sprite.o' NORMAL dofile() : `obj/sound.o' NORMAL dofile() : `obj/joypad.o' NORMAL dofile() : `obj/video.o' NORMAL dofile() : `u235se/u235se.obj' NORMAL Output file is game.jag Read file obj/main.o obj/main.o is not a supported object file Link aborted. make: *** [build] Error 1 Quote Link to comment Share on other sites More sharing options...
ggn Posted February 23, 2018 Share Posted February 23, 2018 I'm using rmac on OSX, and the problem that I've is that it looks that it can't link c files compiled with vbcc, but I've DrTypo's tube source code and he uses vbcc, but sln as linker. Reboot's Linker for Atari Jaguar Copyright (c) 199x Allan K. Pratt, 2014 Reboot V1.2.2 Feb 23 2018 (OSX/Linux) Just saying, latest rln version is v1.5.2. Maybe try compiling the latest version from http://shamusworld.gotdns.org/git/rlnand try that? (link points to the git repo btw). 2 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted February 23, 2018 Share Posted February 23, 2018 The Object file I uploaded I have compiled with SMAC so it should work with SLN, which I thought is what is used with vbcc ? Quote Link to comment Share on other sites More sharing options...
swapd0 Posted February 24, 2018 Author Share Posted February 24, 2018 Just saying, latest rln version is v1.5.2. Maybe try compiling the latest version from http://shamusworld.gotdns.org/git/rlnand try that? (link points to the git repo btw). Downloaded and compiled, It's the same version that I have. I've downloaded sln source code, let's try it. If it doesn't work I'll try the Remover's library. Quote Link to comment Share on other sites More sharing options...
swapd0 Posted February 24, 2018 Author Share Posted February 24, 2018 Missing sln.h file... cool XD Quote Link to comment Share on other sites More sharing options...
swapd0 Posted February 24, 2018 Author Share Posted February 24, 2018 Ok, I've updated rmac with a newer version from shamusworld. And it looks that I've no errrors. 3 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 11, 2018 Author Share Posted April 11, 2018 Why my sound effects only sound on channel 4? If I send command $42 I can hear the sound effect but if I use commands, $52, $62 or $72 nothing sounds... Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 11, 2018 Share Posted April 11, 2018 I assume you are using U235 SE ? Have the volumes of those channels been set? Another thing that bit me a few times was my SCART cable was slightly out of the TV, so either left or right wasn't connected It doesn't sound like that is the case as at least one of the other SFX channels would work. There is no reason why a sample that plays on channel 4 won't play on any of the other channels, volume setting is all I can think of off the top of my head. Have you tried playing it on channels 0-3 as well? Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 11, 2018 Author Share Posted April 11, 2018 Yes, I'm using U235 SE, I'm playing a module on channels 0-3. I'll try later, I've wasted a lot of time with this, I haven't set any volume for any channel... but channel 4 works. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 11, 2018 Share Posted April 11, 2018 IIRC command $4053 will set the volume of Channel 5 to 100% (range being 0-64) might be worth trying 63 if that doesn't work, its been so long I cannot quite remember the max. Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted April 11, 2018 Share Posted April 11, 2018 I think I remember having the exact same issue in rb+, and it was as linko suggested, I wasn't setting the volume for that channel. 1 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 12, 2018 Author Share Posted April 12, 2018 (edited) Setting the volume has no effect With this code I've sounds on channel 0, 2, 4 & 6 _play_sound:: move.l 4(sp),d0 ; Put address of sample bank in d0 move.l d0,U235SE_ptr_sample_bank and.w #$fff0,d0 ; mask off the low nibble or.w #$b,d0 ; add Set Sample Bank instruction lea playlist,a0 ; The address of the sound effect playlist move.l d0,(a0)+ ; Write Set bank to playlist move.w next_voice,d0 addq.w #2,d0 and.w #$e,d0 move.w d0,next_voice move.l volumes(pc,d0.w),d1 move.l d1,(a0)+ move.l voices(pc,d0.w),d1 move.l d1,(a0)+ move.l #0,(a0)+ ; terminate the end of the list - Or the SE will skip off through RAM making a mess move.l #playlist,U235SE_sfxplaylist_ptr ; set the playlist pointer rts next_voice: dc.w 0 voices: dc.l $02 dc.l $12 dc.l $22 dc.l $32 dc.l $42 dc.l $52 dc.l $62 dc.l $72 volumes: dc.l $4003 dc.l $4013 dc.l $4023 dc.l $4033 dc.l $4043 dc.l $4053 dc.l $4063 dc.l $4073 data .phrase playlist: dc.l 0,0,0,0,0,0,0,0,0,0 dc.l $ff ; playlist termination With this version I got sound on channels 0 & 4 (look at voice table, I start with channel 4 now) _play_sound:: move.l 4(sp),d0 ; Put address of sample bank in d0 move.l d0,U235SE_ptr_sample_bank and.w #$fff0,d0 ; mask off the low nibble or.w #$b,d0 ; add Set Sample Bank instruction lea playlist,a0 ; The address of the sound effect playlist move.l d0,(a0)+ ; Write Set bank to playlist move.w next_voice,d0 addq.w #2,d0 and.w #$e,d0 move.w d0,next_voice move.l volumes(pc,d0.w),d1 move.l d1,(a0)+ move.l voices(pc,d0.w),d1 move.l d1,(a0)+ move.l #0,(a0)+ ; terminate the end of the list - Or the SE will skip off through RAM making a mess move.l #playlist,U235SE_sfxplaylist_ptr ; set the playlist pointer rts next_voice: dc.w 0 voices: dc.l $42 dc.l $52 dc.l $62 dc.l $72 dc.l $02 dc.l $12 dc.l $22 dc.l $32 volumes: dc.l $4043 dc.l $4053 dc.l $4063 dc.l $4073 dc.l $4003 dc.l $4013 dc.l $4023 dc.l $4033 data .phrase playlist: dc.l 0,0,0,0,0,0,0,0,0,0 dc.l $ff ; playlist termination Also I don't know why I need the last dc.l $ff if I remove it I got no sound (the docs don't say anything about this), and If I remove it and write the code like this it doesn't work... move.l volumes(pc,d0.w),d1 move.l d1,(a0)+ move.l voices(pc,d0.w),d1 move.l d1,(a0)+ move.l #$ff,(a0)+ move.l #0,(a0)+ move.l #playlist,U235SE_sfxplaylist_ptr rts Edited April 12, 2018 by swapd0 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 12, 2018 Author Share Posted April 12, 2018 WTF!!! I need increments values by 4 not 2!!!!!!!!!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 12, 2018 Author Share Posted April 12, 2018 This is the problem when you can't debug your code... I should spend some time to make my remote debugger to work with the skunkboard and port it to OS-X 2 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 12, 2018 Share Posted April 12, 2018 For debugging I have used the skunk console mode, then written some simple 68K debug routines that will send strings back via the console. Trivial to write something that will dump registers or hex values into strings and send them over the link. It's certainly no full featured debug system but for a few minutes of quick hacking you can get a very useful library of functions together that will give you at least some visibility of what is going on in that black box of Jaguar goodness Not sure about the $ff command at the end of the list. That is documented as being there to shutdown the SE completely, from reports back the current release build it doesn't work properly in all cases (just my test cases :/ ) so YMMV with it. But you shouldn't need to issue it on every list. As long as there is a terminator all should be good. I'd possibly also try and keep the lists long aligned too, I may be misremembering but I know unaligned long reads from RISC RAM = wacky fun times and not what you want, I cannot remember if the same is true for main RAM and the DSP (with it's 16bit bus) 1 Quote Link to comment Share on other sites More sharing options...
+cubanismo Posted August 8, 2020 Share Posted August 8, 2020 On 4/12/2018 at 3:03 AM, swapd0 said: I should spend some time to make my remote debugger to work with the skunkboard and port it to OS-X I don't suppose this ever happened? If not, I'd love to take a stab at this myself if you have the old source sitting around. 1 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.