15th August 1996.

Welcome to another of my infamous drivel sessions. Do programmers have any place in contempory happenings? Course they do. Are we just sad individuals with no life outside of computers? Err, possibly, but probably not

What's Happening?

PF406 should be out within the next few days - we're aiming at this weekend - the 17th or 18th August. It's fair to say that we've tested the life out of this one, and it will not do anything unexpected! We have taken on board many new testers in the last few months, and it would be very unfair not to mention the excellent work of "The Warlock of the future - Jens Bauer". PF406 comes with Eddie 130 which can finally print (chroma for those with colour printers) and remembers where the build and find windows live!

The Warlock of the Future has sent in some great reports/suggestions/code. Ex-Falcon and well ripped off by a large software publisher (he claims) as I have been, I wouldn't be suprised to see more of his work.

I feel I must mention the "rip off" factor - it has happened to me personally and other people.

Let me tell you how it works:

First off, you spend well over two years writing something you think is great - in my case it was a plain English parser for text adventures, written in 6809 which was easily convertible to anything, but I had z80 in mind. You finish the project and think to yourself "I need a publisher for this work", so you scan the games press, magazines and anything else vaguely related and decide on a publishing house you think will be interested in it. You send the disks off (naively complete with source code) to them and wait and wait. Nothing. So you write them a letter. Nothing. So you phone them. Fifteen phone calls later you get through to a guy called "Steve" and he tells you that "whilst your code was good, it doesn't fit in with their current philosophy, and it's of no use to us" so you, dejectedly, decide that next time you'll find out what they want first, before writing. Anyway, a couple of months later this publishing house produces a game with what looks just like your code in it - what can you do? Well if you're in the same shoes as I was, and a zillion other programmers that this has happenend too, not a lot as you simply don't have the necessary financial resources necessary to prove they've used your code!

And it's not just games houses that are happy to do this, but others as well, as correspondence this month has indicated. In this case it was an evaluator for use in a low level debugger (we have the source code here, and bloody comprehensive it is too!) that was simply ripped off for another companies (this is non Mac) low level debugger. This is a company I used to hold in very high esteem, but if as this authour is indicating, they did simply rip him off, then my opinion is changing rapidly!

I feel compelled to state here and now for the record that we rip nobody off. We insist on total honesty.
For example, if somebody says to me "What do you use to write your software with", if it wasn't our own software, I could not lie. As it is I can truthfully and honestly say that everything we've ever published has been written with Fantasm/PowerFantasm or other related tools. This is not because we haven't thought of using Think C or MPW (the others are jokes surely?) but simply that by using PF we get performance improvements we couldn't otherwise get. Besides how could we sell stuff which we don't use?

As I'm sure customers would testify, we offer complete confidentiality - it's our number one principal, and have never, ever ripped anybody off or told anybody else what customers are up to

 

General

First off, welcome to all new readers! I know a lot of people read this "column" fairly regularly, but I also know that a lot of you are reading this for your very first time, so welcome to you new comers - a very warm welcome indeed!

Things are a little strange here at Lightsoft Towers at the moment - strange because everything is upside down. Upside down because it is the summer holidays when strange things happen. For example, at the moment I have no modem access - no E-MAil, no internet, no contact at all. This does not mean that Lightsoft does not have comms - of course it does! It is a weird feeling. No means of keeping in contact with my work mates/friends and no means of getting the latest and greatest software.

Indeed this lack of access has very beneficial side effects - I am currently working on a kind of high-level front end for PowerFantasm - a compiler that takes a weird mixture of C and BASIC and produces a source file that PF assembles to produce an Application. A compiler. This is a simple compiler - not a full blown C compiler like Fanta_C (coming to a Mac near you shortly), but a simple single file compiler that takes basic like commands and produces a nice PPC source file that PF assembles into an app. Initially, it was developed for me to write the preprocessor, but it has proved to be very good at producing ppc source files very quickly, so we may give it away with future PF's as a kind of Rapid App Development (RAD) with PF (yes, all registered users will get it for free) - that is of course if I can get other Lightsoft personnel behind the idea, although there isn't much to it, and it's not officially supported, and has no interface, it works well - I like it. The old bouncing a blob around a window took all of 2 minutes to write in F-RAD compared to a good hour in straight PPC source code. Currently I'm working on the typing so you can define different sized variables, rather than the standard 32bit it currently supports - watch this space!

