Jump to content
IGNORED

U-235 SoundEngine released!


LinkoVitch

Recommended Posts

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.

Link to comment
Share on other sites

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! :D Bloody colds!

u235se-0.23b.zip

  • Like 3
Link to comment
Share on other sites

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 by swapd0
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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 by swapd0
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

  • 5 months later...

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

  • Like 6
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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