138 Commits

Author SHA1 Message Date
Jonathan Campbell
da741b4671 Update comments. 2014-01-19 22:07:21 -08:00
Jonathan Campbell
51a9b69549 pit hack is now changeable at runtime, using the "pithack" command in
DOSBox's built-in shell.
2014-01-19 22:00:48 -08:00
Jonathan Campbell
892809ecb4 PIT hack parameter added. Demo or game specific hacks can be applied to
PIT emulation via pit hack= DOSBox config file param. Added PIT hack for
Project Angel. When the PIT timer is written, the value is forced to one
of two values (18.2Hz or 421Hz). Considering that the demo is constantly
fiddling around with the timer in ways it can lose stability, this
forces the demo to run properly and resolves quite a few issues with
DOSBox.
2014-01-19 21:50:59 -08:00
Jonathan Campbell
36ccd5b6a1 remove VGA savestate stuff 2014-01-19 20:47:00 -08:00
Jonathan Campbell
0c86569f1f More comments 2014-01-19 20:34:08 -08:00
Jonathan Campbell
a328c4a61a Start in-tree BUGS and NOTES documentation. 2014-01-19 19:25:49 -08:00
Jonathan Campbell
59255870e2 update dosbox.cpp to default to char9=true and linewise=true 2014-01-19 18:38:26 -08:00
Jonathan Campbell
f98f3c94a3 modify DOS segment allocation to start at 0x50 (if not compatible)
instead of 0x80 to open up 1KB more RAM. Modified IHSEG code in
dos_memory to choose segment from dos.cpp allocation instead of assuming
segment 0x70.
2014-01-19 15:22:14 -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
b4b464842d added option and code to allow the private DOS segment to be located
below 640KB (within the DOS kernel structures) instead of being placed
in the UMB as mainline DOSBox does.
2014-01-19 02:24:29 -08:00
Jonathan Campbell
2c02248d52 added option to enable dynamic DOS kernel allocation. updated code so
that when option is set, the private data segment is given to all RAM
from a base segment, then DOS kernel structures are allocated from it,
and then, at the stage where the MCB system is first built, direct the
private segment back up to it's original location (private segment
allocations prior to that point naturally take their place bottom up).
Fixed XMS driver to correctly handle the dynamic case. So far as I can
tell, the dynamic mode does not cause any problems, not even with
Windows 3.1.
2014-01-19 01:53:21 -08:00
Jonathan Campbell
deade54d7f added configuration option to ignore illegal opcode 0x63 (meaning: don't
print anything about it) so that the illegal opcode message is not so
noisy when running Windows.
2014-01-18 21:12:46 -08:00
Jonathan Campbell
295e9f3b6b more unmapped handler code for adapter ROM. 2014-01-18 20:56:19 -08:00
Jonathan Campbell
8aea017850 change unmapping of adapter ROM, use "unmapped" page handler. this
eliminates a long string of "illegal read" messages because most OSes
are likely to scan those areas for adapters.
2014-01-18 20:55:16 -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
d7bfa9dd8f CMOS bugfix: check against integer underflow that can falsely report
64MB of RAM if memory size is less than 1MB.
2014-01-18 20:10:43 -08:00
Jonathan Campbell
020f1928cf BIOS extended memory functions: add assert() to make sure E280 map does
not have integer underflow.
2014-01-18 20:07:34 -08:00
Jonathan Campbell
7a53d82c82 BIOS bugfix: write correct memory amount to BIOS data area instead of
assuming 640KB. If you are using memsizekb to represent less than 640KB
this fix makes sure the BIOS is reporting it.
2014-01-18 20:02:25 -08:00
Jonathan Campbell
d1d3dd9607 add commentary about INT 10 modifications 2014-01-18 19:48:41 -08:00
Jonathan Campbell
8d8621f4c6 re-add VGA BIOS code to map the ROM. src/hardware now chooses BIOS size
emperically based on "compatible mapping". Added dosbox.conf setting to
allow overriding the VGA BIOS size. Re-added code to choose private area
segment and position it just past the VGA BIOS. Project Angel is happy
this time, Windows 95 no longer causes numerous "illegal memory read"
errors. So far, so good.
2014-01-18 19:36:18 -08:00
Jonathan Campbell
6dea0d11d4 undo VGA BIOS hack, apparently that broke Project Angel (and it made a
mess too). Retain the dynamic UMB and private space alloc.
2014-01-18 18:51:44 -08:00
Jonathan Campbell
2f3e09b356 Added code to autosize VGA BIOS first, then pick private space, and then
UMB block. When compatible mapping is disabled, it helps pack adapter
ROM usage down and allows up to 176KB of extra space should DOS programs
use any UMBs.
2014-01-18 18:28:57 -08:00
Jonathan Campbell
3db3ec4105 VGA BIOS emulation updated to either take 32KB (mainline emulation) or
take only what the BIOS actually needs.
2014-01-18 18:00:29 -08:00
Jonathan Campbell
68e1c99b20 add settings to enable "compatible mapping". add code to allow resizing
the private area. add code to map with it.
2014-01-18 17:40:34 -08:00
Jonathan Campbell
fa43e4b203 move fixed global constants defining segments into dos.cpp and make them
variables. We're going to allow for dynamic mapping later.
2014-01-18 16:56:36 -08:00
Jonathan Campbell
1754a6caf5 updated comments about apparently data at 0xD000. It turns out what
DOSBox was doing at 0xD000 was emulating Upper Memory Blocks. Added code
to memory handler to default map out those pages, then allow the XMS
driver to map them back to RAM. Added options so that you can control
the UMB region and size from dosbox.conf.
2014-01-18 16:19:33 -08:00
Jonathan Campbell
4d0e86801f split DOS_GetMemory() to make BIOS_GetMemory() which allocates from a
region in the 0xF000 segment instead of DOSBox's private segment at
0xC800. Corrected language regarding realbig16, the B (big) bit hack
doesn't allow for 32-bit real mode code, it only allows the code segment
to extend past 64KB (huge real mode).
2014-01-18 15:18:46 -08:00
Jonathan Campbell
c82c414c05 adapter ROM is RAM setting (beginnings of fixing up private area, etc.)
acknowledged in my code that mapping out D000:0 only causes minor but
possibly significant faults with BIOS routines in F000:0 (would that be
what killed DOSBox-X2?)
2014-01-18 14:56:18 -08:00
Jonathan Campbell
03c919a51f incorporated cpu.diff from DOSBox forums to allow B (big) mode real mode
DOS demos like Project Angel. To explain: the demo apparently relies on
the same protected mode hack DOS demos usually do to enable Flat Real
Mode, but Project Angel also uses it to enable the B bit to effectively
set up a 32-bit flat real mode (32-bit code in real mode!). At least
that's what I think it's doing. It would explain all the complaints
about not being able to run the demo, and why this patch makes it work.

People (rightfully so) complained that the patch might break virtual
8086 mode emulation. I'm also concerned about whether or not this patch
breaks anything, so the patch is conditional: it's there if you enable
it by setting realbig16=true in the [cpu] section of your dosbox.conf,
otherwise, DOSBox-X retains original behavior of always clearing the BIG
bit in the code segment cache.
2014-01-18 11:44:59 -08:00
Jonathan Campbell
d3033a5f85 force default scaler to normal2x. change memory emu so adapter ROM is
0xFF not 0x00 (but only in select areas).
2014-01-16 07:39:48 -08:00
Jonathan Campbell
70c51c4239 rename debug.com image to debugx.exe to avoid conflicting with DOSBox-s
debug command.
2014-01-15 23:54:31 -08:00
Jonathan Campbell
48016b028a add hexmem utility as built-in. 2014-01-15 23:51:55 -08:00
Jonathan Campbell
d32155ec68 incorporate DEBUG.COM (from FreeDOS) as built-in binary image. 2014-01-15 23:38:09 -08:00
Jonathan Campbell
ae0c1003bf remove unused savestate stuff 2014-01-14 22:33:29 -08:00
Jonathan Campbell
89ba64bf54 remove unused DMA code 2014-01-14 22:32:48 -08:00
Jonathan Campbell
0c84383c0b disable debug stuff again 2013-12-01 20:05:17 -08:00
Jonathan Campbell
4135ba554c fix the MODE SENSE reporting format 2013-12-01 19:47:36 -08:00
Jonathan Campbell
e2ecd906e1 more work 2013-12-01 14:18:52 -08:00
Jonathan Campbell
2eac37a643 IDE: remove CD playback from stopping playback when len == 0 2013-12-01 12:56:23 -08:00
Jonathan Campbell
91e441ba74 CD playback---it works!!!! 2013-12-01 12:32:34 -08:00
Jonathan Campbell
e95d1d86e1 mode sense completion 2013-12-01 11:29:31 -08:00
Jonathan Campbell
78df391653 more work. mode sense 2013-12-01 11:11:50 -08:00
Jonathan Campbell
2a067a48e6 ide: add CD audio emulation, work towards getting Win95 to play audio
CDs, fixup TOC function to return full TOC
2013-12-01 01:56:18 -08:00
Jonathan Campbell
2da0b80b08 move commands to functions 2013-12-01 00:17:19 -08:00
Jonathan Campbell
29315ee150 ide: autoincrement bugfix for LBA mode. ide command printing now prints
lba sector number if lba mode, chs otherwise
2013-11-16 01:04:22 -08:00
Jonathan Campbell
2c8db646a8 ide: update identify 2013-11-16 00:46:31 -08:00
Jonathan Campbell
01c059892f ide: add code to emulate INITIALIZE DRIVE PARAMETERS 2013-11-16 00:34:50 -08:00
Jonathan Campbell
168c97310e add "apmbios" configuration option to enable/disable the APM BIOS
emulation
2013-11-15 23:39:42 -08:00
Jonathan Campbell
0d6699b956 ide: fire the right IRQ instead of IRQ 14 2013-11-15 21:13:50 -08:00