DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ)
+GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ) $(DOSLIBLIBS)
DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib
int CRTParmCount;\r
/* common mode X initiation stuff~ */\r
modexsetBaseXMode(gv->video.page);\r
+ vga_enable_256color_modex(); // VGA mode X\r
+ update_state_from_vga();\r
\r
switch(vq)\r
{\r
case 1:\r
- CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);\r
+ //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]);\r
/* width and height */\r
- gv->video.page[0].sw=320;\r
- gv->video.page[0].sh=240;\r
+ gv->video.page[0].sw=vga_state.vga_width = 320; // VGA lib currently does not update this\r
+ gv->video.page[0].sh=vga_state.vga_height = 240; // VGA lib currently does not update this\r
\r
/* send the CRTParms */\r
- for(i=0; i<CRTParmCount; i++) {\r
+ /*for(i=0; i<CRTParmCount; i++) {\r
outpw(CRTC_INDEX, ModeX_320x240regs[i]);\r
+ }*/\r
+ {\r
+ struct vga_mode_params cm;\r
+ vga_read_crtc_mode(&cm);\r
+\r
+ // 320x240 mode 60Hz\r
+ cm.vertical_total = 525;\r
+ cm.vertical_start_retrace = 0x1EA;\r
+ cm.vertical_end_retrace = 0x1EC;\r
+ cm.vertical_display_end = 480;\r
+ cm.vertical_blank_start = 489;\r
+ cm.vertical_blank_end = 517;\r
+\r
+ vga_write_crtc_mode(&cm,0);\r
}\r
break;\r
case 2:\r