Heaven/TQA Posted February 12, 2018 Share Posted February 12, 2018 Hi... thanks to Wratchchild here is the Rob Hubbard music driver Rob used on the POKEY. attachted in MADS format but should be able to be adapted to other assemblers. What about a small fun contest... try to alter the patterns etc to start a new tune? so we can see what's possible? example tune is International Karate. ik_driver.zip 2 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 (edited) and here is David Wittaker's driver with Storm example. same... MADS format but this time Mark setup some macros so you can set notes directly instead of numbers... DW.ASM is the main driver simply assemble that one... storm.asm is the song data. assembling should be easy: MADS ik.asm -:oik.xex or MADS dw.asm -:odw.xex http://mads.atari8.info/mads_eng.html storm driver.zip Edited February 12, 2018 by Heaven/TQA 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 re: storm song speed is first byte in storm.asm... Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 12, 2018 Share Posted February 12, 2018 (edited) Ok, so the makefile that suggests CC65 should be ignored, just use MADS or some other cross assembler as appropriate? No need for additional libs beyond what the assembler source contains? Edited February 12, 2018 by carlsson Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 nah... forget everything... no cc65 etc assembling should be easy: MADS ik.asm -:oik.xex or MADS dw.asm -:odw.xex Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 12, 2018 Share Posted February 12, 2018 Ok. I am a DASM guy by heart so I'll see if I can adapt the syntax before downloading yet another cross assembler. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 (edited) IK should be no problem except of RUN directive which translates toORG $2e0.word startadressstorm is more trickyas it uses macros. but macro should be in dasm.macro.endmacroas far as I remember :1 = first parameter Edited February 12, 2018 by Heaven/TQA 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 12, 2018 Share Posted February 12, 2018 Step #1 finished: adapting the code to DASM format. I only slowed down the demo tune a little to verify that everything works. It generates a PRG file that has the same format as the XEX file. While I don't understand the contents of the format, it works in Altirra which is my primary goal. dw-dasm.zip Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 cool. Quote Link to comment Share on other sites More sharing options...
emkay Posted February 12, 2018 Share Posted February 12, 2018 Ok, but why using old and unfinished sounddrivers? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 Because we can and its fun... why not? Mainly my idea was guys could play around and we dont abuse RMT all the time. Other drivers could be the ones Jakub used and the German Chaotics. Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 12, 2018 Share Posted February 12, 2018 I'm not sure how envelopes are addressed in this routine. I realize that envelope 1 is silence (Env0) but the demo song seems to use envelopes 1-7 and 11-13 while the code has labels for Env0 to Env9. Is the macro syntax in MADS some kind of octal form so 11 equals 8+1 = 9 and 13 equals 8+3 = 11? Besides I think tbe Env6 label is wrong by one line, shouldn't it begin with BYTE $A? I believe the first byte in each envelope sets the tone, the following bytes set the volume. I also rearranged the note macros so it starts at E1 (lowest note) and ends at C6 (highest note). I understand that many sound chips work the other way around, so the highest possible value equals the lowest frequency and vice versa, but musically it doesn't make sense to address octaves backwards. (I'm not taking this too seriously, just trying to see if I understand it) Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 12, 2018 Author Share Posted February 12, 2018 Havent looked myself into detail. Maybe Mark can help. I was tied up today with other stuff but gave that a go. Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 12, 2018 Share Posted February 12, 2018 Aha, ENVELOPE points to the EffectsTab list which sets an actual envelope, distortion, trill (arpeggio) and an effect byte (glissando etc?). That makes far more sense. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted February 12, 2018 Share Posted February 12, 2018 Glad you worked that out. This code does date back to 2004 and even then referred to the disassembly I looked at in the early 90's The attachment shows the approach (in C) that I took to generate the song data from the original, I took that further to look at the Speedball tunes, but adapting / remapping the C64 waveforms settings to the closest EffectsTab entry in the Whittaker player needs care. As I mentioned on that thread, the namings I used probably don't match the real work names they should so can be change appropriately, 'SET_INSTRUMENT' may work better than 'ENVELOPE' in the tune file. Regards, Mark parse_st.zip 2 Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 13, 2018 Share Posted February 13, 2018 (edited) So for a POKEY newbie, are these the distortion values as used in David Whittaker's routine? ; Descriptions grabbed from "Mapping the Atari" ; $00 five bit, then 17 bit, polys ; $20 five bit poly only ; $40 five bit, then four bit, polys ; $60 five bit poly only ; $80 17 bit poly only ; $a0 no poly counters (pure tone) ; $c0 four bit poly only ; $e0 no poly counters (pure tone) I'm also trying to figure out the EffectsTab. So far these are wild guesses from my side, anyone who has the answer is welcome to correct me. EffectsTab: .BYTE 0, $A0, 0, 0 ; ENVELOPE 1 = Silence .BYTE 9, $C0, 0, 0 ; ENVELOPE 2 = Bass .BYTE 3, $80, 0, 0 ; ENVELOPE 3 = Snare w/ tone .BYTE 1, $80, 0, 0 ; ENVELOPE 4 = Snare toneless .BYTE 4, $A0, 0, 1 ; ENVELOPE 5 = Long vibrato? Medium fade .BYTE 5, $A0, 0, 1 ; ENVELOPE 6 = Short vibrato? Partial fade .BYTE 4, $A0, 3, 0 ; ENVELOPE 7 = Arpeggio minor .BYTE 4, $A0, 4, 0 ; ENVELOPE 8 = Arpeggio major .BYTE 7, $C0, 0, 0 ; ENVELOPE 9 = Melody no vib? .BYTE 7, $A0, 0, 1 ; ENVELOPE 10 = Melody vibrato? .BYTE 5, $A0, 0, 1 ; ENVELOPE 11 = Short vibrato? Partial fade .BYTE 5, $C0, 0, 0 ; ENVELOPE 12 = Short no vib? Partial fade .BYTE 8, $A0, $C, 0 ; ENVELOPE 13 = Octave, full fade .BYTE 5, $A0, $C, 0 ; ENVELOPE 14 = Octave, partial fade .BYTE 5, $A0, 3, 0 ; ENVELOPE 15 = Arpeggio minor, partial fade .BYTE 6, $C0, 0, 0 ; ENVELOPE 16 = Staccato no vib? Edited February 13, 2018 by carlsson Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted February 13, 2018 Share Posted February 13, 2018 (edited) Yes, second byte in the effects table is giving the AUDC distortion value. (https://www.atariarchives.org/dere/chapt07.php) So he's mostly using $A0, pure tone, then some $C0, distortion, and a couple of $80, white noise.The third byte is toggling the played note by the number of intervals stated, so as you point out minor=3, major=4 and octave=12. The final byte controls the effect, not used in this tune is a 'rising' note effect if the high bit is set (so $80). The value of 1 here selects the vibrato but the replay routine, despite having two tables, only uses the shallower Wave1Mod. Other player routines cater for better arpeggio support, e.g. allowing for a chain of notes to be applied. Bear in mind that the RMT tracker is a culmination of being able to support different types of effects. When the resulting executable is made, the program sets flags based upon what has been used and so code is only included if required to keep processing time down to a minimum. [Edit] The Storm tune also appears to be only using envelopes/instruments 2&3, 7, 11&13.Envelope 1 is silence, as its a pure tone with no effect but the volume pattern it is associated with is set to zero. Edited February 13, 2018 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 13, 2018 Share Posted February 13, 2018 After a couple of hours where I thought I was going insane, it struck me that the default configuration in Whittaker's driver is that voices 1 & 2 are merged into a 16-bit voice. It appears that arpeggio (trill) and vibratio effects don't work at all in that one, and I'm not even sure if the different types of distortion yield the intended effects. Once I used logic channels 2 and 3 (mapped onto POKEY voices 3 and 4), I got all the effects to work as advertised. Perhaps there is a way to get at least vibratos to work on the 16-bit channel too, but at the moment I'll move onto my newfound knowledge and use sounds and effects according to that. 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted February 14, 2018 Share Posted February 14, 2018 (edited) That's a good topic for discussion in relation to player routines as actions like vibrato are going to act differently across the frequency range of 16 bits as compared with the 8 bit frequencies. As it is applied after the current Note has been translated into a frequency, even in the 8-bit range we see that at one end of the scales, the intervals between the frequency values of adjacent notes are close but widen at the opposite end. So using the same vibrato (e.g. 0, 1, 2, 1, 0, -1, -2, -1, repeat) has differing effect across the range and hence should it be the job of the player to scale that dynamically, or the composer to maybe use a set of instruments that differ in the vibrato pattern they use? With a 16-bit channel a vibrato pattern would need bigger values to produce the same effect. Equally with tremelo, should that be the player modifying a channel's volume or built into the envelope? In the DW player (and looking at the Draconus which is pretty much the same thing!) it would seem the the 'limited' use of the 16-bit channel for bass and snare avoids having to facilitate the effects on that channel/voice. Looking at the note table sizes, these have < 64 entries and so a different approach for the vibrato maybe to expand this to quarter values and then the vibrato effects the note which then looks up the frequency? Edited February 14, 2018 by Wrathchild 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 14, 2018 Share Posted February 14, 2018 Once when I implemented vibrato in my own player, I would look ahead for the frequencies of the semitones right above and below the desired one, take the difference and divide in 2 and use those for maximum and minimum actual frequency to oscillate between. It takes a bit more work (raster time) but would work equally well over the entire range. Anyway, I thought that the POKEY "runs out" of 8-bit frequencies in the upper end of the scale so I primarily thought the 16-bit one would be desirable for melody lines on the top but yes a least a 16-bit vibrato then would be useful. Now I understand that we're mostly digging for fun here, as there are much newer music tools on the Atari 8-bit for anyone seriously looking to do music so I won't put much more thought in trying to fix or improve this particular player. 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted February 14, 2018 Share Posted February 14, 2018 Agreed, I accept the sentient of this thread might be to appreciate how these guys did it 'back in the day', i.e. without trackers Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 14, 2018 Author Share Posted February 14, 2018 i am still looking forward to have at least one new track or musical example... maybe we got a "new" kind of driver which ppl can use and not that RMT thing... Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 14, 2018 Share Posted February 14, 2018 Eventually I will produce something lame out of this, now that I've spent some time trying to understand it. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.