July 24, 2017, 03:43:30 AM*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5
Print
Author Topic: GLBasic 64-bit  (Read 16680 times)
0 Members and 1 Guest are viewing this topic.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #30 on: January 02, 2015, 02:21:08 PM »

Okay here we go...

In gpc_temp2.cpp (and gpc_temp.h) change the return type of compare like so
Code:
int compare(Object& a, Object& b)

In glb.h change the following (foo should be a DGPtr):
Code:
template <class T> void SORTARRAY(T& arry, DGPtr foo)

...and here the return value should be int and no cast of the return value of cmp.

Code:
template <class T> int compare_by_foo(T& a, T& b, DGPtr foo)
{
typedef DGPtr(*pcmp)(T&a, T&b);
pcmp cmp;
#pragma warning(disable:4312)
cmp = (pcmp)(DGPtr*)foo;
return cmp(a,b);
}
« Last Edit: January 02, 2015, 06:15:58 PM by headkaze » Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #31 on: January 02, 2015, 03:43:04 PM »

Here its still crash with a EXE_BAD_CESSS in if (a.obid<b.obid) after those change.

here what im try (as well your version):
Code:
template <class T> int compare_by_foo(T& a, T& b, DGPtr foo)
{
typedef DGPtr(*pcmp)(T&a, T&b);
pcmp cmp;
//#pragma warning(disable:4312)
cmp = (pcmp)(DGPtr*)foo;
    int f=cmp(a,b);
    return f;
}

But im also get a warning in int f=cmp(a,b):
Implicit conversion loses integer precision: 'DGPtr' (aka 'long long') to 'int'.

PS. In your version, im might have forget to add arm64.


« Last Edit: January 02, 2015, 03:46:25 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #32 on: January 02, 2015, 04:05:34 PM »

It is definitely working in 64-bit mode for me after those changes. Perhaps I'm missing a change. Hang on a sec and I'll have a look.
Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #33 on: January 02, 2015, 04:21:22 PM »

ok.

int compare(Object& a, Object& b) is also not working, but im uses DGInt compare(Object& a, Object& b) instead (its came with a red warning).


Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #34 on: January 02, 2015, 05:21:57 PM »

Try this

Code:
template <class T> int compare_by_foo(T& a, T& b, DGPtr foo)
{
typedef int(*pcmp)(T&a, T&b);
pcmp cmp;
#pragma warning(disable:4312)
cmp = (pcmp)foo;
return cmp(a,b);
}

Also don't forget you need to change the following line in gpc_temp.h

Code:
int compare(Object& a, Object& b);

Definitely works after that on my iPad Air running 64-bit.
« Last Edit: January 02, 2015, 05:28:23 PM by headkaze » Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #35 on: January 02, 2015, 06:26:47 PM »

damn. Im see what its happens. There was a confuction with the naming.

DGInt is a float, while DGNat is a integer. Im used a DGInt, which have crashed it (its allways a 32bit float).

So there is also a issue in the GLBASIC manual as well, which trying that example will uses a float rather than a int. You need to add a % to the function in GLBASIC code.

This was the main reason why its diddent work, and also the new template is also confirmed works too and the game running now. Thanks for your help.

PS. How is Karma Miwa performing on your 6plus?
« Last Edit: January 02, 2015, 06:33:35 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #36 on: January 03, 2015, 01:09:28 AM »

I don't have a 6 plus, only an iPhone 5 and it runs fine on that.
Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #37 on: January 25, 2015, 10:18:08 AM »

how do im define in xCode. Im have newer found that feature at all, and is totally confusion how that one work in xCode.

Im trying to do something like -DTARGET_OS_IPHONE, but im could newer get that to work.
Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #38 on: January 26, 2015, 07:12:15 PM »

That looks right SF.

Just be sure to put it in for each Debug, Release and Distribution settings. Also for "Other C Flags" and "Other C++ Flags". You may also need to check the "Preprocessor Macros" section; although other flags should be enough.


* Compiler Flags.png (145.68 KB, 682x530 - viewed 326 times.)
Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #39 on: January 26, 2015, 07:21:40 PM »

thanks for the screenshot.
Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #40 on: February 01, 2015, 03:29:56 PM »

finally after a perioid with ski vacation and being sig after that (its was a nice vacation), then im finally tested this today. Its works much better now, so im only needs one stdafx.h instead of two (one for iPhone, and one for rest of the platforms).
Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #41 on: February 15, 2015, 04:32:40 PM »

look like im need more help. Im cannot get Karma Miwa compiled (im have tweeked a lots of levels and added few features those days), not even in 32bit mode only. Xcode is very strange and keeps the sound engine is missing, even its should been there and include. That even im inlude glbasic source into the project. Im sadly have no one clue what it going in here....

Im got a lots of undefined symboyls for glbSoundEngine functions from dxsound.o, even im uses the source code directly (as a t est), that even im trying to clean and even restart xcode. So im got stuck again.

im pm the project, but im have NOT include the graphics for the filesize, since im asume its should works after its compile again. Also for testing im have only used 32bit mode. Not 64bit.

PS. Im might missing somewhere a framework included, but what does xcode not tell that? Im have no clue which framework the sound engine really uses.
« Last Edit: February 15, 2015, 04:37:19 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #42 on: February 15, 2015, 09:29:56 PM »

In iphonesoundengine.cpp comment out the following two lines

Code:
#if defined (APPLE_COREAUDIO)

Code:
#endif // APPLE_COREAUDIO
Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #43 on: February 15, 2015, 10:43:32 PM »

im dont understand why that needed, due its should have defined that already, but xCode seens to skips that?

Howover im have still one very strange issue left.

im got a undefined symbols linker error from
"__GLBASIC__::DEBUG from gpc_temp5.o

but there is no such call from cpp code which was there, I'm but I'm commented it out, but xcode still thinks it's there in the o file.

its look like its cached, but im cant delete that cache, even im clean that and also restart xcode.

weird....
« Last Edit: February 15, 2015, 10:56:32 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #44 on: February 16, 2015, 10:13:07 PM »

Im got Karma Miwa running with the update.

But have still trouble with the define options in xcode in "other flags", which seen not working quite very well.

example APPLE_COREAUDIO was defined, but fails to works as its should.

Tomorrow im seen can get stdafx.h working without having require two of them (one for iOS and one for rest of the platforms).

by now im have defined them directly in the file like this:

Code:
#define TARGET_OS_IPHONE
#define IPHONE
#define HAVE_OPENGL_ES
#define POSIX
#define APPLE_COREAUDIO
#undef WIN32

but should doing something like this:

Code:
#ifdef TARGETIOS
#define TARGET_OS_IPHONE
#define IPHONE
#define HAVE_OPENGL_ES
#define POSIX
#define APPLE_COREAUDIO
#undef WIN32
#endif

But for me xCode working can been quite confuction and strange....


Now im should create some levels for Balders. Im do later this week.
« Last Edit: February 16, 2015, 10:14:45 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #45 on: February 17, 2015, 01:31:26 PM »

when compiled as a lib, then im get a new crash and seen only happens on iPad 1 (iOS5).

dyld: Symbol not found: __sincos_stret

referenced from those line in OpenGLRainbows.cpp:

sphi = sin(phi * BOG_INV_F);

EDIT: Seens Fixed. Im forget to set iOS Deployment Target to iOS5.1 when creating the glbasic iphone lib....
« Last Edit: February 17, 2015, 01:42:50 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #46 on: March 17, 2015, 07:53:56 PM »

Greedy Mouse v3.5 is ready for Android (just not uploaded), include various Android Micro Consoles (fixed a anoying inapp issue for Ouya). Im do might dedicated skips iOS this time. xCode simply just want to add those damn DEFINES and skips them completly or partly and have been stuck in a while.

its the DEFINE its the remaning issue. When adding the source code, its works, but not when compiling to the lib first.

« Last Edit: March 17, 2015, 07:55:03 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
headkaze
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 7796



« Reply #47 on: March 18, 2015, 09:08:50 AM »

This might help

http://stackoverflow.com/questions/367368/how-to-define-a-preprocessor-symbol-in-xcode
Logged
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #48 on: March 19, 2015, 10:26:31 AM »

look like im FINALLY got it to works, even there is confuction about it. Now the game ran correctly with the compiled lib file, and have updated the public xcode project to v4. Thanks for the help.

Few issues was returned (the blowfish and a tilt issues), but seen im got those corrected to, so im now only need one source code instance in the future.
Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #49 on: March 20, 2015, 05:22:43 PM »

Jubii, Genius Greedy Mouse with the new glbasic lib is now submitted to Itunes Connect in 3.4.

Android version (Ouya/Mojo, Amazon AppStore and Google Play) is pretty much ready too. Im did added Amazon FireTV code, so im try adding that platform for the submittion.
Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #50 on: March 30, 2015, 03:52:44 PM »

im have finally brought a MOGA iOS 7 MFI controller. Its might take a week before its arive here.

Now im thinks im want to add MFI controller support for GlBasic (as least the lower game pad profile with 6 buttons, which can either send to KEYS() or mightbeen even the controller commands).

Howover when im see this document (which seen quite easy to do):
http://www.raywenderlich.com/forums/viewtopic.php?f=21&t=10339

There is no way to make sure its only do the job when iOS 7 is detected? Glbasic should works from iOS 5.1 and up (the first iPad is still cool and using that).

But in the way, for glbasic Android, im have just added a much better game controller suppport recently, if you only do games with few buttons used, then its would works "out of the box". Otherwise if do want to uses near full profile, then just make a remap assign screen, and you go. Even iCade do im finally got working now for Android and remapping it before its sends to the KEY() command.

PS. Now im in this week went back to Balders. Sorry im diddent create more levels, but im simply just like the editor in that game (dispite few issues, its still works excellet).
« Last Edit: March 30, 2015, 03:54:50 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #51 on: April 13, 2015, 12:51:41 PM »

I'm got mfi game controller to work and now play nice with glbasic. It's only possible to due I'm have the glbasic source code. I'm also created a game input api so I'm can use the same controller code on Android ios and Windows.

By now CatchOut works (dual stick game, but digital dpad and buttons can also been used) as well Karma Miwa. Button pressure is supported in CatchOut.
Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #52 on: April 24, 2015, 04:37:34 PM »

im have fighted recently with the interface orientation issue, which im cant fix it for IOS 8. Im got a post from this one:
http://www.glbasic.com/forum/index.php?topic=9971.msg91096#msg91096

after searing on net, im trying to do this:

Code:
void iPhoneSETORIENTATION(int orig) {
        if(orig==0) {
            [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
            if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
            }
        }
        if(orig==1) {
            [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
            if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
            }
        }
        if(orig==2) {
            [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortraitUpsideDown];
            if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
            }
        }
        if(orig==3) {
            [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft];
            if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeRight] forKey:@"orientation"];
            }
        }
}

But when [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeRight] forKey:@"orientation"]; is called, then touch controller view is lost focus (in iphoneeagleview.m). Im have no idea how to get the focus to work again.
« Last Edit: April 24, 2015, 04:38:15 PM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #53 on: April 26, 2015, 07:24:00 AM »

im are going to collect the glbasic source code tree again and send the issue. after few days im giving up. Im simply just can get it right with the orintation crap. A area Android is much much easier to work with. iOS 8 seen crap on that area.

This one fells so strange.

its works on iPad 1, iPhone 6, but of course not on iPad 3 with iOS 8.2 :-P.

Im gonna to hate iOS now and with my next phone will defensivt been Android. iOS is just no longer fun.

Logged

The Musician for the RetroBytes Portal Projects.
Flash
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 13033



« Reply #54 on: April 26, 2015, 07:44:07 AM »

We also have problems with rotation on winsol with ios8+

8.3 has some rotational fixes in it, not sure if that also relates to code level and fixes any of these issues.
Logged

Coding for the love of it!
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #55 on: April 26, 2015, 07:48:03 AM »

generally rotation on iOS8 is very buggy and sometimes the keyboard dosent show correctly or crash. So iOS8 is much more buggy than iOS7 really.

There is some devs that stopped iPad dev due iOS8 strangeless. So not good for Apple.
Logged

The Musician for the RetroBytes Portal Projects.
Flash
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 13033



« Reply #56 on: April 26, 2015, 07:57:43 AM »

Yes. iOS 8 has several bugs. And a lot of them are with rotation. Even with a web page sometimes you cannot tap on the links when in landscape and have to turn to portrait to do so. Not sure if 8.3 has fixed many of these problems as only just installed it the other day. Must try winsol and see if there are improvements now? Still. Even if there are it does not stop someone using 8.2 leaving bad feedback for your game when the onus lies with apple.
« Last Edit: April 26, 2015, 08:19:25 AM by Flash » Logged

Coding for the love of it!
Flash
Administrator
Blue Gene Super Computer
**********
Offline Offline

Gender: Male
Posts: 13033



« Reply #57 on: April 26, 2015, 08:17:46 AM »

This is from the 8.3 update notes.

Code:
Orientation and rotation fixes

Addresses an issue that sometimes prevented rotating back to portrait after having rotated to landscape
Improves performance and stability issues that occurred when rotating the device between portrait and landscape
Fixes an issue where device orientation appeared upside down after pulling the iPhone 6 Plus from your pocket
Resolves an issue that sometimes prevented apps from rotating to correct orientation after switching apps in multitasking

(Sorry about syntax, just pasting with the iPhone)
« Last Edit: April 26, 2015, 08:18:51 AM by Flash » Logged

Coding for the love of it!
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #58 on: April 26, 2015, 09:22:05 AM »

Its should works when starting up, but wont try to do the rotations like the named issues above.

Im do finally got the orientation works and show correctly now.

But auto rotation on older 5.1 would no longer been supported, since its a bit too much different, but the game is still fully playable on iPad 1.

but when there is a system rotating, then the UIViewController in iphoneeaglview.m stops responding. This is a issue im dont know why and needs help.
« Last Edit: April 26, 2015, 10:58:00 AM by spacefractal » Logged

The Musician for the RetroBytes Portal Projects.
spacefractal
RBP Team Member
Blue Gene Super Computer
*****
Offline Offline

Gender: Male
Posts: 4000



WWW
« Reply #59 on: May 02, 2015, 11:31:46 AM »

im do still need help on the response issue, and cant fint anything that help on google at all.

Soon im add UIViewController to let the window rotate, then UIView touch inputs does not fired at all.
Logged

The Musician for the RetroBytes Portal Projects.
Pages: 1 [2] 3 4 5
Print
Jump to: