Re: [stella] Screen shots

Subject: Re: [stella] Screen shots
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Wed, 21 Jan 1998 00:18:50 GMT
>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 :)

Even better.  This way neither of us has to play with DI.

>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.

Yeah, I have to read it a byte at a time, but there'd be no parameter
involved... I'm hoping to avoid calling my routine altogether if we're in
mode 13h.

>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.

I'm concerned about keeping mode 13h performance the same as it is.  I
imagine it would go something like
if modeX then gs=buffer else { gs=video seg; waitvsync(); }
call DoFrame
if ModeX then { waitvsync; call EriksVideo; }

>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...

I'll do the PUSHAD and POPAD then, as long as you've got the stack space.
Just make sure GS points to the buffer when you call EriksVideo.  I'll
probably save ES and use it to point to the video memory in segment A000.

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

Sounds good to me.  Call my file modex.asm .  Also, can I put a procedure
ModeXInit in my file, and just have you call that to init mode-x?  (this
way, *everything* I do is in modex.asm... cleaner that way, I think)  BTW,
you don't need to do anything special to get out of mode-x - just setting
the video mode to text mode works.

--
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