Re: [stella] SC demo unit bootstrap code

Subject: Re: [stella] SC demo unit bootstrap code
From: Kevin Horton <khorton@xxxxxxxxxx>
Date: Thu, 22 Jul 1999 19:21:27 -0400 (EDT)
At 05:57 PM 7/22/99 +0200, Eckhard Stolberg wrote:

>Lee was kind enough to send me a sample of the bootstrap code
>for the Supercharger demo unit. I converted it into a binary and
>had a look at the code. From what I can see, loading though the
>joystick port works like this:
>
>The 'right' line of the right joystick port is used for output
>to the demo unit. The 'left', 'up', 'down' an 'button' lines
>of this port are used for input. A state change on the output
>line triggers the demo unit to send the next halfbyte. The
>high nibble gets send before the low nibble. The demo unit seems
>to need at least 12 6507 processor cycles to prepare the next
>nibble to be send. I think that pulling the output line low and
>then setting it high again imediately triggers the demo unit to
>switch to the next 8kb ROM load.

The unit does not send out 8K worth of data at a shot.  It sends out 64 bytes
at a shot.  The loads are of various sizes, on 64 byte boundries.  Some loads
are bigger than others, and yank data from all over the place and not in
order either I don't think.

>The loading code seems to load 65 bytes at a time. 64 of those bytes
>get stored back to front into SC-RAM. One bit in the 65th byte seems
>to make the loading code branch into a test routine that gets executed
>after each 64 byte load anyway. I don't know why it does this. The
>test code branches into the VSYNC routine if nessessary, since the
>loading code seems to try to make sure that no frame gets dropped
>during loading time.

See above.  The test is to check if this is the last block of data or not.
Also, the demo unit has to queue up the next block of data so the 2600 has
to wait for this.  (there's no need for the queueing, but they were extremely
power-concious and thought the 2600 couldn't supply more than like 2ma of
current).

>The bootstrap code only prepares to load one 64 bytes block which
>then has to hold data to tell the loading code where to load what
>block next. Therefore I'm not sure what happens after this block has
>been loaded, but I think that the loading code stays intact and
>gets called to load the other 8kb ROM banks too. This would mean that

I was wondering about this also; it appears this is how it works.

>it would be possible to replace the loading code with some code that
>does normal SC tape loads. If the 8kb ROM banks can be converted
>into a SC tape format, running the demo from a tape should be possible.

I doubt it due to the way the data is loaded and saved.

>Note to Glenn: Would it be alright if I'd post the commented bootstrap
>code here and would anyone want to see it?

I would like to see it.  I had a hard time extracting the code and commenting
it myself and would like to see how someone else did it.
(especially all those checks before it does the loading proper)

>Note to Kevin: With you knowledge of the hardware of the SC demo unit,
>does anything I said above make sense to you? Do you think it would
>be possible to convert the 8kb ROM banks inside the demo unit into
>the SC tape format and have you already put the binaries up on your
>webpage?

I doubt they would be easily convertable due to the way they are loaded,
though they might be able to be changed.  nope I haven't put it up yet since
I already boxed it up before I had a chance to read the EPROMs.  I only have
the image to EPROM #1 (which was the one I replaced).


--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread