mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
PC-98: Implement kanji/graph mode toggling via Ctrl+F4
This commit is contained in:
@@ -288,6 +288,10 @@ private:
|
||||
PC98_GetCtrlFuncKeyEscape(/*&*/esclen,dev_con_readbuf,code+1u-0x92u); dev_con_pos=0; dev_con_max=esclen;
|
||||
return (dev_con_max != 0)?true:false;
|
||||
}
|
||||
else if (code == 0x95) {// CTRL+F4 Toggle kanji/graph mode HANDLED INTERNALLY, NEVER RETURNED TO CONSOLE
|
||||
void pc98_toggle_char_mode(void);
|
||||
pc98_toggle_char_mode();
|
||||
}
|
||||
else if (code == 0x97) {// CTRL+F6 Toggle 20/25-line text HANDLED INTERNALLY, NEVER RETURNED TO CONSOLE
|
||||
/* toggle the bit and change the text layer */
|
||||
{
|
||||
|
@@ -2969,6 +2969,8 @@ void draw_pc98_function_row_elem(unsigned int o, unsigned int co, const struct p
|
||||
}
|
||||
|
||||
void draw_pc98_function_row(unsigned int o, const struct pc98_func_key_shortcut_def* keylist) {
|
||||
mem_writew(0xA0000+((o+1)*2),real_readb(0x60,0x8B));
|
||||
mem_writeb(0xA2000+((o+1)*2),0xE1);
|
||||
for (unsigned int i=0u;i < 5u;i++)
|
||||
draw_pc98_function_row_elem(o,4u + (i * 7u),keylist[i]);
|
||||
for (unsigned int i=5u;i < 10u;i++)
|
||||
@@ -3076,6 +3078,16 @@ void pc98_function_row_user_toggle(void) {
|
||||
update_pc98_function_row(pc98_function_row_mode+1,true);
|
||||
}
|
||||
|
||||
void pc98_set_char_mode(bool mode) {
|
||||
real_writeb(0x60,0x8A,mode);
|
||||
real_writeb(0x60,0x8B,(mode == true) ? ' ' : 'g');
|
||||
update_pc98_function_row(pc98_function_row_mode,true);
|
||||
}
|
||||
|
||||
void pc98_toggle_char_mode(void) {
|
||||
pc98_set_char_mode(!real_readb(0x60,0x8A));
|
||||
}
|
||||
|
||||
void pc98_set_digpal_entry(unsigned char ent,unsigned char grb);
|
||||
void PC98_show_cursor(bool show);
|
||||
|
||||
|
@@ -1220,6 +1220,7 @@ void INT10_Startup(Section *sec) {
|
||||
*/
|
||||
|
||||
real_writeb(0x60,0x8A,1); /* kanji/graph mode */
|
||||
real_writeb(0x60,0x8B,' '); /* kanji/graph mode indicator */
|
||||
real_writeb(0x60,0x8C,' '); /* function row mode 2 indicator */
|
||||
|
||||
/* number of text rows on the screen.
|
||||
|
Reference in New Issue
Block a user