• Butterfly
    Butterfly
    kas1e
    Posts: 97 from 2005/10/31
    @Flash
    If reaction is used, then probably bad luck, you will need to ditch it in favor of mui. If mui is used, or no gui at all, then it's better and then:

    If aos4 code writen without __USE_INLINE__ , then it means you need to remove all those I* prefixes before amigaos functions (like those IIuntion->, IDOS->, IGraphics->,etc). If __USE_INLINE__ were used, it means code didn't have all those I*-> stuff, and you have no worry about.

    Then, next, you will need to replace functions which is present on os4, but not on morphos (to os4 haters: it didn't mean that they are better, just, of course, some new functions added to os4 the same as to morphos).

    After that, if code is heavy enough you will be in needs to deal with HOOKs. On Morphos they more or less like on os3 was, so you will need a bit spend time to make them works. Like this:

    Code:

    #ifdef __amigaos4__
    #define REXXHOOK(name, param) static const struct Hook name = { { NULL, NULL }, (HOOKFUNC)&Rexx, NULL, (APTR)(param) }
    static LONG Rexx(struct Hook *h,Object * obj, IPTR *params);
    #else
    #define REXXHOOK(name, param) static const struct Hook name = { { NULL, NULL }, (HOOKFUNC)&RexxEmul, NULL, (APTR)(param) }
    static LONG Rexx(void);
    static const struct EmulLibEntry RexxEmul = { TRAP_LIB, 0, (void (*)())&Rexx };
    #endif


    If graphics.library is used, there are some differences with functions name and tags will be as well.


    But in general, all you need probably is to grab "OS3 to OS4 migration guide", and made code be back "like os3 one", which then will be much closer to morphos's code then.


    [ Edited by kas1e 22.08.2020 - 10:19 ]
  • »22.08.20 - 10:18
    Profile