Skip to contentSkip to conversation

Newbie with terminal video problems

DISCUSSION Stas Sergeev 2 participants 2 messages Dec 1, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 1 line · Mushroom

Yes - the problem remains as it was. I'll try playing with some more settings but it doesn't seem promising.

OK, try the attached patch. This is a first pass of the POST-less video init, which will be used for the VESA driver in the future, if someone will finally enlarge an IO bitmap to 8K in the linux kernel. If that fixes your problem - we'll see. If not - you are out of luck.

include/int.h +1 -0
@@ -15,6 +15,7 @@
 EXTERN void *interrupt_function[0x100];
 EXTERN unsigned int  check_date INIT(0);
 EXTERN time_t        start_time;
+EXTERN char video_ints[256];
 
 void do_int(int);
 void fake_int(int, int);
base/bios/bios.S +3 -10
@@ -507,16 +507,9 @@
 	.org	((INT10_SEG-BIOSSEG) << 4)+INT10_OFF
 /* ======================= Addr = F800:4200 (FC200) */
 	pushw	%ax
-	sti
-	movb	$DOS_HELPER_VIDEO_INIT,%al		/*  Start Video init */
-	int	$DOSHELPER_INT
-	.byte	0x9a   /* call far 0xc000:3  or call far 0xe000:3 */
-/* More general than just c000 or e000 ??? */	
-	.globl	CISH(bios_f000_int10ptr)
-CISH(bios_f000_int10ptr):
-	.long	0xc0000003
-	movb	$DOS_HELPER_VIDEO_INIT_DONE,%al		/* Finished video init */
-	int     $DOSHELPER_INT
+	cli
+	movw	$2,%ax
+	int	$0x10
 	popw	%ax
 	sti
 	lret
base/init/init.c +16 -0
@@ -227,6 +228,9 @@
 static inline void map_video_bios(void)
 {
   extern int load_file(char *name, int foffset, char *mstart, int msize);
+  __u32 int_area[256];
+  __u16 seg, off;
+  int i;
 
   v_printf("Mapping VBIOS = %d\n",config.mapped_bios);
 
@@ -252,6 +256,19 @@
 
     memcheck_addtype('V', "Video BIOS");
     memcheck_reserve('V', VBIOS_START, VBIOS_SIZE);
+    load_file("/dev/mem", 0, (char *)int_area, sizeof(int_area));
+    for (i = 0; i < 256; i++) {
+      seg = int_area[i] >> 16;
+      off = int_area[i] & 0xffff;
+      g_printf("int0x%x was 0x%04x:0x%04x\n", i, seg, off);
+      if (seg == VBIOS_START >> 4) {
+	v_printf("Setting int0x%x to 0x%04x:0x%04x\n", i, seg, off);
+	SETIVEC(i, seg, off);
+	video_ints[i] = 1;
+      } else video_ints[i] = 0;
+    }
+    v_printf("Now initialising 0x40:0-ff\n");
+    load_file("/dev/mem", 0x40 << 4, (char *)(0x40 << 4), 0x100);
   }
 }
 
base/async/int.c +1 -1
@@ -2120,7 +2134,7 @@
     interrupt_function[i] = default_interrupt;
 
     /* don't overwrite; these have been set during video init */
-    if(i == 0x1f || i == 0x43) continue;
+    if(video_ints[i]) continue;
 
     /* interrupts >= 0xc0 are scratch (BIOS stack), 
        unless defined by DOSEMU */	
env/video/vc.c +0 -52

57 lines not on this page · raw message

#1 lore raw

Terminal Video Problem Solved (and sound too!)

Quoted 7 lines
Quoted 4 lines · Stas Sergeev

Mushroom wrote:

Yes - the problem remains as it was. I'll try playing with some more settings but it doesn't seem promising.

Quoted 8 lines

OK, try the attached patch.
This is a first pass of the POST-less video init, which will be used for the VESA driver in the future, if someone will finally enlarge an IO bitmap to 8K in the linux kernel. If that fixes your problem - we'll see. If not - you are out of luck.

That's fixed it!!!
The graphic card details no longer come up when dosemu starts and vga is perfect!
The console is left in video mode but easily readible and clears after going to x and back.

Quoted 8 lines
Quoted 2 lines

BTW the sound which was working
well in 1.1.3.0 seems partly broken again in 1.1.3.7

Fine :-/
Now, when my new sound engine finally made it in (which was the one of the top requested features), there will surely be someone who will call it broken:)

Glad to be of service :)

Quoted 9 lines
Quoted 1 line

but that's not something that really concerns me.

That is important and concerns me. My sound engine is not perfect overall, but compared with an old crap, I don't want to have any drawbacks. Please open the bug report on dosemu SourceForge BTS and attach you program to that report so that I can reproduce and fix the problem.

After the efforts you have gone to sort me out I thought I'd better do some testing of my own. So I had my brother re-build an old 386, put a decent soundcard in and try it through my current sound system. Same result.

It is really weird that the old dosemu sound system sounds exactly like playing it through some desktop speakers with a nasty soundcard which is as I remember it!

I am very sorry for raising concerns it seems that original program did not allow for being played through decent equipment.

Many many thanks for your help and I hope that patch assists others in the same way.

Paul