PCem

PCem v9

PCem v9

From the main page:

PCem v9 released. Changes from v8.1 :

  • New machines – IBM PCjr
  • New graphics cards – Diamond Stealth 3D 2000 (S3 ViRGE/325), S3 ViRGE/DX
  • New sound cards – Innovation SSI-2001 (using ReSID-FP)
  • CPU fixes – Windows NT now works, OS/2 2.0+ works better
  • Fixed issue with port 3DA when in blanking, DOS 6.2/V now works
  • Re-written PIT emulation
  • IRQs 8-15 now handled correctly, Civilization no longer hangs
  • Fixed vertical axis on Amstrad mouse
  • Serial fixes – fixes mouse issues on Win 3.x and OS/2
  • New Windows keyboard code – should work better with international keyboards
  • Changes to keyboard emulation – should fix stuck keys
  • Some CD-ROM fixes
  • Joystick emulation
  • Preliminary Linux port

Thanks to HalfMinute, SA1988 and Battler for contributions towards this release.

Very excellent!

OpenWatcom v2

I know what you are thinking, wouldn’t it be great if you could create MS-DOS executables directly from a Win64 desktop with no MS-DOS needed?

Well, I just found out about this unofficial Open Watcom v2 project that targets the usual suspects, allows you to compile from Win64!

Hello World!

Hello World!

Some of the features of this fork include:

  • New 2-phase build system, OW can be build by platform native C/C++ compiler or by itself
  • Code generator properly initialize pointers by DLL symbol addresses
  • DOS version of tools now support long file names (LFN) if appropriate LFN driver is loaded by DOS
  • OW is ported to 64-bit hosts (WIN64, Linux X64)
  • Librarian support X64 CPU object modules and libraries
  • RDOS 32-bit C run-time compact memory model libraries are fixed
  • Resource compiler and Resource editors support WIN64 executables
  • OW text editor is now self containing, it can be used as standalone tool without any requirements for any additional files or configuration
  • Broken C++ compiler pre-compiled header template support is fixed
  • Many C++ compiler crashes are fixed
  • Debugger has no length limit for any used environment variable

Binaries are available on sourceforge.

So how does it fare?  I thought I’d take the old Wolf4GW, and compile it with this toolset.  The first hurdle I hit was this fun feature:

  • The C++ compiler now treats warning W737, implicit conversion of pointers to integral types of same size, as an error.

Which is an integral part of wl_menu.cpp .  So this was somewhat problematic, until I just commented out that block, and while I was expecting no working keyboard, I’m able to play, and load/save games…. Even the boss key works.

Wolf4GW

Wolf4GW

So with the W737 taken care of, I have to say this thing compiles FAST.  Incredibly FAST.  If for some reason you have to build 16bit or 32bit anything, you should look at a 64bit tool chain, well assuming you have a 64bit computer by now.

If anyone want’s to build their own Wolf4GW with the newer OpenWatcom, my source drop is here.

MS-DOS Player updates

Poorly translated from TAKEDA toshiya’s blog..


2014/4/15
I has integrated source of i386 and i286 edition edition. 
In addition, in the i286 version, I added support for int 10h/16h. equivalent to 0.149 MAME, I was replaced with a 0.152 equivalent MAME core i386 i286 core. However, the i386 core, I have omit the TLB around.

Which is very cool, although I wasn’t sure about the MAME source code being open to other projects…?  I tried to contact the i86/i386 author vlinde but he then pulled his contact page.  I wanted to use i386 for something of my own, but the whole “Redistributions may not be sold, nor may they be used in a commercial product or activity.” really puts the damper on it.

I was able to get some simple XMS test program to run, but nothing of any substance.  No DOS4G/W or anything like that.  But if you re-build it specifying MS-DOS version 5.0, some of the MS-DOS utils and even command.com work!

The weird issue I had was running out of conventional RAM, because this program gives you nearly 1MB of conventional RAM… I was surprised, as I wasn’t expecting that much!

