TF CD32 Riser Revision 2 Design Complete

TF CD32 Riser

Moderators: terriblefire, Terriblefire Moderator

User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

And mouse is working now :) (can't add movie to show)

Sort off... still gliches on overflow as I have X and Y in 16bit int, need to guard it better (I have done it for Atari ST I think, so will grab it from there)

EDIT
...ST takes uses 2x 16bit ... I need to have a look at SmallyMouse2
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
terriblefire
Moderator Team
Moderator Team
Posts: 5389
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: TF CD32 Riser Revision 2 Design Complete

Post by terriblefire »

Those two 8 bit registers are signed registers that the chipset adds offsets obtained from the mouse to (I think).

Well done on the reading. I had a feeling this whole exchange between the CPLD and the ARM would be trickly to get right.

In other news the new revision is built by JLCPCB and should ship today.

EDIT: my code example had working mouse x y with the spi path.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

Mouse issue was caused by too high mouse DPI, simply by dividing X/Y by 2 makes it nicely usable.

This change fixed one thing and broke another one.
Writes do not work correctly any more, anyway it was needed only for setting RTC (and rtc detection)... will fix it later.

Next mouse button clicks and joypad support.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
terriblefire
Moderator Team
Moderator Team
Posts: 5389
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: TF CD32 Riser Revision 2 Design Complete

Post by terriblefire »

excellent.

One thing we will need to do eventually is only take over a function if the device is plugged in... e.g. only PUNT for mouse access if mouse is plugged in. Similarly for joypads.. should be just a case of using 2 x INTSIG for this.

Keyboard pins should probably also go tristate when a keyboard is not plugged in.

Can be done last though.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

joypad, left mouse button and fire now is working...
RTC write issues solved. Still need to learn how rtc do wake up from battery supply.

right and middle buttons to go...
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
terriblefire
Moderator Team
Moderator Team
Posts: 5389
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: TF CD32 Riser Revision 2 Design Complete

Post by terriblefire »

arkadiusz.makarenko wrote: Wed Oct 21, 2020 10:42 pm joypad, left mouse button and fire now is working...
RTC write issues solved. Still need to learn how rtc do wake up from battery supply.

right and middle buttons to go...
Sweet. I really need to try this.
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

Why nothing can be easy like toggling a bit on register? :D

When I only override POTGOR and flip bits on presses Amiga and Diagrom on boot still thinks that right button is clicked.
When eventually I manage to boot to workbench right click feels sticky, but ATK I can see that those tests are working as expected.

When I run tests in Diagrom I can see that except bits in POTGOR - POT0DAT POT1DAT counters are incrementing on button clicks, so I guess I need to replicate this and see what will happen.

Edit:
Or I will try to use POTGO address first. <- No....
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

Got it working on normal Workbench and I have normal OS start with ability to get to Boot screen etc. Everything seems to be fine. Unfortunately diagrom doesn't start on boot screen - goes to pink'ish screen.
There might be some more meaningful output via serial, but can't connect it to check why it is complaining. I have the same issue when I connect Amiga/Atari mouse to the port 1.

Edit.
ARM is messing with boot somehow. It must be one of GPIO setups of one of pins.

Edit2:
...and changing PushPull to Open drain on Fire1 and Fire0 pins solved boot issue.

Need to tidy up the code and will push it to github.

Todo
1.Add enable/disable
2.Debug and add init/deinit section to usb middleware
3. Optimize it, especially interrupt routines.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
terriblefire
Moderator Team
Moderator Team
Posts: 5389
Joined: Mon Aug 28, 2017 10:56 pm
Location: Glasgow, UK

Re: TF CD32 Riser Revision 2 Design Complete

Post by terriblefire »

Dont forget CD32 joypad buttons :)
———
"It is not necessarily a supply voltage at no load, but the amount of current it can provide when touched that
indicates how much hurting you shall receive."
User avatar
arkadiusz.makarenko
Moderator Team
Moderator Team
Posts: 1208
Joined: Wed Jun 19, 2019 7:36 am
Location: Edinburgh

Re: TF CD32 Riser Revision 2 Design Complete

Post by arkadiusz.makarenko »

terriblefire wrote: Thu Oct 22, 2020 7:46 pm Dont forget CD32 joypad buttons :)
...yes... can we move it to phase 2 ? :D

I don't even know how to test it now.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
Post Reply

Return to “TF CD32 Riser”