Now then, as mentioned previously, it is the holiday season, and, yes, I've been on holidays! It was our first holiday for many years -it was bloody great. We went camping in "Molly" (our VW camper van) and covered two thousand miles in two weeks with only one incident. The highlight was the night I threw up in the sleeping bag, which wouldn't have been too bad except it was a double sleeping bag and my wife copped most of it! That would've been OK, barring the fact that I then staggered to the toilets to get cleaned up without bothering to put any clothes on - much to the delight of a party of German tourists. If any are reading this, then yes it was me on the North coast of Cornwall, and yes, I humbly appologise and wasn't it cold that night! :-)

We toured Cornwall, Devon, the lake district and both South and North Scotland. It was all great, apart from the Lake District which was absolutely packed. We met about Thirty other "Mollies" on our travels - all owners and vans were willing to chat. I would like to extend special thanks to the lorry driver who pulled our Molly out of a ditch in Lock Ness - very embarrassing - heck we weren't even moving when we fell in - it looked like solid grass - we just wanted to check the map!

Films we saw included "Twister", "Independance Day", "James and the Giant Peach" and "The Hunchback of Notredam". I'm not going to beat about the bush on this one - Do not bother with Twister. I'm not the only person from Lightsoft who has seen this - just don't bother - "completely scriptless" is the best phrase I can think of.

For the kids, the other two - James and the giant peach", and "Hunchback" are superb, with Hunchback getting extra special marks for the quality of animation far and above that of the "Lion King".

"Independance Day" - well if you haven't seen it - do so. It's in the league of the original "War of the Worlds", and certainly brings it bang up to date! Of course, a very nice PowerBook can be said to have saved the day, but the quality of the script shines and there are some very interesting juxtapositions played - for example "Brent Spiner" - Data from TNG - puts on his best Lore accent and pulls it off superbly

I thouroghly enjoyed it - it's long - 150 mins, It's non-stop and above all it doesn't bullsh*t you. There's no bad language, no sex and it's not highly original. However it does add new twists to the original H.G.Wells script and the effects are as good as they come. Special mention must go to the sound processing and design which is scary in places! At last, a film not afraid to use some imagination in the use of the sound channels!

The film is also extremely amusing in places - for example the President categorically stating (and believing) that there is no area 51, only to be hesitantly corrected by a minion a few seconds later - very believable!

