Steady wrote:
I had a quick play and think I've found the source of your problem. It is basically as Karlos pointed out earlier. Casting is your problem.
amiga.lib's CreateExtIO function is expecting to return an IORequest pointer. You are expecting an IOStdReq pointer.
exec.library's OpenDevice function is causing the same problem for you, but in reverse. You should cast as follows assuming your variables are still defined in the same way:
if(!(GameMP=CreatePort("RKM_game_port",0)))
cleanexit();
if(!(GameIO=(struct IOStdReq *)CreateExtIO(GameMP,sizeof(struct IOStdReq))))
cleanexit();
if(error=OpenDevice("gameport.device",1,(struct IORequest *)GameIO,0))
cleanexit();
Hope that helps.
ok, thanks steady! after much #### ing around, i just ripped my code out stuck yours in, and it worked
but now i have another problem, which is the same thing i had a year ago when i was trying to use "keyboard.device"
it opens ok, but when it finaly flushes and closes the thing, the whole machine crashes, ive tried to use storms debug modes, but the machine will only crash
ill try to get the code here soon if that will help, but its basically whats found in the ARKRMs, except with the extra casting stuck in
:-)
last time with the keyboard stuff, i just commented-out the device close bits and exited the program without any of that clean up!! :-o
but this time i want to do things properly of course