English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. C/C++ (https://eab.abime.net/forumdisplay.php?f=118)
-   -   WarpOS version of SDL (https://eab.abime.net/showthread.php?t=88760)

grelbfarlk 10 December 2017 16:42

There is a reference to AslBase in libauto.a under the MorphOS host but adding -lauto doesn't seem to help.

Marlon_ 10 December 2017 16:45

Quote:

Originally Posted by grelbfarlk (Post 1205202)
There is a reference to AslBase in libauto.a under the MorphOS host but adding -lauto doesn't seem to help.



Are you sure -noixemul is defined? I suppose you used ppc-amigaos configuration in the makefile, which is missing that.

grelbfarlk 11 December 2017 00:33

Yeah I've set -noixemul, to no effect.
I transferred everything over to the A4000 in case somehow it was grabbing things from the Morphos osinclude or something, it's basically the same. Here's where I'm at now:

Code:

AslRequester.o(.text+0x3f4): undefined reference to `AllocAslRequestTags(unsigned long, unsigned long,...)'
AslRequester.o(.text+0x40c): undefined reference to `AslRequestTags(void *, unsigned long,...)'

I've tried including everything under the sun, those appear in libamiga.a on the A4000 in the 68k lib folder but adding -lamiga doesn't seem to help either. I think I need to call in my WarpOS expert. Steve House.

Also this is what I changed which has not been cleaned up yet:

Code:

#include "AslRequester.h"

#include <stdio.h>
#ifdef WARPOS
#pragma pack(2)
#endif

#ifndef WARPOS
#include <proto/exec.h>
#include <proto/asl.h>
#include <proto/dos.h>
#endif

struct AslIFace *IAsl;
#define MAX_DOS_PATH 260
#ifdef WARPOS
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/powerpc.h>
#include <proto/asl.h>
extern struct Library *AslBase;
#pragma pack()

#endif


Marlon_ 11 December 2017 02:27

Quote:

Originally Posted by grelbfarlk (Post 1205315)
Yeah I've set -noixemul, to no effect.
I transferred everything over to the A4000 in case somehow it was grabbing things from the Morphos osinclude or something, it's basically the same. Here's where I'm at now:

Code:

AslRequester.o(.text+0x3f4): undefined reference to `AllocAslRequestTags(unsigned long, unsigned long,...)'
AslRequester.o(.text+0x40c): undefined reference to `AslRequestTags(void *, unsigned long,...)'

I've tried including everything under the sun, those appear in libamiga.a on the A4000 in the 68k lib folder but adding -lamiga doesn't seem to help either. I think I need to call in my WarpOS expert. Steve House.

Also this is what I changed which has not been cleaned up yet:

Code:

#include "AslRequester.h"

#include <stdio.h>
#ifdef WARPOS
#pragma pack(2)
#endif

#ifndef WARPOS
#include <proto/exec.h>
#include <proto/asl.h>
#include <proto/dos.h>
#endif

struct AslIFace *IAsl;
#define MAX_DOS_PATH 260
#ifdef WARPOS
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/powerpc.h>
#include <proto/asl.h>
extern struct Library *AslBase;
#pragma pack()

#endif


This shit is super weird. Keep notes of all this until I merge everything with my sources!

Hedeon 11 December 2017 08:12

You can't use 68k libs as the PPC can't jump to 68k code directly. Can't use MorphOS libs due to ABI and API differences.

You have a correct proto/asl.h for WarpOS?

Steve House

grelbfarlk 11 December 2017 22:47

Quote:

Originally Posted by Hedeon (Post 1205341)
You can't use 68k libs as the PPC can't jump to 68k code directly. Can't use MorphOS libs due to ABI and API differences.

You have a correct proto/asl.h for WarpOS?

Steve House

No I don't think so. Made sure it's going to os-includeppc and it gives the AslBase undefined reference that I got earlier.

Ok Steve fixed it.
struct AslIFace *IAsl =;
struct Library *AslBase = NULL;

Assuming because we don't have libauto this was necessary. Now just some missing functions which I'll try to piece together tonight which are:
expf
cosf
sinf

grelbfarlk 12 December 2017 00:29

Ok... so it compiled. I do not agree with the color choices in your program. :p

https://i.imgur.com/mxZihrt.png

grelbfarlk 12 December 2017 02:23

Looks correct on a BE screen. Doesn't seem to want to go fullscreen. I guess it's using the SDL audio driver instead of the AHI one, not sure which would be better. Sound is kinda bad. Looks like it's using 16-bit audio by default. File requester doesn't work when I hit open it says failed to allocate file requestor.

Marlon_ 12 December 2017 09:12

Quote:

Originally Posted by grelbfarlk (Post 1205527)
Looks correct on a BE screen. Doesn't seem to want to go fullscreen. I guess it's using the SDL audio driver instead of the AHI one, not sure which would be better. Sound is kinda bad. Looks like it's using 16-bit audio by default. File requester doesn't work when I hit open it says failed to allocate file requestor.

Which SDL version is this? It's always used SDL-audio. SDL-audio goes through AHI.

You need to change audio settings in the program under config. It by default tries to play 48.000Hz playback and minimal buffer. Changing it to 44.100Hz should probably make it better.

The file requester is Asl, which is part of AmigaOS api, so you did not fix that part. :P

Atleast it's getting closer to working as it should. At the moment it's hardcoded to run in 16bit graphics mode, which could be the reason for the weird graphics. You can change that inside src/tracker/sdl-1.2/CGX_main.cpp in the main function.

Marlon_ 12 December 2017 09:41

Hmm, I'm curious if I could use the MorphOS cross-toolchain to build WarpOS binaries. Like if I get the proper includes and libs for WarpOS, wouldn't it technically work? Or does the compiler itself do some 68k-PPC mixing when compiling? Maybe worth a try? :)

Hedeon 12 December 2017 11:30

See gcc-wos4mos on Aminet.


Quote:

Originally Posted by Marlon_ (Post 1205555)
Hmm, I'm curious if I could use the MorphOS cross-toolchain to build WarpOS binaries. Like if I get the proper includes and libs for WarpOS, wouldn't it technically work? Or does the compiler itself do some 68k-PPC mixing when compiling? Maybe worth a try? :)


