Components of computer USB peripheral

I have a game controller. This controller have USB cable and when connected it is instantly recognized by the computer. I wanted to know what it made of so I opened the case and found “STM32F103C8T6” chip. I googled and found this datasheet kynix.com/uploadfiles/pdf8827/STM32F103C8T6.pdf from kynix

At first I thought inside must have a kind of stock “joystick chip” or something but this is actually a general purpose computer. (Probably with custom program loaded in it?) So the ability to interface with computer depends solely on the program loaded in this MCU?
Does other computer gadgets (Mouse, Keyboard, MIDI controller, etc.) all have this kind of computer inside?
If I wanted to produce a computer goods too, where should I begin to get the complete circuit board in the end? The chip looks like it is not removable from the board and the connection around it is very small. I guess it have to be assembled by precision automatic machine from factory only. (Not the one you can buy separately and assemble like ATMEGA on Arduino. That one is much bigger and you can actually count all the pins with your eye)
How can the maker (who? factory?) program into it in the first place?
I found several “discovery board” that have this chip and also USB port so you can program into them. So does it means I can also program back into this STM chip on my game controller? Because after all I am using a USB connection to use the controller, and this USB connects to the MCU. I think this same USB should be able to do “using” and “programming”.

Dude this is kind of a question for a electrical/PCB Manufacturing forum. What could you possibly want to program your controller to do via USB? As long as it’s recognized and working it’s fine. You should look up a Popular Science message board or something. Just my humble lowly opinion though…lol.

The questions are pretty valid…

i hope someone has re-programmed this stuff before, it would be awesome to re-use older joypad boards with x-input support or whatever :slight_smile:

Its probability easier to use existing off the shelf parts that can easily be Flash with some programming than to have custom chips made.

The “STM32F103C8T6” chip just happens to hit all the check boxes for people who want to manufacturer their own controllers.