Page 1 of 1

Keyboard input problem

Posted: Tue Aug 22, 2023 1:26 pm
by flimbo72
Hello everyone.

I'm writing a program in assembly that requires recurrent inputs from the keyboard.
Having no idea of how to manage that directly, I used the GETIN function from the kernal and everything worked pretty well, so far.

But now I need to switch the IRQ trigger to a certain screen line, so I added this to my code:

Code: Select all

	; Make VERA generate IRQs at line 447

	LDA #$82
	STA $9F26	; IEN
	LDA #$BF
	STA $9F28	; IRQline
Result: GETIN doesn't work anymore.
No keyboard input seems to be considered.

Any idea of what's going on?
Is GETIN tied to VSYNC (line zero) IRQ trigger? If so, I wonder why...
I also tried to load IEN with $83 (which activates VSYNC IRQ as well), but nothing changes.
I'm puzzled. :? :cry:

Thanks for your help,
Giacomo

Re: Keyboard input problem

Posted: Tue Aug 22, 2023 8:34 pm
by DragWx
Did you replace the IRQ handler with your own? If you did, you must make sure to call kbd_scan (FF9F) at least once before calling getin.