Emuforums.com

Go Back   Emuforums.com > Handheld Emulation > No$GBA Discussion
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old July 8th, 2008   #1 (permalink)
Registered User
 
Join Date: Jul 2008
Location: South Korea, Seoul
Posts: 4
Thumbs up Integrating no$gba as a easter egg

I am interested in integrating the no$gba as a easter egg inside my Windows C++ application -- a semi-commercial tool.

However, I need to hide it inside my executable...
Can I get a static lib of this?

Then, I can invoke it from some secret key strokes inside my application, and play some cool handmade game.....
seankang is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old July 8th, 2008   #2 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
No, there is no static library of No$GBA.

The closest way you can do it is:

* Embed No$GBA as a binary resource item in your executable
* Extract the resource item
* Use CreateProcess to spawn a instance of No$GBA
mudlord is offline   Reply With Quote
Old July 8th, 2008   #3 (permalink)
Registered User
 
Join Date: Jul 2008
Location: South Korea, Seoul
Posts: 4
I think I know how to do steps #1 and #2. But I am not sure how to do #3... Can you post source code sample or references on this?

and.. sorry for asking these questions without researching myself.. (I am short on time before the software gets released)... How does a person build a homebrew game for this emulator? My dream game would look like matrix or quake, where there is some monsters that look like my team mates....

Last edited by seankang; July 8th, 2008 at 06:41.. Reason: Automerged Doublepost
seankang is offline   Reply With Quote
Old July 8th, 2008   #4 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
Code:

#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <conio.h>

void _tmain( int argc, TCHAR *argv[] )
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
STARTUPINFO sj;
PROCESS_INFORMATION pj;

ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );

ZeroMemory( &sj, sizeof(sj) );
sj.cb = sizeof(sj);
ZeroMemory( &pj, sizeof(pj) );

// Start the child process p1.exe. Make sure p1.exe is in the
// same folder as current application. Otherwise write the full path in first argument.
if(!CreateProcess(L".\\p1.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &sj, &pj))
{
printf( "Hello CreateProcess failed (%d)\n", GetLastError() );
getch();
return;
}

// Start child process p2.exe. Make sure p2.exe is in the
// same folder as current application. Otherwise write the full path in first argument.
if(!CreateProcess(L".\\p2.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
printf( "CreateProcess2 failed (%d)\n", GetLastError() );
getch();
return;
}

// Wait until child processes exit.
WaitForSingleObject( pi.hProcess, INFINITE );
WaitForSingleObject( pj.hProcess, INFINITE );

// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
CloseHandle( pj.hProcess );
CloseHandle( pj.hThread );
getch();
}
There's a example in how to use CreateProcess. You need to however, use the extracted binary path as the argument for the executable in CreateProcess().

Quote:
How does a person build a homebrew game for this emulator?
I would recommend seeing GBADev for that question.

Last edited by mudlord; July 8th, 2008 at 07:11.. Reason: Automerged Doublepost
mudlord is offline   Reply With Quote
Old July 8th, 2008   #5 (permalink)
Hopeless Optimist
 
Smilley's Avatar
 
Join Date: Nov 2007
Location: Austria
Posts: 1,047
Not to bicker, but isn't that copyright violation? To my best knowledge, the No$-series is spiritual property of Martin.
Smilley is offline   Reply With Quote
Old July 8th, 2008   #6 (permalink)
Away
 
Join Date: Jan 2008
Location: India
Posts: 1,219
@Smiley: Its for some kind of integration. Its not the source code, since Martin has that, and he didn't released it yet.
V1ncent is offline   Reply With Quote
Old July 8th, 2008   #7 (permalink)
Registered User
 
Join Date: Jul 2008
Location: South Korea, Seoul
Posts: 4
Smile very cool.. will try this.

very cool. thanks. I will try this....

and if there is any spiritual issue in doing this.... please let me know.. I will ask "permission" from the appropriate person...
seankang is offline   Reply With Quote
Old July 8th, 2008   #8 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
Quote:
Not to bicker, but isn't that copyright violation? To my best knowledge, the No$-series is spiritual property of Martin.
No.
Embedding a EXE inside another EXE is not illegal.
mudlord is offline   Reply With Quote
Old July 8th, 2008   #9 (permalink)
Behind ur girlfriend :D
 
Squall-Leonhart's Avatar
 
Join Date: Feb 2006
Location: Sydney, Australia
Posts: 18,950
NoGBA cannot be distributed with commercial software.
__________________


VBA-M | Xtemu | NGOHQ | Post Impact Productions | TNHW | XBCD 0.2.6 | Satanic666's Emulator Compiles
Don't be a NOOB, READ THE NGEmu/EmuForums Rules of Conduct
Need Help with ePSXe? This is your first stop!.

If you don't post all the required information, you don't get help.
Everytime someone posts a romsite, God kills a beautiful woman.
Squall-Leonhart is online now   Reply With Quote
Old July 8th, 2008   #10 (permalink)
Emulation Master
 
MasterPhW's Avatar
 
Join Date: Mar 2004
Location: in-hell
Posts: 389
Quote:
Originally Posted by Squall-Leonhart View Post
NoGBA cannot be distributed with commercial software.
Yeah, I thought the same.
He could use parts of VBA instead, because it's open source.
__________________
The Future of Emulation: Emulate a High End Computer on a Low End System
Current PC specs:
Portable: Intel C2D T7250 (2x2.0Ghz, 800Mhz) | 2048 MB DDR2 PC800 | Geforce Go 7950 GTX PCI-E | Realtek HD Audio |
180Gbyte Internal SATA2 + 4x500GB external | Windows Vista Business X64 MSDNAA
Desktop: AMD Athlon 64 X2 4200+ (2x2.5Ghz, S939) | MSI KbT Neo2-F V2.0
| 2x1GB Corsair Value VS1GBKIT400 | MSI Geforce NX 7800GS-TD256/AGP8x
| Creative SB Audigy LS | 2,5TB (4 SATA2 HDDs in Raid0) | Windows Vista Business MSDNAA


Visit my Blog
MasterPhW is offline   Reply With Quote
Old July 8th, 2008   #11 (permalink)
Registered User
 
Join Date: Jul 2008
Location: South Korea, Seoul
Posts: 4
which part of the GBA is open source? And where is that source ?
seankang is offline   Reply With Quote
Old July 8th, 2008   #12 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
VBA can't be used.

The license is viral, so anything it uses MUST be GPL or GPL compatible.
mudlord is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 22:51.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5