Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
71 user(s) are online (66 user(s) are browsing Forums)

Members: 0
Guests: 71

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: Porting to AmigaOS4 thread

Subject: Re: Porting to AmigaOS4 thread
by kas1e on 2019/10/7 19:25:59

@Raziel
You may remember it, or may not : but when i release Barony game port , there was some strange crashes too : they was exactly because of IDOS 0x00000000. To fix them, i just open dos.library (together with IDOS interface up) in the place where crashes happens (i.e. via stack trace build with -gstab check in which source file it crashes, and there add opening / closing of dos.library with interface).

Just like that:

//somewhere at begining of function
#ifdef __amigaos4__    
    
DOSBase=IExec->OpenLibrary("dos.library",0);
    
IDOS = (struct DOSIFace *)IExec->GetInterface(DOSBase"main"1NULL);
#endif

// original code

// at end of function, right before return 0 if it will be there, just at end so it closes
#ifdef __amigaos4__
    
IExec->DropInterface((struct Interface *)IDOS);
    
IExec->CloseLibrary(DOSBase);
#endif


For Barony i had to do it in 2 places, and it wasn't "sobjes" but statically compiled.

And i do not know of course if it will fix your issues, but just all of this remind me my ones i have with Barony port.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project