Short: The Player, a converter/replayer (Fix) Author: Photon,NoName,Platon42,Tolkien,The Dark Coder Uploader: photon scoopex1988 org Type: mus/misc Version: 6.1A 610.7 Architecture: m68k-amigaos The Player 6.1A 610.7 / 13.03.10 Copyright 1992-95 Jarno Paananen Guru / Sahara Surfers A Sahara Surfers Product 1995 Fixed 1998-04 by NoName, Platon42, Tolkien and The Dark Coder Optimized, bugfixed 2010-03 by Photon/Scoopex Packaged single-include easy-to-use archive with examples and comments. P6106, Optimized by 25% and Bugfixed for "The Player 6.1A" New in 610.7 ------------ This is not a minor update, but the numbering has been kept for historical reasons. First update was an optimization, second a bugfix in NextPattern, PosJmp, and SetPosition, and third I made SetPosition work. 610.6 was profiled, and performance wasn't bad - close to Taipan's NT- compatible, 3 scanlines playroutine - say 3.5 scanlines. For the main note- replay part, that is. (P61_Music without P61_preplay.) Main part did little more than shuffle playroutine data, and had been distributed over the frames with use-code compile-option snippets, as is proper. Therefore, very little changes have been made to that part. Added to that was the decrunch code (P61_preplay), which resulted in 7.5 scanlines. I learned the decrunch code and rewrote it, gaining 50%, resulting in a 25% total gain when combined with the basically untouched P61_Music. This applies to all modules tested, the lowest gain is 1.7 scanlines and the highest 2.2 so far. >> This basically means "5.5 scanlines max instead of 7.5". << All measurements done with 68000 running at full speed without interfering bitplane or blitter DMA, when used 'in action' the raster time gained might be greater, but still 25 percent. Timing measurement and testing done on >12 random modules, with the above results. Optimization has been made only with regards to the maximum raster- time consumed, as it is this which affects a demo's or game's performance. But gain should be near to the above also for average time consumed. (I have no idea what the gain will be if you set use=-1. Set it to the value in the P61.#? file comment! All modules have been tested with use=-1, of course, so laziness is not a problem, just a raster time loss.) It has also been tested in 68040 mode on my accelerated OCS A500, and WinUAE 2.0.2b15. Not that it means anything. I've made no changes that would work differently on any Amiga. GLOBAL CHANGES: - added the var 'C' to allow an indexed $dff000 custombase, f.ex. $dff058. - single include file, with a comment-stripped version - Changed CIA_Example to use the include file and example module - Wrote P6107-Example.S to do the same without CIA, with VBlank example code. - Label: (and non-Label:) compatible now. - Compatible with AO (Assemble With Optimize branches) now. - all conditional assembly statements preserved. - about 25% faster. - about 340 bytes longer code. CHANGES IN P61_MUSIC: - slightly faster jtab jumptable - used d16(An) to step to next channel instead of d6,d7, same timing. - replaced all clr.* with move.* d7 (d7=0, valid in all P61_Music routines) - used d6 as the constant #$f0 - a4 is ptr to channel 0 ($dff0a0) and a6 is ptr to custombase(+C if used) - all references to a4 and a6 correctly applied to the above - all changes global to P61_Music, ie. no fiddling with effects code or moving stuff around. You will recognize the old P61_Music :) CHANGES IN P61_POSJMP: - track-address lookup bugfix to work as in P61_Init. - optimization of above - optional optimization. CHANGES IN P61_SETPOSITION: - track-address lookup bugfix to work as in P61_Init. - optimization of above - WORKS now. (Seems old code left from before patterndata was compressed.) - default function is "instant", documentation for tempo- or beat-synced patternjump. OTHER CHANGES: - none. ADDED FEATURES: - 1Fx command option for 'starting timed effects' instead of E8x, which gives a code size and speed optimization if no other E-commands are used in the module. Demonstrated in P6107-Example.S, just add the commands to the module to get some blinking colors :) DOCUMENTATION: - See extensive comments in P61-Play.S and P61-Example.S. FEEDBACK: - I am confident every module that works in P6106 works in P6107. - If you find a module that doesn't or want to give feedback, email photon scoopex1988 org. - If you want me to answer questions about P61 playroutines in general, ask me soon, before I forget. Best before date is 1 week from release date. :P WISHLIST/FUTURE: - BUG found in P61_Init. Modules with songlen 1 get P61_Slen=2. Not fixed. All other song lengths tested so far work fine. - 'Click'-less starting of samples. See mod.madness took me from Mental Hangover. Not fixed, because the clicks can be heard in original Protracker :) - If you fix these, please don't forget to credit me, since I've put in a lot of extremely annoying time to make this solid update, compared to a few patches. "To be quite honest, in retrospect I'd rather have a vasectomy!" (c) 3PO But at least YOU can have fun with it. Bah. :) //Photon