|
Re: Porting to AmigaOS4 thread |
Posted on: 2/16 22:19
#21 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 2:21
#22 |
---|---|---|
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 |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 8:33
#23 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 9:31
#24 |
---|---|---|
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. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 11:41
#25 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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
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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 11:53
#26 |
---|---|---|
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". |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 13:22
#27 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/17 13:54
#28 |
---|---|---|
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. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/23 8:45
#29 |
---|---|---|
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 |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/23 10:15
#30 |
---|---|---|
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 *fp, long ofs)
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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/23 16:04
#31 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/11/30 11:30 From Finland
Posts: 1690
|
@NoCache
Quote:
Just link the program with -lunix. By default lseek() will only allow seeking up to EOF, just like AmigaDOS. Enabling UNIX semantics changes this. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/25 12:22
#32 |
---|---|---|
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
|
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/26 12:37
#33 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/26 19:20
#34 |
---|---|---|
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? |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/27 7:37
#35 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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*)
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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/27 11:57
#36 |
---|---|---|
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.
|
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2/27 15:12
#37 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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. |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 3/1 11:09
#38 |
---|---|---|
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
|
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 3/1 23:26
#39 |
---|---|---|
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. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 3/22 19:26
#40 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a story that hasn't been written yet
Posts: 3547
|
@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. |
||