Welcome, Guest. Please login or register.

Author Topic: AmiDARK Engine Flying Feather on AROS  (Read 4594 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline AmiDARKTopic starter

AmiDARK Engine Flying Feather on AROS
« on: June 08, 2014, 10:42:53 PM »
Hello.

I tried to make a quick port of the AmiDARK Engine for AROS i386.
To show it should not be too complex.
Some functions don't work (like PTReplay musics, etc...)

Can someone with an i386 AROS, try this demo and tell me if it work correctly ?
If it work, can you post a screen capture of it ?

 http://files.amidark-engine.com/FlyingFeather.zip

Thank you.
AmiDARK
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #1 on: June 09, 2014, 09:12:54 AM »
@BSZili : Ok.
Reuploaded without stripping.
Sad to see that stripping causes this problem (and I don't understand why) because executable is now 5Mb instead of 1Mb ...

Please test this new version (same link than previous)
« Last Edit: June 09, 2014, 09:32:47 AM by AmiDARK »
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #2 on: June 09, 2014, 11:24:09 AM »
Thank you BSZili.
Will check this when I'll be back at home.

What you said here show that it is good to open source code as I don't have a computer with AROS, I can't test ...

Regards,
AmiDARK
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #3 on: June 09, 2014, 08:36:13 PM »
Uploaded a new version with your changes BSZili ;)
Same link.
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #4 on: June 09, 2014, 10:57:22 PM »
BSZili, the executable is not stripped.
Strange that it crash with the same error.

I will investigate this.

Regards,
AmiDARK
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #5 on: June 10, 2014, 09:53:09 AM »
I don't understand what your backtrace may learn us.

Because the AmiDARK Engine initialise this way :

Quote
int main( int myargc, char** myargv ){
  BOOL eResult;
  argc = myargc;
  argv = myargv;
  eResult = DarkENGINE_Start(); // <-- SETUPS
  if ( eResult == TRUE ){
    DarkLoop(); // <------------------ The main user/developer function
   }
  DarkENGINE_End(); // <------------ Releases/Clean up.
  return EXIT_SUCCESS;
 }


And the DarkENGINE_STart() function work this way :
Quote
 BOOL mResult = TRUE;
  DemoMode = 1;
  deOpenLibraries();
  deOpenDataTypes();
  if( !deOpenDevice_Input() ){
    mResult = FALSE;
    printf( "Erreur opening Device Input\n" );
   }
  if( !deOpenDevice_Timer() ){
    mResult = FALSE;
    printf( "Erreur opening Device Timer\n" );
   }
  deOpenPTReplay();
  // Setup de la liste de rendu graphique
  AdvFunctionConstructor();
  // Setup des plugins utilisés
  ...
  ...
  ...
  return mResult;
 }


Do you backtrace mean the last function called is the MyGetSysTime() one ?

Because deOpenDevice_Input() is called before deOpenDevice_Timer() that call the MyGetSysTime()...

I will burn a DVD with the latest AROS release .... But I'm not sure it help progress in the problem ...
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #6 on: June 10, 2014, 10:51:29 AM »
BSZili : Concerning the way the DarkENGINE_Start function work, I know this. it is "beta" ( like the rest of the Engine ;) ) that's why I didn't put a "quit" yet.
(I have not yet done the "error handler" system)

Currently, the function that uses the TimerDevice (MyGetSysTime) check if timer.device was correctly opened (in the function deOpenDevice_Timer() ).
Same result for the Input.device

It will be fixed in the future by "quitting" the application with a popup containing an error message if the device cannot be opened.

I'll check for "VMWare Player" if it work with WinXP.
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #7 on: June 10, 2014, 10:55:04 AM »
Here are the 2 functions :

