ep88theman wrote:
> Hey,
>
> I'm new to 6502 programming. The book I'm reading talks briefly about
> using the lo-res routine and the plot location $F800 like below:
What book are you reading?
>
> But how the heck do I enter HGR or HGR2?
You need to access the screen soft-switches. These are memory locations that
affect what mode the Apple II is in. When it comes to showing information on
the screen, the Apple II has two main modes:
1.) Text
2.) Graphics
Text mode is split into sub-modes of 40 and 80 columns.
For graphics, there is Low-resolution and High-resolution graphics modes.
It is possible to show graphics at the top portion of the screen with room
below for four lines of text. Each of these two modes has variants, such as
80-columns text, or low-resolution graphics with 4 lines for text at the
bottom. Or you can have the entire screen be composed of low-res or high-res
graphics.
To enter graphics mode, access memory location $C050.
Assembly programmers typically use LDA $C050. The contents of the
accumulator don't matter.
To get back to text mode, use $C051.
When you first boot the Apple and use $C050, you will see the low-resolution
screen. Since it shares space with the text screen, it will be the blocky
outlines of what characters had been on the screen.
To get to high-resolution mode, use $C055.
For all of these soft-switches, you could consult the Apple II reference
manuals, which I mention down below.
As for programming the graphics displays on your own, the low-resolution
display is fairly simple, but- high-resolution is notably complex. There is
further complication in that the memory for these displays is not linear.
Again, read the Apple II books which I mention below for more explanation.
> Also any recommended
> books or sites I should visit?
>
1.) The white spiral-bound Apple II Reference Manual is preferable for the
II and II Plus, or the appropriate Apple reference manual for the later
models. This will give you:
- Monitor ROM listing
- Entry points to useful routines in the Monitor ROM and how to use them
- Charts that will show you the 6502 Mnemonics and opcodes
- Information on how to use the various screen modes: text, lo-res, and
hi-res
- Soft-switches and what they do
2.) Hi-res graphics and animation using assembly language: The guide for
Apple II programmers
by Leonard Malkin
ISBN-10: 0810467585
I think this is a pretty good book since it starts with the basics of
assembly language programming, then moves on to showing how to plot shapes
on the screen, then proceeds to animating the shapes, then finishes with an
action game using sound, joystick, and the other concepts that had been
presented in earlier chapters. If you are using a IIe or later model, it has
a chapter showing how to program double-high-resolution graphics.
--
]DF$
Apple II Book:
http://macgui.com/newa2guide/
Usenet:
http://macgui.com/usenet/ <-- get posts by email!
Apple II Web & Blog hosting:
http://a2hq.com/