A89: _rowread() picking up the wrong keys


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

A89: _rowread() picking up the wrong keys




Hi!

I looked through this mailing list's archives and I know that a lot of 
questions about the _rowread() have been asked before. I read through 
all the answers I found to those questions but unfortunately, I was 
still not able to solve my problem:

All I want to do is to wait until the "ESC" key is pressed with 
grayscale enabled. So, I tried this:

void _main(void)
{
	INT_HANDLER saveInt1 = GetIntVec(AUTO_INT_1);
	SetIntVec(AUTO_INT_1, DUMMY_HANDLER);

		while (!(_rowread(0xFFBF) & 0x01)) {
		}
	
	SetIntVec (AUTO_INT_1, saveInt1);				}

However, this function does not work as expected. The loop can be left 
by pressing the "ESC" key, but it can also be left by pressing the 
"APPS" or the "ENTER" keys repeatedly.

So, I figured that some auto-int other than 1 was interfering with my 
program. I therefore tried this:

void _main(void)
{
	OSSetSR(0x0700);						

		while (!(_rowread(0xFFBF) & 0x01)) {
		}
	
	OSSetSR(0x0000);
}

This will work as expected, but since I have disable all auto-ints, I 
can't use grayscale.

Can anybody help me out with a practicable solution? All the games that 
are out there and use grayscale prove that this must be possible somehow.

By the way, I use TI-GCC 0.9 and TI-GCC library 2.31, so the "volatile" 
problem should not be affecting my program. I'm testing it on a 
brand-new HW2 TI-89 with AMS 2.05.

Thanks in advance for any help,

Bartosz Fabianowski