CORTEX 5.9.5a
Currently, the newest official version of CORTEX (5.9.5 for DOS) can be
found at http://www.cortex.salk.edu/. This
page is dedicated to documenting some additions to the CORTEX code made by
myself and Ryan Kelly. All
of the changes we have made are to the dual-computer version of CORTEX
using the DirectX Receive program (i.e., wcsend.exe and DXrecv.exe). The
code on this site is provided "as-is", and any general questions about
Cortex should be directed to the Cortex Discussion Forum.
In order to compile CORTEX, we needed to configure several programs
properly. I've made a page with detailed instructions for compiling CORTEX
here.
CORTEX Downloads
-
c595a_20040618.zip (14.2 MB), Last updated: June 18, 2004
Version 5.9.5a of CORTEX with modifications from 5.9.5 for the wcsend.exe
and DXrecv.exe programs. Be aware that although this program has been
tested and works in our hands, it may contain bugs that we have created
with these changes. You should test it out thoroughly before using it for
any important purpose.
-
readcortex_header.m (3 KB), Last updated:
July 20, 2005
This is a Matlab function that reads the additional
CORTEX header information available by using the write_header() function.
What's new since 5.9.5:
- Changes to the Send Program (wcsend.exe)
- getCndsFileName(), getExternsFileName(), getItemsFileName(), getTimingFileName()
These commands already existed for the Windows version of CORTEX, we
implemented them for the DOS version. They allow you to get the condition,
extern, item and timing file name using these function from within your
timing file. These new functions are added into the file
_userfns.c, and also required changes to statefns.h and
ufnlst.c
- getGraphicsSpecs functions:
- void getGraphicsSpecs(CSS_ARGS) - returns all of the arguments from the GRAPHICS_SPECS line in the cortex.cfg file
- int getGraphicsSpecs_xdim() - returns the horizontal dimension of the screen (in pixels)
- int getGraphicsSpecs_ydim() - returns the vertical dimension of the screen (in pixels)
- int getGraphicsSpecs_fps() - returns the refresh rate of the screen (in frames per second)
- float getGraphicsSpecs_hpix() - returns the number of pixels per degree of visual angle in the horizontal dimension
- float getGraphicsSpecs_vpix() - returns the number of pixels per degree of visual angle in the vertical dimension
- int getGraphicsSpecs_bpp() - returns the number of bits per pixel for the screen
These functions were all added in the file matt.c, and also
required changes to statefns.h and ufnlst.c
- writeHeader()
This function, if called from the timing file, will write a series of
codes into the CORTEX data file. This data includes all the relevant
filenames (condition, item, externs, timing) and the data in the external
parameter file, along with the GRAPHICS_SPECS information from the
cortex.cfg file. If this function is called, the first event code written
will be the number 65535 (which tags the file to indicate it has extra
header information). The code 255 is used to space out this header
information, and all of these header codes will be greater than or equal
to 255 (to distinguish them from existing codes used by CORTEX). If you
use the Matlab function "readcortex" (linked above for download) it will
read in the header information (if present) and return it in a structure.
This function is added into the file _userfns.c, and also required
changes to statefns.h and ufnlst.c
- We have changed the functionality of the "Disk - Get" menu option.
Now, when a .set file is loaded with this option (containing a saved
CORTEX setup) it will load the parameter file if it was specified in the
saved setting. This avoids an annoyance/bug where if you tried to run an
experiment without loading the necessary external parameter file CORTEX
would crash. Now, the external parameter file is loaded automatically if
it is available. This capacity was added via a new
"HELPcreate_extern_nomenu" function in the CSSIO.C file and also
required changes in main.c
- Some additional code was added into csssim.c to get it to allow
for faster "escape" from a run (the "escabort" function).
- Changes to the Receive Program (DXrecv.exe)
- Changes to allow wide surfaces
In previous versions of CORTEX, if you tried to load and display an image
larger than the screen dimensions it would crop the image to fit the
screen. This was because older DirectX graphics cards would not allow you
to load such images, and it could cause system instability and a crash.
Now, this capacity (called "WIDESURFACES") is present on most or all
graphics cards. The new version, requiring changes both to the Receive and
the Send code, tests to determine if your graphics card supports the
DDCAPS2_WIDESURFACES flag. If it does, the image will not be cropped to
the display resolution (which is useful if you want to animate by panning
around a very large bitmap image, for instance). This added functionality
required changes to the initgks.cpp, window.cpp and
dxgks.hpp files, as well as some changes to the send program code.
This feature has not been adequately tested on older machines that have
cards that do not support wide surfaces.
[Main Page]
[CNBC]
[CMU]
[Active Perception Lab]