He's back, and he's wearing a skirt! THE PHANTOM has awoken and stepped out of his coffin yet again to bestow unto his fellow comrades the new, cleaner, greener... *\*\*\*\** MR MUSIC **/*/*/*/* Version 2 Mr music and all its affiliated programs are public domain as long as it is in an unmodified form and the following files are supplied with it. MR_MUSIC.XRT The actual player. MR_MUSIC.TXT This text file. PLAY_MR.S Example player program. The Quartet to Mr Music convertors are available through CONTACT BBS, London England on +44 081 646 0746, running from 9PM to 9AM (UK time) with speeds from 300/300 to 2400/2400 (and 9600 on request), as well as example .EIT and .SNG files. They have been excluded from this version in case anyone wants to upgrade from the old version and not want to download the convertors AGAIN! If you do not have a modem and want the convertors, please contact THE PHANTOM at the address at the end of this document (with an enclosed disk) and he will send them to you. Please note that you do not have to pay for reply postage - just as long as you send a disk though! SO WHAT IS NEW IN VERSION 2? Basically, version two is 5% faster (Jee, I can do 3D in a frame now!) and is a lot more cleaner with the sample handling. Matrixx of ST Squad was playing about with a certain technique and so Griff developed on that and improved the clarity of the player (you can hardly tell it from version 1, but this one's 100% accurate). Using this technique, Griff knocked down the register usage down to D7 and USP. So now, only D7 and the user stack pointer are used in the sample player interrupt. It also means a saving of about 4% from the old player. Also, The Phantom sped up his music driver so now it does not jump about (in CPU time) as much and in general is about 1% faster (how fast CAN you get?!). The driver took very little time anyway, but we thought we might as well! In all, it is WAY better than the original, and offers much more refined features too. Also, ole Uncle Phanty improved the sound tables so now a much more crisper and basy sound will emerge from your loudspeaker. SECTION 1 - PLAYING BACK A MR_MUSIC FILE. First of all, a Quartet song and voice set need to be converted. For anyone there groaning about no Soundtracker convertors, there will be one, as soon as we find someone who will be willing to do one (Griff might, but he's a right lazy bastard!). The example .S file will demonstrate how to play back a Mr Music song, but here's how it is done: 'Offset' is the offset (in bytes) from the start of the MR_MUSIC.XRT playback routine, and in DECIMAL. Firstly, we place the (LONGWORD) address of the .SNG file into the player at offset 24. Secondly we place the (LONGWORD) address of the .EIT file into the player at offset 28. Thirdly we place the (LONGWORD) address of 32768 bytes of free space. This space is needed for Mr Music to generate some tables. Please DO NOT alter any of these values in these tables (after they are generated) or you wil get some WEIRD sounds! Now make sure you have installed your VBL with the call routine in it (see below). Now we initialise Mr Music with a JSR or BSR at offset 0. Now you HAVE to call Mr Music every VBL with a JSR or BSR at offset 12. If you don't do this, it will not play! To stop playing Mr Music, just JSR or BSR at offset 8. It is best that you switch off interrupts (a MOVE to SR will do this) before you do this. More offsets... The Mr Music interrupt automatically sets SR to $2500 every time it plays so you can have flicker-free rasters or whatever. If you want to grab that extra CPU time and don't want this feature, just JSR or BSR at offset 16. To enable it back on, a JSR or BSR at offset 20 will do this. Please note that as a default it lowers the SR to $2500. If you want a new tune to be played while Mr Music is playing, then store the new tunes' address at offset 24 (as above) and then JSR or BSR at offset 4. Note that this takes a fair amount of CPU (about 20 screenlines worth) to do its work before actually playing the new tune. So here is an overview of the offsets: OFFSET FUNCTION ------ -------- * ROUTINES * 0 Initialise Mr Music and start player. 4 New tune. When a new tune is to be played. 12 The sequencer itself. 16 The SR is NOT lowered to $2500. 20 The SR is lowered to $2500. * STORAGE * 24 Address of tune (longword). 28 Address of voice set (longword). 32 Address of 32768 bytes of free space (longword). SECTION 2 - TECHNICAL NOTES. The VBL handler in Mr Music takes an extortionate amount of CPU time and uses every single register. Make sure that any interrupts above IPL $2300 occuring between the VBL and sreenline 16 (see paragraph below) do not use these registers. You can save these registers in your interrupt if it is needed in that area. The actual sample interrupt uses D7 and USP and you must NOT touch these registers at any point unless a higher priority interrupt saves them and restores them. The sample interrupt, as in the old version of Mr Music uses TIMER D, so it leaves you with a host of other higher priority timers to work with. If you ARE doing rasters with Mr Music playing in the background, then we suggest that you do not use any registers (in the HBL interrupt) in the first 16 lines of the screen (actually it is less but make it 16 to be safe). This is because the VBL sequencer is still enabled at that point, and it uses all registers it can for speed. If you want fast rasters, then make the first 16 rasters use no registers, then the rest can use any registers you like (with the exception of D7 and USP). The old Mr Music had a limitation to how much other interrupts can take. Version two (this one!) has no such problem - well, if you DO go overboard on your interrupts then it WILL have a problem, but generally it can tolerate quite an amazing amount of interrupts (the ego-trippers intro The Phantom did is an example of this). The Quartet songs knacker the player (I.E. play all out of time) at certain tempo values. The ones we have found to work perfectly with Mr Music are 187,230,250 and 300. We don't know if there are any others, since these are the only speeds we use anyway!! Also beware of empty voices. Griff left out a safety feature in the convertor so that means you have to check for this: if there are any voices you are not using, then put a rest in them. I.E. if you are not using voice 3, then shove a rest in it instead of leaving it emplty (any length rest will do). Failure to do this will make Mr Music crash. It is best to have your original Quartet song file at 11Khz. Griff's convertor is really quite shit at converting sample frequencies down, so it's best to use Quartet's excellent DIGITAL to convert down to 11Khz. '40%?? That's a LOT!' No it isn't! 40% is piddly compared to the registers you have left and the quality of the sound. Other 'soundtrackers' use up 60% or more, and that is at a lesser quality too!! If you STILL think that is too much, then you are not trying hard enough. Why? Well, just have a look at the ego trippers intro, or the Things Not To Do Demo (Yup! The main tune uses Mr Music) or the example Mr Music Demoette The Phantom did to show that all is not lost at 60% CPU left! SECTION 3 - THE END and things. The Phantom here: Evening everyone! I might as well say that with the advent of MSC (Monster Sound Cartridge) I was very tempted to write an output routine for it. But I didn't. It's shit. I mean, it is! The only output device I find good (and fastest) is the replay cartridge. The Stereo Replay cartridge is nice, but it's shit slow to output to, but much better than MSC. I will do a Replay output version soon (and MV16 - I like that!), but no specific MSC (sorry, but there I was, wide-eyed and looking forward to the MSC specs and they let me down). Also, for all those grumpy bastards that can't do anything in 60% (!!) I have done a demo program with nice parallax scrolling and all that! So there! You can obtain this demo from me or Contact BBS (details above). For all those fans of SPX I have some good news. The creator is all nicely GEMmed up and almost complete. So be patient it WILL arrive soon. I am still working on the 512 colour 640x552 mode, but at the moment we're wondering wether or not to go ahead with it (since we have limited colour resolution per line). Also, Gizmo has his hands on two 24-bit colour scanners (!) so get ready for some fab all-new SPX's! Right, if you want any more information/programs to do with any of the above, or more, contact The Phantom at the address below: The Phantom, 21 Bledlow House, Capland Street, LONDON, NW8 8RU England. If you want any programs (like the convertors etc etc) please enclose the required disk/s. Right, that's it, so enjoy Mr Music and may your inner ear burst with the funkadelic sounds from your throbbing speaker! Members of Electronic Images are: Gizmo The Phantom Nightowl Count Zero Griff Master This has been an Electronic Images production!