Quote
BOOL deOpenDevice_Input( void ){
  BOOL mReturn = FALSE;
  struct Message * mio_Message;
  m_inputPort = MyCreateMsgPort();
  if ( m_inputPort ){
    m_inputsigflag = 1L << m_inputPort->mp_SigBit;
    #if defined( __amigaos4__ )
      m_inputRequest = ( struct IOStdReq *  )MyCreateIORequest( m_inputPort, sizeof( struct IORequest ) );
     #elif defined( __MORPHOS__ )
      m_inputRequest = (struct IOStdReq * )CreateExtIO( m_inputPort, sizeof( struct IOStdReq ) );
     #elif defined( __AROS__ )
      m_inputRequest = ( struct IOStdReq  * )MyCreateIORequest( ( struct MstPort * )m_inputPort, (int)sizeof( struct IOStdReq ) );
      mio_Message = &m_inputRequest->io_Message;
      mio_Message->mn_Length = (ULONG)sizeof( m_inputRequest );
     #endif
    if ( m_inputRequest ){
      if ( MyOpenDevice( "input.device", 0, (struct IORequest *)m_inputRequest, 0 ) ){
        #if defined( __amigaos4__ )
          InputBase = m_inputRequest->io_Device;
          m_IInput = (struct InputIFace *)MyGetInterface( ( struct Library *)InputBase, "main", 0 );
         #endif
        mReturn = TRUE;
       }
     }
   }
  return mReturn;
 }


Quote
BOOL deOpenDevice_Timer( void ){
  BOOL mReturn = FALSE;
  timerPort = MyCreateMsgPort();
  if ( timerPort ){
    timersigflag = 1 << timerPort->mp_SigBit;
    #if defined( __amigaos4__ )
      timerRequest = ( struct TimeRequest * )MyCreateIORequest( timerPort, sizeof( struct TimeRequest ) );
     #elif defined( __MORPHOS__ )
      timerRequest = (struct timerequest *)CreateExtIO( timerPort, sizeof( struct timerequest ) );
     #elif defined( __AROS__ )
      timerRequest = CreateExtIO( timerPort, sizeof( struct timerequest ) );
     #endif

    if ( timerRequest ){
      if ( MyOpenDevice( "timer.device", UNIT_MICROHZ, (struct IORequest *)timerRequest, 0 ) ){
        #if defined( __amigaos4__ )
          TimerBase = timerRequest->Request.io_Device;
          ITimer = (struct TimerIFace *)MyGetInterface( ( struct Library *)TimerBase, "main", 1 );
         #endif
        MyGetSysTime( MyTimeVal );
        timerFirst = TRUE;
        #if defined( __amigaos4__ )
          NewTimer = ( MyTimeVal->Seconds * 1000000 ) + MyTimeVal->Microseconds;
         #else
          NewTimer = ( MyTimeVal->tv_secs * 1000000 ) + MyTimeVal->tv_micro;
         #endif
        OldTimer = NewTimer;
        DemoStartTimer = NewTimer;
        mReturn = TRUE;
       }
     }
   }
  return mReturn;
 }
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #8 on: June 10, 2014, 11:22:34 AM »
Yes, they're wrapper :

Quote
struct IORequest * MyCreateIORequest( struct MsgPort * MyIOPort, int SizeRequest ){
  struct IORequest * MyIORequest;
  #if defined( __amigaos4__ )
    MyIORequest= IExec->CreateIORequest( MyIOPort, SizeRequest );
   #else
    MyIORequest = CreateIORequest( MyIOPort, SizeRequest );
   #endif
  return MyIORequest;
 }


Quote
struct MsgPort * MyCreateMsgPort( void ){
  struct MsgPort * MyMessagePort;
  #if defined( __amigaos4__ )
    MyMessagePort = IExec->CreateMsgPort();
   #else
    MyMessagePort = CreateMsgPort();
   #endif
  return MyMessagePort;
 }
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #9 on: June 10, 2014, 12:43:45 PM »
Yes, I know that.
But, it exists few commands/functions in the AmigaOS4 that do not exist on other Amiga OSes and that need to be developed differently.
That's why I decided to keep this form. To be sure I never lose focus on AmigaOS4 specific commands/functions and other OSes ones ;)
 

Offline AmiDARKTopic starter

Re: AmiDARK Engine Flying Feather on AROS
« Reply #10 on: June 10, 2014, 01:49:41 PM »
I'll check these.