America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, March 2, 1993 10:00 p.m. Eastern Time Topic: Sound Programming Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! AFL GaryJ Tonight, our topic (should you decide to accept it) is "Sound" programming on the AFL GaryJ Apple IIG. AFA Jay what, no more sound? :) AFL GaryJ Oh! (Just testing you :) DanP18 Freudian slip. Sheppy Is this Apple IIG a new machine we've never been told about!? :) AFL GaryJ Yeah, the Apple IIG is what you get when you disconnect the speaker hookup. AFL GaryJ (A simple "upgrade") GNO Jawaid No, IIG is all those Macs without Ensoniq Power(tm) :-) DanP18 (its got 16.7 million colors, but an old ][+ style speaker. AFL GaryJ Kinda like an IBM. AFL GaryJ (It's the worst one for sound). AFL GaryJ Just like original Apple II sound. Still in the dark ages. AFL GaryJ Ok, enough babbling. Anyone have a question or comment? (On topic or not) Sheppy Yeah, but at least Apple II programmers were willing to _try_ to make the sound Sheppy sound acceptable. DanP18 ? (sound cdev) AFL GaryJ I agree, Sheppy :) GNO Jawaid What a great topic, sound. Very solid. Worthy. A very sound topic, GNO Jawaid one might say. (just to get the ball rolling) Oops! sorry. AFL GaryJ GA, Dan DanP18 Does anyone else have problems with the sound cdev? I can't use it DanP18 for very long without making my system unbootable. I have to delete the DanP18 sound cdev config file to get correct operation again. GA. Sheppy I've seen some sounds that will kill the Sound CDev. AFL GaryJ It has to do with specific sounds? I've never seen the problem. DanP18 I even have problems with the apple supplied sounds, not to mention Sheppy Yeah, there are actually specific sounds that will make the Sound CDev go nuts, DanP18 other sounds from AOL. (I really liked the ST:TNG sounds) Sheppy even if you never actually play the sound. Bad headers, probably. Sheppy I've had problems with the Sound CDev only when using those kinds of sounds; AFL GaryJ Could it be a DA or Init that is causing it? Sheppy the Apple ones and most of the ones I've gotten here work fine. AFL GaryJ (One that might also be trying to use the sound tools?) DanP18 I had problems with a stock 6.0 installation off of the Golden Master CD-ROM. DanP18 If I set up sounds to go with system events, eventually my system is dead. Sheppy Sounds like you have a problem _somewhere_ (that's not very helpful, but...). LL Andy Try disabling all INIT's and DA's except the control panel, and see if it LL Andy works then.. AFL GaryJ I agree with Andy's comments. DanP18 Tried that. Didn't help. Sheppy That's really all you can do. LL Andy Did you delete the sound config file?? GNO Jawaid Could be a hardware malfunction, or a bug in the CDEV. Sheppy Yeah, he said he's done that. AFL GaryJ Could be a faulty toolset somewhere too...(corrupt software) Sheppy Er, um, did you re-install the SSW? LL Andy And remove all sounds except the ones supplied on the System 6 disks?? DanP18 I doubt it's a hardware malfunction. I thought so, too. Yes. Yes. AFL GaryJ You could try re-installing the System software, with only the Apple supplied sounds. DanP18 I did that. AFL GaryJ Add more and test things as you go. Matt DTS Could be, Andy. Sheppy Sounds twisted. Is your home located underneath high-tension power lines? :) AFL GaryJ Hmmm..... I don't know what else it could be, unless there is something unusual about your hardware AFL GaryJ configuration. AFL GaryJ :) Sheppy Second-hand smoke? :) DanP18 No. I'm right next to a power substation. (the corona is quite DanP18 lovely tonight) Sheppy Well, there you go. Too much power. :) DanP18 I thought maybe having my microwave oven as a computer stand was a DanP18 problem, but I figured that wasn't possible. WinkieJim What is the softswitch to turn off acceleration on the IIc+? GNO Jawaid Augh! AFL GaryJ :) LL Andy Not AGAIN.. Sheppy Oooh, boy. You struck a nerve, Jim! :) AFA Jay HAHA, yah right :) AFL GaryJ We've been trying to get a good answer to that question for a long time :) GNO Jawaid Yes, AGAIN Sheppy Matt sez, "Buy the manual!" WinkieJim Also, where do you read the current setting. WinkieJim ah, so no one know, huh? James S WI Where do you get the book? Matt DTS It's much more complicated than "a" softswitch, Jim. You need the Apple IIc Technical Reference, Matt DTS 2nd Edition, from Resource-Central, which spends many pages on this topic. AFL GaryJ I'll buy the manual if I can find out where to get it :) Sheppy A great deal of prayer and human sacrifice, Jim. AFL GaryJ Ah, Resource-Central has it? Sheppy I'd like to have the manual, but damned if I'm gonna spend $30.00 or so on a Sheppy book just to get that one piece of information! AFA Jay We need to buy an ADV copy :) LL Andy I just got a P8 ref manual, and it doesn't say a thing about the extended quit LL Andy call!! Sheppy Tell y'all what. Let's all chuck in a couple of bucks and buy us a copy of Sheppy that manual so we can get the answer to this one! :) Matt DTS If you want to know, we've told you where to look. How much it's worth is up to you. WinkieJim My publisher isn't paying me enough to buy a $30 manual... GNO Jawaid The original "Technical Reference" didn't. Matt DTS Sheppy: So you're going to type in several pages every time someone asks? LL Andy This is the A.W. manual Jawaid.. AFC SteveB The answer to that appeared in the December 1990 (I think) issue of InCider. Sometime around that AFC SteveB time, anyway, in the Apple Clinic by C.F. Sheppy Er, no, I wasn't planning on it, Matt. I would just stick it in a file some- Sheppy where, and email it to people who want the info. :) AFL GaryJ Ah, that's a new source. Sheppy The answer in inCider was incomplete, though, Steve. Sheppy Actually, Gary, the inCider article comes up every time we talk about this. :) AFC SteveB It was fixed a few issues later... Feb. 1991 I think. AFA Jay We're not punning very well tonight, folks. GNO Jawaid Jay- hear hear! GNO Jawaid What's the easiest way to play a simple sound. FFStartSound? AFL GaryJ FFStartSound is probably the most straight forward, Jawaid. GNO Jawaid Does that let me play the same sound at different speeds/pitches? AFC DYAJim Depends if you're an application or what, Jawaid AFL GaryJ Right. GNO Jawaid Gary - yeah, an Application Sheppy I've got a vague design for a real RAMdisk driver Sheppy around here someplace. :) Matt DTS I think Apple's putting a real RAM5 loaded driver on 6.0.1. GNO Jawaid Ahh... Sheppy A removeable RAM disk, up to, like, 16 volumes. :) AFL GaryJ Neato Sheppy Coolness! GNO Jawaid Would it by chance only allocate memory depending on how much is used? AFL GaryJ Removable RAM disk? :) James S WI I could actualy use a RAM disk driver. This stupid SuperDrive controler James S WI does not support the /RAM5. AFC SteveB Can I have like 32 RAM disks set up? :) AFL GaryJ Why? AFL GaryJ :) Matt DTS The loaded driver requires slot 5 set to SmartPort, Jim. It just does I/O faster than the generated Sheppy Yeah, removeable. It would accept Eject calls, and there would be a request Sheppy procedure to re-insert them. :) Matt DTS driver. And allocating memory only based on what's used is a _bad_ idea in the GS world. GNO Jawaid Well, yeah, considering you'd have to know about the multitude of FST's GNO Jawaid and how they determine free space. But it'd still be neat. :-) Matt DTS No, it's a bad idea anyway. You already have one of those on ROM 1 -- just set min and max sizes AFC SteveB Yeah, think of seeing in a niftylist dump... Sheppy I wouldn't want to try resizing RAM disks. AFC DYAJim Is there ANY way to have a ramdisk with a FDHD card? Sheppy Does it _work_ on the ROM 1? GNO Jawaid But Matt, I thought that didn't work? Matt DTS differently. Try copying large things. See what happens. Sheppy I thought it was disabled a long time ago. LL Andy Put it in slot 6 Jim.. GNO Jawaid Ahh... :-) I get it. Sheppy Yes, Jim. Put it in another slot. Matt DTS Jim: Sure, put it in a different slot. Matt DTS (I think he gets the idea) If you want to keep it in slot 5, there's no way to keep it there under P8 James S WI Sure use up one slot for nothing but a ram disk. As if we have slots to throw James S WI away. JWankerl ...or wait for slot arbitration to allow concurrent use of slots and ports. :-) Matt DTS as well as GS/OS even if you put a ProDOS file system on the RAMdisk. LL Andy Now, you don't actually use 5.25 drives do you Jim?? :) GNO Jawaid What about a loaded mouse driver so one could put a card in slot 4? Sheppy We need a true 14-slot IIGS!! :) Matt DTS Jawaid: You can, on ROM 3. AFC DYAJim Andy - ever heard of a digitizing card? :) Sheppy Best way to make an enemy at Apple: say "Slot Arbiter." :) James S WI My RAMFast is on slot 6. AFC DYAJim I don't have a slot to waste on a RAMdisk. looks like I won't be getting a FDHD card any time soon Sheppy Yes, Matt. But I use a ROM 01. AFC SteveB Hey, so when's AppleWorks GS 2.0 coming out? AFC SteveB }:> Sheppy Bahahaha! Wooo-hahahaha! Hee hee, whooo ha ha ha... funny, Steve. :) Matt DTS "Loaded mouse driver" makes no sense, because the Event Manager doesn't call a "driver" to get the Matt DTS events that contain mouse positions. Sheppy I already have a PCT in slot 6. GNO Jawaid But there's the event device driver thingy the event manager support... Sheppy But it is possible to make an EM driver. I've done it myself - a joystick AFC SteveB Maybe "Smashed Mouse Driver" or "HighAsAKite mouse driver"? Sheppy driver for the Event Manager. Didn't work quite right, though... GNO Jawaid Matt, you mentioned on GEnie (or was it here?) about patching SelectWindow GNO Jawaid to avoid update conflicts (where the update event doesn't get handled until GNO Jawaid after a couple of event loops have gone by, allowing my program to overwrite GNO Jawaid a newly opened window during that time). Matt DTS I don't remember it from that summary, but I'll take your word for it. GNO Jawaid (it was my original question about looking at the region structure) GNO Jawaid Anyway, is SelectWindow called both when a window is moved to the foreground GNO Jawaid and when a new window is opened? Matt DTS Probably, but that's an implementational detail that isn't guaranteed. (I don't know offhand) GNO Jawaid Ahh. Hm, okay. I just need to set a flag to tell my code "hey wait a GNO Jawaid minute" or something similar. That'll do. Thanks. AFC SteveB Say I want to in the middle of a desktop app start reading the mouse hardware directly, would I patch AFC SteveB the mouse interrupt handler (using SetVector) and then restore it, or is there some other way? Matt DTS Apple has never supported reading mouse hardware directly on any Apple II, including the IIgs, and Matt DTS in fact doesn't even promise the hardware locations are the same on ROM 1 and ROM 3. So don't do it. Matt DTS GA. GNO Jawaid I'm just curious why the EM won't work for you. AFL GaryJ What is your reason for wanting to go directly to the hardware? AFC SteveB I'd like to be able to find out how much the mouse has moved since the last check, without worrying AFC SteveB about screen limitations. JWankerl ...it's to support journaling. (Oh, didn't someone tell you it's broken?... ;-) Barnabas I can think of good reasons to go directly to the HW... Apple did such a stupid GNO Jawaid oh no... here it comes... Barnabas implementation of the Mouse stuff in ROM 01 (stuck in the port ROM) that you AFC SteveB (e.g. if I hid the mouse and called GetMouse(), when the mouse hit the left side o' the screen... AFC DYAJim I've done that, Steve.. Barnabas can't use slot 4 for much of anything. AFC SteveB I couldn't tell if the mouse has moved or not. AFC DYAJim can you say incredible bitch and a half?! that code took FOREVER to debug.. yow. GNO Jawaid We were just talking about that Greg. AFC DYAJim I needed the same type of info at the time.. (delta positions, not clamped values) AFC SteveB How'd you handle it, Jim? GNO Jawaid (about like an INIT that would hit the mouse hardware directly so the EM GNO Jawaid could see the mouse and the user could use slot 4) AFC SteveB I wrote up a nice little hack in assembly that returned delta positions by reading the hardware... AFC DYAJim I used the softswitches.. after a LOT of trial and error compiling.. AFC SteveB That's what I'm doing, and it's working... at least when the EM is dead, it is. GNO Jawaid What's wrong with a mouse click? At least in T2? AFC DYAJim huh Jawaid? Matt DTS Nothing stops you and your assembler from doing whatever you please, guys, but you're on your own. LL Andy Steve, kill interrupts when reading it, and the EM can't mess them up.. AFL GaryJ A mouse movement should wake up a sleeping screen. Matt DTS I for one have no faith those softswitches do the same thing on all machines, especially between... Matt DTS ROM 1 and ROM 3. GNO Jawaid Is the Event Manager mouse thingy interrupt driven? AFC SteveB Ok Andy, thanks for the tip. Matt, it's really for an easter egg I want to put into a program... AFC SteveB nothing earth-shattering :) Barnabas Yes. LL Andy Almost certainly.. Sheppy _I_ think Matt is giving you guys hints here. Maybe what he's really saying GNO Jawaid Then patch the mouse interrupt vector and do nothing more than set a flag Sheppy is "it's changed, you fools, you fools!" :) GNO Jawaid and call the old vector. Then your application can check the flag and do the GNO Jawaid right thing. Barnabas Steve: Be advised that Apple no longer wants people to do anything original on LL Andy The bit of code needed to read the switches would be so short that it wouldn't Barnabas the Apple II. LL Andy even mess up AppleTalk.. Matt DTS I said exactly what I meant to say, Sheppy. Don't try to read between the lines all the time. :) GNO Jawaid Greg, Please AFL GaryJ I think it's a matter of playing by the rules, Barnabas. Keeps programs from AFL GaryJ conflicting with one another. Matt DTS Greg: Did you read this in a book by Nostradamus or something? AFL GaryJ Lot's go on to Derek's question. AFL GaryJ (Lets :) GNO Jawaid P8 would have resource support of some sort if people had followed the rules. Barnabas Come, now, Jawaid, you have had many gripes with @ yourself_ GNO Jawaid Sure. But this is neither the time nor place. :) AFL GaryJ Thank you, Jawaid :) Barnabas No, Matt, picked it up from listening to you (and others) shoot down good ideas AFL GaryJ Derek has the floor, please. Sheppy Greg: Shut up, please. ;) DYA Derek I have preferences for my program stored in a resource. I use LoadResource DYA Derek to read them in, then alter them, then used MarkResourceChange to indicate DYA Derek that they need to be rewritten. However, when I call ShutDownTools, the DYA Derek resource isn't written. In fact, the resource fork isn't closed at all. I DYA Derek shouldn't have to do WriteResource in this case right? I must have a simple DYA Derek thing done incorrectly. GA AFL GaryJ GA, Matt Matt DTS You're doing two bad things. You're trying to write to your application's resource fork, and Matt DTS you're assuming StartUpTools opened it with read/write permission. It didn't,less you told it to. JWankerl (Actually, ResourceShutdown closes all open resource files for the curResourceApp, I believe) Sheppy I think it does, yeah. Matt DTS You can make it open it with read/write permissions by setting a new bit, but it's better not to try DYA Derek hmm.. maybe I should keep a seperate prefs file then? GNO Jawaid Use a preferences file, yeah. But don't ask where to put it. :-) Matt DTS to write to your own application because you may not be able to (networks, locked floppies, etc.). Sheppy I think you should. I think it's better for the user to keep a prefs file. Matt DTS Use a preferences file in the "@" prefix (assuming you're an application). JWankerl Put your preference file in @: if you're an app, or call MiscLib's PrefixPath call if you're not. :-) Sheppy That way, the prefs stay around even after a product upgrade. :) DYA Derek it is an application so I could try that. AFC DYAJim MiscLib? Write your own routine! :-) Sheppy Oooh, Joe. Pulling a plug. :) JWankerl Jim: I *DID*! ...and I put it in MiscLib. :-) Sheppy :) AFC DYAJim I put mine in T2 :) AFC DYAJim but I still am trying to find someone to test it.. DYA Derek well, I'm sure that will fix the problem, so I think that's it :) GA AFL GaryJ Thanks, Derek AFC DYAJim (a mouse movement does wake up a sleeping screen.. and so does a click :) but if the cursor is say .. JWankerl (oops, PreferencePath, not PrefixPath - I get sooo confused sometim... er... a lot of the time :-) FredW GS I have a question about the composite sync (NTSC and on the RGB connector)... AFC DYAJim .. in the bottom right corner and you move the mouse more to the bottom and/or right, the screen .. AFC DYAJim .. will stay sleeping as the clamp has been hit. end) FredW GS Does the VGC which creates this give correctly equalized and V-serrated pulse FredW GS during vertical blanking...with my scope it is hard FredW GS to see...GA. LL Andy Are you kidding Fred.. I doubt it as the video out on both connectors isn't FredW GS pulse=pulses. LL Andy true broadcast quality NTSC.. GNO Jawaid But Jim- the mouse interrupt should still hit.. or is that an ADB function? FredW GS That is correct, but there are many liberties you can take with NTSc and still FredW GS have it work on most TV's... I was wondering if the GS took this liberty or not AFC DYAJim (It's screened out by the system, Jawaid :-( I never can see it following the rules) LL Andy I think so.. Both connectors have the NTSC signal basically connected FredW GS I am using the MC1377 (NTSC encoder) in other stuff and it does not work with LL Andy together (isolated by 75 ohm resistors), and there's an extra filter on the LL Andy RCA connector.. FredW GS some TV's that the GS will...The only thing I DON'T know about the GS's signal FredW GS is what the sync waveform is because the Hardware Reference just shows FredW GS it coming out of the VGC...I don't know what the VGC puts out.