Comments (9)
Hello @andrewbird,
Hmm... this is one area where Ralf Brown's Interrupt List turns out to be wrong. (It says "the parent PSP field is set to 0", but that is only the case for MS-DOS 1.x.)
Thank you!
from kernel.
@tkchia , I can't claim to understand the full significance of the parent PSP field, as I remember @stsp was looking for a problem with the PSP on FDPP and asked me to write a test to establish the values on several flavours / versions of DOS. This test was the result of that investigation and has remained within the test suite since. I have some other failing tests with FreeDOS GIT around FCB file functions when using wildcards, but I'll wait until later to see how easy it is to document those in a manner that doesn't require people to run dosemu and the test suite itself.
Thank you!
from kernel.
Please refer to this comment:
dosemu2/fdpp#112 (comment)
But I don't think it is possible to
get this game to work on freedos.
The problem with zeroed out PSP
is just one of many tricks it does
to detect the DOS clones. I think
me and Andrew spent many months
on reverse-engineering the full scheme.
from kernel.
Hello @andrewbird, hello @stsp,
@tkchia , I can't claim to understand the full significance of the parent PSP field, as I remember @stsp was looking for a problem with the PSP on FDPP and asked me to write a test to establish the values on several flavours / versions of DOS.
Hmm... I decided to look at the open-sourced MS-DOS 1.x and 2.x code a bit.
It seems that DOS 1's command.com
uses the int 0x21
, ah
= 0x26
syscall to create a new PSP when running a child program.
- (Yes — in DOS 1, the code to start a new child process is in the interpreter, not the kernel.)
- Basically the call just copies whatever is in the current process's PSP (which
cs
is assumed to point to...). - I do not think any DOS 1.x programs actually depend on their PSP's "parent PSP" field being any particular value.
As for MS-DOS 2.x, its exec
syscall (int 0x21
, ah
= 0x4b
) is actually internally implemented in terms of several other syscalls, one of them being int 0x21
, ah
= 0x55
.
- Unlike
0x26
, this will specifically create a child PSP, whose "parent PSP" field points back to the current process's PSP. - (In addition, RBIL says that "the reference count for each inherited file is incremented".)
So — on second thought — my current guess is, in terms of documented behaviour, there is no actual guarantee that the parent PSP that comes out of ah
= 0x26
should be any particular value. It will probably be a "good-to-have feature", but not super-essential, to make FreeDOS's behaviour match that of MS-DOS in this case.
But I don't think it is possible to get this game to work on freedos.
Well, games that do anti-debugging tricks to try to detect emulators are always interesting... :-)
Thank you!
from kernel.
Our ticket ends on anti-debugger tricks,
but elsewhere we analyzed lots of tricks
to detect dos clones (like resizing psp
to 0 and many more).
DOS is full of undocumented behaviour,
so I do not support your judgement
based on that, but unless you can make
the whole game to work, this is indeed
absolutely unimportant to support.
from kernel.
Hello @stsp,
Well, important or not, I have submitted a pull request... :-) Thank you!
from kernel.
The test case passes now, which pleases me greatly!
ajb@polly:/clients/common/dosemu2.git$ test/test_dos.py FRDOSGITTestCase.test_create_new_psp
Test FR-DOS-GIT Create New PSP ... ok ( 3.11s)
----------------------------------------------------------------------
Ran 1 test in 3.137s
OK
Thank you!
from kernel.
Then you may as well dig the rest of
the changes to get the aforementioned
game working. Which would be an
interesting quest, as there were lots of
false-starts, reverted changes etc.
That game was a real pita.
Lets see if you can. :)
from kernel.
The patch is now applied.
Thank you!
from kernel.
Related Issues (20)
- FAT32 loader installed by FreeDOS SYS with /OEM:EDR doesn't correctly pass the load unit in DL (and vice versa) HOT 1
- fdconfig.sys SHELL=4debug.com will try to load debug.com HOT 3
- Wrong format specifiers if compiled without FAT32 support
- Startup CPU check does not accept NEC V20/V30 as 186-class processors HOT 5
- FAT32 boot loaders: With a (rounded) file size of 128 KiB, either the file data corrupts the FAT sector or vice versa
- Regression: After commit 1c2f541 (2024/02/04) CH357 driver doesn't work anymore (UPDATE) HOT 32
- A small build issue when building using OpenWatcom 1.9 under DOS HOT 3
- gcc/Linux/GNU make fails to build country.sys HOT 13
- Build issue with recent OpenWatcom snapshots requiring `-wcd=106` HOT 8
- sys and boot sector improvements [TODO] HOT 5
- SYS /OEM:W9X /L 0 does not set loadaddr to 0
- ddt.offset confusingly commented HOT 1
- Terminating the device / fdconfig.sys process crashes the system
- DDT / UDSC / UPB structure differs from MS-DOS v6.22/v7.00/v7.10 (and EDR-DOS) HOT 1
- INT25/26 fail for uninitialized FAT-12/16 partitions leading to format error
- Is there anything implemented that uses PartitionMode yet? HOT 4
- FDIMPLES crashes with current kernel HOT 11
- win31support HOT 1
- Suggestion: Work around Xi8088 BIOS bug by setting DS = 40h for 13.41 call HOT 1
- DPB memory invalidation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kernel.