Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-09 Thread Kevin O'Connor
On Tue, Jan 06, 2015 at 10:49:27AM -0500, Kevin O'Connor wrote: > If emulating text, return a foreground and background attribute from > gfx_read_char(). Also, prefer returning a space character (instead of > null) on blank cells. This may help with some users of "cbvga" > seavgabios. > > This a

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-07 Thread Kevin O'Connor
On Wed, Jan 07, 2015 at 08:50:07AM +0100, Paolo Bonzini wrote: > > > On 07/01/2015 07:43, Kevin O'Connor wrote: > > So, unless I've missed something, I don't think it impacts gwbasic. > > Yeah, I don't know how I missed "if (vga_emulate_text())". I guess I > was confused by the reference to oth

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-07 Thread Paolo Bonzini
On 07/01/2015 07:43, Kevin O'Connor wrote: > So, unless I've missed something, I don't think it impacts gwbasic. Yeah, I don't know how I missed "if (vga_emulate_text())". I guess I was confused by the reference to other video cards in the commit messages. Paolo __

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Kevin O'Connor
On Wed, Jan 07, 2015 at 07:16:16AM +0100, Paolo Bonzini wrote: > On 06/01/2015 21:22, Kevin O'Connor wrote: > > On Tue, Jan 06, 2015 at 08:59:09PM +0100, Paolo Bonzini wrote: > >> On 06/01/2015 16:49, Kevin O'Connor wrote: > >>> +if (vga_emulate_text()) { > >>> +// Read bottom right pix

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Paolo Bonzini
On 06/01/2015 21:22, Kevin O'Connor wrote: > On Tue, Jan 06, 2015 at 08:59:09PM +0100, Paolo Bonzini wrote: >> On 06/01/2015 16:49, Kevin O'Connor wrote: >>> +if (vga_emulate_text()) { >>> +// Read bottom right pixel of the cell to guess bg color >>> +op.y += cheight-1; >>> +

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Kevin O'Connor
On Tue, Jan 06, 2015 at 08:59:09PM +0100, Paolo Bonzini wrote: > On 06/01/2015 16:49, Kevin O'Connor wrote: > > +if (vga_emulate_text()) { > > +// Read bottom right pixel of the cell to guess bg color > > +op.y += cheight-1; > > +handle_gfx_op(&op); > > +op.y -=

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Paolo Bonzini
On 06/01/2015 20:59, Paolo Bonzini wrote: > > On 06/01/2015 16:49, Kevin O'Connor wrote: >> > +if (vga_emulate_text()) { >> > +// Read bottom right pixel of the cell to guess bg color >> > +op.y += cheight-1; >> > +handle_gfx_op(&op); >> > +op.y -= cheight-1;

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Paolo Bonzini
On 06/01/2015 20:59, Paolo Bonzini wrote: > > On 06/01/2015 16:49, Kevin O'Connor wrote: >> > +if (vga_emulate_text()) { >> > +// Read bottom right pixel of the cell to guess bg color >> > +op.y += cheight-1; >> > +handle_gfx_op(&op); >> > +op.y -= cheight-1;

Re: [SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Paolo Bonzini
On 06/01/2015 16:49, Kevin O'Connor wrote: > +if (vga_emulate_text()) { > +// Read bottom right pixel of the cell to guess bg color > +op.y += cheight-1; > +handle_gfx_op(&op); > +op.y -= cheight-1; > +bgattr = op.pixels[7]; > +fgattr = bgattr ^

[SeaBIOS] [PATCH] vgabios: Support emulated text in gfx_read_char()

2015-01-06 Thread Kevin O'Connor
If emulating text, return a foreground and background attribute from gfx_read_char(). Also, prefer returning a space character (instead of null) on blank cells. This may help with some users of "cbvga" seavgabios. This also returns the foreground color (instead of always returning zero) for regu