Page 1 of 2

Windows 98/9x Driver Development

Posted: Sun Jun 26, 2016 1:50 pm
by ~
I'm trying to find information about developing different types of device drivers for Windows 98 or 9x in general.

I have the idea to find out which standard API functions a sound, video and other types of drivers should have.

I need to know the names and the ordinals that a video driver must implement in Windows 98.

I think that Iczelion's tutorials are good for device drivers, which they call VxD or VxDs (I had forgotten that until this moment).

However, I don't think that they talk about those specific details, apart from the DDK (Driver Development Kit).

I want to make my own drivers for VGA/SVGA, maybe also find out some API to request applying the new configuration at boot time and request a reboot.

I would also like to use the drivers for a Win9x machine directly from its installation CD.

Re: Windows 98/9x Driver Development

Posted: Sun Jun 26, 2016 5:35 pm
by Octocontrabass
Why do you want to develop Windows 98 drivers?

Re: Windows 98/9x Driver Development

Posted: Sun Jun 26, 2016 11:06 pm
by ~
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
I want to follow up the hardware and software development of the PC from the start.

I want to some time use old peripherals in new machines, or new hardware in old machines.

I also want to be able to use my old hardware with my own operating system like my ThinkPad 390x audio and video, my FlyVideo TV card from the Windows 98 era, my Dynex DX-WGNBC wireless card which is capable of sniffing wireless networks, all from my operating system.

I know that loading those Windows 9x drivers is more practical than trying to develop them at first, so I need to know the names and ordinals of the APIs they must export, and the rest of potential information to achieve it.

Their development is long stopped and established so they are the easiest to study without them suddenly changing with newer versions.

Re: Windows 98/9x Driver Development

Posted: Sun Jun 26, 2016 11:36 pm
by alexfru
~ wrote:
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
I want to follow up the hardware and software development of the PC from the start.
Define the start. You may need to go as far back as IBM 5150 and DOS or CP/M, if not earlier.
~ wrote: I want to some time use old peripherals in new machines, or new hardware in old machines.
It may not work because of OS requirements. It may not work because you may be physically unable to plug certain cards or connect certain peripherals to PCs that are too old or too new.
~ wrote: ...
I know that loading those Windows 9x drivers is more practical than trying to develop them at first, so I need to know the names and ordinals of the APIs they must export, and the rest of potential information to achieve it.

Their development is long stopped and established so they are the easiest to study without them suddenly changing with newer versions.
Consider doing this using something that's a bit more fresh and live than Windows 9x/Me. Look at ReactOS. See what it says about its driver model.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 12:17 am
by iansjack
Why not study the Linux source? It supports a huge range of hardware. If the thousands of developers working on Linux haven't produced a driver for some hardware then it probably can't be done by an amateur.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 5:33 am
by ~
iansjack wrote:Why not study the Linux source? It supports a huge range of hardware. If the thousands of developers working on Linux haven't produced a driver for some hardware then it probably can't be done by an amateur.
I will but I also need to know the functions to export.

Win9x is more readily available than Windows XP/NT.

I like how I can access the hardware directly when there are no drivers installed for those devices. I can drive Sound Blaster sound cards if I don't install their drivers and then use old demo programs with a script as an audio player that uses a tiny amount of memory, all without a formally installed driver. I want to use the VxDs from my code in that fashion.

I don't care about actually Windows but the fact that it gives me a basic shell that is no longer so limited.

I always prefer Windows 9x as the main OS version to use because I want to implement my own operating system.

So I just need information about developing VxDs and device drivers for Windows 9x, mainly to just use the hardware with the drivers from their CDs, in my OS. I just need to configure the devices and use their now standardized interface at the driver level for their capabilities.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 7:10 am
by Quaker763
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
Can't speak for the OP, but a while back I was looking into compiling/fixing up the 3Dfx Rampage Drivers/some other late 90s video hardware. Shame the two people that had the source code for the Rampage wouldn't share it and expected people to tell them what to do.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 12:10 pm
by ~
Quaker763 wrote:
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
Can't speak for the OP, but a while back I was looking into compiling/fixing up the 3Dfx Rampage Drivers/some other late 90s video hardware. Shame the two people that had the source code for the Rampage wouldn't share it and expected people to tell them what to do.
Probably they created a source code version from disassembly, commented it very well and wanted to discuss how to do stuff to the code. They probably didn't understand it all.

