Re: [stella] Screen shots

Subject: Re: [stella] Screen shots
From: "John Saeger" <john@xxxxxxxxxxx>
Date: Tue, 20 Jan 1998 09:06:07 -0800
-----Original Message-----
From: Erik Mooney <emooney@xxxxxxxxxxxxxxxx>
To: stella@xxxxxxxxxxx <stella@xxxxxxxxxxx>
Date: Monday, January 19, 1998 8:56 PM
Subject: Re: [stella] Screen shots


>Actually, what I was thinking is to just render the whole thing into a
>buffer, then call a procedure I'll make to write it to the screen in
>mode-X.  This'd work by setting GS - if we're in mode-X, at the beginning
>of the frame you'd set GS:DI to point to a 160-byte memory buffer; if in
>mode 13h, GS:DI points to the screen memory.  Then, after rendering each
>line, you call my procedure if modeX is active, so it'd look like
>(at beginning of frame) if modeX then gs=buffer else gs=video segment
>(each line) call TIADoLine
>(each line) if modeX then call EriksVideo

Hmmm... How about if I allocate a buffer for the entire frame, and call
EriksVideo once per frame? This way I can point gs at the buffer and leave
the rendering code alone for now.  This would make it easier to get the PCX
file dumping code working too,  which is how this whole thing started as I
recall :)

We can optimize it later.  Assuming you'll be scanning the buffer a byte at
a time, it shouldn't be too hard to have your routine skip bytes or not skip
bytes, as an assembly time parameter.  Just define some constant equal to 1
or 2.

This also gives you more control so you can do page-flipping if you like,
and I can adjust the timing so that the emulator renders the frame to the
buffer, THEN waits for vertical sync or whatever, then calls EriksVideo.
This might give a more stable image.

>What I need you to do is set up the framework.  Put in a command-line
>option for modeX, and put in the tests even if they don't do anything yet -
>do something like
>if modeX then gs=video else gs=video
>and I'd like you to put in the "if modeX then call EriksVideo" and put in
>the EriksVideo procedure - leave it empty and I'll actually write it.  I'd
>much prefer you to take the 10 minutes to do this than the hour it'd take
>me to figure out your code and do it.

O.K., I can add an option:

-v<n>

for video mode.  (I'll change "verbose" to something else)  It'll set a
variable called _VideoMode with the number <n>.  There are already variables
called TopLine and BottomLine so you can figure out how many lines to
convert.

>Make sense?  I hope? :)  Also, I need a segment, offset, and general
>register for scratch work during EriksVideo - can I use FS, SI, and AX?
>Two generals would be even better - can I borrow BX too?

If we're calling you once per frame, it costs very little to do a PUSHAD and
POPAD and have all the registers you want.  You might need to save/restore a
couple of segment registers too...

What do you think?  And what would you like to name the file that EriksVideo
lives in?

John


--
Stella list is Administered by krishna@xxxxxxxxxxxx <Glenn Saunders>
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
+-shameless plugs-------------------------------------------------------+
| Stella documentary at http://www.primenet.com/~krishna                |
| Nick's VCS links via http://www.primenet.com/~nickb/atariprg.htm      |
| Write the best game, win framed autographs of famous Atari alumni!!   |
+-----------------------------------------------------------------------+

Current Thread