English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 October 2013, 19:51   #1
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
iff anim converter

i found the AAP_AAC Animation Player/Converter by Wolfgang Hofer (1992) including source in C (Aztec).
it converts and plays Anim7 made from iff pictures / or converts between supported anim types.
does one feel able to take a look at the source and maybe create a win32 or linux command line version of the converter. the source is split into parts for eg. compress/save.
anyone dare to try?

Last edited by emufan; 25 October 2013 at 20:02.
emufan is offline  
Old 25 October 2013, 20:50   #2
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Two problems:
a) Needs deplexing of the Amiga UI code
b) Needs rewritting of 68000 assembler routines in C
After you tackle those you might get in trouble with
c) Endianess

Other than that, pretty straightforward :P

On a more serious note, you might want to express your actuall need and maybe someone has a tool for your need already.
alkis is offline  
Old 25 October 2013, 21:48   #3
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
thanks for the reply.
i'm just about to use the converting routines, removing any gfx/intuitionbase stuff - does this refer to "Amiga UI" ?
also the player routine and scripting things will get purged.
until now i cannot find any assembler, just c source. it's just about open/close files
- and convert them with the functions provided from the original source.

#3 i did not thought about. once the source is cleaned, there will be someone with a ppc based machine for a start - hopefully

until I get bored: currently I try to pipe the source code into gcc/cygwin and correcting errors/typedefs. the files involved only might be aap_glob.c, aac_save.c and aac_main.c

and about something else. there is no converter for amiga animation files around. vlc/ffmpeg plays cdxl - but nothing can write anim5, anim7 etc.

edit: some error lines i try to decrypt:
Code:
AAC_MAIN.C:1:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
In file included from AAC_MAIN.C:88:0:
aap_glob.c:195:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
aap_glob.c:196:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
aap_glob.c:197:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
aap_glob.c:198:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
aap_glob.c:199:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
aap_glob.c:200:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
In file included from AAC_MAIN.C:90:0:
aac_save.c: In function 'int EndWrFile()':
aac_save.c:33:23: warning: return-statement with no value, in function returning 'int' [-fpermissive]
aac_save.c:36:37: error: 'seek' was not declared in this scope
aac_save.c:37:31: warning: invalid conversion from 'FileHandle*' to 'int' [-fpermissive]
aac_save.c:43:62: error: 'seek' was not declared in this scope
aac_save.c:44:37: warning: invalid conversion from 'FileHandle*' to 'int' [-fpermissive]
aac_save.c:51:16: warning: invalid conversion from 'FileHandle*' to 'int' [-fpermissive]
aac_save.c: In function 'int OpenWrFile()':
aac_save.c:73:35: warning: invalid conversion from 'int' to 'FileHandle*' [-fpermissive]
aac_save.c: At global scope:
aac_save.c:91:9: error: expected constructor, destructor, or type conversion before '(' token
aac_save.c:95:1: error: expected unqualified-id before '{' token

Last edited by emufan; 25 October 2013 at 21:53.
emufan is offline  
Old 25 October 2013, 22:39   #4
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Well here are the assembly parts
Code:
grep -n asm *
aap_body.c:106:#asm
aap_body.c:428:#endasm
aap_dlta.c:103:#asm
aap_dlta.c:104:; unvscomp.asm       Copyright 1987 Dancing Flame all rights reserved.
aap_dlta.c:499:#endasm
aap_play.c:284:#asm
aap_play.c:307:#endasm
Yes, I was refering to Intuition/Screen and stuff as Amiga UI.
I can compile
Code:
gcc -I/usr/local/amiga/m68k-amigaos/sys-include/ -c aap_main.c
gcc -I/usr/local/amiga/m68k-amigaos/sys-include/ -c aap_body.c
gcc -I/usr/local/amiga/m68k-amigaos/sys-include/ -c aap_dlta.c
aap_main gives a lot of warnings, but all three .o are produced. Now, linking is out of the question cause a lot of amiga specific stuff

Code:
gcc -o foo aap_body.o aap_dlta.o aap_main.o 
aap_body.o: In function `BodyToBitMap':
aap_body.c:(.text+0x164): undefined reference to `BdyUnpack'
aap_body.c:(.text+0x1c8): undefined reference to `BdyUnpack'
aap_dlta.o: In function `DeltaUnpack':
aap_dlta.c:(.text+0xfe): undefined reference to `decode_plane'
aap_main.o: In function `WaitSwap':
aap_main.c:(.text+0x79): undefined reference to `WaitTOF'
aap_main.c:(.text+0x133): undefined reference to `LoadView'
aap_main.c:(.text+0x161): undefined reference to `WaitTOF'
aap_main.c:(.text+0x17f): undefined reference to `WaitTOF'
aap_main.o: In function `StopVBLANCServer':
aap_main.c:(.text+0x507): undefined reference to `RemIntServer'
aap_main.o: In function `StartVBLANCServer':
aap_main.c:(.text+0x568): undefined reference to `AAP_VBLANC'
aap_main.c:(.text+0x572): undefined reference to `GetA4'
aap_main.c:(.text+0x5a3): undefined reference to `AddIntServer'
aap_main.o: In function `OpenMaxBitMap':
aap_main.c:(.text+0x5c6): undefined reference to `AllocMem'
aap_main.c:(.text+0x65b): undefined reference to `AllocMem'
aap_main.o: In function `AllocIntuiView':
aap_main.c:(.text+0x7c6): undefined reference to `OpenScreen'
aap_main.o: In function `RemakeIntuiView':
aap_main.c:(.text+0x8f8): undefined reference to `MakeScreen'
aap_main.o: In function `AllocMyView':
aap_main.c:(.text+0x928): undefined reference to `GetColorMap'
aap_main.c:(.text+0x9dc): undefined reference to `InitVPort'
aap_main.c:(.text+0xa37): undefined reference to `InitView'
aap_main.c:(.text+0xa7f): undefined reference to `LoadView'
aap_main.o: In function `RemakeMyView':
aap_main.c:(.text+0xaf7): undefined reference to `FreeCprList'
aap_main.c:(.text+0xb2d): undefined reference to `FreeCprList'
aap_main.c:(.text+0xb48): undefined reference to `FreeVPortCopLists'
aap_main.c:(.text+0xd58): undefined reference to `MakeVPort'
aap_main.c:(.text+0xd67): undefined reference to `MrgCop'
aap_main.o: In function `ScrollMyView':
aap_main.c:(.text+0xe36): undefined reference to `FreeCprList'
aap_main.c:(.text+0xe6c): undefined reference to `FreeCprList'
aap_main.c:(.text+0xe87): undefined reference to `FreeVPortCopLists'
aap_main.c:(.text+0x1087): undefined reference to `MakeVPort'
aap_main.c:(.text+0x1096): undefined reference to `MrgCop'
aap_main.c:(.text+0x10d7): undefined reference to `LoadView'
aap_main.o: In function `CloseMaxBitMap':
aap_main.c:(.text+0x1135): undefined reference to `FreeMem'
aap_main.c:(.text+0x1161): undefined reference to `FreeMem'
aap_main.o: In function `FreeMyView':
aap_main.c:(.text+0x118b): undefined reference to `LoadView'
aap_main.c:(.text+0x11c4): undefined reference to `FreeCprList'
aap_main.c:(.text+0x11f2): undefined reference to `FreeCprList'
aap_main.c:(.text+0x1282): undefined reference to `CloseScreen'
aap_main.c:(.text+0x129f): undefined reference to `FreeVPortCopLists'
aap_main.c:(.text+0x12bf): undefined reference to `FreeColorMap'
aap_main.o: In function `DispFrameSeq':
aap_main.c:(.text+0x179b): undefined reference to `BigMemset'
aap_main.c:(.text+0x189a): undefined reference to `LongMemcpy'
aap_main.o: In function `G_Open':
aap_main.c:(.text+0x1a89): undefined reference to `Open'
aap_main.o: In function `G_Close':
aap_main.c:(.text+0x1ad8): undefined reference to `Close'
aap_main.o: In function `G_Seek':
aap_main.c:(.text+0x1b30): undefined reference to `Seek'
aap_main.c:(.text+0x1b52): undefined reference to `Seek'
aap_main.o: In function `G_Seek_Rel':
aap_main.c:(.text+0x1b8b): undefined reference to `Seek'
aap_main.o: In function `G_Read':
aap_main.c:(.text+0x1bce): undefined reference to `Read'
aap_main.o: In function `GC_Read':
aap_main.c:(.text+0x1c1b): undefined reference to `Read'
aap_main.o: In function `SearchMaxFrame':
aap_main.c:(.text+0x1e00): undefined reference to `AllocMem'
aap_main.c:(.text+0x1e4e): undefined reference to `AllocMem'
aap_main.c:(.text+0x1e9c): undefined reference to `AllocMem'
aap_main.o: In function `AddFrameList':
aap_main.c:(.text+0x1f43): undefined reference to `AllocMem'
aap_main.o: In function `AddFile':
aap_main.c:(.text+0x26b6): undefined reference to `AllocMem'
aap_main.o:aap_main.c:(.text+0x277b): more undefined references to `AllocMem' follow
aap_main.o: In function `ExamineArgFile':
aap_main.c:(.text+0x370c): undefined reference to `FreeMem'
aap_main.o: In function `PlayScriptList':
aap_main.c:(.text+0x38b8): undefined reference to `WaitTOF'
aap_main.c:(.text+0x38ee): undefined reference to `WaitTOF'
aap_main.o: In function `InitPrefs':
aap_main.c:(.text+0x39f2): undefined reference to `AllocMem'
aap_main.c:(.text+0x3a36): undefined reference to `GetPrefs'
aap_main.c:(.text+0x3a4c): undefined reference to `AllocMem'
aap_main.o: In function `GetWbenchArgs':
aap_main.c:(.text+0x3a96): undefined reference to `WBenchMsg'
aap_main.c:(.text+0x3ad2): undefined reference to `CurrentDir'
aap_main.c:(.text+0x3af4): undefined reference to `WBenchMsg'
aap_main.o: In function `FreeLabelList':
aap_main.c:(.text+0x3b3c): undefined reference to `FreeMem'
aap_main.o: In function `FreeScriptList':
aap_main.c:(.text+0x3b81): undefined reference to `FreeMem'
aap_main.o: In function `FreeAnimList':
aap_main.c:(.text+0x3be4): undefined reference to `FreeMem'
aap_main.c:(.text+0x3c20): undefined reference to `FreeMem'
aap_main.c:(.text+0x3c36): undefined reference to `FreeMem'
aap_main.o:aap_main.c:(.text+0x3cbd): more undefined references to `FreeMem' follow
aap_main.o: In function `cleanup':
aap_main.c:(.text+0x3d87): undefined reference to `ClearPointer'
aap_main.c:(.text+0x3d9b): undefined reference to `CloseWindow'
aap_main.c:(.text+0x3dcb): undefined reference to `FreeMem'
aap_main.c:(.text+0x3dfb): undefined reference to `FreeMem'
aap_main.c:(.text+0x3e2b): undefined reference to `CloseScreen'
aap_main.c:(.text+0x3e56): undefined reference to `CloseLibrary'
aap_main.c:(.text+0x3e76): undefined reference to `CloseLibrary'
aap_main.o: In function `GoodBye':
aap_main.c:(.text+0x3ee7): undefined reference to `DisplayBeep'
aap_main.o: In function `main':
aap_main.c:(.text+0x4152): undefined reference to `OpenLibrary'
aap_main.c:(.text+0x4199): undefined reference to `OpenLibrary'
aap_main.c:(.text+0x4206): undefined reference to `OpenWindow'
aap_main.c:(.text+0x42e1): undefined reference to `SetPointer'
aap_main.c:(.text+0x4308): undefined reference to `Forbid'
aap_main.c:(.text+0x4317): undefined reference to `Permit'
collect2: ld returned 1 exit status
alkis is offline  
Old 25 October 2013, 23:13   #5
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
AAP is the player, I was looking into the AAC(onverter) - the following files only:
aac_main.c , aac_save.c and aap_glob.c. only c-source what i can see.
aac_main.c also includes aac_play.c (player routine for the converter), but this is not really needed. so i skiped that.

UI is not really a concern for the converter i think. so just skip these parts. thanks for looking into it.

edit: for the endianess problem, there is aros with some functions/routines, no clue if that is usefull for calculated values or just static definitions. but something exists already


edit: i'm using gcc 4.7.3 cygwin based, i guess your compiler is 2.9 something? i guess this would help with the older source.

edit: fixing example from acc_save.c - not sure about file mode stuff - trial & error ... :
Code:
  g_wr_fh = Open(filename, MODE_NEWFILE);
  if (g_wr_fh == NULL)  GoodBye(g_OpenErr, filename);
went into:
Code:
  g_wr_fh = open(filename, O_CREAT);
  if (g_wr_fh == NULL)  
  {
  printf("Cannot open output file: %s%s\n", strerror(g_OpenErr), strerror(filename));
  }

Last edited by emufan; 25 October 2013 at 23:45.
emufan is offline  
Old 26 October 2013, 12:14   #6
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
That's the compiler I use:
gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

It might be easier to put wrappers in a new file (say cross.c) like
(untested code follows, just proof of concept)
Code:
BPTR Open(char *filename, int accessmode)
{
   switch(accessmode) {
        case MODE_NEWFILE:
             return (BPTR) open(filename, O_CREAT);
        case MODE_OLDFILE: //or whatever the enum is
             return (BPTR) open(filename, O_RDONLY);
        ...
   }
}
the benefit of it being, you don't have to make 10 changes in the code (if the Open appears 10 times).
alkis is offline  
Old 27 October 2013, 19:53   #7
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
thats cool. thanks for this hint
emufan is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need An IFF/8SVX and an IFF/ANIM Player for PC searcher request.Apps 24 02 July 2020 12:09
animated gif to anim iff otro request.Apps 6 17 April 2018 01:04
aegis animator scripts to iff (anim) atonal support.Apps 12 15 July 2013 00:04
Iff Anim 0/1/2/4 ami_stuff Coders. General 5 07 March 2012 22:32
IFF Anim Format Echo Amiga scene 10 16 February 2003 05:16

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07343 seconds with 13 queries