case 0x3DA: /* CGA/EGA/VGA status */
- cpu->vga_status_flip ^= 1;
- return cpu->vga_status_flip ? 0x08 : 0x00; /* vertical retrace bit */
+ cpu->vga_status_flip++;
+ return (uint8_t) ((cpu->vga_status_flip & 0x01) | ((cpu->vga_status_flip & 0xE0) == 0xE0 ? 0x08 : 0x00));
default:
}
+ case 0x07: { /* Direct Character Input without Echo */
+
+ int c = host_read_key (cpu);
+
+ if (c == EOF) {
+ c = '\r';
+ }
+
+ if (c == '\n') {
+ c = '\r';
+ }
+
+ set_reg8 (cpu, REG_AX, (uint8_t) c);
+ break;
+
+ }
+
case 0x09: {
FILE *out = dos_get_handle_file (cpu, 1);