Happy new year!

I thought I’d go ahead and see if I could get Net/2 to build on my own.

Net/2

Net/2

Well it compiles, and tries to boot….   Sadly there is no adb or gdb support.  How on earth did people debug this stuff then?  I’m not sure where the crash location is, or what to do about it.  But I thought this was really cool.

I’ve also tried to track down 4.4BSD encumbered, which was released around the same time as the 4.4BSD-Lite1 which was after the AT&T vs BSDi/CSRG thing..  Or even the release that parallels the Net/2 release…

Anyways, happy 2014!

Virtual x86

I got passed a link to this new emulator, Virtual x86, a complete PC emulator in javascript.  It is in it’s early phases, but it seems to emulate text mode and a single diskette or ISO ok.  It can boot Linux or OpenBSD, but not any MS-DOS protected mode software I tried.  And graphics don’t work…

But it’s 100% javascript!  And open in that you can download the source (tarball,github) under a BSD style license!  So naturally I made my own mirror

Dungeon on Virtual x86

Dungeon on Virtual x86

I have to say, it’s really cool!

 

PCem v8 released!

New features include:

  • New machines – SiS496/497, 430VX
  • WinChip emulation (including MMX emulation)
  • New graphics cards – S3 Trio64, Trident TGUI9440AGi, ATI VGA Edge-16, ATI VGA Charger, OAK OTI-067, ATI Mach64
  • New sound cards – Adlib Gold, Windows Sound System, SB AWE32
  • Improved GUS emulation
  • MPU-401 emulation (UART mode only) on SB16 and AWE32
  • Fixed DMA bug, floppy drives work properly in Windows 3.x
  • Fixed bug in FXAM – fixes Wolf 3D, Dogz, some other stuff as well
  • Other FPU fixes
  • Fixed serial bugs, mouse no longer disappears in Windows 9x hardware detection
  • Major reorganisation of CPU emulation
  • Direct3D output mode
  • Fullscreen mode
  • Various internal changes

pretty cool!

You can find the source code, binaries, and some ROMs on Tom’s Page.  I’ve got to say I really like PCem, it gives the full (slow and painful, like the real thing) retro PC experience!

AmiDevCpp

Antoni sent me a link to this project, AmiDevCpp. It is a nice little wrapped up IDE for cross compiling applications for the following platforms:

  • AmigaOS (m68k)
  • AmigaOS4 (PPC)
  • MorphOS(PPC)
  • AROS (i386, ppc and x86_64).

Naturally it doesn’t work correctly on Wine.. .Oh well, but for you Windows users out there that haven’t installed Cygwin this is an easy way to cross build stuff for the ancient Amiga platform.

Apparently he was able to rebulid the infamous aclock using this cross compiler…

Everyone mentioned this yesterday…

275,000 transistors of awesomeness!

275,000 transistors of awesomeness!

Kind of interesting is that Linux has finally dropped support for the 80386 microprocessor.

The 386 is perhaps one of the top ten things that has changed our world, along with 4.3BSD .

No, really!

The 386 microprocessor was the first CPU by Intel that was single sourced.  This means that Intel, and only Intel would fabricate the 386 processor.  Before this time, Intel had licensed their processors to other companies (Siemens, AMD, Harris, IBM etc) So that if there was some kind of production issue at Intel other companies could manufacture 8086,80186s and 80286s.  However this all changed with the 386, as Intel stopped renewing these agreements with other companies (IBM had a license that included the 386, although they were slow in making their own), so now Intel was in charge of its destiny.

The 386 brought three major changes onto the then champion processor the 286.  The first being a 32bit processor where it could handle larger data sizes than the 16bit 286 & 8086.  The 386 also included a larger memory model, the so called “flat mode” where it could directly address 4GB of combined code+data, while the 286 could address 1GB it was limited to 64kb segments.  Lastly the 386 introduced hardware virtualization, the “v86” mode where the 386 could emulate multiple 8086 processors, allowing people to have multiple ‘virtual machines’ on the desktop.