Marlon_ 12 December 2017 11:32

Quote:

Originally Posted by Hedeon (Post 1205570)
See gcc-wos4mos on Aminet.

Unfortunately Aminet seems to be down for the moment.

grelbfarlk 12 December 2017 13:06

Quote:

Originally Posted by Marlon_ (Post 1205551)
Which SDL version is this? It's always used SDL-audio. SDL-audio goes through AHI.

You need to change audio settings in the program under config. It by default tries to play 48.000Hz playback and minimal buffer. Changing it to 44.100Hz should probably make it better.

The file requester is Asl, which is part of AmigaOS api, so you did not fix that part. :P

Atleast it's getting closer to working as it should. At the moment it's hardcoded to run in 16bit graphics mode, which could be the reason for the weird graphics. You can change that inside src/tracker/sdl-1.2/CGX_main.cpp in the main function.

I was just confused by the AudioDriver_AHI.cpp. SDL is 1.2.6.

If I force a BE screenmode the colors are correct.

As Hedeon says below, get his package from Aminet and drop it in gg:
Add -warpup to CFLAGS and LDFLAGS and that's pretty much it.

Marlon_ 12 December 2017 13:09

Quote:

Originally Posted by grelbfarlk (Post 1205583)
I was just confused by the AudioDriver_AHI.cpp. SDL is 1.2.6.

If I force a BE screenmode the colors are correct.

As Hedeon says below, get his package from Aminet and drop it in gg:
Add -warpup to CFLAGS and LDFLAGS and that's pretty much it.

AudioDriver_AHI.cpp is not finished, it's not compiled at the moment.

Have you tried compiling this for WarpOS?: https://github.com/AmigaPorts/libSDL12

It's SDL-1.2.15 for Amiga platforms.

I'm going to mess with Hedeon's package and see if I can set up a Linux cross-compiler with it.

grelbfarlk 12 December 2017 13:31

Quote:

Originally Posted by Marlon_ (Post 1205584)
AudioDriver_AHI.cpp is not finished, it's not compiled at the moment.

Have you tried compiling this for WarpOS?: https://github.com/AmigaPorts/libSDL12

It's SDL-1.2.15 for Amiga platforms.

I'm going to mess with Hedeon's package and see if I can set up a Linux cross-compiler with it.

Yes actually I tried that last night, it was about the same. Voodoo on Mediator really prefer LE modes and Radeon doesn't support BE at all. Voodoo 3 does BE/LE but Voodoo 4 only does LE. So I've got to look at how to switch that.

Marlon_ 12 December 2017 20:40

Quote:

Originally Posted by Hedeon-Aminet
If the Elf2Exe2 source can be supplied, any host with target ppc-morphos could compile also for WarpOS.

