newps 0.4 17.7.96 by Andreas E. Bombe Introduction (What the hell is it?) newps is a shell command with which you can create your own public screens. I wrote this little tool because there are some programs which do not offer any options to open on their windows on their own screens, but do offer options to open on public screens. Since I don't want to run everything on the workbench screen, I need to open new public screens myself, and to do this easily (and automated from scripts) newps was written. It allows to specify the name and resolution, size, etc. of a screen on the command line and will close the screen on its own after the last window is closed on it. Disclaimer (blablabla...) This small piece of software is Freeware, this means you can use it for free. You can also distribute it freely, as long as you don't make any profit with it and don't change the distribution. Furthermore I cannot be made responsible for any damages to your software, your hardware, your mental health or your home being invaded by extra terrestrians. Please note that this piece of software is still in beta stage, i.e. it has not been thoroughly tested and may crash your mashine when used. Usage (How does this ^#§!=*&% thing work???) After the program is started, it will try to open the specified screen and will then wait for ctrl c to be pressed or the last window on this screen to be closed and then close the screen. With WAITCTRLC it can be configured only to wait for ctrl c and thus leaving the screen open even if all windows on it are closed. Template: newps NAME/A,TITLE/K,SCREENMODE=SCRM/K,WIDTH=W/K/N,HEIGHT=H/K/N, DEPTH=D/K/N,WAITCTRLC/S,DEFDIMS/S,DEFPENS/S Arguments: NAME Needs to specified, this is the name of the public screen. TITLE This is the title shown at the top of the screen. If this is not specified, the public screen name will be used as title. SCREENMODE Now to the complicated part. I wanted to create a small tool, so there are only hexadecimal ModeIDs accepted, which are quite difficult to construct (for non-programmers), see below for some examples. If this is not specified, the Workbench screen mode will be used. WIDTH Specifies the width of the screen, which can be wider than the resolution width (in this case the screen will be scrolled). If this is not specified, the Workbench screen width will be used. HEIGHT Same as WIDTH, but for height. DEPTH Specifies the number of colors in number of bitplanes. This means this number will be used as exponent to the base 2 to create the number of colors ( 1 plane -> 2 colors, 4 planes -> 16 colors, etc.). If this is not specified, again the Workbench value will be used. WAITCTRLC By default, newps will close the public screen and terminate when the last window on its screen is closed. If this is not wanted, specify WAITCTRLC and newps will wait for a ctrl c before trying to close the screen. DEFDIMS If you don't specify width or height, the Workbench values will be used. But if you simply want the default text overscan size without specifying width and height, set this switch. DEFPENS By setting this switch, the new screen will get the system default pens instead of a copy of the Workbench screen ones. Some of the most important screen modes (now it gets complicated...) On default monitor: Hires 0x8000 Superhires 0x8020 Hires/laced 0x8004 SHires/laced 0x8024 NTSC: add 0x11000 to def monitor values PAL: add 0x21000 to def monitor values Euro36: add 0x71000 to def monitor values Super72: add 0x81000 to def monitor values DblNTSC: add 0x91000 to def monitor values DblPAL: add 0xa1000 to def monitor values Multiscan/VGA: Productivity 0x39024 Product'/laced 0x39025 Euro72: LowRes 0x69004 Productivity 0x69024 LowRes/laced 0x69005 Product'/laced 0x69025 A2024: 10 Hz 0x41000 15 Hz 0x49000 Known Bugs (grmph) An Enforcer hit (word read from 0x0014) is created if newps fails to open the screen. I can't find the bug in my source code, so it might be a problem of the Maxon EasyObjects C++ classes, which are used in this program. History newps 0.1 (15.7.96) 11:56:28 by andreasb@destiny First running version newps 0.2 (15.7.96) 12:29:55 by andreasb@destiny Changed behaviour when trying to close screen while a window is still locking it (requester will appear only once on each attempt to close screen with ctrl c) newps 0.3 (15.7.96) 14:30:52 by andreasb@destiny Added DEFDIMS switch Fixed a serious bug in signal handling (a function to determine the signal number was used before the signal class was constructed :-P ) newps 0.4 (16.7.96) 19:15:15 by andreasb@destiny Changed library minimum versions down to 37 The Author (the almighty one...) Send bug reports, suggestions, thanks, lots of money and hardware to: EMail: andreas.bombe@munich.netsurf.de Home page: http://home.pages.de/~andreas.bombe/ or http://homepages.munich.netsurf.de/Andreas.Bombe/ (you can get the latest version of this program and my PGP public key there) SnailMail: Andreas Bombe Hansjakobstr. 123a 81825 München Germany