They must have thought that if the manufacturer didn't release source code, it wouldn't do any harm not sharing a commented and analyzed disassembly.

-------------------------
In any case it seems that it really isn't simple to find this information in its entirety. Nobody has mentioned anything other than Iczelion's tutorials.

Another resource I have is the book "Writing Windows VxDs and Device Drivers", by Karen Hazzah, but still I will probably need to know which functions to implement and export, with their names and ordinals.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 7:19 pm
by Quaker763
~ wrote:
Quaker763 wrote:
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
Can't speak for the OP, but a while back I was looking into compiling/fixing up the 3Dfx Rampage Drivers/some other late 90s video hardware. Shame the two people that had the source code for the Rampage wouldn't share it and expected people to tell them what to do.
Probably they created a source code version from disassembly, commented it very well and wanted to discuss how to do stuff to the code. They probably didn't understand it all.

They must have thought that if the manufacturer didn't release source code, it wouldn't do any harm not sharing a commented and analyzed disassembly.

-------------------------
In any case it seems that it really isn't simple to find this information in its entirety. Nobody has mentioned anything other than Iczelion's tutorials.

Another resource I have is the book "Writing Windows VxDs and Device Drivers", by Karen Hazzah, but still I will probably need to know which functions to implement and export, with their names and ordinals.
No it was the real source. 3Dfx were huge until they went bust in late 2000, and they basically handed out everything gor free, specs, code, datasheets etc. They got the code off of one of the engineers so it's a real pisser they wouldn't give it to anyone, considering they have no idea what to do.

Yeah I agree there is a very big lack of information, I suppose s lot of it has been lost to time.

Re: Windows 98/9x Driver Development

Posted: Mon Jun 27, 2016 7:24 pm
by Octocontrabass
~ wrote:In any case it seems that it really isn't simple to find this information in its entirety.
The DDK manuals explain everything you need to know to write a Windows driver.

Re: Windows 98/9x Driver Development

Posted: Fri Jul 01, 2016 11:25 am
by ~
Octocontrabass wrote:Why do you want to develop Windows 98 drivers?
It looks like Windows isn't much without DOS since its most basic architecture is indeed DOS, so it cannot be forgotten.

Also Windows 98 is necessary, and I only see how everyone goes towards Windows XP SP3 as the minimum Windows to program for.

Anyway, the truth is that Windows was created with the mentality to have a system as lightweight as DOS, and capable of using those capabilities without much more.

Win9x is almost as lightweight, and used a lot of DOS programming techniques, so it can be seen that anything could be done at this level, leaving behind very small yet complete applications. Nothing more than Win9x is necessary if we know all the algorithms to update it, and the use that knowledge in the rest of OSes.

Now things are based more in fake security, which are mostly just restrictions to the applications.

_______________________
Anyway, Windows 9x can be improved a lot with KernelEx and the DLLs from Windows XP that are recommended at their website.

That's why Windows is so poor. DOS is its essence, and without all drivers easily available even with source code for DOS and Windows 9x, Windows no longer has much to offer. You can feel how slow development for it is because all of the enthusiasm and most optimized ideas were left in DOS.

Luckily they are still there.

And it looks like the more we develop for DOS and Windows (or any other basic version of our favorite operating system that is the ancestor of the one we use normally) it will be easier to port and make simple applications that can actually scale without overcomplicated new languages and frameworks like .NET, and it will be easier to understand how to make or continue or own OS from there.

It would also end up leaving Windows 98, MS-DOS and FreeDOS as updated and usable/stable as any other Windows.

______________________
______________________
______________________


Now, I see that the first thing I would need would be to extract the files from the driver installer.

Also the loaded files and *.INF definitions.

Automating the detection and the correspondence between hardware and the *.INF files would require specific algorithms, as if we were matching device and PCI ID's against a database for which we will need the driver disk.