At the time the only consumer grade 32bit processor was the hybrid 32/16 68000 from Motorola.  The 68000 could work with 32bit data, but it was restricted to a 16bit data bus, and only could address 24bits of RAM (16 megabytes).  The 68000 however did not include any kind of memory management unit (MMU) making things like porting UNIX improbable (The SUN-1 workstation included a custom MMU).  Because of the open nature of the IBM PC, clone manufacturers were able to leapfrog IBM, and release 386 based machines before IBM got around to releasing the PS/2 model 80.  It was this that effectively brought 32bit computing to the masses with the Compaq Deskpro.

Compaq's 386 Deskpro

Compaq’s 386 Deskpro

The 8086 processor could address 1MB of RAM, with its 20bit address bus.  However to preserve some compatibility with the 8080 processor it was decided that the 8086 (and 8088) CPUs would work with 64kb segments.  This became a massive headache for years as you could not easily contain more than 64kb of data at a time as you would exceed a segment.  Compiler vendors made some workarounds via the large & huge memory models, but porting a program from a 32bit minicomputer (VAX) would prove difficult if it addressed large amounts of memory, and would require a rewrite.  The 286 increased the addressable memory to 16MB, and included a limited MMU, which enabled an address space of 1GB.  However the 286 was flawed in that again the 286 could only work in 64kb segments, and in order to work with large amounts of memory, the processor had to be shifted to protected mode.  However in protected mode, you couldn’t (easily) switch back to real mode.  This needlessly delayed the adoption of protected mode environments, as you would then lose access to the sizable, and growing, library of MS-DOS programs.  Although workarounds were in place for things like OS/2 and DOS Extenders, they were hacks and couldn’t fix the fundamental 64kb issue.  The 386 built upon the 286’s foundation and included a flat memory model where it could address all 4GB of addressable memory in a single segment.  This meant that you could now use massive amounts of data on a consumer grade machine.

For a while the only 32bit environments were Xenix and MS-DOS via DOS Extenders this proved to be a huge liability and effectively stagnated the industry for a long while.  The 286 was a massive determent.  Making things worse was IBMs insistence that the new OS/2 be able to run on the 286, while Microsoft wanted to create OS/2 to run on the 386, and ignore the IBM AT all together. Basically the 286 was created with the assumption that the 8086 wouldn’t be anywhere near as popular as it was.

With the ability to address large amounts of RAM programs only seen on minicomputers and mainframes were finding their way to the microcomputer such as AutoCAD, Oracle, Links 386 Pro, and of course many in house programs where departments now wouldn’t have to pay to run on then ‘big’ minicomputers.  Combined with the 386’s MMU it was also possible to use more memory than was available in the computer, also known as virtual memory.  The 386 made this transparent to the program, only the 32bit environment needed to handle the swapping.

Finally the last big feature of the 386 was v86 mode.  V86 mode in short is a hardware virtualization platform where the 386 can emulate multiple 8086 processors in hardware.  Each virtual machine can get its own isolated memory space, virtual hardware.  Effectively 8086 programs (such as MS-DOS) can run unaltered inside of v86 mode, with the added benefit of being able to run more than one at a time. Windows/386 lead the charge into this new world of virtual machines for the end user.  Before this point, the only wide scale virtual machine environment was the IBM 370 mainframe which could also create virtual mainframes within itself allowing groups to share a single mainframe, but run incompatible software platforms all at the same time.

Thanks to its capabilities the 386 also brought UNIX to the end user.  First with Xenix, then Microport SYSV, and with the removal of AT&T code BSD was able to be released on the 386 via 386 BSD (and later BSDi’s BSD/OS).  During this timeframe the research OS, Minix was extended by Bruce Evans to be able to use some of the 386’s features which then gave rise to Linux.

Thanks to cheap commodity based 32bit computers, and the GNU projects development tools (binutils, gcc, bash) people could then finally realize GNU’s dream of bringing a free and open UNIX like operating system to the masses.

