Sega Dreamcast Microsoft Windows CE SDK


Sega Dreamcast Microsoft Windows CE SDK

Edit on github | Updated: 2019-07-20 15:57:27 +0000
Originally called the Dragon SDK and planned to be the full Operating System (OS) of the dreamcast. However SEGA decided to go with their own limited BIOS with the Dreamcast instead of a fully functional OS. So to use WindowsCE on the Dreamcast game developers would have to bundle the entire Windows CE OS on the game disc 1.
This means that in order to run the game the dreamcast would first boot into the file 0WINCEOS.BIN on the GD-ROM disc and then it would load the game. This had a performance impact, reducing the resources the developers would have for the game, so lower memory, longer loading times and less performance for the actual game.
So why would developers use the Windows CE SDK instead of the more powerful Katana SDK?
The answer mainly comes down to the ease of porting PC games to the platform and the developers can use their prior windows knowledge instead of learning a completely new platform from scratch 2.
This reduces development cost as much of the code from the PC version could be used with some modification and it would take less developer time to learn the Application programming Interfaces (API). So it was a trade-off that worked for less performance demanding games as they could be developed much quicker from a PC port 2.
One example of a studio doing just that is a presentation from D. Michael Traub from Acclaim on porting the Quagmire engine to the Dreamcast, they used the WinCE SDK to port to the dreamcast and they found that it worked very well, claiming that it only took a month to port the engine thanks to the SDK.

Porting issues from PC to DC

Even although the Windows CE SDK’s main focus is to make it easy to port your game from Standard windows Direct X over to embedded platforms such as the Dreamcast, there were a few important compatibility issues that developers needed to take into account when porting their games.
Windows CE is Unicode only, so the game needs to be changed from ASCII.

Executable format

Unlike the standard Katana SDK the game executables for dreamcast windows CE were actually in PE executable format. The game executable could be called anything with a .EXE extension but many games simply call it GAME.EXE which may have been the default.
These executable files are able to be opened in IDA Pro and radare2 for reverse engineering but most don’t contain any debug symbols.

Sega Dreamcast Games with Debug Symbols

For games with debug symbols check out this post.

Tools Provided

The Windows CE SDK for dreamcast came with a tools folder which contains a few GUI-based programs for developers to help debug and optimise their games.

GD Workshop

Dreamcast Tool (dctool.exe)

The dreamcast Tool is a useful program to connect from a PC to a dreamcast development system allowing you to do tasks such as boot an executable image, run Dtrace, show textures etc.

Dreamcast Trace Tool (Dtrace) (dtview.exe)

DreamcastTrace or DTrace is a performance monitoring tool to allow developers to optimise their games to be as efficient as possible. It is unrelated to the well-known standard DTracetool by Sun Microsystems.

Image Configuration Tool (config.exe)

Unlike its name it does not relate to graphic images, instead it refers to Operating system images. This allows you to configure which modules will be included in your games version of the Windows CE Operating system.

IP Maker Tool (ipmaker.exe)

This is a tool for creating the boot loader for the disc (IP) called ip_drago.bin since the codename for the Win CE SDK is dragon.
You give it the name of your main game executable (*.exe) and it will run that on playing the GD-ROM disc in a dreamcast.

Profiler Tool (profcvt.exe)

The profiler is a tool to debug performance issues in your game executable’s functions. This tool is vital to make a playable dreamcast game that also pushes the hardware limits without going below 30fps.

Synthesizer Author Tool (SynthAuthor) (synthauthor.exe)

The Synthesizer Author Tool is a program for sounds engineers to create a collection of instruments for use in the game music.

Windows Debugger Tool (Windbg.exe)

This is a standard source-level debugger supporting breakpoint and variable value watching.
Also the file NknoDbg.exe is on the retail disc of a few retail games such as Sega Rally 2. But it is unconfirmed what this executable is and how it differs from the standard Windbg.exe tool.

Utilities Provided

The Utilities differ from the tools as they all tend to be Command Line oriented and would normally be scripted and used as part of a automated build process.

Audio Utilities

The following are tools used by sound engineers to convert between sound formats for use on the Dreamcast.

DLS to Dreamcast ToneBank Converter Utility

(dls2tb.exe) Converts .DLS files to the dreamcast specific .TB (Tonebank) files format.

DLS to Sega ToneBank Converter Utility (dls2dcs.exe)

What is the difference between this and the .TB converter?

Wave Converter Utility (wavcon.exe) (Audio)

Converts 16-bit PCM wave files to 4-bit ADPCM files for playing on the dreamcast.

Debugging Utilities

Check RES Utility (checkres.exe)

Check resource files to look for duplicates or problems with resource files.

Debug Adapter Check (dacheck.exe)

Used to debug connection issues with the debug adapter.

Dump Register Utility (dumpreg.exe)

Used for debugging it transfers the dreamcast CPU registers to your PC for debugging low-level assembly code.

Profile Conversion Utility (profcvt.exe)

This tool is used for converting the output of the function profiler tool into a human-readable text file.

Windows CE OS Image Management Utilities

