Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectCompiling MAMEBoy part 2 new Reply to this message
Posted bycps46
Posted on02/27/01 03:17 PM



Hi,

I got MAMEBoy to compile and run. Great fun, now I can show
a colleague of mine a full-speed Tempest with sound!
(MAMECE runs Tempest but the sound is...of dubious quality).

At first, I had been trying to replace the GAMEX calls
with GAPI calls because the linker was dying on some
GAMEX call and I thought, hey, it should probably be
GAPI anyway.

But that didn't work, so I looked more closely at the
linker error and it was only failing to link to the
OpenButtons function ("unresolved external blah blah blah").

Changing the HWND in that function (in the gamex.h file) to
a HANDLE fixed it so I could compile and run. I am happy
to say it runs Tempest just fine (I uncommented Tempest in
the driver.c line in core).

BUT...I can't get the menu to show up. I have a PocketPC
(Casio E-125) and it looks like MAMEBoy does a PsPC (WinCE
2.11) style menu thing...I think...anyway, the MAMEBoy
I downloaded displays the menu at the top of the screen
and somehow manages to move Windows CE's taskbar to the
bottom of the screen. The MAMEBoy I built does neither -
I don't get menus, and parts of the taskbar get overwritten.

I poked around in the Embedded Visual help files and the
platform SDK but couldn't find any way to move the taskbar,
so I assume it's some sort of undocumented hack or registry
setting...

Any ideas? Clues?

Any help appreciated.


SubjectRe: Compiling MAMEBoy part 2 Reply to this message
Posted byMarconelly!
Posted on02/27/01 04:43 PM



> I got MAMEBoy to compile and run. Great fun, now I can show
> a colleague of mine a full-speed Tempest with sound!
> (MAMECE runs Tempest but the sound is...of dubious quality).
>
> At first, I had been trying to replace the GAMEX calls
> with GAPI calls because the linker was dying on some
> GAMEX call and I thought, hey, it should probably be
> GAPI anyway.

No, as it is, MAMEBoy uses GameX with some tricks to make it work on EM-500 / E-125



> But that didn't work, so I looked more closely at the
> linker error and it was only failing to link to the
> OpenButtons function ("unresolved external blah blah blah").
>
> Changing the HWND in that function (in the gamex.h file) to
> a HANDLE fixed it so I could compile and run. I am happy
> to say it runs Tempest just fine (I uncommented Tempest in
> the driver.c line in core).
>
> BUT...I can't get the menu to show up. I have a PocketPC
> (Casio E-125) and it looks like MAMEBoy does a PsPC (WinCE
> 2.11) style menu thing...I think...

That's right. MAMEBoy is a 2.11 application. Which compiler have you used to compile it? Embedded Tools or a regular VC setup?



>anyway, the MAMEBoy I downloaded displays the menu at the >top of the screen and somehow manages to move Windows CE's >taskbar to the bottom of the screen. The MAMEBoy I built >does neither - I don't get menus, and parts of the taskbar >get overwritten. I poked around in the Embedded Visual >help files and the platform SDK but couldn't find any way >to move the taskbar,
> so I assume it's some sort of undocumented hack or registry
> setting...

Taskbar on the bottom is the standard 2.11 feature. Not tricks and hacks there. Menu on the top is also standard for 2.11

