English Amiga Board


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

 
 
Thread Tools
Old 04 October 2017, 03:29   #81
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
libSDL_Image_wos.a and libJPEG(_wos).a working. Works with gif and jpeg that I've tried so far, now just to get png.

Had to link in order of -lSDL_Image_wos -ljpeg -lSDL_wos (just so I don't forget this tomorrow).

ppc-amigaos-g++ -warpup -O2 sdltest3.cpp -o SDLrun3-1.elf -lSDL_Image_wos -ljpeg -lSDL_wos

Last edited by grelbfarlk; 04 October 2017 at 03:38.
grelbfarlk is offline  
AdSense AdSense  
Old 04 October 2017, 03:59   #82
Hedeon
Sonnet Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 406
Quote:
Originally Posted by grelbfarlk View Post
libSDL_Image_wos.a and libJPEG(_wos).a working. Works with gif and jpeg that I've tried so far, now just to get png.

Had to link in order of -lSDL_Image_wos -ljpeg -lSDL_wos (just so I don't forget this tomorrow).

ppc-amigaos-g++ -warpup -O2 sdltest3.cpp -o SDLrun3-1.elf -lSDL_Image_wos -ljpeg -lSDL_wos
And you had to adjust your makefile
Hedeon is offline  
Old 04 October 2017, 05:45   #83
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
libPNG(_wos).a done too and works.
Again, not going to remember this:
ppc-amigaos-g++ -warpup -O2 sdltest3.cpp -o SDLrun3-1.elf -lSDL_Image_wos -lpng -lz -ljpeg -lSDL_wos

Last edited by grelbfarlk; 04 October 2017 at 23:55.
grelbfarlk is offline  
Old 04 October 2017, 22:11   #84
Hedeon
Sonnet Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 406
Quote:
Originally Posted by emufan View Post
ah, ok. can you confirm, it does produce amiga hunk type object files?

Amiga hunk type: sc 3D.c
Code:
00000000  000003e7 00000001  33442e63 000003e8  |........3D.c....|
00000010  00000001 74657874  000003e9 000001f6  |....text........|
gcc object type: gcc -O2 -c 3D.c
Code:
00000000  00020107 00000940  00000000 00000000  |.......@........|
00000010  00000090 00000000  00000040 00000000  |...........@....|
same src code, 1st build with sas/c, 2nd with gcc.
As far as I can see: When set to GCC mode and using Amiga Classic OS as target OS with the PPC link libraries and doing a simple Hello World in C, the object file is in Amiga hunk format. The resulting executable is a WarpOS executable in this case.

HOWEVER:

With PPC it is in Extended hunk format (I see hunk 0x4E9 in the object file, next to 0x3E9, 0x3E8 etc.).
Hedeon is offline  
Old 04 October 2017, 22:43   #85
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,067
that sounds promising. I cannot decipher them, but those 0x3E9, 0x3E8, 0x3E7 ...
are all typical amiga hunk types.
I could imagine, those 0x4E9 were introduced with warpos, but still sort of standard amiga hunk type.

but how to "set to GCC mode". is it a ppc-amigaos-gcc option?
and target "Amiga Classic OS" ? I thought warpup is Classic Amiga, with a ppc extension/co-processor.

Last edited by emufan; 04 October 2017 at 23:16.
emufan is offline  
Old 04 October 2017, 23:16   #86
Hedeon
Sonnet Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 406
Quote:
Originally Posted by emufan View Post
that sounds promising. I cannot deciffer them, but those 0x3E9, 0x3E8, 0x3E7 ...
are all typical amiga hunk types.
I could imagine, those 0x4E9 were introduced with warpos, but still sort of standard amiga hunk type.

but how to "set to GCC mode". is it a ppc-amigaos-gcc option?
and target "Amiga Classic OS" ? I thought warpup is Classic Amiga, with a ppc extension/co-processor.
StormC4 comes with an IDE with a lot of menus with options. You can choose between GCC and StormC3 mode. Amiga Classic OS/PPC Native/something i forgot.

So yes, warpup is in this case Classic Amiga with a ppc extension.
Hedeon is offline  
Old 04 October 2017, 23:23   #87
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,067
Quote:
Originally Posted by Hedeon View Post
StormC4 comes with an IDE...
ah, allright, I forgot the IDE. makes sense now
emufan is offline  
Old 06 October 2017, 00:39   #88
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Any recommended version of SDL_Mixer? 1.2.5? Or any version of libOGG and libVorbis?

1.2.4 compiled and Playwav works, actually worked with one of the Wavs I made out of Amidi from HOMM2 midis 10+MB at 16-bit audio.

Trying to figure out why Playmus doesn't work. Pointed it at my Timidity patches which I can see it reading all the .cfgs but then just looks for
MIX_EFFECTSMAXSPEED
MUSIC_CMD


Mods play I guess midi isn't supported by this test program. No idea what's going on.

Last edited by grelbfarlk; 06 October 2017 at 04:45.
grelbfarlk is offline  
Old 07 October 2017, 03:23   #89
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Will get back to SDL_mixer midi stuff later. Hedeon got Truetype working so SDL_ttf works.

Anyone have an SDL game suggestion that should work with a simple compile -lSDL?

Last edited by grelbfarlk; 07 October 2017 at 05:12.
grelbfarlk is offline  
Old 08 October 2017, 16:18   #90
Hedeon
Sonnet Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 406
Quote:
Originally Posted by grelbfarlk View Post
Will get back to SDL_mixer midi stuff later. Hedeon got Truetype working so SDL_ttf works.
And midi too.
Hedeon is offline  
Old 10 October 2017, 01:29   #91
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Xrick works.
grelbfarlk is offline  
Old 12 October 2017, 05:20   #92
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
jetpac "works".
grelbfarlk is offline  
Old 17 October 2017, 05:23   #93
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Working on compiling an application and have some unrecognized symbols:
snprintf
vsnprintf
rmdir
ftruncate
environ
dirname

Which are part of glibc and not in the version we have already.
Using one of the libnix compiles the community has developed I was able to piece together snprintf and vsnprintf and link in the compile which no longer complains. But the rest don't seem to work or are not in libnix. Any general advice on how to compile glibc 2.2.5 for an unknown architecture?

I would continue with the available libnix ports but they don't seem to have ftruncate.
grelbfarlk is offline  
Old 20 October 2017, 04:30   #94
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
If anyone has an idea how to contact Jarmo Laakkonen we'd really like to get a hold of the libnix_wos source to update it with the missing functions.

We have a pretty neat program we're trying to get running which has the missing functions:
readdir
rmdir
ftruncate
environ
snprintf
vsnprintf

With some duct tape and hammering and compiling random sources leaves us with:
rmdir and ftruncate that I can't find something that will compile. Halp?

Last edited by grelbfarlk; 21 October 2017 at 05:06.
grelbfarlk is offline  
Old 27 October 2017, 02:42   #95
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
I managed to compile the missing functions and actually got something produced. Dosbox 0.72 for WarpOS is now in bet- ALPHA. Thanks guys for all the help.
grelbfarlk is offline  
Old 27 October 2017, 03:29   #96
esc
 
Posts: n/a
Quote:
Originally Posted by grelbfarlk View Post
I managed to compile the missing functions and actually got something produced. Dosbox 0.72 for WarpOS is now in bet- ALPHA. Thanks guys for all the help.
Dude! That's awesome. This is something I was hoping to take a crack at one of these days, if you recall
 
Old 27 October 2017, 05:26   #97
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Quote:
Originally Posted by esc View Post
Dude! That's awesome. This is something I was hoping to take a crack at one of these days, if you recall
I do remember, and I'm still waiting for someone more capable to do it!
grelbfarlk is offline  
Old 04 November 2017, 01:26   #98
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Exult worked, getting the linking order took a bit of screwing around to get right it was this:
-lprints -lSDL_mixer -lvorbisfile -lvorbis -logg -lSDL_wos

Bermuda Syndrome worked with the defaults in the makefile.
grelbfarlk is offline  
Old 09 November 2017, 00:37   #99
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,067
Quote:
Originally Posted by grelbfarlk View Post
Bermuda Syndrome worked with the defaults in the makefile.
i try to build it for 68k, but there is no vorbis and ogg for 68k.
did you build them for ppc on your own?

can you attach your Makefile? did it build with SDL 1.2.x ?

Last edited by emufan; 09 November 2017 at 02:25.
emufan is offline  
Old 09 November 2017, 03:23   #100
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 834
Quote:
Originally Posted by emufan View Post
i try to build it for 68k, but there is no vorbis and ogg for 68k.
did you build them for ppc on your own?

can you attach your Makefile? did it build with SDL 1.2.x ?
Yeah I built libogg and libvorbis for WarpOS, wasn't much to it really, I think vorbis had some or one missing function. Yes with SDL 1.2.x.

Should be really easy to build for 68k. I just used the OS4 makefile from OS4Depot, adding some WarpOS compiler flags and playing with the linking order. Don't know if it's a faux pas to link directly to the lha:
http://os4depot.net/index.php?functi...at=game/action

Working on a couple new things, maybe they're possible for me or not. But this week I had to get bzip2 and LUA for them and a couple other libraries-getting hard to keep track my lib directory is getting pretty bloated.

List so far of what we have:
SDL 1.2.6
SDL Mixer
SDL Image
SDL Sound
TTF
Freetype
libzip
libpng
libjpeg
libsmpeg
libvorbis
libogg
liblua
libbzip2
grelbfarlk is offline  
AdSense AdSense  
 


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++ 17 10 December 2017 16:42
UAE for WarpOS 0.8.12 grelbfarlk request.Apps 0 23 November 2016 02:14
WarpOS Programming Help? esc support.Other 8 21 October 2015 11:37
WinUAE w/SDL mangamuscle request.UAE Wishlist 8 31 January 2007 12:41
What do you know about Amiga SDL? Tolismlf Amiga scene 6 15 November 2004 19: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 00:51.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.24079 seconds with 15 queries