Deja Vu #08
31 мая 1999 |
|
CODING - Universal Player - Pro Tracker v3.31.
AY-Track: -= X-FILES THEME =__________________________________________ __________________________________________ UNIVERSAL PT3 PLAYER ------------------- So, Pro Tracker 3.31 ... In his SETUP'e have the opportunity to change the table notes: PT or ST. While you are compiling the music together with the player'om - everything is in order. But when a couple dozen Mouzon has only one player - trouble begins ... The fact that the table is in the music player (in fact, do not sew is it to each Mouzon?). Thus, music, calculated to another plate, to be played so player'om disgusting (especially if you use Envelope - they have something to play the old way, regardless of the table notes!). With such a phenomenon faced by DANIEL preparation of Deja Vu # 07. In addition obezglyuchennoy version, country walks version of the journal in which one Mouzon (moy!) incorrectly played. In addition, the 128-th shell of this version (in listalke) port arrow. Fortunately, shortly glitches were seen and corrected. For the Player had to keep Two tables of notes (for 192 bytes each) and for each type Mouzon box, indicating the table type. Moreover, because of the catastrophic shortage of memory in the 128-th shell, had one of those plates to throw at area (257 bytes) interrupt vectors ... This prompted me to study Player. It turned out that compiled module, there is one such ugly Baitik, indicate the type of table. The player that Baitik is not used, and in the description of him says nothing ... It is located at offset # 63 from the beginning of the module (without the Player), immediately after the last byte of information about the artist music. Baitik this is zero if Mouzon designed for Pro Tracker'ovskuyu table notes; unity - at Sound Tracker'ovskuyu. Just in case, bring yourself a table: Pro Tracker frequency table: # C21 # B73 # ACE # A33 # 9A0 # 916 # 893 # 818 # 7A4 # 736 # 6CE # 66D # 610 # 5B9 # 567 # 519 # 4D0 # 48B # 449 # 40C # 3D2 # 39B # 367 # 336 # 308 # 2DC # 2B3 # 28C # 268 # 245 # 224 # 206 # 1E9 # 1CD # 1B3 # 19B # 184 # 16E # 159 # 146 # 134 # 122 # 112 # 103 # 0F4 # 0E6 # 0D9 # 0CD # 0C2 # 0B7 # 0AC # 0A3 # 09A # 091 # 089 # 081 # 07A # 073 # 06C # 066 # 061 # 05B # 056 # 051 # 04D # 048 # 044 # 040 # 03D # 039 # 036 # 033 # 030 # 02D # 02B # 028 # 026 # 024 # 022 # 020 # 01E # 01C # 01B # 019 # 018 # 016 # 015 # 014 # 013 # 012 # 011 # 010 # 00F # 00E # 00D # 00C Sound Tracker frequency table: # EF8 # E10 # D60 # C80 # BD8 # B28 # A88 # 9F0 # 960 # 8E0 # 858 # 7E0 # 77C # 708 # 6B0 # 640 # 5EC # 594 # 544 # 4F8 # 4B0 # 470 # 42C * 3F0 # 3BE # 384 # 358 # 320 # 2F6 # 2CA # 2A2 # 27C # 258 # 238 # 216 # 1F8 # 1DF # 1C2 # 1AC # 190 # 17B # 165 # 151 # 13E # 12C # 11C * 10B # 0FC # 0EF # 0E1 # 0D6 # 0C8 # 0BD # 0B2 # 0A8 # 09F # 096 # 08E # 085 # 07E # 077 # 070 # 06B # 064 # 05E # 059 # 054 # 04F # 04B # 047 # 042 # 03F # 03B # 038 # 035 # 032 # 02F # 02C # 02A # 027 # 025 # 023 # 021 # 01F # 01D # 01C # 01A # 019 # 017 # 016 # 015 # 013 # 012 # 011 # 010 # 00F Pay attention to the numbers from last table marked with an asterisk. In PT3 they were equal and # 3FD # 10A. In the above table (and in player'e), I replaced them with value of this ST (apparently, if you copy plates of ST in the PT3, the author some inaccuracies). Now about player'e. After completion of his length has increased by 24 bytes. Such a small increase was achieved taking into account some features of the frequency table. The fact that the frequencies of notes two adjacent octaves are as 1:2. T. is, for example, the frequency of the notes "to" 1 st octave 2-fold lower than the frequency of the same notes 2 nd octave. Since the AY'shke for job sound frequency used something like a period of acoustic oscillations (or more precisely - the division factor of frequency), and the period and frequency sound is inversely proportional to each other, then the ratio will be 2:1. Thus, knowing the coefficients for notes one octave, you can get all the rest. Because all the coefficients - whole numbers, then in order to minimize computational errors to start with the lowest octave, and "Frequency" of other music to get by dividing the octave in half. All of this is easy to see from the above tables: the number of 2-th row 2 times manshe numbers first, etc. The new player is recommended for logs and various music players. It removes the problems associated with the sign notes, but there are still problems with importing music from other editors: the ST and STP is a parameter HEIGHT (in PT3 it's not); in ST ornamental looped as well as a sample; in STP and PT3 different ways lowering the sample volume (at STP - by subtracting the amplitude of a number of dumping it in a zero if there was a shift in PT3 - on the table) etc. Listig the Player is very big, so the posting it here does not make sense. All source (in XAS'e) in the appendix. It uses some of the specific for XAS'a expression: label'h - the selection of the high byte. DEFS 123, # 0000 - 123 Reservation zero. Also note that the XAS does not comply with the priority of operations - the expressions are evaluated from left to right. Here I quote a small piece of the listing, in charge of selecting the tables and their "dekryunching: ;----------------------------------------; At the entrance to the A: 0 or 1 . ; ; Choice of one of two tables: LD HL, FREQ0 +24 LD DE, FREQ1 +24 PUSH HL OLD_F CP 0 LD (OLD_F +1), A JR Z, NO_SWAP ; Swaps 12 notes (24 bytes) so that ; With tags FREQ0 were needed: SWAP DEC E DEC L LD C, (HL) LD A, (DE) LD (HL), A LD A, C LD (DE), A JR NZ, SWAP NO_SWAP POP DE ; Further, from the lowest octave, we obtain And seven others: LD L, B LD B, 12 * 7 FRQ_GEN LD A, (HL) INC L LD C, (HL) INC L SRL C RRA LD (DE), A INC E LD A, C LD (DE), A INC E DJNZ FRQ_GEN ; Table "frequencies." Located at the address ; ORG + # 200. Length - 192 bytes. ; In player'e before the first initialization , This table contains only , 24 initial bytes (12 notes PT3): FREQ0 DW # C21, # B73, # ACE, # A33 DW # 9A0, # 916, # 893, # 818 DW # 7A4, # 736, # 6CE, # 66D ; Remaining 192-24 = 168 bytes scored zero , (Just before the first initialization). ; First 12 notes ST, located at the end ; The Player: FREQ1 DW # EF8, # E10, # D60, # C80 DW # BD8, # B28, # A88, # 9F0 DW # 960, # 8E0, # 858, # 7E0 ;---------------------------------------- In addition, I am a bit (8 bytes) has reduced the initializer and put EI on the output. When you call [ORG +0] interrupt is prohibited, followed by the initialization. At the exit interrupts are allowed (put EI). When you call [ORG +5] interrupts do not touch. WARNING: when playing yuzaetsya stack and register IY. The parish at this time Interrupt highly undesirable! At the exit in LY entered # 3A (HY player'om does not change), HL 'banging and not restored! When you call [ORG +8] does not spoil or register IY, or HL '. Interrupts are not changed. Unfortunately, we had to bang all the inscriptions in player'e. It remains only 3 bytes in which I stuffed "CBX". If it does not suit kogolibo - replace them with "PT3" or "GDC" ... - - - -----====***< March 6, 1999
Other articles:
Similar articles:
В этот день... 21 November