English Amiga Board


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

 
 
Thread Tools
Old 31 January 2018, 05:07   #21
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
could you test the snes9x emulator, xboxown?
emufan is offline  
Old 31 January 2018, 08:11   #22
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 676
Yes i could Tomorrow I will have it officially tested it and ready for you and will give you the results 100%.
xboxown is offline  
Old 31 January 2018, 12:48   #23
gulliver
BoingBagged
 
gulliver's Avatar
 
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
Thanks a lot emufan!

I will give it a test as soon as I get home.
gulliver is offline  
Old 31 January 2018, 14:39   #24
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by gulliver View Post
I will give it a test as soon as I get home.
Quote:
Originally Posted by xboxown View Post
Yes i could Tomorrow I will have it officially tested it and ready for you and will give you the results 100%.
allright. hopefully it is somehow useable on fast classic hardware too
emufan is offline  
Old 31 January 2018, 15:44   #25
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Emufan and Grelbfarlk, do neither of you use github?

Also, have either of you solved an undefined reference to "cexpf" before? I'm stuck on a port with only this unsolved reference. I don't know where the compiler is getting that from since it isn't referenced in any of my libraries, includes, source in neither the Toolchain nor the actual game source. :S
Marlon_ is offline  
Old 31 January 2018, 15:57   #26
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I'm still not using github for the projects

those functions not available in toolchains, you have to find it's source
and build an object module from it.
maybe this cexpf is the right one, from glibc.
sometimes you have additional dependecies from those new functions, so you have to build them aswell.

#1) some compiler refused the weak_alias statement - so you have to remove that sections,
and adjust the lines above. so the object file provides the correct __function.

Last edited by emufan; 31 January 2018 at 16:11.
emufan is offline  
Old 31 January 2018, 16:01   #27
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Wink

Quote:
Originally Posted by emufan View Post
I'm still not using github for the projects
Boo! What if someone wants to help out on the port? Or update your port in the future? Should they retrace all your steps again / "reinvent the weel"? :P
Sharing is caring!

That's why I started this effort:
https://github.com/amigaports

Quote:
Originally Posted by emufan View Post
those functions not available in toolchains, you have to find it's source
and build an object module from it.
maybe this is cexpf from glibc.
Yeah, I tried to go that path, but that was a huge pain and gave loads of errors. I will try again.
Marlon_ is offline  
Old 31 January 2018, 16:21   #28
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
Sharing is caring!
thats right. if I release something on aminet, I'll add the source code. so at least something
Quote:
Yeah, I tried to go that path, but that was a huge pain and gave loads of errors. I will try again.
yah, can be painfull. I "ported" strtok_r, strcasecmp and strcasestr. this was somehow easy.
try a different toolchain (gcc6 vs gcc3) if you run into trouble with one of them.

grelbfarlk suggests adding those new functions to a new lib - libMyOwnFunctions.a - so it's
easier in the future to have them all in one place.
emufan is offline  
Old 31 January 2018, 16:23   #29
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
thats right. if I release something on aminet, I'll add the source code. so at least something
Yes, but there's no version history or anything.

Quote:
Originally Posted by emufan View Post
yah, can be painfull. I "ported" strtok_r, strcasecmp and strcasestr. this was somehow easy.
try a different toolchain (gcc6 vs gcc3) if you run into trouble with one of them.
having a library with these additional functions on github that you could use if you get stuck, and having a joint effort where new missing functions are added would be great.
Marlon_ is offline  
Old 31 January 2018, 17:05   #30
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
yes, I know, U mentioned it earlier, maybe once i will consider a github upload

#1) this cexpf thing is a monster, did try with gcc3 and gcc6 - horrible :/

if it's really not in any libm* (!?) of gcc6, ask bebbo. maybe he can add it in his next releases.

Code:
$ grep -ir cexpf *
Binary file bin/m68k-amigaos-c++.exe matches
Binary file bin/m68k-amigaos-cpp.exe matches
Binary file bin/m68k-amigaos-g++.exe matches
Binary file bin/m68k-amigaos-gcc-6.3.1b.exe matches
Binary file bin/m68k-amigaos-gcc.exe matches
lib/gcc/m68k-amigaos/6.3.1b/include/c++/complex: 
 __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
Binary file libexec/gcc/m68k-amigaos/6.3.1b/cc1.exe matches
Binary file libexec/gcc/m68k-amigaos/6.3.1b/cc1obj.exe matches
Binary file libexec/gcc/m68k-amigaos/6.3.1b/cc1plus.exe matches
Binary file libexec/gcc/m68k-amigaos/6.3.1b/lto1.exe matches
m68k-amigaos/clib2/include/complex.h:extern float complex cexpf(float complex z);
m68k-amigaos/info/gcc.info:
 'ccosl', 'ccos', 'cexpf', 'cexpl', 'cexp', 'cimagf', 'cimagl', 'cimag',
Binary file m68k-amigaos/info/gcc.info matches
not in any lib, it seems :/

