| 142 | }; |
| 143 | |
| 144 | void writeVarInfo(KThread* thread, U32 address, struct fb_var_screeninfo* info) { |
| 145 | thread->memory->writed(address, info->xres); address+=4; |
| 146 | thread->memory->writed(address, info->yres); address+=4; |
| 147 | thread->memory->writed(address, info->xres_virtual); address+=4; |
| 148 | thread->memory->writed(address, info->yres_virtual); address+=4; |
| 149 | thread->memory->writed(address, info->xoffset); address+=4; |
| 150 | thread->memory->writed(address, info->yoffset); address+=4; |
| 151 | |
| 152 | thread->memory->writed(address, info->bits_per_pixel); address+=4; |
| 153 | thread->memory->writed(address, info->grayscale); address+=4; |
| 154 | |
| 155 | thread->memory->writed(address, info->red.offset); address+=4; |
| 156 | thread->memory->writed(address, info->red.length); address+=4; |
| 157 | thread->memory->writed(address, info->red.msb_right); address+=4; |
| 158 | |
| 159 | thread->memory->writed(address, info->green.offset); address+=4; |
| 160 | thread->memory->writed(address, info->green.length); address+=4; |
| 161 | thread->memory->writed(address, info->green.msb_right); address+=4; |
| 162 | |
| 163 | thread->memory->writed(address, info->blue.offset); address+=4; |
| 164 | thread->memory->writed(address, info->blue.length); address+=4; |
| 165 | thread->memory->writed(address, info->blue.msb_right); address+=4; |
| 166 | |
| 167 | thread->memory->writed(address, info->transp.offset); address+=4; |
| 168 | thread->memory->writed(address, info->transp.length); address+=4; |
| 169 | thread->memory->writed(address, info->transp.msb_right); address+=4; |
| 170 | |
| 171 | thread->memory->writed(address, info->nonstd); address+=4; |
| 172 | thread->memory->writed(address, info->activate); address+=4; |
| 173 | thread->memory->writed(address, info->height); address+=4; |
| 174 | thread->memory->writed(address, info->width); address+=4; |
| 175 | thread->memory->writed(address, info->accel_flags); address+=4; |
| 176 | |
| 177 | thread->memory->writed(address, info->pixclock); address+=4; |
| 178 | thread->memory->writed(address, info->left_margin); address+=4; |
| 179 | thread->memory->writed(address, info->right_margin); address+=4; |
| 180 | thread->memory->writed(address, info->upper_margin); address+=4; |
| 181 | thread->memory->writed(address, info->lower_margin); address+=4; |
| 182 | thread->memory->writed(address, info->hsync_len); address+=4; |
| 183 | thread->memory->writed(address, info->vsync_len); address+=4; |
| 184 | thread->memory->writed(address, info->sync); address+=4; |
| 185 | thread->memory->writed(address, info->vmode); address+=4; |
| 186 | thread->memory->writed(address, info->rotate); address+=4; |
| 187 | thread->memory->writed(address, info->colorspace); address+=4; |
| 188 | thread->memory->memset(address, 0, 16); |
| 189 | } |
| 190 | |
| 191 | U32 GET_SHIFT(U32 n) { |
| 192 | U32 i; |