swapd0 Posted April 15, 2019 Share Posted April 15, 2019 I get an address error when I call any function (offset + 0, offset + 2 or offset + 4). Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 15, 2019 Author Share Posted April 15, 2019 (edited) As I said my brain isn't really working due to lurgy , realised my mistake after I posting, will sort out an updated inc file or something. Edited April 15, 2019 by LinkoVitch 1 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 15, 2019 Author Share Posted April 15, 2019 This cold is really destroying my ability to function, sorry I only just read you last message. That blob is full of fail sorry. I have a working version in the pipes at the moment now. Just tidying up complete with appropriate include file etc. Will get it to you hopefully shortly. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 15, 2019 Author Share Posted April 15, 2019 OK, attached a working version, complete with support files and example. If you look at the `reloc-main.s` and compare to the main.s code you can see the difference in calls, also use the `u235se-rel.inc` for referencing the variables in the SE once it is loaded into the DSP. if you have RMAC/RLN installed, running make should build you the main.cof and reloc.cof examples, both just play the ALF.mod, but proves all working ticketyboo I need to update the manual and a few other bits but hopefully this should work fine with any non-RLN builds as the u235-rel.bin is just an ABS binary blob. (you will need to leave it in place once you init the SE from it, don't reuse the memory or anything as it also contains a timing LUT which may be needed depending on the mod) Previous crash you had was probably due to me being a numpty and leaving a header on the binary blob! oops! Bloody colds! u235se-0.23b.zip 3 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 16, 2019 Share Posted April 16, 2019 (edited) It works! Thanks! But I've some issues, some sounds are ok, but others sound noisy or like duplicated. Edited April 16, 2019 by swapd0 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 16, 2019 Author Share Posted April 16, 2019 Are all your samples 8bit signed samples? At the moment there is only support for signed samples. If you are using 16bit or unsigned samples these can sound pretty terrible. If you want me to have a look at the samples in question email them over to me. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 16, 2019 Author Share Posted April 16, 2019 Also if you use a module that uses the more advanced (Pro-Tracker?) timings (Fxx command with a value => 20) then you will just get silence and possible DSP crash, just found another couple of typo's. Any mod that uses F values less than that will be fine however Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 16, 2019 Share Posted April 16, 2019 (edited) For now I've tested it with classic kong (only samples, no mod), and ST-NICCC 2000 just a mod. I only have issues with Classic Kong, all samples played ok with vbcc and older version of u235se. The issues I've found are: 1 - game start sample it's noisy. 2 - 'Help me' sample ok, but it's like it plays two times, you can hear "Help... Help me", it's weird. 3 - I've a function that plays a sample in a "ring" (channel 0, channel 1, channel 2... , channel 7, channel 0...) and depending on the channel they sound with a lower volume. It's weird because I've a table with each channel volume and all are set to 64. I've tested that the alignment it's ok, all samples are created into the heap and unpacked from the cartridge, and my malloc routines align the data to 32 bytes. I need to do more testing with other games. PD: yes, all samples are 8bit signed Edited April 16, 2019 by swapd0 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 16, 2019 Author Share Posted April 16, 2019 Here is a patched binary blob for you anyway, should work fine with the inc you have already, but fixes the bugs I mentioned. Your current issues do sound very weird! can't think of a reason for any of those issues if they worked on previous engine versions, I've not made any changes to the core of the engine for the tweaks in the version you have. u235se-rel.bin Quote Link to comment Share on other sites More sharing options...
dilinger Posted April 16, 2019 Share Posted April 16, 2019 Hi, I have tried your new package within the ELF format and I have the same issues as the previous package. I got some warnings in u235se.inc, not a big deal but just had the wish to report them. The symbol <U235SE_sfxplaylist_ptr> is defined 2 times; the remaining warnings are redefinition symboles: U235SE_ptr_sample_bank, U235SE_playmod and a_vde. There are also various imported symbols not referenced but doesn't prevent the assembly. Unfortunately, I'm not able yet to have a ELF executable due to the reference to undefined symbols: U235SE_playback_rate U235SE_playback_period U235SE_ptr_sample_bank U235SE_playmod U235SE_pad1 U235SE_playmod U235SE_sfxplaylist_ptr Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 17, 2019 Author Share Posted April 17, 2019 The doubly defined symbols are likely due to you having the u235se.inc file included multiple times within your source. I am not 100% if the ELF object is correctly generated I haven't put much time into looking at that, sorry. You could use the binary blob version instead however, this removes the need for you to link against the SoundEngine and you can just include it as binary. Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted April 17, 2019 Share Posted April 17, 2019 It's weird because I've a table with each channel volume and all are set to 64. Been there, done that - try 63 Although I find anything above 40-ish can distort if the sample is already quite loud Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 17, 2019 Author Share Posted April 17, 2019 Hi, I have tried your new package within the ELF format and I have the same issues as the previous package. I got some warnings in u235se.inc, not a big deal but just had the wish to report them. The symbol <U235SE_sfxplaylist_ptr> is defined 2 times; the remaining warnings are redefinition symboles: U235SE_ptr_sample_bank, U235SE_playmod and a_vde. There are also various imported symbols not referenced but doesn't prevent the assembly. Unfortunately, I'm not able yet to have a ELF executable due to the reference to undefined symbols: Sorry, just noticed I actually have 2 bug cards raised for these exact issues in my bugs list. So they are still active. I will try to remove one or both of them with the actual release of 0.24 which hopefully I will do in a shortish amount of time. I was just posting those zip files here for swapd0's project so they were not holding him back. Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 17, 2019 Share Posted April 17, 2019 (edited) I've modified the reloc-main.s to use my sound engine and I've seen the following issues, it should only play sounds with button 1 & button 2. - Press several times 1 and you'll hear the same sound but sightly different. - If you press 2... nothing happens, I've looked at the code and I haven't found the error, you should hear "Help me". u235se-test.zip Edited April 17, 2019 by swapd0 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 17, 2019 Author Share Posted April 17, 2019 I will have a proper lookie at this later, but from my 1st quick scan though, why are you defining sample banks with only one sample each time? That is possibly going to cause weird problems. I would recommend you define 1 sample bank with your samples in, and declare it once, and then make calls to play the samples in that bank when you need them. eg: .LONG sample_bank: dc.l sample_1 dc.l sample_2 dc.l 0 dc.l 0 dc.l 64 dc.l 8000/2 dc.l sample_2 dc.l sample_end dc.l 0 dc.l 0 dc.l 64 dc.l 8000/2 sample_1: incbin "sample20.raw" sample_2: incbin "pauline_help_me.raw" sample_end: Then you can call each sample number to play it, either at the freq in the bank or a specified freq (depending on instruction).The only time you need to set a bank is if you have multiple sample banks and need to switch to another, once it is set, it is not changed. This isn't terribly clear in the example code, I'll add a note to rectify that. 1 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 17, 2019 Share Posted April 17, 2019 Ok, I thought that I had to declare a sample bank for each sample, but it's a sample bank, so you can declare many samples in a row. I misunderstood the manual. 1 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 17, 2019 Author Share Posted April 17, 2019 It's one of those "Makes perfect sense in my head" kind of things alas (fortunately ) no one else can know what is going on in my head Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 18, 2019 Share Posted April 18, 2019 With an example with two samples on the same bank it's enough to know how it works. 1 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted April 18, 2019 Share Posted April 18, 2019 F*ck, I got sound in the test program (asm code) but not in Classic Kong (C code)... Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 19, 2019 Author Share Posted April 19, 2019 sorry for delay, finally gotten around to playing with this on real hardware. 1st issue of only one sample playing (in the case of your example code). This is due to you using multiple sound banks, in that a sound bank MUST be Double-Phrase aligned (we wipe out the low nibble for the set command). So your first bank is happening to be OK, but the second isn't. I am trying to figure out why the pauline sample seems to play at half speed, that is completely bizarre! Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 19, 2019 Author Share Posted April 19, 2019 And the fix for the slow playback is that the defines for 24KHZ playback rate are significantly out! If you switch to the default 16kHz, it sounds correct. I'll add that to the bugs list also. 1 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 19, 2019 Author Share Posted April 19, 2019 Actually scratch that sorry. Took me a while to fathom.. The slow sounding samples is due to you changing the playback_rate and period AFTER the SE code has been started. These need to be set After the initNTSC/initPAL but before you actually start the DSP. The values used setup the timers for sample playback and are used to calculate the synthetic frequencies, so if you change them after the timers are set.. weirdness. Sorry it took me so long to get to this. 2 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted September 29, 2019 Author Share Posted September 29, 2019 Latest release (0.24) of the U-235 SoundEngine just uploaded to our site. There are some breaking changes in this release so PLEASE read the changelog before trying to use, they are only minor but without them it won't work. Big improvements in bus access and sound quality in this release too, so I highly recommend it. And thanks to feedback from CJ an annoying bug that would intermittently kill off module playback when changing modules has been resolved! Full Update here 6 Quote Link to comment Share on other sites More sharing options...
dilinger Posted September 29, 2019 Share Posted September 29, 2019 3 hours ago, LinkoVitch said: Latest release (0.24) of the U-235 SoundEngine just uploaded to our site. Thank you for the update. I had a look at the ELF format support. I use Vasm and Vlink, the makefile for your demo was easy to adapt. Unfortunately, I'm not able yet to have a ELF executable due to the reference to undefined symbols: U235SE_playback_rate U235SE_playback_period U235SE_ptr_sample_bank U235SE_playmod U235SE_pad1 U235SE_sfxplaylist_ptr However, these symbols are in the dsp.elf.obj symbol table. What tool have you used to generate the dsp.elf.obj file? Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted September 29, 2019 Author Share Posted September 29, 2019 I *think* there may be some issues with the ELF build, I haven't had time to dig into it further so it is hanging around as an issue I am afraid. Might be worth you using the relocatable version which I think SwapD0 has been doing? I use RMAC & RLN exclusively to build things, the actual memory locations for those are also in the u235se-rel.inc include file if that's of help for you? (at the end of the file after all the equates). 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.