Tuesday, November 14, 2006

XeO3: Father Ted....

Okay.... I've gotten the TED sound playing the main theme, although its been a bit of a nightmare.... it turns out that normally these operate at location $D400 - the original location of the SID on the C64. But add-on for the plus/4 is mapped to $fd40 (or $fe80), but when the card isn't there then this is just normal IO space - and theres no RAM there. This means it just doesn't work! What I've ended up doing is making a relocate routine that runs through SID music player and then moves the writes to the SID card to an area of memory the Frequency convertor can get access to. I've also managed to shrink it down by 50 bytes, but I've had to add the relocate routine... so I've uised up just over 1k for this.

However....now for the REALLY bad news! This routine takes around 16 scan lines to run, and thats on top of the SID player! This is very painful! So, if we run low on memory again, this is the first to go as it will slow the game down in busy areas.

Still, I've given Luca the mconv source and he can release it on +4 world at somepoint so others can use it. As I said earlier, the source lets you play around with it easier..... as well as relocate it and change the storage locations.

11 comments:

Anonymous said...

Damn, 16 extra scanlines is too much! 16 for the conversion and max 24 for the music itself is a kick in the. :(

Mike said...

Yep...We've just been speaking about this.... The best bet would be to take the SID music file and write a TED player for it..... although loading 4k over the top once at the start wouldn't be the end of the world either......

Also... because each level has its own music, I'll be loading in the new music each level, so it would have to be on disk anyhow. I'm not sure what I'll do as yet.... might just be a lost cause.

Mike said...

Oh....and I'll just point out... that because the game run's in 2 frames, I currently lose 50 scanlines for SID only, and 80 for TED music over one game frame.... Thats a LOT - enough for a couple more sprites probably...

Anonymous said...

As you pointed out you need to load music separately anyway, so separate players for TED & SID is the only sensible solution. That means a bit more work than using converter, but 32 lines per game frame should make it worth the trouble.

If you can keep the exact same music data, you can load both player routines with the main code, then copy SID player over TED one if user has SID card.

What do you plan to do with sfx if there is no SID?

--
TNT

Mike said...

It all depends on how well documented the audio for the SID player is. I dont want to spend 3 months trying to reverse the SID data and then write a player. Its probably all going to come down to how much time I think its going to take.....

If I get this working, then I'd give the option to play music or sound - not both.

I'll look into the player, but Im not holding out much hope of doing a TED player for the data....

Anonymous said...

Chicken: the little and short TED tune I composed for Mermaid's pat in 8SOB C16 trackmo had taken more than 2K. We're fighting byte per byte, and a 2K addon looks like a terrible kick :(

Anonymous said...

Hi Guys!,

Gaia has kindly pointed me to these posts about the mconv routine being disassembled and presented in source (which is nice).

As for the music in XeO3, I guess Chicken has said it all, nothing more to add, just to clarify (as, I guess, you might have mis-gotten the idea he had talked about). The point is, to create native TED versions of the SID tunes (either in my player which Luca has experimented with or some othe TED player... Csabo's or 4-Mat's, all of them are available as sources AFAIK), and play _either_ the SID _or_ the TED version, depending on some settings or an autodetect feature. The tunes can be compiled to occupy the same memory areas. The loader might be made to care about loading the respective tune (AFAIK XeO3 is planned to work on top of a disk-IO system). This needs more work, but 1.) gives an opportunity to optimize the TED sound as much as possible (in opposition to the music converter approach, where it's hard), 2.) implies no overhead, neither memory nor cpu.

As of creating a TED player on top of SIDWinder: in short, it's a "bad idea". It won't save one from fiddling with the music data, rewriting things here and there, as the SID and the TED are generally very different, and the player is pretty dependent on the SID itself; for example, it uses SID frequency scale for the slides (which is absolutely different for the TED). And the player also won't be optimal for the TED, whereas that is just "given" if rather moving to a TED player's field.

XeO3-CPC said...

Gotta say I'd go with loading separate TED specific music + player routine.

If that's too much work, maybe just drop music from non-SID equipped machines. Whilst only 28% of users may own one, emulator support is pretty good so it's not like people won't get to hear it!

Anonymous said...

Thinking this over... would that help, if I created a tool, nothing complicated, something like a perl script or an ansi C console app that reads a SIDwinder seq file and writes an asm template of the tune in the format used/seen in TLCPlay?...


Sure, the data would need to be edited, especially the arrangement part, but having the original data in the needed format would probably be a good start for the conversion.

Mike said...

Sure.... a console app that could read a sound module would help a lot. I'm still not sure how much effort I want to put into TED music, but if its format was exposed then there might at least be a chance.

Anonymous said...

Hmmmm... O.K.

I don't like promising stuff before it's even in my own hands ;-) but this task of creating this tool shouldn't take more than probably an afternoon to create... whatever...

The game would benefit from having proper TED sound, I'm sure (for one, I do own a SID-card, but prefer native TED stuff anyway whenever it's just possible... I can listen to SID tunes anytime I just want, I need no Plus/4 for that, I mean). Nevertheless, if you both decide with native TED music, most of this work will have to be handled by Luca... This tool that exports the SID tune file into an editable and compilable template may be a great help, but it's still him who'll have to create the new sound arrangement, edit the tracks, listen, optimize, polish, etc.

Thinking this over again (as usual |-) ), I guess this won't be _that_ hard. After exporting the SID tune into the asm template, we have an editable source. Things that need to be handled are 1.) the sound arrangement, which is absolutely different on the TED, but the tool will export the original SID arrangement (and, for that matter, everything that has no equivalent) as comments, so at least Luca will have a remainder of the original. Another point is, if Luca uses similar arrangement in more of the tunes, the arrangement could just be copy/pasted between them. 2.) The tracks are basically the same, editing is only neccessary because the TED has 2 channels, whereas the SID had three. 3.) The sector data format (the score itself) is almost the same, editing is only neccessary because of the different slide commands, and because the fact that the TED is unable to play notes below a certain value (110Hz).

O.K. This is up to you both to decide if including TED music in the game... for one, I'd like it ;-).