CorsixTH

This project can be considered abandoned, if anybody else would like to take it over. This is mainly due to the gameplay implemented in CorsixTH straying too far from the original Theme Hospital and a decline in the quality of the code being committed to the Google Code project as new committers have been added - I am tired of the game crashing every five minutes each time I attempt to sync to their SVN. Perhaps I will pick it up again when all features have been added and are stable.

Contents

Introduction

Theme Hospital was originally released by Bullfrog in 1997. CorsixTH is an open source clone of the original game with the aim of being able to run on more platforms as well as correcting some bugs and adding new enhancements/features.

Game Setup

CorsixTH requires the resource files from the original Theme Hospital game. If you don't have a copy of the original game you can get the demo version (although it only has one level and is missing several features) or purchase it from gog.com. Copy the HOSP folder from the original disc to somewhere on your SD/USB drive. When you start CorsixTH for the first time it should show a folder browser for you to locate this folder. It should then restart and go to the main menu.

Music

The original Theme Hospital used midi music, and CorsixTH can play these files. However since the wii has no midi hardware you will need timidity-compatible instrument patch files such as those found at the Freepats project. Once you have a patch set copy the .cfg file you wish to use to "/etc/timidity/timidity.cfg" on your SD/USB drive and put the patch files in "/usr/local/lib/timidity". If possible try and use a smaller patch set which uses substitute instruments, since there's not a lot of memory available (for example if using the freepats set use crude.cfg instead of the default freepats.cfg).

Bugs

The CorsixTH project is still a work a progress, and there are bugs. Most of the time you'll get an error on-screen asking if you wish to attempt to continue - it's not really a good idea since you'll end up with patients and/or staff stuck in doorways or trying to perform other actions. The best thing to do at that point is to load the autosave file and hope it doesn't happen again.

Controls

If you want the true old-school experience, connect a USB mouse and keyboard and play the game just like on a PC (this is actually the only control method that allows you to name savegames anything other than "p").

Action

Move Pointer

Left Mouse Button

Right Mouse Button

/

/

Directional Keys (Scroll Map)

Pause (keyboard P)

Enter

Escape (close any topmost dialog)

Media

Source

CorsixTH uses SDL and LUA, both of which are included in the source archive ready to be built for the wii. Note that SDL has been modified specifically for CorsixTH, I don't recommend using this build as-is for other projects (however some of the modifications are improvements over Tantric's SVN).
Modifications to the original Corsix-TH source include endian fixes and a LRU cache for the graphics and sound effects, to make them fit in the wii's limited available memory.
It is possible to update the game's LUA files from Corsix-TH's SVN as long as no changes are made to the back-end.

Credits

Changelog

- NAND based virtual memory used to hold the current audio library, reduces working set from ~16MB to ~512KB

- LRU cache for sound effects

v1.01
- Many fixes from Corsix-TH SVN. Including (but not limited to) no more stuck patients or handymen, variable speed doctors, doctor promotions, patients sometimes vomit/litter/wet themselves...
- Rewrote the input handling to make proper use of all available SDL joysticks (including gamecube controllers)
- Reworked the video renderer slightly.
- Rewrote the audio renderer to use libaesnd; channels are no longer reversed.
- Newest libogc (no more random crashes when using a real mouse).