CorsixTH

From WiiBrew
Jump to navigation Jump to search
CorsixTH
CorsixTH-icon.png
General
Author(s)tueidj
TypeSimulation game
Version1.02
LicenceMIT License
Links
Download
Source
Peripherals
Wiimote.svg Nunchuck alternative.svg Loads files from the Front SD slot USB mass storage device ClassicController.svg GameCube Controller

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.

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").

Wiimote.svg Nunchuck alternative.svg ClassicController.svg GameCube Controller Action
Wii Remote Aim Nunchuck Control Stick Classic Left Control Stick GameCube Control Stick Move Pointer
Wiimote A Button Classic a Button Gamecube A Button Left Mouse Button
Wiimote B Button Classic b Button Gamecube B Button Right Mouse Button
Wiimote D-Pad Classic D-Pad / Classic Right Control Stick GameCube D-Pad / Gamecube C Control Stick Directional Keys (Scroll Map)
Wiimote + Button Classic + Button GameCube Z Button Pause (keyboard P)
Wiimote 1 Button Classic x Button Gamecube X Button Enter
Wiimote 2 Button Classic y Button Gamecube Y Button 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

The original Corsix-TH project can be found here.

Changelog

v1.02
- Updates from Corsix-TH SVN.
- Reduce memory usage to avoid out of memory errors, especially when switching language:

- 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).