First Spear Posted October 29, 2017 Share Posted October 29, 2017 What is the right way (or smart way) to detect if an Intellivoice is connected? That way a sound effect could be played if there is no IV plugged-in. Does VOICE INIT return a value or set any memory location that can be polled through code? Thanks. Quote Link to comment Share on other sites More sharing options...
intvnut Posted October 29, 2017 Share Posted October 29, 2017 (edited) I don't know if IntyBASIC provides a native way. But, PEEK($80) will return -1 if there's no Intellivoice. IF PEEK($80) = -1 THEN PRINT AT 0 COLOR 7, "No voice" ELSE PRINT AT 0 COLOR 7, "Voice" END IF Edited October 29, 2017 by intvnut 1 Quote Link to comment Share on other sites More sharing options...
intvnut Posted October 29, 2017 Share Posted October 29, 2017 On a related note: I'm working on another update to jzIntv, so that it will pick up "voice = 1" in your CFG file and automagically enable voice. You can make use of this from IntyBASIC by adding: . ASM CFGVAR "voice" = 1 . You may still want to force voice back off for testing, though. You can specify "-v0" on the jzIntv command line to force voice off. The command line always takes precedence over the CFG file. Other useful CFGVARs include: . ' Ask for ECS to be enabled (for more PSG sounds!) ' You can override with -s0. ASM CFGVAR "ecs" = 1 ' Specify how title should appear in LTO Flash ASM CFGVAR "name" = "Long name of game" ASM CFGVAR "short_name" = "Short name" . The 'ecs' and 'voice' variable support should be in the next stable dev release, which I should post tonight or tomorrow. 3 Quote Link to comment Share on other sites More sharing options...
intvnut Posted November 1, 2017 Share Posted November 1, 2017 I've posted the new jzIntv release, finally. 1 Quote Link to comment Share on other sites More sharing options...
intvnut Posted November 6, 2017 Share Posted November 6, 2017 As I mentioned in this other thread, you can wrap the Intellivoice detect in a nice DEF FN: . DEF FN voiceon = PEEK($80) + 1 . This returns non-zero if there's an Intellivoice present, or zero if it's absent. It's slightly smaller/faster than PEEK($80) <> -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.