Re: [stella] 3E + interlace woes

Subject: Re: [stella] 3E + interlace woes
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Fri, 8 Jul 2005 11:09:25 -0400
On Fri, 8 Jul 2005, Eckhard Stolberg wrote:

> The demo doesn't use interlaced video. I think it only does some
> form of Andrew's ChronoColour.

OK, guess I read something wrong somewhere...

> But either way, what you should see
> is a picture like the JPG in the message with the binary, but
> with 30Hz flicker.

Yup, I got it working last night sometime after I posted my plea for
help. What I *should* have done was used the debugger (heh, I'm *writing*
the thing, it didn't occur to me to actually use it for anything useful!).

I found that every one of those all-black frames had over 4000 scanlines,
and that RIOT RAM was showing up as all zeroes always... so I knew it
was a bug in my code somewhere. It only took an hour more of tearing
out my hair to spot it :(

> After looking at the 3E code that you committed to the Stella CVS
> I think your problem is that you don't handle RAM writing at all
> yet. The poke method only traps the bankswitching hotspots. Since
> the demo binary reads all of it's graphics from RAM, you only
> get a blank screen.

Actually the code I checked in is working :)

At least, I get a flickery display that starts out looking just like
the JPEG screenshot that came with the binary, and I can dig through
the dirt and scroll the screen a bit. Next alpha release will contain
the 3E support, so Andrew can test it against his current binary.

The poke method only get called for the hotspots (actually for all
addresses $00-$3f). The RAM (and ROM) reads are done by reading directly
from the relevant array: see the "directPeekBase" stuff in the bank()
method to see how it's set up.

> BTW, you also should handle writes to the 3E RAM that are triggered
> by accidental reads to the RAM write ports. That's usefull for
> finding problems with indexed addressing modes when they are crossing
> a page boundary. Andrew had problems with that in his early demos,
> like the one you are using to implement 3E bankswitching.

AFAIK, Cart classes don't have to handle that explicitly, as the 6507
emulation will put the correct stuff on the emulated bus and read/write
the correct addresses when page-crossing happens.

At this point I've got code that seems to work, but I won't believe it
until I can test it against more ROMs besides the notBD demo. Do any
other 3E ROMs exist at all?

> Not that is is nessessary for the Boulderdash game, but there
> is an interlace demo in the Stella archives at

Hm. I tried this with z26 (current CVS), and can't tell the difference
between running it with or without the "-!" option to turn on interlacing.
It also looks the same in Stella to me... is it just my rotten eyes?

Archives (includes files) at
Unsub & more at

Current Thread