• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
taliska

Native Calling Convention not implemented on iOS when using _arm64_

5 posts in this topic

Hi All,

 

Been using angel script for a few months now after trying to integrate a few different scripting languages in to my game engine and finding that I liked angel script the most, so thanks for the all the good work guys!

 

I haven't got any pressing issues at the moment...it generally works well enough for me and most of the time things go wrong when I'm being stupid.

 

Anyway, just thought I'd give everyone a heads up regarding the status of angel script when it's running on an iPhone 5S which has the new arm64 architecture based processor inside it, as I hadn't seen it mentioned by anyone yet (note that this is different to running armv7/s builds on iPhone 5S which is also possible and should work fine as it is).

 

In short, in the last build I tried it with, the platform detection code got confused and thought it was intel x64 instead of arm64 (so the build failed citing the assembly was referencing non-existent registers or something like that). That's not too hard to fix with some additional macro tests and a bit of re-ordering in that file, but obviously there isn't an available native calling convention implementation for arm64 available yet as far as I'm aware, and I don't really know enough about the angel script internals to provide it myself...otherwise I would.

 

Anyway, it's not an urgent thing, just wanted to make sure it was on the radar.

 

I'm just building armv7/s builds for the time being, so it's not blocking me in any way and the chances of me getting anywhere near the end of my project so that I have time to implement the NCC myself is pretty much nill... (one man indie team -> design/code/art/audio)

 

Just thought it was worth mentioning.

 

Cheers,

 

Kaz

 

0

Share this post


Link to post
Share on other sites

Hi Kaz,

 

thanks for the heads up. I wasn't even aware that any system was already using 64bit arm CPUs. :)

 

While it is true that AngelScript doesn't currently have the assembler code to support native calling conventions on 64bit arm, the as_config.h must definitely be fixed to avoid attempting to use intel native conventions. It should detect the 64bit arm architecture and define AS_MAX_PORTABILITY in this case.

 

Did you already make the necessary changes in as_config.h to make it compile successfully on arm64 with AS_MAX_PORTABILITY? Can you send me the updated as_config.h file?

 

Regards,

Andreas

0

Share this post


Link to post
Share on other sites

Hi Andreas.

 

Unfortunately the changes weren't with a very recent version of AS due to it just being a quick test I performed a few weeks ago when my new iPhone arrived! ;)

 

If you don't mind waiting, I should have time to download the latest version of AS tomorrow, and then I can verify my (admittedly) minor changes and get you a config file that's probably a bit easier to diff/integrate than my current one!

 

Cheers,

 

Kaz

0

Share this post


Link to post
Share on other sites
Hi Andreas.

As mentioned yesterday, I found time today to recreate the arm64 related changes from my older version of AS with the current work in progress branch which I switched to today and got using svn.

Just to sum up what I've done and included in the attached zip file:

- Copied the arm sub-section of the iPhone section in the config and changed the test to check for __arm64__ (but didn't change any of the contained #defines).
- Added max portability to the arm64 section (I have no way to test this as I don't use Generic Calling Conventions in my game).
- Reordered the sections, so that the tests are performed in the following order: arm, arm64, i386, x86_64, PPC, PPC64, etc.. This is preferable because the arm tests are simpler and less likely to go wrong, where as previously mentioned, the x86_64 test is a little bit too greedy. I didn't attempt to fix or restrict the x86_64 tests, because it's worked so far, and it's best not to change things unless it's really necessary.
- Added a comment to the arm64 section that just reminds everyone that NCC isn't available or tested yet.

I've also included my Xcode project file in case you find it useful. The one that I got when I checked out the source from the depot seemed quite old, so I figured it might be worth updating. There are a few changes that might not be quite what you want, so feel free to ignore/undo them. It contains two Xcode "schemes": 1 for iOS and 1 for OSX. There are appropriate paths setup for output libs to try and order them nicely which follows the form:

lib/<OS>/<architecture>/<buildvariant>/libangelscript.lib

so because of that, the simulator build for iOS actually ends up at:

lib/iOS/x86_64/debug/libangelscript.lib

because a simulator build is really just the iOS APIs on x86.

I'm not super handy when it comes to working with build stuff in Xcode, so it requires a little bit of leg work to get all the variants out and in the right place, but it's certainly not any more difficult than the previous version of the project file.

The other thing I've done which might not be ideal from your perspective is: I've added the addon source to the project as well so that they can be built in to the same libs. I did this for convenience reasons for people getting started with AS, as they probably just want to get up and running as soon as possible with a minimum of fuss, and so it seems like a reasonable thing to do (especially as those add ons only add to the library size, but don't add any extra dependencies which is pretty much the factor I tend to use in my own libraries for deciding whether I should separate code or not). I suspect that unused addons will probably get stripped out anyway, so I'm not sure there would be any negative effects from a practical perspective. Of course, I understand if you feel it's wrong from a logical perspective! ;-)

Anyway, there you go. I hope some of this stuff helps. I wish I had time to get in to the details of implementing the NCC for arm64 too, but unfortunately I'm a bit overworked as it is!

Cheers,

Kaz


P.S. Attachment removed.
0

Share this post


Link to post
Share on other sites

Thanks for the patch. I'll look into this over the weekend.

 

I've downloaded the zip file, so you can remove it now if you wish.

Edited by Andreas Jonsson
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0