English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 10 December 2017, 16:42   #181
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
There is a reference to AslBase in libauto.a under the MorphOS host but adding -lauto doesn't seem to help.
grelbfarlk is offline  
Old 10 December 2017, 16:45   #182
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by grelbfarlk View Post
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.
Marlon_ is offline  
Old 11 December 2017, 00:33   #183
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
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

Last edited by grelbfarlk; 11 December 2017 at 01:36.
grelbfarlk is offline  
Old 11 December 2017, 02:27   #184
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by grelbfarlk View Post
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!
Marlon_ is offline  
Old 11 December 2017, 08:12   #185
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,994
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
Hedeon is offline  
Old 11 December 2017, 22:47   #186
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by Hedeon View Post
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

Last edited by grelbfarlk; 11 December 2017 at 23:23.
grelbfarlk is offline  
Old 12 December 2017, 00:29   #187
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Ok... so it compiled. I do not agree with the color choices in your program.

grelbfarlk is offline  
Old 12 December 2017, 02:23   #188
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
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.
grelbfarlk is offline  
Old 12 December 2017, 09:12   #189
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by grelbfarlk View Post
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_ is offline  
Old 12 December 2017, 09:41   #190
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
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_ is offline  
Old 12 December 2017, 11:30   #191
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,994
See gcc-wos4mos on Aminet.


Quote:
Originally Posted by Marlon_ View Post
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 is offline  
Old 12 December 2017, 11:32   #192
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by Hedeon View Post
See gcc-wos4mos on Aminet.
Unfortunately Aminet seems to be down for the moment.
Marlon_ is offline  
Old 12 December 2017, 13:06   #193
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by Marlon_ View Post
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.
grelbfarlk is offline  
Old 12 December 2017, 13:09   #194
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by grelbfarlk View Post
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.
Marlon_ is offline  
Old 12 December 2017, 13:31   #195
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by Marlon_ View Post
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.
grelbfarlk is offline  
Old 12 December 2017, 20:40   #196
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
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.
Marlon_ is offline  
Old 13 December 2017, 02:28   #197
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,994
Quote:
Originally Posted by Marlon_ View Post
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.
Hedeon is offline  
Old 13 December 2017, 02:42   #198
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by Hedeon View Post
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.

Last edited by Marlon_; 13 December 2017 at 02:56.
Marlon_ is offline  
Old 13 December 2017, 03:06   #199
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
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_ is offline  
Old 13 December 2017, 04:00   #200
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Elf2exe2 usage:
./elf2exe2 file.elf file.hunk

Exactly the same way elf2hunk works.

So it should work just the same with warpcollect.
Marlon_ 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
Sdl-1.2.15 Marlon_ Coders. C/C++ 40 13 March 2018 14:43
UAE for WarpOS 0.8.12 grelbfarlk request.Apps 0 23 November 2016 01:14
WarpOS Programming Help? esc support.Other 8 21 October 2015 10:37
WinUAE w/SDL mangamuscle request.UAE Wishlist 8 31 January 2007 11:41
What do you know about Amiga SDL? Tolismlf Amiga scene 6 15 November 2004 18:54

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 18:19.

Top

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