Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - RedDwarf

#1
Quote from: JawCross on Sat 21/05/2011 10:06:23
#7  0x0007bab4 in quit (quitmsg=0x21a3c0 "|You have exited.")
    at ags_maemo/Engine/ac.cpp:9341
#8  0x000a0af8 in QuitGame (dialog=0) at ags_maemo/Engine/ac.cpp:17995
So something is triggering a normal exit.

Quote from: JawCross on Sat 21/05/2011 10:07:24RedDwarf, what is your target and plans? I can see you have removed almp3 and added some gstreamer -stuff on your branches. Bero, you started cmake-clone for easy building (under Linux), and you have wrote about 64bit systems. Everybody else can also answer: "What is your goal? Short term all long term". I haven't see new commits on https://svn.adventuregamestudio.co.uk:7743/svn/ags/trunk/ nor any sings that 'community effort will be merged to it'. I think they should be merged and I think there should be some plan (or hope) that they will be merged.
My plan is make it work in Linux without crashes and with the same features than in Windows, nothing else. I never used ags at all for being closed source, so I don't know it to tell if it lacks any feature.
I may still look into the plugins thing (I would still want a test game), but nothing else. x86-64 support seems too complex.
#2
Quote from: JawCross on Wed 18/05/2011 16:17:18
JJS, thanks for PSP-patch. It doesn't change user experience, but now it does not silently die, but it is Segmentation Fault always.

I'm not sure about optimization flags, I'm currently trying with Debug release.

I got first backtrace, which seems almost useless to me:
Code: ags

#0  0x0018f258 in _linear_hline16 ()
#1  0x0020564c in _xwin_hline ()
#2  0x0015a508 in _normal_rectfill ()
#3  0x0020515c in _xwin_rectfill ()
#4  0x00053c88 in rectfill (bmp=0x645a40, x1=0, y_1=0, x2=319, y2=199, color=0) at /usr/include/allegro/inline/draw.inl:88
#5  0x00054280 in AllegroGFXFilter::ClearRect (this=0x644868, x1=0, y1=0, x2=319, y2=199, RGB=0)
    at ags_maemo/Engine/acgfx.cpp:439
#6  0x000de038 in ALSoftwareGraphicsDriver::ClearRectangle (this=0x6448f8, x1=0, y1=0, x2=319, y2=199, colorToUse=0x0)
    at ags_maemo/Engine/ali3dsw.cpp:340
#7  0x0005f040 in display_switch_in () at ags_maemo/Engine/ac.cpp:15574


(None of those three Engine/ files were touched by psp-patch)

In a Linux machine a very similar crash happens when you exit. Perhaps you have another problem that triggers a normal quit (which could give a useful message) and it segfault because of the quitting.
You should be able to comment the
Code: ags

  if (gfxDriver->UsesMemoryBackBuffer())  // make sure all borders are cleared
    gfxDriver->ClearRectangle(0, 0, final_scrn_wid - 1, final_scrn_hit - 1, NULL);

part of display_switch_in. I'm not even sure it makes sense at all.

