I found the aperture values in memory and updated the lens.h file with the correct values (to what I know, read below).
They seemed to match up almost perfectly with the 550d's lens.h values, except for (from what I could test with my lens):
f/4.5 - The 550d's value for this is 44, but the 500d's is 43 (confirmed with memspy on my camera).
f/13 - The 550d's value is 68, but the 500d's is 67 (confirmed again with memspy).
My lens (sigma 30mm f/1.4) only goes up to f/16, so I can't test any other values at the moment. I added a 0 value so that in the event the camera registers that a lens isn't attached (using some extension tubes, for example), the ML menu will read f/0 instead of f/1.0.
Also I matched up the lens.h aperture values to match the 550d's values (to cover all possible aperture situations), but commented out the aperture values I couldn't test (values my lenses can't do). The usable aperture range in lens.h is now:
f/0
f/1.4
f/1.6
f/1.8
f/2.0
f/2.2
f/2.5
f/2.8
f/3.2
f/3.5
f/4.0
f/4.5
f/5.0
f/5.6
f/6.3
f/7.1
f/8.0
f/9.0
f/10
f/11
f/13
f/14
f/16
f/18
f/20
f/22
f/25
f/29
f/32
f/36
The apertures which still need values (to complete the aperture values the 550d lens.h has) are:
f/1.2
f/1.3
f/6.7
f/9.5
f/19
f/27
f/38
f/40
f/45
There was sort of a pattern I noticed for the aperture value's, but I'm tempted to just fill them in because of the discrepancies with the two aperture values I found between the 550d and the 500d (that means there could be more, can't guarantee). I'll test with my kit lens tonight and hopefully have the values for f/32 (I think it goes up to f/36, we'll see).
couple things i'm not sure about:- what happens if someone uses a lens that can't do f/1.4 and try to decrement the aperture setting to it (will ML even let this happen?)
- same case but when someone increments it.
- in movie mode, ML now reports the aperture as 0x00 in the bottom left corner, and 0.0 in the menu (i think it said like f/1.2 before? maybe this could lead to progress in video aperture control? I think the camera acts like the lens isn't attached, maybe some way to bypass this?)
tl;dr
fixed aperture values so now you can select almost the full range of apertures from the menu, and trying to increment the setting higher than you can set in the camera won't cause everything to lock up. Also it will register f/0.0 now if the lens isn't attached instead of saying f/1.2.
UPDATEsee this post for the updated autoexec.bin and lens.h files:http://chdk.setepontos.com/index.php?topic=5971.msg62240#msg62240