RELOCATING YOUR PLAYERS AND SONGS --------------------------------- STarKos has 2 little modules to relocate very music, and the 3 players. THE PLAYER RELOCATOR -------------------- This module allows you to relocate your players. Thus, if you must set your player in #1000 at the beginning of your demo, and in #8000 for your second effect, no need to have it twice in memory ! A simple CALL and it's done. However, you'll have to move it by yourself ! You'll find the sources on this disc, named RELPLAY.DAM or .MXM. The RELPLAY.BIN file is the same code, but compiled in #9000. You can use it, but do not modify it ! The compiled relocateur is made to be called in BASIC, with these parameters : CALL Relocator,ad1,ad2,type 'Relocator' is of course the address where the relocator is compiled. Ad1 is where you've loaded your player. Ad2 is where you want to relocate your player. Type is the player type : 0=Asm 1=Basic 2=Inter. Generally, ad1=ad2, especially in Basic, because you load the file where you want, and THEN relocate it. A little source modification is needed if you want to use it in assembler, you just have to clear some of the first lines of the source, the ones reading the parameters, in order to force yours. You can also choose not to modify anything, and to create your own parameters table given through IX. Nothing complicated, you can do it on your own :). If you recompile this module in order to use it in an asm code, you can save a lot of place by killing the 2 relocation tables you don't need, at the end of the source (relocate a BASIC ou INTER player is of no use for ASM coders, for example). THE SONG RELOCATOR ------------------ You can relocate your songs with this module. It's used by the Basic modules of this kit, so that they can load any song without taking care of their original loading address. You'll find the sources of this relocator on the disc, named RELSONG.DAM ou .MXM. RELSONG.BIN is compiled in #9000. Use it if you want, but don't modify it, the modules need it ! This relocator est made to be called BASIC like this : CALL relocator,ad1,ad2 relocator=Address of the relocator Ad1=Address where you song currently is. Ad2=Address where you want to relocate it. Here again, it's up to you to move it after relocation. But if you watch a bit how the Basic modules are done, you'll see that I don't move anything. I load the song in #2000 for example, then I relocate it in #2000 to be sure it'll work (call RELOC,#2000,#2000). Like above, a little modification is needed to use this code in asm, but it's even more simple that before (remove the 6 first lines, it's explained in the source). Here it is ! Simple but useful modules, I think.