Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!wrdis01!gatech!udel!rochester!pt.cs.cmu.edu!henry.ece.cmu.edu!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: WDEF editor ? Message-ID: <12831@pt.cs.cmu.edu> Date: 29 Apr 91 01:41:09 GMT References: <1991Apr28.060530.22536@newshost.anu.edu.au> <1991Apr28.232759.13768@uokmax.ecn.uoknor.edu> Organization: Gaia II Lines: 35 [jww502@anu.oz.au ("John W White") writes:] [] Since there are so many (well OK, a few) alternative WDEF [] inits around, I was wondering if there was an editor or something so [] that I (and possibly others :-)) can create my own. If there isn't [] then how do you work out the resource ? Hmmmmmmmmm ? :-) [rang@cs.wisc.edu (Anton Rang) writes:] [] A WDEF resource is just a chunk of 68000 code. See Inside Mac for [] details. There are probably disassemblers around for it; the source [] for the standard WDEF is available on apple.com. To create one, you [] can just use your favorite compiler--MPW, THINK Pascal, and THINK C [] all make this easy. (OK, "easy" is relative. Fairly easy?) [jtsweet@uokmax.ecn.uoknor.edu (Jonathan Thoma Sweet) writes:] [] Yes but there must be some sort of a program that would be able to [] generate the code. I've looked in the Res. of a QuickChange document WDEF's, CDEF's, LDEF's, etc. are _code_ resources, which are distinctly different than data resources where you can simply plug and chug with the numbers. the program you need to generate code resources is a compiler (unless you're an excellent hacker, then a hex editor is all you need ... :) consider the similar situation of writing applications (basically code resources). you don't normally expect to do this with a utility of some sort (and if you can do this with a utility then your range of possibilities would, most likely, be severely limited). writing an xDEF is fairly simple (there's example code at apple.com in pub/dts/mac/defprocs), however, except for a few simple cases, writing one _correctly_ is non-trivial. give it a try. when/if you master it, you'll understand your mac so much better ... -dave- hairston@henry.ece.cmu.edu