View Single Post
Old 22 February 2017, 12:08   #21
clebin
Registered User
 
clebin's Avatar
 
Join Date: Apr 2012
Location: Cardiff
Posts: 405
After a 1-year hiatus which started with the birth of my daughter, I'm getting back into Amiga programming again.

I have a newbie question:

What's the best way to take over the Amiga keyboard in C? In GameSmith's examples, they have this nasty looking code:

Code:
// BAD PRACTICE ALERT! ptr to hardware keyboard reg
unsigned char *keybrd=(unsigned char *)0xbfec01;
unsigned char key;
.
.
.
key = *keybrd;

// escape key pressed
if( key == 0x75 ) return(1);
It appears that some key-strokes are still sent to the Shell when the game runs, which is not ideal.

So what's the correct way?
clebin is offline  
 
Page generated in 0.05106 seconds with 11 queries