Can I use the assets from the XBox 360 version?

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

A colleague at work has an xbox360 with the GOTY DVD, we managed to make an ISO of it.

We used xbiso to extract the ISO to disk:
http://sourceforge.net/projects/xbiso/f ... iso-0.6.1/
^-- It is GPLv2

It dumps a lot of crap, but most importantly the "Data Files" directory with the Morrowind bsa and esm, and an additional esm.map (whatever that is).

So the good news is, we're likely able to incorporate this into the installer.

Now here comes the bad news, openmw won't start and gdb (with debugging symbols) isn't helping.

We get a:
ERROR: std::bad_alloc

Any ideas guys?

Code: Select all

bcurtis@Redqueen:~/workspace/OpenMW/build$ gdb ./openmw 
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./openmw...done.
(gdb) rn
Target exec does not support this command.
(gdb) run
Starting program: /media/workspace/OpenMW/build/openmw 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Installing crash catcher
Loading config file: /home/bcurtis/.config/openmw/openmw.cfg... done.
Loading config file: ./openmw.cfg... done.
Loading config file: /etc/openmw/openmw.cfg... done.
Using default (English) font encoding.
[New Thread 0x7fffe0ec6700 (LWP 529)]
[New Thread 0x7fffe06c5700 (LWP 530)]
[New Thread 0x7fffdfec4700 (LWP 531)]
[New Thread 0x7fffdf6c3700 (LWP 532)]
[New Thread 0x7fffdeec2700 (LWP 533)]
[New Thread 0x7fffde6c1700 (LWP 534)]
[New Thread 0x7fffddec0700 (LWP 535)]
[New Thread 0x7fffdd6bf700 (LWP 536)]
Data dir /home/bcurtis/Downloads/xbiso-0.6.1/test/Data Files
Adding BSA archive /home/bcurtis/Downloads/xbiso-0.6.1/test/Data Files/Morrowind.bsa

ERROR: std::bad_alloc
[Thread 0x7fffddec0700 (LWP 535) exited]
[Thread 0x7fffde6c1700 (LWP 534) exited]
[Thread 0x7fffdeec2700 (LWP 533) exited]
[Thread 0x7fffdd6bf700 (LWP 536) exited]
[Thread 0x7fffe0ec6700 (LWP 529) exited]
[Thread 0x7fffdf6c3700 (LWP 532) exited]
[Thread 0x7fffe06c5700 (LWP 530) exited]
[Thread 0x7fffdfec4700 (LWP 531) exited]
[Inferior 1 (process 525) exited with code 01]
(gdb) bt
No stack.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

Valgrind gives is a better look:

Code: Select all

bcurtis@Redqueen:~/workspace/OpenMW/build$ valgrind ./openmw 
==579== Memcheck, a memory error detector
==579== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==579== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==579== Command: ./openmw
==579== 
Installing crash catcher
Loading config file: /home/bcurtis/.config/openmw/openmw.cfg... done.
Loading config file: ./openmw.cfg... done.
Loading config file: /etc/openmw/openmw.cfg... done.
Using default (English) font encoding.
Data dir /home/bcurtis/Downloads/xbiso-0.6.1/test/Data Files
Adding BSA archive /home/bcurtis/Downloads/xbiso-0.6.1/test/Data Files/Morrowind.bsa
==579== Warning: silly arg (-54212) to __builtin_new()
**579** new/new[] failed and should throw an exception, but Valgrind
**579**    cannot throw exceptions and so is aborting instead.  Sorry.
==579==    at 0x4C2A95C: ??? (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==579==    by 0x4C2B150: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==579==    by 0x7BC521: std::vector<char, std::allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, unsigned long, char const&) (new_allocator.h:104)
==579==    by 0xB07923: std::vector<char, std::allocator<char> >::insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, unsigned long, char const&) (stl_vector.h:1024)
==579==    by 0xB07721: std::vector<char, std::allocator<char> >::resize(unsigned long, char) (stl_vector.h:707)
==579==    by 0xBDDF0B: Bsa::BSAFile::readHeader() (bsa_file.cpp:122)
==579==    by 0xBDE42C: Bsa::BSAFile::open(std::string const&) (bsa_file.cpp:168)
==579==    by 0xBD8993: BSAArchive::BSAArchive(std::string const&) (bsa_archive.cpp:211)
==579==    by 0xBD94ED: BSAArchiveFactory::createInstance(std::string const&, bool) (bsa_archive.cpp:313)
==579==    by 0x50EE181: Ogre::ArchiveManager::load(std::string const&, std::string const&, bool) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
==579==    by 0x5166AEF: Ogre::ResourceGroupManager::addResourceLocation(std::string const&, std::string const&, std::string const&, bool, bool) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
==579==    by 0xBD643D: Bsa::addBSA(std::string const&, std::string const&) (bsa_archive.cpp:373)
==579== 
==579== HEAP SUMMARY:
==579==     in use at exit: 27,334,267 bytes in 15,871 blocks
==579==   total heap usage: 68,771 allocs, 52,900 frees, 35,149,555 bytes allocated
==579== 
==579== LEAK SUMMARY:
==579==    definitely lost: 827,392 bytes in 7 blocks
==579==    indirectly lost: 0 bytes in 0 blocks
==579==      possibly lost: 25,312,250 bytes in 11,829 blocks
==579==    still reachable: 1,194,625 bytes in 4,035 blocks
==579==         suppressed: 0 bytes in 0 blocks
==579== Rerun with --leak-check=full to see details of leaked memory
==579== 
==579== For counts of detected and suppressed errors, rerun with: -v
==579== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

