PT3 Duration Calculator for Z80-based platforms Author Sergey Bulba Support page http://bulba.at.kz/ (c)2005 S.V.Bulba Release date: 29 of January 2005 Subject ------- Many peoples asked me last years: "how your Ay_Emul calculates length of playing modules?" And some of them need to do same on ZX Spectrum (hi, Macros!) or MSX (hi, Dioniso!). So, yesterday I decide to solve this problem and wrote simple analog of Ay_Emul GetTime Pascal function on Z80 assembler. Time caclutor idea is fast playing given module without sound and without synchronization with interrupts generator. Of course, Z80 processor is very slow for this task, so, we need maximally simplify player: remove all data analizing, except Tempo changing. So, we have now fast and small function (0.1 to 0.5 second and about 300 bytes) called 'PT3Time'. Using ----- Current compilation and sources are designed to call from ZX Basic. Load function to 32768 address, and PT3 module to 49152 address. After that type in basic PRINT USR 32768 and length of module in interrupts will be printed at screen. Actual length of module in seconds is a shown number divided by interrupt frequency (50 Hz for the most cases). Files ----- PT3Time - compiled block to load at 32768 PT3Time.asm - assembler source, ORG can be changed to any address Limitations ----------- To speed up calculation process, I've removed all module structure and deadlock checkers, so, if you are trying use damaged modules or random data instead of real PT3, you can get a crash or deadlock. If you need add checkers from Ay_Emul GetTime function by yourself. Greets ------ Thanks to Macros and Dioniso for letters about PT3 duration problem. This work especially for you! Sergey Bulba 28-29 of January 2005