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

double lowres funkiness



	Now that I have a RGB monitor for my IIgs, I have resumed work on 
my double lowres graphics library.  I wrote a simple test program that 
will turn on double low res and plot test color squares (4x4 grid of 
8x8 squares of each color).  On my IIe card in my Mac LC-II the boxes 
appear nice and pretty.  On the IIgs... well... It is odd.  Every other 
column is the wrong color.

	After a few hours of tinkering I have deduced that on the IIgs, in 
double low res graphics mode, colors stored in teh Main memory bank use a 
different palette from the AUX memory bank.  This can be confirmed using 
the Apple IIgs monitor (from a fresh boot into prodos/basic.system):

pr#3
gr
call-151
c05e:0
00/400:00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
01/500:00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff


	Ok, We just plotted odd numbered pixels (main memory) in row 0,
and even numbered pixels (AUX memory) in row 2.  Notice that the rows look
different.  The colors in AUX memory match what the colors SHOULD be (in
non double lowres mode).  The colors in MAIN memory appear to be
interleaved in the order: 0, 8, 1, 9, 2, 10, ..., 7, 15.

	On the IIe card in the Mac, the colors in AUX match the ones in
MAIN.  You would have to write a small program to test this, as ythe IIe
card does not have a 65816 and the monitor does not understand the
"xx/yyyy" address notation.

	In the end, I hacked my libaray to detect if the computer is a 
IIgs or not and do the appropriate color translation.  My test program now 
generates identical results on both teh IIgs and IIe card.

	During my testing, I did use applesoft basic on the IIgs to plot 
colors in double low res mode and then I went into the monitor to examine 
what was placed in video memory.  Applesoft basic plots the colors 
correctly, translating the MAIN memory pixels when needed.  This tells me 
that it is supposed to be this way, and that my IIgs is not screwed up.

	Questions:  I have a rom 01 IIgs.  Does this occur in a Rom 0 or 
3?  What about a normal IIe (if the motherboard rev > a)?  Or a IIc?  I 
would like my graphics library to work on all platforms.

	To the emulator authors out there:  Are you guys aware of this
behavior, and do your emulators handle it correctly?  I just fired up
XGS32 v1.6.92 and it does not even support lowres graphics, let alone
double low res.  I have not tested applewin yet, and I can not get SLApple
to run without crashing.

	Anyway, does anyone know why the IIe card and IIgs would implement 
double lowres graphics differently?  Mr. Empson? :)