On Jan 3, 9:17 pm, "Anton Treuenfels" <
teamtemp...@yahoo.com> wrote:
> I'm not an Apple guy at all, so I can't help you with that, but I'm
> wondering a little about this assertion. Are you sure? You may be right, but
> software BRKs skip a byte when returning. It's possible, and occasionally
> done, to use that behavior to implement "extra" instructions by setting that
> skipped byte to a particular value and examining it from within BRK handler.
>
I'm positive it's implemented as a part of the copy protection
measures. In fact, once the main game is loaded up and execution goes
beyond the demo, it no longer uses the BRK vector at $9300 at all. I
did not tear apart the handler, but I imagine that it does need some
way of determining which subroutine initiated the BRK, so it probably
does use an index immediately after the BRK as a value into a table to
return to proper execution.
If anyone wants to have a look, the game is Earth Orbit Station (EOS)
by Electronic Arts, and is available on Asimov.
There's a ton of obfuscation, decryption, and self modifying code
going on during the first 2-3 stages of boot loading. If you set a
Breakpoint at $AABF, this will finally lead to an exit of this stage
of the boot via an indirect JMP ($0042) which goes to $42E2. In that
subroutine, you'll encounter the first BRK instruction.
That said, I think I've fixed it-- it turns out to be rather simple.
If you download that image and boot it on a IIgs, it will lock up
shortly after the boot (you'll see a screen full of multi-color
squares, typical for Electronics Arts protection of this time). Break
out and get into the monitor and directly patch the IIgs break vector
to jump to bank 00, $9300 which is where the program redirects it to
in the game:
e1/0010: 5c 00 93 00
then boot the disk:
c600g
Game boots past the multi-color screen it previously locked up at, and
proceeds to the demo and eventually game start.
I'll patch it into the T0/S0 boot and test it out on a real IIgs
later. Thanks for all the input and the assistance, hopefully that
will do it!
Rich