<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/c1pjs/1.06/overview.xsl"?>
<outline script="c1p-dbg">
	<title>The Ohio Scientific Challenger 1P</title>
	<machine ref="/devices/c1p/machine.xml"/>
	<list>
		<description>Operation</description>
		<item>
			<description>Starting the C1Pjs Simulator</description>
			<list>
				<para>Press the <strong>RUN</strong> or <strong>BREAK</strong> button to start the C1Pjs Simulator.</para>
				<para>Press <strong>C</strong> to select a COLD START.</para>
				<para>At the MEMORY SIZE prompt, press <strong>Return</strong> to use all available memory.</para>
				<para>At the TERMINAL WIDTH prompt, press <strong>Return</strong> to select the default screen width.</para>
				<para>Wait for the BASIC "OK" prompt before using the <strong>Load File</strong> button; this will allow the Simulator to automatically "LOAD" and "RUN" the selected program.</para>
				<para>NOTE: The wide margins on the left and right sides of the screen are normal. The Challenger 1P's display was organized as 32 rows x 32 columns of text, but its video circuitry lacked a "guard band" feature, which meant that only about 24 characters per line, and 24 total lines, in the center of the screen could be seen on a typical television monitor. As a result, the ROMs avoided drawing outside a 24x24 area. In the window above, the top 4 and bottom 4 rows are automatically cropped, but the left and right sides are not, because I eventually want to patch the ROMs to enable 32 characters per row.</para>
			</list>
		</item>
		<item>
			<description>Typing in the C1Pjs Simulator</description>
			<list>
				<para>The C1P normally uses only upper-case characters and expects its <strong>SHIFT-LOCK</strong> key to be locked, so the Simulator initially locks it, independent of your CAPS-LOCK key.</para>
				<para>The C1P keyboard lacks characters found on modern keyboards, such as <strong>~</strong> and <strong>_</strong>; unsupported keys are simply ignored.</para>
				<para>Characters can be erased using the <strong>DELETE</strong> key instead of the documented <strong>SHIFT-O</strong>. For each character that's erased internally, an underscore is displayed.</para>
				<para>Lines can be erased using the <strong>@</strong> key instead of the documented <strong>SHIFT-P</strong>.</para>
				<para>The BASIC power operator can be typed using the <strong>^</strong> key instead of the documented <strong>SHIFT-N</strong>; for example, typing "PRINT 5^2" should display "25".</para>
				<para>RUN and LIST commands can be aborted by pressing <strong>CTRL-C</strong>, unless the current program has disabled BASIC keyboard polling. Use the BASIC command "POKE 530,0" to re-enable BASIC keyboard polling, or press <strong>BREAK</strong> and then <strong>W</strong> for a WARM START.</para>
				<para>Pressing <strong>CTRL-O</strong> disables input echo until it is pressed again; presumably this feature was added to prevent the display of passwords or other sensitive information.</para>
				<para>If the Simulator is not responding to any keys, try clicking on the black display area to restore focus; if all else fails, press <strong>BREAK</strong> and then <strong>W</strong> for a WARM START.</para>
			</list>
		</item>
	</list>
	<list>
		<description>Simulator Tips</description>
		<item>
			<description>Control Panel</description>
			<list>
				<para>Press the <strong>Run</strong> button to start the Simulator; it will change to <strong>Halt</strong> while running.</para>
				<para>Press the <strong>Step</strong> button while the simulated CPU is halted to execute a single instruction; hold the <strong>Step</strong> button to step through multiple instructions.</para>
				<para>Press the <strong>Reset</strong> button to halt and reset the simulated CPU; screen memory will be erased, but all other memory will be preserved, permitting a WARM START.</para>
				<para>Press the <strong>Load File</strong> button to load the selected BASIC program into the simulated cassette device;
				the Simulator will attempt to automatically "LOAD" and "RUN" the selected program.</para>
				<para>Alternatively, use the BASIC "LOAD" command to begin loading a program from the simulated cassette device. Press the spacebar at the end of the "LOAD" operation to restore keyboard control.</para>
				<para>Press the <strong>Load Disk</strong> button to mount the selected disk image into the simulated floppy disk drive;
				press <strong>BREAK</strong> and then <strong>D</strong> to boot from the image and load the OS-65D operating system.</para>
			</list>
		</item>
		<item>
			<description>Debugger</description>
			<list>
				<para>A built-in Debugger is provided as part of the Control Panel.</para>
				<para>Type <strong>?</strong> and then <strong>Enter</strong> to display the list of Debugger commands.</para>
				<para>The instruction frequency ("f") and history ("p") commands collect data only while the CPU is running (not stepping) and one or more breakpoints have been set;
				set a dummy execution breakpoint (eg, "bp 0") to enable collection.</para>
			</list>
		</item>
		<item>
			<description>Speed Control</description>
			<list>
				<para>The default speed of the simulated CPU is roughly 1Mhz, or one million simulated CPU cycles per second.</para>
				<para>Press the <strong>FAST</strong> button to allow the Simulator to run as fast as possible; press <strong>SLOW</strong> to return to the default speed of 1Mhz.</para>
				<para>Slow computers, as well as browsers with slow JavaScript interpreters, may not be able to achieve 1Mhz operation; in those situations, the speed controls will have no effect.</para>
			</list>
		</item>
		<item>
			<description>Embedding</description>
			<list>
				<para>Want to embed the C1Pjs Simulator on your own web page? Everything you need to know is explained <a href="/demos/c1p/embed.html">here</a>.
				You can even launch multiple simulations on a single page; check out the C1P "Server Array" <a href="/devices/c1p/array.xml">demo</a>.</para>
			</list>
		</item>
			</list>
	<list>
		<description>Background</description>
		<item>
			<description>Implementation</description>
			<list>
				<para>This computer simulation was written in JavaScript, in part to test the performance limits of web-based applications.
				The result is one of the <strong>fastest</strong> JavaScript implementations of a 6502-based computer simulation on the web today.</para>
				<para>This application uses XML to define the machine architecture, XSLT to transform the XML into HTML, and JavaScript to implement
				the simulation and bind it to the various HTML elements. The C1Pjs screen is implemented using the HTML5 <lt/>canvas<gt/>
				element, so the application requires a browser that supports HTML5.</para>
				<para>This application was tested with current versions of Safari, Firefox, Chrome and Internet Explorer. Somewhat less current
				versions will probably work as well, with the exception of Internet Explorer, which did not add support for the <lt/>canvas<gt/> tag
				until IE9.</para>
				<para>Any questions? Email <a href="mailto:jeffpar@mac.com">jeffpar@mac.com</a>.</para>
			</list>
		</item>
	</list>
	<gallery>
		<description>Challenger 1P Documentation</description>
		<item ref="/docs/c1p/OSI C1P Users Manual.pdf" thumbnail="/docs/c1p/thumbnails/OSI C1P Users Manual.png">
			OSI C1P Users Manual
		</item>
		<item ref="/docs/c1p/OSI BASIC-IN-ROM Reference Manual.pdf" thumbnail="/docs/c1p/thumbnails/OSI BASIC-IN-ROM Reference Manual.png">
			OSI BASIC-IN-ROM Reference Manual
		</item>
		<item ref="/docs/c1p/OSI C1P Character Graphics Reference Manual.pdf" thumbnail="/docs/c1p/thumbnails/OSI C1P Character Graphics Reference Manual.png">
			OSI C1P Character Graphics Reference Manual
		</item>
	</gallery>
</outline>
