Re: A86: Re: Ports


[Prev][Next][Index][Thread]

Re: A86: Re: Ports




ZeromusMog@aol.com wrote:
> 
> In a message dated 12/10/98 3:48:07 PM Pacific Standard Time, electrum@tfs.net
> writes:
> 
> > Summary (from file):
> >      port 0 - Screen Offset, WRITE ONLY
> Offset? Is this like some kind of second screen? Or is this the screen memory
> area?

Whatever you put out to this added to $c0 then multiplied by $100, and
that value becomes the start of video memory. 
If you do:

ld a,$3c
out (0),a 

then vid mem will start at $fc00, just like normal.  If you switch back
and forth between this and somewhere else (ex/ $c000) real fast you get
grayscale.

> (BTW, a little off topic, but BASICALLY, how does a driver differ, from a
> programming standpoint, than the memory method?)

On the 85/86 you have a memory mapped display, so whenever you write to
video memory stuff instantly comes up on the screen.  The 82 and 83 use
an LCD driver, so you write all your graphics to somewhere in memory,
just like on the 86 (sort of), but for anything to show up on the screen
you have to tell the driver to access that memory and put it on the
screen.  It doesn't just show up immediately.

> 
> >      port 1 - Keypad
> Is this where you read from the keypad directly? Could Mr. Nigel use this to
> make Mario stop hoppin' up and down like a penguin or something? :)

He probably already uses this, to keep mario from jumping so fast he
would have to put in a delay or something.

> 
> >      port 2 - Contrast, WRITE ONLY
> Wait, if it can't be read, then how do fadein/fadeout programs know how to set
> the contrast at the right level when it's done? I'm very interested in using
> this in future programs...

The contrast is also stored at $c008, read it from there, but make sure
you save it there if you change anything.

> 
> >      port 3 - ON Status, LCD Power
> >      port 4 - Power Mode
> Like low/high power?
> 
> >      port 5 - Page change at $4000-$7FFF
> >      port 6 - Page change at $8000-$BFFF
> >      port 7 - Link Port


References: