America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, October 6, 1992 10:00 p.m. Eastern Time Topic: Graphics & Animation Programming Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! AFL GaryJ Tonight, our scheduled topic, is Graphics and Animation programming! AFL GaryJ ADV is where you'll find STATE of the art techniques for doing lots of fun AFL GaryJ graphical things with your computer! :) GNO Jawaid Sheppy ** chuckle ** AFL GaryJ (Well, I'm trying :) AFL Marty Pretty good intro :) Sheppy "Welcome to California. Now go home!" <--- seen on bumper sticker. :) AFC SteveB (Jay, did you wear your FNM shirt today? :) AFA Jay Steve, I didn't...too cold! AFL GaryJ Cold? Did someone say cold? AFL GaryJ (I wish) AFL GaryJ Jay: It was 95 here today. AFA Jay It was 31 when I got up this morning. AFL GaryJ brrr.... Sheppy Huh. Cold? Not here. Well, it did fall into the low 70s today. GASP!! :) GNO Jawaid It finally got cool here, too. AFL Marty It was really cold here this morning. GNO Jawaid Does anyone know how the animation in Rastan works? How it's so smooth? AFL GaryJ Anyone here ever disassemble Rastan GS? AFL GaryJ Rastan is amazing, that's for sure. AFL GaryJ I'm not sure what technique they use (in Rastan) Sheppy I dunno either. They're pretty good, though. GNO Jawaid Whatever happened to Chris McKinsey anyway? GNO Jawaid I mean, Chris used to be all over AOL. Spottysoft ..indeed. :) Jim Murphy Chris has been really busy with classes and other real-life things. Sheppy Classes aren't real life. This is. Classes just _feel_ more real. :) GNO Jawaid Nice choice of "computationally correct" words there, Jim. :-) GNO Jawaid Wouldn't want to offend anyone here by calling us all 'geeks', eh? GNO Jawaid :-) AFA Jay just don't call us normal ;) Spottysoft Especially if we're from California :) GNO Jawaid Chris has some source or other for Rastan.. I guess I'll have to call him. Sheppy So, did anything wond'rus happen at the show? GNO Jawaid TurboRez? Sheppy Uh, did anyone here even go? :) Spottysoft DangardAce swears up and down there was a *working* prototype TRez board there. Nuzz I was there, and had a good time too AFC SteveB There was. GNO Jawaid So tell us about it! AFC SteveB It was real nice...does some funky connecting with the AFC SteveB motherboard, tho...graphics were amazing. AFC SteveB And I'll let Jay or Mike take it from there as I gotta go :) GNO Jawaid Same resolutions we have now, though, I believe, right? Sheppy Any stats on the board? Like resolution and/or color count? Nuzz I can't help on specs of TRez, I didn't get that close AFA Jay Well, I think the guy said there are 7 or so thingies you patch onto your AFA Jay mother board...clip into chips and such things... GNO Jawaid Ewewewew... Spottysoft ack! AFL Marty There are some posts in AGR on the TurboRez, I believe. AFA Jay Yah, they needed it for timing and "other things" GNO Jawaid ah hah! AFA Jay They did write a tool to help with programming it... Sheppy Figured there would be. GNO Jawaid Question is does it work with QuickDraw? AFA Jay Right now they've got a slide show and GIF converter. Nuzz I think it did work with Quickdraw (sorta) and had a few additional calls AFA Jay Yah, it won't help anything that's already written... AFA Jay have to have the special calls in it. Nuzz I did see the portable GS though :) GNO Jawaid How big was the portable? AFA Jay Tony's portable GS was neat. Sheppy Portable GS? Ooooh... tell me about it. Nuzz The portable was in an old osborne or some such case Nuzz it was pretty small, Tont had to cut off the ends of the motherboard to get it to fit Nuzz it had a mono monitor hard drive, and 3.5 all in the case AFA Jay They keyboard was a GS keyboard without numeric keypad... AFA Jay and it folded up against the front to cover the screen and such GNO Jawaid I believe a good portion of the GS motherboard at the front edge is only GNO Jawaid for diagnostic testing. GNO Jawaid A IIgs laptop would be awesome, esp. considering the very low power consumption AFC DYAJim Couldn't you engineer all the chips on the GS down to only a few? GNO Jawaid (esp. compared to a 68000- over 1/2 amp from those babies!) Sheppy Probably, yeah. GNO Jawaid Yes, esp. if you dropped the slots. Sheppy Heck, just slap a handle on the box you got now, bolt your monitor to it, and Sheppy you have a luggable IIGS... :) AFA Jay Tony said the portable only cost about $200 extra of stuff after a GS with AFA Jay Zip and hard drive. Nuzz biggest laugh at the show was when some Mac company running Leggo Logo told me that his Nuzz software was "too sophisticated" to run on a II AFC DYAJim no, the biggest laugh was when this woman kept telling me that I should upgrade AFC DYAJim T2 to support system 7, as I'd get lots more sales that way AFC DYAJim that's up there with the person who thought the system saver was a piece of AFC DYAJim software GNO Jawaid Shep - GNO 1.1 lets you suspend and bg a desktop application. GNO Jawaid bwahaha AFA Jay so does this mean multiple desktop programs? :) GNO Jawaid Um, no. GNO Jawaid That's what SwitchIt is for. :) GNO Jawaid And amazingly enough, they seem to be working together finally. To be blunt, GNO Jawaid I'm amazed. GNO Jawaid I know my code, and that they work together is surprising. AFL GaryJ Jim, we were talking about Rastan GS earlier. Have you ever dug into it to AFL GaryJ figure out what kind of graphics engine it uses to scroll the screen? AFC DYAJim not really (I never got around to it), but I'd imagine it uses a huge unrolled AFC DYAJim bank00/01 stack/dp based mother GNO Jawaid In particular, I'm wondering how to do smooth (no flicker) sprite animation GNO Jawaid on top of a moving background. AFC DYAJim you keep the background in bank 00, scroll it etc AFC DYAJim then combine it with your sprite and write to 01.. AFC DYAJim now depending on how fast your code is, I'd think that you could either AFC DYAJim a) wait for every vbl or every other or a multiple and then do your animation AFC DYAJim . depending on speed, etc, this might work, or it might tear and flicker. GNO Jawaid Hmm. Think "Super Mario Bros", and you know what I'm aiming for. AFC DYAJim b) draw to 01 w/ shadow off. copy 01 onto itself with shadowing on once AFC DYAJim your next frame is created. AFC DYAJim b) is slower, but it always works Nuzz what ever happened to that guy at Kansas who was working on the super mario type game GNO Jawaid Nuzz- he's the reason I'm doing this research :) Nuzz Oh. it looked real good in KC AFC DYAJim For SMB, I think you'd be wise to tile it GNO Jawaid I'd thought of that, but what if "Mario" goes in front of a cloud? Looks GNO Jawaid really bad to have black there instead. GNO Jawaid Perhaps just using the shadow off/ then shadow on/copy trick would work, GNO Jawaid along with masks. AFC DYAJim you want him to go behind clouds is that it? GNO Jawaid _in front of_. GNO Jawaid And other scenery. AFC DYAJim oh.. I guess you could use a tiling variation still tho AFC DYAJim with masks... GNO Jawaid Straight tiling won't work; the tiles are 24x24 pixels, and that's a lot GNO Jawaid of jumpiness. AFC DYAJim yeah.. rastan would be a good example, eh? :) AFC DYAJim scroll the background in bank 00.. someone should diss rastan or task force GNO Jawaid the copy onto itself trick might be just what we're looking for. AFC DYAJim if you don't use tiling then scroll your background in bank 00.. rastan probabl AFC DYAJim y uses tiles (of who knows what size) to build pixel maps and then uses the AFC DYAJim pixel maps as backgrounds. kinda like alien mind I believe AFC DYAJim bank 0 I take it? GNO Jawaid Greg's (Greg Hedger) has got DP scrolling in.. GNO Jawaid I think he maps to bank 1, but I'm not sure. I left him mail and was GNO Jawaid hoping he'd drop in on the conf. AFL GaryJ I don't think Rastan would use tiles, would it? AFL GaryJ (Looks like a giant bit-mapped background image) AFC DYAJim To me it seems rastan most certainly uses tiles to build its backgrounds, but AFC DYAJim that's just my opinion :) AFC DYAJim to store such huge images on disk would take mega space, even with compression AFC DYAJim and it would take even longer to load GNO Jawaid Rastan has an LZSS compressor in it. Where do you think Chris McKinsey for GNO Jawaid got his? AFC DYAJim Chris got his from bill heineman. AFC DYAJim I was not aware that john brooks also used bill's. GNO Jawaid Did he? hmm.. AFC DYAJim I didn't know bill had written his that early.. but my sense of time may just AFC DYAJim be all messed up :) AFC DYAJim darn, I keep forgetting to ask bill how lzss uses btrees to search the ring AFC DYAJim buffer.. eventually I guess I'll remember.. GNO Jawaid I think Chris got one from John, too. LZSS is pretty common these days. AFL GaryJ Hmmm.... one of my DA's must be causing problems with Rastan. AFC DYAJim Gary are you trying to launch it from the desktop?? AFL GaryJ Yes. It works fine under 6.0 if I boot with no DA's or Inits. But if I boot AFL GaryJ normally, the keyboard quits working (no esc key, etc.) AFC DYAJim You need bill's chess.system program. AFC DYAJim I use it to launch ALL my P8 games from the desktop. AFC DYAJim It works like a charm. AFL GaryJ What does that do, Jim? AFC DYAJim It resets virtually everything (except for appletalk) so the P8 programs can't AFC DYAJim trample all over interrupt routines and everything. AFC DYAJim short and sweet program AFC DYAJim (and it uses an undocumented F8ROM call too :) AFL GaryJ :) AFC DYAJim I live for stuff like that :) AFL GaryJ Oh! That reminds me about $C078. Did you find out any more Jay? AFA Jay Well, about C078, I went to school and played with this card... AFA Jay it's not altering C078...so I'm just gonna chalk it up as some strange AFA Jay quirk... AFA Jay This whole source is really quirky...he start using A in the beginning of AFA Jay his program, expecting it to be 0..but never actually setting it to 0. AFC DYAJim you should post in ahw jay Sheppy Yeah, there's a good idea. Somebody over there must know. AFA Jay I'm not really worried about it...it works fine without it... AFA Jay so I'm not gonna touch it or I might break it GNO Jawaid Greg! He came! GregH35662 sORRY I'm Late :) GregH35662 Hi! GNO Jawaid We were just discussing your project, in a roundabout way. AFL GaryJ I was sitting here running Rastan, and looking to see if they might have AFL GaryJ been able to use tiles. Some parts it could obviously be tiles, but other parts, AFL GaryJ like the background mountains and clouds, I'm not sure (good graphics in this AFL GaryJ game! :) GNO Jawaid Anyway, Greg, you said you now do DP scrolling, right? GregH35662 Yup. GNO Jawaid Where does the background sit? GregH35662 At one speed. GNO Jawaid Bank 0, bank 1, somewhere else? GregH35662 What do you mean? GNO Jawaid Several games use a technique where the background is scrolled in bank 0, GNO Jawaid then copied to bank 1. AFC DYAJim is the background in bank 00? GregH35662 Background is just tiles. GNO Jawaid Okay, here's a trick Jim just told me about. GNO Jawaid 1) turn off SHR shadowing GNO Jawaid 2) set up the frame in bank 01 shr memory GNO Jawaid 3) wait for vbl GNO Jawaid 4) turn on shadowing GNO Jawaid 5) copy bank 01 SHR to itself. GNO Jawaid (The above eliminates any chance of flicker) AFC DYAJim (btw Jawaid, the background in 00 really doesn't need to be "copied to 01" AFC DYAJim in the strict sense of the term copy) AFL GaryJ How so, Jim? AFC DYAJim 5) you can be creative with.. use PEI, lda/sta $dp, or whatever you like AFC DYAJim if you flip the right softswitches Gary then you can make 00 show up in 01 AFC DYAJim so when 01 is updated, 00 (bkg) is also done automatically, if I recall right GNO Jawaid So, do you think the shadow trick fix will fix the flicker problems/ Russell12 Cool... I program the Apple IIc... am getting a IIgs in a few days AFL GaryJ (You'll love it) AFL GaryJ Apple IIc is a nice machine too. I've always liked the IIc. Russell12 Do you think it will be hard for me to learn 16-bit assembly? GregH35662 What are you working on on the IIc Russell? Sheppy Do you already know 8-bit assembly? If so, no, 16 bit is easy. Russell12 I program 8-bit assembly arcade games on the IIc Sheppy Oh, no sweat. Just some new modes, mostly. AFL GaryJ The 65816 assembly isn't too difficult to learn, but getting to know the AFL GaryJ IIGS toolbox, and all the ins and outs of GS/OS programming takes a while :) GregH35662 Cool, do you do any DHR stuff? Russell12 I've done a demo program in DHR for myself. But the drawing routions are slow AFL GaryJ That fun stuff, Russell! (My favorite kind of programming) Russell12 I've been reading the GS toolbox routines vol 1 and 2 Sheppy You'll need volume 3. The best stuff is in there. AFA Jay And of course GS/OS :) Sheppy (well, the _best_ stuff is in the 6.0 ref... :) Russell12 I bought the GS mainly for the ability to program music and digi-sounds Russell12 Are the super-hires graphics mode hard to program? AFL GaryJ A good book to get you started in Apple IIGS assembly (and an introduction to AFL GaryJ toolbox programming) is "Programming the Apple IIGS in Assembly Language" AFL GaryJ By Ron Lichtey and David Eyes. GregH35662 Its much easier than the IIc graphics modes are :) Sheppy It's... linear! :) Russell12 Linear!!! Great... I'm sick and tired of using screen tables!! GregH35662 :) AFL GaryJ I just wish there were more than one screen in SHR. AFL GaryJ (Like there is in DHR/HGR) Sheppy Same here. :) Russell12 I do plan on buying "Programming the Apple IIGS in assembly" GNO Jawaid You still use them, to avoid doing (row # * 160) :-) Sheppy Yeah, screen flipping would be nice. Russell12 There's only one!!! AFA Jay Get a TurboRez, Gary :) GregH35662 Get a TurboRez. It's supposed to support 3 pages. AFA Jay 3 pages, separate pallette for each Russell12 How do you smooth animation without the page-flipping technique? Sheppy Well, you do have shadowing. That's like a page and a half. :) GNO Jawaid We were just discussing how to do that :) AFL GaryJ It takes up processor time to do shadowing, though. AFL GaryJ (while page flipping does not) Russell12 oh.. Sheppy They figured that one out. Took 'em a while, but they got it. GregH35662 Compiled shapes help for smoothness too. Russell12 Has anyone programmed music for the background while running their program? GregH35662 Working on it :) Sheppy Well, interrupt-driven music routines... GNO Jawaid The MidiSynth tool works on an interrupt-driven basis, and only takes about GNO Jawaid 10-15% of your CPU. GregH35662 I thought it was 30%. GNO Jawaid Not if you use Bill Heineman's version :) Sheppy The official figure is about 15%, as I remember. GregH35662 What about Tool 219 and Tool 220? Sheppy Ah. Right. :) Sheppy BH's version, eh? Hmmmm... I dunno. Sounds hush-hush. :) GNO Jawaid At any rate, Russell, ADV, AGR, and AOL in general is the place to be to GNO Jawaid learn how to fully utilize the IIgs' features. AFC DYAJim You can do background music with your own Soundsmith drivers too AFL GaryJ Well said, Jawaid. Sheppy Definitely. You get to hang around with cool people like Jawaid. :) GNO Jawaid Bah. Sheppy :) AFL GaryJ LOL :) Russell12 Anyone know of any good GS games to get me started? Sheppy Xenocide is pretty cool. AFL GaryJ Rastan has good graphics. AFL GaryJ (And music) GregH35662 Space Ace has good animation. AFC DYAJim Rastan and Task Force are good for hack-n-slash-n-shoot 'em up horizontal AFC DYAJim scrollers. GNO Jawaid I've always wanted a good IIgs version of PacMan. That'd be a good place GNO Jawaid to start, project-wise. Russell12 I can't really find any GS games in the stores any more. Russell12 Can anyone help me out in locating some games? GNO Jawaid Nobody can. Grab an issue of A+/inCider and dig through the mail-order GNO Jawaid listings. GregH35662 Subscribe to either Resource Central, Incider, or GS-Plus. GNO Jawaid (They should be paying me, as much as I plug them like this :-) AFL GaryJ Let's see, what's some other games.... Dark Castle GS, The Imortal, AFC DYAJim Big Red Computer Club has a huge assortment of great classic GS games! AFC DYAJim Check them out. AFC DYAJim And get out of this world too! GNO Jawaid Um, "Out of This World" the latest game by genius Bill Heineman. GNO Jawaid And don't forget Pick'n'Pile. Russell12 I guess to build my GS library, I'm gonna have to spend $$$$ Sheppy Dragon Wars is good. AFL GaryJ Is "Out of this world" available yet? GNO Jawaid Yep, from BRCC, $49.95 GNO Jawaid I think it's a bit pricey. GregH35662 Wait a while. Sheppy Jawaid's plugging again! :) AFL GaryJ My all time favorite game is still "Wings of Fury" (non-IIGS specific, of course :) GNO Jawaid Oops. :) GNO Jawaid And while we're at it, you'll need a good solid development environment. AFL GaryJ Right, Jawaid... GNO Jawaid Get ORCA/M 2.0 assembler, and the GNO Multitasking Enivronment for GNO Jawaid your shell/utilities. AFL GaryJ (plug plug :) Russell12 Does anyone use MERLIN 8/16? GregH35662 Nope. AFL GaryJ I used to, Russell. Sheppy I do sometimes. Don't much go for it, though. DYA Derek I do - it's great :) Actually I use Merlin 16+ Russell12 Is there a better assembler? GNO Jawaid Merlin 16 is popular, esp. among the game programmer types. It's extremely GNO Jawaid fast, but a good shell system will get you a lot of power. AFL GaryJ I think you'll get better support and state-of-the-art features with ORCA/M, however. Sheppy It's fast, but not even as friendly as Orca, which is pretty scary. Russell12 I have learned MERLIN 8.. Gonna use 16+ real soon :) GNO Jawaid That's an important point. The IIgs is capable of a LOT... if you get the GNO Jawaid right tools. IMHO, Merlin 16+ isn't one of those. AFL GaryJ If you want to do resources and that sort of thing, it's much easier to use OCRA. AFL GaryJ (Easier to do segmented programming, as well) GregH35662 Speaking of resources, what's the scoop on Scriptedit for Foundation. AFA Jay Greg, ScriptEdit will be VERY awesome :) AFC DYAJim ScriptEdit kicks. Sheppy I _need_ scriptedit! :) GregH35662 I own Foundation. Why hasn't Scriptedit arrived? AFC DYAJim the editor, the wannabe "shell", the whole thing! :) GNO Jawaid Jim Murphy isn't quite done, last I'd heard. GNO Jawaid We might be doing an assembler pretty soon. Sheppy Jawaid -- do it, really. We could use a new one. :) AFA Jay and how is lcc? :) GNO Jawaid Maybe. I don't want to require people to use ORCA/M for lcc. :) GNO Jawaid I'm gonna pick up a 486-50 before I continue work on lcc. Russell12 lcc? GNO Jawaid "low-cost" C compiler. Probably free, but we'll see. Russell12 oh... GNO Jawaid If someone else says they'll do the support, I'll let it out for free. Sheppy Say, what kind of C is lcc, anyway? AFC DYAJim Rotfl! GNO Jawaid 100% ANSI/POSIX compliant C. Sheppy Ooooh, cool! I'd dump Orca/C in a second if lcc works! :) AFA Jay if it increments longs normally, I'll take it :) GNO Jawaid longword incrementing works just fine, Jay. I checked that first :) GNO Jawaid It's close to being a beta-able thing, I just need floating point support AFA Jay Yay! :) Sheppy Longword incs don't work? Hmmm... I'll have to look over my source files GNO Jawaid and some new code in the front end. Sheppy for the code I'm porting. Sigh... :( AFA Jay if you optimize -1 longword incs go 0000FFFF to 00000000 Sheppy Ow!! AFA Jay both the ++ and x=x+1 Sheppy Really? Ah, man. How do you get around it? AFA Jay if you optimize with either odd or even numbers, it'll be ok...forget which AFA Jay though :) AFA Jay I just did an asm {} segment...:) GNO Jawaid BTW, GNO 1.1 (or shortly after) will have TCP/IP over LocalTalk and GNO Jawaid serial line. Sheppy !!! Wow !!! AFA Jay TCP/IP for the GS? :) Russell12 I have to get going too... do you guys meet here often? AFA Jay Tuesdays at 10pm Eastern, Russell GNO Jawaid Derek Taubert is doing the work, and just showed me a transcript of him GNO Jawaid bouncing 'ping' packets off his IIgs. Sheppy Yeah, maybe a long IncLong(long) function? :) GNO Jawaid Shep- nah, do a macro Sheppy Ah. Macro. Even better. :) GNO Jawaid #define IncLong(val) asm { inc val bne foo inc val+2 foo: } Sheppy Thanks, Jawaid. I'm logging that. :) Sheppy Do decrements work? AFA Jay I don't remember if they do or don't... AFA Jay easy enough to figure out though :) GNO Jawaid Dunno. Probably the same bug. Sheppy Arrrggghhhh! GNO Jawaid Possibly they do.. ORCA/C is real oogy inside. AFA Jay That's what I was thinking, it would make sense that decs wouldn't work.. AFA Jay so they probably do. AFC DYAJim can you really do a define like that Jawaid? AFC DYAJim cool!! GNO Jawaid Yeppers. Sheppy The code I'm porting has a huge macro which extracts a byte from a pseudo- Sheppy stack kept in a malloc'd block. :) GNO Jawaid As long as IncLong is treated as a procedure, yeah. You can't inline that GNO Jawaid like you can the existing ++ operator. GNO Jawaid You cann't do a = IncLong(x) for instance. Sheppy Just IncLong(x);. GNO Jawaid Oh yeah, ORCA/C 1.3 has a lot of trouble with macro nesting. GNO Jawaid But if you run into that Shep, then grap Dave Kopper's port of cpp from GNO Jawaid pindarus. It works great. Sheppy Macro nesting? Uh, don't think it should be a prob. Sheppy What's cpp? GNO Jawaid C PreProcessor. Sheppy Where's pindarus? Full address please. GNO Jawaid It's the ANSI preprocessor we're going to use for lcc. GNO Jawaid pindarus.cs.uiuc.edu. I don't know the network numbers off hand. Sheppy Ah, right. Cool. Um, has anybody ported a C++ preprocessor? Sheppy Don't need the numbers. Thanx. GNO Jawaid Shep- as soon as lcc is done, we'll see about g++. Sheppy Heh. That's the one I was thinking of. GNO Jawaid The 1.4.X version of g++ outputs C code. Should work just dandy. Compile GNO Jawaid times will be most heinous, but what the hey. Sheppy Well, they already are. GNO Jawaid Here's a Mike Westerfield quote from GEnie: GNO Jawaid "I could speed up ORCA/C's compile speed by 2 to 3 times, but I don't see how GNO Jawaid I could justify the couple months effort it would take". Sheppy Pfft. Isn't Orca/C written in Orca/Pascal? GregH35662 He said that? GNO Jawaid Yes, he did. GNO Jawaid And all the Byteworks languages use linked lists for symbol tables... GNO Jawaid LET'S SCAN THE ENTIRE LIST EVERYTIME WE WANT TO LOOKUP A VARIABLE NAME. Not! GNO Jawaid Just throwing in a nice hash table symbol lookup would increase the speed GNO Jawaid a LOT. Sheppy Heh. No wonder it's so slow. Ack! Sheppy Just writing it in assembly would help a lot. GNO Jawaid For comparison, APW C is itself not 816 assembly. The compiler's object code GNO Jawaid is pcode, and APW C has a pcode interpreter. APW C is only a little slower GNO Jawaid and ORCA C. Anyone see the light here? GNO Jawaid (APW C was written in some pseudo-C dialect that APW C can't compile). GNO Jawaid Now, ORCA/C is good in that it's what we've got. AFA Jay I think if Mike get's a little competition, he'll reconsider the few months AFA Jay to improve it :) Sheppy Yeah. Especially _free_ or _low-cost_ competition. :) GNO Jawaid :) GNO Jawaid Beagle Bros has stated that if there was a IIgs c++ they'd try to port GNO Jawaid BeagleWorks. Sheppy Really? Wow. I'd like to see that. Anything would be better than AWGS! GregH35662 Whoa! Sheppy Go, Jawaid, go! If not for you, for the Brothers Beagle.