PDA

View Full Version : About the PAL Patcher! Megalexx, please enter.


Team Crystal
14-09-2004, 07:00
Megalex, do you have the source-code of the PAL Patcher?

I want to make a tool like that you created.

If you don't, can you give me some tips to make one? ^_^

If you want, we can talk about this on ICQ (my number is: 169729609) ou in MSN (alex_encarnacao**********com).

Thanks! \o

Note: I don't speak english, but i try it! =P My native language is Brazillian Portuguese.

Megalexxx
14-09-2004, 08:12
Of course I've got the source code !
I WROTE IT !!!

But, since I spent hours and hours on it, I won't spread it.
Tell us what you want to do, and you might get some help.

Team Crystal
14-09-2004, 10:07
Of course I've got the source code !
I WROTE IT !!!

But, since I spent hours and hours on it, I won't spread it.
Tell us what you want to do, and you might get some help.

Of course! ^_^
How you it wrote the code I really I know! =) What I do not know I am
if you still have it.

Who knows what it can have happened with it! = P

This is my homepage - http://kte.seganet.com.br

It's a Portuguese Brasilian site.

I'm making some tools for Dreamcast and i want to make a one tool that can handle all of the problems that Dreamcast users have with his games.

I've realeased two tools for help: Adx2Mp3 (a gui to Adx2Mp3.com created by InfectedBajs) and the Afs2Adx (a gui for Adx2Afs to extract ADX filies from AFS files).

So i want to study your source and if is possible, insert it (with your permission, of course) in the system that i'm trying to make.

I've had some things to fix to the another programs anyway, like this:

- While the adx2mp3.com runs, the main GUI when switched with another window, can be white until the adx2mp3.com program closes.

I' ve read one of your documents, in the case, the readme file of PalPatcher, and i see that you have the same problem to adjust it [when the DiscJuggler file is been scanned]. I've been searched, but i can't find a tip to adjust this, but to use with the adx2mp3.com.

Do you have time to help me? ^_^
Tell yes, please! ;)

Please take a look on the site! ^_^
Thanks again! \o

Used Systran translator: Portuguese --> English! =P

Megalexxx
14-09-2004, 11:27
I'm sorry, but I don't have much time indeed...

I think I know your problem : Adx2Mp3.com takes all the CPU and your program can't refresh. You should try using threads...
Which programming language do you use ?

Team Crystal
14-09-2004, 12:30
I'm sorry, but I don't have much time indeed...

I think I know your problem : Adx2Mp3.com takes all the CPU and your program can't refresh. You should try using threads...
Which programming language do you use ?

Borland Delphi (Pascal).

I've tried some events like "OnActivate" to use the Update.

For example:

frm_adx2mp3.update;

or

frm_adx2mp3.refresh;

Megalexxx
14-09-2004, 23:59
It won't be enough...

Create a thread (look for it in Delphi's help), and then, call your converter inside this thread.

Team Crystal
15-09-2004, 12:48
It won't be enough...

Create a thread (look for it in Delphi's help), and then, call your converter inside this thread.

Look, i was doing this?

for i:=1 to Lst_Items.Items.Count do

(verify itens. Count one, by one)

begin

frm_adx2mp3.Update; (i tried to use this method to avoid white screens, but it doesn't works. ._.)

Origem:=GetShortFileName(Lst_Items.Items[0].caption)+' '+GetShortFileName(Relativo)+ExtractName(Extractfi lename(Lst_Items.Items[0].Caption))+'.mp3';

(var that receives the source of the ADX files and rename then to MP3 with the destiny selected at the start of this procedure)

ExecAndWait(Pchar(Aplicativo), Pchar(Origem), SW_HIDE);

(runs the funtion ExecAndWait to run the program and wait for the end to continue. The variable Aplicativo have received a string source of the program with the function at start of this procedure:

Aplicativo:=ExtractFilePath( Application.ExeName )+'NAME OF APLICATON';)

Lst_Items.items[0].delete;

(delete the first item of the list, to the program run the next one)
end;

----

function ExecAndWait(const FileName, Params: string;
const WindowState: Word): boolean;
var
SUInfo: TStartupInfo;
ProcInfo: TProcessInformation;
CmdLine: string;
begin
CmdLine := '"' + Filename + '"' + Params;
FillChar(SUInfo, SizeOf(SUInfo), #0);
with SUInfo do begin
cb := SizeOf(SUInfo);
dwFlags := STARTF_USESHOWWINDOW;
wShowWindow := WindowState;
end;
Result := CreateProcess(nil, PChar(CmdLine), nil, nil, false,
CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil,
PChar(ExtractFilePath(Filename)), SUInfo, ProcInfo);


if Result then begin
WaitForSingleObject(ProcInfo.hProcess, INFINITE);

CloseHandle(ProcInfo.hProcess);
CloseHandle(ProcInfo.hThread);
end;
end;

This was the function that i have used to use an external program.

---

I have an ideia! =)
Can you give me an example to avoid this with another type of program?
If you still on my place, what you will do?

Megalexxx
16-09-2004, 00:03
You should try to get the source code for RazorLame (it's a frontend for the famous MP3 encoder). It uses a unit called "redirect". I think you'll find what you need.

Team Crystal
16-09-2004, 05:20
You should try to get the source code for RazorLame (it's a frontend for the famous MP3 encoder). It uses a unit called "redirect". I think you'll find what you need.

Oh great! \o/
I' ll try! Thanks again Megalexxx! \o/