Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
144 user(s) are online (100 user(s) are browsing Forums)

Members: 1
Guests: 143

imagodespira, more...

Support us!

Headlines

 
  Register To Post  

« 1 (2) 3 4 5 ... 22 »
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
I know about that ordering issue and fixed a few problems myself with the help of said guide.

Unfortunately that's not the cure for this problem

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Raziel

BSzili is correct, SdlAudioCDManager is part of ScummVM itself. So it's not a case of missing libraries. Is the makefile not building that part? Maybe the configuration script messed up.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Hans

Yes, i'm searching for the reason now,b ut so far no change does anything to cure it.


Though i found an oddity, while the SDL2 stuff is installed in local/newlib/include, SDL1 is in local/common/include.

Could that maybe be it?
It tries to pick it up from another place?

edit: Nope, makes no difference

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

Have you tried to clean the build? You can also check if you have sdl-audiocd.o in the build dir and its content (with "nm"). If file doesn't have symbols, remove it and compile again. Possibly some dependency is not working properly when you are switching between SDL versions. I had to deal with similar issues earlier and I had to remove manually some object files to sort it out.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

Thank you, i learned something new today

There is an object file, but it hasn't been updated since August 2017, so it's not getting picked up at all while compiling, it seems.
Also:
U SDL_CDClose
         U SDL_CDOpen
         U SDL_CDPlayTracks
         U SDL_CDStatus
         U SDL_CDStop
         U SDL_GetError
         U SDL_GetTicks
         U SDL_InitSubSystem
         U _Z7warningPKcz
0000014c T _ZN17SdlAudioCDManager4openEv
00000390 T _ZN17SdlAudioCDManager4playEiiiib
00000330 T _ZN17SdlAudioCDManager4stopEv
000002b4 T _ZN17SdlAudioCDManager5closeEv
000001cc T _ZN17SdlAudioCDManager6openCDEi
00000620 T _ZN17SdlAudioCDManager6updateEv
00000000 T _ZN17SdlAudioCDManagerC1Ev
00000000 T _ZN17SdlAudioCDManagerC2Ev
0000010c T _ZN17SdlAudioCDManagerD0Ev
000000a4 T _ZN17SdlAudioCDManagerD1Ev
000000a4 T _ZN17SdlAudioCDManagerD2Ev
         U _ZN21DefaultAudioCDManager10openRealCDEv
         U _ZN21DefaultAudioCDManager10setBalanceEa
         U _ZN21DefaultAudioCDManager4openEv
         U _ZN21DefaultAudioCDManager4playEiiiib
         U _ZN21DefaultAudioCDManager4stopEv
         U _ZN21DefaultAudioCDManager5closeEv
00000000 W _ZN21DefaultAudioCDManager6openCDERKN6Common6StringE
         U _ZN21DefaultAudioCDManager6updateEv
         U _ZN21DefaultAudioCDManager9setVolumeEh
         U _ZN21DefaultAudioCDManagerC2Ev
         U _ZN21DefaultAudioCDManagerD2Ev
00000560 T _ZNK17SdlAudioCDManager9isPlayingEv
         U _ZNK21DefaultAudioCDManager9getStatusEv
         U _ZNK21DefaultAudioCDManager9isPlayingEv
00000000 V _ZTI17SdlAudioCDManager
         U _ZTI21DefaultAudioCDManager
00000000 V _ZTS17SdlAudioCDManager
00000000 V _ZTV17SdlAudioCDManager
         U _ZTVN10__cxxabiv120__si_class_type_infoE
         U _ZdlPv


