English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.WinUAE (http://eab.abime.net/forumdisplay.php?f=5)
-   -   Question about Pipes in WinUAE. (http://eab.abime.net/showthread.php?t=68761)

olesio 12 April 2013 21:18

Question about Pipes in WinUAE.
Hello. @Toni Wilen: sorry for lame question, but is it Windows PIPES are always single access? Or it is any way to access to "\\.\pipe\WinUAE" PIPE from other process if that pipe is already opened/created by some process? So always ERROR_PIPE_BUSY will be returned? As far as maybe you remember you gave me C or C++ example code with your small ipctester. I lost file with source code, but I saved executable. And it can only connect only if pipe is not in use. Is there any way to check for example WinUAE's debugger while sending commands to debugger and read output while typing specified commands in other program? Not exacly in the same time, but without Closing Handles? And I tried by reversing WinUAE opcodes and changing nMaxInstances parameters in CreateNamedPipeW function from to for example 3a but that wont help. And I edited binary, from low C/C++ knowledge reason and recompile winuae source code by myself. Thank you in advice for reply. And like always - sorry for my bad English.

Toni Wilen 13 April 2013 09:54

That pipe was designed to be used only by one "user". It can be made "multiuser" but..

olesio 13 April 2013 13:30

But...? You do not want to implement this? Ok, thanks for answer anyway. And one more question and problem. I prepared something like d3d9.dll wrapper to use external configuration - like ini - files for build game trainers for my usage. When pressing set - in mentioned ini - keys like for example F1, some operations are done. For "dbg m..." and "dbg W..." sending by pipe all is ok. But for example if I want to use command "g address" for incrasing rockets or grenades in WHDLoad version of "Cannon Fodder". They are incrased but in some moments game is crash to CLI with WHDLoad error "Illegall instruction ... ($10)". If I send you on PM part of Delphi code can you help me somehow and tell how to fix it? I always get 404 result after use that command. I'm using: "g 9B3C4" for incrasing grenades by four and "g 9B410" for incrasing rockets by four. When entring these commands in debugger everything is ok. But sending them by pipe and WriteFile WinApi funnction caused crashs. Any idea how to help me? If more detailed info with source code on PM needed, please let me know. Thank you in advice and once again sorry for my bad English.

Toni Wilen 13 April 2013 14:00

Implement? Maybe if there is good enough reason :)

g <addr> won't work, think about what happens if CPU is in interrupt routine for example. Changing CPU's program counter using debugger is never going to be safe.

olesio 13 April 2013 14:38

Toni: the reason for implement many access to pipe in my opinion is using debugger from your ipctester under fullscreen ConEmu console to clearly see what going on in memory ;) But maybe it is useful only for me :/ And about command "g address" - it works fine under debugger. And I can incrase grenades and/or rockets more than 50 items. What is limited by seting it with W command. So in case of incrasing by "g" command I do not need to affraid of 50 items limitation. So there is no way to use g command by WriteFile under debugger and pipe without crashing in "Cannon Fodder" case or maybe in other games?

Toni Wilen 13 April 2013 16:52

You are depending on undefined behavior, debugger usually breaks at hpos/vpos=(0,0) and usually CPU PC points to vblank routine's first instruction.

But there is no guarantee it happens. Which is exactly what happens when you use pipe to send commands.

olesio 13 April 2013 17:48

Ok, thanks for answer.

All times are GMT +2. The time now is 17:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.05761 seconds with 11 queries