Testing experimental printer

Discussion of development and patch submission.
Post Reply
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Testing experimental printer

Post by ruben_balea »

Update: I renamed this post because the bug was already known but I will use it to continue reporting my experiences with the experimental printer feature

After compiling the latest source (on MinGW64 Windows 10) I found that now pcem.exe process is not terminated after closing all windows.

Code: Select all

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file src\libpcem.dll: Permission denied
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
It was because pcem.exe was still running since the last time I tested it, in fact I had like 6 or 7 pcem processes running...


The other thing that is not worth opening another bug is that I tried to compile it with the experimental functions:

Code: Select all

cmake -G Ninja -DMSYS=TRUE -DUSE_NETWORKING=ON -DUSE_EXPERIMENTAL=ON -DUSE_EXPERIMENTAL_PRINTER=ON -DUSE_EXPERIMENTAL_PGC=ON -DCMAKE_BUILD_TYPE=Release ..
And it shows this error:

Code: Select all

C:/msys64/home/Windows10-User1/pcem/src/lpt/lpt_epsonlx810.c:1684:26: warning: implicit declaration of function 'CaptureMouse'; did you mean 'SDL_CaptureMouse'? [-Wimplicit-function-declaration]
 1684 |                          CaptureMouse();
      |                          ^~~~~~~~~~~~
      |                          SDL_CaptureMouse
ninja: build stopped: subcommand failed.

To see if everything else was OK I commented out lines 1863 and 1864 and then it compiles OK but then of course when printing with the emulated printer the mouse stops working...
Last edited by ruben_balea on Sun 23 Jan, 2022 12:12 pm, edited 1 time in total.
User avatar
MichaelJManley
Posts: 54
Joined: Fri 17 Dec, 2021 9:42 pm

Re: [BUG] Zombie PCem and another problem

Post by MichaelJManley »

I do know about the bug with pcem not closing properly, it is bug #90 https://github.com/sarah-walker-pcem/pcem/issues/90

Did not know about the printer issue. The code is a tad buggy and i have yet to test on Windows thats why it is in experimental.
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: [BUG] Zombie PCem and another problem

Post by ruben_balea »

MichaelJManley wrote: Sat 22 Jan, 2022 11:00 pm I do know about the bug with pcem not closing properly, it is bug #90 https://github.com/sarah-walker-pcem/pcem/issues/90

Did not know about the printer issue. The code is a tad buggy and i have yet to test on Windows thats why it is in experimental.
Oh sorry, I totally forgot to check it out on GitHub too, I thought it was something new because I hadn't noticed it until this last build... I will sign up on Github to receive notifications about the project issues.

I also do not intend to add any priority or hurry to the printer or any other experimental function, I just wanted to report that it seemed to work fine, and yes, it was actually working fine! after further testing I can confirm that commenting out those lines doesn't seem to do anything adverse to mouse capture, what was really wrong was that my mouse middle button switch was a bit corroded and becoming unresponsive :roll:
Actually the mouse and keyboard stopped responding under DOS or Windows because they freeze during the printing of each page... I haven't used parallel port printers for 23 or 24 years but I think that happened with physical machines too, at least an old flatbed scanner that I used up until 2005 did freeze windows 9x/ME completely while it was sending back the image to the computer.

Although I only tested the printing from MS-DOS 6.22 + Windows 3.11 and only with PNG/BMP/TIFF/Redirect to real printer outputs, both in single and multi page mode, and redirected to the "Microsoft Print to PDF" virtual printer.
The only problem is due to bug #90 too, in multipage mode with real printer the output file (since I'm printing to a PDF file) remains open and can't be used by other programs until the pcem process is killed with the task manager.

Here are a few things I've made a note of in case they are of any help, just ignore what you already know:
- Sometimes Windows 10 starts to create the PDF file like 10-30 seconds after exiting PCem (while it's still running windowless) and then a few times PCem finally ended its process when printing was done, but only a few times.
- Printing from W3.11 Write and Paint is fine but Notepad fails every time, sometimes Windows just vanishes and PCem continues running DOS apparently OK and other times it closes the whole PCem...
- Printing from MR 386DX CMOS setup using print screen key closes PCem too.
- Printing from DOS using print screen key or from edit.com won't launch the printer setup dialog until enough text (a whole page?) was sent to the printer.

I'm going reinstall my PS file viewer/converter because it refused to work after years without working with PS files (since Windows got the "Microsoft Print to PDF" virtual printer) and then will test a bit the PS output.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Testing experimental printer

Post by leilei »

I don't know what the cause of it is now but in the V17 days i've avoided mounting hard drives to avoid the everlasting process when messing about video-related emulation ideas. Just had some config to mount nothing and head to the WinBIOS
User avatar
MichaelJManley
Posts: 54
Joined: Fri 17 Dec, 2021 9:42 pm

Re: Testing experimental printer

Post by MichaelJManley »

Hey @ruben_balea I think I fixed the issue with zombie PCem's. I did a lot of refactoring where I basically moved most plugin engine stuff in its own dll. If you can test it a bit when you can. I ran it 10 times and it closed each time for me.

I ended up basically moving everything back to pcem.exe (why i did it the way I did initially I cant say, it was a dumb way of doing it) and this should hopefully get it back to working.
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Testing experimental printer

Post by ruben_balea »

leilei wrote: Mon 24 Jan, 2022 12:56 pm I don't know what the cause of it is now but in the V17 days i've avoided mounting hard drives to avoid the everlasting process when messing about video-related emulation ideas. Just had some config to mount nothing and head to the WinBIOS
I just tried it a few times before compiling the latest source code and this time it seemed to be due to something else because it was doing the same thing with or without a hard drive, and also with or without an IDE controller enabled.

MichaelJManley wrote: Mon 24 Jan, 2022 10:57 pm Hey @ruben_balea I think I fixed the issue with zombie PCem's. I did a lot of refactoring where I basically moved most plugin engine stuff in its own dll. If you can test it a bit when you can. I ran it 10 times and it closed each time for me.

I ended up basically moving everything back to pcem.exe (why i did it the way I did initially I cant say, it was a dumb way of doing it) and this should hopefully get it back to working.
Yeah, I see you had a busy day, I just got to the computer and I had several GitHub notifications about PCem (I only update the mail manually on the phone to avoid interruptions... and that when/if I remember)
I need some fun, so I'm going to try it right now :)
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Testing experimental printer

Post by ruben_balea »

Yes, now it always closes correctly, even if I crash PCem printing to the experimental printer from Windows 3.11 Notepad
Post Reply