Plug development on an Intel Mac

Amidst the changes that the new Intel-based Macs will introduce, one did not generate as much attention as I thought it could, and yet is important for many people including us.

Classic won't be anymore.

Indeed, Rosetta will emulate only on a user level process-by-process basis (for instance, there won't be any such thing as a mixed-mode manager, that was used to ensure that PowerPC apps could call system code that was still in 68k , as the Mac system software was originally written in 68k assembly, kicking in and out of the 68040LC emulator in the same context as needed), not a full-fledged operating system with its virtual platform layer and hooks down to the lowest levels of OSX, Darwin, and Mach.

Even if not all of our stuff will get Intel-native, at least most of it (EVONE, Mission Computer, the tools surrounding NovaTools such as EnRle/DeRle, ConText/ResStore, and of course peripheral stuff such as Photoshop, the 3D apps, and sound apps) is currently OSX native and will be emulated, hopefully without any problem (have you ever got ~any~ with the 68k emulator when playing old stuff, and games including Maelstrom and Apeiron?). But one heck of a big thing isn't OSX-native. I'm speaking of course of ResEdit, and NovaTools proper with it. I checked the app, and in fact it is not even PowerPC native, it's actually running with the 68k emulator. To tell you. We cannot expect it to be updated, of course, Apple has not done so for PowerPC nor OSX, and furthermore they want developers (the primary target of ResEdit) to quit using resources altogether, favoring other resource mechanisms such as plists, string files, nibs for the UI, direct sound and image files (aiff, png, for instance), and at worst resources-in-the-data-fork files that ResEdit can't handle, everything put inside the application bundle (yes, most of what you beleive are OSX apps are in fact folders for the file system, just find one and control-click it, you should get a contextual menu item saying "show bundle contents"). I have to admit that my software, especially ViewRLE, does not contain the slightest resource, Apple seems to have been sucessful with this.

Even if MC and EVONE are nice and have a number of features, we can't rely entirely on them, because they are not general-purpose resource editors as ResEdit is (was). For instance, ResEdit is still essential to set file type and creator if one wants to create data files for a TC. ResEdit handles many a thing such as cicn, ppat, DITL, such stuff that we use infrequently but that people may end up having to edit, and realise, too late, that they can't. Not to mention ResEdit better handles resource copying, handling, etc... (for instance, EVONE sucks at opening a file with arbitrary resources, such as the Nova app itself, when it can be useful to grab some, such as DITLs, that can be overrided: concievably, not only resources in the data files but also resources in the Nova app itself can be overrided by resources in plug-ins). Therefore, we need to replace ResEdit by another general-purpose resource editor.

Some Mac programmers don't give up easily and some keep using resources, so some OSX-native resource editors have been developped since there is still a market (not to mention they eat their own haggis). I've been maintaining a watch for such editors (consisting mainly of looking for "resource" in VersionTracker). Some are largely or completely irrelevant for us, such as Resorcerer. Just check the price tag. It's not for us. Mac Resource Dog could have been interesting, but it was dropped long ago. ResFool is good, one problem is that it isn't free (not that we really mind, being supporters of shareware, but wait until you see the next one). But Rezilla is what we actually need.

On top of being a general-purpose resource editor (can play sounds, view PICTs, etc...), it supports a number of templates and especially a number of advanced template tags: WORV can easily be used for flags in a very intuitive way, and the potential power of keyed sections should allow us to select how to edit the ModVal field depending on the ModType field, for oütfs, for instance (should make editing cloaks simpler). This should get us up and running while we wait for the implementation of the big thing: a plug-in architecture, that could conceivably allow a programmer such as me to make full-fledged editors like NovaTools for ResEdit. In fact, some of the NovaTools code could be reused for this (not to mention ViewRLE code). And on top of that, it's open source, which means that even if the author drops it or doesn't work on it much, we can still use it, improve it, and correct bugs (there are some, currently...)

So, first I'll try to make Rezilla-optimised templates (note that the ResEdit ones work fine in Rezilla, but some Rezilla-specific stuff will make life easier), watch this space for them; then as soon as I finish adding some critical features to ViewRLE (such as the secret one and rlë superposition), get it tested to death by Nova board members (heck, you don't need to be a plug dever to use this...), and release it in the add-on files, I'll work on Rezilla and with its author, who happens to be French (should make things easier...) First I'll try to get some stuff integrated, such as the ability to create Nova plug-in files and a color picker for HTML and 16-bit color fields (note: since EVC and EVO only play in classic, there is no need to bother adding support for them here, they can keep being edited with ResEdit). Then I will try to help implementing the plug-in architecture, and once it's implemented I'll work on such plug-ins. If I can, I will try to obtain the NovaTools source from Dr Ralph to start from.