What you need to do is to move game display down (it's now centered as if the taskbar is down) To do that, look at the
GDIDisplay.c

Look for the code that looks like this:
//Center game display vertically on screen (if it's smaller than the screen)
if (This.m_DrawRect.bottom < 296 )
{
// This.m_DrawRect.top = ( 316 - This.m_DrawRect.bottom) / 2;
This.m_DrawRect.top = ( 296 - This.m_DrawRect.bottom) / 2;
This.m_DrawRect.bottom += This.m_DrawRect.top;
}

and play around with it. Shouldn't be too complicated. I'm dying to know how did you make it use gapi instead of gamex! Is there any speed increase comparing to a standard mameboy for E-125 that you can get from my site? Can you please send me your source with some brief explanation what you changed in it to make it use gapi?

my e-mail is radiosity@sympatico.ca




SubjectRe: Compiling MAMEBoy part 2 new Reply to this message
Posted bycps46
Posted on02/28/01 02:32 AM



[me:]
>>anyway, the MAMEBoy I downloaded displays the menu at the
>>top of the screen and somehow manages to move Windows
>>CE's taskbar to the bottom of the screen.

>>The MAMEBoy I built does neither - I don't get menus, and
>>parts of the taskbar get overwritten. I poked around in
>>the Embedded Visual help files and the platform SDK but
>>couldn't find any way to move the taskbar, so I assume
>>it's some sort of undocumented hack or registry
>> setting...

[marconelly:]
> Taskbar on the bottom is the standard 2.11 feature. Not
> tricks and hacks there.
> Menu on the top is also standard for 2.11

But the MAMEBoy I got (from the MAMEBoy site) successfully
moves the PocketPC taskbar to the bottom of the screen
and shows the menu at the top. The MAMEBoy I built from
the sources I downloaded from the same site does neither.
That's what I'm confused / wondering about. There's a
command bar create, command bar show, etc. but nothing
happens (and I tried clicking around for invisible menus
too!). I adjusted the client rect up and down but got
no love.

> What you need to do is to move game display down (it's
> now centered as if the taskbar is down) To do that, look
> at the GDIDisplay.c
>
> Look for the code that looks like this:
> [...]

Thanks, I'll check this out. I already did some messing
around with the windows client rect and stuff but didn't
get very far.

> I'm dying to know how did you make it use gapi instead of
> gamex!

Sorry to disappoint you...but I didn't. At first, I thought
I would need to (because of the GAMEX linker errors), but
I couldn't get it to work.

What I was doing was using the CGAMEX.CPP file from the
iMAME source distribution. It's basically the same
interface as MAMEBoy's CGAMEX.CPP but modified so that
internally the functions use GAPI (GX).

> Is there any speed increase comparing to
> a standard mameboy for E-125 that you can get from my
> site? Can you please send me your source with some brief
> explanation what you changed in it to make it use
> gapi?

Well, when I was trying this, I did get it to compile, but
when I ran it it would give me a "no DSA" error. So I
looked around and it seemed the GXOpenDisplay (or whatever
it's called) wasn't getting passed an HWND, so I figured
that was the reason it was failing. Then I tried to
figure out which HWND to give it and figured the
"MAME32_CreateWindow" or whatever function's local hWnd
was the one to use, since that was the display window
(sorry, I don't have my source in front of me and I've
had a long day). So I moved the GAMEX open/close calls
around a bit, but no success. I think I did finally get the
thing to run but starting a game would just hang it.

I honestly haven't ever sat down and really looked at
the source properly, I just wanted to recompile it so
I could add in the Tempest driver. But I am interested
in playing around with it some more, since MAMECE (although
very good) is too slow on my E-125, and MAMEBoy so nice
and fast.

Cliff




SubjectRe: Compiling MAMEBoy part 2 new Reply to this message
Posted bycps46
Posted on02/28/01 02:35 AM



Sorry, forgot to answer:


>> BUT...I can't get the menu to show up. I have a PocketPC
>> (Casio E-125) and it looks like MAMEBoy does a PsPC
>> (WinCE 2.11) style menu thing...I think...
>
> That's right. MAMEBoy is a 2.11 application. Which
> compiler have you used to compile it? Embedded Tools or a
> regular VC setup?

Embedded Tools. I used the MAMEBoy source and changed a
few things like the button codes and adding a driver.

Cliff




SubjectRe: Compiling MAMEBoy part 2 new Reply to this message
Posted byMarconelly!
Posted on02/28/01 09:31 AM



> But the MAMEBoy I got (from the MAMEBoy site) successfully
> moves the PocketPC taskbar to the bottom of the screen
> and shows the menu at the top. The MAMEBoy I built from
> the sources I downloaded from the same site does neither.
> That's what I'm confused / wondering about. There's a
> command bar create, command bar show, etc. but nothing
> happens (and I tried clicking around for invisible menus
> too!). I adjusted the client rect up and down but got
> no love.

That's true. Problem is that you're using Embedded tools for compiling which are made to produce Wince 3.0 code. I use Visual C++ 6 with WinCE tools for VC and WinCE 2.11 SDK.
With that setup, source compiles perfectly and the menu and task bar are visible.


> What I was doing was using the CGAMEX.CPP file from the
> iMAME source distribution. It's basically the same
> interface as MAMEBoy's CGAMEX.CPP but modified so that
> internally the functions use GAPI (GX).

But if it uses gx internally... Did you make it work like that at the end?


> I honestly haven't ever sat down and really looked at
> the source properly, I just wanted to recompile it so
> I could add in the Tempest driver. But I am interested
> in playing around with it some more, since MAMECE (although
> very good) is too slow on my E-125, and MAMEBoy so nice
> and fast.

I'll release the version with several requested game supported. Tempest will be among them, so if you don't get too far in making it work, you'll just have to wait a bit more.




SubjectRe: Compiling MAMEBoy part 2 new Reply to this message
Posted bycps46
Posted on02/28/01 05:40 PM



<...>

> That's true. Problem is that you're using Embedded tools
> for compiling which are made to produce Wince 3.0 code. I
> use Visual C++ 6 with WinCE tools for VC and WinCE 2.11
> SDK.
> With that setup, source compiles perfectly and the menu
> and task bar are visible.

Ah, that explains it. Thanks.
>
>
> > What I was doing was using the CGAMEX.CPP file from the
> > iMAME source distribution. It's basically the same
> > interface as MAMEBoy's CGAMEX.CPP but modified so that
> > internally the functions use GAPI (GX).
>
> But if it uses gx internally... Did you make it work like > that at the end?

No; like I said, it was failing on initialization, possibly
for lack of an HWND. I did get it to run at one point but
just got a black screen after starting a game.



> I'll release the version with several requested game
> supported. Tempest will be among them, so if you don't
> get too far in making it work, you'll just have to
> wait a bit more.

I have it building & working, with Tempest. I just don't
have a menu and taskbar -- which I don't really mind
anyway, it would just be nice. This weekend I'll look at
the source a bit more and see if I can figure out how
to get that going as well.




Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode