| 64 | }; |
| 65 | |
| 66 | void readCMap(KThread* thread, U32 address, struct fb_cmap* cmap) { |
| 67 | U32 i = thread->memory->readd(address); |
| 68 | U32 stop = thread->memory->readd(address+4)+i; |
| 69 | U32 red = thread->memory->readd(address+8); |
| 70 | U32 green = thread->memory->readd(address+12); |
| 71 | U32 blue = thread->memory->readd(address+16); |
| 72 | |
| 73 | for (;i<stop;i++) { |
| 74 | thread->memory->writew(red, cmap->red[i]); red+=2; |
| 75 | thread->memory->writew(green, cmap->green[i]); green+=2; |
| 76 | thread->memory->writew(blue, cmap->blue[i]); blue+=2; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | void writeFixInfo(KThread* thread, U32 address, struct fb_fix_screeninfo* info) { |
| 81 | thread->memory->memcpy(address, info->id, sizeof(info->id)); address+=16; |