Yes, it was a film close to me heart - loads of nice Macs (well done Apple), decent story (they even gave it a believable reson d'etre), superb SFX (visual and audio), good acting, and excellent, fast paced direction - I'll give it 7 out of 10. On the flip side of the coin, I'll give "Twister" 2 out of 10 - we won't talk about that one! The next film I'm really looking forward to is "Dragon Heart" - any body seen it yet?

A film we would dearly love to see made is "The Lord of the Rings" - JRT's classic and epic tale of adventure.
We've talked about this, and have decided that the primary problem with such a project is the visualisation of the characters - a real problem as everyone has their own ideas obout how these characters should look. The other sticking point is that said realisation on the medium of film would entail much processing power. Basically, we feel that most of the scenary would need synthesising to be believably mixed with such weird characters. Of course, the other problemo is that such a tale would need to be about nine hours long to do justice to all three books, which I guess isn't practical? (BTW, I know an animated version of one of the books is available - this isn't good enough).


During my hols I got "talked into" looking at a guys Pentium 75 which was just plain misbehaving.

Said person is a driving instructor who needs to produce question sheets for students from a master list of questions produced by the Highways Agency (or whatever they're called?). Anyway, this Pentislug was crashing when running PageMaker 6. The set up was a P75 (running that virus Win95) with quad CD and an Epson GT500 scanner. The idea was to scan in master questions to a database, then produce question sheets from said database. No Way!

The P75 is not a fast computer by any means. In fact it can be said to be diabolically slow! We all know that a Pentium is a risc processor emulating 8086, but really I did not think it would be that slow (as an aside, Rob pointed me at some figures last week which compared a Pentium Pro with a 604 and the 604 came out about 30% faster. When describing the Pentium Pro, Rob used the phrase "half a beach of silicon" which I thought was incredibly funny :-)). Anyway the upshot of all this is that PageMaker 6 was totally incompatible with this guys set up, and coupled with the fact that his supplier had provided his GT5000 (not a bad scanner BTW) with a 300 series driver - it wasn't going to work.

For the record, this chap really is a driving instructor and not a computer whizz kid. If the supplier had told him the computer would only work on weekends, I'm sure he would have believed him! I'm sure you can imagine the way the conversation went - what with me being a die hard Mac fanatic.

The thing is, if Apple had better advertising, this guy might well have had a sexy 7200 or similar and he wouldn't need me to go round to his house and tell him what a sheep he was, and should've researched a bit better in the first place. Then he'd be running ClarisWorks and making money teaching people how not to crash a car rather than piddling about in config.sys files at 2pm on a Thursday, AND annoying people on their holidays!

The end result was that I got his box working by installing PageMaker 5 and D/L'ing a GT5000 driver - PM6 still doesn't run - dunno why and don't care either. BTW, PM5 takes 5 Megs and ClarisWorks would take about a Meg - the thought I left him with. The cost of his set up? 2 and half thousand UK pounds and it don't work. Apple!?

Interlude

A very small interlude this time... Because I haven't had time to cook anything up :-) However, I missed out a very important point in last months colour cycling episode. Do you remember the classic Atari (I can't believe they were sold to a disk drive manufacturer!) game "Pole Position"? Well most of the track in that game was animated using colour cycling in both the Coin-Op and the home computer versions - remember the white and red track edges? All colour cycled - a doddle.

As I have no source code prepared for this months interlude, it's best I talk about why you can produce faster PPC code in PF than you can using say a native C compiler. Our forthcoming compilers feature what we call Direct in TOC variables. It's not magic, but sure does speed up the execution of the run time code.

Lets face it, in PowerPC(tm) the reason we have TOC is because there is no PC addressing mode available - if we did then we could simply put the data in the code and access it with x(pc). (An offshoot of having seperate data sections is that Apple can spool out the code to disk (for VM) far easier).

As an aside, I thought that POWER was an I.B.M. (God bless their little cotton socks) development from scratch - but this may not be a fact? This from Jens:
"I use bl to get the address of the program-counter, and can therefore do PC-relative code, although this was not possible Motorola said. (To tell the truth, they actually said "Getting the address of PC on a super-pipelined computer is difficult, as you don't know where PC actually is. But I guess Motorola did not read the entire Digital-Alpha manual when they copied the Alpha architecture and called it PowerPC. (sorry, this IS a fact!) -Try looking in the "Alpha Architecture Handbook", there you see.. It's a PowerPC chip Digital made. " - Oooeeer.

Anyway, as you may know the TOC is supposed to contain pointers to code and data. Ignoring the code pointers for the sake of this discussion (you can set up code pointers with the toc_routine directive) the TOC contains pointers to any data label you have defined - for example:
var1: ds.w 1
The TOC will contain a pointer at offset var1 which points at 1 word of storage in the data section. To access this data one would normally write:
lwz r3,var1(rtoc)
lwz r3,(r3)
and to store data in the memory:
lwz r3,var1(rtoc)
stw r4,(r3)
But why? Why not, as the TOC entries are words anyway, just store the data in the TOC? This is in fact what we do, so to read data it becomes:
lwz r3,var1(rtoc)
and to store:
stw r3,var1(rtoc)
This is something you can do (carefully) and substantially speed up you execution times. Halfs and bytes are also naturally fine. Data larger than 32 bits must be accessed indirectly unless you are willing to define more than one label - arrays and strings for example, although arrays are probably best put in the BSS section to save disk space.

Another nice widget to have in your armoury is a debug call that saves the registers before the call and restores them after the call - viz:

 

***********************************
**This one saves you having to type "Xcall Debugger" and is used just as the 68k directive
**"debug". It also saves r3 - r31 which is pretty mandatory for a debugger call.
Debug:	macro
	ifnd	Debugger
		IMPORT	Debugger
	endif
	stmw	r3,-116(sp)	*save em all except r0-r2
	stwu	sp,-56+116(sp)	*now 56 bytes extra stack space that Xcall needs
	Xcall	Debugger
	addi sp,sp,56+116		*Reset stack pointer
	lmw r3,-116(sp)			*Restore r3-r31
	endm

This macro is included in the PF406 file LS_PPC_Macros.def for your convenience.

Epilogue

Ah, a new section I hear you say. Well, it's not a permanent addition, just this once. The reason we have one of these this time is because I've forgotten some things that should've gone in above somewhere but didn't.

Eddie's telling me this is line 240 - which amazes me. It's very easy to type this stuff out, and amazingly it adds up very quickly. However, it takes a long time. To get this far has taken nearly three hours. I enjoy it. Normally I'll do this when we're waiting for other people to return to us with their findings - for example testing. Tonight I am not, because I have no access to the outside world - no modem, no phone connect(x)ion, no nothing. I've just been told that PF is to be included on an Apple list of somethings, not quite sure what, but if it helps Apple then thats fine by me.

Rob was daft enough to send me some scanned pictures of some of the gang, so I expect they may accidentally find their way onto the site somewhere (a ha!). Will you be seeing pictures of moi? I don't think so :-)

Finally, it looks as if 406 is about ready. The new video libraries are done, testing is completed, just some minor documentation changes and that will be it. Hopefully we'll have the updates ready by this weekend (17th Aug). It's a small numerical change, but 406 has had major work done, specially in the area of bug erradication. Some big projects are underway with PF which has revealed many problems - all these have been addressed. We'll be shipping Eddie 1.30 with 406 which again has major improvements on the usability and stability fronts, along with some new features as detailed elsewhere. We have had lots of user input over the last few months and were not able to incorporate all the changes into this release - they'll have to wait for the next.

It's three days since I started this piece and now have comms back - it's difficult to imagine what life is like without email and the Internet, however it did give me the chance to try out some things I don't normally have time for. For example, I tried out most of the available MOD players and came to the conclusion that until we get Eddies MOD player plug in sorted out, The Sound-Trecker is still the best general purpose player for programming. It's very fast and supports huge play lists. The best sound definately comes from MacMikMod with its interpolation function, but unfortunately ones Mac grinds to a halt! In slow time we are working on a native mod player for Eddie, and with a bit of luck, may have someone working on this full time before long. In the last few days, whilst Rob has been library writing and testers testing I've had more chance to work on F-RAD. Now it supports typing, so we can use chars, ints and longs, along with simple single dimension arrays. What I have realised is that PPC is a hell of a lot faster than 68k (F-RAD is native only sorry) to the point where I'm hoping to get on the fly compilation for syntax checking from Eddie - maybe if it ever makes it through to production. A lot of our stuff doesn't, simply because the amount of work to produce a product from a prototype is huge.

I apologise if this column is dis-jointed this time. It's been cobbled together over a few days and repeats itself in places. After the 406 release we'll have more time to produce a more coherent piece. Till then,

Code on!
Stu.

©Lightsoft 1996. Unauthorised reproduction prohibited.


Send mail to Stu



Back to Stu's Page Top Level
Back to Home Page