Commit Graph

56 Commits

Author SHA1 Message Date
Jonathan Campbell
88a99c1226 Update Tandy emulation vs memsizekb setting, add FIXME reminders, etc 2021-03-22 23:22:52 -07:00
Allofich
9294d450ec SVN r4412
Update copyright.
2021-03-06 21:18:08 +09:00
Emmanuel Gil Peyrot
a431d81213 Replace Bit16u with uint16_t 2020-09-28 17:14:35 +02:00
Emmanuel Gil Peyrot
35f38f3ebe Replace Bit8u with uint8_t 2020-09-28 17:14:35 +02:00
Wengier
b447cce3a0 more 2020-08-25 22:13:06 -04:00
rderooy
6c0d02201d Update (c) year and FSF address 2020-06-25 09:25:24 +02:00
Wengier
4ebfc59c0d save state etc 2020-06-03 21:46:48 -04:00
Allofich
46e6fc20b1 Type-conversion warning fixes 2019-06-29 22:51:44 +09:00
Allofich
57d8f8e59a SVN r4218
Use a more compatible offset for DOS redirected interrupt vector. Works
around a null pointer bug in the notes dropdown list of Jack the Ripper.
2019-06-11 21:53:29 +09:00
Allofich
d84a812743 SVN r4183 (second half)
Update year
2019-06-03 23:01:41 +09:00
Allofich
05619dd023 SVN r4183 (first half)
Update address of FSF
2019-06-03 22:54:46 +09:00
Allofich
fb067a7331 SVN r4164
Remove 128k PCjr faking from r2417 that was effectively disabled by
r3420.
2019-06-02 18:17:25 +09:00
Allofich
3ee77b9f49 SVN r4063
Remove some unnecessary things from prior commits
2019-05-21 23:25:01 +09:00
Allofich
bab71f6f33 SVN r4046
Point DOS redirected interrupts at a plain IRET as in real DOS. Prevents
erroneous detection of an active debugger, which for example fixes sound
in Microleague Football 2.