Some drivers have panel programs, although those might not be really necessary, as you can see with the fact that we can change video modes from a game application and when returning to the desktop, so.

Re: Windows 98/9x Driver Development

Posted: Fri Jul 01, 2016 11:38 am
by iansjack
Early versions of Windows were certainly related to MS-DOS. The NT versions are totally divorced from it. I can't really see why anyone is interested in Windows pre-NT.

Re: Windows 98/9x Driver Development

Posted: Fri Jul 01, 2016 11:56 am
by ~
iansjack wrote:Early versions of Windows were certainly related to MS-DOS. The NT versions are totally divorced from it. I can't really see why anyone is interested in Windows pre-NT.
NT systems also have a DOS console, can run DOS programs, use BAT files a lot, use the same file system conventions and file systems as DOS.

There are lots of drivers for 90's hardware if you built 9x machines with TV cards, USB, graphics cards, and they are great even until XP.

Windows NT is no longer at the root. DOS is always the root of it, and it's nothing more than WinAPI and Win9x put inside an user security system that affects everything (processes, executables running, files/directories/partitions) and also with a considerably more restricted driver and hardware interface.

I'm not saying it's little work, just that everything about Microsoft is based in DOS. So if DOS-like stuff is left out and hidden, wondering what ever to do, the development tasks left to do out of the official Microsoft/Windows code, are very poor and tend to be closed source too, so we are left in an austere desert since XP.

It looks like even recent versions of MinGW and SQLite3 and lots of other programs can run under Windows XP, using KernelEx and the manual updates they recommend. Then we also have DJGPP and DOS software which is easy to port as the lowest base of our own OS.


Try to see how the more people goes away from DOS and Windows 9x, the more nonstandard hardware, software and formats proliferate, and also closed source programs written in .NET/C#, which just contain a huge set of pre-built libraries, so much as to be able to make MJPEG streaming servers for the Windows desktop relatively small programs where we never get to use any real algorithms, but just call wrapper after wrapper function.

The more I use DOS and Win9x to develop, and the fact to return to it as my main development OS for all my programming tasks without exception, reveals again all of the things I need to do to carry parts of the implementation of an OS without fooling myself by using already existing software and source libraries.

This is how things are at the Windows and Microsoft world.
Things are much clearer and less restricted in Win9x, and they run in any other Windows version, so it's the ideal point for hardware and software programming done on our own. DOS and Win9x are the ideal point. That's why there were so many incredible demos and learning resources in the 90's using only that.

Put Windows XP there, and remember the overnight decline of those demos. Everything was blocked; everyone interested in serious high-level development should have just made sure to get or keep a pure DOS/Win9x machine as the main development platform.

Remember that DOS is indeed just a console for the BIOS, so you can launch any test or OS from it.


Windows NT/XP might be ideal as a development platform for the industry players. It's no longer designed to create and learn easily about the machine. You should already know just about everything, and only the programmers from an industry are like that. The rest, as you can see, is a boring level of development full of prebuilt stuff. There's not much to do in NT at such low level, but DOS and Windows 9x will always have that advantage of having to update drivers and software, and leave extremely small applications with source, as still an original starting learning point for the whole PC world.


But DOS/Windows 9x, unlike NT, is the ideal platform for the rest of developers, students, hobbyists and people in general, and I see how it just allows developers with a mentality like those who wrote the 90's demos to improve by leaving room to manipulate the machine on our own without prohibiting it or worrying about that.

The possibility of accessing the whole machine without much artificial security at the same time that we have an OS that runs the programs we need to use daily is a development level point that just must exist. This is how people ended up learning in the 90's because it really allows to engineer software instead of prohibiting (so it's no longer security but a practical prohibition to write low level software).

Re: Windows 98/9x Driver Development

Posted: Fri Jul 01, 2016 1:51 pm
by Octocontrabass
The last version of Windows that's based on DOS is Windows ME. It was released 16 years ago, and support ended 10 years ago. It's time to forget about DOS.

