-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alpha waves doesn't work #112
Comments
Maybe the first beta doesn't need to run many games? |
This one crashes on 1.4 here as well. |
With freedos - yes. |
I created the "freedos" label to mark it as such. |
Doesn't seem to work on 1.4 either, |
It actually still doesn't work properly. |
okay will do. |
Under FDPP when the program tries to reopen the |
fdpp has by default FILES=64 |
A couple of further data points
|
If its really a result of int21/3d failure, must |
Not sure why I can't get GDB to run properly
I do this so infrequently, did I miss something? |
Try Anyway, the problem is that the game |
dosemu2/fdpp#112 alpha waves does some anti-debugger trick by changing int 1 vector. dosdebug doesn't use that vector, but it was not suppressing int 1 during rep XX stepping. With this patch alpha waves is tracible.
I applied a few patches to make this game |
Yep, it is an anti-debugger trick.
|
So it seems PC-DOS just doesn't zero Note: by not zeroing parent_psp I am able |
Try |
Yes, I'm getting pretty fed up with 32 bit support on Ubuntu. I even had Dosemu/FDPP/Alphawaves reboot my machine, which I can only guess means they've screwed up Well done on tracking down the PSP/JFT issue, I doubt I'd have got to that.
Yes that fixed FDPP startup for me, so I've added it to my personal startup script, thanks.
I'll try to write a test for that, but I'm sorry it probably won't be today. |
If there is a reboot, you need to |
Btw, the psp I dumped above, seems |
I started to write a little test program to find the behaviour of all the DOSes I have, but I don't see the non-zeroed parent_psp field that you mention. Here's the program .text
.code16
.globl _start16
_start16:
# designate target segment
push %cs
pop %ax
addw $0x0200, %ax
movw %ax, %es
# create PSP in memory
movw %es, %dx
movw $0x2600, %ax
int $0x21
# see what the parent PSP is set to
movw $0x0016, %di
cmpw $0x0000, %es:(%di)
je success
cmpfail:
movb $0x9, %ah
movw $cmpfailmsg, %dx
int $0x21
jmp exit
success:
movb $0x9, %ah
movw $successmsg, %dx
int $0x21
jmp exit
exit:
movb $0x4c, %ah
int $0x21
cmpfailmsg:
.ascii "PSP is not zero\r\n$"
successmsg:
.ascii "PSP is zero\r\n$" I'm seeing that all the DOSes here zero the parent_psp field
Here's dosdebug running against FreeDOS 1.20, notice now the PSP is only partially populated system state: stopped
AX=0000 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2382 FS=0000 GS=0000 FL=000a3346
CS:IP=2382:0100 SS:SP=2382:fffe
2382:0100 0E push cs
dosdebug> t
dosdebug>
system state: stopped
AX=0000 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 SP=fffc BP=0000
DS=2382 ES=2382 FS=0000 GS=0000 FL=000a3346
CS:IP=2382:0101 SS:SP=2382:fffc
2382:0101 58 pop ax
dosdebug>
dosdebug>
system state: stopped
AX=2382 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2382 FS=0000 GS=0000 FL=000a3346
CS:IP=2382:0102 SS:SP=2382:fffe
2382:0102 050002 add ax,0200
dosdebug>
dosdebug>
system state: stopped
AX=2582 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2382 FS=0000 GS=0000 FL=000a3306
CS:IP=2382:0105 SS:SP=2382:fffe
2382:0105 8EC0 mov es,ax
dosdebug>
dosdebug>
system state: stopped
AX=2582 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2582 FS=0000 GS=0000 FL=000a3306
CS:IP=2382:0107 SS:SP=2382:fffe
2382:0107 8CC2 mov dx,es
dosdebug>
dosdebug>
system state: stopped
AX=2582 BX=0000 CX=0000 DX=2582 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2582 FS=0000 GS=0000 FL=000a3306
CS:IP=2382:0109 SS:SP=2382:fffe
2382:0109 B80026 mov ax,2600
dosdebug> d es:0000
dosdebug>
2582:0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
dosdebug> t
dosdebug>
system state: stopped
AX=2600 BX=0000 CX=0000 DX=2582 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2582 FS=0000 GS=0000 FL=000a3306
CS:IP=2382:010c SS:SP=2382:fffe
2382:010c CD21 int 21
dosdebug> t
dosdebug>
system state: stopped
AX=2600 BX=0000 CX=0000 DX=2582 SI=0000 DI=0000 SP=fffe BP=0000
DS=2382 ES=2582 FS=0000 GS=0000 FL=00083306
CS:IP=2382:010e SS:SP=2382:fffe
2382:010e BF0000 mov di,0000 # earlier version of my test program!
dosdebug> d es:0000
dosdebug>
2582:0000 00 00 00 00 00 00 00 00 00 00 E7 F6 00 F0 C6 07 ..........gv.pF.
2582:0010 B2 10 47 02 C2 10 00 00 00 00 00 00 00 00 00 00 2.G.B...........
2582:0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2582:0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
dosdebug> d cs:0000 # our original PSP
dosdebug>
2382:0000 CD 20 EF 9F 00 9A F0 FE 1D F0 E7 F6 00 F0 C6 07 M o...p~.pgv.pF.
2382:0010 B2 10 47 02 C2 10 B2 10 01 01 01 00 02 FF FF FF 2.G.B.2......
2382:0020 FF FF FF FF FF FF FF FF FF FF FF FF 74 23 E0 FF t#`
2382:0030 82 23 14 00 18 00 82 23 00 00 B2 10 00 00 00 00 .#.....#..2.....
2382:0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2382:0050 CD 21 CB 00 00 00 00 00 00 00 00 00 00 20 20 20 M!K..........
2382:0060 20 20 20 20 20 20 20 20 00 00 00 00 00 20 20 20 .....
2382:0070 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........ |
I just modified the test to check for
Any other fields you'd like me to check whilst I have the test available? BTW I don't think there's any point in adding this test permanently to the suite, do you? |
Its absolutely impossible that it doesn't |
Will do later , In the meantime did you see the dosdebug dump of the new PSP above where Cd20 is not set? |
Perhaps it's where I chose to place the new PSP in memory that's the problem? |
Of course I've seen it, but its not possible. |
I'm thinking more about the comment regarding CS; it directly contradicts us using cu_psp, but suggests our intention of it needing to be the user's CS is correct. |
So Alphawaves is looking a lot better on FDPP now, enough to run the demo anyway. I do see a corrupted vertically scrolling image immediately on entering the game, and it also hangs dosemu on exit, bu only after the game has been entered. |
IBMDOS? So is this a pc-dos after all? Is the exit crash specific to fdpp? |
Pretty sure about that IBMDOS directory being named so is because the target file is called 'ibmdos.com', it's certainly DR-DOS based. I find this comment most interesting,
so if we shouldn't use Doesn't seem to be just FDPP, I ran it on PCDOS 7.10 with gdb and got this on exit
|
We can or can't get the real user's cs, |
Just for completeness I ran my testcase on several DOSes and it seems your latest fixes changed something. Now only FreeDOS 1.00, 1.10 and 1.20 zero the PSP parent whereas MSDOS 6.22, PCDOS 7.10, DRDOS 7.01 and FDPP don't. To see what the new PSP looked like I ran MS-DOS 6.22 with the testcase under dosdebug. Now it seems to me that I'm seeing the effect you did earlier when running with dosdebug, in that the copy source is incorrect and only the explicitly set fields are valid. It's a little unsettling that using dosdebug can change things? But I noticed the crap only occurs if I
if I
Helpful? |
This is because earlier you did the |
This one dosemu2/dosemu2@158fe96f8f4 ? |
Yes. |
Adding this gives the correct results, but of course the overrunning of the following instruction is back diff --git a/src/plugin/debugger/mhpdbgc.c b/src/plugin/debugger/mhpdbgc.c
index 11a2ad0ad..e7b0854dc 100644
--- a/src/plugin/debugger/mhpdbgc.c
+++ b/src/plugin/debugger/mhpdbgc.c
@@ -840,6 +840,8 @@ static void mhp_trace(int argc, char *argv[])
switch (csp[0]) {
case 0xcd:
if (mhpdbgc.trapcmd != 1) { // plain 't'
+ if (csp[1] == 0x21 || csp[1] == 0x2f || csp[1] == 0x28 || csp[1] == 0x33)
+ break;
LWORD(eip) += 2;
trace_stack_push(_CS, _IP);
Any other way to reimplement? |
Many of them, with various limitations. |
Or, more likely, nothing should be done but |
In fact, it seems to work for me:
40 and 42 are adjacent addresses. |
Sorry, was in a hurry, tried w/o your changes. |
So should I do a PR for the fix above, then look at |
Noticed in dosemu2/fdpp#112 tracing `t` can give incorrect DOS execution, whereas tracing in `ti` behaves properly. It has been isolated to the trace handler added in 158fe96, for now avoid using that code on likely problem interrupts.
Good plan, will apply in a few days. |
I am not sure 9c4a468 was correct. |
It appears Alpha Waves creates the new PSP from the corrupted one. Checked with PC-DOS: it restores sig too.
Patch ported from * dosemu2/fdpp@f49252a See * dosemu2/fdpp#112 * #38
Broken again. |
Related to #184 |
Describe the bug
Hangs at start.
Works on 1.4.
To Reproduce
Just start.
Attach the binaries or provide an URL
http://www.abandonia.com/en/games/25594/Alpha+Waves.html
Almost no games seem to work.
Testing more looks like the waste of time.
The text was updated successfully, but these errors were encountered: