Jump to content
IGNORED

U-235 SoundEngine released!


LinkoVitch

Recommended Posts

I have just posted version 0.23 of the U-235 SoundEngine to the site.

I wanted to have a look at your ELF object. I have used your demo, it was easy to adapt his makefile for vasm and vlink.

 

However I got some warnings in u235se.inc, one of them is probably easy to fix:

The symbol <U235SE_sfxplaylist_ptr> is defined 2 times.

 

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
These symbols are in the dsp.elf.obj symbol table but considered as *UND*. Could you tell me with what tool you have generated the dsp.elf.obj file?
Link to comment
Share on other sites

This is the 1st release with ELF (which I don't use myself) so I imagine there are going to be a few snagging points :)

 

OOPS on the duplicates! I'll make a note of that and get the inc file cleaned up, they are just external definitions so no harm in them being there, you can always delete the extra ones.

 

Just had a look at the elf.o with nm and you are correct it seems that there are a bunch of labels undefined, but they do all exist.

 

The output is from RMAC, again, maybe an option I have missed somewhere. I'll add these to the bug list and try to resolve for next release when I get time to work on it again.

Link to comment
Share on other sites

  • 1 month later...

Another possible feature: play mod only one time or add a flag to mark when the mod loop, I've implemented something like this but it stops a bit late and plays the first note.

 

I will add that to the feature request pile :) As there is no definitive "end of module" marker other than hitting the end of the song data, it's effectiveness *may* be a bit iffy with some modules.

 

EG some modules will have multiple songs within a single file. To stop one of these at the end of a song I imagine either testing for the song to jump back to the same position as when it started, or jumping to a previous song position (Song may have an intro and then a body with an endless loop). So it might be worth there being a few "modes" for this, I'll have a think on it and hopefully get it in the next release. If you need it urgently let me know and I'll try and get an early release to you swapD :)

 

@CJ: A module may not have a jump to the start if it is just a single song. The number of entries in the "song" is set, once you get to the end of that that is the end, at the moment the player does reset back to the start position.

Link to comment
Share on other sites

@CJ: A module may not have a jump to the start if it is just a single song. The number of entries in the "song" is set, once you get to the end of that that is the end, at the moment the player does reset back to the start position.

 

Fair call - you could always loop to nothing though. Still a PITA to work with.

  • Like 1
Link to comment
Share on other sites

 

Fair call - you could always loop to nothing though. Still a PITA to work with.

 

That's a valid option, add a pattern with nothing in that just loops to itself will work. Good thinking BatCJ :)

 

I'll add the requested features all the same, but that's not happening until I start work on the next release.

Link to comment
Share on other sites

  • 5 weeks later...

For the most part I'd think it should be OK, except for the portion of modinit that copies the DSP code into the DSP, all the variables for the SE are within the DSP so their addresses are fixed, but obviously once you link it, the address of the actual DSP code blob is going to be absolute and written into modinit's code too. I can probably just release the dsb.obj without the 68K helper code in and include the source for that so you could craft your own init routes ?

 

Unless you say link it for the top end of RAM/ROM so you know it's not going to move and just call it from there?

Link to comment
Share on other sites

Actually, just had a quick scan through the code of modinit, and I am obviously too tired and have too much beer in me (and it's been a while since I last looked), but modinit doesn't copy anything to DSP RAM.. DOH..

 

Alas it is all pretty much relocatable EXCEPT it has the variable U235SE_moduleaddr at the end, and this is used a couple of times to find where the mod is in memory. So that's going to end up with some absolute address in main RAM :/ Shouldn't be too difficult for that to be tweaked to make it relocatable however.

Link to comment
Share on other sites

Actually, just had a quick scan through the code of modinit, and I am obviously too tired and have too much beer in me (and it's been a while since I last looked), but modinit doesn't copy anything to DSP RAM.. DOH..

 

Alas it is all pretty much relocatable EXCEPT it has the variable U235SE_moduleaddr at the end, and this is used a couple of times to find where the mod is in memory. So that's going to end up with some absolute address in main RAM :/ Shouldn't be too difficult for that to be tweaked to make it relocatable however.

 

Why not provide a binary to be loaded at the start of the DSP RAM. All necessary symbols can be imported into the 68k code as source. No more dependency on a particular compiler/linker.

Link to comment
Share on other sites

 

Why not provide a binary to be loaded at the start of the DSP RAM. All necessary symbols can be imported into the 68k code as source. No more dependency on a particular compiler/linker.

 

I was originally aiming to try and make it as "easy to use" as possible so people could just drop it the .obj file and boom, sorted. No one has asked for these things before :) Certainly a good idea, I'll add it to the list, I need to stop worrying about the size of the releases too :) no one cares about a few KB here and there, so I can easily throw in a few extra build options in the releases.

 

If you access the variable U235SE_moduleaddr with a pc relative addressing mode I think that it'll fix this problem.

 

That's what I am planning to do, plus the code isn't anything magical, so I will also do as Bastian has suggested and look to release the source of modinit too.

 

Cheers guys

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Sorry, I wasn't aware anyone was specifically waiting for tweaks to get their bits complete. Which of the things you have asked for do you need for Classic Kong? I am pretty busy at the moment, but if I get some time I can have a look and may be able to get you something sorted.

Link to comment
Share on other sites

I don't have much free time at the moment, so it may take me a little longer than I hoped to get the relocatable binary working. Forgot there is a LUT used for determining timings for individual divisions in a mod. So I need to implement a fix for that as well, as that is referenced from within the DSP code. Shouldn't take me too long :)

Link to comment
Share on other sites

Can you try out this version Swapd0?

 

Jumping to the offset 0 is modinit, jumping to offset 2 will copy and setup SE for NTSC, offset 4 will copy and setup for PAL.

 

I need to have a think about modifying or providing a 2nd inc file with offsets to the variables within DSP RAM as obviously the labels don't exist. Full of a cold at the moment though so not really wanting to spend time sat hacking away at this right now.

u235se-rel.bin

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