dmsc / emu2

Simple x86 and DOS emulator for the Linux terminal.
GNU General Public License v2.0
406 stars 31 forks source link

Various DOS Program Bugs under emu2 #39

Closed johnsonjh closed 2 years ago

johnsonjh commented 2 years ago

~I haven't looked into causes myself, but perhaps I can this weekend.~

~I can also split these into separate issues, if you prefer.~ (Done)

johnsonjh commented 2 years ago

~And one more, using VEDIT PLUS v4.12 (12/07/94) under emu2, the first directory entry appears twice in listings, and the '..' entry does not appear, so you cannot navigate back into the parent directory you started from:~ (Moved) ~Edit: I did not try later versions of VEDIT. VEDIT 6 requires a 386, and I haven't locate VEDIT 5 yet.~

dmsc commented 2 years ago

Hi!

Yes, I would prefer separate issues, as it is easier to track progress.

I fixes this in the last commits, a2d052926f1208344a57f50d20f215a5c693f39d fixes the PKZIP screen output, d17699c9d6111d021c9dd868796e7355df749a06 fixes PKCFG program.

This programs loops reading the CGA registers, counting the horizontal retraces, currently emu2 simply fakes the values, so it won't work without some complex video emulation.

Have Fun!

dmsc commented 2 years ago

Hi!

  • IBM MYMENU (part of IBM Professional Editor II V1.35) does not start.

This program expects the timer interrupt to trigger before starting. Fixed in e9c17a9df4f2fd70abbd8c2cbcc4f16dc7e7b66c

  • IBM Professional Editor II V1.35 (after un-EXEPACK'ing or LOADFIX) works fine for all editing functions, but locks up when attempting to display directory listings.

The program has a bug, it does not support more than 32767 clusters free in the disk, and locks-up if any higher number is available. This patch make it work:

diff --git a/src/dos.c b/src/dos.c
index 58ae440..0602418 100644
--- a/src/dos.c
+++ b/src/dos.c
@@ -1410,7 +1410,7 @@ void int21()
         break;
     case 0x36: // get free space
         cpuSetAX(32);     // 16k clusters
-        cpuSetBX(0xFFFF); // all free, 1GB
+        cpuSetBX(0x7FFF); // all free, 512MB
         cpuSetCX(512);    // 512 bytes/sector
         cpuSetDX(0xFFFF); // total 1GB
         break;

Perhaps I will apply this, I don't know if other programs rely on the disk free information.

Have Fun!

johnsonjh commented 2 years ago

~@dmsc~

~Wow, great work - you're fast and halfway down the list!~

~I was going to split it out into different issues, but I'll wait until tomorrow?~

~Perhaps for the Professional Editor patch you mention above, a better thing to do would be an option similar to EMU2_LOWMEM ... maybe EMU2_SMALLDISK?~ (Moved)

johnsonjh commented 2 years ago

~I'll move the remaining now.~ (Done)

johnsonjh commented 2 years ago

Split into separate issues:

  1. https://github.com/dmsc/emu2/issues/44
  2. https://github.com/dmsc/emu2/issues/43
  3. https://github.com/dmsc/emu2/issues/42
  4. https://github.com/dmsc/emu2/issues/41
  5. https://github.com/dmsc/emu2/issues/40