Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Yep, that is correct. Due to it, I had to recompile my own OpenWatcom build using a different extender for runtime to continue using it (which is fine). I also continue investigating the root cause of that limitation. Just spoke to rEFInd developer to assess his opinion. Seems that he shares one of the comments from this thread, that there is most likely a limitation of CSM/BIOS implementation in Apple's own EFI implementation of the Legacy mode. But as this is nothing you can't go around with, it's not a show stopper to me to continue testing the environment. To wrap this up I wanted to thank you for identifying the direction for further investigation (keyboard controller with limited BIOS/CSM compatibility on the platform and a bug/trigger in DOS4GW that is generating the crash + error as the final outcome). I'm instantly glad that I've joined the group. Very competent and quick feedback that helped me keep the problem analysis narrow. Thank you, /h1 On Sun, Nov 15, 2020 at 6:23 AM TK Chia wrote: > Hello Ralf Quint, > > > I am not sure if you guys all missed a previous post where I said I > > found a reference that there are issues with some SMM BIOS > > implementations, providing legacy USB support (for keyboard and mice) > > and software that is trying to switch in "long mode" (which also might > > be used by some memory managers). > > Which could simply mean that this no-so-PC BIOS in that Mac just isn't > > up to snuff for these kind of things... > > Well, we do have some detailed information about this particular error. > Namely, there is a message saying "DOS/16M: [26] 8042 timeout", and > using a different DOS extender or pre-loading a DPMI host seems to work > around it. > > Thank you! > > -- > https://github.com/tkchia > > > ___ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Hello Ralf Quint, I am not sure if you guys all missed a previous post where I said I found a reference that there are issues with some SMM BIOS implementations, providing legacy USB support (for keyboard and mice) and software that is trying to switch in "long mode" (which also might be used by some memory managers). Which could simply mean that this no-so-PC BIOS in that Mac just isn't up to snuff for these kind of things... Well, we do have some detailed information about this particular error. Namely, there is a message saying "DOS/16M: [26] 8042 timeout", and using a different DOS extender or pre-loading a DPMI host seems to work around it. Thank you! -- https://github.com/tkchia ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
I am not sure if you guys all missed a previous post where I said I found a reference that there are issues with some SMM BIOS implementations, providing legacy USB support (for keyboard and mice) and software that is trying to switch in "long mode" (which also might be used by some memory managers). Which could simply mean that this no-so-PC BIOS in that Mac just isn't up to snuff for these kind of things... Ralf On 11/14/2020 4:34 AM, Eric Auer wrote: Hi! I like TK Chia's idea that DOS/16M tried to access the keyboard controller to change A20: It would probably stop doing that when HIMEM and/or EMM386 are loaded, but having a DPMI loaded can be even more convincing. Same for DOS4GW: If A20 control is already provided by something else, or protected mode is already being used, it is less likely to try to change the A20 itself. For PC, the BIOS tends to trap I/O to the controller so even USB keyboards can behave like real ones, but your iMac / rEFInd / CSM probably do not do this. You can still try whether one of the CTMOUSE versions is able to use the mouse via PS/2 BIOS calls with some suitable command line options. May depend on the model. VGA + VESA (graphics) works. It's discovered VESA 3.0 with LFB Quite nice :-) Sound card related experiments are still in front of me Expect only a few modern media players like MPXPLAY to support AC97 or HDA at all. If you want soundblaster compatibility, you would have to use emulators. There seems to be a DOSBOX-X version which can run inside DOS which might help with that, but the normal way would be to use Windows or Linux with DOSEMU2 ;-) Regards, Eric PS: No idea whether your CSM is rEFInd provided, Apple provided or from somewhere else. If you would know, you could simply read docs instead of testing it's features. Maybe some strings at f000:0 to f000: give answers? ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Hi! I like TK Chia's idea that DOS/16M tried to access the keyboard controller to change A20: It would probably stop doing that when HIMEM and/or EMM386 are loaded, but having a DPMI loaded can be even more convincing. Same for DOS4GW: If A20 control is already provided by something else, or protected mode is already being used, it is less likely to try to change the A20 itself. For PC, the BIOS tends to trap I/O to the controller so even USB keyboards can behave like real ones, but your iMac / rEFInd / CSM probably do not do this. You can still try whether one of the CTMOUSE versions is able to use the mouse via PS/2 BIOS calls with some suitable command line options. May depend on the model. > VGA + VESA (graphics) works. It's discovered VESA 3.0 with LFB Quite nice :-) > Sound card related experiments are still in front of me Expect only a few modern media players like MPXPLAY to support AC97 or HDA at all. If you want soundblaster compatibility, you would have to use emulators. There seems to be a DOSBOX-X version which can run inside DOS which might help with that, but the normal way would be to use Windows or Linux with DOSEMU2 ;-) Regards, Eric PS: No idea whether your CSM is rEFInd provided, Apple provided or from somewhere else. If you would know, you could simply read docs instead of testing it's features. Maybe some strings at f000:0 to f000: give answers? ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
This is a very interesting point regarding the keyboard. I have a standard USB keyboard (actually from Microsoft) that is connected to this iMac and standard HIC USB mouse that works with I think everything (including a few FPGA computers I run retro stuff on. With such a setup, the keyboard works at the system level. I can type commands, NC/NDN works and when I compile apps with Watcom standard keyboard related functions from stdio/stdlib work too (getch(), etc). But when I try to assess port 0x60 for keyboard events directly this mechanism does not trigger anything at all. Also mouse does not work, microsoft mouse.com and ctmouse both say I don't have a device connected to my computer. One of the prereq. exercises I wanted to check is to try some code I found on the internet to directly connect to my USB mouse interface and discover it without PS/2 emulation VGA + VESA (graphics) works. It's discovered VESA 3.0 with LFB, all the resolution that this Mac supports on Windows/Mac are enslisted via video mode enumerator. I had no time yet though to check how completely VESA 3.0 standard is implemented. Sound card related experiments are still in front of me but I cannot find anybody and anything over the internet that can tell me somebody successfully implemented HD Audio interface for DOS programs. -- Now back to the exception I'm getting. Interesting fact is that it's triggered when I launch dos4gw (1.97) apps. Launching the stub itself generates the exception as well. I assume that inside dos4gw there is some dos/16m code and error messaging that just shows up. Is it a bug in the dos4gw or it just does not know how to interpret this environment including BIOS services provided by rEFInd? Subject of further investigation. Definitively PMODE/W apps work, CWSDPMI and DOS32 work positively as well. DOS4GW 1.97 is the trigger. Interesting additional note though. I have tried to open Heretic in that setup, no sound of course but just to check if it will work (as I know doom engine was compiled using watcom and dos4gw). It uses DOS4GW 1.97 and it works... keyboard does not as it uses 0x60 port so hard reboot was required to come back to the OS ;-) That's what I know so far. My investigation continues. Thanks for the hint that it may be actually an incomplete BIOS emulation that rEFInd provides. CSM, I assume it should be part of rEFInd implementation, right? How can I check its capabilities to follow your suggestion regarding CSM? /h1 On Sat, Nov 14, 2020 at 12:10 AM Eric Auer wrote: > > Hi! > > > After quick reboot my steps to repro the problem are as following: > > -> FreeDOS boots up, I enter NDN, browse to OpenWatcom 1.9 BINW folder > and > > type 'wmake' > > > > [Result] > > App shows all the info it should for no targets specified, I assume on > exit > > it just crashes and hangs the whole system with a message: > > DOS/16M error: [26] 8042 timeout > > DOS/16M error: [26] 8042 timeout > ... > > The 8042 is the keyboard controller. You are using the rEFInd boot > manager on iMac, without Bootcamp. I assume that means you had to > load some CSM, either provided by Apple or by rEFInd, to have BIOS > services for FreeDOS? Apparently it does not simulate a keyboard > controller, while DOS/16M, the DOS extender of your app, is trying > to access the keyboard without relying on BIOS services for that? > > DOS itself expects mostly BIOS services to exist, it does not use > much hardware directly. Exceptions could include the PC speaker for > FreeCOM command com beeping. DOS apps tend to rely on DOS, but in > particular for graphics, they may expect VGA hardware and not just > VGA BIOS services. For sound, barely any DOS app uses the BIOS and > BIOS sound services such as VBE/AI are not supported by classic DOS > sound cards predating them. > > So it is a very interesting question what works and what does not > work with your iMac setup. I would hope that at least some graphics, > disk, keyboard and mouse do work? Please tell me more about your > CSM or similar components and their DOS support. > > While it is not exactly DOS/16M, you could try DOS4GW alternative > DOS32A https://dos32a.narechk.net/index_en.html for improved > compatibility or pre-load DPMIONE or at least CWSDPMI to force > other DOS extenders to rely on the pre-loaded services instead. > > Regards, Eric > > >> *[1] How did I install FreeDOS on iMac* > >> That was relatively easy once I installed this boot manager: > >> https://www.rodsbooks.com/refind/ > >> With it I can install Linux, Windows and FreeDOS from a bootable CD or > USB > ... > > > > ___ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Hello Hollowone PL, hello Eric Auer, DOS/16M error: [26] 8042 timeout DOS/16M error: [26] 8042 timeout ... The 8042 is the keyboard controller. You are using the rEFInd boot manager on iMac, without Bootcamp. I assume that means you had to load some CSM, either provided by Apple or by rEFInd, to have BIOS services for FreeDOS? Apparently it does not simulate a keyboard controller, while DOS/16M, the DOS extender of your app, is trying to access the keyboard without relying on BIOS services for that? It might be that DOS/4GW was trying to use the keyboard controller ports to read or toggle the A20 enable status (https://www.win.tue.nl/~aeb/linux/kbd/A20.html), or some such. Open Watcom's wmake.exe does use DOS/4GW. (And, in its internal messages, DOS/4GW sometimes confusingly refers to itself as "DOS/16M"...) In any case, I suppose yes, perhaps loading another DOS extender (such as DOS/32A), or pre-loading CWSDPMI, would work around the problem. Thank you! -- https://github.com/tkchia ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Hi! > After quick reboot my steps to repro the problem are as following: > -> FreeDOS boots up, I enter NDN, browse to OpenWatcom 1.9 BINW folder and > type 'wmake' > > [Result] > App shows all the info it should for no targets specified, I assume on exit > it just crashes and hangs the whole system with a message: > DOS/16M error: [26] 8042 timeout > DOS/16M error: [26] 8042 timeout ... The 8042 is the keyboard controller. You are using the rEFInd boot manager on iMac, without Bootcamp. I assume that means you had to load some CSM, either provided by Apple or by rEFInd, to have BIOS services for FreeDOS? Apparently it does not simulate a keyboard controller, while DOS/16M, the DOS extender of your app, is trying to access the keyboard without relying on BIOS services for that? DOS itself expects mostly BIOS services to exist, it does not use much hardware directly. Exceptions could include the PC speaker for FreeCOM command com beeping. DOS apps tend to rely on DOS, but in particular for graphics, they may expect VGA hardware and not just VGA BIOS services. For sound, barely any DOS app uses the BIOS and BIOS sound services such as VBE/AI are not supported by classic DOS sound cards predating them. So it is a very interesting question what works and what does not work with your iMac setup. I would hope that at least some graphics, disk, keyboard and mouse do work? Please tell me more about your CSM or similar components and their DOS support. While it is not exactly DOS/16M, you could try DOS4GW alternative DOS32A https://dos32a.narechk.net/index_en.html for improved compatibility or pre-load DPMIONE or at least CWSDPMI to force other DOS extenders to rely on the pre-loaded services instead. Regards, Eric >> *[1] How did I install FreeDOS on iMac* >> That was relatively easy once I installed this boot manager: >> https://www.rodsbooks.com/refind/ >> With it I can install Linux, Windows and FreeDOS from a bootable CD or USB ... ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Thanks for your replies, to address your comments in one message: *[1] How did I install FreeDOS on iMac* That was relatively easy once I installed this boot manager: https://www.rodsbooks.com/refind/ With it I can install Linux, Windows and FreeDOS from a bootable CD or USB quite easily and aside of FreeDOS, no Bootcamp is required to start the process. Happy to provide more step by step instructions if they are really required. *[2] 64bit stub. *Yes I'm aware of the software and the code. The sample code actually ran quite well *[3] As for the errors with DOS16/M exceptions and other errors I'm experiencing.* Actually that has nothing yet to do with 64bit tests I wanted to do. Once I installed FreeDOS I have migrated there a lot of test software to experiment with. Starting from Norton Commander 5.0 and the latest build of Necromancer's DOS Navigator. Tried to launch various demoscene demos of the late 90ties, even tried Doom. Then I tried Open Watcom 1.9 from FreeDOS packages to start compiling some code found to support my experiment. What I found is that unzip provided with the FreeDOS is generating the error. Various DOS4GW based 32bit demoscene demos are causing it and also Open Watcom compiler and wmake is crashing my system with these exceptions as well. Funny Watcom 10.6 works just fine. Additional interesting symptom I see is that when I copy files or unzip files that have lots of files (or perhaps larger one, I'm not sure yet), it just freezes the system endlessly. I just reboot, I have no patience to check if this is some 15 minutes (the longest streak) cache issue or it just crashed with no system or app level handler for it. I will provide exact error in a second when I switch between systems to generate it and add it in another message [4] One more thing perhaps you can help to identify, iMac has *HD Audio *compatible sound card. There was some software written by some Polish dude in the past that was extending Judas Player with HD Audio capacity I found. but when I ran it it effectively discovered HD Audio over PCI but any actual playback and other elements of true driver implementation are not there. Do you know anything about working HD Audio software for DOS? - Best, hollowone On Thu, Nov 12, 2020 at 11:28 AM TK Chia wrote: > Hello Hollowone PL, > > > With this I have few starter question as a user: > > - DOS16/m is a 16bit protected mode extender. Does it mean that FreeDOS > > runs in 16bit protected mode from the command line or perhaps some driver > > is interfering or rather the iMac I use has hardware that may cause some > > obvious incompatibilities. > > Can you give us more details about the issue(s) you encountered? For > example, which particular tools were you trying to use? What were the > error messages? Was FreeDOS running in "really" Real Mode, or in > Virtual 8086 mode? > > (Meanwhile, my wild guess is that the errors were because the iMac is > not quite compatible with the IBM PC at the lower levels --- especially > the layout of physical memory and I/O ports. But maybe I am wrong.) > > And, I would very much like to know more about how you got FreeDOS > working on a UEFI machine. I have lately been trying to find > information on this. :-) > > Hello Random Liegh, hello Jose Senna, > > >> I'm not sure what DOS16/m is -it sounds like a DPMI server? If so, then > it provides 32-bit addressing >to dos programs. > > AFA I remember, DOS/16M is a DOS extender to allow use of DOS in > protected mode. > > It predates DPMI specification and is geared towards the 16-bit > protected mode > > available in the '286. > > I recall there was the DOS/16M DOS extender --- for the 286's 16-bit > protected mode --- and also DOS/4G --- for the 386's 32-bit protected > mode --- by Rational Software. > > (16M would refer to the 24-bit physical address space supported by the > 286.) > > For some reason, Open Watcom still has some vestigial support for > producing DOS/16M executables, and the OW source code provides some > information on the format of these things. > > Thank you! > > -- > https://github.com/tkchia > > > ___ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
After quick reboot my steps to repro the problem are as following: -> FreeDOS boots up, I enter NDN, browse to OpenWatcom 1.9 BINW folder and type 'wmake' [Result] App shows all the info it should for no targets specified, I assume on exit it just crashes and hangs the whole system with a message: DOS/16M error: [26] 8042 timeout DOS/16M error: [26] 8042 timeout DOS/16M error: [26] 8042 timeout DOS/16M error: [26] 8042 timeout DOS/16M error: [26] 8042 timeout ... multiple lines with the same thing. Google search not helpful on the line that pops up. Now I wonder if this is part of - the OS - or the app (which is compiled against DOS4GW, 32bit protected mode extension, - or perhaps that refind and legacy bios or some hardware conflict is causing it or obviously combination of all.. but how to troubleshoot it more to identify the root cause? /h1 On Fri, Nov 13, 2020 at 10:53 PM Hollowone PL wrote: > Thanks for your replies, to address your comments in one message: > > *[1] How did I install FreeDOS on iMac* > That was relatively easy once I installed this boot manager: > https://www.rodsbooks.com/refind/ > With it I can install Linux, Windows and FreeDOS from a bootable CD or USB > quite easily and aside of FreeDOS, no Bootcamp is required to start the > process. > Happy to provide more step by step instructions if they are really > required. > > *[2] 64bit stub. *Yes I'm aware of the software and the code. The sample > code actually ran quite well > > *[3] As for the errors with DOS16/M exceptions and other errors I'm > experiencing.* > Actually that has nothing yet to do with 64bit tests I wanted to do. Once > I installed FreeDOS I have migrated there a lot of test software to > experiment with. > Starting from Norton Commander 5.0 and the latest build of Necromancer's > DOS Navigator. Tried to launch various demoscene demos of the late 90ties, > even tried Doom. > Then I tried Open Watcom 1.9 from FreeDOS packages to start compiling some > code found to support my experiment. > > What I found is that unzip provided with the FreeDOS is generating the > error. Various DOS4GW based 32bit demoscene demos are causing it and also > Open Watcom compiler and wmake is crashing my system with these exceptions > as well. Funny Watcom 10.6 works just fine. > > Additional interesting symptom I see is that when I copy files or unzip > files that have lots of files (or perhaps larger one, I'm not sure yet), it > just freezes the system endlessly. I just reboot, I have no patience to > check if this is some 15 minutes (the longest streak) cache issue or it > just crashed with no system or app level handler for it. > > I will provide exact error in a second when I switch between systems to > generate it and add it in another message > > [4] One more thing perhaps you can help to identify, iMac has *HD Audio > *compatible > sound card. There was some software written by some Polish dude in the past > that was extending Judas Player with HD Audio capacity I found. but when I > ran it it effectively discovered HD Audio over PCI but any actual playback > and other elements of true driver implementation are not there. Do you know > anything about working HD Audio software for DOS? > > - > Best, > hollowone > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 12, 2020 at 11:28 AM TK Chia wrote: > >> Hello Hollowone PL, >> >> > With this I have few starter question as a user: >> > - DOS16/m is a 16bit protected mode extender. Does it mean that FreeDOS >> > runs in 16bit protected mode from the command line or perhaps some >> driver >> > is interfering or rather the iMac I use has hardware that may cause some >> > obvious incompatibilities. >> >> Can you give us more details about the issue(s) you encountered? For >> example, which particular tools were you trying to use? What were the >> error messages? Was FreeDOS running in "really" Real Mode, or in >> Virtual 8086 mode? >> >> (Meanwhile, my wild guess is that the errors were because the iMac is >> not quite compatible with the IBM PC at the lower levels --- especially >> the layout of physical memory and I/O ports. But maybe I am wrong.) >> >> And, I would very much like to know more about how you got FreeDOS >> working on a UEFI machine. I have lately been trying to find >> information on this. :-) >> >> Hello Random Liegh, hello Jose Senna, >> >> >> I'm not sure what DOS16/m is -it sounds like a DPMI server? If so, >> then it provides 32-bit addressing >to dos programs. >> > AFA I remember, DOS/16M is a DOS extender to allow use of DOS in >> protected mode. >> > It predates DPMI specification and is geared towards the 16-bit >> protected mode >> > available in the '286. >> >> I recall there was the DOS/16M DOS extender --- for the 286's 16-bit >> protected mode --- and also DOS/4G --- for the 386's 32-bit protected >> mode --- by Rational Software. >> >> (16M would refer to the 24-bit physical address space supported by the >> 286.)
Re: [Freedos-user] DOS/16M (was: FreeDOS 1.2 installed on iMac (2011) - success but there are issues)
Hello Hollowone PL, With this I have few starter question as a user: - DOS16/m is a 16bit protected mode extender. Does it mean that FreeDOS runs in 16bit protected mode from the command line or perhaps some driver is interfering or rather the iMac I use has hardware that may cause some obvious incompatibilities. Can you give us more details about the issue(s) you encountered? For example, which particular tools were you trying to use? What were the error messages? Was FreeDOS running in "really" Real Mode, or in Virtual 8086 mode? (Meanwhile, my wild guess is that the errors were because the iMac is not quite compatible with the IBM PC at the lower levels --- especially the layout of physical memory and I/O ports. But maybe I am wrong.) And, I would very much like to know more about how you got FreeDOS working on a UEFI machine. I have lately been trying to find information on this. :-) Hello Random Liegh, hello Jose Senna, I'm not sure what DOS16/m is -it sounds like a DPMI server? If so, then it provides 32-bit addressing >to dos programs. AFA I remember, DOS/16M is a DOS extender to allow use of DOS in protected mode. It predates DPMI specification and is geared towards the 16-bit protected mode available in the '286. I recall there was the DOS/16M DOS extender --- for the 286's 16-bit protected mode --- and also DOS/4G --- for the 386's 32-bit protected mode --- by Rational Software. (16M would refer to the 24-bit physical address space supported by the 286.) For some reason, Open Watcom still has some vestigial support for producing DOS/16M executables, and the OW source code provides some information on the format of these things. Thank you! -- https://github.com/tkchia ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user