View Single Post
Old 16 March 2015, 15:28   #133
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Slightly simplified version of the AdIDE decode function...
Code:
uae_u16 adide_decode_word(uae_u16 w)
{
    uae_u16 o = 0;
    for (uae_u8 i = 0; i < 8; i++) {
        o |= (w & 1<<i) << i+1;           // bit n -> bit 2n+1 for n=0..7
        o |= (w>>i+8 & 1) << 14-2*i;      // bit n -> bit 30-2n for n=8..15
    }
    return o;
}
mark_k is offline  
 
Page generated in 0.08952 seconds with 9 queries