585 Commits

Author SHA1 Message Date
Jonathan Campbell
f1d10dbea0 mount command now accepts -q option to not print anything unless error. 2015-04-09 03:48:52 -07:00
Jonathan Campbell
532e65dd38 imgmount: call FDC code to assign FDC devices to IMGMOUNT drive A: and
B:
2015-02-22 14:15:26 -08:00
Jonathan Campbell
a7dc7c3cf4 remove clock domain code, at the moment, not used, will rearchitect. Add
code to log message (in debug builds) whenever PIC_FullIndex() jumps
backwards. This jumping backwards needs to be fixed, I suspect it's the
source of some timing bugs in demos.
2015-02-02 00:16:13 -08:00
Jonathan Campbell
94da724d67 fpu.cpp printf fixes 2015-01-31 08:34:04 -08:00
Jonathan Campbell
cfeade91a3 svn mainline r3879 (ripsaw8080):
"The emulated floppy drive does not use DMA, but make it look like it
does when booting. Fixes CGA graphics in the Demon's Forge booter."

This change is not exactly what ripsaw posted, but was adapted to fit
the DOSBox-X boot design as best as possible.
2015-01-25 21:20:23 -08:00
Jonathan Campbell
ffbad0b2b3 svn mainline r3878:
Year update.
2015-01-25 21:13:25 -08:00
Jonathan Campbell
50745f3baa svn mainline r3876:
Add missing error message.
Rewrite CDRom to CD-ROM for consistency.
2015-01-25 21:05:28 -08:00
Jonathan Campbell
0d2e1023c0 add configure option (disabled by default) to enable the 50ms delay
between VGA mode changes that DOSBox normally does by default. Hopefully
now when I do DOS demoscene captures, I don't get junk frames anymore
whenever mode changes are involved. It is an option you want to enable
in some cases, like when running weird demos like DoWhackaDo.