With any luck, while I doubt the whole plan will be ready for the first Intel Macs, we will be prepared and have at least Rezilla with templates and basic features. Of course, it's not essential for us to be ready from day one, since we can usually keep an old computer for plug stuff (I heard some people are still in OS9 for that very purpose). But nevertheless, we must be prepared. Even if only to answer to this: "Hi, I'm a Nova fan and would like to know how to make plug-ins. I'm running Tiger on an Intel Mac, is that a problem?".

Soo, does that sound like a good plan to you people? I'm willing to hear your opinions on the matter, and potential alternatives, if there are some.

Are you sure you'd be able to mold enough templates to make Rezilla a useful plug editor? It sounds like alot of work for one person. Still, I want to see this happen. If we can't see this through we might not be able to make plugs if we buy a Macintel computer.

Anaxagoras, on Jul 17 2005, 09:51 AM, said:

Are you sure you'd be able to mold enough templates to make Rezilla a useful plug editor? It sounds like alot of work for one person.View Post

It sounds like the basic TMPL-type templates wouldn't take much work- just the full-scale NovaTools-type editors. And given that OSX-native editors like MissionComputer will probably have full sets of graphical editors by the time ResEdit goes "foop" (the pural is assuming that anything besides MC comes out with graphical editors), it won't be quite as urgent to have them done for Rezilla.

Anyway, here's my first impression of the editor:
It loaded my 3MB combined data file (everything but the dëscs and graphics) in a fraction of a second, although it refused to load it until I made an unlocked copy (not very good). If the Rezilla'd TMPLs look like the Rezilla DITL editor, they will be about as good as EVONE/MC's non-graphical editors, just without the handy help on the side. I haven't played around with the fully graphical editors much, but they look to be at least as good as ResEdit's editors, if not better. It's just a matter of making them...
Basically, it looks like it could easily be a good replacement for ResEdit as it is, and if someone (or several people) made the editors for it, it could replace NovaTools.

(EDIT)And here's my second impression of the thing:
TMPLs with Rezilla tags added are fun. I tried changing the dësc flags to type WORV, and it worked well. Unfortunately, I seem to have done something wrong, and the flags seem to all be reverting to "set" when I close the editor window.

And one of the bugs seems to be a tendancy to (at least temporarily) corrupt TMPLs. "unknown TMPL flag: 'dop'."? It worked fine a second ago, and I know I didn't put "dop" in there anywhere. And you can't even open a corrupted TMPL in the TMPL editor to fix it (which, although it makes sense, is quite annoying)... :mad:

(EDIT)Third point: Watch your forks- it comes set to edit the data fork by default, and I was apparently editing the TMPLs and creating dëscs in the data fork, not the resource fork.

Edwards

This post has been edited by Edwards : 17 July 2005 - 12:10 PM

How good will PC emulation be on an Intel Mac? I've seen some reports that indicate that PC emulation will be able to take a great leap forward, but not being especially tech-savvy, I have to state this as a question here for anyone who's been following it.

