Yea, I'll be sure to write about it somewhere if I find the answer.jal wrote:Well, if you do I'd be interested to hearing what causes it, as (as I described above) I experienced the same problem.Stevo14 wrote:That is a good idea. I will try to look at the Bochs Bios when I get back around to solving this video problem.jal wrote:I should look at the Bochs BIOS, since Qemu uses that as well.
JAL
Secretion 0.2
This is what Bochs BIOS does (annotated by me, see e.g. FreeVGA for details):Stevo14 wrote:Yea, I'll be sure to write about it somewhere if I find the answer.
Code: Select all
static void get_font_access()
{
ASM_START
mov dx, # VGAREG_SEQU_ADDRESS
mov ax, #0x0100 ; reset: AR
out dx, ax
mov ax, #0x0402 ; map mask: plane 2
out dx, ax
mov ax, #0x0704 ; mem mode: odd/even disable, ext. mem, ????
out dx, ax
mov ax, #0x0300 ; reset: AR, SR
out dx, ax
mov dx, # VGAREG_GRDC_ADDRESS
mov ax, #0x0204 ; read map select: 2
out dx, ax
mov ax, #0x0005 ; gfx mode: read mode 0, write mode 0
out dx, ax
mov ax, #0x0406 ; misc gfx: mem map = 1 (a0000-affff)
out dx, ax
ASM_END
}
static void release_font_access()
{
ASM_START
mov dx, # VGAREG_SEQU_ADDRESS
mov ax, #0x0100 ; reset: AR
out dx, ax
mov ax, #0x0302 ; map mas: plane 0, 1
out dx, ax
mov ax, #0x0304 ; mem mode: odd/even enable, ext.mem, ????
out dx, ax
mov ax, #0x0300 ; reset: AR, SR
out dx, ax
mov dx, # VGAREG_READ_MISC_OUTPUT
in al, dx
and al, #0x01 ; misc. outp: input/output address select (mono or colour)
shl al, 2
or al, #0x0a
mov ah, al
mov al, #0x06
mov dx, # VGAREG_GRDC_ADDRESS
out dx, ax ; misc. gfx: mem map = 10 (mono) or 11 (colour)
mov ax, #0x0004 ; read map select: 0
out dx, ax
mov ax, #0x1005 ; gfx mode: host odd/even
out dx, ax
ASM_END
}
JAL
Ok, ignore previous comment about the memory area - I did set it, to a0000-bffff (more or less by accident, I admit). I used the entry/exit code from the Bochs BIOS, and it works fine on VMware. I don't have the time right now to find out exactly what caused my own routines to fail, but using the Bochs ones should work, at least.
JAL
JAL
Well, there was a discussion between me and the OP, as I have the same problem with my video routine. I haven't nailed it down yet, but the Bochs BIOS (vgabios) routine works.lukem95 wrote:oh were there? sorry. i read the forum, downloaded the image and then tested it the next day. i didnt reread the topic =\
JAL
Same with my code. Perhaps the VMware gfx device needs those, while real hardware (or at least modern hardware) doesn't.Stevo14 wrote:Comparing my code to the Bochs code, the most obvious difference seems to be that the Bochs code is sprinkled with reset and resume commands. Other than that they do almost exactly the same thing.
JAL
Two major bug fixes in as many days! This feels good.
Version 0.2.5 should fix the font problem, the shutdown problem, and the problem with the mis-sized image file. Get it from the same place: http://code.google.com/p/secretion/
About the font, apparently it is important to properly select the graphics read map as well as inserting the reset commands.
Version 0.2.5 should fix the font problem, the shutdown problem, and the problem with the mis-sized image file. Get it from the same place: http://code.google.com/p/secretion/
About the font, apparently it is important to properly select the graphics read map as well as inserting the reset commands.
Looking good. I found a bug, though, regarding the console input. The console doesnt accept any commands that have been edited (using backspace and retyped) even though the console shows the correct command.
Also when the console starts scrolling, and the line is at the bottom of the window, neither the text or the prompt are visible until you press enter (moving it up a line).
Also when the console starts scrolling, and the line is at the bottom of the window, neither the text or the prompt are visible until you press enter (moving it up a line).
The cake is a lie | rackbits.com
Both are confirmed. Thanks for the bug reports. The first is obviously a problem with how I handle backspaces. The second seems to be a problem with how I calculate the new "dirty area" for a window when text is written to it. Probably an off-by-one error. I'll work on them as soon as possible.ucosty wrote:Looking good. I found a bug, though, regarding the console input. The console doesnt accept any commands that have been edited (using backspace and retyped) even though the console shows the correct command.
Also when the console starts scrolling, and the line is at the bottom of the window, neither the text or the prompt are visible until you press enter (moving it up a line).
[...image...]