If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!
This article has a talk page!

Motocross Championship

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Motocross Championship

Developer: Artech Studios
Publishers: Sega (US/EU), Tec Toy (BR)
Platform: 32X
Released in US: February 9, 1995
Released in EU: March 1995
Released in BR: 1995


SourceIcon.png This game has uncompiled source code.
DevTextIcon.png This game has hidden development-related text.


ProtoIcon.png This game has a prototype article

Behold, a rushed 32X sports game that uses JPEGs so gratuitously.

Sub-Page

Read about prototype versions of this game that have been released or dumped.
Prototype Info

Error and JPEG Conversion Tool Text

There is quite a bit of text relating to all sorts of errors, mostly, if not completely, relating to the JPEG technology used in this game. Naturally, these wouldn't show up while playing the game.

1E7738:

Insufficient memory (case %d)
Bogus free_small request
Image too wide for this implementation

1E7898:

Bogus free_small_sarray request

1E79D4:

Bogus free_small_barray request

1E7B8C:

Bogus access_big_sarray request
Virtual control array messed up

1E7D5C:

Bogus access_big_barray request

1E7F20:

Bogus free_big_sarray request

1E8074:

Bogus free_big_barray request

1E86D0:

Premature EOF in JPEG

1E88E0:

Skipping marker 0x%02x, length %u
Define Huffman Table 0x%02x
%3d %3d %3d %3d %3d %3d %3d %3d Bogus DHT counts
Bogus DHT index %d

1E8B84:

Define Arithmetic Table 0x%02x: 0x%02x
Bogus DAC index %d
Bogus DAC value 0x%x

1E8D14:

Define Quantization Table %d  precision %d
Bogus table number %d

1E8FA8:

Bogus length in DRI Define Restart Interval %u

1E90B4:

Unsupported JFIF revision number %d.%02d
Warning: unknown JFIF revision number %d.%02d
JFIF APP0 marker, density %dx%d  %d
with %d x %d thumbnail image
Warning: thumbnail image size does not match data length %u
Unknown APP0 marker (not JFIF), length %u
Short APP0 marker, length %u

1E9460:

Start Of Frame 0x%02x: width=%u, height=%u, components=%d
Empty JPEG image (DNL not supported)
Unsupported JPEG data precision
Component %d: %dhx%dv q=%d

1E9848:

Bogus SOS length
Start Of Scan: %d components
Invalid component number in SOS
c%d: [dc=%d ac=%d]

1E9ACC:

Start of Image

1E9B54:

Corrupt JPEG data: %d extraneous bytes before marker 0x%02x

1E9C6C:

Unexpected marker 0x%02x

1E9E34:

Not a FF file
Not a M_SOI file
Not a JPEG file
Unsupported SOF marker type 0x%02x
Unrecognized component IDs %d %d %d, assuming YCbCr

1EA100:

End of Image
Corrupt JPEG data: found 0x%02x marker instead of RST%d
At marker 0x%02x, recovery action %

1EA2CC:

Arithmetic coding not supported
Bogus sampling factors

1EA44C:

Empty JPEG file

1EA870:

Backing store not supported

1EA9FC:

Corrupt JPEG data: premature end of data segment

1EAB70:

Corrupt JPEG data: bad Huffman code

1EAC14:

Use of undefined Huffman table

1EAD44:

Corrupt JPEG data: %d extraneous bytes before marker 0x%02x

1EBAFD:

Bogus JPEG colorspace
Unsupported JPEG colorspace
Unsupported color conversion request

1EBD70:

Cannot quantize to fewer than %d colors

1EBF6C:

Cannot quantize more than %d color components
Cannot request more than %d quantized colors
Quantizing to %d = %d*%d*%d colors
Quantizing to %d colors

1ECF19:

Selected %d colors for quantization

1ED928:

Cannot request less than 8 quantized colors
Cannot request more than %d quantized colors

1EDAB4:

Should not get here!
2-pass quantization only handles YCbCr input

1EDC08:

Too many components for interleaved scan
I'm confused about the image width
Sampling factors too large for interleaved scan

1EE59C:

Didn't expect more than one scan

1EF81C:

CCIR601 upsampling not implemented yet
Fractional upsampling not implemented yet

Uncompiled Code

Starting at 1F3001, an entire segment of uncompiled source code can be found within the game's data. The #ifdef PC and #ifdef MARS (the 32x's codename) lines and their associated comments suggest a PC port that ultimately never surfaced.

to limit the # of lines that need to be drawn
	DrawScrollPlane(2, &CopyOfCamera2, camDX, lineCountForBackGround);
#endif
			
#endif

		DrawObjects (CopyOfCamera2.currentTile, NumberOfTiles, RoadDistances,
 		TileScreenPositionArray, SM);

	 DrawPlayerLapFlag(2);

#ifdef MARS
	if (SM == MASTER)
#endif
	{
	    Camera1Data = CopyOfCamera1;
	    Camera2Data = CopyOfCamera2;
	}


    }
    else /* Not split screen. */
    {
	CopyOfCamera1 = Camera1Data; /* Copy the whole structure. */

#ifdef DEBUGSPEED
	WindowWidth = SMALLWINDOWWIDTH;
	HalfWindowWidth = WindowWidth / 2;
	WindowX = SCREENWIDTH / 2 - HalfWindowWidth;
	WindowY = SCREENHEIGHT / 2 - SMALLWINDOWHEIGHT / 2;
	WindowHeight = SMALLWINDOWHEIGHT;
	WindowScaleFactor = 2;
#else
	WindowX = WINDOWXMARGIN;
	WindowWidth = SCREENWIDTH - (WINDOWXMARGIN * 2);
	HalfWindowWidth = WindowWidth / 2;
	WindowY = 4;
	WindowHeight = SCREENHEIGHT - (WINDOWYMARGIN * 2) - 4;
	WindowScaleFactor = 1;
#endif

#ifdef PC
	/* PC background is a full screen and must be drawn first. */
    drawBackground (FALSE, 0, 0, SM);
#endif

    NumberOfTiles = CalculateTileAndCameraPositions (TileScreenPositionArray,
    &CopyOfCamera1, &camDX, &camDY);

// .......... calc the difference in absolute heights between the bike and camera
	heightDiffForHorizon = 
		(CopyOfCamera1.SubjectBikeTileHeight + CopyOfCamera1.subjectBike->bottomY) -
		(CopyOfCamera1.absoluteTileHeight + CopyOfCamera1.yOffset);

	lineCountForBackGround = DrawGround (NumberOfTiles, RoadDistances,
	TileScreenPositionArray, SM);

#ifdef MARS
// .......... 32X background gets drawn after, to limit the # of lines that need to be drawn
	DrawScrollPlane(1, &CopyOfCamera1, camDX, lineCountForBackGround);
					
#endif
  	DrawObjects (CopyOfCamera1.currentTile, NumberOfTiles, RoadDistances,
  	TileScreenPositionArray, SM);

	DrawPlayerLapFlag(1);

#if 0
	ShowNum(heightDiffForHorizon);
#endif

#ifdef MARS
	if (SM == MASTER)
#endif
	{
	    Camera1Data = CopyOfCamera1;
	}

}


#if 0
#ifdef DEBUG
    /* Print out the debug value. */
    if (SM == MASTER)
    {
        char TempString [40];

        #ifdef DEBUGSPEED
        #else
        IntToAscii ((int) DebugValue, TempString, 10);
        PutString (0, 0, "Debug value:", WHITECOLOUR);
        PutString (120, 0, TempString, WHITECOLOUR);
        #endif
    }
#endif
#endif
}

void ShowNum(int num)
{
	char String1[100],String2[20];

   StringCopy (String1,"Number: ");
	IntToAscii (num, String2,10);

	StringCat(String1,String2);

#ifdef MARS
   ColorAreaNOCLIP(50,50,100,20,0,0);
#endif
   PutString(50,50,String1,100);
}

void ShowAbsoluteTileHeight(CameraDataRecord CopyOfCamera)
{
	char String1[100],String2[20];

   StringCopy (String1,"TileHeight: ");
	IntToAscii ((int) CopyOfCamera.absoluteTileHeight, String2,10);

	StringCat(String1,String2);
#ifdef MARS
	ColorAreaNOCLIP(90,30,100,20,0,0);
#endif
   PutString(10,30,String1,100);
}


void ShowSegment(void)
{
    trackTilePointer   CurrentTilePtr;
	char String1[100],String2[20];

    CurrentTilePtr = GetTrackTileForNumber (Camera1Data.currentTile);

    StringCopy (String1,"Segment # ");
	IntToAscii ((int) CurrentTilePtr->segmentNumber, String2,10);

	StringCat(String1,String2);

    PutString(10,30,String1,100);
}



/****************************************************************************
 * Draw the race track and objects on it to the screen.
 */

void Render (void)
{
    RenderTrackAndObjectsToRamScreen ();
    DisplayStatusInfo ();

	//ShowSegment();

sendBuffersToScreen ();
}