(Note: The fix for Microleague Football 2 was already handled in
DOSBox-X through an on-by-default option, but this commit adds the
missing parts of this SVN commit)
2019-05-19 17:22:12 +09:00
Allofich
575ba6749d SVN r3895 (partial)
Coalesce free memory blocks before resizing a block in case it grows; coalesce after resizing only if the block shrinks.
2019-04-30 15:38:09 +09:00
Jonathan Campbell
f459a42639 fix freetype vcxproj 2019-04-02 20:48:10 -07:00
Jonathan Campbell
2f5ca954c4 more 2019-03-31 01:21:40 -07:00
Jonathan Campbell
3810ea5086 compiler warning fixes 2018-12-23 20:18:32 -08:00
Jonathan Campbell
066e80f599 DOS: XMS setup initializes the proper size for UMB region, do not re-initialize again. This fixes problems in PC-98 mode where booting a guest OS unmaps the UMB region AND the PC-98 SOUND ROM BIOS (overlap) 2018-11-18 07:22:57 -08:00
Jonathan Campbell
297d120f86 change default again, comment on what needs to be done for the dummy MCB to work 2018-06-21 07:29:21 -07:00
Jonathan Campbell
d80ee65e3a remove loadfix padding and dummy environ block options 2018-06-21 07:22:14 -07:00
Jonathan Campbell
74489724f9 Wtype convert 2018-06-01 11:44:29 -07:00
James Ye
98f3783f75 Fix potential format string vulnerabilities
This allows compiling with `-Werror=format-security', which is required
for packaging in many GNU/Linux distributions.
See https://en.wikipedia.org/wiki/Uncontrolled_format_string for more
information.
2018-03-21 10:19:46 +11:00
Jonathan Campbell
fe92051abc DOS: A corrupt MCB chain should trigger the debugger and a restart of the DOS kernel, rather than aborting the emulator, if the debugger is available 2018-03-15 09:35:33 -07:00
Jonathan Campbell
e0c7bcb39d UMB: Use the actual EMS page frame, don't assume 0xE000. 2017-12-24 13:05:09 -08:00
Jonathan Campbell
324261df1f DOS unsetup memory 2017-04-01 13:24:59 -07:00
Jonathan Campbell
94c2345b27 convert some LOG_MSG()s to LOG(..,..) for logging cleanup. demote some
log entries to debug level.
2015-12-28 16:24:35 -08:00
Jonathan Campbell
ee467a1151 bugfix: new option (default true) that points INT 1 and INT 3 directly
at the IRETF instruction to appease paranoid DOS games and demos. If INT
1 or 3 point to anything other than IRET some games/demos think they are
being debugged and will bail out. Bugfix for "Digital Dreams" demo.
2015-04-03 13:25:38 -07:00
Jonathan Campbell
ad5f9e456f bugfix: if you can't allocate the EMS system handle, then don't enable
VCPI, the handle memory location is invalid. This fixes memory
corruption within realmode segment 0x1E8-0x507 when memsize=1.
2015-03-23 06:41:37 -07:00
Jonathan Campbell
cbc0b743dc fix UMB mapping for EMS and PCjr cases. don't assume 64KB. 2015-02-15 23:15:12 -08:00
Jonathan Campbell
1ea24c81ee allow user to remove some "padding" and "fake" MCBs from the base of
conventional memory.
2015-02-15 21:29:27 -08:00
Jonathan Campbell
da3104d10d prepare MCB setup for some work 2015-02-15 21:07:13 -08:00
Jonathan Campbell
a40e5b25ae show name, too 2015-02-03 13:11:54 -08:00
Jonathan Campbell
f40c136a8b improve MCB dump 2015-02-03 13:02:18 -08:00
Jonathan Campbell
3534cf0c94 On corrupt MCB chain, print it to show us where! 2015-02-03 12:21:40 -08:00
Jonathan Campbell
9b92cae895 If resizing to make the block larger, coalesce free dos blocks following
the one to resize.
2015-01-26 16:03:30 -08:00
Jonathan Campbell
7e4901bb3c add utility param to DOS_CompressMemory() so that it can be instructed
to only coalesce free blocks past a certain segment instead of all
blocks.
2015-01-26 15:08:50 -08:00
Jonathan Campbell
d1688b42eb svn mainline r3882:
------------------------------------------------------------------------
r3882 | ripsaw8080 | 2015-01-06 09:48:07 -0800 (Tue, 06 Jan 2015) | 1
line

Coalesce free memory blocks after resizing a block rather than before.
Fixes some MicroProse games on the Tandy machine type. Also add error
exits in case of a corrupt MCB chain instead of hanging in an infinite
loop.
------------------------------------------------------------------------
2015-01-25 21:34:27 -08:00
Jonathan Campbell
ffbad0b2b3 svn mainline r3878:
Year update.
2015-01-25 21:13:25 -08:00
Jonathan Campbell
369eea9f41 debug/helper option: add new option that, if set, zeroes memory blocks
returned by INT 21h prior to returning the block to the application.
This option is intended for DOS games or demos that may have problems
with uninitialized variables in the DATA or STACK segments. At the very
least, it helps prevent the vectorball part of Second Reality from
crashing.
2015-01-17 03:35:57 -08:00
Jonathan Campbell
ea1a0300ba add configuration option where, if machine=cga or machine=hercules, the
640kb conventional memory area could be extended out to just below
CGA/Hercules video RAM (736KB CGA, 704KB Hercules).
2014-06-11 01:45:43 -07:00
Jonathan Campbell
82a51d1e92 Now that NMI emulation is complete, remove IRQ 6 pseudo-NMI hack for
PCjr and reimplement PCjr keyboard as actual NMI interrupt for accuracy.
2014-06-08 15:59:49 -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
e77b8abff3 DOS MCB debugging: Instead of just exiting with "MCB list corrupt", show
the MCB list on STDERR before shutdown so that I can see where it got
corrupted.
2014-04-23 16:32:27 -07:00
Jonathan Campbell
b41bc5f3f6 remove "invalid link state" call. it makes me think that the UMB chain
is invalid when all that happened is a DOS program (Open Watcom 1.9 DOS
installer) called AX=0x5803 with an invalid BX value.
2014-03-30 17:24:50 -07:00
Jonathan Campbell
4802c37c6e update code to lower minimum to 4KB. 2014-03-23 20:26:55 -07:00
Jonathan Campbell
654758ea5f allow 8KB minimum after all. 2014-03-23 19:01:05 -07:00
Jonathan Campbell
8320c36236 fix up DOS execute function to dynamically choose COM stack pointer
value rather than assume 0xFFFE. The choice is based on the size of the
memory block allocated for the image, which means that if there's plenty
of RAM, then SP=0xFFFE anyway, BUT, if the memory block is smaller, the
stack pointer is assigned the largest value (minus 2) that fits within
the memory block. Doing this resolves the random crashes that occured
with most DOS programs, including DOSBox's builtin commands, when less
than 72KB of RAM was assigned. Because of this fix, it is now possible
to assign as little as 16KB of RAM and run without crashing. Programs
that still fit work fine. Programs that are too large silently fail.
Programs that can load, but cannot allocate the memory they need, error
out fine without crashing.

Because of this fix, the check in the DOS memory setup code has been
modified to set the minimum to 16KB instead of 72KB.
2014-03-23 18:21:37 -07:00
Jonathan Campbell
d8476654ad add define to debug alloc/free memory allocation. also added code to
disable "minimum memory requirement" error if you do so.
2014-03-23 17:39:02 -07:00
Jonathan Campbell
99d57f1a0c note DOSBox emulator instability below 72KB 2014-03-23 16:57:07 -07:00