Page 16 of 19

Re: TF Riser Revision 0 Arrives

Posted: 14 Mar 2020 14:44
by terriblefire
However looks like the composite device is working ... well done.

Re: TF Riser Revision 0 Arrives

Posted: 14 Mar 2020 17:17
by terriblefire
OK if i was a betting man i'd say the CPLD isnt getting the mouse data at this point.

Re: TF Riser Revision 0 Arrives

Posted: 14 Mar 2020 19:26
by arkadiusz.makarenko
terriblefire wrote: 14 Mar 2020 14:33 Ok no crashes but the mouse delta types are all screwed up from what i originally posted.

Mouse datacomes from the mouse as an unsigned byte which needs to be cast to a signed byte (128-255) -ve, (0-127) +ive...

this needs to be accumulated in the buffer as a signed 16 bit because you can get multiple mouse events per transmission to the amiga.

You accumulate this in a further layer to emulate joy0dat and joy1dat.

You are sending the raw joy0dat and joy1dats to the CPLD. its dumb and doesnt have the gates to do math.

Ok. That was a bug in casting int16_t to uint8_t.

Now it is returning values in ranges -128-127
But code at this point with populating mouse_delta is just looking at only left mouse button.

I will try to investigate if mouse data is leaving chip at all.

Re: TF Riser Revision 0 Arrives

Posted: 14 Mar 2020 20:01
by terriblefire
The CPLD is definitely not getting data for the mouse

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 11:34
by arkadiusz.makarenko
terriblefire wrote: 14 Mar 2020 20:01 The CPLD is definitely not getting data for the mouse
I can see that we do use SPI mouse and Keboard data as driven manually by writing directly using GPIO.
Maybe it is messing some registers at some point which are required for SPI?

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 11:54
by terriblefire
Erm it’s a bit of a kludge at the moment. I think using the keyboard method to transmit the mouse data is maybe the way forward. I’ll sort this bit out.

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 12:44
by arkadiusz.makarenko
terriblefire wrote: 15 Mar 2020 11:54 Erm it’s a bit of a kludge at the moment. I think using the keyboard method to transmit the mouse data is maybe the way forward. I’ll sort this bit out.
I pushed bugfix re mouse readings to my repository. It is just change to two lines of code.

I will try to extend gamepad support then. At this moment it works only for standard HID PC gamepads. Will try extend it to Xbox360, ps2/3/4 gamepad as well, as they are most common (I think)

I will skip hub support for now, I dont think we have enough ram for this on f105.

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 13:38
by terriblefire
Tbh I’m going to swap my ARM for a bigger chip and make some changes to how keyboard works.

I think i have enough info to make a rev1 now

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 14:43
by arkadiusz.makarenko
terriblefire wrote: 15 Mar 2020 13:38 Tbh I’m going to swap my ARM for a bigger chip and make some changes to how keyboard works.

I think i have enough info to make a rev1 now
Which chip do you have in mind?

Re: TF Riser Revision 0 Arrives

Posted: 15 Mar 2020 15:12
by terriblefire
The 4xx dual USB one you’ve been using