You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
TF CD32 Riser Revision 2 Design Complete
Moderators: terriblefire, Terriblefire Moderator
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
I have added list todo in github under issues.
I think project is mature and I start to forget what is still broken.
https://github.com/arkadiuszmakarenko/T ... 722/issues
I think project is mature and I start to forget what is still broken.
https://github.com/arkadiuszmakarenko/T ... 722/issues
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
terriblefire
- Admin sponsor

- Posts: 5685
- Joined: 28 Aug 2017 22:56
- Location: Glasgow, UK
Re: TF CD32 Riser Revision 2 Design Complete
The CD32 buttons are basically captured into a latch on the controller and then shifted out on a bit in the CIAs. This is what @Daedalus once sent me on the subject.arkadiusz.makarenko wrote: 22 Oct 2020 20:14...yes... can we move it to phase 2 ? :D
I don't even know how to test it now.
Code: Select all
; Read direction
If port=1
bytes.w=Peek.w($DFF00C)
Else
bytes.w=Peek.w($DFF00A)
End If
bit9.w=bytes&%0000001000000000
bit8.w=bytes&%0000000100000000
bit1.w=bytes&%0000000000000010
bit0.w=bytes&%0000000000000001
result = result | (((bit9 LSR 1) EOR bit8) LSR 8) ; Up
result = result | (bit1 LSL 2) ; Right
result = result | (bit1 EOR (bit0 LSL 1)) ; Down
result = result | (bit9 LSR 7)
function Return result
; Read CD32 Buttons
If port=1
potgoon.w =%0010000000000000
potgooff.w=%0011000000000000
firepin.b=%10000000
serbit.w=14
Else
potgoon.w =%0000001000000000
potgooff.w=%0000001100000000
firepin.b=%01000000
serbit.w=10
End If
Poke.b $BFE201,(Peek.b($BFE201)|firepin) ; Joystick fire to output
Poke.b $BFE001,(Peek.b($BFE001) & NOT firepin) ; Output low
savepotgo.w=Peek.w($DFF016)
Poke.w $DFF034,potgoon
ef.b=False
For i.w=1 To 5 ; Delay, 5 chipset word reads
mybytes.w=Peek.w($DFF016)
Next i
If port=1
For i.w=14 To 6 Step -1
Poke.b $BFE001,(Peek.b($BFE001)|firepin) ; Output high
bytes.w=Peek.w($DFF016)
Poke.b $BFE001,(Peek.b($BFE001) & NOT firepin) ; %01111111) ; Output low
result=result | ((bytes & (1 LSL 14)) LSR i) ; %0100000000000000
Next i
Else ; Port 0
For i.w=10 To 2 Step -1
Poke.b $BFE001,(Peek.b($BFE001)|firepin) ; Output high
bytes.w=Peek.w($DFF016)
Poke.b $BFE001,(Peek.b($BFE001) & NOT firepin) ; %01111111) ; Output low
result=result | ((bytes & (1 LSL 10)) LSR i) ; %0100000000000000
Next i
End If
Poke.w $DFF034,potgooff
Poke.b $BFE001,(Peek.b($BFE001)|firepin) ; Output high
Poke.b $BFE201,(Peek.b($BFE201) & NOT firepin) ; Joystick fire to input
Poke.w $DFF034,savepotgo
———
"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."
"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."
-
terriblefire
- Admin sponsor

