About ten years ago I found myself in need of a hardware MIDI solution for my Windows XP machine. At the time I had a Sound Blaster X-Fi in the machine, but it did not have a hardware MIDI IN and OUT port. The add-on that would add these ports was very expensive at the time, but I needed a hardware MIDI solution to use my Roland MIDI modules such as the CM-500 I had at the time. A less expensive solution was a USB MIDI interface, so I decided to buy one. The one I bought was the Edirol/Roland UM-1X, and it was not particularly inexpensive but I figured I needed a good quality solution for non-GM devices like the MT-32.
The UM-1SX is the same interface as the UM-1X but you need to plug in your own MIDI 5-pin cables. There were earlier UM-1 and UM-1S, which appear to function identically to the UM-1X and UM-1SX except they do not have the Advanced Driver Switch on them. After the UM-1X is the UM-1EX, which adds a switch for toggling MIDI OUT and MIDI THRU functionality and the UM-2EX, which adds a second MIDI OUT. After the 1EX and 2EX came the UM-ONE and the Roland UM-ONE mk2. The UM-ONE mk2 is the only one of these products which is not discontinued. The ONE and the ONE mk2 are the only one of these interfaces that have Windows 10 drivers. The rest have drivers only until Windows 8/8.1.
Showing posts with label DOSBox. Show all posts
Showing posts with label DOSBox. Show all posts
Sunday, December 18, 2016
Wednesday, December 14, 2016
Windows 3.0 Multimedia Edition - Early Windows Multimedia Gaming
Microsoft Windows 3.0 was the first widely adopted and truly successful version of Microsoft's graphical "Operating System." It was released on May 20, 1990 and came on five 1.2MB floppy disks. It could be purchased in a box and was the first version of Windows that was noted for being bundled with new PCs. It had an incremental update, Windows 3.0a, released on October 31, 1990.
Sunday, November 27, 2016
Windows 3.1 - The Dawn of Windows Gaming
Microsoft Windows released Windows 3.1 on April 6, 1992. This was the first version of Windows that Microsoft really designed for gaming applications and was available to purchase at retail. (Windows 3.00a with Multimedia Extensions was available from OEMs). Windows 3.1 main draw was its support for multimedia, essentially sound cards, MIDI devices and CD-ROM audio. Unlike the text command line parser of DOS, Windows was a graphical operating system with nary a command prompt in sight. Most control was accomplished using a mouse. For the first time users could easily access more than one program on a PC through the task switcher because the operating system was built for multitasking.
Sunday, October 16, 2016
Video Potpourri II
Sometimes, one needs to discuss related subjects that do not by themselves warrant a full blog entry. Hence the video potpourri series, in which I can talk about aspects of display technology.
I. Composite Artifact Color Emulation
Composite artifact color emulation has been around for a long time. Unfortunately, in many cases it just isn't very good at trying to replicate the look of a composite monitor. Simple schemes just assign a color arbitrarily to a group of two or four monochrome pixels. Mainline SVN DOSBox tries to simulate CGA composite color as if it were a VGA mode. The colors are reasonably accurate to the real IBM CGA cards, but the text color fringing is rather blocky. There are custom builds that use filtering and 16-bit color to give a more subtle impression of the composite color, but it still looks much, much cleaner than the real image. You can obtain a custom build with better composite color emulation here : http://www.vogons.org/viewtopic.php?f=41&t=12319&start=660#p501453
Thursday, January 7, 2016
Displaying DOSBox Screenshots on Real Hardware
DOSBox is an excellent program for taking screenshots of DOS games, it saves them losslessly in the Portable Network Graphics format. But what if you want to view these screenshots on real hardware, especially low-end hardware? Suppose there is a particular screen you really want to see on older hardware, can it be done? The answer is surprisingly yes, for the most part, and it's pretty easy.
Once upon a time, there existed a picture viewer program for DOS called CompuShow. The last numbered version released is 9.0.4, and can be downloaded here : http://www.cshowplace.com/cshow.htm CompuShow can load most of the major image formats from the mid-1990s, including PNG, GIF, PCX, BMP and JPG and many others that are rarely encountered today. It can also convert picture files to these formats and more.
CompuShow has the benefit of working on any PC compatible, from an IBM PC with an 8088 CPU to a Generic Windows 98SE machine. The program can fit on a 360KB floppy with room for some images, so it is small. Loading speed is decent even on the IBM PC. For a program of the later 80s to mid 90s, it supports a wide variety of graphics adapters.
I have personally tested the program with an IBM PC with IBM CGA and Hercules Graphics Cards and the modes work as they should. I have also tested the program with my Tandy 1000 SX and Tandy 1000 TL and it works well with them. Finally I have tested the program with my 486 PC with a Cirrus Logic VLB card with 2MB of RAM and a GD-5429 chipset. All modes work as expected except as noted below.
Graphics Modes CompuShow can display
CGA 160x100x16
Driver required to be loaded. Will work on a real CGA card or a pre Tandy 1000 TLs and SLs, but not on the later 1000s. CGA games that use this effective resolution include Styx, Round 42 and Moon Bugs.
CGA Mode 04/05 320x200x4
Limitations include no cyan/red/white palette, no tweaked capabilities (background/border color, mid-frame palette changes). Use Tandy, EGA or better 320x200x16 modes to show the cyan/red/white palette and tweaks. Border colors will never be shown.
CGA Mode 06 640x200x2
No support for changing foreground color with real CGA or entering color composite mode. Use Tandy 1000 Mode 640x200x4, Tandy TL/SL or EGA Mode 640x200x16 for showing foreground colors other than white. Not many games use a pure CGA 640x200x2 mode, some can choose it as an option like Wizardry and SimCity.
Tandy 1000/PCjr. Mode 09 320x200x16
Should be used for Tandy 1000/PCjr. Mode 08 160x200x16 as well, use /J1 as a command line argument to gain access to this mode. EGA Mode 320x200x16 can show these 160x200x16 and 320x200x16 screenshots.
Tandy 1000/PCjr. Mode 0A 640x200x4
Rarely used, use /J1 as a command line argument to gain access to this mode. Great if you want to show off graphic screenshots in PCjr. ColorPaint or Tandy Personal Deskmate 1-2, but otherwise almost never used.
Hercules Graphics 720x348x2
Available on Hercules monochrome graphics adapters. Better adapters do not tend to show this mode well.
Tandy 1000 TL/SL 640x200x16
Driver required to be loaded, can display EGA Mode 0E 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground. Very few games use this mode directly and it is never ideal. Sargon III and Star Trek 25th Anniversary allow it to be selected.
EGA Mode 0D 320x200x16
Can be used for displaying Tandy 1000/PCjr. Mode 08 & 09 graphics
EGA Mode 0E 640x200x16
Can display Tandy 1000 TL/SL 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground. Use this mode to display CGA Mode 06 640x200x2 properly with a VGA card. Mainly used by ports of Japanese PC games and some LucasArts and Sierra games for those few people without VGA cards.
EGA Mode 0F 640x350x2
Will be available only on a EGA card attached to a monochrome TTL monitor. Rarely used, but SimCity and Microsoft Flight Simulator 3.0 do support it.
EGA Mode 10 640x350x16
Will be available only on an EGA card attached to a 350-line color TTL monitor or by using a VGA card. The original SimCity's best graphics mode and also used for the title and menu screens in the early Lemmings games.
MCGA/VGA Mode 11 640x480x2
Takes the place of CGA Mode 6 640x200. Supported by SimCity and not much else.
VGA Mode 12 640x480x16
Not very popular due to the color limitations, Supported mainly by Syndicate.
MCGA/VGA Mode 13 320x200x256
VGA Mode-X 320x400x256, 360x480x256
320x400 had some popularity, System Shock supports it, but 320x240 was a more common non-standard resolution. 360x480 was pretty much the maximum resolution vanilla VGA could support, but was used by shareware and freeware games.
VESA Modes Supported by CL GD-5429 Driver :
Resolution / Color Depths
640x480 : 256, 32K, 64K, 16M
800x600 : 16, 256, 32K, 64K
1024x768 : 16, 256, 32K, 64K
If you have a 320x240x256 VGA Mode-X screenshot, you should be able to set perfect results using 640x480x256.
The program supports many SVGA chipsets as well as the usual VESA modes. It identified my VLB card's chipset accurately and was able to display all the above resolutions and color depths in the setup test program.
General Tips and Observations
I found that CompuShow really preferred interlaced GIFs. It would show minor drawing errors if it displayed PNGs, GIFs or PCX files using the Tandy graphics adapters. With interlaced GIFs, pictures will display correctly every time. Many, many programs can convert PNGs to GIFs. I use InfranView to perform the conversion, and the program will allow you to convert to the interlaced GIF format. While CompuShow will also convert PNGs to interlaced GIFs, InfranView can do so with the horsepower of a modern machine and can do multiple files in batches with ease.
DOSBox will save a 640x200 resolution or 160x100 CGA screenshot as 640x400 pixels. Similarly, Tandy/PCjr. 160x200 resolution screenshots are saved as 320x200. Unusual VGA screenshots tend to be saved in aspect ratios that will give the image a squarish aspect ratio. You do not need resize the images, CompuShow will automagically disregard unnecessary duplicate lines and show the image as it was meant to be shown.
When using the CGA display modes, it is important to know what the original palette colors were. The program gives you four palette options :
1 - Light Green/Light Red/Yellow
2 - Green/Red/Brown
3 - Light Cyan/Light Magenta/Intensified White
4 - Cyan/Magenta/White
On a real CGA adapter, if your screenshot uses the alternate palette colors, use the corresponding intense or non-intense cyan/magenta/white palette. If you select the wrong palette choice, the screen may draw very slowly as the program tried to interpolate colors and often the pixels will not look correct even with the wrong colors.
If you are trying to display a screen capture of a text mode with colored text, EGA, VGA and Tandy TL/SLs have a graphics mode that is sufficiently colorful to handle the effective text resolution with 16 colors. Tandy/PCjr. can handle 40-column text modes in full color, but not 80-column text modes. CGA is too limited to handle either column width with full color. Hercules may be able to offer a passable rendition of text mode in graphics mode.
Note that true VGA text modes have a 360x400 and 720x400 effective resolutions for for 40-column and 80-column text modes. DOSBox will save screenshots of VGA text modes in 320x400 and 640x400 resolutions, respectively, unless using the vgaonly machine type. These are the effective text resolutions of the MCGA adapter, which is a VGA offshoot.
Even though Hercules has a 720x348 graphics mode, it will not show monochrome text very well, even though the monochrome text Mode 07 has an effective resolution of 720x350. Also, monochrome text can use intense and non-intense characters, but monochome Hercules graphics can only show non-intense pixels.
Although the monochrome selections, A-G, are supposed to allow for light to dark shades of the color, it seems to have no effect in every system I tried. Maybe it is for a special type of CGA display.
With my IBM PC and IBM EGA graphics adapter (upgraded to 256KB), the wrong colors would appear when using the 16-color EGA modes. The program did not detect an EGA card, and I believe this is because I was using a 200-line monitor with the card. So it can look like a CGA card. I had to force the program to use the EGA modes using the /Ae command line argument, but I got color errors. I got the same color errors when I forced the program to EGA on a VGA card. When I used the EGA modes without the forcing command line argument, the pictures displayed correctly. Therefore, I suggest that EGA will display these graphics properly on a 350-line EGA monitor and with the card configured for full EGA capabilities. I do not have a 350-line color monitor to test with unfortunately. When connected to my MDA display, the 640x350x2 graphics mode was available and displayed the screenshot correctly.
Once upon a time, there existed a picture viewer program for DOS called CompuShow. The last numbered version released is 9.0.4, and can be downloaded here : http://www.cshowplace.com/cshow.htm CompuShow can load most of the major image formats from the mid-1990s, including PNG, GIF, PCX, BMP and JPG and many others that are rarely encountered today. It can also convert picture files to these formats and more.
CompuShow has the benefit of working on any PC compatible, from an IBM PC with an 8088 CPU to a Generic Windows 98SE machine. The program can fit on a 360KB floppy with room for some images, so it is small. Loading speed is decent even on the IBM PC. For a program of the later 80s to mid 90s, it supports a wide variety of graphics adapters.
I have personally tested the program with an IBM PC with IBM CGA and Hercules Graphics Cards and the modes work as they should. I have also tested the program with my Tandy 1000 SX and Tandy 1000 TL and it works well with them. Finally I have tested the program with my 486 PC with a Cirrus Logic VLB card with 2MB of RAM and a GD-5429 chipset. All modes work as expected except as noted below.
Graphics Modes CompuShow can display
CGA 160x100x16
Driver required to be loaded. Will work on a real CGA card or a pre Tandy 1000 TLs and SLs, but not on the later 1000s. CGA games that use this effective resolution include Styx, Round 42 and Moon Bugs.
CGA Mode 04/05 320x200x4
Limitations include no cyan/red/white palette, no tweaked capabilities (background/border color, mid-frame palette changes). Use Tandy, EGA or better 320x200x16 modes to show the cyan/red/white palette and tweaks. Border colors will never be shown.
CGA Mode 06 640x200x2
No support for changing foreground color with real CGA or entering color composite mode. Use Tandy 1000 Mode 640x200x4, Tandy TL/SL or EGA Mode 640x200x16 for showing foreground colors other than white. Not many games use a pure CGA 640x200x2 mode, some can choose it as an option like Wizardry and SimCity.
Tandy 1000/PCjr. Mode 09 320x200x16
Should be used for Tandy 1000/PCjr. Mode 08 160x200x16 as well, use /J1 as a command line argument to gain access to this mode. EGA Mode 320x200x16 can show these 160x200x16 and 320x200x16 screenshots.
Tandy 1000/PCjr. Mode 0A 640x200x4
Rarely used, use /J1 as a command line argument to gain access to this mode. Great if you want to show off graphic screenshots in PCjr. ColorPaint or Tandy Personal Deskmate 1-2, but otherwise almost never used.
Hercules Graphics 720x348x2
Available on Hercules monochrome graphics adapters. Better adapters do not tend to show this mode well.
Tandy 1000 TL/SL 640x200x16
Driver required to be loaded, can display EGA Mode 0E 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground. Very few games use this mode directly and it is never ideal. Sargon III and Star Trek 25th Anniversary allow it to be selected.
EGA Mode 0D 320x200x16
Can be used for displaying Tandy 1000/PCjr. Mode 08 & 09 graphics
EGA Mode 0E 640x200x16
Can display Tandy 1000 TL/SL 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground. Use this mode to display CGA Mode 06 640x200x2 properly with a VGA card. Mainly used by ports of Japanese PC games and some LucasArts and Sierra games for those few people without VGA cards.
EGA Mode 0F 640x350x2
Will be available only on a EGA card attached to a monochrome TTL monitor. Rarely used, but SimCity and Microsoft Flight Simulator 3.0 do support it.
EGA Mode 10 640x350x16
Will be available only on an EGA card attached to a 350-line color TTL monitor or by using a VGA card. The original SimCity's best graphics mode and also used for the title and menu screens in the early Lemmings games.
MCGA/VGA Mode 11 640x480x2
Takes the place of CGA Mode 6 640x200. Supported by SimCity and not much else.
VGA Mode 12 640x480x16
Not very popular due to the color limitations, Supported mainly by Syndicate.
MCGA/VGA Mode 13 320x200x256
VGA Mode-X 320x400x256, 360x480x256
320x400 had some popularity, System Shock supports it, but 320x240 was a more common non-standard resolution. 360x480 was pretty much the maximum resolution vanilla VGA could support, but was used by shareware and freeware games.
VESA Modes Supported by CL GD-5429 Driver :
Resolution / Color Depths
640x480 : 256, 32K, 64K, 16M
800x600 : 16, 256, 32K, 64K
1024x768 : 16, 256, 32K, 64K
If you have a 320x240x256 VGA Mode-X screenshot, you should be able to set perfect results using 640x480x256.
The program supports many SVGA chipsets as well as the usual VESA modes. It identified my VLB card's chipset accurately and was able to display all the above resolutions and color depths in the setup test program.
General Tips and Observations
I found that CompuShow really preferred interlaced GIFs. It would show minor drawing errors if it displayed PNGs, GIFs or PCX files using the Tandy graphics adapters. With interlaced GIFs, pictures will display correctly every time. Many, many programs can convert PNGs to GIFs. I use InfranView to perform the conversion, and the program will allow you to convert to the interlaced GIF format. While CompuShow will also convert PNGs to interlaced GIFs, InfranView can do so with the horsepower of a modern machine and can do multiple files in batches with ease.
DOSBox will save a 640x200 resolution or 160x100 CGA screenshot as 640x400 pixels. Similarly, Tandy/PCjr. 160x200 resolution screenshots are saved as 320x200. Unusual VGA screenshots tend to be saved in aspect ratios that will give the image a squarish aspect ratio. You do not need resize the images, CompuShow will automagically disregard unnecessary duplicate lines and show the image as it was meant to be shown.
When using the CGA display modes, it is important to know what the original palette colors were. The program gives you four palette options :
1 - Light Green/Light Red/Yellow
2 - Green/Red/Brown
3 - Light Cyan/Light Magenta/Intensified White
4 - Cyan/Magenta/White
On a real CGA adapter, if your screenshot uses the alternate palette colors, use the corresponding intense or non-intense cyan/magenta/white palette. If you select the wrong palette choice, the screen may draw very slowly as the program tried to interpolate colors and often the pixels will not look correct even with the wrong colors.
If you are trying to display a screen capture of a text mode with colored text, EGA, VGA and Tandy TL/SLs have a graphics mode that is sufficiently colorful to handle the effective text resolution with 16 colors. Tandy/PCjr. can handle 40-column text modes in full color, but not 80-column text modes. CGA is too limited to handle either column width with full color. Hercules may be able to offer a passable rendition of text mode in graphics mode.
Note that true VGA text modes have a 360x400 and 720x400 effective resolutions for for 40-column and 80-column text modes. DOSBox will save screenshots of VGA text modes in 320x400 and 640x400 resolutions, respectively, unless using the vgaonly machine type. These are the effective text resolutions of the MCGA adapter, which is a VGA offshoot.
Even though Hercules has a 720x348 graphics mode, it will not show monochrome text very well, even though the monochrome text Mode 07 has an effective resolution of 720x350. Also, monochrome text can use intense and non-intense characters, but monochome Hercules graphics can only show non-intense pixels.
Although the monochrome selections, A-G, are supposed to allow for light to dark shades of the color, it seems to have no effect in every system I tried. Maybe it is for a special type of CGA display.
With my IBM PC and IBM EGA graphics adapter (upgraded to 256KB), the wrong colors would appear when using the 16-color EGA modes. The program did not detect an EGA card, and I believe this is because I was using a 200-line monitor with the card. So it can look like a CGA card. I had to force the program to use the EGA modes using the /Ae command line argument, but I got color errors. I got the same color errors when I forced the program to EGA on a VGA card. When I used the EGA modes without the forcing command line argument, the pictures displayed correctly. Therefore, I suggest that EGA will display these graphics properly on a 350-line EGA monitor and with the card configured for full EGA capabilities. I do not have a 350-line color monitor to test with unfortunately. When connected to my MDA display, the 640x350x2 graphics mode was available and displayed the screenshot correctly.
Wednesday, November 11, 2015
HDMIfy your Old Consoles - Console Specific HDMI Upgrades
If you want high quality input from classic consoles to a modern flat screen TV, you need to use an HDMI converter like the X-RGB Mini Framemeister. This converter will take high quality RGB or Component video signals and convert them to HDMI-compatible 720p or 1080p with excellent results and minimal lag. I played with a Framemeister some months ago, and wrote up my impressions of the device here : http://nerdlypleasures.blogspot.com/2015/05/fun-with-framemeister.html Unfortunately, some classic consoles have difficulty displaying high quality video signals due to their lack of high quality video outputs. Some enterprising individuals have made mod boards that will directly convert the video to HDMI with less lag than a Framemeister, more features and more reliable results. Here are the projects that, as of the date of this writing, actually have been released in some form to the public.
NES - HiDef NES Mod & the AVS
The NES is one of the most important of the post-crash consoles and one of the few without a native RGB solution. There has been a NESRGB mod board released for two years now, which works wonders with a Framemeister. Before that people harvested 2C03 chips from Playchoice-10 PCBs and made do with the differences in the color palette, compatibility issues with color emphasis and sometimes video jailbars.
Kevtris' HiDefNES mod has already been mentioned in this blog, and it adds a whole host of features over the NESRGB + Framemeister solution. I lay them out in detail here : http://nerdlypleasures.blogspot.com/2015/07/analogue-nt-nes-as-luxury-retro-console.html
It is the board found in the Analogue Nt HDMI version and has been sold in pre-modded systems on ebay and on the http://www.game-tech.us/ website. The kit will be available for purchase so you can attempt to mod it yourself. However, it requires desoldering both the CPU and PPU without destroying either chip or the PCB, so it is not a beginner mod. Virtually all the compatibility issues with the HiDefNES mod and certain MMC5 games and the EverDrive N8 have been eliminated through a firmware update, so now is the time to consider taking the plunge.
The only obvious issue is that its FDS audio emulation is less than perfect. The mod will not work in an original Famicom, a Famicom Twin or an AV Famicom with laser-marked CPU and PPU chips.
The basic principle of how the HiDefNES obtains the color values of each background and sprite pixel is the same as used in the NESRGB. See here for my explanation : http://nerdlypleasures.blogspot.com/2015/06/nes-hardware-explained.html
There is now a 2600RGB board for the Atari 2600. The 2600RGB board uses similar principles to discover the colors of 2600 pixels as the NESRGB board does for NES pixels. Theoretically, it is quite possible for someone to develop an HDMI mod for the 2600.
bunnyboy, who runs the RetroUSB site, has displayed his AVS replica console at the 2015 Portland Retro Gaming Expo. His AVS has a 72-pin and a 60-pin connector for NES and Famicom games, and is designed as a front loader for the former and a top loader for the latter. It uses a completely new board and an FPGA chip to provide hardware emulation for the NES. It only outputs HDMI video and has separate power and reset buttons in the shape of NES front loader buttons. It has built in four NES controller ports that can be set to function as a NES Four Score or Famicom 4-player adapter. It also has a 15-pin Famicom expansion port for Famicom peripherals.
Because the console only supports HDMI output, it will not work with any Zapper or compatible Light Gun device and it will not work with the Famicom 3-D Glasses. The FPGA inside the console does not emulate any cartridge hardware or expansion audio. Expansion audio from Famicom cartridges is digitized and then mixed with the internal audio. However, because the AVS uses an FPGA, it can load updated firmware to fix any compatibility issues. Reports from the Portland Retro Gaming Expo were very positive, one person said the system ran Micro Machines correctly, which is a hard game to get right. bunnyboy is also designing wireless RF controller without lag to go with the console via an controller port adapter.
The console can only be powered through its USB port. The console has a scoreboard reporting function via the USB port, it will save high scores for certain known games and report them to NintendoAge. The idea is that you play a supported game, the high score is saved and then you plug in the system to your PC and it send the score to NintendoAge. The AVS only supports 720p while the HiDefNES can do either 720p or 1080p. The AVS is not for sale at the moment, but bunnyboy is aiming for a just under $200 price point. The best place for updates seems to be here : http://nintendoage.com/forum/messageview.cfm?catid=7&threadid=92557
N64 - Ultra HDMI
No N64 natively outputs RGB, but some early consoles can be modded with a simple amplifier board. Most consoles, however, have a video encoder chip that only outputs composite and s-video. These consoles require the N64RGB board. This board acts like a custom DAC, taking the digital signals from the N64 and turning them into analog RGB video. This will make it truly Framemeister worthy, although the s-video output from the N64 is pretty good compared to composite video. PAL N64s need a special cable to boost the S-Video signal from the console, NTSC N64s can use standard Nintendo or 3rd Party cables.
Today, if you want to bypass the Framemeister option, you can have an UltraHDMI board installed in your system. It works with NTSC and PAL framerates (up to 1080p for both) and not unlike the HiDefNES it comes with filters. The Ultra HDMI filters can simulate a CRT TV. Without the filters the lag is truly negligible, with them there is about a frame of lag. It supports all standard digital SD and HD resolutions, as shown here : http://ultrahdmi.retroactive.be/
The mod is very involved because you have to solder a flexible mylar-like ribbon cable to the finely spaced pins of the surface mounted graphics chip, the Reality Co-Processor (RCP). The RCP sends out 7-bit digital RGB values along with sync information. This allows for direct digital to digital conversion to the 8-bit RGB values HDMI supports without quality loss. The kit uses a mini-HDMI cable and only needs a small hole cut into the back of the N64. Because the mod is very tricky and not for the beginner, the board and kit is being sold only experienced mod kit installers. If you want your N64 modded with the Ultra HDMI, you need to send it to someone. This site is authorized to perform the mod : http://www.badassconsoles.com/ultrahdmi/
Game Boy - hdmyboy
In one sense, it is not too difficult to obtain a good quality HDMI image from a Gameboy. You use a Super Gameboy or a Super Gameboy 2 (for accurate speed) on a SNES that supports RGB and send the video and audio through a Framemeister. Alternatively, you can use a Game Boy Player and a Gamecube with the component video cables through the Framemeister, but that requires running custom software to make the Game Boy Player output at a true 240p speed.
Some time ago, there was a Kickstarter for a product called the hdmyboy. The campaign is archived here : https://www.kickstarter.com/projects/507669971/hdmyboy-a-full-hd-power-up-for-your-game-boy-class
This is a fully assembled kit that you insert between the two halves of a DMG-01 Game Boy. It adds half an inch or so to the height of the console when laid flat. It has an HDMI cable port and can support 720p or (preferred) 1080p.
Unlike the NES and N64 mods, this mod is easy to install. It requires no soldering. All you have to do is unscrew the shell, remove the ribbon cable that attaches the LCD PCB to the CPU PCB and insert that ribbon cable into the hdmyboy. The hdmyboy comes with a NES controller attached internally so you can control your Game Boy. It essentially becomes a consolized Game Boy at this point.
The Game Boy's LCD can only support four shades of one color, its video signal is fundamentally 2-bit digital monochrome signal with sync information. This information, along with mono audio, is available through the ribbon cable. The hdmyboy converts the digital video and the analog audio and sends it through the HDMI cable to the TV. The hdmyboy only supports mono audio because only a mono audio signal is necessary for the single speaker connected to the LCD PCB.
Unfortunately the Kickstarter campaign was not successful. However, the hdmyboy team still has some prototypes left here : http://www.hdmyboy.com/play/. They are very expensive however, (a bit too expensive for what it does) but should represent the best solution to obtain true Game Boy output without using an emulator. If they try another Kickstarter campaign again, then hopefully more people would be willing to contribute and get the price of this fine idea down.
Given a 1080p display, the hdmyboy can by default do 7x nearest neighbor scaling to give razor sharp graphics at the Game Boy's original aspect ratio. It can also do 12:7 scaling to give razor sharp widescreen graphics and occupy almost the whole screen if you prefer. Like the Super Game Boy it has 32 color palettes available to colorize the graphics. While the Game Boy's sprite and background tiles have 10 valid palette selections to choose from, the Super Game Boy (unless the game is enhanced) and hdmyboy only apply colors based on the actual color value of the outputted pixel.
NES - HiDef NES Mod & the AVS
The NES is one of the most important of the post-crash consoles and one of the few without a native RGB solution. There has been a NESRGB mod board released for two years now, which works wonders with a Framemeister. Before that people harvested 2C03 chips from Playchoice-10 PCBs and made do with the differences in the color palette, compatibility issues with color emphasis and sometimes video jailbars.
Kevtris' HiDefNES mod has already been mentioned in this blog, and it adds a whole host of features over the NESRGB + Framemeister solution. I lay them out in detail here : http://nerdlypleasures.blogspot.com/2015/07/analogue-nt-nes-as-luxury-retro-console.html
It is the board found in the Analogue Nt HDMI version and has been sold in pre-modded systems on ebay and on the http://www.game-tech.us/ website. The kit will be available for purchase so you can attempt to mod it yourself. However, it requires desoldering both the CPU and PPU without destroying either chip or the PCB, so it is not a beginner mod. Virtually all the compatibility issues with the HiDefNES mod and certain MMC5 games and the EverDrive N8 have been eliminated through a firmware update, so now is the time to consider taking the plunge.
The only obvious issue is that its FDS audio emulation is less than perfect. The mod will not work in an original Famicom, a Famicom Twin or an AV Famicom with laser-marked CPU and PPU chips.
The basic principle of how the HiDefNES obtains the color values of each background and sprite pixel is the same as used in the NESRGB. See here for my explanation : http://nerdlypleasures.blogspot.com/2015/06/nes-hardware-explained.html
There is now a 2600RGB board for the Atari 2600. The 2600RGB board uses similar principles to discover the colors of 2600 pixels as the NESRGB board does for NES pixels. Theoretically, it is quite possible for someone to develop an HDMI mod for the 2600.
bunnyboy, who runs the RetroUSB site, has displayed his AVS replica console at the 2015 Portland Retro Gaming Expo. His AVS has a 72-pin and a 60-pin connector for NES and Famicom games, and is designed as a front loader for the former and a top loader for the latter. It uses a completely new board and an FPGA chip to provide hardware emulation for the NES. It only outputs HDMI video and has separate power and reset buttons in the shape of NES front loader buttons. It has built in four NES controller ports that can be set to function as a NES Four Score or Famicom 4-player adapter. It also has a 15-pin Famicom expansion port for Famicom peripherals.
Because the console only supports HDMI output, it will not work with any Zapper or compatible Light Gun device and it will not work with the Famicom 3-D Glasses. The FPGA inside the console does not emulate any cartridge hardware or expansion audio. Expansion audio from Famicom cartridges is digitized and then mixed with the internal audio. However, because the AVS uses an FPGA, it can load updated firmware to fix any compatibility issues. Reports from the Portland Retro Gaming Expo were very positive, one person said the system ran Micro Machines correctly, which is a hard game to get right. bunnyboy is also designing wireless RF controller without lag to go with the console via an controller port adapter.
The console can only be powered through its USB port. The console has a scoreboard reporting function via the USB port, it will save high scores for certain known games and report them to NintendoAge. The idea is that you play a supported game, the high score is saved and then you plug in the system to your PC and it send the score to NintendoAge. The AVS only supports 720p while the HiDefNES can do either 720p or 1080p. The AVS is not for sale at the moment, but bunnyboy is aiming for a just under $200 price point. The best place for updates seems to be here : http://nintendoage.com/forum/messageview.cfm?catid=7&threadid=92557
N64 - Ultra HDMI
No N64 natively outputs RGB, but some early consoles can be modded with a simple amplifier board. Most consoles, however, have a video encoder chip that only outputs composite and s-video. These consoles require the N64RGB board. This board acts like a custom DAC, taking the digital signals from the N64 and turning them into analog RGB video. This will make it truly Framemeister worthy, although the s-video output from the N64 is pretty good compared to composite video. PAL N64s need a special cable to boost the S-Video signal from the console, NTSC N64s can use standard Nintendo or 3rd Party cables.
Today, if you want to bypass the Framemeister option, you can have an UltraHDMI board installed in your system. It works with NTSC and PAL framerates (up to 1080p for both) and not unlike the HiDefNES it comes with filters. The Ultra HDMI filters can simulate a CRT TV. Without the filters the lag is truly negligible, with them there is about a frame of lag. It supports all standard digital SD and HD resolutions, as shown here : http://ultrahdmi.retroactive.be/
The mod is very involved because you have to solder a flexible mylar-like ribbon cable to the finely spaced pins of the surface mounted graphics chip, the Reality Co-Processor (RCP). The RCP sends out 7-bit digital RGB values along with sync information. This allows for direct digital to digital conversion to the 8-bit RGB values HDMI supports without quality loss. The kit uses a mini-HDMI cable and only needs a small hole cut into the back of the N64. Because the mod is very tricky and not for the beginner, the board and kit is being sold only experienced mod kit installers. If you want your N64 modded with the Ultra HDMI, you need to send it to someone. This site is authorized to perform the mod : http://www.badassconsoles.com/ultrahdmi/
Game Boy - hdmyboy
In one sense, it is not too difficult to obtain a good quality HDMI image from a Gameboy. You use a Super Gameboy or a Super Gameboy 2 (for accurate speed) on a SNES that supports RGB and send the video and audio through a Framemeister. Alternatively, you can use a Game Boy Player and a Gamecube with the component video cables through the Framemeister, but that requires running custom software to make the Game Boy Player output at a true 240p speed.
Some time ago, there was a Kickstarter for a product called the hdmyboy. The campaign is archived here : https://www.kickstarter.com/projects/507669971/hdmyboy-a-full-hd-power-up-for-your-game-boy-class
This is a fully assembled kit that you insert between the two halves of a DMG-01 Game Boy. It adds half an inch or so to the height of the console when laid flat. It has an HDMI cable port and can support 720p or (preferred) 1080p.
Unlike the NES and N64 mods, this mod is easy to install. It requires no soldering. All you have to do is unscrew the shell, remove the ribbon cable that attaches the LCD PCB to the CPU PCB and insert that ribbon cable into the hdmyboy. The hdmyboy comes with a NES controller attached internally so you can control your Game Boy. It essentially becomes a consolized Game Boy at this point.
The Game Boy's LCD can only support four shades of one color, its video signal is fundamentally 2-bit digital monochrome signal with sync information. This information, along with mono audio, is available through the ribbon cable. The hdmyboy converts the digital video and the analog audio and sends it through the HDMI cable to the TV. The hdmyboy only supports mono audio because only a mono audio signal is necessary for the single speaker connected to the LCD PCB.
Unfortunately the Kickstarter campaign was not successful. However, the hdmyboy team still has some prototypes left here : http://www.hdmyboy.com/play/. They are very expensive however, (a bit too expensive for what it does) but should represent the best solution to obtain true Game Boy output without using an emulator. If they try another Kickstarter campaign again, then hopefully more people would be willing to contribute and get the price of this fine idea down.
Given a 1080p display, the hdmyboy can by default do 7x nearest neighbor scaling to give razor sharp graphics at the Game Boy's original aspect ratio. It can also do 12:7 scaling to give razor sharp widescreen graphics and occupy almost the whole screen if you prefer. Like the Super Game Boy it has 32 color palettes available to colorize the graphics. While the Game Boy's sprite and background tiles have 10 valid palette selections to choose from, the Super Game Boy (unless the game is enhanced) and hdmyboy only apply colors based on the actual color value of the outputted pixel.
Wednesday, March 11, 2015
Digital Sales of DOS Games
DOS games were no longer generally being sold commercially, with certain exceptions, at retail after the 1990s. Occasionally you could find some games in bargain bins or on a compilation CD, but generally speaking, if you wanted to purchase a DOS game, you went on ebay or a similar site. There were also sites like Game Trading Zone, which I used to make a few trades and purchases before it went to a subscriber only format.
Getting DOS games to run in the first half of year 2000 decade was often an exercise in frustration. Windows XP was generally less compatible than Windows 98SE with DOS games. The ability to play DOS games with a sound card was often unsuccessful. While there were narrowly-focused projects to emulate game engines like Exult, Frotz and SCUMMVM, there was no easy to use general solution for playing DOS games. DOSBox had been in development since 2002, but for the first few years the software was still improving to the point where it could be counted on to run most games.
While companies like id Software and Apogee and 3D Realms were happy to sell from their back catalogs online, their combined output was only a very small portion of games available for DOS. However, companies like Activision discovered that the open source nature of DOSBox freely allowed them to make their older catalog titles available again. Vivendi/Universal did just that when it released The King's Quest Collection in 2006. In 2008, the site GoodOldGames began to sell DOS games. GoodOldGames, now just GoG, would bundle the game files with a preconfigured version of DOSBox to launch the game.
Selling old games to run on systems which they were never intended to be played on is not new and has been around as long as emulation has been around. Actually, since early "authentic" releases like Microsoft's Return of the Arcade series simulated arcade games, the concept goes back even further. Mostly these were limited to arcade and console games. When the Nintendo Wii was introduced in 2006, it introduced the Virtual Console which allowed players to buy select console games, which were emulated on the current system. Sony has a Playstation and Playstation 2 classic line for the Playstation 3.
I have been generally indifferent to GoG on this blog. GoG is emblematic about getting DOS games to run on modern hardware with a minimum of fuss. This was the original intent of the VOGONS forum, as VOGONS stands for Very Old Games on New Systems. In the beginning of the VOGONS forum, less ambitious emulators like VDMSound GliDOS, and OpenGLide also had a great deal of traffic on their forums. GliDOS and Munt and SoftMPU still have a reasonable amount of traffic, but the site was much more oriented to emulation previous than it is now. However, the focus became centered more and more around DOSBox.
Another development was in the movement to real hardware. Retro computing, where the intent is to actually use old computers to run DOS games instead of simply emulating the operating system and enough hardware to get the games to run began to take shape in 2005. Much of the early focus was on the MT-32, which was a difficult and demanding synthesizer to emulate. However, eventually people started to understand that emulators cannot replicate the experience of playing games on the hardware they were intended to be played on. Now, retrocomputing and hardware is undoubtedly the busiest part of the VOGONS forum.
Still, real hardware enthusiasts are a niche, the general game playing public are ignorant. GoG and other digital download services like Steam and Origin cater to the general public and try to make the games as easy as possible to run. You will find and be able to purchase DOS games from these sites, and I would like to discuss what is available generally and what to expect from each site.
GoG vs. Steam and Origin
GoG is the pioneer of selling DOS games bundled with DOSBox to get them running in modern versions of Windows. Thanks to the portability of DOSBox, GoG can also make (some of) these games available on Mac OS X. They were so successful that they were able to eventually offer Windows 9x era games and Windows XP era games, right up to new releases. In this sense, they are a competitor to Steam.
While Steam does have some DOS games on offer, GoG is almost always the best choice. GoG takes the original game files and tweaks DOSBox to run each game appropriately. They will use reasonably current versions of DOSBox, 0.72-0.74 and they bear responsibility for getting every game they sell running. By contrast with Steam, one producer may be very good about squashing bugs and making sure DOSBox is updated to the latest version, while others are not. The aforementioned The King's Quest Collection is also available on Steam, but officially it only supports Windows 2000 and XP. Support for Vista, 7 or 8 requires an unofficial fan patch.
Additionally, GoG releases are DRM free. You do not need to connect to a GoG server after downloading the game. You don't have to have a Steam client verify your account to play any game. You can play your DOS games offline, as most were meant to be played.
Still, all is not perfect with GoG. Games with CD Audio tracks may come with them in lossy mp3 format. Don't expect anything like floppy images, most of GoG's games came off CD versions of CD compilations. Getting GoG games to run on retro hardware without DOSBox can be a challenge. The GoG releases may be missing crucial install or executable files which are necessary to get the game running on a PC or to change the settings to match the hardware on the retro machine. This is undoubtedly the case with any GoG game running via SCUMMVM instead of DOSBox.
SCUMMVM is a jack of all trades and a master of none. It functions like a reverse engineered interpreter as well as an emulator. When you run the game with its original executable in DOSBox, you are using the original interpreter and taking one very significant variable out of the equation. Moreover, DOSBox has more robust graphics and sound support than SCUMMVM. Finally, SCUMMVM only requires the data files, the executable and game driver files are not needed and are generally not included in distributions intended for SCUMMVM. This includes GoG releases, which is one reason why I prefer to track down original discs. That way, I can enjoy my games on real hardware.
Some GoG releases of large games give you a huge folder with all the files and a hacked executable allowing the game to load from the hard drive instead of a CD. This may make it impossible to play the game on real hardware because the installation directory is so large or it is not obvious what the contents of each CD should be. This is ultimately the reason why I seldom mention or have anything to do with digital downloads of DOS games.
I have created a list of all DOS games on sale at GoG's website as of the date of this post. GoG sells games individually or in a bundle, but not both. This list shows what they are selling at the present time :
Some games like King's Quest VII and Tomb Raider come bundled with their Windows sequels. I have included any DOS games available, even if they are only available in a bundle with a Windows-only game like the Might and Magic games. Games with an # next to them use SCUMMVM. While there are 155 individual purchasing options on this list, GoG's total number of games run to 967.
You will note that there are several games available on both GoG and Steam. While the 47 games available on Steam is only a fraction of those available on GoG, there are several exclusives. Much of the id Software collection is available and it is exclusive. There are more choices for LucasArts adventures. X-COM and the all-mighty Fallout (previously available on GoG) can only be found here.
As you can see, most of these games were released by Origin Systems or under the Origin label after EA's purchase. However, Bullfrog, Westwood Studios and Maxis, all of which EA purchased in the 1990s like Origin, are all represented. I understand that Origin uses DOSBox, just like Steam and GoG. Tomb Raider is owned by Square Enix, but apparently EA acquired rights to most games in the series. Origin's descriptions for games are a little sparse, so I do not know which titles include their expansion packs. I would almost guarantee that Wing Commander 1-2 do. Origin does not bundle games and has no exclusive DOS titles, so I would suggest using GoG instead.
Getting DOS games to run in the first half of year 2000 decade was often an exercise in frustration. Windows XP was generally less compatible than Windows 98SE with DOS games. The ability to play DOS games with a sound card was often unsuccessful. While there were narrowly-focused projects to emulate game engines like Exult, Frotz and SCUMMVM, there was no easy to use general solution for playing DOS games. DOSBox had been in development since 2002, but for the first few years the software was still improving to the point where it could be counted on to run most games.
While companies like id Software and Apogee and 3D Realms were happy to sell from their back catalogs online, their combined output was only a very small portion of games available for DOS. However, companies like Activision discovered that the open source nature of DOSBox freely allowed them to make their older catalog titles available again. Vivendi/Universal did just that when it released The King's Quest Collection in 2006. In 2008, the site GoodOldGames began to sell DOS games. GoodOldGames, now just GoG, would bundle the game files with a preconfigured version of DOSBox to launch the game.
Selling old games to run on systems which they were never intended to be played on is not new and has been around as long as emulation has been around. Actually, since early "authentic" releases like Microsoft's Return of the Arcade series simulated arcade games, the concept goes back even further. Mostly these were limited to arcade and console games. When the Nintendo Wii was introduced in 2006, it introduced the Virtual Console which allowed players to buy select console games, which were emulated on the current system. Sony has a Playstation and Playstation 2 classic line for the Playstation 3.
I have been generally indifferent to GoG on this blog. GoG is emblematic about getting DOS games to run on modern hardware with a minimum of fuss. This was the original intent of the VOGONS forum, as VOGONS stands for Very Old Games on New Systems. In the beginning of the VOGONS forum, less ambitious emulators like VDMSound GliDOS, and OpenGLide also had a great deal of traffic on their forums. GliDOS and Munt and SoftMPU still have a reasonable amount of traffic, but the site was much more oriented to emulation previous than it is now. However, the focus became centered more and more around DOSBox.
Another development was in the movement to real hardware. Retro computing, where the intent is to actually use old computers to run DOS games instead of simply emulating the operating system and enough hardware to get the games to run began to take shape in 2005. Much of the early focus was on the MT-32, which was a difficult and demanding synthesizer to emulate. However, eventually people started to understand that emulators cannot replicate the experience of playing games on the hardware they were intended to be played on. Now, retrocomputing and hardware is undoubtedly the busiest part of the VOGONS forum.
Still, real hardware enthusiasts are a niche, the general game playing public are ignorant. GoG and other digital download services like Steam and Origin cater to the general public and try to make the games as easy as possible to run. You will find and be able to purchase DOS games from these sites, and I would like to discuss what is available generally and what to expect from each site.
GoG vs. Steam and Origin
GoG is the pioneer of selling DOS games bundled with DOSBox to get them running in modern versions of Windows. Thanks to the portability of DOSBox, GoG can also make (some of) these games available on Mac OS X. They were so successful that they were able to eventually offer Windows 9x era games and Windows XP era games, right up to new releases. In this sense, they are a competitor to Steam.
While Steam does have some DOS games on offer, GoG is almost always the best choice. GoG takes the original game files and tweaks DOSBox to run each game appropriately. They will use reasonably current versions of DOSBox, 0.72-0.74 and they bear responsibility for getting every game they sell running. By contrast with Steam, one producer may be very good about squashing bugs and making sure DOSBox is updated to the latest version, while others are not. The aforementioned The King's Quest Collection is also available on Steam, but officially it only supports Windows 2000 and XP. Support for Vista, 7 or 8 requires an unofficial fan patch.
Additionally, GoG releases are DRM free. You do not need to connect to a GoG server after downloading the game. You don't have to have a Steam client verify your account to play any game. You can play your DOS games offline, as most were meant to be played.
Still, all is not perfect with GoG. Games with CD Audio tracks may come with them in lossy mp3 format. Don't expect anything like floppy images, most of GoG's games came off CD versions of CD compilations. Getting GoG games to run on retro hardware without DOSBox can be a challenge. The GoG releases may be missing crucial install or executable files which are necessary to get the game running on a PC or to change the settings to match the hardware on the retro machine. This is undoubtedly the case with any GoG game running via SCUMMVM instead of DOSBox.
SCUMMVM is a jack of all trades and a master of none. It functions like a reverse engineered interpreter as well as an emulator. When you run the game with its original executable in DOSBox, you are using the original interpreter and taking one very significant variable out of the equation. Moreover, DOSBox has more robust graphics and sound support than SCUMMVM. Finally, SCUMMVM only requires the data files, the executable and game driver files are not needed and are generally not included in distributions intended for SCUMMVM. This includes GoG releases, which is one reason why I prefer to track down original discs. That way, I can enjoy my games on real hardware.
Some GoG releases of large games give you a huge folder with all the files and a hacked executable allowing the game to load from the hard drive instead of a CD. This may make it impossible to play the game on real hardware because the installation directory is so large or it is not obvious what the contents of each CD should be. This is ultimately the reason why I seldom mention or have anything to do with digital downloads of DOS games.
I have created a list of all DOS games on sale at GoG's website as of the date of this post. GoG sells games individually or in a bundle, but not both. This list shows what they are selling at the present time :
11th Hour, The |
Akalabeth : World of Doom (needs replacement DOS extender) |
Alien Breed (including Tower Assault) |
Alone in the Dark |
Battle Chess 1, 2 4000 |
Beneath A Steel Sky# |
BioForge |
Blake Stone Aliens of Gold |
Blake Stone Planet Strike |
Blood |
Bloodnet |
Cannon Fodder |
Cannon Fodder 2 |
Capitalism Plus |
Carmageddon |
Castles 1-2 |
Catacomb 1, The Catacomb, Catacomb 3D, Catacomb Abyss 3D, Catacomb Armageddon, Catacomb Apocalypse |
Challenge of the Five Realms |
Cosmo's Cosmic Adventure: Forbidden Planet |
Crusader: No Regret |
Crusader: No Remorse |
Crystal Caves |
Cyberia |
Dangerous Dave in the Haunted Mansion, Dangerous Dave's Risky Rescue, Dave Goez Nutz! |
Darklands |
Daryl F. Gates' Police Quest: SWAT |
Defender of the Crown (CGA & EGA, Amiga Emulation) |
Descent 1 & 2 |
Dragon Lore: The Legend Begins |
Dragonsphere |
Duke Nukem 1-2 |
Duke Nukem 3D Atomic Edition |
Dungeon Keeper |
F-117A Nighthawk Stealth Fighter 2.0 |
Flight of the Amazon Queen# |
Gabriel Knight 2 |
Gabriel Knight: Sins of the Fathers |
Gobliiins 1,2 & Goblins Quest 3# |
Heroes of Might and Magic 1 & 2 |
Hocus Pocus |
Hugo 1-2-3# |
I Have no Mouth and I Must Scream |
Indiana Jones and the Fate of Atlantis# |
Inherit the Earth |
Ishar 1-3 & Crystals of Arborea |
Jagged Alliance |
King's Quest 1-2-3 |
King's Quest 4-5-6 |
King's Quest VII |
Labyrinth of Time |
Lands of Lore 1 & 2 |
Last Express, The |
Legend of Kyrandia 3 |
Legend of Kyrandia Book One# |
Legend of Kyrandia Book Two# |
Leisure Suit Larry 7 |
Leisure Suit Larry's Greates Hits and Misses (1, 2, 3, 5, 6, 1 Remake)# |
Litil Devil |
Little Big Adventure |
Loom CD-ROM# |
Lure Of The Temptress |
Magic Carpet (including Hidden Worlds) |
Magic Carpet 2 |
Manhole : Masterpiece Edition |
Master of Magic |
Master of Orion |
MDK |
Megarace 1-2 |
Might and Magic 1-5 |
Monkey Island 2 – LeChuck's Revenge – Special Edition |
Monster Bash |
Mortal Kombat 1-2-3 |
Oddworld: Abe's Oddysee |
Personal Nightmare |
Phantasmagoria 1-2 |
Pinball Illusions |
Pinball Mania |
Pinball World |
Police Quest Collection (1 Remake, 2, 3 Open Season) |
Populous |
Populous 2 |
Pro Pinball: The Web |
Pro Pinball: Timeshock! |
Quest for Glory 1-5 |
Raptor Call of the Shadows |
Rayman |
Realms of Arkania 1-2 |
Realms of Chaos |
Redneck Rampage |
Return of the Incredible Machine: Contraptions |
Return to Zork |
Rex Nebular and the Cosmic Gender Bender |
Rise of the Triad (including Extreme Rise of the Triad) |
Robinson's Requiem & Deus |
Sam and Max Hit the Road# |
Screamer |
Screamer 2 |
Secret Agent |
Secret of Monkey Island, The – Special Edition |
Sensible World of Soccer '96/'97 |
Seven Cities of Gold: Commemorative Edition |
Shattered Steel |
Sid Meier's Colonization |
Sid Meier's Covert Action |
Sid Meiers Pirates! & Pirates Gold |
Silent Service 1-2 |
SimCity 2000: CD Collection |
Simon the Sorcerer II |
Simon the Sorceror# |
Space Quest 1-2-3 |
Space Quest 4-5-6 |
Spycraft: The Great Game |
Star Control 1-2 Star Trek: 25th Anniversary Star Trek: Judgement Rites Star Trek: Starfleet Academy |
Star Wars TIE Fighter Collectors CD-ROM |
Star Wars X-Wing Collectors CD-ROM |
Star Wars: Dark Forces |
Starflight 1-2 |
Stargunner |
Stonekeep |
Strike Commander |
Sumbwar 2050 (including The Plot Deepens) |
Superfrog |
Sword of the Samurai |
Syndicate Plus (Syndicate & American Revolt) |
Syndicate Wars |
TEENAGENT |
Terminal Velocity |
Tex Murphy : The Pandora Directive |
Tex Murphy: Mean Streets & Martian Memorandum |
Tex Murphy: Under a Killing Moon |
The 7th Guest# |
The Dig# |
Theme Hospital |
Theme Park |
Time Commando |
Tomb Raider |
Tomb Raider |
Toonstruck |
Torin's Passage |
Tyrian 2000 |
Ultima 4-5-6 (4 available for free separately) |
Ultima 7 Complete (Black Gate & Forge of Virtue, Serpent Isle & Silver Seed) |
Ultima 8 (including Speech Pack) |
Ultima Underworld 1 & 2 |
Ultimate Body Blows |
VR Soccer '96 |
Wacky Wheels |
Wasteland |
WaxWorks# |
Wing Commander 1 & 2 (including both Secret Missions and Special Operations) |
Wing Commander 3 |
Wing Commander Academy |
Wing Commander Armada |
Wing Commander Privateer |
Wings (Amiga Emulation) |
Wizardry 6-7 |
World of Aden: Entomorph - Plague of the Darkfall |
Worlds of Ultima: Martian Dreams |
Worlds of Ultima: Savage Empire |
Zak McKracken and the Alien Mindbenders@ |
Zork Anthology ( Zork I, Zork II, Zork III, Beyond Zork, Zork Zero, and Planetfall) |
Some games like King's Quest VII and Tomb Raider come bundled with their Windows sequels. I have included any DOS games available, even if they are only available in a bundle with a Windows-only game like the Might and Magic games. Games with an # next to them use SCUMMVM. While there are 155 individual purchasing options on this list, GoG's total number of games run to 967.
From this list, I can discern what genres of DOS games are sufficiently popular that GoG would go to the trouble to secure the rights for sale. Classic adventure games and role playing games constitute a fair proportion of this list. Apogee's shareware catalog is mostly present, and strategy games like Castles and Populous and SimCity 2000 are represented.
When it comes to racing and flight simulators, the available games are mostly very narrowly tailored to specific series like Wing Commander and Star Wars. These games tend to age poorly and usually have to find some other hook to be remembered in the long term. For this reason, sports games, fighting games and more casual games have very few spaces on this list.
There are definitely some odd choices on this list. Wacky Wheels and Ultimate Body Blows are definitely games people tend to look back on with rose tinted glasses. Even in their time they were thoroughly trounced by Super Mario Kart and F-Zero and console ports of Street Fighter II and were sort of the console-less man's substitute. I have played many of these games and have at least heard of most of them, but Litil Divil is a new one for me. This apparently was much more popular on the Amiga than on DOS.
Steam
It is harder to search for DOS games on Steam because Steam allows you to search by labels but not by year of original release. Here are the DOS games currently available for purchase on Steam :
When it comes to racing and flight simulators, the available games are mostly very narrowly tailored to specific series like Wing Commander and Star Wars. These games tend to age poorly and usually have to find some other hook to be remembered in the long term. For this reason, sports games, fighting games and more casual games have very few spaces on this list.
There are definitely some odd choices on this list. Wacky Wheels and Ultimate Body Blows are definitely games people tend to look back on with rose tinted glasses. Even in their time they were thoroughly trounced by Super Mario Kart and F-Zero and console ports of Street Fighter II and were sort of the console-less man's substitute. I have played many of these games and have at least heard of most of them, but Litil Divil is a new one for me. This apparently was much more popular on the Amiga than on DOS.
Steam
It is harder to search for DOS games on Steam because Steam allows you to search by labels but not by year of original release. Here are the DOS games currently available for purchase on Steam :
11th Hour |
Across The Rhine |
Blake Stone: Aliens of Gold & Planet Strike, Rise of the Triad (including Extreme Rise of the Triad) |
Carmageddon Max Pack |
Command H.Q. |
Commander Keen 1-5 |
Darklands |
Descent |
Descent 2 |
DOOM II |
Duke Nukem |
Duke Nukem 2 |
Duke Nukem 3D Megaton Edition (includes Atomic Edition) |
Eradicator |
Fallout |
Final DOOM |
Harvester |
Heretic: Shadow of the Serpent Riders |
HeXen: Beyond Heretic |
HeXen: Deathkings of the Dark Citadel |
I Have no Mouth and I Must Scream |
Indiana Jones and the Fate of Atlantis |
King's Quest 1 Remake, 2, 3, 4, 5, 6, 7 |
Loom |
MDK |
Monkey Island 2 Special Edition (includes DOS version) |
Nam |
One Unit Whole Blood |
Raptor: Call of The Shadows |
Realms of Arkania |
Realms of Arkania 2 |
Realms of Arkania 3 |
Realms of the Haunting |
Secret of Monkey Island Special Edition (includes DOS CD version) |
Shadow Warrior |
Silent Service |
Silent Service 2 |
Spear of Destiny |
Star Wars: Dark Forces |
The 7th Guest |
The Dig |
Tomb Raider |
Ultimate DOOM |
Wasteland |
Wizardry 6-7 |
Wolfenstein 3D |
X-COM: Apocalypse |
X-COM: UFO Defense |
You will note that there are several games available on both GoG and Steam. While the 47 games available on Steam is only a fraction of those available on GoG, there are several exclusives. Much of the id Software collection is available and it is exclusive. There are more choices for LucasArts adventures. X-COM and the all-mighty Fallout (previously available on GoG) can only be found here.
I have included some remakes like the two Monkey Island games and Duke Nukem 3D Megaton edition because they allow you to play the original DOS games, upon which they are based, in the program. Steam allows you to purchase most of these games individually or in bundles to save money.
Origin
Electronic Arts' digital distribution service is especially aptly named Origin when it comes to releases of older games. Here is the list of games available through its service :
Crusader: No Regret |
Crusader: No Remorse |
Dungeon Keeper |
Lands of Lore |
Lands of Lore 2 |
Magic Carpet |
Populous |
Populous 2 |
SimCity 2000 CD Collection |
Starflight |
Starflight 2 |
Syndicate |
Tomb Raider |
Ultima |
Ultima 2 |
Ultima 3 |
Ultima 4 |
Ultima 5 |
Ultima 6 |
Ultima 7 Complete (Black Gate & Forge of Virtue, Serpent Isle & Silver Seed) |
Ultima 8 (including Speech Pack) |
Ultima Underworld |
Ultima Underworld 2 |
Wing Commander |
Wing Commander 2 |
Wing Commander 3 |
Wing Commander 4? |
Wing Commander: Privateer |
As you can see, most of these games were released by Origin Systems or under the Origin label after EA's purchase. However, Bullfrog, Westwood Studios and Maxis, all of which EA purchased in the 1990s like Origin, are all represented. I understand that Origin uses DOSBox, just like Steam and GoG. Tomb Raider is owned by Square Enix, but apparently EA acquired rights to most games in the series. Origin's descriptions for games are a little sparse, so I do not know which titles include their expansion packs. I would almost guarantee that Wing Commander 1-2 do. Origin does not bundle games and has no exclusive DOS titles, so I would suggest using GoG instead.
Among the Missing
Even with all these choices, there are some substantial gaps where you would expect some games to be released. None of the classic SSI AD&D Gold Box or Eye of the Beholder games are available. Ubisoft bought SSI and does not offer classic games digitally. Also, not only would Ubisoft but also Wizards of the Coast would have to be involved in licensing.
GoG offers Wing Commander 4 with DVD cutscenes. Wing Commander 4 as it came on six CD-ROMs is a DOS game, Wing Commander 4 which came on a double-sided, single layer DVD is a Windows game, so it is not listed. Origin does not give sufficient information to determine whether its version of WC4 is the DOS or the Windows version, but I suspect the latter.
Some of the original Sierra titles to their Quest series are missing either the AGI version or the SCI remake. GoG offers both with Quest for Glory and Leisure Suit Larry. However, it does not offer the SCI remakes of King's Quest I or Space Quest I and does not offer the AGI release of Police Quest I. The Steam release for the King's Quest Collection includes the SCI remake of King's Quest I but not the AGI release.
For some reason, Commander Keen in Aliens Ate My Babysitter! (a.k.a. Keen 6) is not available for purchase either on the Steam bundle or through id Software's site. Nor is Wizardry 1-5 available; I would have expected GoG to offer it as they do 6-7.
LucasArts' classics SCUMM engine games have seen a spotty release digitally so far. Maniac Mansion, Indiana Jones and the Last Crusade, Day of the Tentacle and Full Throttle are all MIA. The first two Monkey Island games are only available in their original form via the Special Additions, and even though they are windows games, the third and fourth games aren't available. In my opinion, outside the voice acting, the Special Editions are pointless. Double Fine is remastering Day of the Tentacle like they did with Grim Fandango, so it may include the original version as a playable extra like the Monkey Island Special Editions. Zak McKracken and the Alien Mindbenders has recently been released on GoG, but it is the Japanese FM-Towns version, which I personally will give a pass because while it is not a true DOS game, it looks like one and acts like the actual DOS versions.
Non IBM-PC compatible Games
So far, this article has focused on games that are available for purchase that originally ran on IBM PC and MS-DOS. The MS-DOS games released on Steam, GoG and Origin rely on emulation through DOSBox. However, computer games for non-PC compatible systems have do not really have much of a presence through digital downloads. GoG does offer the Amiga versions of Defender of the Crown and Wings, both Cinemaware games, via its custom emulator. I have read its emulation does not hold a candle to WinUAE.
Amiga Forever is the site where you can legally purchase the Kickstart ROMs required for Amiga emulation, and the package comes with games and demos. Amiga.com sells 43 games for the Blackberry platform. However, I am not aware of anything substantial being made available for purchase for other computing platforms like the Apple II, Atari 8-bit, Commodore VIC-20, 64 or 128, the Atari ST or the Apple IIgs.
Saturday, March 29, 2014
Working with MT-32 & Yamaha FB-01 MIDI Files and Patches
1. Description of the MT-32's Capabilities
The MT-32 consists of eight instrument parts and one rhythm/percussion part. It calls them Parts 1-8 and R. Any part can be assigned to any of MIDI channels 1-16. The default is that parts 1-8 are assigned to MIDI channels 2-9. There is a setting to change this to MIDI channels 1-8. The rhythm/percussion part is always assigned to MIDI channel 10 by default.
These parts share 32-voices/notes of polyphony, but the dynamic allocation of polyphony is not efficient over 22-24 voices, especially on a first generation unit. The MT-32 does support an Overlow Assign mode where excess polyphony can be sent to a second MT-32 unit, but operation in practice is unreliable with first generation units.
A patch, which contains all the essential information for an instrument, is assigned to each part. Each patch can require up to 4 voices/notes to play, so there are restrictions on the sounds that can be played from the module. The use of multiple parts enables the MT-32 to be called Multi-Timbral, hence the name. This is done via a Program Change MIDI message, and the MT-32 contains built-in 128 instrument patches and 30 rhythm patches. A patch is made up of a timbre plus the patch parameter. Timbres are made up of up to four partials and common parameter setting for all partials. Each partial has many settings which can be individually controlled. Each partial takes one polyphony note/voice and can use either a waveform (square, rectangle or sawtooth) or a 16-bit PCM sample (128 available) as the basis of its sound.
A patch can call on four timbre banks, A, B, M & R. Timbre bank A corresponds to the first 64 built-in patches of the MT-32, bank B the second 64 built-in patches, bank R corresponds to the 30 percussion patches of the rhythm section (and the 33 sound effects of the LAPC-I/CM-32L), and bank M corresponds to an area where up to 64 user-created timbres are stored.
The MT-32 is a synthesizer because user created patches can be stored and recalled from memory. The SC-55, by contrast, is not a synthesizer. While each of the patches used by the 16 parts of the SC-55 can be adjusted similarly to an MT-32 timbre, there is much less flexibility and you can only modify the active patch. While the SC-55 is battery backed, this is intended to store the general settings of the module.
To dump or send custom patch/timbre data to the MT-32, System Exclusive MIDI messages are required. The sysex messages for patch/timbre data are unique to the MT-32 series and sequencers do not understand what they do. Moreover, most sequencer programs assume that Program Changes correspond to General MIDI instrument assingments, but the MT-32 has very different assignments.
2. Format of MT-32 Patches
The structure of an MT-32 patch, as contained in a sysex file, is as follows :
The various areas can be in any order, since each area is separate and independent in the MT-32's memory. The temporary areas may not be required to be transmitted.
The MT-32 sends and receives data in packets no larger than 256 bytes (really 128 bytes, see below). In order to send or receive bytes to the MT-32's various memory areas, System Exclusive messages are required. Each message adds 10 bytes to the data to be transmitted. By doing the math, up to 71 (MT-32) or 72 (CM-32L) System Exclusive messages may be sent at the start of a game to a LA synthesizer. The structure of a system exclusive message is as follows :
F0 - Begin System Exclusive Message
41 - Manufacturer ID (Roland)
10 - Device ID/Unit # (Default is Unit 17)
16 - Model ID (Roland LA Device)
11 - Command ID (Request Data 1/RQ1)
This is sent from the computer to the synthesier to tell it to send the data in a memory area to the computer. Command ID 12 is Data Set 1/DT1, and it is used when writing data to the synthesizer.
10 00 00 - The address of the area of memory to be addressed
00 00 17 - The number of bytes of data to be requested with RQ1. With DT1, this can be up to 256 bytes with a single sysex command.
59 - Checksum
F7 - End of System Exclusive Message
The sysex files from Quest Studios also include an MT-32 Display Message at the beginning and at the end of the sysex file, adding approximately 58 bytes to the file. The format of these commands is as follows :
F0 41 10 16 12 20 00 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ck F7
The Display of the MT-32 supports 20 characters, but the command data need not include all twenty character places. Text is encoded in 7-bit ASCII. You will have to calculate the checksum for the message. You can find a Windows program that will avoid that tedious business here :
http://www.bwalk.com.au/Convert/Convert.html
This program can be used to convert text file containing command strings into a syx or a mid file :
http://www.bwalk.com.au/MidiUtil/FileConvert.html
Note that addresses and data never use a value above 7F, this is because these bytes are actually 7-bit bytes, not 8-bit bytes, the high bit is never used. The above program can convert decimal and hexadecimal to the 7-bit values the MT-32 uses.
With a rev. 0 MT-32, there must be a 40 microsecond delay between the sending of system exclusive messages. Thus it will take a minimum of three seconds to send a full patch bank to the MT-32. The rev. 1 MT-32 and all other MT-32 compatible LA synthesizers do not have this limitation.
There is no reason why you cannot send more than one dump receive request at one time. You can combine all the above dump receive commands into one file and use the file to obtain all the data at once. The resulting file size for the MT-32 will be 18,541 bytes. For the CM-32L, it will be 18,635 bytes. After accounting for the text messages, this dump will be 16 bytes larger than the Quest Studio's dumps. This is because QS missed the temporary patch area for the rhythm part.
Yamaha FB-01 and IBM Music Feature Card
The Yamaha FB-01 FM Sound Generator supports seven patch/voice banks. Each bank can hold up to 48 patches. Banks 1 and 2 are RAM banks and this is where users can store their custom patches. Banks 3-7 are ROM banks and have 48 patches each. As its name suggests, these are the built-in patches. Unlike the MT-32, there is no distinction between instrument and percussion channels/patches. Thus the device supports 240 built-in patches and 96 user-created patches.
A Program Change command only works with numbers 0-47, essentially confining the non-FB-01 aware device to a small subset of its available patches. To change the patch/voice bank requires a System Exclusive command to change the configuration parameters. This is how another voice bank is selected. The FB-01 has 16 RAM and 4 ROM choices for its Configuration Memory, which assigns MIDI channels, polyphony reserve, channel volume and the like.
The FB-01 receives 8 MIDI channels (8 parts), and by default uses MIDI channel 1-8. It only supports 8 simultaneous note playback (8 note polyphony). Each instrument patch can take from 1-8 notes. The core of the device is the Yamaha YM2614 FM Operator Type-P, which is musicially and (almost) functionally identical to the YM2151 chip found in many, many arcade machines. This chip supports 4-operator FM synthesis.
Sierra's games store custom patches in both RAM banks, so both will need to be dumped. The FB-01 can only receive System Exclusive messages on the MIDI channel assigned to a specific module (thus up to 16 modules can be supported via the MIDI channels) The default is channel 0/1. The system exclusive commands to do this are as follows :
F0 43 75 00 20 00 00 F7 (Voice Bank 0)
F0 43 75 00 20 00 01 F7 (Voice Bank 1)
Each resulting file will be 6,363 bytes.
Additionally, you may also need to dump the configuration memory. The command to dump all configuration memory is :
F0 43 75 00 20 03 00 F7
The file will be 2,616 bytes.
Sierra's games also use System Exclusive messages to change instruments and voice banks and adjust certain events like Note On and Note Off with a finer degree of control than possible with a standard message. This sysex is not generally large, but must be included to obtain an accurate rendition of the song.
This method works with either the IBM Music Feature Card or the FB-01. The makers of the FB-01 helpfully also decided to allow you to also send data from the module using the front panel buttons, but using the sysex above allows for saving the resulting data in one step.
The IBM Music Feature Card defaults to the memory protection function to off. It does not have a battery. The FB-01 defaults memory protection to on and has a spot-welded CR2032 battery. It needs to be set to off for custom patch data to be received by the FB-01. The IBM Music Feature Card's power on defaults allow all MIDI messages to pass from the MIDI IN (with the breakout box) to the music hardware on the card.
When the FB-01 or IBM card receives patch/configuration dumps, it will send back the following sysex : F0 43 60 0x F7. The 02 indicates an ACK, 03 indicates error, and 04 usually means you forgot to set the memory protection to off. The FB-01 will also show dump/received!! for a good dump, a dump/error for a bad dump and memory/protect if the memory protection is on. If you send all three sets of data, you will see the above sysex three times in the monitor.
If you want to send one sysex file to dump all three areas, put the configuration memory command first, then followed by the voice bank commands. I have found that the FB-01 will not acknowledge the configuration memory dump if it immediately follows a voice bank dump command. If it still doesn't work, send the dump commands as separate sysex files. A complete sysex file with all three areas will be 15,342 bytes, and should have the configuration memory sent first.
Capturing MT-32 or FB-01 Music
In order to obtain MT-32 or FB-01 song data, the following steps must be accomplished :
1. Capture the custom patches, if any
Not all games that support the MT-32 use custom patches. Games like King's Quest IV, Police Quest II, LOOM, The Secret of Monkey Island and Ultima VI do not use custom patches. However, they may still use a modest amount of sysex to modify existing patch and device parameters. Most games only load patches once, but some games like Ultima VII and Serpent Isle load three sets of patches, and each must be captured to capture all the music.
Fortunately, most games do not send an MT-32 reset once the player quits them. Additionally, MIDI cables are hot-swappable, so there are many ways to cut off a game and preserve its patches. So the first task is to start a game and let load its patches, then quit. The patches will be kept in the MT-32's memory.
The next step is to obtain those patches. If you are looking to dump a Sierra game's patches, the work has probably already been done and you can skip this step. Download the Sierra MT-32 Sound Library here : http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
The way I present here is a slightly tedious process, but typically you need only do it once per game. It requires a windows-compatible MIDI interface and the MIDI-OX program. The module will need to have its MIDI in and MIDI out cables connected to the interface. I found that an rev. 0 MT-32 did not send all the data to MIDI-OX, but a CM-32L did. The idea is to send sysex commands requesting that the module send the data in its memory. You will need one command for each section of memory, then you will need to save the resulting data to a file and perhaps convert it from text to a binary sysex file.
MIDI-OX is good because it has command called "Send/Receive Sysex", which will automatically save your data to a .syx file.
Note that an LAPC-I will not work to capture patches in this way. The LAPC-I is equilavent to an MPU-401 connected to a CM-32L by a MIDI OUT cable only. As there is no MIDI IN connection, the synthesizer has no way of sending data to the MPU-401 and thus the computer has no way to read it. The SCC-1 and all wavetable daughterboards have the same issue, but typically patch information is not requested from those devices.
When capturing a dump, do not use a crappy UART MPU-401 compatible interface like the ones found on a Sound Blaster 16. They failed to complete transfers of the MT-32's timbre banks.
2. Record the MIDI as played in a game
DOSBox is extremely useful for recording MIDI via its Capture Raw MIDI function. It saves all MIDI data to a MID file for easy editing in just about any sequencer.
You can also do this via a sequencer, which should be able to record MIDI data. This works best with two computers. In this case, connect the MIDI IN from your interface on computer one to the MIDI THRU of your MT-32. Computer two, preferably the older machine, will play the game and connect its interface to the MIDI IN of your MT-32.
3. Edit MIDI in Sequencer
In order to work with any MIDI file, you need a Sequencer. The best two sequencers back in the day were Voyetra Sequencer Plus Gold and Cakewalk Pro. Since we are talking to the MT-32, it is best to use vintage sequencers, and Quest Studios provides Voyetra's software for DOS and Cakewalk for Windows 3.1 Find them here :
http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
Both work in DOSBox, but because DOSBox does not implement the MIDI IN function, their functionality is somewhat crippled. Personally I prefer Cakewalk Pro.
MIDI files can be edited in a Sequencer similarly to how audio files are edited in an audio editing program. In this case, however, you will want to remove all the patch data that DOSBox captured. For the MT-32, DOSBox will fill all 256 banks (and they are not enough) with the patch data. Delete all of it with the Event List View. Do not delete any other sysex. For the FB-01, DOSBox will not completely capture the voice bank data, but you must only delete the sysex banks with the size 1024.
One thing you will want to do is to mute or delete any channels other than 2-10 for the MT-32. In Sierra's early SCI games, for example, channel 1 contains PC speaker data and channels 11-15 contains Adlib data. A CM-64 and CM-500 use channels 11-16 for their CM-32P and thus unintended sound will play on these channels if you are using those modules.
Cakewalk has the ability to play MIDI files, and you should avail yourself of this functionality. However, before you play a file, make sure to transmit the sysex patch bank with the Sysx view first. Find an empty bank and send it.
4. Embed patch to MIDI file (optional)
Cakewalk Pro uses .syx files to load patch banks in its bank manager. Load the .MID, go into the Sysex View page and load the sysex bank. Click on the Auto button and save your MID file. That is it! Additionally, it may be advisable to also embed an MT-32 reset sysex command so that you are sure you are not using any leftover data from any MIDI you played on the device prior. Finally, you may want to add a few extra measures of silence at the beginning of the song.
I do not believe that embedding is the best way to present these files. Many MIDI players have difficulty with large files or files with lots of sysex in it. Windows Media Player does not have any such issues, nor does DOSmid.
The MT-32 consists of eight instrument parts and one rhythm/percussion part. It calls them Parts 1-8 and R. Any part can be assigned to any of MIDI channels 1-16. The default is that parts 1-8 are assigned to MIDI channels 2-9. There is a setting to change this to MIDI channels 1-8. The rhythm/percussion part is always assigned to MIDI channel 10 by default.
These parts share 32-voices/notes of polyphony, but the dynamic allocation of polyphony is not efficient over 22-24 voices, especially on a first generation unit. The MT-32 does support an Overlow Assign mode where excess polyphony can be sent to a second MT-32 unit, but operation in practice is unreliable with first generation units.
A patch, which contains all the essential information for an instrument, is assigned to each part. Each patch can require up to 4 voices/notes to play, so there are restrictions on the sounds that can be played from the module. The use of multiple parts enables the MT-32 to be called Multi-Timbral, hence the name. This is done via a Program Change MIDI message, and the MT-32 contains built-in 128 instrument patches and 30 rhythm patches. A patch is made up of a timbre plus the patch parameter. Timbres are made up of up to four partials and common parameter setting for all partials. Each partial has many settings which can be individually controlled. Each partial takes one polyphony note/voice and can use either a waveform (square, rectangle or sawtooth) or a 16-bit PCM sample (128 available) as the basis of its sound.
A patch can call on four timbre banks, A, B, M & R. Timbre bank A corresponds to the first 64 built-in patches of the MT-32, bank B the second 64 built-in patches, bank R corresponds to the 30 percussion patches of the rhythm section (and the 33 sound effects of the LAPC-I/CM-32L), and bank M corresponds to an area where up to 64 user-created timbres are stored.
The MT-32 is a synthesizer because user created patches can be stored and recalled from memory. The SC-55, by contrast, is not a synthesizer. While each of the patches used by the 16 parts of the SC-55 can be adjusted similarly to an MT-32 timbre, there is much less flexibility and you can only modify the active patch. While the SC-55 is battery backed, this is intended to store the general settings of the module.
To dump or send custom patch/timbre data to the MT-32, System Exclusive MIDI messages are required. The sysex messages for patch/timbre data are unique to the MT-32 series and sequencers do not understand what they do. Moreover, most sequencer programs assume that Program Changes correspond to General MIDI instrument assingments, but the MT-32 has very different assignments.
2. Format of MT-32 Patches
The structure of an MT-32 patch, as contained in a sysex file, is as follows :
Length in Bytes (Decimal) | MT-32 Area | Sysex Receive String |
33 | System Area | F0 41 10 16 11 10 00 00 00 00 17 59 F7 |
154 | Patch Temporary Area | F0 41 10 16 11 03 00 00 00 01 10 6C F7 |
266 | Rhythm Setup Temporary Area | F0 41 10 16 11 03 01 10 00 02 00 6A F7 |
360 | Rhythm Setup Temporary Area (CM-32L) | F0 41 10 16 11 03 01 10 00 02 54 16 F7 |
1064 | Patch Memory | F0 41 10 16 11 05 00 00 00 08 00 73 F7 |
17024 | Timbre Memory | F0 41 10 16 11 08 00 00 02 00 00 76 F7 |
The various areas can be in any order, since each area is separate and independent in the MT-32's memory. The temporary areas may not be required to be transmitted.
The MT-32 sends and receives data in packets no larger than 256 bytes (really 128 bytes, see below). In order to send or receive bytes to the MT-32's various memory areas, System Exclusive messages are required. Each message adds 10 bytes to the data to be transmitted. By doing the math, up to 71 (MT-32) or 72 (CM-32L) System Exclusive messages may be sent at the start of a game to a LA synthesizer. The structure of a system exclusive message is as follows :
F0 - Begin System Exclusive Message
41 - Manufacturer ID (Roland)
10 - Device ID/Unit # (Default is Unit 17)
16 - Model ID (Roland LA Device)
11 - Command ID (Request Data 1/RQ1)
This is sent from the computer to the synthesier to tell it to send the data in a memory area to the computer. Command ID 12 is Data Set 1/DT1, and it is used when writing data to the synthesizer.
10 00 00 - The address of the area of memory to be addressed
00 00 17 - The number of bytes of data to be requested with RQ1. With DT1, this can be up to 256 bytes with a single sysex command.
59 - Checksum
F7 - End of System Exclusive Message
The sysex files from Quest Studios also include an MT-32 Display Message at the beginning and at the end of the sysex file, adding approximately 58 bytes to the file. The format of these commands is as follows :
F0 41 10 16 12 20 00 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ck F7
The Display of the MT-32 supports 20 characters, but the command data need not include all twenty character places. Text is encoded in 7-bit ASCII. You will have to calculate the checksum for the message. You can find a Windows program that will avoid that tedious business here :
http://www.bwalk.com.au/Convert/Convert.html
This program can be used to convert text file containing command strings into a syx or a mid file :
http://www.bwalk.com.au/MidiUtil/FileConvert.html
Note that addresses and data never use a value above 7F, this is because these bytes are actually 7-bit bytes, not 8-bit bytes, the high bit is never used. The above program can convert decimal and hexadecimal to the 7-bit values the MT-32 uses.
With a rev. 0 MT-32, there must be a 40 microsecond delay between the sending of system exclusive messages. Thus it will take a minimum of three seconds to send a full patch bank to the MT-32. The rev. 1 MT-32 and all other MT-32 compatible LA synthesizers do not have this limitation.
There is no reason why you cannot send more than one dump receive request at one time. You can combine all the above dump receive commands into one file and use the file to obtain all the data at once. The resulting file size for the MT-32 will be 18,541 bytes. For the CM-32L, it will be 18,635 bytes. After accounting for the text messages, this dump will be 16 bytes larger than the Quest Studio's dumps. This is because QS missed the temporary patch area for the rhythm part.
Yamaha FB-01 and IBM Music Feature Card
The Yamaha FB-01 FM Sound Generator supports seven patch/voice banks. Each bank can hold up to 48 patches. Banks 1 and 2 are RAM banks and this is where users can store their custom patches. Banks 3-7 are ROM banks and have 48 patches each. As its name suggests, these are the built-in patches. Unlike the MT-32, there is no distinction between instrument and percussion channels/patches. Thus the device supports 240 built-in patches and 96 user-created patches.
A Program Change command only works with numbers 0-47, essentially confining the non-FB-01 aware device to a small subset of its available patches. To change the patch/voice bank requires a System Exclusive command to change the configuration parameters. This is how another voice bank is selected. The FB-01 has 16 RAM and 4 ROM choices for its Configuration Memory, which assigns MIDI channels, polyphony reserve, channel volume and the like.
The FB-01 receives 8 MIDI channels (8 parts), and by default uses MIDI channel 1-8. It only supports 8 simultaneous note playback (8 note polyphony). Each instrument patch can take from 1-8 notes. The core of the device is the Yamaha YM2614 FM Operator Type-P, which is musicially and (almost) functionally identical to the YM2151 chip found in many, many arcade machines. This chip supports 4-operator FM synthesis.
Sierra's games store custom patches in both RAM banks, so both will need to be dumped. The FB-01 can only receive System Exclusive messages on the MIDI channel assigned to a specific module (thus up to 16 modules can be supported via the MIDI channels) The default is channel 0/1. The system exclusive commands to do this are as follows :
F0 43 75 00 20 00 00 F7 (Voice Bank 0)
F0 43 75 00 20 00 01 F7 (Voice Bank 1)
Each resulting file will be 6,363 bytes.
Additionally, you may also need to dump the configuration memory. The command to dump all configuration memory is :
F0 43 75 00 20 03 00 F7
The file will be 2,616 bytes.
Sierra's games also use System Exclusive messages to change instruments and voice banks and adjust certain events like Note On and Note Off with a finer degree of control than possible with a standard message. This sysex is not generally large, but must be included to obtain an accurate rendition of the song.
This method works with either the IBM Music Feature Card or the FB-01. The makers of the FB-01 helpfully also decided to allow you to also send data from the module using the front panel buttons, but using the sysex above allows for saving the resulting data in one step.
The IBM Music Feature Card defaults to the memory protection function to off. It does not have a battery. The FB-01 defaults memory protection to on and has a spot-welded CR2032 battery. It needs to be set to off for custom patch data to be received by the FB-01. The IBM Music Feature Card's power on defaults allow all MIDI messages to pass from the MIDI IN (with the breakout box) to the music hardware on the card.
When the FB-01 or IBM card receives patch/configuration dumps, it will send back the following sysex : F0 43 60 0x F7. The 02 indicates an ACK, 03 indicates error, and 04 usually means you forgot to set the memory protection to off. The FB-01 will also show dump/received!! for a good dump, a dump/error for a bad dump and memory/protect if the memory protection is on. If you send all three sets of data, you will see the above sysex three times in the monitor.
If you want to send one sysex file to dump all three areas, put the configuration memory command first, then followed by the voice bank commands. I have found that the FB-01 will not acknowledge the configuration memory dump if it immediately follows a voice bank dump command. If it still doesn't work, send the dump commands as separate sysex files. A complete sysex file with all three areas will be 15,342 bytes, and should have the configuration memory sent first.
Capturing MT-32 or FB-01 Music
In order to obtain MT-32 or FB-01 song data, the following steps must be accomplished :
1. Capture the custom patches, if any
Not all games that support the MT-32 use custom patches. Games like King's Quest IV, Police Quest II, LOOM, The Secret of Monkey Island and Ultima VI do not use custom patches. However, they may still use a modest amount of sysex to modify existing patch and device parameters. Most games only load patches once, but some games like Ultima VII and Serpent Isle load three sets of patches, and each must be captured to capture all the music.
Fortunately, most games do not send an MT-32 reset once the player quits them. Additionally, MIDI cables are hot-swappable, so there are many ways to cut off a game and preserve its patches. So the first task is to start a game and let load its patches, then quit. The patches will be kept in the MT-32's memory.
The next step is to obtain those patches. If you are looking to dump a Sierra game's patches, the work has probably already been done and you can skip this step. Download the Sierra MT-32 Sound Library here : http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
The way I present here is a slightly tedious process, but typically you need only do it once per game. It requires a windows-compatible MIDI interface and the MIDI-OX program. The module will need to have its MIDI in and MIDI out cables connected to the interface. I found that an rev. 0 MT-32 did not send all the data to MIDI-OX, but a CM-32L did. The idea is to send sysex commands requesting that the module send the data in its memory. You will need one command for each section of memory, then you will need to save the resulting data to a file and perhaps convert it from text to a binary sysex file.
MIDI-OX is good because it has command called "Send/Receive Sysex", which will automatically save your data to a .syx file.
Note that an LAPC-I will not work to capture patches in this way. The LAPC-I is equilavent to an MPU-401 connected to a CM-32L by a MIDI OUT cable only. As there is no MIDI IN connection, the synthesizer has no way of sending data to the MPU-401 and thus the computer has no way to read it. The SCC-1 and all wavetable daughterboards have the same issue, but typically patch information is not requested from those devices.
When capturing a dump, do not use a crappy UART MPU-401 compatible interface like the ones found on a Sound Blaster 16. They failed to complete transfers of the MT-32's timbre banks.
2. Record the MIDI as played in a game
DOSBox is extremely useful for recording MIDI via its Capture Raw MIDI function. It saves all MIDI data to a MID file for easy editing in just about any sequencer.
You can also do this via a sequencer, which should be able to record MIDI data. This works best with two computers. In this case, connect the MIDI IN from your interface on computer one to the MIDI THRU of your MT-32. Computer two, preferably the older machine, will play the game and connect its interface to the MIDI IN of your MT-32.
3. Edit MIDI in Sequencer
In order to work with any MIDI file, you need a Sequencer. The best two sequencers back in the day were Voyetra Sequencer Plus Gold and Cakewalk Pro. Since we are talking to the MT-32, it is best to use vintage sequencers, and Quest Studios provides Voyetra's software for DOS and Cakewalk for Windows 3.1 Find them here :
http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
Both work in DOSBox, but because DOSBox does not implement the MIDI IN function, their functionality is somewhat crippled. Personally I prefer Cakewalk Pro.
MIDI files can be edited in a Sequencer similarly to how audio files are edited in an audio editing program. In this case, however, you will want to remove all the patch data that DOSBox captured. For the MT-32, DOSBox will fill all 256 banks (and they are not enough) with the patch data. Delete all of it with the Event List View. Do not delete any other sysex. For the FB-01, DOSBox will not completely capture the voice bank data, but you must only delete the sysex banks with the size 1024.
One thing you will want to do is to mute or delete any channels other than 2-10 for the MT-32. In Sierra's early SCI games, for example, channel 1 contains PC speaker data and channels 11-15 contains Adlib data. A CM-64 and CM-500 use channels 11-16 for their CM-32P and thus unintended sound will play on these channels if you are using those modules.
Cakewalk has the ability to play MIDI files, and you should avail yourself of this functionality. However, before you play a file, make sure to transmit the sysex patch bank with the Sysx view first. Find an empty bank and send it.
4. Embed patch to MIDI file (optional)
Cakewalk Pro uses .syx files to load patch banks in its bank manager. Load the .MID, go into the Sysex View page and load the sysex bank. Click on the Auto button and save your MID file. That is it! Additionally, it may be advisable to also embed an MT-32 reset sysex command so that you are sure you are not using any leftover data from any MIDI you played on the device prior. Finally, you may want to add a few extra measures of silence at the beginning of the song.
I do not believe that embedding is the best way to present these files. Many MIDI players have difficulty with large files or files with lots of sysex in it. Windows Media Player does not have any such issues, nor does DOSmid.
Monday, March 24, 2014
Raw Adlib Capturing with DOSBox & Playback with DOS
One of DOSBox's best features is its ability to capture raw OPL commands and data with timing data to preserve as perfectly as possible the music data for Adlib and Sound Blaster cards. The capture feature supports OPL2, dual OPL2 and OPL3. One of the biggest advantages to this format is that the resulting files are quite small, maybe 6-7K for a single track or song. Another advantage is that you are not capturing a wav file of an emulated OPL2/3, you can take this .dro file and play it back on real hardware.
The resulting files have a .dro extension, which stands for DOSBox Raw OPL format. Fortunately, the capturing does not begin until the first OPL reads and writes are detected, so there will not be a lot of silent dead time. However, beginning with 0.73, released on May 27, 2009, DOSBox updated its DRO capture format to version 2, which is incompatible with any software written for version 0.1 (formerly known as 1.0). For the differences between the two formats, they can be found here :
http://www.shikadi.net/moddingwiki/DRO_Format
If you use DOSBox 0.72 or below (feature has been present since 0.63), then DRO version 1 files will be created. 0.73 or higher will only create DRO version 2 files. Since most people intend to use DOSBox 0.74 or SVN, I have put together this guide to software. I recommend using a current SVN build with the following patch applied (use the patch as given in the latest post) :
http://www.vogons.org/viewtopic.php?f=41&t=38029
As you might guess, capturing OPL music from a game may not always give a clean track. The track may loop and you will need to delete the repeated portion, or a second track may immediately segue from a first track, and you want the tracks separate. Sound effects may be playing. The program DRO Trimmer v4r4 will work with version 1 or 2 .dro files, and is quite easy to use. It also functions as a player for either type of DRO version file. Get it here :
http://www.jestarjokin.net/apps/drotrimmer
As its name implies, DRO Trimmer is a bare-bones trimmer. If you want to use fade-ins and fade-outs or other more sophisticated editing techniques, you will need to use a tracker. I do not know of any that work with the .DRO format. Nor do I know of any utilities that would convert DRO into a tracker-friendly format like S3M.
The mainstay of playing Adlib files in DOS on real hardware is a program called AdPlay, based on the AdPlug library. It can play just about every OPL file format out there, including proprietary formats from Sierra, LucasArts, Origin, Apogee and Westwood. It also supports various tracker formats and Roland ROL and Creative Labs' CMF formats. However, the DOS port of AdPlay was last updated in 2007 and thus only supports DRO version 1 files. However, do not write it off just yet. Downloads are on this site :
http://adplug.sourceforge.net/index.php
More than just trimming DRO files, the DRO Trimmer program can also convert DRO version 2 files into DRO version 1 files. Additionally, there is a program called DRO2IMF, which will convert DRO version 1 and 2 files into the IMF format that Apogee games use. It is located here :
http://www.shikadi.net/utils/dro2imf
You will also need a DPMI extender to run AdPlay, and the one this program expects is called csdpmi. For this reason, a 386 or better is required for playback. A version that works with AdPlay can be found here :
ftp://ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi5b.zip
AdPlay will play IMF files and DRO version 1 without a problem, so either should work as a solution. However, I found that the converted IMF file plays correctly with AdPlay while the converted DRO file did not. I assume a natural DRO version 1 file, as recorded from DOSBox 0.72 or below, would work correctly with AdPlay. However, because DRO version 1 files are less accurate and would not have the benefit of the patch identified above, I would not advise using the older DOSBox for accurate OPL capture.
Another solution is a program called imfplay, which has the benefit of working with .DRO version 2 files without conversion. This program I have personally tested in my 486DX2/66. However, there are several caveats with using it on real hardware. First, it only supports OPL2 writes, OPL3 writes in a DRO file are ignored. The irony of this limitation will soon be apparent. Second, the cache of the 486, internal and external, must be disabled or the music will come out garbled. Whether it works on faster machines is unknown to me. Third, a sound card with an OPL3 chip must be used. OPL3 chips require fewer delays with port writes than OPL2 chips, and imfplay was intended to work with DOSBox, which does not care about delays to its emulated OPL chips. AdPlay does not have the OPL2 limitation or the slowdown requirement. You can find imfplay here :
http://software.kvee.cz/imfplay/
One thing I initially overlooked when I first wrote this post was that Harekiet, one of the authors of DOSBox, had written a small utility called DROPLAY that would allow DOSBox to play the v.2 DRO files made with DOSBox 0.73 and later versions. You can get it in the last post from here :
http://www.vogons.org/viewtopic.php?f=32&t=16217
DROPLAY does work on real hardware, so you can use it with a 486 or even something lesser to play back DRO v.2 tunes. I would prefer to use DRO files over a converted IMF file because the IMF file may require timing information that seems specific to Apogee games but may not be applicable generally to OPL game music.
The resulting files have a .dro extension, which stands for DOSBox Raw OPL format. Fortunately, the capturing does not begin until the first OPL reads and writes are detected, so there will not be a lot of silent dead time. However, beginning with 0.73, released on May 27, 2009, DOSBox updated its DRO capture format to version 2, which is incompatible with any software written for version 0.1 (formerly known as 1.0). For the differences between the two formats, they can be found here :
http://www.shikadi.net/moddingwiki/DRO_Format
If you use DOSBox 0.72 or below (feature has been present since 0.63), then DRO version 1 files will be created. 0.73 or higher will only create DRO version 2 files. Since most people intend to use DOSBox 0.74 or SVN, I have put together this guide to software. I recommend using a current SVN build with the following patch applied (use the patch as given in the latest post) :
http://www.vogons.org/viewtopic.php?f=41&t=38029
As you might guess, capturing OPL music from a game may not always give a clean track. The track may loop and you will need to delete the repeated portion, or a second track may immediately segue from a first track, and you want the tracks separate. Sound effects may be playing. The program DRO Trimmer v4r4 will work with version 1 or 2 .dro files, and is quite easy to use. It also functions as a player for either type of DRO version file. Get it here :
http://www.jestarjokin.net/apps/drotrimmer
As its name implies, DRO Trimmer is a bare-bones trimmer. If you want to use fade-ins and fade-outs or other more sophisticated editing techniques, you will need to use a tracker. I do not know of any that work with the .DRO format. Nor do I know of any utilities that would convert DRO into a tracker-friendly format like S3M.
The mainstay of playing Adlib files in DOS on real hardware is a program called AdPlay, based on the AdPlug library. It can play just about every OPL file format out there, including proprietary formats from Sierra, LucasArts, Origin, Apogee and Westwood. It also supports various tracker formats and Roland ROL and Creative Labs' CMF formats. However, the DOS port of AdPlay was last updated in 2007 and thus only supports DRO version 1 files. However, do not write it off just yet. Downloads are on this site :
http://adplug.sourceforge.net/index.php
More than just trimming DRO files, the DRO Trimmer program can also convert DRO version 2 files into DRO version 1 files. Additionally, there is a program called DRO2IMF, which will convert DRO version 1 and 2 files into the IMF format that Apogee games use. It is located here :
http://www.shikadi.net/utils/dro2imf
You will also need a DPMI extender to run AdPlay, and the one this program expects is called csdpmi. For this reason, a 386 or better is required for playback. A version that works with AdPlay can be found here :
ftp://ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi5b.zip
AdPlay will play IMF files and DRO version 1 without a problem, so either should work as a solution. However, I found that the converted IMF file plays correctly with AdPlay while the converted DRO file did not. I assume a natural DRO version 1 file, as recorded from DOSBox 0.72 or below, would work correctly with AdPlay. However, because DRO version 1 files are less accurate and would not have the benefit of the patch identified above, I would not advise using the older DOSBox for accurate OPL capture.
Another solution is a program called imfplay, which has the benefit of working with .DRO version 2 files without conversion. This program I have personally tested in my 486DX2/66. However, there are several caveats with using it on real hardware. First, it only supports OPL2 writes, OPL3 writes in a DRO file are ignored. The irony of this limitation will soon be apparent. Second, the cache of the 486, internal and external, must be disabled or the music will come out garbled. Whether it works on faster machines is unknown to me. Third, a sound card with an OPL3 chip must be used. OPL3 chips require fewer delays with port writes than OPL2 chips, and imfplay was intended to work with DOSBox, which does not care about delays to its emulated OPL chips. AdPlay does not have the OPL2 limitation or the slowdown requirement. You can find imfplay here :
http://software.kvee.cz/imfplay/
One thing I initially overlooked when I first wrote this post was that Harekiet, one of the authors of DOSBox, had written a small utility called DROPLAY that would allow DOSBox to play the v.2 DRO files made with DOSBox 0.73 and later versions. You can get it in the last post from here :
http://www.vogons.org/viewtopic.php?f=32&t=16217
DROPLAY does work on real hardware, so you can use it with a 486 or even something lesser to play back DRO v.2 tunes. I would prefer to use DRO files over a converted IMF file because the IMF file may require timing information that seems specific to Apogee games but may not be applicable generally to OPL game music.
Friday, March 7, 2014
Tutorial : Compiling DOSBox SVN with Screenshot, Video Capture and IPX/Modem Support in Windows
DOSBox is a wonderful program, but in case you haven't noticed, the last official release, 0.74, is rapidly approaching its fourth birthday (05/12/2010). This is by far the longest time span between releases of the program. But DOSBox has not been sitting idly by, the developers have continued to fix bugs and add new features. While it is easy enough to find a pre-compiled version of the latest SVN, it may not be able to support screenshots without crashing (EmuCR), has more options in the config file than an average DOSBox user may need (DOSBox-X, Yhkwong's build) or simply won't have the features of that particular patch you are looking for. Until the development team releases 0.75, this is the closest you can get.
This tutorial is intended to guide a beginner through the compiling process in order to obtain a fully featured build of DOSBox SVN with important optional features such as IPX and Modem support and Screenshot and Video Recording in Windows. I have omitted adding the debugger features, if you need them, then this tutorial is probably too basic for you. To include the debug features, you need the curses library, and the best library for implementing the debugger in Windows is the pdcurses 3.4 library.
1. The Compiler
This tutorial assumes you are running DOSBox on some modern version of Windows and using an x86 CPU. (No Windows RT.) Since we will be using a Microsoft product to compile the source code, it will not work on any other system. It is easy enough to compile a DOSBox with the basic features. There is a good tutorial on how to do it in Visual Studio 2008 Express Edition. You can find it here and you may wish to consult with it if anything in this tutorial is unclear : http://www.dosbox.com/wiki/Building_DOSBox_with_Visual_C_2008_Express
I am indebted to the author, for this is the way I learned how to compile DOSBox, being a Microsoft loyalist since I first used a PC compatible in the early 90s. You can also use MinGW and MSYS, but that is a Unix/Linux approach utterly foreign to me (and I could never figure it out anyways).
VS2008 is getting a bit old in the tooth, and some of the more modern project files do not really support VS2008. So in this tutorial, I will be using Visual Studio 2010 Express, also freely downloadable from Microsoft. Virtual Studio includes Visual C++. Find it here :
http://www.visualstudio.com/en-us/downloads#d-2010-express
The installer will download the program and the modules it needs and will install them. It will also set file associations for the files we will be using.
2. The Source Code
Now, you need the source code. First start with the current DOSBox SVN, found here :
http://source.dosbox.com/dosboxsvn.tgz
You should use a program like 7zip to uncompress this file. It is doubly compressed. Please see my DOSBox patching guide if you want to add any patches, as you can at this stage :
http://nerdlypleasures.blogspot.com/2014/02/patching-dosbox-for-beginners.html
Next, you will need the Simple Directmedia Layer (SDL) to build libraries that DOSBox needs to function. DOSBox is only compatible with the 1.2 versions and the last version of SDL is 1.2.15. However, you should obtain the source code for 1.2.14, which is the last SDL 1.2 version that will compile easily in VS2010. You can download it here :
http://www.libsdl.org/release/SDL-1.2.14.zip
3. Optional Libraries
If you want to add the optional features to your compiled DOSBox, you will need some more source code to build libraries.
1. For Modem/IPX support, you need SDL_net. SDL_net's mirrors SDL's versions, and the most current version that will compile easily in VS2010 is 1.2.7. Get it here :
http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.zip
Now what you have obtained above is the easy part. For working screenshots and video recording, you will need to compile libpng and zlib libraries from source. After that, then you compile DOSBox.
For libpng, the current stable source is 1.6.9. You can obtain it here :
http://prdownloads.sourceforge.net/libpng/lpng169.zip?download
You use libpng to compile both libpng.lib and zlib.lib, but for the latter, you need the zlib source code, and specifically 1.2.5 (even though 1.2.8 is the most recent version, but libpng expects 1.2.5). You can obtain 1.2.5 here :
http://www.winimage.com/zLibDll/zlib125.zip
4. Directory Setup
Once you have installed VS2010 and downloaded your source code and libraries, you need to put the source somewhere. Make a folder like \Project and unzip your source code and libraries so they look like this :
\Project\dosboxsvn
\Project\lpng169
\Project\SDL_net-1.2.7
\Project\SDL-devel-1.2.14
\Project\zlib-1.2.5
This will be important for the next step and make it easier to point the compiler to the various include and library files later on.
5. Compiling libpng.lib and zlib.lib
Go to \Project\lpng69\projects\vstudio\libpng and double click on libpng.vcxproj A vcxproj file is a Project File that tells a compiler how to build code. This will start the compiler. You should see Solution Explorer on the left hand side of the program. There are seven projects here, but we only need two of them. Right click on Solution 'vstudio' (7 projects), click on Properties and check the button that says Multiple startup projects: Set libpng and zlib to Start and the rest to None. Press Apply and OK.
Libpng relies on zlib, so we want to make sure zlib is compiled first. Right click on libpng in the Solution Explorer and go to Project Dependencies. In the drop down box, select libpng and make sure there is a checkmark next to zlib in the box below and none on any other box. Then click on the Build Order tab and you should see that zlib comes first and libpng comes second.
Next right click on Solution 'vstudio' (7 projects) and click on Configuration Manager. Under Active solution configuration: click Release Library. In the box below, next to libpng and zlib, change the Configuration to Release Library. For the other options, uncheck the boxes next to the Build so they will not be compiled. Do not worry if they compile anyway, these extra projects are mainly for testing.
Next, in the Solution Explorer right click on libpng and go to properties. On the left hand side, you should see a line called Configuration Properties. On the right side of the window, you will see a line that says Configuration Type. Click on the dropdown box next to it and set it to Static library (.lib) if it is not already.
Then click on VC++ Directories. The window here is a bit small for what you need to do, but be very careful here. Clicking on the wrong thing will wipe out the default directory entries, and if you do that the compiler will not know where to find the code it needs to compile.
Next to the line that says Include Directories, click once on the box after the partition. This will show a down arrow button. Click on that once and then click on On the next window, click on the icon of a file with an asterisk in the corner, then click on the box with the ... On the Select Directory Window, navigate to the directory with the zlib Include files. The directory is typically : \Project\zlib-1.2.5. When done, click OK.
To compile the libraries, hit F7. In the output window, you will see the compiler crunch code and turn it into libpng.lib and zlib.lib. If you succeed, the compiler will indicate where the .lib files are located. If you fail, then the compiler will report an error and your files will not be built. In this example, you can find the .lib files in \Project\lpng169\projects\vstudio\Release Library\ as zlib.lib and libpng16.lib.
6. Compiling SDL and SDL_net
In this guide, I have completely avoided using developer libraries. While there are appropriate Visual C ++ developer libraries that work with VS2010 available for SDL and SDL_net, I think its best to compile your own libraries. Since you have to do this for libpng and zlib, you already should begin to get a feel for how to incorporate include and library directories. Compiling your own libraries can improve DOSBox performance and compatibility with your particular system.
To compile SDL, you will need the DirectX SDK. The DirectX 10 SDK from June 2010 seems compatible, and you can get it here :
http://www.microsoft.com/en-us/download/details.aspx?id=6812
You only need to install the libraries. The installer may give an error if the rest of the components aren't installed, but the libraries will be installed. You will be able to find them typically in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
Now, in the SDL-1.2.14 directory, there will be a zip file named VisualC.zip. Unzip it so that you can see files in the next level subdirectory. Go into that subdirectory and open the file SDL.sln. This is a solution file used by older versions of Visual C++ to build a project. VS2010 will run a conversion tool that will convert it into something it can manage properly. Click on Next and then Finish. You may see some warnings but you shouldn't see any errors.
In the resulting Solution Explorer, you will see two projects, SDL and SDLmain, and you will need to compile both of them. First, right click on Solution 'SDL' (2 projects) and go to properties. Then click on the button that says Configuration Manager. From the Active solution configuration: dropdown menu, click on release, and for the Configuration menu drop downs next to SDL and SDLmain, set them both to release. Close the Configuration Manager. At this point, the Configuration dropmenu should show Active(Release). Click on Apply and then OK.
Next, in the Solution Explorer right click on SDL and go to properties. On the left hand side, you should see a line called Configuration Properties. On the right side of the window, you will see a line that says Configuration Type. Click on the dropdown box next to it and set it to Static library (.lib) if it is not already. DOSBox needs the libraries to compile, and SDL should still create an SDL.dll when you compile it.
Then click on VC++ Directories. This is where you add the DirectX SDK libraries you installed at the beginning of this step Next to the line that says Include Directories, click once on the box after the partition. This will show a down arrow button. Click on that once and then click on On the next window, click on the icon of a file with an asterisk in the corner, then click on the box with the ... On the Select Directory Window, navigate to the directory with the DirectX SDK Include files. The directory is typically : \Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include When done, click OK.
On the line that says Library Directories, you are going to do almost the same thing. This time, you want to add the directory for the DirectX SDK Library files. The directory is typically : \Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86. Make sure you select the x86 (for 32-bit) and not the x64 (64-bit, DOSBox doesn't like 64-bit code). Once you are done, you can press OK to get back to the Solution Explorer. Now press F7 and you should be have created sdl.lib and sdlmain.lib in their respective Release directories, \Project\SDL-1.2.14\VisualC\SDL\Release and \Project\SDL-1.2.14\VisualC\SDLmain\Release
SDL_net requires the SDL libraries, which is why we compiled the SDL libraries first. Like with SDL, you will need to unzip the VisualC.zip file and convert the solution file SDL_net.sln. Set SDL_net to Release in the Configuration Properties.
Open the SDL_net properties page, set the Configuration Type to Static library (.lib) and then click on VC++ Directories. For the Include Directories, you need to add the directory containing the SDL Include files. They can be typically found here : \Project\SDL-1.2.14 Next you need to add the directories containing the SDL Library files. These are \Project\SDL-1.2.14\VisualC\SDL\Release and \Project\SDL-1.2.14\VisualC\SDLmain\Release. You need to add both. After you have done all this, you can exit the properties window and press F7 to compile. You should end up with sdl_net.lib.
7. Setting Up the DOSBox Compiling Environment
Now that you have all your libraries, you can compile as full a DOSBox as you like. Navigate to \Project\dosboxsvn\dosbox\visualc_net and click on dosbox.vcxproj
In the Solution Explorer Window, right click on dosbox. Set the active configuration to Release using the Configuration drop box and the Configuration Manager button first.
In the VC++ Directories, you will need to add the following directories to the Include Directories :
\Project\lpng169
\Project\SDL_net-1.2.7
\Project\SDL-1.2.14\include
\Project\zlib-1.2.5
\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
If you are compiling code specific to Windows, you may also need to include a directory like :
\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys
You will need to add the following directories to the Library Directories :
\Project\lpng169\projects\vstudio\Release Library\
\Project\SDL_net-1.2.7\VisualC\Release
\Project\SDL-1.2.14\VisualC\SDL\Release
\Project\SDL-1.2.14\VisualC\SDLmain\Release
\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86
On the left side of the Property Page, click on C/C++ and then on General. On the line that says Treat Warnings As Errors, click on the box next to it and set it to No (/WX-) The compiling process will give many warnings, and if this is not set these warnings will cause the build to fail.
Next click on Linker and next to the Force File Output, click on the box next to it and select Multiply Defined Symbol Only (/FORCE:MULTIPLE). Next to the Treat Linker Warning As Errors, click on the box next to it and select No (/WX:NO). These "errors" and warnings are not going to affect a compiled DOSBox, but they certainly will stop DOSBox from compiling correctly.
Finally, underneath Linker, click Input. The following line needs to be present :
dinput8.lib;dxguid.lib;libpng16.lib;sdl_net.lib;opengl32.lib;winmm.lib;sdlmain.lib;sdl.lib;ws2_32.lib;zlib.lib;%(AdditionalDependencies)
Many of these items are already present. You will need to add dinput8.lib and dxguid.lib and rename libpng.lib to libpng16.lib. Since the space is very small, you should check the spelling and formatting very carefully. Each library, including the last, needs a semicolon ; after it.
8. Adjusting the DOSBox Code and compiling
In the Solution Explorer, clock on Source Files and then click on visualc and then double click on config.h. The code listing will appear to the right. If you are not compiling with IPX and Modem support, then change the values from 1 to 0 in the lines :
#define C_MODEM 1
#define C_IPX 1
If you are not compiling with screenshot and video recording support, change the value from 1 to 0 in the
line :
#define C_SSHOT 1
Next, for a speed boost, change the value from 0 to 1 in the line :
#define C_CORE_INLINE 0
Finally, you should see in the Solution Explorer a file called winres.rc. Right click on that and select View Code Change the line that says #include "afxres.h" to #include "Windows.h"
In the Solution Explorer, right click on dosbox, go to properties an then the Configuration Manager. Makes sure the Active solution configuration and the dosbox project configuration are both set to Release, NOT Debug. Release builds are faster than debug builds. Debug DOSBox builds exhibit an annoying issue with the Adlib music where it will stutter unless the cycle count is set very low in DOSBox. After you close the Configuration Manager window, you should see in the Configuration drop down menu Active(Release). Exit the dosbox Property pages.
Now you are ready to compile. Hit F7 and be prepared to wait. If you are successful, you will have a dosbox.exe in \Project\dosboxsvn\dosbox\visualc_net\Release. You probably will not need any .dll files since the libraries should be statically linked within the DOSBox executable, but if you do, you can obtain them from the official 0.74 DOSBox.
DOSBox will generate a .conf file on its first run if one is not present. Look in the status window to find it and move it to the directory in which you will use DOSBox. It is typically buried in AppData on Windows Vista/7/8. It will save screenshots and other captures to a folder named capture, but by default will save them to the same place as it wrote the .conf file.
If you are using Windows 8.1, you will find that the mouse movement will be extremely jerky when using this build. This is due to some changes Microsoft made in handling mouse input. To fix the problem, apply the appropriate patch for your OS (32-bit or 64-bit) from here : http://support.microsoft.com/kb/2908279
This tutorial is intended to guide a beginner through the compiling process in order to obtain a fully featured build of DOSBox SVN with important optional features such as IPX and Modem support and Screenshot and Video Recording in Windows. I have omitted adding the debugger features, if you need them, then this tutorial is probably too basic for you. To include the debug features, you need the curses library, and the best library for implementing the debugger in Windows is the pdcurses 3.4 library.
1. The Compiler
This tutorial assumes you are running DOSBox on some modern version of Windows and using an x86 CPU. (No Windows RT.) Since we will be using a Microsoft product to compile the source code, it will not work on any other system. It is easy enough to compile a DOSBox with the basic features. There is a good tutorial on how to do it in Visual Studio 2008 Express Edition. You can find it here and you may wish to consult with it if anything in this tutorial is unclear : http://www.dosbox.com/wiki/Building_DOSBox_with_Visual_C_2008_Express
I am indebted to the author, for this is the way I learned how to compile DOSBox, being a Microsoft loyalist since I first used a PC compatible in the early 90s. You can also use MinGW and MSYS, but that is a Unix/Linux approach utterly foreign to me (and I could never figure it out anyways).
VS2008 is getting a bit old in the tooth, and some of the more modern project files do not really support VS2008. So in this tutorial, I will be using Visual Studio 2010 Express, also freely downloadable from Microsoft. Virtual Studio includes Visual C++. Find it here :
http://www.visualstudio.com/en-us/downloads#d-2010-express
The installer will download the program and the modules it needs and will install them. It will also set file associations for the files we will be using.
2. The Source Code
Now, you need the source code. First start with the current DOSBox SVN, found here :
http://source.dosbox.com/dosboxsvn.tgz
You should use a program like 7zip to uncompress this file. It is doubly compressed. Please see my DOSBox patching guide if you want to add any patches, as you can at this stage :
http://nerdlypleasures.blogspot.com/2014/02/patching-dosbox-for-beginners.html
Next, you will need the Simple Directmedia Layer (SDL) to build libraries that DOSBox needs to function. DOSBox is only compatible with the 1.2 versions and the last version of SDL is 1.2.15. However, you should obtain the source code for 1.2.14, which is the last SDL 1.2 version that will compile easily in VS2010. You can download it here :
http://www.libsdl.org/release/SDL-1.2.14.zip
3. Optional Libraries
If you want to add the optional features to your compiled DOSBox, you will need some more source code to build libraries.
1. For Modem/IPX support, you need SDL_net. SDL_net's mirrors SDL's versions, and the most current version that will compile easily in VS2010 is 1.2.7. Get it here :
http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.zip
Now what you have obtained above is the easy part. For working screenshots and video recording, you will need to compile libpng and zlib libraries from source. After that, then you compile DOSBox.
For libpng, the current stable source is 1.6.9. You can obtain it here :
http://prdownloads.sourceforge.net/libpng/lpng169.zip?download
You use libpng to compile both libpng.lib and zlib.lib, but for the latter, you need the zlib source code, and specifically 1.2.5 (even though 1.2.8 is the most recent version, but libpng expects 1.2.5). You can obtain 1.2.5 here :
http://www.winimage.com/zLibDll/zlib125.zip
4. Directory Setup
Once you have installed VS2010 and downloaded your source code and libraries, you need to put the source somewhere. Make a folder like \Project and unzip your source code and libraries so they look like this :
\Project\dosboxsvn
\Project\lpng169
\Project\SDL_net-1.2.7
\Project\SDL-devel-1.2.14
\Project\zlib-1.2.5
This will be important for the next step and make it easier to point the compiler to the various include and library files later on.
5. Compiling libpng.lib and zlib.lib
Go to \Project\lpng69\projects\vstudio\libpng and double click on libpng.vcxproj A vcxproj file is a Project File that tells a compiler how to build code. This will start the compiler. You should see Solution Explorer on the left hand side of the program. There are seven projects here, but we only need two of them. Right click on Solution 'vstudio' (7 projects), click on Properties and check the button that says Multiple startup projects: Set libpng and zlib to Start and the rest to None. Press Apply and OK.
Libpng relies on zlib, so we want to make sure zlib is compiled first. Right click on libpng in the Solution Explorer and go to Project Dependencies. In the drop down box, select libpng and make sure there is a checkmark next to zlib in the box below and none on any other box. Then click on the Build Order tab and you should see that zlib comes first and libpng comes second.
Next right click on Solution 'vstudio' (7 projects) and click on Configuration Manager. Under Active solution configuration: click Release Library. In the box below, next to libpng and zlib, change the Configuration to Release Library. For the other options, uncheck the boxes next to the Build so they will not be compiled. Do not worry if they compile anyway, these extra projects are mainly for testing.
Next, in the Solution Explorer right click on libpng and go to properties. On the left hand side, you should see a line called Configuration Properties. On the right side of the window, you will see a line that says Configuration Type. Click on the dropdown box next to it and set it to Static library (.lib) if it is not already.
Then click on VC++ Directories. The window here is a bit small for what you need to do, but be very careful here. Clicking on the wrong thing will wipe out the default directory entries, and if you do that the compiler will not know where to find the code it needs to compile.
Next to the line that says Include Directories, click once on the box after the partition. This will show a down arrow button. Click on that once and then click on
To compile the libraries, hit F7. In the output window, you will see the compiler crunch code and turn it into libpng.lib and zlib.lib. If you succeed, the compiler will indicate where the .lib files are located. If you fail, then the compiler will report an error and your files will not be built. In this example, you can find the .lib files in \Project\lpng169\projects\vstudio\Release Library\ as zlib.lib and libpng16.lib.
6. Compiling SDL and SDL_net
In this guide, I have completely avoided using developer libraries. While there are appropriate Visual C ++ developer libraries that work with VS2010 available for SDL and SDL_net, I think its best to compile your own libraries. Since you have to do this for libpng and zlib, you already should begin to get a feel for how to incorporate include and library directories. Compiling your own libraries can improve DOSBox performance and compatibility with your particular system.
To compile SDL, you will need the DirectX SDK. The DirectX 10 SDK from June 2010 seems compatible, and you can get it here :
http://www.microsoft.com/en-us/download/details.aspx?id=6812
You only need to install the libraries. The installer may give an error if the rest of the components aren't installed, but the libraries will be installed. You will be able to find them typically in C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
Now, in the SDL-1.2.14 directory, there will be a zip file named VisualC.zip. Unzip it so that you can see files in the next level subdirectory. Go into that subdirectory and open the file SDL.sln. This is a solution file used by older versions of Visual C++ to build a project. VS2010 will run a conversion tool that will convert it into something it can manage properly. Click on Next and then Finish. You may see some warnings but you shouldn't see any errors.
In the resulting Solution Explorer, you will see two projects, SDL and SDLmain, and you will need to compile both of them. First, right click on Solution 'SDL' (2 projects) and go to properties. Then click on the button that says Configuration Manager. From the Active solution configuration: dropdown menu, click on release, and for the Configuration menu drop downs next to SDL and SDLmain, set them both to release. Close the Configuration Manager. At this point, the Configuration dropmenu should show Active(Release). Click on Apply and then OK.
Next, in the Solution Explorer right click on SDL and go to properties. On the left hand side, you should see a line called Configuration Properties. On the right side of the window, you will see a line that says Configuration Type. Click on the dropdown box next to it and set it to Static library (.lib) if it is not already. DOSBox needs the libraries to compile, and SDL should still create an SDL.dll when you compile it.
Then click on VC++ Directories. This is where you add the DirectX SDK libraries you installed at the beginning of this step Next to the line that says Include Directories, click once on the box after the partition. This will show a down arrow button. Click on that once and then click on
On the line that says Library Directories, you are going to do almost the same thing. This time, you want to add the directory for the DirectX SDK Library files. The directory is typically : \Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86. Make sure you select the x86 (for 32-bit) and not the x64 (64-bit, DOSBox doesn't like 64-bit code). Once you are done, you can press OK to get back to the Solution Explorer. Now press F7 and you should be have created sdl.lib and sdlmain.lib in their respective Release directories, \Project\SDL-1.2.14\VisualC\SDL\Release and \Project\SDL-1.2.14\VisualC\SDLmain\Release
SDL_net requires the SDL libraries, which is why we compiled the SDL libraries first. Like with SDL, you will need to unzip the VisualC.zip file and convert the solution file SDL_net.sln. Set SDL_net to Release in the Configuration Properties.
Open the SDL_net properties page, set the Configuration Type to Static library (.lib) and then click on VC++ Directories. For the Include Directories, you need to add the directory containing the SDL Include files. They can be typically found here : \Project\SDL-1.2.14 Next you need to add the directories containing the SDL Library files. These are \Project\SDL-1.2.14\VisualC\SDL\Release and \Project\SDL-1.2.14\VisualC\SDLmain\Release. You need to add both. After you have done all this, you can exit the properties window and press F7 to compile. You should end up with sdl_net.lib.
7. Setting Up the DOSBox Compiling Environment
Now that you have all your libraries, you can compile as full a DOSBox as you like. Navigate to \Project\dosboxsvn\dosbox\visualc_net and click on dosbox.vcxproj
In the Solution Explorer Window, right click on dosbox. Set the active configuration to Release using the Configuration drop box and the Configuration Manager button first.
In the VC++ Directories, you will need to add the following directories to the Include Directories :
\Project\lpng169
\Project\SDL_net-1.2.7
\Project\SDL-1.2.14\include
\Project\zlib-1.2.5
\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
If you are compiling code specific to Windows, you may also need to include a directory like :
\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sys
\Project\lpng169\projects\vstudio\Release Library\
\Project\SDL_net-1.2.7\VisualC\Release
\Project\SDL-1.2.14\VisualC\SDL\Release
\Project\SDL-1.2.14\VisualC\SDLmain\Release
\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86
On the left side of the Property Page, click on C/C++ and then on General. On the line that says Treat Warnings As Errors, click on the box next to it and set it to No (/WX-) The compiling process will give many warnings, and if this is not set these warnings will cause the build to fail.
Next click on Linker and next to the Force File Output, click on the box next to it and select Multiply Defined Symbol Only (/FORCE:MULTIPLE). Next to the Treat Linker Warning As Errors, click on the box next to it and select No (/WX:NO). These "errors" and warnings are not going to affect a compiled DOSBox, but they certainly will stop DOSBox from compiling correctly.
Finally, underneath Linker, click Input. The following line needs to be present :
dinput8.lib;dxguid.lib;libpng16.lib;sdl_net.lib;opengl32.lib;winmm.lib;sdlmain.lib;sdl.lib;ws2_32.lib;zlib.lib;%(AdditionalDependencies)
Many of these items are already present. You will need to add dinput8.lib and dxguid.lib and rename libpng.lib to libpng16.lib. Since the space is very small, you should check the spelling and formatting very carefully. Each library, including the last, needs a semicolon ; after it.
8. Adjusting the DOSBox Code and compiling
In the Solution Explorer, clock on Source Files and then click on visualc and then double click on config.h. The code listing will appear to the right. If you are not compiling with IPX and Modem support, then change the values from 1 to 0 in the lines :
#define C_MODEM 1
#define C_IPX 1
If you are not compiling with screenshot and video recording support, change the value from 1 to 0 in the
line :
#define C_SSHOT 1
Next, for a speed boost, change the value from 0 to 1 in the line :
#define C_CORE_INLINE 0
Finally, you should see in the Solution Explorer a file called winres.rc. Right click on that and select View Code Change the line that says #include "afxres.h" to #include "Windows.h"
In the Solution Explorer, right click on dosbox, go to properties an then the Configuration Manager. Makes sure the Active solution configuration and the dosbox project configuration are both set to Release, NOT Debug. Release builds are faster than debug builds. Debug DOSBox builds exhibit an annoying issue with the Adlib music where it will stutter unless the cycle count is set very low in DOSBox. After you close the Configuration Manager window, you should see in the Configuration drop down menu Active(Release). Exit the dosbox Property pages.
Now you are ready to compile. Hit F7 and be prepared to wait. If you are successful, you will have a dosbox.exe in \Project\dosboxsvn\dosbox\visualc_net\Release. You probably will not need any .dll files since the libraries should be statically linked within the DOSBox executable, but if you do, you can obtain them from the official 0.74 DOSBox.
DOSBox will generate a .conf file on its first run if one is not present. Look in the status window to find it and move it to the directory in which you will use DOSBox. It is typically buried in AppData on Windows Vista/7/8. It will save screenshots and other captures to a folder named capture, but by default will save them to the same place as it wrote the .conf file.
If you are using Windows 8.1, you will find that the mouse movement will be extremely jerky when using this build. This is due to some changes Microsoft made in handling mouse input. To fix the problem, apply the appropriate patch for your OS (32-bit or 64-bit) from here : http://support.microsoft.com/kb/2908279
Subscribe to:
Posts (Atom)