Also added code to better addref/release disk images on disk/CD
swapping, which fixes the segfault I observed running Windows 95 with
two ISO images attached.
2014-12-23 01:34:12 -08:00
Jonathan Campbell
c4fad6c14f addref/release for floppy images 2014-10-11 01:36:35 -07:00
Jonathan Campbell
1e3e43bc1f core NMI (Non-maskable interrupt) emulation added. NMITEST program added
to allow user to trigger one delibrately.
2014-06-08 15:42:24 -07:00
Jonathan Campbell
7dca83f1e5 replace all fprintf(stderr,... calls with calls to LOG_MSG 2014-05-19 15:51:52 -07:00
Jonathan Campbell
4783dec70b BOOT: throw an exception (throw int(2)) to force stack to unwind back
down to SDLMain(). Move DOS kernel shutdown and guest OS boot to
SDLMain(). The idea is to avoid having the DOS_Shell and AUTOEXEC
objects active in the call stack while running a guest OS.
2014-05-19 04:06:13 -07:00
Jonathan Campbell
f3d764e48e El Torito bootable CD-ROM support added to IMGMOUNT command. At this
time, only floppy emulation is supported. The idea is that, since you
can imgmount a floppy with -fs none, then "boot -l a" from it, the added
code allows you to boot El Torito CDs with floppy emulation like this:

imgmount d: some_cdrom.iso -t iso -fs none   # mount CD-ROM to D:
imgmount 0 -el-torito d: -t floppy -fs none  # mount El Torito floppy image on CD as drive A:
boot -l a                                    # boot OS from emulated floppy

I'm proud to announce that the code as written now is sufficient to boot
from an old Windows 98 install CD I made years ago when CD burners had
just come out (floppy emulation).

Up next: adding the same El Torito code to the BOOT command so that the
user can also boot the emulated floppy directly like this:

imgmount d: some_cdrom.iso -t iso -fs none   # mount CD-ROM to D:
boot -cdrom d                                # boot OS from CD-ROM (El Torito code will automatically infer floppy emulation)

And if I have time today, I will also add beta support for the "no
emulation" mode newer CDs tend to use so that Linux distros and
Windows XP can boot, along with the various INT 13h functions involved
with the El Torito support.
2014-05-04 10:17:24 -07:00
Jonathan Campbell
fd4e4a8f50 a LOT of modifications to IMGMOUNT command to accomodate -el-torito, and
to NOT require a path if -el-torito is given. Code is complete only far
enough to scan the ISO 9660 volume descriptors and locate the El Torito
structure.
2014-05-04 00:09:38 -07:00
Jonathan Campbell
b830248614 BOOT command cleanup 2014-05-03 22:55:15 -07:00
Jonathan Campbell
d7f97516a1 whoops! OS booter did not leave BIOS drive in DL as some bootloaders
expect it to. This fixes problems booting ReactOS.
2014-04-27 21:43:30 -07:00
Jonathan Campbell
5ae47920bb remove more DISP2 code 2014-04-25 21:19:58 -07:00
Jonathan Campbell
bcd404dbfc BOOT command updated to uninstall and remove INT 2Ah and INT 2Fh vectors
before booting guest OS.
2014-04-25 08:28:55 -07:00
Jonathan Campbell
a3d3f7c4c9 Valgrind hunting: rewrite PROGRAMS code to better track their resources,
including the tiny amount of memory used to generate the executable
"stub". this eliminates the many tiny memory leaks reported by Valgrind
here.
2014-04-22 18:33:21 -07:00
Jonathan Campbell
2a164a5ad2 BOOT command now shuts down on booting a guest OS:
- EMM Expanded Memory Manager emulation
 - XMS Extended Memory Manager emulation
 - The DOS kernel object (INT 21h is not needed for guest OS)
 - SBLASTER and GUS environment variables (destructors for
   Autoexec objects were responsible for writing to memory and
   triggering page faults from within 32-bit OSes on shutdown).

These changes appear to have resolved the issue of Instant Page Fault
BSODs with NT when you use DOSBox's kill switch.
2014-04-21 14:58:03 -07:00
Jonathan Campbell
640d08e2b2 Updated BOOT command to disable INT 33h as part of boot process (INT 33h after all is a DOS-specific API).
Modified mouse movement API NOT to call INT10_SetCurMode() function unless
emulating INT 33h where it matters. The purpose apparently of the
INT10_SetCurMode() call is to help manage what MOUSE.COM would do to map
mouse coordinates to DOS screen coordinates. INT10_SetCurMode() uses
real_readb() which when running Windows NT instead causes a serious case
of recursive page faults and a bad system crash. Not calling
INT10_SetCurMode() in a guest OS ensures this crash no longer happens.
2014-04-16 23:56:17 -07:00
Jonathan Campbell
bdd8b4036b add SHOWGUI.COM to DOSBox's internal command set so that it is possible
to pull up the GUI without fiddling around with the keymapper to trigger
it.
2014-03-29 10:02:35 -07:00
Jonathan Campbell
ee361cea04 add TODO and comments so far on how much RAM is needed to boot various
versions of PC/MS-DOS.
2014-03-23 20:50:10 -07:00
Jonathan Campbell
b6dedd76a4 BOOT: some modifications to stack value on setup. change hard-coded
0x7C00 offset to variable that is set to 0x7C00. Add code to refuse
booting a guest OS if less than 32KB of RAM is being emulated (the IBM
PC boot process requires 32KB of RAM). added TODO where the user should
be able to override that lockout if they feel adventerous.
2014-03-23 19:57:14 -07:00
Jonathan Campbell
05735c0807 BOOT: pick a more appropriate segment value than simply assuming 0x7000
to ensure that it points to RAM. Prior to this fix, SS could point to
unassigned RAM if less than about 500KB was allocated for emulation.
2014-03-23 19:28:36 -07:00
Jonathan Campbell
250371e11a add "dos_kernel_disabled" flag. added code to "BOOT" command to set this
flag so that other parts of the program have a way to know the DOS
kernel is no longer in charge. Added code to Program::SetEnv() and other
environment block code to fail and print a BUG message if emulator code
attempts to modify the environment block if the DOS kernel is disabled,
since, once the guest OS boots, that environment block is probably long
gone by then and overwritten. This fixes a bug I found where if you set
the memory size to 246KB or less, boot PC-DOS 1.0, and then hit CTRL+F9
to terminate the emulator, the emulator will instead run through
thousands of "illegal memory read" messages as code within the emulator
does a string scan from what is obviously now unmapped or overwritten
memory.
2014-03-23 16:30:50 -07:00
Jonathan Campbell
7d4ea49a60 new clock domain code, ISA BCLK/OSC and PIT timer clock domains,
diagnostic command to list them.
2014-02-02 02:28:10 -08:00
Jonathan Campbell
38d20d6fcc VFRCRATE and CGASNOW programs: removed STOP functions (not used)
Added A20GATE builtin command to change A20 masking emulation at
runtime.
2014-02-01 10:24:25 -08:00
Jonathan Campbell
0093d5869c fixup case where dynamic alloc=false and private area in umb=false cause
issues.
2014-01-19 03:02:07 -08:00
Jonathan Campbell
58166b78f8 added code to also unmap the private data area on boot (since it is no
longer used). added code to call PAGING_FlushTLB() to ensure that
changes to the memory map take effect. Prior to the fix, the code
changed the map to unmap the regions but the memory was still accessible
because of TLBs.
2014-01-18 20:51:08 -08:00
Jonathan Campbell
c5592a17d5 added code and option params to enable/disable the UMB block when you
boot an operating system. Mainline DOSBox behavior is to leave it up
there, while DOSBox-X now defaults to unmapping the UMB (since the OS
will not know it's there and will probably confuse it with adapter ROM).
2014-01-18 20:35:24 -08:00
Jonathan Campbell
32e0e40dde add mount option and support in INT 13h code for "reserved cylinder"
emulation
2013-10-21 01:30:58 -07:00
Jonathan Campbell
f1e4e69b0c remove PHYSFS support 2013-10-20 00:38:55 -07:00
Jonathan Campbell
21614b8c3f toss out my copy, integrate tawoongs's daum branch code into mine,
remove what won't compile, begin work.
2013-10-14 05:07:26 -07:00
root
f331824031 port from svn 2013-07-07 20:39:49 -07:00