Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPW Pascal fails with Alias Manager check #16

Closed
steventroughtonsmith opened this issue Jan 15, 2015 · 9 comments
Closed

MPW Pascal fails with Alias Manager check #16

steventroughtonsmith opened this issue Jan 15, 2015 · 9 comments

Comments

@steventroughtonsmith
Copy link

MPW's Pascal compiler ( http://pascal-central.com/tools/mpw.bin ) errors out on run with a:

"### Error 429 Internal check for alias manager failed - need System 7"

a11e NewPtr(00000078)
a055 StripAddress(ffffffff)
     -> -1
a122 NewHandle(00000014)
a11e NewPtr(00000190)
a02e BlockMove(00f7c940, 00e28400, 0000003c)
a023 DisposeHandle(00f7c0a0)
a9a0 GetResource(61637572 ('acur'), 0000)
     -> -192
a9a0 GetResource(61637572 ('acur'), 0001)
     -> -192
a9a0 GetResource(61637572 ('acur'), 0002)
     -> -192
a11e NewPtr(000000ff)
a122 NewHandle(00001000)
a064 MoveHHi(00f7c0a4)
a029 HLock(00f7c0a4)
a11d MaxMem()
     -> 0
a9a0 GetResource(48455841 ('HEXA'), 0015)
a9a3 ReleaseResource(00f7c0a8)
a11e NewPtr(002aaab6)
a9a0 GetResource(48455841 ('HEXA'), 0011)
a9a3 ReleaseResource(00f7c0ac)
a9a0 GetResource(48455841 ('HEXA'), 0012)
a9a3 ReleaseResource(00f7c0b0)
a9a0 GetResource(48455841 ('HEXA'), 0016)
a9a3 ReleaseResource(00f7c0b4)
a9f1 UnloadSeg(00f58416)
a9f1 UnloadSeg(00f57bae)
a9f1 UnloadSeg(00f57bc6)
a9f1 UnloadSeg(00f57c2e)
a9f1 UnloadSeg(00f57c6e)
a9f1 UnloadSeg(00f57c5e)
a9f1 UnloadSeg(00f57c8e)
a9f1 UnloadSeg(00f57cce)
a9f1 UnloadSeg(00f48004)
a9f1 UnloadSeg(00f57dfe)
a9f1 UnloadSeg(00f58466)
a9f1 UnloadSeg(00f5840e)
a9f1 UnloadSeg(00f582fe)
a9f1 UnloadSeg(00f57e26)
a039 ReadDateTime(00fffff0)
a9ed Pack6(d0dcd3fa, 01ff, 00fffdea, 0002)
a9ed Pack6(d0dcd3fa, 0000, 00fffeea, 0000)
a9a0 GetResource(5041434b ('PACK'), 0006)
     -> -192
a02a HUnlock(00000000)
     -> -111
a049 HPurge(00000000)
     -> -111
a346 GetOSTrapAddress($a1ad _Gestalt)
     -> 12
a746 GetToolTrapAddress($a89f _Unimplemented)
     -> 12
a746 GetToolTrapAddress($a89f _Unimplemented)
     -> 12
a346 GetOSTrapAddress($a0ad Unknown)
     -> 12
a9ee DECSTR68K(0000)
     NumToString(00000000, 00fffbe0)
#
#
a9ee DECSTR68K(0000)
     NumToString(000001ad, 00fff9ae)
a9ba GetString($0595)
a029 HLock(00f7c0b8)
a02a HUnlock(00f7c0b8)
a9a3 ReleaseResource(00f7c0b8)
# 
### Error 429 Internal check for alias manager failed - need System 7
#--------------------------------------------------------------------------------------------------------------------------------
    File ""; Line 0
#--------------------------------------------------------------------------------------------------------------------------------
a9ee DECSTR68K(0000)
     NumToString(00000001, 00fffe8e)
a9ee DECSTR68K(0000)
     NumToString(ffffffff, 00fffe8e)
a9f1 UnloadSeg(00f57bae)
a9f1 UnloadSeg(00f57bc6)
a9f1 UnloadSeg(00f57c2e)
a9f1 UnloadSeg(00f57c6e)
a9f1 UnloadSeg(00f57c5e)
a9f1 UnloadSeg(00f57c8e)
a9f1 UnloadSeg(00f57cce)
a9f1 UnloadSeg(00f48004)
a9f1 UnloadSeg(00f57dfe)
a9f1 UnloadSeg(00f58466)
a9f1 UnloadSeg(00f5840e)
a9f1 UnloadSeg(00f582fe)
a9f1 UnloadSeg(00f57e26)
@steventroughtonsmith
Copy link
Author

As an addendum to this: I byte-patched the pascal binary just after the _GetOSTrapAddress call

$00001054   BEQ.B      $0000105C                                ; 6706

goes to

$00001054   BRA.B      $0000105C                                ; 6006

and the pascal compiler is working, otherwise unmodified (:D)

While this doesn't help patch mpw, I do hope it means that it shouldn't be too awful to fix…

screen shot 2015-01-15 at 04 50 35

@steventroughtonsmith
Copy link
Author

…works better than I expected, honestly…

screen shot 2015-01-15 at 05 43 43

@ksherlock
Copy link
Owner

That version seems to be Apple Pascal V3.3.3 (03/02/95) I've successfully used MPW Pascal 3.2 which doesn't do any ostrap/gestalt checks.

Options: D+ R+ H+ N+ B+ W+ F+ USELOAD Seg: 
Apple Pascal V3.2 (4/6/91)   08:29:12 AM 01/15/15
(c) 1981 SVS, Inc. (c) 1989 Apple Computer, Inc.

Currently, GetOSTrap / GetToolTrap return NULL (and SetOSTrap/SetToolTrap do nothing). A while back I started working on some stubs which would allow them to work correctly. Guess I better dust that off again.

@steventroughtonsmith
Copy link
Author

Ah that explains why I was confused; I saw they didn't seem to be doing anything, but reasoned they had to as other apps would surely be using them

@ksherlock
Copy link
Owner

It can "Hello World!" with the feature_trap_address_2015 branch.

@steventroughtonsmith
Copy link
Author

Verified fixed & can close

@msliczniak
Copy link

feature_trap_address_2015 branch works well for me as well, merge into mainline?

@ksherlock
Copy link
Owner

At this point, I think it fixes more things than it breaks. I'll do another release on the original code soon before merging it in.

@ksherlock
Copy link
Owner

Merged into the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants