Commit ff2bfef
Refactor/dos console driver (#2095)
* refactor: console device based in FreeDOS
* feat: INT 16h/21h input: stuffahead buffer, DSR, key mapping
Added INT 16h AH=05h (Store Keystroke) support and refactored input handling to use a device-level stuffahead buffer for synthesized input (e.g., DSR responses), matching NANSI priority and bypassing key reassignment. ConsoleDevice now flushes both stuffahead and BIOS keyboard buffers. Improved extended key and backspace handling. ESC[0p now installs the default Ctrl+PrintScreen→Ctrl+P mapping. Added integration tests for key reassignment, buffer flushing, and DSR response correctness.
* feat: Add NANSI mode 99 and 43 handling to AnsiSequenceHandler
Implemented support for NANSI-specific modes in SetResetMode:
- Mode 99 toggles pseudo cursor behavior via _vga.CursorEmulation.
- Mode 43 reinitializes text mode, loads 8x8 font for 80x43 layout, sets cursor shape, and homes the cursor.
* fix: StoreKeystroke actually updates the Carry Flag on success and error
* refactor: combined if statements
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Fix review comments: echo stuffahead, backspace underflow, unused param, doc comments
Agent-Logs-Url: https://github.com/OpenRakis/Spice86/sessions/e68cc385-7468-48b5-a8ce-faf00c55ba4b
Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>1 parent 385f588 commit ff2bfef
File tree
6 files changed
+1213
-467
lines changed- src/Spice86.Core/Emulator
- InterruptHandlers
- Dos
- Input/Keyboard
- OperatingSystem/Devices
- tests/Spice86.Tests/Dos
6 files changed
+1213
-467
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
| 727 | + | |
| 728 | + | |
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
246 | 267 | | |
247 | 268 | | |
248 | 269 | | |
| |||
0 commit comments