@picogame So, while the utility was running, were you moving the joystick, pressing buttons etc? And while you did, was the screen changing?
The idea is to make sure that the system responds with some indication on-screen that you are manipulating the joystick. If it does, that means AdvanceMAME is capable of seeing the inputs, and the joystick number shown on-screen that is changing obviously corresponds to the joystick you are manipulating.
This is something I don't need to do with arcade controls, so someone else might chime in here who has done it--but with the above results, you should then be able to use/edit the index number for a device in the advmame.rc file. For example, you might verify or add the line device_joystick_0 raw and perhaps device_joystick_1 rawto the .rc file. Or, instead of "raw" you could try using the "event" driver which may be more appropriate. You can read about drivers in the dev documentation for advmame. My thought is that once the device is properly defined, you should be able to press TAB on a keyboard while in a game, and navigate through the menus to map keys for all games or specific games using the joystick to map buttons etc. A successful test using advj proves that advMAME can see the device, so this is just an exercise to expose it so you can map inputs.
Of course, you could map all inputs manually by editing the .rc file using details here, but that would be extremely tedious.