Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
101 user(s) are online (90 user(s) are browsing Forums)

Members: 0
Guests: 101

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 (2) 3 4 5 ... 9 »


Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
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

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2196
@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

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@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.

   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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.

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@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".

   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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?

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@Raziel

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

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

   Report Go to top

Re: Porting to AmigaOS4 thread
Just popping in
Joined:
12/16 8:42
From Czech Republic
Posts: 53
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.


   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2013/10/17 15:21
From Hungary
Posts: 601
@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
_________________
I see the jimmies have been rustled.
   Report Go to top

Re: Porting to AmigaOS4 thread
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@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.

   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/2/27 10:47
From Gravity well
Posts: 654
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
   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@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?

   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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?

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/2/27 10:47
From Gravity well
Posts: 654
I probably have nightmares about editing configure scripts. Cmake is better, but not by much.

   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@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

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@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
   Report Go to top

Re: Porting to AmigaOS4 thread
Quite a regular
Joined:
2007/2/27 10:47
From Gravity well
Posts: 654
@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.

   Report Go to top

Re: Porting to AmigaOS4 thread
Home away from home
Joined:
2006/11/26 21:45
From a story that hasn't been written yet
Posts: 3550
@Capehill

Just to wrap it up here aswell.

Thanks for the steps, working now

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr.
   Report Go to top


« 1 (2) 3 4 5 ... 9 »



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project