There is a lot of DefaultAudioCDManager in there (that's the one from SDL2 iiuc), but only three instances of SDLAudioCDManager.
I don't know how it should look like if it's correct, but obviously the file is too old or even mixed with two SDL versions.

Unfortunately removing that object file, doesn't make it being created new

I also keep forgetting about "clean", thank you for reminding me, will try that next.

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

Additional tip: you can "demangle" the C++ symbols. Try with "nm -C file.o" and output should become more clear.

Or you could pipe the "nm" output for "c++filt".

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

Even after a clean sdlaudiocd is not built (no objects file)

Need to find the list of objects file, maybe i can add it manually to the build process?

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

https://github.com/scummvm/scummvm/blo ... 5/backends/module.mk#L150

Double-check that you don't have USE_SDL2 enabled.

Go to top
Re: Porting to AmigaOS4 thread
Just popping in
Just popping in


See User information
Any idea how to deal with lseek() method?
I need to offset filepointer by bytes to create new file with specific amount in size but the lseek result ends up with -1.

If I don't specify offset bytes, the file is created correctly but the size is incorrect as it needs to be

this is from lseek() method specs:
Quote:
The lseek() function allows the file offset to be set beyond the end of
the existing end-of-file of the file. If data is later written at this
point, subsequent reads of the data in the gap return bytes of zeros
(until data is actually written into the gap).

Some devices are incapable of seeking. The value of the pointer associ-
ated with such a device is undefined.


Go to top
Re: Porting to AmigaOS4 thread
Quite a regular
Quite a regular


See User information
@NoCache
I ended up creating my own wrapper function to do this:
void fseek_mos(FILE *fplong ofs)
{
    
long cpos ftell(fp);
    
    if (
cpos == ofs)
    {
        return;
    }
    else if (
cpos ofs)
    {
        
fseek(fpofsSEEK_SET);
    }
    else
    {
        
fseek(fp0SEEK_END);
        
        
cpos ftell(fp);
        
        if (
cpos == ofs)
        {
            return;
        }
        else if (
cpos ofs)
        {
            
fseek(fpofsSEEK_SET);
        }
        else
        {    
            
long i;
            
long diff ofs cpos;
            
            for (
0diffi++)
            {
                
fputc(0fp);
            }
        }
    }
}

The fputc loop could be replaced with fwrite, but I wrote this as a quick workaround for NX Engine.

Edit: I just noticed that my example uses FILE pointers, but it can be rewritten to use lseek/write for file descriptors. I have a version for C++ iostreams too that I used in Arx Libertatis.


Edited by BSzili on 2019/2/23 15:46:48
This is just like television, only you can see much further.
Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@NoCache

Quote:

Any idea how to deal with lseek() method?
I need to offset filepointer by bytes to create new file with specific amount in size but the lseek result ends up with -1.


Just link the program with -lunix. By default lseek() will only allow seeking up to EOF, just like AmigaDOS. Enabling UNIX semantics changes this.

Go to top
Re: Porting to AmigaOS4 thread
Quite a regular
Quite a regular


See User information
Apparently I had to comment out the line in SDK:newlib/include/math.h (I'm not saying you should!) that begins #define log2x(x) , in order to compile. If the end result seems to work, you'll see it at the friendly software distribution site soon.

edit: Done linking but program fails right at the start.


Edited by Thematic on 2019/2/25 16:33:36
Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

I did the double check and i completely removed that part of code AND amended the sdl-audiocd.o that was missing, but then the error simply changes towards a missing reference from the default-audiocd.o.

It's stupid, illogical and i'm lost

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

Did you reconfigure ScummVM for SDL1 or how is it supposed to be done? Can you send/paste (s)git diff about the changes?

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

Yes, i did a reconfigure. It always picked up SDL2, no matter what i tried and ended up with changing a line in configure so it finally used SDL1, but i guess that isn't enough.

I added this line temporarily:
add_line_to_config_mk "USE_SDL2 = 0"

to configure after line 2478

amigaos*)
        
append_var LDFLAGS "-Wl,--export-dynamic"
        
append_var LDFLAGS "-L/sdk/local/newlib/lib"
        
# We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32
        # as (unsigned) long, and consequently we'd get a compiler error otherwise.
        
type_4_byte='long'
        
# Supress format warnings as the long 4 byte causes noisy warnings.
        
append_var CXXFLAGS "-Wno-format"
--> here
        add_line_to_config_mk 
'AMIGAOS = 1'
        
_port_mk="backends/platform/sdl/amigaos/amigaos.mk"
        
;;

Which makes configure use (or at least it says so) SDL1.2.13, but maybe i have to change something else at another place as well?

Go to top
Re: Porting to AmigaOS4 thread
Quite a regular
Quite a regular


See User information
I probably have nightmares about editing configure scripts. Cmake is better, but not by much.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Thematic

Heh, i slowly start to getting the hang of it.

CMake (makefiles) is too different and i keep ripping them apart and creating a "normal" makefile out of it.

Were you able to work with CMake on AmigaOS4?

I haven't tried for some time but iirc it broke (crashed?) in the configuration process back when i tried to use it

Go to top
Re: Porting to AmigaOS4 thread
Just can't stay away
Just can't stay away


See User information
@Raziel

1) I fetched the latest ScummVM sources from master, built it with my old configuration and it is using SDL2.

2) Since I couldn't find a configure switch to use SDL1, I hacked config.mk, commenting out whole "USE_SDL2= " line.

3) Then I modified include and linker line for SDL1 in config.mk.

4) Make clean + make

5) There was some compiler error regarding Image::writePNG - I simply removed USE_PNG temporarily because have no time to investigate that (could be my GCC4 or something else).

6) I also removed SDL_NET usage but just because I don't have the SDK installed currently.

Please try steps 1-4.


Edited by Capehill on 2019/3/1 11:46:41
Go to top
Re: Porting to AmigaOS4 thread
Quite a regular
Quite a regular


See User information
@Raziel

Common problem with both systems is that a library check fails. I must have tried to force a configure script to accept one, but do not remember success and would not try it again. But for cmake it's pretty simple, even if the -i(nteractive) doesn't quite do it.

Go to top
Re: Porting to AmigaOS4 thread
Home away from home
Home away from home


See User information
@Capehill

Just to wrap it up here aswell.

Thanks for the steps, working now

Go to top

  Register To Post
« 1 (2) 3 4 5 ... 22 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project