Recent Posts

Pages: [1] 2 3 ... 10
1
Programming / Re: DosDevIOCtl disabling keyboard in VIO mode
« Last post by kerravon on Today at 11:00:12 am »
Your call to DosDevIOCtl to get old input mode has been coded incorrectly. Should use the parameter packet rather than the data packet.

Thanks for that - you had me excited that there was finally hope.

Unfortunately, with this code:

parmlen = sizeof oldbb;
datalen = 0;
/* get old input mode */
rc = DosDevIOCtl(kbdfile,
            4,
            0x71,
            &oldbb,
            sizeof oldbb,
            &parmlen,
            NULL,
            0,
            &datalen);

printf("rc is %d\n", rc);


I get rc of 87 which is apparently:

bseerr.h: #define ERROR_INVALID_PARAMETER         87


Also note that the original code, when run in fullscreen mode, returns a sensible 0, indicating text mode.

Did I make a second mistake in the above code?

Thanks. Paul.
2
Programming / Re: DosDevIOCtl disabling keyboard in VIO mode
« Last post by Wim Brul on Today at 10:22:10 am »
Your call to DosDevIOCtl to get old input mode has been coded incorrectly. Should use the parameter packet rather than the data packet.
3
Programming / DosDevIOCtl disabling keyboard in VIO mode
« Last post by kerravon on Today at 09:24:07 am »
Running this program in fullscreen mode works fine.

Running it in a VIO window causes the keyboard to be disabled and I need to use the mouse to reboot (CAD also works to initiate a reboot).

Can someone tell me:

1. Are the results (that I noted as strange) correct operation of the OS/2 functions?

2. Is there a way of getting these functions to work as intended (ie switch to binary mode, then switch back to text mode, as the Physical Device Driver Reference documents as supported functionality)?

Note that the switch to binary mode IS successful - even in the VIO windows - and my real (larger) app does work fine (that app doesn't switch back to text mode until termination time though, so I don't see a problem). It's only after it terminates that I have an issue, which is ironic.

Also note that I am aware of the Kbd* functions that could be used instead, but I don't wish to do thunking (including automated compiler thunking) *in my executable*.

If I use the DosDevIOCtl function, my executable is pure 32-bit. What happens in the doscalls.dll I don't care about. At least nominally I have no insight into that, as it is OS/2 internals, and those internals could change overnight. Also I am not interested in using high memory. This isn't a question about high memory. I will be using standard 32-bit DosOpen and standard 32-bit DosDevIOCtl (ordinal 284 in doscalls.dll or equivalent).

Note that I am using ArcaOS 5.0.8.

Code below.

Thanks. Paul.


wcl386 -bt=os2 -l=os2v2 pdptest.c os2386.lib -"option map"


#include <stdio.h>

#define INCL_DOS
#include <os2.h>

int main(void)
{
    ULONG kbdfile;
    static USHORT fileAttr = 0;
    static ULONG newsize = 0;
    ULONG action;
    static ULONG openMode = OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE;
    static ULONG openAction = OPEN_ACTION_OPEN_IF_EXISTS;
    ULONG datalen;
    ULONG parmlen;
    USHORT rc;
    BYTE bb;
    static BYTE oldbb;

    rc = DosOpen((PSZ)"KBD$",
                 &kbdfile,
                 &action,
                 newsize,
                 fileAttr,
                 openAction,
                 openMode,
                 0);
    if (rc != 0)
    {
        return (-1);
    }

    parmlen = 0;
    datalen = sizeof oldbb;
    /* get old input mode */
    rc = DosDevIOCtl(kbdfile,
                4,
                0x71,
                NULL,
                0,
                &parmlen,
                &oldbb,
                sizeof oldbb,
                &datalen);

    printf("rc is %d\n", rc);
    printf("surprisingly, oldmode is already binary %x\n", (int)oldbb);
   
    printf("surprisingly, we need to set binary mode, even though it is already set\n");
    /* set binary mode */
    bb = 0x80;
    parmlen = sizeof bb;
    datalen = 0;
    rc = DosDevIOCtl(kbdfile,
                4,
                0x51,
                &bb,
                sizeof bb,
                &parmlen,
                NULL,
                0,
                &datalen);

    printf("rc is %d\n", rc);
    printf("restoring old (binary) mode is identical and useless and behavior is same\n");
    printf("so setting text mode instead\n");
    oldbb = 0;
    parmlen = sizeof oldbb;
    datalen = 0;
    rc = DosDevIOCtl(kbdfile,
                     4,
                     0x51,
                     &oldbb,
                     sizeof oldbb,
                     &parmlen,
                     NULL,
                     0,
                     &datalen);
    printf("rc is %d\n", rc);
    rc = DosClose(kbdfile);
    printf("rc is %d\n", rc);
    printf("surprisingly, keyboard is now inoperative and you need to use mouse to reboot\n");
    return (0);
}
4
Storage / Re: How to properly setup a working FAT32 USB stick?
« Last post by David Graser on March 01, 2024, 09:06:25 pm »
Martin, you ariticle is spot on.  Still valid.  Using the DFSee script option makes everything easy.
5
Utilities / Re: vncserver setup
« Last post by Martin Iturbide on March 01, 2024, 08:09:08 pm »
Hello

I just rebooted my system.   Looks like it required a reboot. 

Good to know it is working.

In the case of "xsystray-0_1_1.wpi", when you install a xCenter plugin, it requires xCenter to restart.
Maybe that is why once you rebooted your machine, you were able to see the VNC icon on the xCenter.

Regards

6
Storage / Re: How to properly setup a working FAT32 USB stick?
« Last post by Martin Iturbide on March 01, 2024, 08:05:33 pm »
Hello

I have this article on the wiki: https://www.os2world.com/wiki/index.php?title=Prepare_the_FAT32_USB_Flash_Drive

Let me know if it is still valid, thanks for the Arca Noae link, I had added it there too.

Regards
7
Comments, Suggestions & Questions / Re: Hobbes (Files) Reoganization
« Last post by Martin Iturbide on March 01, 2024, 05:26:16 pm »
Thanks Tom for the links.

HobbesArchive.com is having some power issues and hopefully it will be back on Tuesday so we can have again uploads.

The mirrors are still working:
http://us01.hobbesarchive.com/
http://de01.hobbesarchive.com/
http://uk01.hobbesarchive.com/
http://br01.hobbesarchive.com/

Regards
8
Storage / Re: How to properly setup a working FAT32 USB stick?
« Last post by David Graser on March 01, 2024, 04:40:33 pm »
Thanks Tom!  That did the trick. 
9
Comments, Suggestions & Questions / Re: Hobbes (Files) Reoganization
« Last post by Tom on March 01, 2024, 04:29:23 pm »
10
Storage / Re: How to properly setup a working FAT32 USB stick?
« Last post by Tom on March 01, 2024, 04:22:08 pm »
I can no longer get newly bought USB flash drives to work under ArcaOS 5.1.  In the past, I used the reformat.exe tool from the Essentials Package.  Its license expired.  I have tried formatting with ArcaOS and DFSee to no avail. I always get unknown drive after formatting in Windows or DFSee.  I have to admit I am guessing when using DFSee to format the drives.   What I find strange is both Windows and DFSee recognize it as a fat32 drive, but ArcaOS does not.

My question is what are the proper steps to get properly formatted FAT32 working drives under ArcaOS?

In DFSee: menu Scripts --> Make FAT32 Data (USB) disk
That also adds LVM information, that is needed to be usable under AOS. Just reformatting doesn't add LVM informastion.
Pages: [1] 2 3 ... 10