Needless to say, a lot has changed since 1991, and Linux now moving beyond the 386 processor is no surprise.  The rapid adoption of 64bit computing via AMDs extensions, and the new forthcoming 64bit ARM processors do signal the eventuality that one day Linux will even drop support for 32bit processors… Although I wouldn’t expect that for another 20 years.  Even Intel has ceased manufacturing the 386 processor in 2007.

So it is now time to say good bye to the 386 processor.  At the same time thanks to full software emulation, you will never truly be dead. And as always you can check out Linux’s early versions.

Windows 3.1 turns 20.

Windows 3.1 turns 20!

I still remember when Windows 3.1 was announced, and there was all the excitement in our programming class as Windows 3.1 was going to change everything.  One kid had already gotten it on launch and was all excited as it supported more resources, had better fonts for printing, and included multimedia support!  The teacher was all excited about it too, as at the time everyone loved Windows 3.0 but only if it could do more in terms of being able to run more reliably, and support more things at once.

Later, I found out later that this lucky kid had a 386 with 8MB of ram, a full MIDI setup and VGA graphics, which of course blew away my glorious 80286-16 with 1MB of ram, a 20MB hard disk (with stacker!), and CGA.  Needless to say wing commander was actually playable on his computer.

There was no denying it, Windows 3.0 had started the shift from an exclusively MS-DOS world, in which everyone was hoping and searching for a graphical way out of, to the world of Windows we know today.  Windows 3.0 established the beached, and Windows 3.1 basically won the war.

Visually Windows 3.0 and 3.1 look very similar, but Windows 3.1 builds on Windows 3.0’s success and adds in some very important technologies, not limited to:

  • OLE
  • True Type Fonts
  • Better DPMI support
  • Better MS-DOS multitasking (386 Enhanced mode only)
  • better support for SVGA adapters
  • Multimedia support
  • no more UAE box
  • common dialog boxes!
  • primitive drag & drop support
  • 32-bit disk access
  • Improved WinHelp

The only ‘down’ side that I was aware of is that Windows 3.1 dropped support for IBM PC/XT’s.  You needed an 80286 processor as Windows 3.1 ran in protected mode, which at the time it only shut out one person that I knew of.  However he was just a new motherboard away from being able to run Windows 3.1 .  Which is another point against OS/2 as Windows 3.1 used the PC BIOS for almost all hardware access, even a 286 with mostly XT guts would work, but sadly even XT’s with Intel inboard 386’s were not supported, however AT’s with inboard 386’s were.  Even Microsoft MACH 20 card owners were restricted to Windows 3.0 standard mode (after some extensive updates). Also was there ever a special version of OS/2, like how the box claims?

While many of these things seem obvious now, back then this was a big thing to include so many technologies into Windows, and the more compelling the technology people were starting to replace their MS-DOS applications with windows ones, and the ‘dream’ of spending more and more time in Windows was starting to happen.  Although for many of us this ‘dream’ was a freaking nightmare as more applications would install and overwrite system libraries, and end up with massive system instabilities. Not to mention the DLL hell that many of us still face, as even side-by-side and .net only save us from some things, even though nothing is ever perfect.

Windows 3.1 also saw the PC world transition from 16bit to 32bit with the shift of users from 80286 based computers to 80386 and 80486 based machines.  With the split from IBM with OS/2 2.0, Microsoft was pressed to keep Windows 3.1 relevant to the 32bit crowd, and there was plenty of addons for Windows 3.1 to keep things going.  Namely:

  • Winmem32
  • Win32s
  • ODBC
  • WING
  • Video for Windows
  • Winsock

I don’t think Winmem32 ever took off, as it really was just a way to allocate larger memory segments, I’m almost positive that Watcom’s Windows Extender was more popular.  Naturally these predate the ever popular Win32s, which I’ve covered before.  WING was the fast video for games that I’ve covered once more again, with WinDoom. But I’ll just state it again, that Win32s was very important for bringing the whole ‘internet’ experience to mere users as almost everything that was TCP/IP based was 32bit for the ‘rest of the world’ and Win32s brought a taste of real 32bit computing to the masses, esp for people using Mosiac and Netscape.

