VOGONS


M_TEXT Mode mouse cursor

Topic actions

First post, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

Hi guys,

Any ideas on how to change the mouse cursor (blinking or intensity style) behaviour when in M_TEXT mode?

cheers and thanks,
trev.

Reply 1 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

disable mouse cursor, hook userdefined callback, draw whatever you like

Reply 2 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

ok sounds logical. any hints on how to do that?

Reply 3 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Maybe get some old book about mouse programming, or see some
interrupt lists what they know about int33.
What exactly do you want to achieve?

Reply 4 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

all i want is to stop the mouse cursor blinking because you loose track of where it is when you move the mouse. but ideally it should also highlight the characther underneath it too.

i suppose i'll have to find out how to program it, unless you know something easy off the top of your head?

Reply 5 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Mine doesn't blink.
How did this very case work under real dos?

Reply 6 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

yep, confirmed that it does not blink indeed. seems like my application makes the blinking...

time to edit and recompile that - written in modular 2!! :=S

Reply 7 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You could also try to check if your app switches the blinking bit
(mode control register==attr reg0x10), maybe something goes
wrong there.

Reply 8 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

in vga_attr.cpp, i tried to play with the mode control register 0x10 (particularly bit 3), but that didn't make anything change.... no matter what the cycles of the cpu is, the blink rate is still constant, so it seems to be interrupt driven. perhaps it is programed in the app after all...

Reply 9 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well suppose the app uses that attr blinking bit. Try always clearing it
on writes to that reg, or always setting it and see if something changes.
Otherwise they might just use a block cursor.

Reply 10 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

i think the app uses it's own cursor, since i can AND the mode control register with 0x0 and nothing changes... wierd as something should change. perhaps i'm not doing it right, but i'll keep looking....

Reply 11 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Maybe disable cursor blinking and see if the mouse cursor vanishes
(vga_draw.cpp, some textmode draw function).

Reply 12 of 13, by tricky_trev

User metadata
Rank Newbie
Rank
Newbie

The following temporary mod had no affect:

void VGA_SetBlinking(Bitu enabled) {
Bitu b;
LOG(LOG_VGA,LOG_NORMAL)("Blinking %d",enabled);
//if (enabled) { //TREV
// b=0;vga.draw.blinking=1; //used to -1 but blinking is unsigned
// vga.attr.mode_control|=0x08;
// vga.tandy.mode_control|=0x20;
//} else {
b=8;vga.draw.blinking=0;
vga.attr.mode_control&=~0x08;
vga.tandy.mode_control&=~0x20;
//}
for (Bitu i=0;i<8;i++) TXT_BG_Table[i+8]=(b+i) | ((b+i) << 8)| ((b+i) <<16) | ((b+i) << 24);
}

Reply 13 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Maybe look through the sources if they have a custom cursor (ie. not using
the vga blinking functionality), or check the mouse callback for custom
drawing of tiles.