Commit graph

264 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto ac8e7f981c [NTVDM]: Silent few DPRINTs.
svn path=/branches/ntvdm/; revision=62018
2014-02-06 20:28:33 +00:00
Hermès Bélusca-Maïto 6a287dfdfe [NTVDM]: German translation by Robert Naumann, thanks!
CORE-7250

svn path=/branches/ntvdm/; revision=61920
2014-02-02 14:01:21 +00:00
Hermès Bélusca-Maïto 3c5b236b5a [NTVDM]
- 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
2014-02-02 00:43:52 +00:00
Hermès Bélusca-Maïto 97eee1dd69 [NTVDM]: Polish translation by Radek Liska, thanks!
CORE-7835 #resolve
CORE-7250

svn path=/branches/ntvdm/; revision=61916
2014-02-02 00:34:48 +00:00
Hermès Bélusca-Maïto 8eb145a87c [NTVDM]: Comment out what-appears-to-be a broken test. Fixes some LIFE.COM program. Need to investigate further...
svn path=/branches/ntvdm/; revision=61908
2014-02-01 22:13:31 +00:00
Hermès Bélusca-Maïto 285d283861 [NTVDM]: Okay, let's clear the VGA memory everytime we change modes... (fixes VGA-->EGA transition in Dave).
svn path=/branches/ntvdm/; revision=61907
2014-02-01 20:55:57 +00:00
Hermès Bélusca-Maïto 6e7f995863 [NTVDM]: Italian translation by Ivan di Francesco, thanks!
CORE-7250

svn path=/branches/ntvdm/; revision=61905
2014-02-01 19:42:49 +00:00
Hermès Bélusca-Maïto d028bd7690 [NTVDM]: Spanish translation by Javier Fernandez, thanks!
svn path=/branches/ntvdm/; revision=61903
2014-02-01 17:22:30 +00:00
Hermès Bélusca-Maïto 105aff1c51 [NTVDM]
- 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
2014-02-01 16:32:20 +00:00
Hermès Bélusca-Maïto d25d9ea618 [NTVDM]
- 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
2014-01-29 00:25:43 +00:00
Hermès Bélusca-Maïto f2a98176d6 [NTVDM]: Add debug print for timer ticks to try to find why the emulator sometimes hangs...
svn path=/branches/ntvdm/; revision=61867
2014-01-28 20:39:16 +00:00
Hermès Bélusca-Maïto 03d8479401 [NTVDM]
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
2014-01-28 20:24:24 +00:00
Hermès Bélusca-Maïto 5dafb169e0 [NTVDM]: Replace my #if 0 by #ifdef IPS_DISPLAY for DPRINTing (or not) the no. of instructions per seconds.
svn path=/branches/ntvdm/; revision=61865
2014-01-28 20:18:52 +00:00
Hermès Bélusca-Maïto 951276a7d8 [NTVDM]: Remove erroneous comments.
svn path=/branches/ntvdm/; revision=61861
2014-01-28 17:26:26 +00:00
Hermès Bélusca-Maïto 0a46ec7a18 [NTVDM]
- 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
2014-01-26 21:51:27 +00:00
Hermès Bélusca-Maïto c98977184f [NTVDM]
- 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
2014-01-26 18:25:59 +00:00
Hermès Bélusca-Maïto 1608c84d72 [NTVDM]: Implement a basic BIOS Wait interrupt INT 15h, AH=86h.
svn path=/branches/ntvdm/; revision=61821
2014-01-25 22:29:54 +00:00
Hermès Bélusca-Maïto 298e47dbaf [NTVDM]
- 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
2014-01-25 18:57:17 +00:00
Hermès Bélusca-Maïto 4bbed217b6 [NTVDM]: Each PIT channel is decreased by the same amount of "Count".
svn path=/branches/ntvdm/; revision=61815
2014-01-25 18:56:12 +00:00
Hermès Bélusca-Maïto 2bbb94f82b [NTVDM]
Big PIT fix Part 1/X
Currently, sound frequency is fixed (in Advanced NetWars, Rover, Dave)