My reason for bringing it up is that if emulation becomes much easier, the prices for it should also decrease. This may make using EVNEW, the PC editor, a viable option as well. I doubt it will be free, but if emulation is good we may be seeing macs that ship with Windows. (I fail to see how this won't be a possibility).

I know it's a lot of speculation, but perhaps it is another option?

I don't know how good an iMac that runs Windoze would be. It's just a machine running Windoze. An iMac running Mac OS is a special thing— it is a paramount of style and stability in a commercial product. Windoze is just the opposite. It's bloated, full of unnecessary features, waterlogged code, and a user interface that assumes you're an idiot.

Oh, yes, back to the subject. Rezilla seems to work quite well. The only bad thing is that ResEdit displays a list of resource types you could make. In Rezilla, you have to type the resource name in. This could be confusing for people who don't know the key combinations to write out misn ansd syst, etc.

This post has been edited by Anaxagoras : 17 July 2005 - 02:05 PM

Edwards, on Jul 17 2005, 05:20 PM, said:

It sounds like the basic TMPL-type templates wouldn't take much work- just the full-scale NovaTools-type editors. And given that OSX-native editors like MissionComputer will probably have full sets of graphical editors by the time ResEdit goes "foop" (the pural is assuming that anything besides MC comes out with graphical editors), it won't be quite as urgent to have them done for Rezilla.
View Post

Y'know, I don't think Dr Ralph had really a team working on NovaTools either. Of course, there was Rodger too, but I don't think he did much coding. Moreover, with any luck I'll be able to start from Dr Ralph's code (not to mention his DITLs for the editors and such). I've heard he programs in Pascal though, but I also have some Pascal experience. So, it is probably within my reach.

Edwards, on Jul 17 2005, 05:20 PM, said:

Anyway, here's my first impression of the editor:
It loaded my 3MB combined data file (everything but the dëscs and graphics) in a fraction of a second, although it refused to load it until I made an unlocked copy (not very good). If the Rezilla'd TMPLs look like the Rezilla DITL editor, they will be about as good as EVONE/MC's non-graphical editors, just without the handy help on the side. I haven't played around with the fully graphical editors much, but they look to be at least as good as ResEdit's editors, if not better. It's just a matter of making them...
Basically, it looks like it could easily be a good replacement for ResEdit as it is, and if someone (or several people) made the editors for it, it could replace NovaTools.

I noticed that problem with locked files too - you just have to set "read-only" in the open file dialog for it to work for now. I'll report this to the author.

Edwards, on Jul 17 2005, 05:20 PM, said:

(EDIT)And here's my second impression of the thing:
TMPLs with Rezilla tags added are fun. I tried changing the dësc flags to type WORV, and it worked well. Unfortunately, I seem to have done something wrong, and the flags seem to all be reverting to "set" when I close the editor window.

And one of the bugs seems to be a tendancy to (at least temporarily) corrupt TMPLs. "unknown TMPL flag: 'dop'."? It worked fine a second ago, and I know I didn't put "dop" in there anywhere. And you can't even open a corrupted TMPL in the TMPL editor to fix it (which, although it makes sense, is quite annoying)... :mad:

(EDIT)Third point: Watch your forks- it comes set to edit the data fork by default, and I was apparently editing the TMPLs and creating dëscs in the data fork, not the resource fork.

Edwards

I'm currently playing with template tags, which is quite fun. Two things I've noticed, so that you don't waste time as I did:
- first, hex numbers after the equality in the label of CASE tags after a WORV (and, I suppose, BORV and LORV) do not seem to work well, even with $ or 0x before. I replaced them with the decimal values (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, etc...), and it works fine now.
- When doing a fixed-size list (FCNT tag), you have to add an item with the LSTC tag afterwards, to actually begin the list. Then you can put the items to repeat, and end with LSTE.

That's all for today. Expect me to report further explorations, as well as some Rezilla templates (remember: put them in (~)/Library/Application Support/Rezilla/Templates/)

GutlessWonder, on Jul 17 2005, 12:41 PM, said:

How good will PC emulation be on an Intel Mac? I've seen some reports that indicate that PC emulation will be able to take a great leap forward, but not being especially tech-savvy, I have to state this as a question here for anyone who's been following it.

My reason for bringing it up is that if emulation becomes much easier, the prices for it should also decrease. This may make using EVNEW, the PC editor, a viable option as well. I doubt it will be free, but if emulation is good we may be seeing macs that ship with Windows. (I fail to see how this won't be a possibility).

I know it's a lot of speculation, but perhaps it is another option?
View Post

I haven't really been following the situation, so forgive me if I'm being inaccurate (in which case I shouldn't be posting right now)...

Basically I feel like once Macs go over to Intel chips, the hardware (on the inside of the box) should closely resemble that of an Intel-based PC. Well, it is going to be an Intel-based PC; just that it'll be running OS X by default. I'd have to imagine that, unless Apple tried to prevent it (which won't prevent hackers from doing so anyway), it should be possible to dual-boot the computer so that you could start up OS X or Windows. Or Linux. Or anything else if you desire, provided it runs on the x86 architecture.

GutlessWonder, on Jul 17 2005, 12:41 PM, said:

(I fail to see how this won't be a possibility).

Then you're clearly not looking very hard. How and why would Apple ship Windows, a Microsoft product, with their computers? And do you really think Microsoft would allow it?

As far as emulation goes, Windows was designed for the x86 architecture, which means that while it will by no means be native, VPC or any other emulator will not need to emulate the processor, which will speed it up considerably (maybe even enough to make up for the suckage of VPC...).

Zacha Pedro, on Jul 17 2005, 04:58 PM, said:

Y'know, I don't think Dr Ralph had really a team working on NovaTools either. Of course, there was Rodger too, but I don't think he did much coding. Moreover, with any luck I'll be able to start from Dr Ralph's code (not to mention his DITLs for the editors and such). I've heard he programs in Pascal though...

Nope, he didn't have a team. Also, you are correct about Roger: Ralph is listed as the "w00tleader" and the "w00tprogrammer", while Roger was the "w00tnumbertwo" and "w00ttester" (not sure on the "leader" or on the format of the "numbertwo", but you get the idea). And yes, he programs in Pascal.

Firebird, on Jul 17 2005, 10:30 PM, said:

I haven't really been following the situation, so forgive me if I'm being inaccurate (in which case I shouldn't be posting right now)...

Basically I feel like once Macs go over to Intel chips, the hardware (on the inside of the box) should closely resemble that of an Intel-based PC. Well, it is going to be an Intel-based PC; just that it'll be running OS X by default. I'd have to imagine that, unless Apple tried to prevent it (which won't prevent hackers from doing so anyway), it should be possible to dual-boot the computer so that you could start up OS X or Windows. Or Linux. Or anything else if you desire, provided it runs on the x86 architecture.

I forgive you. See, you're assuming that because they are using Intel's chipset, everything but the OS will be the same as a PC. That's where you're wrong. You see, Intel is only making the x86 chip for them. That's it. I have heard that with adjustments, Windows should be able to run, but you can't just go out and buy a copy of XP Pro, install it on your Mac, and have it work. There's more to a computer than its processor, something many people seem to have forgotten by thinking they could install OS X on their PC.

This post has been edited by orcaloverbri9 : 17 July 2005 - 11:06 PM

This sounds awesome. I've had a look at ResFool and ResKnife before and thought they might have had potential but I haven't heard of Rezilla before and it looks great. Regardless of Apple going Intel I've always wanted an OS X version of ResEdit. Hope this works out 🙂

you could just keep your old mac and use it with 9.2.2...

antihero, on Jul 19 2005, 01:01 PM, said:

you could just keep your old mac and use it with 9.2.2...View Post

Zacha Pedro, on Jul 17 2005, 06:24 AM, said:

...Of course, it's not essential for us to be ready from day one, since we can usually keep an old computer for plug stuff (I heard some people are still in OS9 for that very purpose). But nevertheless, we must be prepared. Even if only to answer to this: "Hi, I'm a Nova fan and would like to know how to make plug-ins. I'm running Tiger on an Intel Mac, is that a problem?".View Post

Anyway, I still can't get the WORV menu to do flags properly. The decimal format works better than the $0000 format, but it still has a large problem:
When you save and close an editor, each flag that is set is changed to the menu item above it, ending up at $0000. So, if your menu is 1-2-4-8, and you start off with $000A (8+2), and start saving, closing, and open the resource, the flags will go to $0005 (4+1), $0002 (2+0), $0001 (1+0), $0000 (0+0). As you might imagine, this is not good for making plugs. Have you had this problem, Zacha Pedro?

Edwards

This post has been edited by Edwards : 19 July 2005 - 04:59 PM

Edwards, on Jul 19 2005, 10:58 PM, said:

Anyway, I still can't get the WORV menu to do flags properly. The decimal format works better than the $0000 format, but it still has a large problem:
When you save and close an editor, each flag that is set is changed to the menu item above it, ending up at $0000. So, if your menu is 1-2-4-8, and you start off with $000A (8+2), and start saving, closing, and open the resource, the flags will go to $0005 (4+1), $0002 (2+0), $0001 (1+0), $0000 (0+0). As you might imagine, this is not good for making plugs. Have you had this problem, Zacha Pedro?

Edwards
View Post

Yep, indeed. I tested by just checking that it read Nova Data files well, and did not try editing stuff at first. So, I encourage you all to file nice bug reports here. I've mailed the author to introduce myself and the community, if he sees many well-written bug reports from us (mention you're doing Nova plug-ins, and upload a copy of the problematic template encoded in .bin), then he will be more likely to work with us. I have another to report, this time a crash related to bitfields (BB0x): BB04 is useful when working with commodities in the spöb resource.

Zacha, I should mention that I'm currently in possession of the all the code to the w00tTools, as passed to me by Dr. Sutherland. One of my projects is supposed to be getting all converted to Cocoa, which I hope to attack sooner rather than later.

Once there, it should be easy to flick it over to Intel.

Dave @ ATMOS

interesting times indeed

You mean, really? Now, this looks no simple task: first, you'll have to mix Carbon and Cocoa, since the Resource Manager isn't available in Cocoa. Then you'll have to make all the basic resource handling-stuff, that ResEdit does, yourself. But this sounds promising as well, and it doesn't even need to be Intel-native - just as long as it's Cocoa, it's OSX-native and hence it solves the main issue. The only issue to make it Intel-native on top of that is obviously to byte swap everything. In the meantime, (and I don't mean any offense to your coding sk1llz), I'll run this in parallel, Just In Case™.

orcaloverbri9, on Jul 17 2005, 10:47 PM, said:

I forgive you. See, you're assuming that because they are using Intel's chipset, everything but the OS will be the same as a PC. That's where you're wrong. You see, Intel is only making the x86 chip for them. That's it. I have heard that with adjustments, Windows should be able to run, but you can't just go out and buy a copy of XP Pro, install it on your Mac, and have it work. There's more to a computer than its processor, something many people seem to have forgotten by thinking they could install OS X on their PC.
View Post

Well, I'm not that stupid. What I said wasn't completely baseless.

The thing is, some of the components currently in use by Apple are still pretty much the same as those in PCs. The video card's the same, the hard drives are pretty much the same. There really isn't that much that could be different, especially considering a lot of the I/O standards are present on both platforms (like USB and Ultra ATA) are the same.

That said, I'm sure you know what you're talking about, so I guess there would probably be enough differences to make running Windows not very straightforward. I'd assume there would be major incompatabilities in the ROM and BIOS and all that good stuff I either don't like tweaking, or isn't possible to tweak in the first place. Still, I wouldn't put it beneath the hacking community to make it work somehow...

There's already a piece of software called PearPC that runs OS X on x86 boxes, albeit emulated. So, yeah, OS X on x86 is already here.

Quote

I forgive you. See, you're assuming that because they are using Intel's chipset, everything but the OS will be the same as a PC. That's where you're wrong. You see, Intel is only making the x86 chip for them. That's it. I have heard that with adjustments, Windows should be able to run, but you can't just go out and buy a copy of XP Pro, install it on your Mac, and have it work. There's more to a computer than its processor, something many people seem to have forgotten by thinking they could install OS X on their PC.

Well, you're almost right. I believe you actually will be able to simply get a copy of XP and install it onto your Intel Mac, but you will not be able to install OSX on your PC because of some processor ID thing that Intel OSX checks for. If it is a MacTel, it will install. IF it is an ordinary PC, it will not.

Naturally, someone will eventually find a way for you to be able to install Tiger or whatever onto your PC, albeit with a lot of illegalness and pirating.

Firebird, on Jul 20 2005, 10:04 PM, said:

The thing is, some of the components currently in use by Apple are still pretty much the same as those in PCs. The video card's the same, the hard drives are pretty much the same.

That's not entirely true. For instance, while ATI makes, say, a 9600 for Windows computers (PCI or AGP), as well as one for Macs (possibly even seperate ones for seperate models), you will find that other than power and VRAM, they are very different.

However, just because the new Macs will be x86, doesn't mean they'll have AGP, PCI, PC, PS/2, Serial, etc. support - on the contrary, I'd be very surprised if they did. This is the main reason Windows would need modifying to run: unrecognized hardware input.

orcaloverbri9, on Jul 21 2005, 06:59 AM, said:

However, just because the new Macs will be x86, doesn't mean they'll have AGP, PCI, PC, PS/2, Serial, etc. support - on the contrary, I'd be very surprised if they did. This is the main reason Windows would need modifying to run: unrecognized hardware input.
View Post

They'll definitely have PCI. 😉 Although AGP is being phased out by Intel and the Graphics Card manufacturers so you'd only see that on a couple of the earliest MacIntels. However, Windows doesn't need PS/2 or Serial to run, and since the only real motherboard difference I can see (beside ports Apple with have Firewire, and no PS/2) is somesort of ROM to keep OS X only on Macs.

This post has been edited by The Real Darth Bob : 23 July 2005 - 05:48 PM