• R/O
  • SSH
  • HTTPS

chnosproject: コミット


コミットメタ情報

リビジョン329 (tree)
日時2012-12-16 11:31:05
作者hikarupsp

ログメッセージ

asmhead.nasのAPM未サポート時のバグを修正。
ロゴ画像を、リソースとしてではなく外部ファイルから読み込むようにした。

変更サマリ

差分

--- beta/tolset_chn_000/chnos_010/chnos/coredef2.h (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/coredef2.h (revision 329)
@@ -2,4 +2,3 @@
22 /*システム外部リソース宣言*/
33
44 extern uchar hankaku[4096]; /*hankaku.txt*/
5-extern uchar chnlogo[]; /*chnlogo.bmp*/
--- beta/tolset_chn_000/chnos_010/chnos/console.c (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/console.c (revision 329)
@@ -119,7 +119,7 @@
119119 debug("CMT:Receive data from FIFO(data:0x%X).\n", data);
120120 #endif
121121 if(data < INPUTSIGNAL_OFFSET){
122- //豎守畑蛻ゥ逕ィ蜿ッ閭ス鬆伜沺0
122+ //汎用利用可能領域0
123123 if(data == 1){
124124 TextBox_Cursor_Blink(console->textbox);
125125 }
@@ -130,10 +130,10 @@
130130 } else if(data == INPUTSIGNAL_FOCUS_LOST){
131131 TextBox_SetEnable_CursorBlink(console->textbox, False);
132132 }
133- //蜈・蜉幃?夂衍鬆伜沺
133+ //入力通知領域
134134 } else if(data < SIGNAL_KEY_OFFSET + 0xffff){
135135 key_ignore = False;
136- //keyid騾夂衍
136+ //keyid通知
137137 data -= SIGNAL_KEY_OFFSET;
138138 if(!(data & KEYID_MASK_BREAK) && (data & KEYID_MASK_EXTENDED)){
139139 if((data & KEYID_MASK_ID) == KEYID_ENTER){
@@ -155,6 +155,8 @@
155155 Console_Command_pci(console);
156156 } else if(Console_CompareCommandline_n(console, "type", 4)){
157157 Console_Command_type(console);
158+ } else if(Console_CompareCommandline_n(console, "task", 4)){
159+ Console_Command_task(console);
158160 } else{
159161 TextBox_Put_String(console->textbox, "Console:There is no such file or command:");
160162 TextBox_Put_String(console->textbox, console->textbox->text_buf);
@@ -168,9 +170,9 @@
168170 TextBox_Put_Key(console->textbox, data);
169171 }
170172 } else if(data < TCM_OFFSET){
171- //豎守畑蛻ゥ逕ィ蜿ッ閭ス鬆伜沺1
173+ //汎用利用可能領域1
172174 } else{
173- //TCM鬆伜沺
175+ //TCM領域
174176 }
175177 }
176178 }
@@ -269,7 +271,7 @@
269271 PCI_ConfigurationRegister_SelectDevice(bus, device, function);
270272 data = PCI_ConfigurationRegister_Read32(0x00);
271273 if(data != 0xffffffff){
272- Console_printf(console, "Bus%3d.Device%2d.Function%2d\n", bus, device, function);
274+ Console_printf(console, "%3d.%2d.%2d, ", bus, device, function);
273275 }
274276 }
275277 }
@@ -309,4 +311,41 @@
309311 return 0;
310312 }
311313
314+uint Console_Command_task(UI_Console *console)
315+{
316+ uint i;
317+ uchar *p;
318+ UI_TaskControl *taskctrl;
319+ UI_Task *search;
312320
321+ taskctrl = System_MultiTask_GetController();
322+
323+ TextBox_Put_String(console->textbox, "-<task>-\n");
324+ if(CFunction_String_GetWord(console->textbox->text_buf, &p, 1)){
325+/*
326+ if(FloppyDisk_IsPathExist(console->boot_fd, p)){
327+ TextBox_Put_String(console->textbox, ":");
328+ TextBox_Put_String(console->textbox, p);
329+ TextBox_Put_String(console->textbox, "\n");
330+ file = File_Initilaize();
331+ if(FloppyDisk_LoadFile(console->boot_fd, file, p) == 0){
332+ for(i = 0; i < file->size; i++){
333+ TextBox_Put_Character(console->textbox, ((uchar *)file->img)[i]);
334+ }
335+ } else{
336+ TextBox_Put_String(console->textbox, "type:File load Error.\n");
337+ }
338+ File_Free(file);
339+ } else{
340+ TextBox_Put_String(console->textbox, "\ntype:The path is not exist.\n");
341+ }
342+*/
343+ } else{
344+ TextBox_Put_String(console->textbox, "Task list:\n");
345+ for(search = taskctrl->start; search != Null; search = search->next){
346+ Console_printf(console, "sel:%02X count:%d\n", search->selector, search->count);
347+ }
348+ }
349+
350+ return 0;
351+}
--- beta/tolset_chn_000/chnos_010/chnos/system.c (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/system.c (revision 329)
@@ -469,6 +469,11 @@
469469 return 0;
470470 }
471471
472+UI_TaskControl *System_MultiTask_GetController(void)
473+{
474+ return System.Controller.Task;
475+}
476+
472477 //
473478 void System_Check_Memory(void)
474479 {
--- beta/tolset_chn_000/chnos_010/chnos/makeset.txt (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/makeset.txt (revision 329)
@@ -1,3 +1,3 @@
11
2-OBJS_BOOTPACK = nasfunc0.obj nasfunc1.obj nasfunc2.obj hankaku.obj chnlogo.obj callbios.obj cfunc.obj color.obj console.obj debug.obj display.obj draw08.obj draw16.obj draw32.obj drawing.obj dsctbl.obj emu86.obj emu86asm.obj error.obj fifo.obj file.obj floppy.obj fmt_bmp.obj intrpt.obj keyboard.obj memory.obj mouse.obj mtask.obj pci.obj serial.obj sheet.obj sht08.obj sht16.obj sht32.obj shtdraw.obj shtfunc.obj struct.obj system.obj textbox.obj timer.obj vgatmode.obj xception.obj bootpack.obj
2+OBJS_BOOTPACK = nasfunc0.obj nasfunc1.obj nasfunc2.obj hankaku.obj callbios.obj cfunc.obj color.obj console.obj debug.obj display.obj draw08.obj draw16.obj draw32.obj drawing.obj dsctbl.obj emu86.obj emu86asm.obj error.obj fifo.obj file.obj floppy.obj fmt_bmp.obj intrpt.obj keyboard.obj memory.obj mouse.obj mtask.obj pci.obj serial.obj sheet.obj sht08.obj sht16.obj sht32.obj shtdraw.obj shtfunc.obj struct.obj system.obj textbox.obj timer.obj vgatmode.obj xception.obj bootpack.obj
33 HEADS_BOOTPACK = core.h coredef0.h coredef1.h coredef2.h coredef3.h keyid.h
--- beta/tolset_chn_000/chnos_010/chnos/Makefile (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/Makefile (revision 329)
@@ -39,9 +39,6 @@
3939 hankaku.obj : hankaku.bin Makefile
4040 $(BIN2OBJ) hankaku.bin hankaku.obj _hankaku
4141
42-chnlogo.obj : chnlogo.bmp Makefile
43- $(BIN2OBJ) chnlogo.bmp chnlogo.obj _chnlogo
44-
4542 asmhead.bin : asmhead.nas Makefile
4643 $(NASK) asmhead.nas asmhead.bin asmhead.lst
4744
@@ -73,6 +70,7 @@
7370 wbinimg src:chnipl.bin len:512 from:0 to:0 \
7471 copy from:chnos.sys to:@: \
7572 copy from:chnipl.nas to:@: \
73+ copy from:chnlogo.bmp to:@: \
7674 imgout:chnos.img
7775
7876 #一般規則
--- beta/tolset_chn_000/chnos_010/chnos/core.h (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/core.h (revision 329)
@@ -67,6 +67,7 @@
6767 uint Console_Command_dir(UI_Console *console);
6868 uint Console_Command_pci(UI_Console *console);
6969 uint Console_Command_type(UI_Console *console);
70+uint Console_Command_task(UI_Console *console);
7071
7172 /*debug.c デバッグ支援*/
7273 #ifdef CHNOSPROJECT_DEBUG
@@ -395,6 +396,7 @@
395396 uint System_TaskControlMessage_Send_AllTask(uint message);
396397 uint System_Sheet_SetParentToVRAM(UI_Sheet *sheet);
397398 uint System_InputFocus_Change(DATA_FIFO32 *fifo);
399+UI_TaskControl *System_MultiTask_GetController(void);
398400
399401 /*textbox.c テキスト入力UI関連*/
400402 UI_TextBox *TextBox_Initialize(void);
--- beta/tolset_chn_000/chnos_010/chnos/bootpack.c (revision 328)
+++ beta/tolset_chn_000/chnos_010/chnos/bootpack.c (revision 329)
@@ -15,6 +15,8 @@
1515 uint counter1, counter2, counter3;
1616 UI_TextBox *textbox;
1717 UI_Console *console;
18+ IO_FloppyDisk *boot_fd;
19+ IO_File *file;
1820
1921 i = 0;
2022 data = 0;
@@ -23,6 +25,7 @@
2325
2426 mytask = System_MultiTask_GetNowTask();
2527 disp_ctrl = System_Display_Get_Controller();
28+ boot_fd = FloppyDisk_Initialize(ADR_DISKIMG);
2629
2730 vramsheet = disp_ctrl->vramsheet;
2831
@@ -33,6 +36,7 @@
3336 i = 0;
3437 Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 1, 0x000000, "Please Select the VideoMode Number.");
3538 Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 2, 0x000000, "(Use cursor Up or Down, Select Enter.)");
39+ Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 6, 0x000000, "Press Esc to boot in VGA(320x200 8bit).");
3640 Sheet_Drawing_Fill_Rectangle(vramsheet, 0x00ff00, 10, 10 + 16 * 3, VGA08_VRAM_XSIZE - 10 - 1, 10 + 16 * 5 - 1);
3741 snprintf(s, sizeof(s), "%d:0x%X %dx%d-%dbits", i, disp_ctrl->VBE.list_vmode[i].mode_number, disp_ctrl->VBE.list_vmode[i].xsize, disp_ctrl->VBE.list_vmode[i].ysize, disp_ctrl->VBE.list_vmode[i].bpp);
3842 Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 3, 0x000000, s);
@@ -65,11 +69,13 @@
6569 Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 3, 0x000000, s);
6670 } else if((data & KEYID_MASK_ID) == KEYID_ENTER){
6771 if(System_Display_VESA_Set_VideoMode(i) == 0){
68- Sheet_SetBuffer(vramsheet, disp_ctrl->vram, disp_ctrl->xsize, disp_ctrl->ysize, disp_ctrl->bpp);
6972 break;
7073 }
7174 Sheet_Drawing_Fill_Rectangle(vramsheet, 0x00ff00, 10, 10 + 16 * 3, VGA08_VRAM_XSIZE - 10 - 1, 10 + 16 * 4 - 1);
7275 Sheet_Drawing_Put_String(vramsheet, 10, 10 + 16 * 4, 0x000000, "Function Failed. Try again.");
76+ } else if((data & KEYID_MASK_ID) == KEYID_ESC){
77+ System_TaskControlMessage_Send_AllTask(TCM_OFFSET + TCM_INFO_DISPLAY_UPDATE_RESOLUTION);
78+ break;
7379 }
7480 }
7581 }
@@ -77,17 +83,19 @@
7783 }
7884 }
7985
86+ Sheet_SetBuffer(vramsheet, disp_ctrl->vram, disp_ctrl->xsize, disp_ctrl->ysize, disp_ctrl->bpp);
87+
8088 sheet_desktop = Sheet_Initialize();
8189 Sheet_SetBuffer(sheet_desktop, Null, disp_ctrl->xsize, disp_ctrl->ysize, disp_ctrl->bpp);
8290
8391 Sheet_Drawing_Fill_Rectangle(sheet_desktop, 0xffffff, 0, 0, disp_ctrl->xsize - 1, disp_ctrl->ysize - 1);
8492 Sheet_Drawing_Put_String(sheet_desktop, 10, 10, 0x000000, "Welcome to CHNOSProject!");
85-
86- Format_BMP_DrawPicture(sheet_desktop->vram, sheet_desktop->size.x, 10, 26, 0, 0, chnlogo);
87-
88- Drawing_Fill_Circle(disp_ctrl->vram, disp_ctrl->xsize, 100, 250, 0x00c600, 45);
89- for(i = 0; i < 50; i += 5){
90- Drawing_Draw_Circle(disp_ctrl->vram, disp_ctrl->xsize, 100, 250, 0xc6c6c6, i);
93+ if(FloppyDisk_IsPathExist(boot_fd, "chnlogo.bmp")){
94+ file = File_Initilaize();
95+ if(FloppyDisk_LoadFile(boot_fd, file, "chnlogo.bmp") == 0){
96+ Format_BMP_DrawPicture(sheet_desktop->vram, sheet_desktop->size.x, disp_ctrl->xsize - 128 - 4, 4, 0, 0, file->img);
97+ }
98+ File_Free(file);
9199 }
92100
93101 testsheet = Sheet_Initialize();
@@ -171,7 +179,17 @@
171179 //Timer_Run(timer3);
172180
173181 console = Console_Initialize();
174- Console_SetSize(console, vramsheet->size.x >> 4, vramsheet->size.y >> 5);
182+ x = vramsheet->size.x >> (3 + 1);
183+ y = vramsheet->size.y >> (4 + 1);
184+
185+ if(x < (VGA08_VRAM_XSIZE >> 3)){
186+ x = (VGA08_VRAM_XSIZE >> 3);
187+ }
188+ if(y < (VGA08_VRAM_YSIZE >> 4)){
189+ y = (VGA08_VRAM_YSIZE >> 4);
190+ }
191+
192+ Console_SetSize(console, x, y);
175193 Console_Run(console);
176194 System_InputFocus_Change(console->textbox->sheet->input_fifo);
177195
旧リポジトリブラウザで表示