svn path=/branches/ntvdm/; revision=61810
2014-01-25 17:00:09 +00:00
Hermès Bélusca-Maïto f878b8abae [NTVDM]
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
2014-01-25 16:23:27 +00:00
Aleksandar Andrejevic a3a28181c2 [NTVDM]
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
2014-01-25 00:53:10 +00:00
Hermès Bélusca-Maïto 6ddfa7d2b8 [NTVDM]
- 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
2014-01-25 00:21:51 +00:00
Hermès Bélusca-Maïto 3c273ca1a9 [NTVDM]: Register functions are already declared via the inclusion of ddk/vddsvc.h. However still keep their definitions also in registers.h (yet #if 0'ed out) for reference.
svn path=/branches/ntvdm/; revision=61795
2014-01-24 20:37:40 +00:00
Hermès Bélusca-Maïto ba97a8f567 [NTVDM]: Clean ConsoleFramebuffer after leaving graphics mode.
svn path=/branches/ntvdm/; revision=61794
2014-01-24 20:36:17 +00:00
Hermès Bélusca-Maïto 1d9208e0a3 [NTVDM]: Use EmulatorRead/WriteMemory instead of directly use the VgaXXXMemory helpers.
svn path=/branches/ntvdm/; revision=61786
2014-01-24 00:41:26 +00:00
Hermès Bélusca-Maïto b393d6bbc4 [NTVDM]: Improve the icon, and add 16x16 format.
svn path=/branches/ntvdm/; revision=61785
2014-01-23 23:46:10 +00:00
Hermès Bélusca-Maïto f0466501fc [NTVDM]
- 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
2014-01-11 21:45:01 +00:00
Hermès Bélusca-Maïto 40f773b96b [DDK:NT_VDD]
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
2014-01-11 20:59:27 +00:00
Hermès Bélusca-Maïto 25105f6bec [NTVDM]: Break the BIOS into the BIOS and the video BIOS.
svn path=/branches/ntvdm/; revision=61586
2014-01-11 17:05:25 +00:00
Hermès Bélusca-Maïto 3d36bf4451 [NTVDM]: Start to organize the code...
svn path=/branches/ntvdm/; revision=61583
2014-01-11 15:27:18 +00:00
Hermès Bélusca-Maïto af24ac79df [NTVDM]
- Export and use IORead/WriteXX (instead of PicRead/WriteXX or VgaRead/WritePort)
- static'ify some functions.

svn path=/branches/ntvdm/; revision=61580
2014-01-11 14:40:03 +00:00
Hermès Bélusca-Maïto 0042be70fb [NTVDM]
Fix few problems in BiosCopyTextConsoleToVgaMemory (copied screen region and temp buffer freeing).

svn path=/branches/ntvdm/; revision=61544
2014-01-06 00:17:59 +00:00
Hermès Bélusca-Maïto 98e367f291 [NTVDM]
Save console in/out modes and cursor shape, and restore them at cleanup.

svn path=/branches/ntvdm/; revision=61543
2014-01-05 22:21:57 +00:00
Hermès Bélusca-Maïto 425717c483 [NTVDM]
- 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
2014-01-05 21:26:33 +00:00
Hermès Bélusca-Maïto 2a053222a7 [NTVDM]
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
2014-01-05 14:14:26 +00:00
Aleksandar Andrejevic 08b3bef080 [NTVDM]
Fix the interleaved shift mode.
Don't halve the vertical resolution twice.


svn path=/branches/ntvdm/; revision=61535
2014-01-04 22:33:05 +00:00
Aleksandar Andrejevic 4d933b0747 [NTVDM]
Implement DOS functions 0x4E (Find First File) and 0x4F (Find Next File). Not tested yet.


svn path=/branches/ntvdm/; revision=61507
2014-01-03 23:41:40 +00:00
Hermès Bélusca-Maïto 2b13376ad5 [NTVDM]
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
2013-12-29 22:38:10 +00:00
Hermès Bélusca-Maïto e8d3c3e4bd [NTVDM]: Don't display an error message if the VDD registry key (or value) just doesn't exist: it significates we just don't have any VDD to load...
Thanks to Lee Schroeder and oldman on the forum for having detected this :)

svn path=/branches/ntvdm/; revision=61459
2013-12-28 22:22:12 +00:00
Hermès Bélusca-Maïto d944afa5c7 [NTVDM]
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
2013-12-27 19:51:43 +00:00
Hermès Bélusca-Maïto cc98f9be4f [NTVDM]
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
2013-12-26 21:40:20 +00:00
Hermès Bélusca-Maïto 2752c69839 [NTVDM]: Code "formatting" + fix types.
svn path=/branches/ntvdm/; revision=61434
2013-12-26 21:37:06 +00:00
Hermès Bélusca-Maïto 0cf85b9296 [NTVDM]
- 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
2013-12-25 21:40:18 +00:00
Hermès Bélusca-Maïto 1a873828b6 [NTVDM]
- BIOS: Fix setting video page parameters when setting mode, and effectively fix setting of video page (fix the involved CRTC registers !!).
  Now Advanced NetWars works without flickering.
- VGA: Fix code presentation.

svn path=/branches/ntvdm/; revision=61390
2013-12-24 22:40:15 +00:00
Hermès Bélusca-Maïto 5c45aa50d1 [NTVDM]: DOS: Add some description / fix a comment.
svn path=/branches/ntvdm/; revision=61389
2013-12-24 22:33:16 +00:00
Hermès Bélusca-Maïto ec409b401e [NTVDM]: We know that .h files are header files ;)
svn path=/branches/ntvdm/; revision=61375
2013-12-24 15:53:30 +00:00
Hermès Bélusca-Maïto 8331d27b2b [NTVDM]: Implement and export VDDTerminateVDM.
svn path=/branches/ntvdm/; revision=61374
2013-12-24 15:52:31 +00:00
Hermès Bélusca-Maïto 4f99547f7d [NTVDM]
Implement and export (and define in vddsvc.h) call_ica_hw_interrupt and VDDSimulateInterrupt macro.
ICA = Interrupt Controller Adapter (in windows terminology)

svn path=/branches/ntvdm/; revision=61372
2013-12-24 15:30:59 +00:00
Hermès Bélusca-Maïto 81c28dca92 Oups, forgot to link against advapi32 too (for registry functions) xD
svn path=/branches/ntvdm/; revision=61371
2013-12-24 13:48:39 +00:00