[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rubywand's inability to understand how to program the GS
In article <34F485E8.BE297A0C@swbell.net>,
Rubywand <rubywand@swbell.net> wrote:
Look, Mr. Admitted Pirate, will you ever learn to SHUT UP about
bullshit GS programming practices which have been shot down many times
this week? At least you could read what's been mentioned several times
this week and learn you're REALLY in the wrong, versus blabbing your
mouth off for everyone to see. Such uncalled-for abuse about wrong
programming advice is why csa2 has become such a wasteland for actual
programmers who care about the truth, and about the facts. Why does
the general public permit these idiots to feel welcome in their midst
if all they're here for is to try and destroy the future of GS
programs?
> Granted, Apple did not slap a big yellow "Pelegro" sticker on the
>ToolBox Reference page describing SetTSPtr; but, they might as well
>have. It is amply clear that SetTSPtr is not intended to be CALLed from
>an application and that doing so is risky. To quote:
>>>Note: This call is normally used only if you are writing your own tool
>>>set. See Appendix A, "Writing Your Own Tool Set," for more information.
"Normally" does not mean *always*, except in the pirating idiot's
guide to English, I suppose. Also, were you a *real* GS programmer
with 2 brain cells to fire off occasionally, you'd have noted that the
GS technotes are more recent and supercede what's written in toolbox
ref manuals. Given that, it makes the slightest bit of sense to go
looking for any updates, unless you're an idiot who refuses to read
what's presented to him.
Once again, I present the GS Technote #101 written by Apple, dated
1992 (well after the aforementioned toolbox reference), where an
archived copy can be found at
http://www.visi.com/~nathan/a2/tn/iigs/101.html (nicer html format) or
ftp://ftp.apple.com/dts/aii/tn/iigs/tn-iigs-101 (where a consipiracy
has updated it... NOT). I quote from that:
--- snip
PATCHING THE TOOLBOX FROM AN APPLICATION
An application can easily patch a function for the duration of that
application.
After starting up the tools, construct a Function Pointer Table (FPT) the same
size as the existing FPT (call GetTSPtr and examine the first word of the
table; multiply it by four to get the size of the FPT in bytes). The first
longword of your FPT is the number of functions in the tool set; do not
hard-code this value! Get it from the existing FPT on the fly. Fill the rest
of your FPT with zeroes, except for the functions you want to patch. You must
always patch the BootInit function (the first function) to return no error.
Remember that the function pointer values are one less than the addresses of
your replacement functions.
On exit, when you call TLShutDown your patch will be automatically removed.
(If you're using ShutDownTools, you should call MMShutDown and TLShutDown
after you call ShutDownTools.)
Note : In the description of SetTSPtr on page 24-19 of Apple
IIgs Toolbox Reference, Volume 2, there are several
references to the TPT. Keep in mind that the TPT is the
Toolset Pointer Table, not the Function Table Pointer
you pass to SetTSPtr. While SetTSPtr copies the TPT to
RAM if necessary, it does not make a copy of the FPT.
After you call SetTSPtr, the FPT you passed is being
used, and any zero values in your table were filled in.
--- snip
Now if our illiterate idiot had the slightest ability to comprehend
English, he'd comprehend that when *Apple* says that apps can easily
patch the toolbox, that is NOTHING like saying "don't patch". Apple
gives a certain set of rules and conditions for it, which Wolfy
follows quite well (I've looked over that code).
The game does nothing wrong according to the rules laid down by
Apple, and functions perfectly fine. Crashes of the next application
(when wolfy is purely out of RAM) is an OS bug. If people are getting
bitten by such a thing, then can reboot after running the game, and
everything is fine.
Mr Pirating Hurtingbutt (too much time around a turkey, it seems),
before you say another word about GS programming or facts in general,
it really would help if you made the slightest effort to not make
yourself look like an illiterate untechnical idiot each time you posted.
I suppose that's why you can't create of your own accord, but only steal
other's words for "faqs"... ever make sure you had copyright permission
to do that? I thought not.
Nathan Mates
--
<*> Nathan Mates http://www.visi.com/~nathan/ <*>
# What are the facts? Again and again and again-- what are the _facts_?
# Shun wishful thinking, avoid opinion, care not what the neighbors
# think-- what are the facts, and to how many decimal places? -R.A. Heinlein