Commit graph

24 commits

Author SHA1 Message Date
Aleksandar Andrejevic e53821aed0 [NTVDM]
Implement the miscellaneous BIOS system service (INT 15h) handler.
Implement INT 15h, AH = 88h, "Get Extended Memory Size".


svn path=/branches/ntvdm/; revision=60938
2013-11-11 04:00:10 +00:00
Hermès Bélusca-Maïto bf2731fb9f [NTVDM]
- BIOS: Reorganize a bit the header, and close the input thread before closing the input handle (and not after).
- INT32: Fix a comment.
- CMOS: Put CMOS data into a structure called CMOS_MEMORY, introduce READ/WRITE_CMOS_DATA macros for simplifying code. Save CMOS memory into a file (à la Windows' NTVDM), which is loaded at startup.

svn path=/branches/ntvdm/; revision=60913
2013-11-10 13:12:02 +00:00
Hermès Bélusca-Maïto 6da6a5ce56 [NTVDM]
Start my work on modularizing registration of "32-bit" interrupts, i.e.
interrupts that are implemented in 32-bit mode, but are stubbed with 16-bit
code (so that 16-bit apps can call them).
The 16-bit stub code uses a BOP call to our Control BOP function (BOP 0xFF) which
can handle in theory many sub-functions (as the BOP 0x58 documented here: http://www.ragestorm.net/tutorial?id=27)
specified as an additional BYTE in the call:
0xC4 0xC4 bop_code <optional_bop_subfunction>
Here, for calling 32-bit interrupts we use our BOP 0xFF, subfunction 0xFF.
The final aim would be to generate the 16-bit stub code when one calls the RegisterInt32 helper function
(contrary to what's happening now, that is, the 16-bit stub code is generated for all of the interrupts
at BIOS initialization time, and we use it for BIOS and DOS interrupts).

svn path=/branches/ntvdm/; revision=60907
2013-11-09 22:15:40 +00:00
Hermès Bélusca-Maïto bf61aa1278 [NTVDM]
- Make usage of MAKEWORD;
- Introduce BiosGetCursorPosition and use it in BiosPrintCharacter;
- Use EmulatorWriteMemory instead of VgaWriteMemory somewhere in BiosPrintCharacter;
- Add support for tabs in BiosPrintCharacter (taken from DosBox).

svn path=/branches/ntvdm/; revision=60906
2013-11-09 19:55:04 +00:00
Hermès Bélusca-Maïto e971f67673 [NTVDM]: Add offset information to the BIOS Data Area, and add missing fields. See the provided links in the patch for more information.
svn path=/branches/ntvdm/; revision=60890
2013-11-09 00:28:26 +00:00
Hermès Bélusca-Maïto 860c121da8 [NTVDM]
- BIOS: Implement INT 12h (BiosGetMemorySize)
- BOP/DOS: Add some DPRINTs for INT 25h, 2Fh and for unimplemented functions of INT 21h. It's for helping in testing 4DOS.COM

svn path=/branches/ntvdm/; revision=60889
2013-11-08 23:15:58 +00:00
Hermès Bélusca-Maïto 39a527a21e [FAST486][NTVDM]
BOP numbers are 1 byte and map to a function (over 255). But one can pass additional "parameters" to those functions by adding extra bytes, however such functions must advance "by hand" the instruction pointer.

[NTVDM]
- Take into account our previous remark for the BIOS interrupt stubs, and comment them.
- Rework EmulatorBiosOperation (move almost all of its existing code into subfunctions in bop.c) so that one can call many other BOP functions in the future (WIP). The BOP number (still called) EMULATOR_INT_BOP (of value 0xFF) is used for internal 16 --> 32 bit switching for our 32bit bios.
- It appears that the IoRead/WriteCallback and IdleCallback must not be NULL for using fast486. I'm committing a temporary fix that I will definitely fix in a subsequent commit.

svn path=/branches/ntvdm/; revision=60812
2013-11-01 00:01:07 +00:00
Aleksandar Andrejevic 161fc791e4 [NTVDM]
Implement the BIOS keyboard shift flags.


svn path=/branches/ntvdm/; revision=60771
2013-10-27 14:57:12 +00:00
Hermès Bélusca-Maïto d9c072aba2 [NTVDM]
Implement all the missing INT 16h functions but 03h. Also, for simplification purposes (should be fixed later on) act exactly the same for INT 00h and 10h, and for INT 01h and 11h.
Finally, one has to implement setting the BIOS KeybdShiftFlags flag.

svn path=/branches/ntvdm/; revision=60770
2013-10-27 14:17:34 +00:00
Aleksandar Andrejevic 08dc1d3e16 [NTVDM]
Make the BIOS Data Area accessible to other parts of ntvdm.
Properly redirect read/write access to the console to the keyboard and VGA systems, respectively.


svn path=/branches/ntvdm/; revision=59741
2013-08-15 01:40:50 +00:00
Hermès Bélusca-Maïto 6a2534345c Fix formatting, no code changes.
svn path=/branches/ntvdm/; revision=59682
2013-08-09 18:55:35 +00:00
Aleksandar Andrejevic b4ed87bb3a [NTVDM]
Fix coding style.
Fix initial cursor position bug.
Fix memory limit constant for VGA memory modes 0 and 1 (64 KB not 32 KB).


svn path=/branches/ntvdm/; revision=59669
2013-08-07 19:56:28 +00:00
Aleksandar Andrejevic 455deb3bde [NTVDM]
Implement Video Graphics Array (VGA) support.
Replace the old BIOS video code with new code that uses the VGA.


svn path=/branches/ntvdm/; revision=59648
2013-08-05 23:20:25 +00:00
Aleksandar Andrejevic b49476f20c [NTVDM]
Modify the flags on the stack instead of the flags register directly.
The flags register is restored during IRET so changing it directly does nothing.


svn path=/branches/ntvdm/; revision=59566
2013-07-23 21:43:57 +00:00
Aleksandar Andrejevic 495320af6e [NTVDM]
Implement Upper Memory Blocks (UMB) support.


svn path=/branches/ntvdm/; revision=59501
2013-07-18 11:44:06 +00:00
Aleksandar Andrejevic 40d639e7ff [NTVDM]
Implement the Bios Data Area (BDA).
Fix keyboard character translation bug.


svn path=/branches/ntvdm/; revision=59489
2013-07-15 01:37:38 +00:00
Aleksandar Andrejevic 7ba3013923 [NTVDM]
Implement the IOCTL command in VDM DOS.
Rewrite the BIOS video pages support to use only one console buffer (not yet complete).
Fix the BIOS video mode table and several bugs in video functions.


svn path=/branches/ntvdm/; revision=59460
2013-07-13 01:56:36 +00:00
Aleksandar Andrejevic 1f4d89e7d7 [NTVDM]
Improve vertical refresh performance.
Properly synchronize access to the framebuffer.


svn path=/branches/ntvdm/; revision=59425
2013-07-05 01:31:50 +00:00
Aleksandar Andrejevic 01fd2f9aa3 [NTVDM]
Implement BIOS video mode setting.
Fix bugs in video memory access emulation.


svn path=/branches/ntvdm/; revision=59424
2013-07-05 00:08:18 +00:00
Aleksandar Andrejevic 988c4490a8 [NTVDM]
Fix bugs in video memory access emulation.
Implement several missing INT 10h functions.
Resize the console screen buffer on startup.


svn path=/branches/ntvdm/; revision=59421
2013-07-03 23:38:51 +00:00
Aleksandar Andrejevic 36f251eca0 [NTVDM]
Fix several bugs:
The file was not entirely read due to an integer overflow.
The second WORD of the Program Segment Prefix (PSP) is not the number of allocated
paragraphs, but the segment of the last paragraph.
Fix the order of registers (SI and DI were mixed up with SP and BP).
Implement interrupt 0x11.
Implement redirection for reading/writing characters.


svn path=/branches/ntvdm/; revision=59409
2013-07-02 02:08:30 +00:00
Aleksandar Andrejevic ed9f26ccca [NTVDM]
Fix several bugs.
Implement some interrupt 1Ah services in the BIOS.


svn path=/branches/ntvdm/; revision=59374
2013-06-29 21:37:44 +00:00
Aleksandar Andrejevic 944d6e8b5a [NTVDM]
Implement "Get DOS Version" API call.
Implement BIOS keyboard IRQ handler and some "INT 16h" functions.


svn path=/branches/ntvdm/; revision=59350
2013-06-28 20:52:40 +00:00
Aleksandar Andrejevic 4c4c69fc37 [NTVDM]
Clean up the code and properly separate different modules into different files.


svn path=/branches/ntvdm/; revision=59344
2013-06-26 22:58:41 +00:00