> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 23:21:53 up 2 days, 13:35, 1 user, load average: 0.38, 0.59, 0.60
This commit is contained in:
@ -19,9 +19,9 @@ void __am_gpu_init() {
|
|||||||
void __am_gpu_config(AM_GPU_CONFIG_T *cfg) {
|
void __am_gpu_config(AM_GPU_CONFIG_T *cfg) {
|
||||||
// uint32_t vgactl = inl(VGACTL_ADDR);
|
// uint32_t vgactl = inl(VGACTL_ADDR);
|
||||||
GET_W(w);
|
GET_W(w);
|
||||||
PNT_BITS(w, 16, 'W');
|
// PNT_BITS(w, 16, 'W');
|
||||||
GET_H(h);
|
GET_H(h);
|
||||||
PNT_BITS(h, 16, 'H');
|
// PNT_BITS(h, 16, 'H');
|
||||||
*cfg = (AM_GPU_CONFIG_T) {
|
*cfg = (AM_GPU_CONFIG_T) {
|
||||||
.present = true, .has_accel = false,
|
.present = true, .has_accel = false,
|
||||||
.width = w, .height = h,
|
.width = w, .height = h,
|
||||||
@ -33,7 +33,7 @@ void __am_gpu_fbdraw(AM_GPU_FBDRAW_T *ctl) {
|
|||||||
GET_W(w);
|
GET_W(w);
|
||||||
for (int i = 0; i < ctl->h; i++) {
|
for (int i = 0; i < ctl->h; i++) {
|
||||||
for (int j = 0; j < ctl->w; j++) {
|
for (int j = 0; j < ctl->w; j++) {
|
||||||
outl(FB_ADDR + w * j + i, (uint32_t)ctl->pixels + w * j + i);
|
outl(FB_ADDR + (ctl->y + j) * w + (ctl->x + i), (uint32_t)ctl->pixels + w * j + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ctl->sync && inl(SYNC_ADDR) == 0) {
|
if (ctl->sync && inl(SYNC_ADDR) == 0) {
|
||||||
|
Reference in New Issue
Block a user