Interesting: http://blogs.msdn.com/b/robunoki/archiv ... 68737.aspx
The Power PC chip that powers the XBox 360 can actually be configured to run in either little or big endian mode; the version in the XBox 360 is big endian.
So we should look at the file data... the Xbox 360 contents seem to be stored as Little Endian.

Code: Select all

/opt/morrowind/Data Files/Morrowind.bsa                                         
0000 0000: 00 01 00 00 3C 7A 07 00  46 2B 00 00 84 18 00 00  ....<z.. F+......  
0000 0010: 82 DA A8 06 00 01 00 00  C0 10 96 00 00 01 00 00  ........ ........  
0000 0020: C0 11 96 00 00 01 00 00  C0 12 96 00 00 01 00 00  ........ ........  
0000 0030: 00 18 96 00 26 A3 00 00  96 78 6D 0C DE A3 00 00  ....&... .xm.....  
0000 0040: 0D FE 68 0C 33 09 00 00  A7 55 6D 0C 2D 10 00 00  ..h.3... .Um.-...  
0000 0050: 40 3F 6D 0C 25 08 00 00  54 AD 69 0C 04 08 00 00  @?m.%... T.i.....  
0000 0060: 25 27 6E 0C 69 0B 00 00  EB A1 69 0C 69 0B 00 00  %'n.i... ..i.i...  
0000 0070: BC 1B 6E 0C 3A 06 00 00  6D 4F 6D 0C 39 06 00 00  ..n.:... mOm.9...  
0000 0080: C8 B5 71 0C 2D 10 00 00  9B A5 71 0C 31 09 00 00  ..q.-... ..q.1...  
/home/bcurtis/Downloads/xbiso-0.6.1/test/Data Files/Morrowind.bsa               
0000 0000: 00 01 00 00 88 A7 01 00  F1 34 00 00 34 18 00 00  ........ .4..4...  
0000 0010: C7 93 83 0B 00 01 00 00  C3 7A 25 00 00 01 00 00  ........ .z%.....  
0000 0020: C3 79 25 00 00 01 00 00  C3 78 25 00 00 01 00 00  .y%..... .x%.....  
0000 0030: 03 70 25 00 26 A3 00 00  B7 D0 91 03 DE A3 00 00  .p%.&... ........  
0000 0040: 85 47 96 03 F4 08 00 00  99 8D 92 03 DA 0F 00 00  .G...... ........  
0000 0050: C7 9C 92 03 25 08 00 00  F7 33 96 03 04 08 00 00  ....%... .3......  
0000 0060: 4A BD 91 03 69 0B 00 00  1C 3C 96 03 69 0B 00 00  J...i... .<..i...  
0000 0070: 4E C5 91 03 3A 06 00 00  8D 96 92 03 39 06 00 00  N...:... ....9...  
0000 0080: DE 33 8E 03 DA 0F 00 00  17 3A 8E 03 F4 08 00 00  .3...... .:......  
┌──────────────────────────────────────────────────────────────────────────────┐
│Arrow keys move  F find      RET next difference  ESC quit  T move top        │
│C ASCII/EBCDIC   E edit file   G goto position      Q quit  B move bottom     │
└──────────────────────────────────────────────────────────────────────────────┘
If I use dd - conv=swab to flip the file into another Endianness, I get:
ERROR: BSA Error: Unrecognized BSA header