Make Image Utility (makeimg.exe)

A command line version of the image config tool, it allows you to build an Windows CE OS image and choose which modules are included.

ROM Image Builder Utility (romimage.exe)

Not sure the difference between this and makeimg.exe

Registry Compression Utility (regcomp.exe)

Just like standard Windows on the Desktop, windowsCE also includes a Registry to save keys and values.
This tool converts the human readable and easily editable ini file RegInit.ini into the compressed Default.fdf which is placed inside the WinCE OS image.

Other Utilities

Binary Generator Utility (bingen.exe) (CLI)

Command line utility to convert an executable into a binary file. Seems to take a language in as a parameter, not sure why.

Dreamcast Copy (dccopy.exe)

This utility is simply a convenient tool to copy the newly built executable from the Builddirectory into the Release directory.

Dump NK Utility (dumpnk.exe)

This file dumps NK-ROM image files to a binary file.
But what is a NK-ROM file?

Flash Utility (flash.exe)

Use this tool to upgrade the firmware of the Dreamcast development DEV.BOX.

File Merge Utility (fmerge.exe)

Moves configuration files to multiple directories, not sure the purpose.

Mycat Utility (mycat.exe)

Seems to concatinate some binary files to StandardOut and strips out some data but not sure the purpose.

NLS Compression Utility (cenlscmp.exe)

What is Natural Language Support Compression?

PowerVR Converter Utility (prconv.exe) (CLI)

Rebaseic Utility (rebaseic.exe)

Removes duplicate icons from resource (.RES) files.

Resource to Executable Utility (res2exe.exe)

Text to Unicode Utility (txt2ucde.exe)

Since windows CE only supports Unicode strings, for PC ports ASCII would need to be converted to Unicode which is where this utility comes in useful.

Txt2vmi Utility (txt2vmi.exe)

Converts VMU text files to VMI images.

VC5 to VC6 Converter Utility (vc5tovc6.exe)

Simply converts Visual C++ 5.0 projects to Visual C++ 6.0 project files.

Libraries

DebugMem Tool (DEBUGMEM.LIB)

The DebugMem tool is actually a library and programming interface that developers use to debug memory issues such as memory leaks.

Games that were built for WindowsCE

You can find out if your favourite game was built using the Windows CE SDK by inserting the disc and looking for the file 0WINCEOS.BIN in the root of the GD-ROM. Here is A list of Windows CE games that I have found so far:

Even more games?

SegaRetro wiki has a list of even more games that were created with the WindowsCE SDK but I have been unable to verify if they have WINCE on the disc yet, you can find the list here: Windows CE - Sega Retro.
Also I haven’t checked Demo discs or prototype games either, so please contribute if you know of some that should be added to the list.

Armada (US)

The US version of Armada contains the linker map file for the WSEGACD windows CE library. This contains all the function names provided by the library.

The Next Tetris (WindowsCE)

The online edition of ‘The Next Tetris’ was built using the Dreamcast Windows CE SDK and has accidentally placed 2 windowsCE libraries on the retail disc:
  • CHATCE.LIB (Chat library for windowsCE)
  • SOUNDLIBWCE.LIB (Sound library for windowsCE)
Note that The Next Tetris is the only dreamcast game that includes these two libraries.
The game includes TETRISDC.EXE which is a SH-4 PE executable but it does not contain any debug symbols.

Taxi 2 - Le Jeu (contains WinCE PDB files)

The french game Taxi 2 contained the PDB files for all the libraries provided by the WindowsCE runtime environment for dreamcast. Also of note is that the NTSC release of Armada also contained the PDB files for the same libraries but they have different md5 hashes so likely from different versions of the Windows CE runtime environment.

Games that contained un-linked Library files

It was very rare for games to include library files on the disc, these would serve no purpose as the game can’t load static libraries at runtime (they would have to be dynamic link libraries .dll).
These are somewhat interesting as they do contain function names but they are just a small part of each game.

WIndows CE Platform SDK

The Windows CE Platform SDK itself was available free from the Microsoft website and was used for programming for a range of embedded devices. However this only included the CE libraries and headers, in order to actually compile for the Dreamcast you would need to pay for the full Katana development platform 5.

Windows CE Dreamcast Specific Libraries

These are the libraries that were unique to the Dreamcast Windows CE SDK and were not standard as part of the normal Win CE SDK.

Maple

Maple is the name of the library that allows the Windows CE SDK to connect to external devices such as Light-Guns, keyboards and more.

WSEGACD

The WSEGACD library was developed by Sega for control of the GD-ROM drive. So developers could read data or even stream data from the disc. Presumably the ‘W’ stands for windows as a different library was developed for the Katana SDK.

VMIMIME (VMU)

The VMIMIME library is used to connect between the main game code and the VMU unit in the back of the controller.

Glossary

References

SHARE

Oscar perez

Arquitecto especialista en gestion de proyectos si necesitas desarrollar algun proyecto en Bogota contactame en el 3006825874 o visita mi pagina en www.arquitectobogota.tk

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comentarios:

Publicar un comentario