You could also look at the backtrace of all the threads (that one isn't the main one) and search for the quit call (which will contain the message explaining why it was called).
#3
The new mp3 playback code is commited and there is a merge request.

Now, how are we going to handle all this? This commit is not Linux specific. Pumaman, will you look into the git log to take patches for your SVN? I don't see a way to make it easier for you. I could attach a patch here, but that is not going to make it easier (in fact Gitorious has a really nice diff/patch viewer). Gitorious really makes collaboration easier.
#4
Quote from: RedDwarf on Tue 17/05/2011 23:18:04
Quote from: RedDwarf on Tue 17/05/2011 16:20:34Totally unrelated, with mpg123 1.13.3 I don't get any MP3 sounds (cat in KQ3). It worked before with the internal copy. It's just me?
The code, at the very least, lacks a call to mpg123_init().
bero, the code was untested or you forgot to add a file in the commit?
Nevermind. I'm rewriting the MP3 code without using ALMP3.

I have the MYSTATICMP3 part. Once I have the MYMP3 part and I clean it I will request a merge.
#5
Quote from: Electroshokker on Wed 18/05/2011 11:16:10Ahum, it's not simply a matter of adding this command, you have to change the ags code using wrapper functions which point to the real function. If you do that, you don't have to change the AGS library.

see (just dug up this link, there are other locations which explain it better) http://stackoverflow.com/questions/3662856/how-to-reimplement-or-wrap-a-syscall-function-in-linux

If you can't work this out, I'll post my entire ags code section which uses this when I'm on my home pc. (at work now)
I know it isn't just adding the linker command. You have the full commit at https://gitorious.org/~reddwarf/ags/reddwarfs-ags/commit/f4099e49bd0b5896091eab61086f6dad9539e16c

But what it does is modify references to pack_fopen into __wrap_pack_fopen, and references to __real_pack_fopen into pack_fopen. It does not change the definitions, so you end with an ags executable with a symbol table that includes a __wrap_pack_fopen definition, no a pack_fopen definition. So, when loading the allegro library (dynamically linked), the loader will resolve references to pack_fopen to the internal library definition... since there is no other pack_fopen definition.
The references to pack_fopen in the allegro_library are never changed to __wrap_pack_fopen since the allegro library wasn't linked with the -wrap option.

To make it clear. If you run this code
Code: ags
#include <stdio.h>
#include <allegro.h>

PACKFILE *__real_pack_fopen(const char *, const char *);

PACKFILE *__wrap_pack_fopen(const char *filnam, const char *modd) {
  printf("Wrapper_function\n");
  __real_pack_fopen(filnam, modd);
}

int main() {
    load_wav("sample.wav");
    printf("Separator\n");
    pack_fopen("sample.wav", "r");
    return 0;
}


You get
QuoteSeparator
Wrapper_function
even when load_wav internally calls pack_fopen.
#6
Quote from: RedDwarf on Tue 17/05/2011 16:20:34Totally unrelated, with mpg123 1.13.3 I don't get any MP3 sounds (cat in KQ3). It worked before with the internal copy. It's just me?
The code, at the very least, lacks a call to mpg123_init().
bero, the code was untested or you forgot to add a file in the commit?
#7
Quote from: Electroshokker on Tue 17/05/2011 14:08:13Heheheh... actually, it CAN be fixed without getting a patch into Allegro... at least for the linux build.

I'll dig through my sources and give you guys a set of pointers and examples. For now, take a look at this linker command:
Code: ags
-Wl,-wrap,pack_fopen

If you look it up you'll find the technique I used...
That doesn't seems to work. The idea seems to be that allegro functions also use ags's pack_fopen (otherwise would be no need to name that function pack_fopen). Since allegro wasn't compiled with the wrap functions this trick doesn't work.

Anyway I created two branches:
- allegro_wrap: Uses Electroshokker trick. Probably depends on GNU ld and as explained I don't think it really works... but I could not find problems when using it.
- allegro_wrap2: When available, uses a GLIBC extension for dlsym which makes the internal pack_fopen functions unneeded. In this case allegro functions also use it.


Totally unrelated, with mpg123 1.13.3 I don't get any MP3 sounds (cat in KQ3). It worked before with the internal copy. It's just me?
#8
Quote from: Electroshokker on Sun 15/05/2011 09:56:05- built-in video support using gstreamer framework (for the Mac guys, have a look here and here for the binaries. For gstreamer on windows, look here)
Done... but I don't know how to test it. Any game that is known to require it and work with 3.2? KQ3 has video intro, but it worked before... through apeg/Theora, I suppose.

Quote from: Electroshokker on Sun 15/05/2011 09:56:05- redesign audio support to use gstreamer, so audio will work properly on all platforms
Would be nice. But isn't audio working already?

Quote from: Electroshokker on Sun 15/05/2011 09:56:05- create ags plugin support on linux & mac
I don't know how the ags plugin system works. But even if added for linux & mac, I suppose already existing plugins wouldn't work since they are compiled for Windows, aren't? They could depend on Windows only libraries... and IIRC the C++ ABI is just different there.
#9
Looking at the acwin.vcproj I see all the builds, with and without MP3 support, use "DISABLE_MPEG_AUDIO"; which disables MP3 support in apeg without touching almp3. Not sure what are the consequences, since I'm not sure what apeg is used for. But is this expected? No game should suppose ags was build with a copy of apeg with mpg123 support? Since bero is working in being able to have both copies of mpg123 at the same time...
#10
Quote from: bero on Wed 11/05/2011 11:35:23Done, my port is now imported into http://gitorious.org/ags.

Feel free to do anything you like with it, and add to the wiki.

You have a merge request there. Not really used to git, hope everything is correct.
SMF spam blocked by CleanTalk