IKBD queries
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
IKBD queries
Howdy folks,
For undisclosed reasons I've been implementing an IKBD-equivalent of sorts. There be dragons.
Questions:
- When exactly would/should joystick 0 generate events? I turn off mouse events. I enable joystick events. It doesn't generate joystick 0 events.
- Mouse button action (command 0x07) mode 0x04 should, as I read the documentation, generate make/break key codes (0x74 and 075) when mouse keys are pressed. I've tested this on Hatari but it doesn't happen. I do Ikbdws(str, 1), where str is {0x07, 0x04}.
- Joystick 1 doesn't report fire button events. I know this signal is shared with the right mouse button, but shouldn't it be reflected in the joystick packet too?
- Absolute mouse reports are only generated if asked for it in one way or another (either explicitly or using mouse button action modes 0x01-0x03). It will never do so solely on mouse movement. Did I get this right?
Cheers!
For undisclosed reasons I've been implementing an IKBD-equivalent of sorts. There be dragons.
Questions:
- When exactly would/should joystick 0 generate events? I turn off mouse events. I enable joystick events. It doesn't generate joystick 0 events.
- Mouse button action (command 0x07) mode 0x04 should, as I read the documentation, generate make/break key codes (0x74 and 075) when mouse keys are pressed. I've tested this on Hatari but it doesn't happen. I do Ikbdws(str, 1), where str is {0x07, 0x04}.
- Joystick 1 doesn't report fire button events. I know this signal is shared with the right mouse button, but shouldn't it be reflected in the joystick packet too?
- Absolute mouse reports are only generated if asked for it in one way or another (either explicitly or using mouse button action modes 0x01-0x03). It will never do so solely on mouse movement. Did I get this right?
Cheers!
Ain't no space like PeP-space.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2841
- Joined: Sun Jul 31, 2011 1:11 pm
Re: IKBD queries
No need to tell, but I'm guessing you're sharpening your vampire stakes...
In the Punssi game: http://eerott.mbnet.fi/hatari/programs.shtml#punssi
I start joystick tracking with:
Code: Select all
/* Install new joystick packet handler into keyboard vector table.
* Turn mouse off and tell IKBD to send joystick packets.
*/
table_addr = Kbdvbase();
key_handler = table_addr->ikbdsys; /* earlier handler: ->joyvec */
table_addr->ikbdsys = KeyISR;
Ikbdws(1, "\022\024");
Code: Select all
table_addr = Kbdvbase();
table_addr->ikbdsys = key_handler; /* earlier handler: ->joyvec */
Ikbdws(1, "\025\010");
Note that Hatari does not emulate IKBD processor. There's old work-in-progress IKBD emulation code in Hatari sources, but it's never been used. Hatari just emulates mouse and joystick and maps specific IKBD programs to specific actions case-by-case.
Works fine for me with Punssi. Or did you mean mean when also mouse is enabled?
Re: IKBD queries
As far as I know, STeEM fully emulates IKBD, and you should be able to find IKBD source code in its repositories.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 2841
- Joined: Sun Jul 31, 2011 1:11 pm
Re: IKBD queries
While Hatari does not do real IKBD *processor* emulation, there are NO known cases (demos or otherwise) where that would be a problem. But, if one wants to try programming IKBD, instead of just using it, that's something to keep in mind.
Re: IKBD queries
Are you sure? I don't remember seeing the IKBD source in Steem archive. Steem doesn't need the source to be able to fully emulate the IKBD, the same that it doesn't need TOS sources. Only binaries are required.
But yes, Steem SSE has a full IKBD processor emulator. Could be very useful for the OP purposes.
Fx Cast: Atari St cycle accurate fpga core
Re: IKBD queries
I think I'm exploring some of the more exotic features of this thing, so I'd better check some more sources (ideally a real machine).
Ain't no space like PeP-space.
Re: IKBD queries
Yeah, I was thinking about Steem SSE. Yet original Steem also had some kind of IKBD emulation:
https://github.com/steem-engine/steem-e ... e/ikbd.cpp
Steem SSE:
https://sourceforge.net/p/steemsse/code ... m/ikbd.cpp
You'll also find some documents in:
https://sourceforge.net/p/steemsse/code ... steem/doc/
https://github.com/steem-engine/steem-e ... e/ikbd.cpp
Steem SSE:
https://sourceforge.net/p/steemsse/code ... m/ikbd.cpp
You'll also find some documents in:
https://sourceforge.net/p/steemsse/code ... steem/doc/
Re: IKBD queries
This is not the IKBD source. It is the source for the old, non-full (same level as Hatari and old Steem), IKBD emulation.tzok wrote: ↑Tue Sep 13, 2022 11:07 am Steem SSE:
https://sourceforge.net/p/steemsse/code ... m/ikbd.cpp
Fx Cast: Atari St cycle accurate fpga core
Re: IKBD queries
Well, the exotic features are mostly related to custom code upload. I assume you are not going to support that, or I am wrong?
Fx Cast: Atari St cycle accurate fpga core
Re: IKBD queries
Nah, won't support that. The most "exotic" thing I do is "mouse button action" = 0x04, really. I haven't found any code that actually use this. I've seen code that uses the other button modes, but not that one.
Ain't no space like PeP-space.
Re: IKBD queries
I'm not sure, but it states:ijor wrote: ↑Tue Sep 13, 2022 12:30 pmThis is not the IKBD source. It is the source for the old, non-full (same level as Hatari and old Steem), IKBD emulation.tzok wrote: ↑Tue Sep 13, 2022 11:07 am Steem SSE:
https://sourceforge.net/p/steemsse/code ... m/ikbd.cpp
So it contains an interface for this:This file contains a high-level emulation (not OPTION_C1) as well as an
interface for the low-level emulation (OPTION_C1)
https://sourceforge.net/p/steemsse/code ... arty/6301/
Re: IKBD queries
Yes, but, again, that is not the IKBD source. The IKBD source should be an assembler 6301 source file.tzok wrote: ↑Tue Sep 13, 2022 2:23 pm I'm not sure, but it states:
...
So it contains an interface for this:
https://sourceforge.net/p/steemsse/code ... arty/6301/
Fx Cast: Atari St cycle accurate fpga core
-
- Fuji Shaped Bastard
- Posts: 2372
- Joined: Sun Aug 03, 2014 5:54 pm
Re: IKBD queries
That is also there: https://sourceforge.net/p/steemsse/code ... mented.txt
Re: IKBD queries
Ah, nice. Steve did a good job reversing this file. It is not really the "original" source, which sadly seems to be lost, but it is still very useful.ThorstenOtto wrote: ↑Tue Sep 13, 2022 3:14 pm That is also there: https://sourceforge.net/p/steemsse/code ... mented.txt
Fx Cast: Atari St cycle accurate fpga core
Re: IKBD queries
In the german magazin ST-Computer 3/1990, 4/1990 and 5/1990 was some article about the 6301. Here is also a listing from the rom with many german comments.ThorstenOtto wrote: ↑Tue Sep 13, 2022 3:14 pm That is also there: https://sourceforge.net/p/steemsse/code ... mented.txt
You do not have the required permissions to view the files attached to this post.
Re: IKBD queries
Thanks guys! I was reading the disassembled code before - but I didn't have the commented versions (helps a lot, I'm definitely not fluent in 6301).
Ain't no space like PeP-space.
Re: IKBD queries
Even if you do are fluent with 6301, it is still not easy because the IKBD code is mostly event based, not linear. Best way to follow the code is with a debugger. I don't know if this has been changed recently, but Steem has (or had) only limited 6301 debugging support (no breakpoints or tracing). May be this was improved in later versions?
Fx Cast: Atari St cycle accurate fpga core
Re: IKBD queries
I'll loose my mind tracing this code I think. I had a peek at the Eiffel sources instead, since that's a somewhat proven solution. I've interpreted the docs the same way they did, so I guess my last resort will have to test things on Steam or a real machine.
Ain't no space like PeP-space.