Retroarch and Arcade Controls for games that want analog inputs (e.g. mupen64)

Hell,

I finally managed to setup my arcade controls for a RPI with RetroPie and an ipac2 keyboard encoder. I have a setup with 2 8-way joysticks and 6 buttons each. All emulators work as they should - apart from these that want analog inputs, like e.g. mupen64 for emulation of a Nintendo64.

My question is: Is there a way to abuse the digital 8 way joystick and fake it to be an analog joystick? Of course it won’t then send analog values from 0-127, but always 0 or 127, but for many games this should be ok, not perfect but ok.

So again: I don’t want to use a gamepad with an analog joystick but use a digital stick and “emulate” an analog with this one.

Thank you!