• R/O
  • SSH
  • HTTPS

chnosproject: Commit


Commit MetaInfo

Revisión94 (tree)
Tiempo2010-04-20 23:11:14
Autorhikarupsp

Log Message

(empty log message)

Cambiar Resumen

Diferencia incremental

--- beta/tolset_chn_000/chnos_006/bootpack.c (revision 93)
+++ beta/tolset_chn_000/chnos_006/bootpack.c (revision 94)
@@ -7,8 +7,8 @@
77 void CHNMain(void)
88 {
99 unsigned char s[24];
10- struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
11- struct VESAINFO *vinfo = (struct VESAINFO *) ADR_VESAINFO;
10+// struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
11+// struct VESAINFO *vinfo = (struct VESAINFO *) ADR_VESAINFO;
1212 struct FIFO32 sysfifo;
1313 struct MOUSE_DECODE mdec;
1414 static struct TIMERCTL timerctl;
@@ -15,12 +15,13 @@
1515 struct MEMMAN *memman = (struct MEMMAN *) MEMMAN_ADDR;
1616 struct SHEET32 *sht_back, *sht_mouse;
1717 struct WINDOWINFO *winfo1;
18- int fifobuf[256], i = 0,mx = binfo->scrnx / 2, my = binfo->scrny / 2;
18+ int fifobuf[256], i = 0,mx , my;
1919 int scrool = 0;
2020 volatile int time_tick;
2121 unsigned int all_mem_size = memtest(0x00400000, 0xbffffffff);
2222 unsigned int free_mem_size = 0;
2323 unsigned int *buf_back, buf_mouse[576], *buf_win;
24+ int scrnx,scrny;
2425
2526
2627 init_system(&system);
@@ -28,6 +29,11 @@
2829 init_pic();
2930 io_sti();
3031
32+ scrnx = system.info.boot.scrnx;
33+ scrny = system.info.boot.scrny ;
34+ mx = scrnx/2;
35+ my = scrny/2;
36+
3137 system.io.memory.init(memman);
3238 system.io.memory.free(0x00400000,all_mem_size - 0x00400000);
3339
@@ -36,7 +42,7 @@
3642 system.data.fifo.init(&sysfifo, 256, fifobuf);
3743 system.io.keyboard.init(&sysfifo, SYSFIFO_KEYB);
3844 system.io.mouse.init(&sysfifo, SYSFIFO_MOUSE, &mdec);
39- system.draw.sheet.init(vinfo->PhysBasePtr,binfo->scrnx,binfo->scrny);
45+ system.draw.sheet.init(system.info.vesa.PhysBasePtr,scrnx,scrny);
4046
4147 system.draw.window.init();
4248 system.io.beep.off();
@@ -43,16 +49,17 @@
4349 system.io.serial.init();
4450
4551
52+
4653 sht_back = system.draw.sheet.alloc();
4754 sht_mouse = system.draw.sheet.alloc();
4855
49- buf_back = (unsigned int *) system.io.memory.alloc(binfo->scrnx * binfo->scrny * 4);
56+ buf_back = (unsigned int *) system.io.memory.alloc(scrnx * scrny * 4);
5057 buf_win = (unsigned int *) system.io.memory.alloc(INT_MONITOR_LONG * 150 * 4);
5158
52- system.draw.sheet.set(sht_back, buf_back, binfo->scrnx, binfo->scrny, VOID_INV_COL32);
59+ system.draw.sheet.set(sht_back, buf_back, scrnx, scrny, VOID_INV_COL32);
5360 system.draw.sheet.set(sht_mouse, buf_mouse, 24, 24, INV_COL32);
5461
55- system.draw.init_scrn(buf_back, binfo->scrnx, binfo->scrny, vinfo->BitsPerPixel,buf_mouse);
62+ system.draw.init_scrn(buf_back, scrnx, scrny, system.info.vesa.BitsPerPixel,buf_mouse);
5663
5764 system.draw.sheet.slide(sht_back, 0,0);
5865 system.draw.sheet.slide(sht_mouse, mx, my);
@@ -63,7 +70,7 @@
6370
6471 system.draw.sheet.updown(sht_mouse, 6);
6572
66-// system.draw.circle(buf_back, 100,100, 0xff0000, binfo->scrnx, 100);
73+// system.draw.circle(buf_back, 100,100, 0xff0000, scrnx, 100);
6774
6875 sprintf(s,"memory %d Byte(%d KB,%d MB) ",all_mem_size,all_mem_size/1024, all_mem_size/(1024*1024));
6976 system.draw.boxfill(buf_win, INT_MONITOR_LONG, mix_color(0x0000ff00, 0x7fff0000), 0,0,INT_MONITOR_LONG,16);
@@ -118,14 +125,14 @@
118125 my += mdec.y;
119126 if(mx < 0) mx = 0;
120127 if(my < 0) my = 0;
121- if(mx > binfo->scrnx - 1) mx = binfo->scrnx - 1;
122- if(my > binfo->scrny - 1) my = binfo->scrny - 1;
128+ if(mx > scrnx - 1) mx = scrnx - 1;
129+ if(my > scrny - 1) my = scrny - 1;
123130
124131 system.draw.sheet.slide(sht_mouse, mx,my);
125132 system.draw.boxfill(buf_win, INT_MONITOR_LONG, 0x000000, 0,96,INT_MONITOR_LONG,112);
126133 if(mdec.scrool == 0xffffffff) scrool++;
127134 if(mdec.scrool == 0x00000001) scrool--;
128- sprintf(s,"(%4d,%4d) %d,%X",mx,my,scrool,vinfo->PhysBasePtr,mdec.scrool);
135+ sprintf(s,"(%4d,%4d) %d,%X",mx,my,scrool,system.info.vesa.PhysBasePtr,mdec.scrool);
129136 system.draw.putfonts(buf_win, INT_MONITOR_LONG, 0,96,0xffffff,s);
130137 system.draw.sheet.refresh(winfo1->center, 0,64,INT_MONITOR_LONG , 112);
131138 }
Show on old repository browser