Winvideo was Microsoft’s answer to the ever popular Quicktime.  Not to mention this add on was to solidify Windows 3.1 as a multimedia powerhouse. Microsoft still to this day has the test avi’s available for download here, And thanks to the University of British Columbia, you can download the Video for Windows Runtime here.

Needless to say the open standard of how the Winsock DLL should work helped standardize internet applications early, esp while there were multiple competing stacks for both MS-DOS and Windows.  Ultimatley when Microsoft wrote their own it pretty much took over everything, but seeing a chance to sell another version of Windows “Windows 3.11 for workgroups” was later released, which could be extended with MS’s TCP/IP.  At the end there even was a version of IE 5 for Windows 3.1, that I remember being as somewhat poor, and even NT 3.51 users were pushed into that direction.  Not to mention it had a tendency to not want to install on machines with more than 16MB of ram. I suppose the good thing is that IE 5 (probably 3 & 4 as well) came with PPP dialers, which was good enough for the majority of users.   Microsoft even made its improved Media player 5 (beta 2), and Net Show players available for 3.1, although I’ve never used them. “Good” IE releases didn’t come until 95/NT 4.0 anyways, the retrofitted ones were just unstable and lacking.

ODBC was a major selling feature in the world of databases, as now you could write uniform code to access data from all kinds of data sources.  Imagine if you had old dbase files, and a SQL database, it would be a major pain to tie them together. However programs like Access which used ODBC could quickly and easily talk to multiple data sources, and create data reporting and entry systems.  This is how the business world got hooked on Access & Visual Basic. ODBC typically came with either database programs, or with database driver disks, like the one for SQL Server.

While Windows was becoming more and more useful, users were going insane, clamoring for a full 32bit version, which led us down the ‘short’ road to Chicago, which was originally expected some time in 1993, but instead didn’t ship until August of 1995.  Windows NT 3.1 was another contender, but again it didn’t ship until March of 1993, and it was far too resource hungry for anything serious.  This left a gap for OS/2 to fill, and around the shipping time of Windows 3.1 was OS/2 2.0 which only included a runtime version of Windows 3.0 .  Lots of people feel that the additional features to 3.0 could have been delivered via a patch, but the 3.1 release was to purposely make OS/2 2.0 obsolete right after it had been released. Even OS/2 2.1 didn’t ship until May of 1993, although it was always locked into a race with Microsoft as various add-ons would either break OS/2 for Windows requiring updates to OS/2 or even sometimes entire new releases (Warp 3.0 for Win32s for example..)

What also made Windows 3.1 popular was the so called “Microsoft Tax” where Microsoft would sell to OEM’s copies of MS-DOS and Windows 3.1 at an incredibly low price with the condition that they resell them with *EVERY* PC that they sold.  This of course was annoying to UNIX users, even NT users as they all had copies of MS-DOS & Windows 3.1 that they never needed, nor wanted.  But this strategy was pretty successful at locking out not only OS/2 from being preloaded & configured on systems, but pretty much any hope of competition.  Many people attempted to sue, and only Digital Research managed to get anything out of it, as there excellent DR-DOS product was effectively barred from the market (very few end users ever change operating systems, they typically buy new PC’s its always been that way, upgrade sales lag way behind new sales), but by the time the courts had done what they were going to do the damage had been done.

1-2-3 for $495 or Office for $459 …

Another typical bundle was Microsoft Office.  Microsoft took advantage of Lotus’s failure in the market place to deliver a graphical application (The OS/2 switch doesn’t matter, Lotus still released a text mode app in the OS/2 heyday), combined with 1-2-3’s heft price tag, Microsoft made Word, Excel, PowerPoint and their Mail product available for less than the price of 1-2-3 with a new PC.