Last edited by emufan; 31 January 2018 at 17:14.
emufan is offline  
Old 31 January 2018, 17:07   #31
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
#1) this cexpf thing is a monster, did try with gcc3 and gcc6 - horrible :/
Yeah :/
Marlon_ is offline  
Old 31 January 2018, 17:25   #32
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
Yeah :/
m68k-amigaos/info/gcc.info:
Code:
The ISO C99 functions '_Exit', 'acoshf', 'acoshl', 'acosh', 'asinhf',
....
'ccosl', 'ccos', 'cexpf', 'cexpl', 'cexp', 'cimagf', 'cimagl', 'cimag',
....
are handled as built-in functions except in strict ISO C90 mode
('-ansi' or' -std=c90').
"built-in" still means it is somewhere in an "external" link lib?
emufan is offline  
Old 31 January 2018, 18:52   #33
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
m68k-amigaos/info/gcc.info:
Code:
The ISO C99 functions '_Exit', 'acoshf', 'acoshl', 'acosh', 'asinhf',
....
'ccosl', 'ccos', 'cexpf', 'cexpl', 'cexp', 'cimagf', 'cimagl', 'cimag',
....
are handled as built-in functions except in strict ISO C90 mode
('-ansi' or' -std=c90').
"built-in" still means it is somewhere in an "external" link lib?
I've checked every possible lib, and nope. So I think that's just something that .info-file just happened to be including that data with gcc-6, as it's usually there.

I found a reference in clib2 to cexpf, which was external, but I am not using clib2, I'm using libnix. So why there's a reference to cexpf at all, I have no clue.

I've sent an issue to Bebbo on the toolchain github regarding this, and I hope he'll be of some help.
Marlon_ is offline  
Old 31 January 2018, 19:15   #34
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
makes sense. maybe we have some sort of lightweight version
of the libs missing certain functions.
let's see what bebbo has to say
emufan is offline  
Old 31 January 2018, 20:21   #35
gulliver
BoingBagged
 
gulliver's Avatar
 
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
Couldnt wait till I get home.

Running in WinUAE JIT 020+fpu. AmigaOS 3.9 with ixemul 48.3 (020f). Using the snes 881 executable. Game: Raiden Trad (USA)

The good:
-It works.
-Sound works
-Graphics are glitchless

The bad:
-It is nearly unplayable due to its slowness.
-Having different problems with using some switches.

Details:
It hangs with the -buffersize switch set to 2.
Frameskip doesnt seem to do anything at all. The same happens with the -mute switch.
Fullscreen switch yells to me: Unable to set video mode Invalid with or height.

Thanks again, I hope you can sort out these issues. It seems to me this just requires some finetuning, but it already looks promising.
gulliver is offline  
Old 31 January 2018, 21:30   #36
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
it doesnt make things faster, more the opposite, but try:
Code:
snes9x-sdl-881 -displayframerate  -frameskip 0 RaidenTrad.sfc
I get 20 FPS this way :/

not much I can do about. I guess it would need some asm routines,
emufan is offline  
Old 31 January 2018, 23:10   #37
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by Marlon_ View Post
Emufan and Grelbfarlk, do neither of you use github?

Also, have either of you solved an undefined reference to "cexpf" before? I'm stuck on a port with only this unsolved reference. I don't know where the compiler is getting that from since it isn't referenced in any of my libraries, includes, source in neither the Toolchain nor the actual game source. :S
No I don't use github, mainly because no one else is doing WarpOS stuff. And secondly because when I share my source after people look at it they say it makes them want to punch themselves in the dick until they vomit blood.

Usually with the glibc stuff in my experience the alias function at the end causes the problem, I just rewrite that part which then it usually works (for simpler functions).
grelbfarlk is offline  
Old 31 January 2018, 23:14   #38
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by grelbfarlk View Post
No I don't use github, mainly because no one else is doing WarpOS stuff. And secondly because when I share my source after people look at it they say it makes them want to punch themselves in the dick until they vomit blood.
Pfft, I'm no expert either, but I put my stuff up there as well. Also, if you work with forks, you're able to grab updates easier by merging in the updates and so on.

Git is a wonderful tool when you know how to use it. It also wouldn't hurt the WarpOS scene if there were sources available.

There's also the possibility to push the changes upstream, so it'll be in the main repo. The beauty of opensource is shared sources. If bugfix is applied somewhere else, it applies for all OS'es/ports.

This is my plan with MilkyTracker. My sources (put in the AmigaPorts organisation) now has fixes from capehill (who maintains the AmigaOS4 version), my 68k fixes and MorphOS fixes. I am pulling in your WarpOS edits as well. Meanwhile I can still grab the latest fixes and updates from the main repo!
Marlon_ is offline  
Old 31 January 2018, 23:51   #39
gulliver
BoingBagged
 
gulliver's Avatar
 
Join Date: Aug 2007
Location: The South of nowhere
Age: 46
Posts: 2,358
Quote:
Originally Posted by emufan View Post
it doesnt make things faster, more the opposite, but try:
Code:
snes9x-sdl-881 -displayframerate  -frameskip 0 RaidenTrad.sfc
I get 20 FPS this way :/

not much I can do about. I guess it would need some asm routines,
I get 11 FPS on this old office notebook (WinUAE on a quad core N3540).

Yes, it seems you are right, it certainly needs some asm wizardry.
gulliver is offline  
Old 01 February 2018, 16:38   #40
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
the original snes9x version uses some asm routines, but the portable snes9x-sdl not.
I doubt we will find someone taking the challenge.
emufan 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
emufan can you please port this to Amiga!!? xboxown Coders. C/C++ 93 29 November 2017 09:06
Just curious; Graphics Card Sim085 support.Hardware 31 12 October 2017 15:27
Curious about Natami Pat the Cat Amiga scene 13 07 January 2017 22:16
Hey hey, new guy here... CarlosTex Member Introductions 4 05 August 2011 01:29
hey hey 16k Amiga1992 Nostalgia & memories 5 16 August 2006 22:26

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 11:26.

Top

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