+nanochess Posted February 24, 2018 Share Posted February 24, 2018 Hi everyone. Some months ago I've released my CoolCV emulator with capability to log PSG sounds value using Ctrl+F9 (or Ctrl-Fn-F9 in Mac) This data is put into a psg.txt file and then you can cut the interesting block into another file. AND THEN pass this extracted file into psg2bas, an utility I've wrote to convert this data into compressed playable music by IntyBASIC It works very well . Currently it cannot handle the noise channel but scarce Colecovision games use it. Included executables for Windows and Mac. Edit: v0.1 allows to ignore channels, useful if logged music includes sound effects. Enjoy it! psg2bas.zip psg2bas_v0.1.zip 4 Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted February 24, 2018 Share Posted February 24, 2018 Hi everyone. Some months ago I've released my CoolCV emulator with capability to log PSG sounds value using Ctrl+F9 (or Ctrl-Fn-F9 in Mac) This data is put into a psg.txt file and then you can cut the interesting block into another file. AND THEN pass this extracted file into psg2bas, an utility I've wrote to convert this data into compressed playable music by IntyBASIC It works very well . Currently it cannot handle the noise channel but scarce Colecovision games use it. Included executables for Windows and Mac. Enjoy it! Works awesome, now I can throw away my ugly version. Thanks 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 24, 2018 Author Share Posted February 24, 2018 BTW, this doesn't MIX with the IntyBASIC tracker. If you need to play sound with this code and you've enabled before the IntyBASIC tracker you should use this: PLAY NONE SOUND 0,,0 SOUND 1,,0 SOUND 2,,0 Before enabling this mini-tracker, and when you're finished (if you want to use again the internal IntyBASIC tracker), you should do: PLAY SIMPLE ' Or PLAY FULL if you like Quote Link to comment Share on other sites More sharing options...
First Spear Posted February 24, 2018 Share Posted February 24, 2018 As always, thanks for sharing the awesomeness! I cracked open the psg2bas.bas file and saw this: ' Just to allow to TV synchro start successfully FOR c = 0 TO 60: WAIT: NEXT c I have not seen that before. Should that be a standard initialization routine for IntyBASIC stuff these days? Thanks. Hi everyone.Some months ago I've released my CoolCV emulator with capability to log PSG sounds value using Ctrl+F9 (or Ctrl-Fn-F9 in Mac)This data is put into a psg.txt file and then you can cut the interesting block into another file.AND THEN pass this extracted file into psg2bas, an utility I've wrote to convert this data into compressed playable music by IntyBASIC It works very well . Currently it cannot handle the noise channel but scarce Colecovision games use it.Included executables for Windows and Mac.Enjoy it! Quote Link to comment Share on other sites More sharing options...
intvnut Posted February 24, 2018 Share Posted February 24, 2018 Does it make any sense for me to add a similar logging facility to jzIntv? Right now, you can watch the PSG with the 'w' command in the debugger. Granted, the sound chip in the ColecoVision is rather different than the AY-3-891x, so ironically you'd need a different converter to handle the fact you're converting from AY-3-8914 to AY-3-8914. LOL Quote Link to comment Share on other sites More sharing options...
artrag Posted February 24, 2018 Share Posted February 24, 2018 (edited) How cool! It is translating the SN76489A to AY8910 registers. Well done! AY8910 has a wider range of frequencies so conversion can be always 1:1. The two chips differ in the way noise is generated and added to channels, it won't be easy to support it. PS about sfx and intellevision, the editor here allows to design sfx on AY8910 (on a single channel) https://shiru.untergrund.net/files/ayfxedit.zip and you can export the PSG registers as CSV file. Naturally if you need them in Intybasic you need to code your own converter and player Edited February 24, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 25, 2018 Author Share Posted February 25, 2018 I cracked open the psg2bas.bas file and saw this: ' Just to allow to TV synchro start successfully FOR c = 0 TO 60: WAIT: NEXT c I have not seen that before. Should that be a standard initialization routine for IntyBASIC stuff these days? I've done this because when you turn on an Intellivision, the TV set takes a few moments to recognize the synchronization. In this first second you'll not hear any sound or music. Does it make any sense for me to add a similar logging facility to jzIntv? Right now, you can watch the PSG with the 'w' command in the debugger. Granted, the sound chip in the ColecoVision is rather different than the AY-3-891x, so ironically you'd need a different converter to handle the fact you're converting from AY-3-8914 to AY-3-8914. LOL I would be very interesting to have a log feature. Because this way we could learn of how are done sound effects without having to go into the EXEC ROM. Didn't thought on this but I suggest the format for each row could read like this: A=xxxx xx B=xxxx xx C=xxxx xx E=xxxx xx M=xx Frame:x I think this is easy to read for a human being and also easily processable by an automated tool. How cool! It is translating the SN76489A to AY8910 registers. Well done! AY8910 has a wider range of frequencies so conversion can be always 1:1. The two chips differ in the way noise is generated and added to channels, it won't be easy to support it. PS about sfx and intellevision, the editor here allows to design sfx on AY8910 (on a single channel) https://shiru.untergrund.net/files/ayfxedit.zip and you can export the PSG registers as CSV file. Naturally if you need them in Intybasic you need to code your own converter and player Thanks! I'll give a look. The SN76489 is able to generate lower frequencies for noise, but anyway the LFSR sounds completely different. Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted February 25, 2018 Share Posted February 25, 2018 A simple test, could be improved a lot of ways, but I only spent 20 minutes on it Could be used as a semi annoying screen saver type thing. 1701.rom 2 Quote Link to comment Share on other sites More sharing options...
artrag Posted February 25, 2018 Share Posted February 25, 2018 ? Quote Link to comment Share on other sites More sharing options...
artrag Posted February 25, 2018 Share Posted February 25, 2018 (edited) The noise generator in the SN76489 has independent volume control (in the AY8910 it gets the volume of the channel used to mix it) and 4 frequency settings: fn = 3,57MHz/512 fn = 3,57MHz/1024 fn = 3,57MHz/2048 fn = frequency from channel 3 Usually when used with frequency from channel 3 this latter is muted. http://map.grauw.nl/resources/sound/texas_instruments_sn76489an.pdf In the AY8910 the noise generator has 5 bits to define the chip rate fn = 3,57MHz/(16*(1+Tn)) In this way the lowest frequency for noise bandwidth is fn = 3,57MHz/(16*32) = fn = 3,57MHz/512 matchs the first mode in the SN76489 Anyway there is no mean in AY8910 to mix noise with tones using independent volumes and without disturbing one tone channel. In the AY8910 noise is always XORed to a tone channel, in this way the noise is displaced in frequency around the channel frequency and they get the same volume. Willing to have pure noise one should set one channel with period = 0 and use its volume to approximate the attenuation in the SN76489... Edited February 25, 2018 by artrag 2 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted February 26, 2018 Author Share Posted February 26, 2018 I've added an option to ignore input channels, useful if music included sound effects. Find it in post #1 as v0.1 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 3, 2018 Share Posted March 3, 2018 In the AY8910 noise is always XORed to a tone channel, in this way the noise is displaced in frequency around the channel frequency and they get the same volume. My understanding is that the noise is "AND"ed to a tone channel. At least that is what Joe Z. has documented. I believe this was also empirically verified. I don't know either way, so I'm curious to find out which is correct. -dZ. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted March 3, 2018 Author Share Posted March 3, 2018 There are 2 enable bits for each channel. One enables pure tone and the other enables noise. You can have pure noise disabling the pure tone and enabling noise. The mix works like an AND gate (as DZ-Jay pointed correctly) so the noise is mixed with tone if both are enabled. 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted March 4, 2018 Share Posted March 4, 2018 (edited) Sure, it is an 'and', not a 'xor' . 'And' is equivalent to a analog product, so, 'anding' by a square wave is almost equivalent to a frequency displacement. Xor is almost an analog addition Edited March 4, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 4, 2018 Share Posted March 4, 2018 (edited) Sure, it is an 'and', not a 'xor' . 'And' is equivalent to a analog product, so, 'anding' by a square wave is almost equivalent to a frequency displacement. Xor is almost an analog addition Agreed. The "AND" gives you at least some level of control over the pitch of the noise. For completeness, below is the actual mixing results, as documented in the SDK-1600: Within each channel, tone and noise are mixed as follows: output_A = ( tone_A OR tone_en_A ) AND ( noise_gen AND noise_en_A ) output_B = ( tone_B OR tone_en_B ) AND ( noise_gen AND noise_en_B ) output_C = ( tone_C OR tone_en_C ) AND ( noise_gen AND noise_en_C ) artrag's point remains: You cannot individually control the noise or tone volume balance on a channel, they are ANDed together and then the resulting signal is attenuated as necessary. The only way to get an independent "noise channel" is to dedicate one to it, by disabling the "tone enable" bit. Obviously, this leaves you only two more channels for tones. I understood that he was trying to contrast this to other sound chips (like the SN76489), which have 3 tone generators and one noise generator, all independently controlled. The C=64 SID is similar (as I remember it). The PSG, on the other hand says it has three tone generators and one noise generator, but the noise generator does not get its own dedicated channel. This affects translating sound effects from one chip to another. -dZ. Edited March 4, 2018 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 4, 2018 Share Posted March 4, 2018 It occurs to me that one thing IntyBASIC could provide is a sound generation "scripting engine." It doesn't have to be very fancy, just a set of commands that run on their own sub-process that alter the shape of the sound. It should include simple commands to manipulate the PSG, and some "program-flow" commands to allow loops, counters, timed events, etc. I believe the EXEC includes something like this, which is what facilitated cool sound effects like the "splash" sound in Thin Ice, or the "crowd cheer" in sports games. I think something like this could allow new and veteran programmers to be very creative. It's sort of the same they do today already, but letting IntyBASIC take care of the inner piping, rather than having to add all sorts of overhead to their game logic code. -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted March 4, 2018 Share Posted March 4, 2018 (edited) Pt3 by Shiru Otaku - Angel 2 (not a true pt3 player, it is more a log player ) [edit] Now with a small fix in the noise data intro.rom Edited March 6, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
artrag Posted March 4, 2018 Share Posted March 4, 2018 (edited) Another test with pt3 music [edit] Now with a small fix in the noise data vec02.rom karbo.rom Edited March 6, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 5, 2018 Share Posted March 5, 2018 Pt3 by Shiru Otaku - Angel 2 (not a true pt3 player, it is more a log player ) Wow, that sounds awesome! The drums could use some work (they are a bit muddled and "noisy," especially the cymbals and snare), but the instruments are brilliant! By the end, it even sounds like you're running a filter sweep over the bass. How do you do that, is that with noise modulation on the tone? That effect sounds awesome to me. Another test with pt3 music This one is hard to hear. The tone is very low volume, and there is a noise crack, which I imagine should be part of the drums, but make it sound like there's line distortion. The music itself comes out fine, but the volume is not good. By the way, I'm interested to know the data format of this tracker. Is it just PSG register dump? -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted March 5, 2018 Share Posted March 5, 2018 There is something wrong in the data. I'll post a fix asap. Dz it is almost a log player, but I'm working to reduce redundant sequences... Quote Link to comment Share on other sites More sharing options...
artrag Posted March 5, 2018 Share Posted March 5, 2018 (edited) Small fix in the noise data, new roms are in the previous posts For your fun, player and sample data added pt3.bas output.bas Edited March 6, 2018 by artrag 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 6, 2018 Share Posted March 6, 2018 There is something wrong in the data. I'll post a fix asap. Dz it is almost a log player, but I'm working to reduce redundant sequences... I imagine that by "log player" you mean that it plays a log containing a dump of the PSG registers over time, right? Cool. Pt3 by Shiru Otaku - Angel 2 (not a true pt3 player, it is more a log player ) [edit] Now with a small fix in the noise data What are we testing here? It looks (and sounds) like the Inty-B intro created by Tarzilla. Small fix in the noise data, new roms are in the previous posts For your fun, player and sample data added We're missing the rom to "pt3.rom" above, which in my opinion was the coolest tune. By the way, it occurs to me that these tracks sound very close to what can be accomplished with Arnauld's Intellivision Tracker. It plays modules described in something similar to Fast Tracker II XM format. It's not a register dump, but it gives you very granular control over the channels on every tracker tick. I wonder if something like that could be incorporated into IntyBASIC... -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted March 6, 2018 Share Posted March 6, 2018 (edited) Maybe Tarzilla is Shiru, who knows. Tonight I will post the original pt3 files so you can investigate Edited March 6, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 6, 2018 Share Posted March 6, 2018 Maybe Tarzilla is Shiru, who knows. Tonight I will post the original pt3 files so you can investigate I don't know what you mean by that. What I was trying to say is that the "intro.rom" file is not a music player file like the others. It's the "intro.rom" file that comes with IntyBASIC SDK. Is that what you intended? -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted March 6, 2018 Share Posted March 6, 2018 No, it is a music rom of mine, I've just tested it. When have you downloaded it? 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.