Microsoft C/C++ 7.0 + Windows 3.1 SDK $139.00

In the end it all comes down to developers.  Something that some companies still struggle with, esp those that positioned themselves in an OS/2 type fix.  If your native tools are too expensive, too restricted, nobody will write for you, esp if you can run other peoples applications better than the native platform.  And this was not only the cause of the ‘why bother’ with OS/2 native applications, but even today you can see it with RIM and their QNX based products that run Android applications.  Combine this with other low cost compilers from Borland and it really is no wonder why everyone was programming for Windows, esp the cost of Windows was typically cheaper than licensing a single seat for any DOS Extender that required royalties.  How much of this was due to Microsoft brilliance, or the competition being bent on short term greed, it is hard to say, but IBM wasn’t taking out full page ads trying to court developers with cheap access, but rather you had to phone them up, go through some IVR’s and be ready to charge a few thousand dollars for the honor of developing for OS/2.  I still remember Watcom C/C++ 10.0 being the cheapest way to build for everything, its a shame in a way that their SQL product was so good, as Sybase snapped up Watcom, and pretty much killed the languages, but thankfully not before open sourcing them.

The quest for the holy grail

With high resolution, and color depth displays, audio cards, multimedia games like “Monty Python’s quest for the holy grail” started to appear for Windows, as programmers could now concentrate on content, as Windows provided the layer for audio/video abstraction.  While some games worked great others did not as there was a performance gap from raw MS-DOS to Windows, but tech like WinG was closing the gap.  Not to mention the device driver patch hell was being shifted from the game devs to the hardware vendors, although that race still goes on, as even today Steam still combats older drivers and tries to hand hold users into updating them.

Even the horrible shell saw some competition for improvement, there was the Workplace shell for Windows 3.1, and of course BOB.  And boy were people so happy with BOB.  Not to mention thinking that this was just some great tech, it made its way into Office, to be forever remembered as Clippy in Office 97, who was tuned down in 2000 and killed in Office 2003.  Its funny how future looking movies always go on about these animated seemingly helpful digital assistants, and yet in the real world they usually are the first thing turned off.  I even remember the whole “Chrysler New Yorker’ debacle back in the day.  Even in the show room it just went endlessly on about the door being a jar.  Maybe its just HAL-9000 backlash.

So what can be said of Windows 3.1?  It still lingers in 32bit versions of Windows 7 (Wow! or Windows on windows), and it basically tipped the world into the Win-centric place we are today, along with the office everywhere mentality.  I can’t even imagine giving someone a 1-2-3 wks file, let alone a Word Perfect document, as I’m pretty sure there are no translators anymore. Oddly enough Win64 based OS’s can’t directly run Win16 based programs, there is always emulation.

xv6 revisited…

I was hoping to do more with this, but things are going other ways in life.  Anyways a while back I had touched on xv6, a MIT teaching tool and semiport of Unix v6 to the i386!  The best part about it, is that it is SMALL…

I’ve been playing with it the last day on the latest version of Qemu and hit a snag with its SMP support (yes it does have that!) so I played with it, and couldn’t figure it out so I had to turn it off.. It is something ACPI related, and probably along the reason why Windows x64 doesn’t run on new Qemu either..

I’ve built the cross compiling environment needed (A bare elf compiler/linker/assembler) and managed to smash enough of it into a single directory that you won’t need MinGW installed, but can rather invoke ‘build.bat’ which will compile link, dd the disk image, and launch Qemu.

I’ve had trouble with mkfs so… you’ll have to live with a prebuilt root image.

If you want to build your own cross compiling toolchain, there is a good guide here on the OSWiki.  Naturally you’ll want my previous post on some snags I ran into on MinGW if you do choose that as your target environment.

What I’d love to do is port newlib, and see just how useful this xv6 could become..  I would imagine adding signals (well beyond kill) may allow things like bash 1.x to run, and maybe gcc itself.. Which would be cool.

You can download my work here.  Check it out, it’s cool!