- Posts: 5685
- Joined: 28 Aug 2017 22:56
- Location: Glasgow, UK
Re: TF CD32 Riser Revision 2 Design Complete
From http://gerdkautzmann.de/cd32gamepad/cd32gamepad.html
CD32 Gamepad A100 re-engineered documentation
This documentation about the game controll for the Amiga CD32, ist given like it is. There is now warranty about completeness, use it at your own risk.
Commodore, Amiga, CD32 and maybe even Gamepad are registered Trademarks of any company that owns them in the moment.
The CD32 Gamepad is one of the worst controll devices I ever saw. When playing CD32 game I usually gets into troubles cause the left handed joystick replacement thing turns around and stops to work.
There is a good CD32 Gamepad replacement available from CompetitionPro but it has the same disadvantage like any other Gamepads:
They are all designed for left-handers !
Cause I am a right-handed person, I would prefer to controll the movement of a game character or spaceship with my right hand. Pressing the fire button does not need much accuracy, it could be done by the left hand.
I decided to find out, if a normal joystick could be transformed into a CD32 compatible joystick with all its extra buttons. Unfortunately there was not any documentation about the CD32 Gamepad available and re-engineeering turned out to be more difficult than expected.
During a discussion on www.amiga-news.de Jens Schönfeld gave me a hand drawn schematic and told me some details about the CD32 Gamepad. He had done some re-engineering to make his new Catweazle MK4 (www.ami.ga ) more CD32 compatible for emulators like UAE.
Here is the documentation I have made out of all this information.There ar different CD32 Gampad out there, they have some minor changes, to suppress spikes or wrong signals. The Schematic is still missing some capazitators, but it should work the way it is drawn.
Pictures
Click on a picture for a detailed view Functions
There are 2 different function modes, the joystick direction switches are used in both modes like in every Amiga compatible joystick.
Joystick Mode (default)
Pot-X (P5) is set to 1 by the CD32, this will set the shift register always to load, the clock will be ignored and the first bit (blue button) is switched to POT-Y (P9).
POT-X also switches the driver in 74LS125 so the red Button will be conducted to (P6) Joystick Fire. The Gamepad acts like a normal joystick.
Gamepad Mode
Pot-X (P5) is set to 0 by the CD32, this will switch the driver in 74LS125 to high imepdance an the signal from the fire button will not be switched to to fire (P6) any more.
With every rising edge on (P6) the state of the Gamepad buttons will be shifted from the inputs of the shift register over the 74LS125 driver to Pot-Y (P9). As long as shift/load on the shift register is switched to shift it will shift out the state of the buttons that where loaded before.
What is Missing ?
Some capazitators are missing in the schematic, every chip should have a blocking capazitator.
I have still not checked evrything.
CD32 Gamepad A100 re-engineered documentation
This documentation about the game controll for the Amiga CD32, ist given like it is. There is now warranty about completeness, use it at your own risk.
Commodore, Amiga, CD32 and maybe even Gamepad are registered Trademarks of any company that owns them in the moment.
The CD32 Gamepad is one of the worst controll devices I ever saw. When playing CD32 game I usually gets into troubles cause the left handed joystick replacement thing turns around and stops to work.
There is a good CD32 Gamepad replacement available from CompetitionPro but it has the same disadvantage like any other Gamepads:
They are all designed for left-handers !
Cause I am a right-handed person, I would prefer to controll the movement of a game character or spaceship with my right hand. Pressing the fire button does not need much accuracy, it could be done by the left hand.
I decided to find out, if a normal joystick could be transformed into a CD32 compatible joystick with all its extra buttons. Unfortunately there was not any documentation about the CD32 Gamepad available and re-engineeering turned out to be more difficult than expected.
During a discussion on www.amiga-news.de Jens Schönfeld gave me a hand drawn schematic and told me some details about the CD32 Gamepad. He had done some re-engineering to make his new Catweazle MK4 (www.ami.ga ) more CD32 compatible for emulators like UAE.
Here is the documentation I have made out of all this information.There ar different CD32 Gampad out there, they have some minor changes, to suppress spikes or wrong signals. The Schematic is still missing some capazitators, but it should work the way it is drawn.
Pictures
Click on a picture for a detailed view Functions
There are 2 different function modes, the joystick direction switches are used in both modes like in every Amiga compatible joystick.
Joystick Mode (default)
Pot-X (P5) is set to 1 by the CD32, this will set the shift register always to load, the clock will be ignored and the first bit (blue button) is switched to POT-Y (P9).
POT-X also switches the driver in 74LS125 so the red Button will be conducted to (P6) Joystick Fire. The Gamepad acts like a normal joystick.
Gamepad Mode
Pot-X (P5) is set to 0 by the CD32, this will switch the driver in 74LS125 to high imepdance an the signal from the fire button will not be switched to to fire (P6) any more.
With every rising edge on (P6) the state of the Gamepad buttons will be shifted from the inputs of the shift register over the 74LS125 driver to Pot-Y (P9). As long as shift/load on the shift register is switched to shift it will shift out the state of the buttons that where loaded before.
What is Missing ?
Some capazitators are missing in the schematic, every chip should have a blocking capazitator.
I have still not checked evrything.
You do not have the required permissions to view the files attached to this post.
———
"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."
"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."
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
Found my CD32 controller! I knew that I had it somwhere. Those are getting expensive these days!
Now I can see how extra buttons are behaving.
Only in Joystick mode. Gamepad mode need to be enabled.
Red button = fire
Blue button = right click
So
1. I need to detect either joystick or gamepad mode.
2. In gamepad mode populate POTxDAT with 7 button values
3. In joystick mode just leave it as above.
Now I can see how extra buttons are behaving.
Only in Joystick mode. Gamepad mode need to be enabled.
Red button = fire
Blue button = right click
So
1. I need to detect either joystick or gamepad mode.
2. In gamepad mode populate POTxDAT with 7 button values
3. In joystick mode just leave it as above.
You do not have the required permissions to view the files attached to this post.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
Implemented - USB Gamepad button decode - limit only of 4 buttons enhancement . Now I can read all standard buttons from HID device.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
I can see that Turrican has own way of reading joystick directions. I guess I will need to mimic functionality of those chips a little bit better than only copying observed output values.
I will need to implement writing to registers anyway for detection of joystick/gamepad, and POTXDAT anyway.
I will need to implement writing to registers anyway for detection of joystick/gamepad, and POTXDAT anyway.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
terriblefire
- Admin sponsor

- Posts: 5685
- Joined: 28 Aug 2017 22:56
- Location: Glasgow, UK
Re: TF CD32 Riser Revision 2 Design Complete
One thing i keep meaning to ask is how do you program the STM32 so that it retains the data after a reboot. I seem to always need to flash after power on from CubeIDE. Maybe start a new thread for that.arkadiusz.makarenko wrote: 23 Oct 2020 18:17 I can see that Turrican has own way of reading joystick directions. I guess I will need to mimic functionality of those chips a little bit better than only copying observed output values.
I will need to implement writing to registers anyway for detection of joystick/gamepad, and POTXDAT anyway.
———
"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."
"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."
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
It should be written to flash on stm32 via cubeIDE. Most liekly stm32 simply doesn't boot at start.terriblefire wrote: 23 Oct 2020 21:52One thing i keep meaning to ask is how do you program the STM32 so that it retains the data after a reboot. I seem to always need to flash after power on from CubeIDE. Maybe start a new thread for that.arkadiusz.makarenko wrote: 23 Oct 2020 18:17 I can see that Turrican has own way of reading joystick directions. I guess I will need to mimic functionality of those chips a little bit better than only copying observed output values.
I will need to implement writing to registers anyway for detection of joystick/gamepad, and POTXDAT anyway.
Try to set jumper like this. If this doesn't help in STM32 Link Utility set up address 0x08000000 (default). This is flash address, and erase chip, and write from there.
You do not have the required permissions to view the files attached to this post.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
arkadiusz.makarenko
- Moderator Team

- Posts: 1368
- Joined: 19 Jun 2019 07:36
- Location: Edinburgh
Re: TF CD32 Riser Revision 2 Design Complete
Turrican 2 issue solved. Do they do some math one whole byte? When I set only first two bits all is good.
Do not trust people. They are capable of greatness.
~ Stanislaw Lem
~ Stanislaw Lem
-
terriblefire
- Admin sponsor

- Posts: 5685
- Joined: 28 Aug 2017 22:56
- Location: Glasgow, UK
Re: TF CD32 Riser Revision 2 Design Complete
Sweet I’ll try that
———
"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."
"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."
Who is online
Users browsing this forum: CCBot and 11 guests