This means that the original file, on the DVD/ISO is in little endian format. However we can't read it!
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Can I use the assets from the XBox 360 version?

Post by Chris »

Could be the BSA format is slightly different on the console version of the game. Though personally, I'd strongly suggest not to worry about supporting the console discs. Bethesda is already a bit concerned with letting us use the PC version on Android, but to allow using the console version on PC sounds like something that would be in definite "No" territory.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

Chris wrote:Bethesda is already a bit concerned with letting us use the PC version on Android, but to allow using the console version on PC sounds like something that would be in definite "No" territory.
That is not the impression I got, they just said that they didn't want us to actively promote the fact that you can run OpenMW (with Morrowind) on Android (or any non-PC platform).

The goal of OpenMW (for me) is a cross-platform Morrowind.

I can however ping MattG to verify if this would make you feel better.
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Can I use the assets from the XBox 360 version?

Post by Chris »

psi29a wrote:they just said that they didn't want us to actively promote the fact that you can run OpenMW (with Morrowind) on Android (or any non-PC platform).
That's what I mean. Initially they said we can't because of legal concerns, but after talking they said okay as long as we keep it on the down-low. This was for being able to use content from the PC version to play on a different system that doesn't have Morrowind. But using content from the console version to play on a different system that does have Morrowind (PC) is a different matter entirely.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

I sent MattG an email with a link to this thread and asked his opinion:
Hello Matt,

we had another question for you guys. The request came in to see OpenMW would support playing Morrowind using the XBox version. We currently don't support it, but it is possible to implement.

However, there are some that are nervous about this and I thought it best to run it past you first. Here is the thread:
viewtopic.php?f=2&t=2581&p=29033&sid=b0 ... 88e#p29022

From my point of view, as a license holder of Morrowind, they shouldn't be required to buy it again just to play on Windows, OSX, Linux or their Toaster of choice. We don't touch any Microsoft IP nor any encryption/DRM, the format of the disk itself is public knowledge (reversed engineered in the early 2000s).

What do you think?
Here is his reply:
I think if I bring it to our legal team (that's who I would need to ask) they will absolutely take issue with it. The game was sold on Xbox to be played on an Xbox.

It's a similar situation of taking the game from one platform and putting it on a platform it was never intended to be played on. With that in mind, I think this bit you sent me previously serves as a good way of handling this.:
psi29a wrote:In return, we'll (OpenMW Team) not focus on running Morrowind with OpenMW on non-PC platforms. This means no videos on our blog or blog posts exclusively to this effect. If we do post any information, be it video or blog post, for non-PC platforms, that it should have to do with our own content.
And as noted in the forums, there are some dirt cheap sales on the PC version (which I think most people would rather have). Some really good deals on Amazon, too.
Matt's point of view is that since we took the stance of having "PC" Morrowind on the "PC" platform, that this also means keeping non-PC Morrowind (Xbox Morrowind) on the non-PC platform.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can I use the assets from the XBox 360 version?

Post by psi29a »

The discussion with Matt is on going. The argument has been put forth that OpenMW could be ported to the Xbox (another non-PC system), however this particular platform has a non-PC Morrowind on it. This use-case still falls inline with out earlier agreements. Unlike the Android agreement, Morrowind exists already on the Xbox and should also be playable with OpenMW on the Xbox.
HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: Can I use the assets from the XBox 360 version?

Post by HiPhish »

I don't understand why they would be troubled by Morrowind running on toasters, but not on Linux or OS X when it wasn't intended to be played on those two either.
SquireNed
Posts: 403
Joined: 21 Dec 2013, 22:18

Re: Can I use the assets from the XBox 360 version?

Post by SquireNed »

Linux or Mac OS X are similar enough to feel to Windows to not really count as a different distribution platform—they are collectively the "PC" market, even though Windows has long dominated the gaming market share. Consider Steam, which sells games that run on all three platforms through the same account.
Locked