All versions of Windows since then have been based on Windows NT. Windows NT wasn't even originally written for x86 - it was ported from Alpha.
~ wrote:so it's no longer security but a practical prohibition to write low level software
Low-level software has a lot of power to do bad things, like erase your hard disk or steal your passwords or replicate by injecting itself into executable files. All of the security features you complain about are specifically designed to prevent things like that from happening.

Re: Windows 98/9x Driver Development

Posted: Fri Jul 01, 2016 2:17 pm
by ~
Octocontrabass wrote:The last version of Windows that's based on DOS is Windows ME. It was released 16 years ago, and support ended 10 years ago. It's time to forget about DOS.
No, it isn't. You can update it by implementing the new algorithms and by porting new files in standard format that is readily usable. It can be updated, developed, and the knowledge of that action preserved and shared as OS Development. If you are expert in DOS and Windows 9x, why not use that extreme expertise to derive good applications and your own OS, if it will accelerate development efforts' results like no other environment, being it my original OS, the one I know the most and the easiest to learn from others and probably for the people who insist in using it to develop?

If I have MS-DOS/FreeDOS versions for most of the types of programs I normally use in Windows or Linux, why consider it dead, if it lets me simplify my source code, encourages me to develop, port and improve demos to use them formally, and if it gives me the chance to find entry points to use that code in my own OS?

We can port all sorts of applications to DOS. If I can play WAV and eventually MP3 files in MS-DOS/FreeDOS, if I can compress and extract files, if I can visualize images, if I can get to read text and later PDF files, if I can write a GUI system that looks exactly like Windows (as happened with some Seagate disk tools)...


It reflects everything about the PC at the level the simplest OS Developer could want, then Microsoft and its software is based on it too. Demo programmers from the 90's could easily become excellent OS developers from that background.


Don't look at systems without support such as Windows 98 SE, as abandoned and useless stuff, but as static milestones embedded in time. If we get the latest versions of drivers, browsers, programs, libraries and tools, we would end up learning about the WinAPI, about how to use the drivers in our own OS, about file formats, and we would still be able to use those programs in the current version of Windows. By learning everything about MS-DOS, we would end up learning about booting, VESA, about using USB devices (there are already open source drivers at least for UHCI, for keyboards, mice, storage, for DOS, with source...), about making tiny applications, about implementing a windowing system, about programming every single piece of hardware, about creating a console and a whole multiboot-compatible operating system.



If we talk about learning to develop an Operating System, DOS is a system such that it doesn't interfere in anything we want to do. Windows 9x gives us a convenient graphical environment from which we can develop programs that are still and will be always compatible with what is known as WinAPI. From Windows 9x, we can reach standard applications that will for sure reach Wine and Linux, and the newer Windows, if we keep them well written and simple, just like writing all the code to our OS.

There's FreeDOS too, with a lot of USB drivers, mice drivers, file system drivers. Why wouldn't I learn about it if I can extract all of the standard knowledge from there, while at the Windows XP or newer I only have to use tools somebody else did?



An operating system developer who used an 8088, a 386 and the newer PCs with MS-DOS as the first OS ever, knows that DOS alone contains practically everything with actual examples. Going to Windows XP or Windows 7 is going to a dead and austere desert environment.

Working in MS-DOS can allow us to create our own windowing systems, then port all the programs we use normally in Windows, in MS-DOS and FreeDOS (game emulators, games, file compressors, audio players, text readers, and everything you can program or port)...



Octocontrabass wrote:All versions of Windows since then have been based on Windows NT. Windows NT wasn't even originally written for x86 - it was ported from Alpha.
And still uses all features that DOS includes, so it's a platform as poor as any other random OS if it wasn't for those ancestral levels.

Octocontrabass wrote:
~ wrote:so it's no longer security but a practical prohibition to write low level software
Low-level software has a lot of power to do bad things, like erase your hard disk or steal your passwords or replicate by injecting itself into executable files. All of the security features you complain about are specifically designed to prevent things like that from happening.
If we talk about malware there's nothing that can save us from this risk. If we talk about concrete data and enterprises, there will always exist people with direct access to critical material and they can write viruses there which then can end up in the wild, which must be the normal case.

