Skip to content
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

dos.IsInteractive fails #98

Open
wepl opened this issue May 24, 2019 · 7 comments
Open

dos.IsInteractive fails #98

wepl opened this issue May 24, 2019 · 7 comments

Comments

@wepl
Copy link

wepl commented May 24, 2019

when running http://whdload.de/whdload/WWarp128.lha vamos fails with:
22:47:43.484 machine: ERROR: ----- ERROR in CPU Run #1 -----
22:47:43.484 machine: ERROR: Run: 'wwarp': Initial PC=00228c, SP=030fac
22:47:43.484 machine: ERROR: PC=00001ba4 SR=----X
22:47:43.485 machine: ERROR: D0=00000891 D1=00000000 D2=0000ffff D3=ffffffff D4=00000000 D5=00000000 D6=00000891 D7=00000886
22:47:43.485 machine: ERROR: A0=00016fa0 A1=00000886 A2=00000000 A3=00016fa0 A4=00011fe8 A5=ff01dd05 A6=00001ae8 A7=00030f60
22:47:43.485 machine: ERROR: SP-32=000000 SP-28=000000 SP-24=000000 SP-20=000000 SP-16=000000 SP-12=000000 SP-08=031224 SP-04=000400
22:47:43.485 machine: ERROR: SP+00=002456 SP+04=018420 SP+08=0055f0 SP+12=0183b4 SP+16=008b56 SP+20=005610 SP+24=008b36 SP+28=0000ff
22:47:43.485 machine: ERROR: Traceback (most recent call last):
22:47:43.486 machine: ERROR: File "musashi/pytraps.pyx", line 20, in musashi.emu.trap_wrapper (musashi/emu.c:15862)
22:47:43.486 machine: ERROR: py_func(opcode, pc)
22:47:43.486 machine: ERROR: File "/home/devel/.local/lib/python2.7/site-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/libcore/stub.py", line 159, in base_func
22:47:43.486 machine: ERROR: res = impl_method(ctx)
22:47:43.486 machine: ERROR: File "/home/devel/.local/lib/python2.7/site-packages/amitools-0.2.0-py2.7-linux-x86_64.egg/amitools/vamos/lib/DosLibrary.py", line 836, in IsInteractive
22:47:43.486 machine: ERROR: res = fh.is_interactive()
22:47:43.486 machine: ERROR: AttributeError: 'NoneType' object has no attribute 'is_interactive'
22:47:43.486 main: ERROR: vamos failed!
22:47:43.487 libmgr:WARNING: can't expunge: 'dos.library' with open count 1
22:47:43.487 libmgr:WARNING: shutdown: can't expunge 1 vamos libs/devs!

@QkiZMR
Copy link

QkiZMR commented May 24, 2019

I think this won't work because wwarp is using floppy drive. vamos doesnt emulate hardware

@wepl
Copy link
Author

wepl commented May 25, 2019

No. It also operates on files to modify them (extract, convert).
It looks like a general problem with the dos.library function to me.

@cnvogelg
Copy link
Owner

vamos stumbles across a bug in wwarp itself: see src/source/dosio.i:

                jsr     (_LVOOutput,a6)
                move.l  d0,d6                           ;D6 = output

                move.l  d7,a1
                jsr     (_LVOIsInteractive,a6)

The file handle has to be passed in d1 not a1 :)

AmigaDOS seems to accept IsInteractive() with a null pointer...
I`ll mimic this behaviour in vamos, too...

@cnvogelg
Copy link
Owner

added in 83c0f15

@wepl
Copy link
Author

wepl commented May 27, 2019

Thanks a lot. 10 years old bug, I'll fix it in wwarp too :)

@wepl wepl closed this as completed May 27, 2019
@wepl
Copy link
Author

wepl commented May 27, 2019

dos.WaitForChar is not implemented ATM?
It doesn't wait for the specified duration.

@cnvogelg
Copy link
Owner

no not yet. But I can add it in a few lines.. at least for Unix select() based OSes... Do you have some test code for me?

@cnvogelg cnvogelg reopened this May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants