boardgamebrewer Posted August 15, 2018 Share Posted August 15, 2018 Hi All, I'm working hard on my game! I'm now on adding sounds. I added a couple of buzzer type sounds that I pulled from "Programming games for intellivision" but I would like to find code examples for the default sounds on the intv. Like the ding and EEENNNN (bad entry sound). I haven't found a resource for this yet, so wondering if anyone could point me in a direction. Thanks,Jeph Quote Link to comment Share on other sites More sharing options...
+nanochess Posted August 16, 2018 Share Posted August 16, 2018 Designing sound effects is almost an art, in special if you want to get an amazing sound effect. But in practice there a few principles: 1. To generate a ding, start with a high volume (15) and in each frame reduce the volume by 1, this can be for a 4 or 8 frames. 2. ENNNN, is essentially the same but with the volume cycling 15-14-13-12-15-14-13-12-15-14-13-12, maybe for 20 frames. Play with the frequency to get the note you want. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted August 16, 2018 Share Posted August 16, 2018 (edited) Hi All, I'm working hard on my game! I'm now on adding sounds. I added a couple of buzzer type sounds that I pulled from "Programming games for intellivision" but I would like to find code examples for the default sounds on the intv. Like the ding and EEENNNN (bad entry sound). I haven't found a resource for this yet, so wondering if anyone could point me in a direction. Thanks, Jeph The built-in sound effects of the Intellivision are implemented using something the original programmers called "SCODE" (for "Sound Code"). It is a sort of "scripting" virtual machine for sound effects managed by the original Executor (the built-in operating system of the Intellivision, also known as the "Exec"), and requires adhering to the Exec's programming framework. I can tell you that nobody uses the Exec any more (and nobody has used it for several decades now). Although a very powerful framework for its time, it was also very primitive and had onerous limitations and constraints. It is also proprietary software from Mattel Electronics (now from Intellivision Productions, Inc.) and nobody outside the IP owners have legal access to the documentation of this framework and programming model. It is therefore severely arcane and obscure. Thus, all Intellivision home-brews completely bypass the Exec: most just let it boot up, initialize the system resources, and then hijack control at the first opportunity and never look back. The consequence of this is that no effort is put into learning, reverse-engineering, or figuring out how to access Exec resources such as SCODE from modern programming frameworks -- precisely because there is no need, and there is almost always a different way of doing things. Ideally modern tools and frameworks would offer some of the best capabilities available in the Exec, but believe it or not, the Intellivision home-brew scene is still very immature right now -- IntyBASIC just arrived to the scene barely four years ago, and it has grown and evolved significantly since then. There is still a long way to go. So what's the TL;DR? Built-in sound effects require the Exec. We don't use the Exec, so you'll have to program your own sound effects using IntyBASIC's features. If you want to mimic the original built-in sounds, you'll have to reproduce them in your own way. -dZ. Edited August 16, 2018 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
boardgamebrewer Posted August 16, 2018 Author Share Posted August 16, 2018 Understood. Thanks Nanochess for direction and thanks DZ for the details. Quote Link to comment Share on other sites More sharing options...
artrag Posted August 16, 2018 Share Posted August 16, 2018 Look at this http://atariage.com/forums/topic/275934-psg2bas-utility-to-convert-musicsounds/?fromsearch=1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted August 16, 2018 Share Posted August 16, 2018 Look at this http://atariage.com/forums/topic/275934-psg2bas-utility-to-convert-musicsounds/?fromsearch=1 That's a good way of doing it. Just be aware that going that route requires the space to store the full set of register changes over time for each sound effect. That may or may not be a problem, but it is the main trade-off of this solution. A benefit is that no expensive computations are needed during run-time to get the values: they are just read form the data table and copied directly to the PSG. Thus, storage vs. performance. In contrast, what the Exec offers (which I still say is superior, especially for generating brand new sounds instead of ripping them off from existing sources), is a set of sound manipulation primitives that allow you to put them together in a short "script" that executes automatically during frame refresh. Thus, you call it once, and it returns control immediately, while it updates in the background on its own. You could say things like (off the top of my head): Set tone to note "A" in channel 1 Ramp up frequency by 2 semi-tones every other frame Stop when two octaves are completed Switch to noise in channel 1 Set volume to 15 in channel 1 Ramp down volume by 1 every frame Stop when volume reaches zero I think there's value in offering something similar in IntyBASIC. It has some features already that get it close. It just needs internal counters and at least one, preferably more, user-accessible dedicated variable "registers" for the script to keep state across updates. Control flow and PSG register access are already built-into the language. -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted August 16, 2018 Share Posted August 16, 2018 (edited) Use ayfxedit and export the csv data to import them in intybasic. You can draw what you want directly in the ay8910 registers frame by frame Edited August 17, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
intvnut Posted August 16, 2018 Share Posted August 16, 2018 As for the EXEC sound effects, it basically has 4 built-in sound effects: The RAZZ. The key-click. The referee whistle. The cheering crowd. The RAZZ and key-click can both be achieved by loading one set of parameters in the PSG and holding them. One way to find these parameters is to pop open jzIntv and put a 'w'atch on $1F0 - $1FD to see what the EXEC programs there. The referee whistle is two alternating sets of parameters. It's a little more work to determine what those parameters are, but not difficult. The cheering crowd is perhaps the most complicated one. It's not actually a static sound effect, but rather a sound program, complete with looping and random numbers. It'll take some programming to replicate it outside the EXEC. 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.