The Cortex Emulator is a Windows application developed under Borland C++ Builder 5 (Standard Edition). It consists of a single executable file (WinCortex.exe) and a copy of the original Cortex EPROMs in a file called cortex.bin. Place both of these in a folder and you're away.
In addition, there are many disk images available that are actual binary copies of physical Cortex disks, allowing you to explore CDOS and MDEX. The images have a few additional bytes appended that describe the the physical disk parameters (i.e. number of tracks, sides and density). These images work directly with the Emulator. However, if you're lucky enough to have a working Cortex that has the TMS9909 disk interface, you can use the PC Comms Utility to recreate your own set of working disks!
Here are some notes to get the Emulator going:
1) System Requirements
Developed under XP, but should run on Win 98+.
DirectX 4 or later.
Video resolution 1024x768 or higher.
No installation process is required, simply copy the files into a folder!
WinCortex.exe - Cortex Emulator
CORTEX.BIN - Image of Cortex ROM*
*.dsk - Disk Image files
* The physical ROM consists of 3 x 8K EPROMs, however at boot time the Cortex pages in the lower 32K so that a 4th EPROM could be added. Therefore, the ROM image file is 32K.
3) Emulated Hardware
The emulation is based on a 64K Cortex with the Disk Interface fitted. Four virtual disk drives are available, each of which can be configured to replicate any valid physical disk drive. The actual configuration is stored within the disk image file. When a disk image is 'placed' in a virtual floppy drive, that drive assumes the physical attributes of the image (e.g. 80 Tracks, Double-Sided, Double-Density). It is therefore important to ensure the 'Cortex' is configured accordingly. For instance, if a Single Density copy of CDOS is placed in Drive 0, but the Boot Density Jumper is set for Double Density, the disk won't boot! Another example would be putting an 80TDSDD disk in Drive 1 when CDOS is configured to expect a 40TSSDD. Both these scenarios would cause errors and, of course, the same would be true on a real Cortex...
The emulated video hardware is basically a TMS9928/9 with 16K of RAM (Multicolor Mode 64x48 is not supported at this time). Additionally the 80x26 Text Mode II from the V9938 MSX chip is also emulated as MDEX works a lot better when it's in its native 80 column environment.
The following shows the key substitutions due to keyboard differences between the Cortex and a PC. Keyboard shortcuts are also listed:
5) Control Panel
The Control Panel is a very useful tool for observing the operation of the Cortex/TMS9995. It is pretty obvious how it works. One thing to be aware of is that when the Cortex is doing nothing, it executes the IDLE instruction. This suspends execution until an interrupt is received (usually a key press). The other source of an interrupt is when the TMS9995 Decrementer counts down to zero.
If the Control Panel is opened, Single-Step enabled and the Decrementer is still thousands of CPU cycles to reach zero, it will appear that nothing is happening when trying to Step the CPU. For this situation, there is an IDLE Override control that stops the CPU 'hanging' when in the IDLE state.
The 'Status Messages' window on the Control Panel displays messages if something went wrong or when using the Disassembly Mode. Typically a Status Message is displayed when trying to access a memory location that is mapped for I/O but no hardware is emulated at that address.
The Emulator runs as fast as it can. Therefore, running any program that was written for a Cortex back in 1982 will undoubtedly run at a different speed on the Emulator. This is only likely to be a problem for games. A real-time mode may be added at a later date.
N/A (keys auto-repeat)
Drive 0 Image File
Drive 1 Image File
Drive 2 Image File
Drive 3 Image File
Toggle Control Panel