Modern Windows viruses won't run in Win9x or DOS, so it's indistinguishable from regular restrictions, so it's not important to think about security, which any enterprise can put in place properly with its own global infrastructure anyway.

Even if they use Win9x, they can implement security with redundancy and giving read access to most but write access only to people who need to develop a part. That part could be put in a Linux server, or in a custom system with enough security around it, meaning with that the prevention of binary exploits more than just artificial, badly understood stock security or simple user permissions.


Windows 9x is a thin shell that instead of being hacked and halted, could be used as a demo to load your own OS fully through an exploit, replacing the Win9x instance on the fly by your OS. And more formally, it would be worthwhile trying to use its drivers and those from DOS in our OS, specially those that are open source.



I don't know which one is the best Linux distribution in practice, but Windows 9x is becoming the ideal version for developing in an environment where you don't have absolutely anything implemented and still you have a set of functions that in the end give you access to simple and vital source code about hardware programming.

When people was told that using Win9x, at least some developers should have kept Win9x machines to keep their demo and hardware programming, and use it as the main development/hacking platform, instead of Windows XP and later, which at this point is absolutely secondary and replaceable unless we specifically want to use programs and features that only exist there, like games targeting those Windows versions, or programs that are incompatible with other WinAPI implementations.

But for the rest of standard stuff, it's better to develop from "obsolete" systems and their programs, and use them as final and stable/static milestone points to learn from that environment.

______________________________
______________________________
______________________________
______________________________
It's very curious but if you move to radically separated versions of an Operating System, you get immediately transported to a completely apart environment.

When I use old hardware with MS-DOS and Windows 9x, as well as FreeDOS and from there my own OS, I don't have much more to do than develop, but develop in a very satisfying and productive way, with a lot of information around me.

In Windows 98 SE, there are no applications that are made with the Windows XP and later philosophy that contain a lot of padding that just distracts me and dilates my development efforts (and apparently those of the whole World) to an unnecessarily long extent where I can no longer get high quality immediate results.

And the websites I visit are more specific to Win9x. That in turn takes me massively to find only web sites of that era, 90's and mid-2000's, and you must know all of the good information and learning that was taking place as long as Win9x was around most computers, including Geocities websites with key content.

So as you can see the environment that is accessed with Windows 9x, using it and searching for programming information for it and MS-DOS/FreeDOS, is completely different than that that from Windows XP.

Since Windows XP, things became more limited, not so much about thinking about developing and implementing the complexities of an Operating System, so I just return directly back to Win9x and MS-DOS, there I even have USB source code to study for mouse/keyboard/storage drivers, so why not?

The technical programming information and the actual source code. It all seems to be in MS-DOS/FreeDOS and Windows 98 SE/9x, no matter how new the system is.


Anything that is extremely new that isn't easy to find specifically for MS-DOS, can be simplified from the Linux/UNIX/open source world until it is fully ported there, be it new drivers or new applications... So DOS is just waiting and used academically since it just leaves you with the enabled hardware and nothing more.

MS-DOS/FreeDOS is like the face of a standard PC Assembly language programming, so it will always stay around and will always keep being updated with newer drivers. There will always be someone trying to create an OS that starts like DOS, as well as programming in Assembly under a DOS PC.

MS-DOS/FreeDOS is a disadvantage for monopolies and they apparently wished it really dead. There's no driver that cannot be programmed for it without the rest of Gigabytes of OS clutter. Any driver or program that is written for it is made of extremely tiny binary pieces of code that either are accompanied by source code or are trivially easy to disassembly in comparison to the drivers of other newer and unknown systems, so they stopped doing it instead of making for a optimally secure MS-DOS/Win9x platform that was stable but without having to add so much useless processing weight and extreme restrictions in the subsystems.

So all OSes are necessary, they are places/rooms/huge malls/huge study campuses that take you to different dimensions of thought and development environments with Internet content and websites.

New Windows versions are being developed far too fast as to become relevant and to devote unusual and interesting programming information, unlike Windows 9x which is being prepared since MS-DOS exists, along with the Standard PC Hardware, which is what ultimately makes it so important.