Commit Graph

15759 Commits

Author SHA1 Message Date
Jonathan Campbell
08cdbe0258 remove I/O port 0x1F7 debug break. don't remember why I added that. In
any case removing it resolves the need to restart the emulation every
time MS-DOS drivers read port 0x1F7
2014-01-31 22:55:41 -08:00
Jonathan Campbell
a0f82a721b add a20 gate emulation options: DOSBox behavior "fast" aka remap only
the first 64KB @ 1MB, "mask" aka use RAM alias handler to accurately
emulate the gate, as well as "on" and "off" to emulate scenarios where
A20 is locked on or off.
2014-01-31 18:47:57 -08:00
Jonathan Campbell
13aa2844a0 fix timidity MIDI 2014-01-25 20:15:39 -08:00
Jonathan Campbell
83b58f4f04 Win32 build finished. VS 2008 can be a bitch at times, but got it to work. 2014-01-25 19:59:45 -08:00
Jonathan Campbell
1d34164d31 more plans 2014-01-22 14:11:21 -08:00
Jonathan Campbell
0969e2d33d PIT hack for Impact Studios "Legend" demo. It turns out the time source
the demo is using for animation is NOT PIT timer #0, but PIT timer #2.
Yes, the one normally used to drive your PC speaker. And it doesn't let
it tick so much as it uses it for a delay loop. DOSBox's emulation
apparently counts down too slow, which is why the demo runs too slow.
The PIT hack written for it forces the value to count down faster,
allowing the demo to run at full framerate.
2014-01-21 23:14:48 -08:00
Jonathan Campbell
b95dd54e56 convert some duplicate code (in counter_latch) to a single block that
does the same thing (and without the potential overflow error).
2014-01-21 22:07:37 -08:00
Jonathan Campbell
f8c9d34fe0 remove now-invalid debug message 2014-01-21 21:52:19 -08:00
Jonathan Campbell
faf8daae2c add reminder 2014-01-21 20:40:57 -08:00
Jonathan Campbell
34aecc57cf update DOS_GetMemory() to carry with it a string to convey the purpose
of the allocation.
2014-01-21 15:01:00 -08:00
Jonathan Campbell
7857c9566b more bug commentary: apparently the crashes some demos exhibit if run
twice are related to the ability to choose the private area size,
meaning that if the private area is too small, the demo (or DOSBox?)
causes memory corruption or overruns the buffer?
2014-01-21 10:01:21 -08:00
Jonathan Campbell
7b170275e9 more bug notes 2014-01-21 09:40:37 -08:00
Jonathan Campbell
8f4a02200b more bug commentary 2014-01-21 03:00:07 -08:00
Jonathan Campbell
e9561251df Plenty of blather. Got some good ideas. 2014-01-20 19:22:14 -08:00
Jonathan Campbell
c00f3a7da0 change "multiscan" name to "doublescan", clarify it's purpose, make it
set by default.
2014-01-20 16:37:05 -08:00
Jonathan Campbell
ac418dd09a more notes 2014-01-20 15:48:37 -08:00
Jonathan Campbell
a667218c59 more bugs and notes written 2014-01-20 15:02:23 -08:00
Jonathan Campbell
334338cd6b options to disable tables need to be marked as changeable only at start,
not changeable when idle.
2014-01-20 02:04:54 -08:00
Jonathan Campbell
e14df6bbcd added code to allow disabling the collating and uppercase tables. 2014-01-20 02:03:39 -08:00
Jonathan Campbell
81b44d29ac added option to enable/disable filenamechar table 2014-01-20 01:58:57 -08:00
Jonathan Campbell
fb055a3d35 added code to make DBCS table optional (though enabled by default) 2014-01-20 01:54:05 -08:00
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