Isn't elf2exe2 just elf2hunk? I'll do some experiments and see what I come up with.

Hedeon 13 December 2017 02:28

Quote:

Originally Posted by Marlon_ (Post 1205683)
Isn't elf2exe2 just elf2hunk? I'll do some experiments and see what I come up with.

Good luck.

Elf2exe2 needs warpcollect to convert output of gcc to input for elf2exe2. Maybe elf2hunk doesn't need that and can be called directly. Anyway, see specs file.

Too bad they removed that functionality with gcc 4.6 I think.

Marlon_ 13 December 2017 02:42

Quote:

Originally Posted by Hedeon (Post 1205743)
Good luck.

Elf2exe2 needs warpcollect to convert output of gcc to input for elf2exe2. Maybe elf2hunk doesn't need that and can be called directly. Anyway, see specs file.

Too bad they removed that functionality with gcc 4.6 I think.

As far as I understand from my research, all Elf2exe2 is doing is the same Elf2hunk does.

I found this here:
Quote:

The spec strings built into GCC can be overridden by using the -specs= command-line switch to specify a spec file.
Code:

[marlon@hastur]:~/tmp/MilkyTracker/morphos-cross-toolchain$ ppc-morphos-gcc -v
Using built-in specs.
COLLECT_GCC=ppc-morphos-gcc
COLLECT_LTO_WRAPPER=/opt/ppc-morphos/bin/../lib/gcc-lib/ppc-morphos/5.3.0/lto-wrapper
Target: ppc-morphos
Configured with: ../gcc-5.3.0/configure --target=ppc-morphos --enable-languages=c,c++,objc --prefix=/gg --with-sysroot=/gg --libexecdir=/gg/lib --oldincludedir=/gg/include --program-prefix=ppc-morphos- --program-suffix=-5 --enable-threads=morphos --disable-bootstrap --with-pkgversion=GCC/MorphOS --with-bugurl=http://www.morphos-team.net/ --enable-version-specific-runtime-libs --with-gmp=/home/marlon/tmp/MilkyTracker/morphos/gcc5/libs --with-mpfr=/home/marlon/tmp/MilkyTracker/morphos/gcc5/libs --with-mpc=../libs
Thread model: morphos
gcc version 5.3.0 (GCC/MorphOS)
[marlon@hastur]:~/tmp/MilkyTracker/morphos-cross-toolchain/WarpOS$ ppc-morphos-gcc --specs=GG/lib/gcc-lib/ppc-morphos/4.4.5/specs -warpup test.cpp
ppc-morphos-gcc: error trying to exec 'warpcollect': execvp: No such file or directory.


Marlon_ 13 December 2017 03:06

So, yeah, specs files still work:
Code:

[marlon@hastur]:~/tmp/MilkyTracker/morphos-cross-toolchain/WarpOS$ ppc-morphos-gcc -v -warpup test.cpp
Reading specs from /opt/ppc-morphos/bin/../lib/gcc-lib/ppc-morphos/5.3.0/specs
COLLECT_GCC=ppc-morphos-gcc
COLLECT_LTO_WRAPPER=/opt/ppc-morphos/bin/../lib/gcc-lib/ppc-morphos/5.3.0/lto-wrapper
ppc-morphos-gcc: error: unrecognized command line option ‘-warpup’
Target: ppc-morphos
Configured with: ../gcc-5.3.0/configure --target=ppc-morphos --enable-languages=c,c++,objc --prefix=/gg --with-sysroot=/gg --libexecdir=/gg/lib --oldincludedir=/gg/include --program-prefix=ppc-morphos- --program-suffix=-5 --enable-threads=morphos --disable-bootstrap --with-pkgversion=GCC/MorphOS --with-bugurl=http://www.morphos-team.net/ --enable-version-specific-runtime-libs --with-gmp=/home/marlon/tmp/MilkyTracker/morphos/gcc5/libs --with-mpfr=/home/marlon/tmp/MilkyTracker/morphos/gcc5/libs --with-mpc=../libs
Thread model: morphos
gcc driver version 5.3.0 (GCC/MorphOS) executing gcc version 4.4.5

But I think the format might be different!

Marlon_ 13 December 2017 04:00

Elf2exe2 usage:
./elf2exe2 file.elf file.hunk

Exactly the same way elf2hunk works.

So it should work just the same with warpcollect.


All times are GMT +2. The time now is 14:18.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06266 seconds with 10 queries