Move the VDM states and binary types to a public header file.
Implement GetNextDosSesId.
Continue implementing BaseSrvCheckVDM.
svn path=/branches/ntvdm/; revision=62200
Implement BaseSrvGetVDMCurDirs.
The current directory information is stored in the console record,
and it applies to all DOS records within it.
svn path=/branches/ntvdm/; revision=62086
Add an (incomplete) definition for VDM console records and VDM DOS records.
Implement BaseSrvIsFirstVDM.
Start implementing BaseSrvCheckVDM.
svn path=/branches/ntvdm/; revision=62078
- Sorry !!!!!! The previous translation (Polish, revision 61916 ) was by Wojtek Kozlowski aka. wojo664!! Sorry for having mistaken you with Radek Liska!
- Czesh translation by Radek Liska :D, thanks!
CORE-7250
svn path=/branches/ntvdm/; revision=61917
- Define and export VDDSimulate16 and host_simulate.
- Move the big emulation loop from ntvdm.c to clock.c, and the console input pump thread from ps2.c to ntvdm.c.
Indeed:
* Moving the emulation loop out of the main initialization function will be helpful if one wants to modify how emulation is done,
* The console input pump thread deals also with console UI bits that have nothing to do with keyboard/mouse/ps-2. Instead, the pump thread will dispatch keyboard and mouse events to the ps/2 controller.
- Implement a custom menu in the console's system menu to be able to parametrize ROS VDM (work-in-progress); at the moment only a menu item to show/hide mouse pointer, and another one allowing us to quit properly the VDM are implemented. The menu code was taken from the GUI frontend in winsrv.dll. Only english and french translations available at the moment.
svn path=/branches/ntvdm/; revision=61902
- Enable experimental sound support (only PC speaker for the moment, aka. uses beep.sys).
- Introduce a #define WORKING_TIMER which aim is to disable the currently problematic approximate performance counter value calculation done in order not to call QueryPerformanceCounter each time.
The problem is that we then compute a number of clock ticks for the PIT, which becomes negative, and therefore everything starts to hang.
Disabling this code and calling each time QueryPerformanceCounter, fixes everything; we gain in precision but we loose in performance...
A definitive fix must be found, [TheFlash] !!
This fixes sound (and hangs) in Advanced NetWars, Dangerous Dave, ElitePlus and Rescue Rover (the games that I've tested so far).
svn path=/branches/ntvdm/; revision=61875
Part 2 of PIT + sound fix.
- Move port 61h management from speaker.c to the emulator.c module;
- Add PIT OUT callbacks support;
- Add (unimplemented) PitSetGate function (will be used later on).
Still WIP.
svn path=/branches/ntvdm/; revision=61866
- Break the DOS source file into the "DOS BIOS" (also known in other places as ibmbio or io or...), which is in fact some kind of hardware abstraction layer, and the "DOS BDOS" kernel (also known in other places as ibmdos.com or msdos.sys or...).
- Add in DEM the possibility of loading the DOS from another files (WIP).
svn path=/branches/ntvdm/; revision=61846
- Start to refactor the DOS sources:
Introduce the DEM (DOS Emulation) support library that is used by our built-in DOS, and that is used (via BOPs) by windows NT DOS (files: ntio.sys and ntdos.sys).
- Export some of DEM functions; stub most of them and implement the remaining ones (with existing code that we had in dos.c before).
svn path=/branches/ntvdm/; revision=61838
- Shut up some DPRINTs in io.c and ntvdm.c
- I forgot to update the call to PitClock in the previous revision...
svn path=/branches/ntvdm/; revision=61816
Welcome sound in Advanced NetWars!
However it won't work totally due to problems in the PIT or in the sound emulation (and as a result, the emulator will "hang").
svn path=/branches/ntvdm/; revision=61809
Add two general-purpose variables to the interrupt handler stub stack.
Fix INT 29h so that it works correctly when the INT 10h, AH = 0Eh call is hooked.
svn path=/branches/ntvdm/; revision=61797
- Move all the hardware initialization to EmulatorInitialize (since emulator.c can be viewed as support functions for emulating a PC motherboard) --> PS2 and VGA go there.
- Break bios.c into bios.c and kbdbios.c (the keyboard bios module) (according to the IBM documentation as well as other emulator sources or SeaBIOS or...).
- Move Exception handling from int32.c to emulator.c, because it's something tight to the emulator, not to the interrupt system by itself (yet it happens that INT 00h to 07h are commonly set to some exception handlers). In the bios.c, initialize those vectors with the default exception handler.
- Handling IRQs is done fully in bios.c now: introduce PicSetIRQMask and EnableHwIRQ helper functions (adapted from their equivalents from SeaBIOS) that allows the bios to set (and activate in the PIC) a given IRQ with its corresponding handler. Also introduce PicIRQComplete that serves as a PIC IRQ completer (i.e. sends the EOI to the right PIC(s)).
- Continuing on that, at the moment I set dumb default PIC IRQ handlers for IRQ 08h - 0Fh and IRQ 70h - 77h).
- By default I disable all the IRQs; there are then set on-demand with EnableHwIRQ.
- Rework the POST (aka. BiosInitialize function):
* the memory size is now get from the CMOS (as well as the extended memory size via INT 12h, AH=88h),
* then we initialize the interrupts,
* then platform hardware (ie. the chips) are initialized,
* and finally the keyboard and video bioses.
- As said before, move memory sizes into the CMOS.
- Simplify video bios initialization.
svn path=/branches/ntvdm/; revision=61796
- Do not export (for the PIC/PIT/Speaker) the port functions but use instead the common port interface.
- In bios.c : IOWriteB(PIC_MASTER_DATA, PIC_ICW4_8086 /* | PIC_ICW4_AEOI */); (line 377) : in NXVM they add PIC_ICW4_AEOI; [TheFlash], can you have a look at this and see whether it is required for the master PIC only, otherwise remove this comment.
svn path=/branches/ntvdm/; revision=61590
Declare some VDM memory services.
[NTVDM]
- Almost all of the XXXInitialize functions just return TRUE always, so VOIDify them instead (since they always succeed).
- Move almost all of the hardware initialization inside EmulatorInitialize.
- Move pure console initialization/mode-saving/cleanup code into ConsoleInit/Cleanup functions in ntvdm.c instead of in bios.c.
svn path=/branches/ntvdm/; revision=61588
- Export and use IORead/WriteXX (instead of PicRead/WriteXX or VgaRead/WritePort)
- static'ify some functions.
svn path=/branches/ntvdm/; revision=61580
- Move console text buffer copy into VGA memory, to the BIOS (function BiosCopyTextConsoleToVgaMemory), and do it just after the BIOS sets its default display mode.
- Try to resize "correctly" the console to its original size when cleaning BIOS (Part 2/2, see revision 61538). Still WIP.
- Code cleaning in vga.c
svn path=/branches/ntvdm/; revision=61542
Fix changing console size when entering a given text-mode. Inspired from our telnet console tconsole.cpp!SetWindowSize function.
Part 1/2
svn path=/branches/ntvdm/; revision=61538
Rework the resource files, and add a nice old-ish IBM PC AT icon (C) myself :) (only 32x32 256 colors for now).
svn path=/branches/ntvdm/; revision=61462
Shut up few DPRINT1s, and demote some DPRINT1s to DPRINTs but disable NDEBUG for now (enable it and you'll shut up the DPRINTs).
svn path=/branches/ntvdm/; revision=61451
Make colors appearing in CGA mode 4, but still buggy concerning the computation of the resolution (either the X-dimension is twice big or the Y-dimension is twice small), and the position of the pixels...
However the VGA registers are (almost) similar to http://www.brokenthorn.com/Resources/OSDevVid2.html and putting them equal to the settings given there don't change anything new...
svn path=/branches/ntvdm/; revision=61435
- Fix palette setting for EGA modes, fixes Rescue-Rover menu colors amongst others.
Some of the palettes were adapted (read: translated from DAC registers settings) from DOSBox;
and I've also used http://www.brokenthorn.com/Resources/OSDevVid2.html for some settings.
This should be reviewed to fix / remove redundancies or errors.
- Attempt to implement basic palette enablig/disabling flag (via AC palette regs).
- I've introduced (commented) DbgPrint's for testing AC regs setting. I will remove them when everything is ok.
svn path=/branches/ntvdm/; revision=61419