English Amiga Board    


Go Back   English Amiga Board > News

Reply
 
Thread Tools
Old 29 May 2012, 16:44   #1
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
ANAIIS 1.05 (28 may 2012)

If you got a basic Amiga and a Subway (or a Highway), you can now boot like A1000 did it in the past. With a boot disk!

http://aminet.net/package/driver/other/anaiis_boot

A usb->sata interface + disk is needed. (thumbs are not reliable)
The system must be prepared on a PFS3 partitioned disk.
WinUAE can do this job, if your system disks are out.
Not really speedy, but it can help.
Gilloo is offline   Reply With Quote
Old 03 August 2012, 10:16   #2
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Some weeks ago I have posted something concerning WinUAE and dlls.
I have understood how to interface a dll with WinUAE, and now I can manage the libusb.dll functions and a lot of windows stuff (like read/write .ini files, open/close/read/write windows files from inside the emulator, in 68000 mode).

It is strange (or marvelous ) to see ANAIIS working also under PC and WinUAE.
Joysticks (with rumble!), keyboards, mouse are ok!

Usb keys and consorts don't work yet, usb_bulk_read, returns -116 (timeout) but usb_bulk_write seems to write something...
So if someone is interressed by my work, it will decide me to put it on aminet or keep it jealously in my dark harddisk
Gilloo is offline   Reply With Quote
Old 03 August 2012, 10:45   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Just a small warning: in my opinion that dll interface is badly designed horrible security hole. Interface used = unsupported state.
Toni Wilen is offline   Reply With Quote
Old 03 August 2012, 11:27   #4
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Just a small warning: in my opinion that dll interface is badly designed horrible security hole. Interface used = unsupported state.
Yes this interface is very tricky, but very useful for me (please Toni don't remove it in WinUAE )
You can use memory or ressource outside the emulator, but at this time, I haven't seen any blue screen.

- Only D1,D2,D3,D4,D5,D6,D7,A1,A2 registers (9 pointers or unsigned long values) can be used (perhaps it's a SASC limitation... )
- Only chip memory (memory starting at $0) or Zorro3 memory can be used (like a DMA memory in fact )
- SASC has a little bug with D1 and D6 registers: they can't be pointers (the workaround is to cast all in ULONG )
Gilloo is offline   Reply With Quote
Old 03 August 2012, 11:52   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Security problem is that DLL runs inside winuae process space = it has same privileges as winuae which is bad if winuae was run as admin. DLL can do anything it wants in this situation.

Most users assume emulators won't allow full access to host. This makes it dangerous.

Also DLL can always poke and peek any address in winuae's address space, it can do all kinds of things behind emulator's back. This makes it unsupported.

I am not going to remove it, at least unless someone abuses it too much but it is possible I'll add some confirmation dialogs before any previously unused dll gets loaded for the first time.

Quote:
Only chip memory (memory starting at $0) or Zorro3 memory can be used
Why do you think so? All memory is linear mapped from base address in 68020+ modes. Last few betas have linear memory, even if 68000.

(Don't care about SAS-C)
Toni Wilen is offline   Reply With Quote
Old 03 August 2012, 12:20   #6
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Quote:
Only chip memory (memory starting at $0) or Zorro3 memory can be used
Why do you think so? All memory is linear mapped from base address in 68020+ modes. Last few betas have linear memory, even if 68000.
betas have linear memory, even if 68000.
Not a thought, to pass a pointer to a dll, you should translate the 'amiga' address to 'host' address. The function 105, passing through $00f0ffc0 is the offset between address 0 (the beginning of the chip mem) and the true block ptr in the 'host' mapping.

; input void
; output D0 return memory offset
DLLGetMemoryOffset
moveq #105,D0
jsr $00f0ffc0
rts

This routine computes the offset between address 0 and the real memory offset in Windows world.
All buffers must be allocated in CHIP, for example toto = AllocMem(512, MEMF_CHIP), then DLLGetMemoryOffset()+toto matches exactly the buffer toto in the dll.


Perhaps you want I keep all this stuff secret to not use WinUAE for hacking

Last edited by prowler; 06 August 2012 at 23:19. Reason: Fixed quote.
Gilloo is offline   Reply With Quote
Old 03 August 2012, 14:02   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
This routine computes the offset between address 0 and the real memory offset in Windows world.
Yes and you can add it to any Amiga-side RAM address, not just chip. (as long as it is real RAM, poking IO or similar won't work, of course)
Toni Wilen is offline   Reply With Quote
Old 03 August 2012, 14:24   #8
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Quote:
Originally Posted by Gilloo View Post
This routine computes the offset between address 0 and the real memory offset in Windows world.
Yes and you can add it to any Amiga-side RAM address, not just chip. (as long as it is real RAM, poking IO or similar won't work, of course)
RAM, poking IO or similar won't work, of course)
You mean that DLLGetMemoryOffset()+toto, where toto is in FAST works too ?
Strange, for me it crashes the emulator...

Last edited by prowler; 06 August 2012 at 23:25. Reason: Fixed quote.
Gilloo is offline   Reply With Quote
Old 03 August 2012, 15:56   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
Quote:
Originally Posted by Toni Wilen View Post
Quote:
Originally Posted by Gilloo View Post
This routine computes the offset between address 0 and the real memory offset in Windows world.
Yes and you can add it to any Amiga-side RAM address, not just chip. (as long as it is real RAM, poking IO or similar won't work, of course)
RAM, poking IO or similar won't work, of course)

You mean that DLLGetMemoryOffset()+toto, where toto is in FAST works too ?

Strange, for me it crashes the emulator...
What kind of config? Did you use latest beta?

Last edited by prowler; 06 August 2012 at 23:27. Reason: Fixed quote.
Toni Wilen is offline   Reply With Quote
Old 06 August 2012, 14:14   #10
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
What kind of config? Did you use latest beta?
hu, not the last beta WinUAE 1.4.4.0 (2007) and also 2.4.0.0 (2012)
A1000 68000 + kick 1.1 + 512kB chip
A2000 68030 + 68882 + kick 3.1 + 2MB chip + 32MB Z3 fast + 32MB video(Picasso96)

Please continue to support windows dll, cause there is a lot of good things to do with like wazp3d (to make opengl things...) thanks

Last edited by prowler; 07 August 2012 at 17:31. Reason: Fixed quote.
Gilloo is offline   Reply With Quote
Old 06 August 2012, 21:44   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
Quote:
Originally Posted by Toni Wilen View Post
What kind of config? Did you use latest beta?
hu, not the last beta WinUAE 1.4.4.0 (2007) and also 2.4.0.0 (2012)
A1000 68000 + kick 1.1 + 512kB chip
A2000 68030 + 68882 + kick 3.1 + 2MB chip + 32MB Z3 fast + 32MB video(Picasso96)

Please continue to support windows dll, cause there is a lot of good things to do with like wazp3d (to make opengl things...) thanks
Never ever ask or complain about anything without first testing latest version (and also beta if asking on eab!)..

Last edited by prowler; 07 August 2012 at 17:33. Reason: Fixed quote.
Toni Wilen is offline   Reply With Quote
Old 06 August 2012, 22:34   #12
desiv
Registered User
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 849
To be fair:
Quote:
Originally Posted by Gilloo View Post
Strange, for me it crashes the emulator...
That's a statement, not a complaint or a question...

:-)

desiv

Last edited by prowler; 06 August 2012 at 23:15. Reason: Fixed quote.
desiv is offline   Reply With Quote
Old 07 August 2012, 01:33   #13
FastRobPlus
Registered User
 
Join Date: May 2007
Location: Seattle,WA
Posts: 25
Quote:
Originally Posted by Gilloo View Post
If you got a basic Amiga and a Subway (or a Highway), you can now boot like A1000 did it in the past. With a boot disk!

http://aminet.net/package/driver/other/anaiis_boot

A usb->sata interface + disk is needed. (thumbs are not reliable)

Not really speedy, but it can help.
What's the risk of using a thumbdrive? Are they all unreliabale? Or just some?
FastRobPlus is offline   Reply With Quote
Old 07 August 2012, 11:12   #14
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Never ever ask or complain about anything without first testing latest version (and also beta if asking on eab!)..
b...bu...but this is my thread !!
Same crash with WinUAE 2.3.1.b (not the last but not so old too)
In fact the 105 function gives the start address of the block allocated by WinUAE for the chipmem. Other memory blocks are allocated elsewhere and not follow this block. Other advanced developpers use the structure pointed by the A6 register to get the Z3 offset. So there is always a solution.
Gilloo is offline   Reply With Quote
Old 07 August 2012, 11:29   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
b...bu...but this is my thread !!
You started to argue with me about WinUAE

Quote:
Same crash with WinUAE 2.3.1.b (not the last but not so old too)
I said in non-JIT mode it is only supported in latest betas..

What Amiga address? What did 105 return?

Quote:
In fact the 105 function gives the start address of the block allocated by WinUAE for the chipmem. Other memory blocks are allocated elsewhere and not follow this block. Other advanced developpers use the structure pointed by the A6 register to get the Z3 offset. So there is always a solution.
Why do you need "Z3 offset"? Any Amiga address (chip or fast or whatever RAM) + 105 function return value = correct address. Everything is linear mapped (except IO or some other non-RAM special regions).

btw, make sure you use unsigned address variables because returned address can be very high in 32-bit address space if using 64-bit Windows. (like 0x7fxxxxxx or larger) to prevent negative results and crashes..

Explain exactly what you do if you still have problems. It can't be that difficult
Toni Wilen is offline   Reply With Quote
Old 07 August 2012, 11:34   #16
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by FastRobPlus View Post
What's the risk of using a thumbdrive?
The main risk is to lose your data, and give me a trial. But I'm not of the kind to fatten the judges and lawyers. So you are warned

Quote:
Originally Posted by FastRobPlus View Post
Are they all unreliabale? Or just some?
All thumbs use flash ram technology, which are not a model of reliability.
It is supposed to replace floppies, but sometimes floppies or disks are more robust.
So I recommend to use a sata/usb converter (20€ = 20$ according Apple) and a 2.5' sata disk (from a dammaged PC portable for example), PFS3 formatted (partition size up to 80GB) This works with Workbench 1.3 and higher.

Last edited by Gilloo; 07 August 2012 at 15:59.
Gilloo is offline   Reply With Quote
Old 07 August 2012, 12:03   #17
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
I said in non-JIT mode it is only supported in latest betas..
where is the latest beta? please, I will do the test..

Quote:
Originally Posted by Toni Wilen View Post
What Amiga address?
anything in fastmem, or local variable on stack (amiga emulated I mean)

Quote:
Originally Posted by Toni Wilen View Post
What did 105 return?
Not got the time to see if 105 returns something, the emulator was crashing... (Windows is collecting data... ... ...)

Quote:
Originally Posted by Toni Wilen View Post
Why do you need "Z3 offset"?
Not my own use, but Wazp3D use it!

Quote:
Originally Posted by Toni Wilen View Post
Any Amiga address (chip or fast or whatever RAM) + 105 function return value = correct address. Everything is linear mapped (except IO or some other non-RAM special regions).
If you say that amiga memory is linear mapped in the emulator, I thrust you. But inside the source code I got (1.4.4.0) it's not the case.

Quote:
Originally Posted by Toni Wilen View Post
btw, make sure you use unsigned address variables because returned address can be very high in 32-bit address space if using 64-bit Windows. (like 0x7fxxxxxx or larger) to prevent negative results and crashes..
ok, all in ULONG 32bits

something outside WinUAE, but related with ANAIIS.
Toni, have you fix something for PFS3 WB1.3 ? It guruhize when unmounting...
Gilloo is offline   Reply With Quote
Old 07 August 2012, 13:03   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
where is the latest beta? please, I will do the test..
Check winuae forum, can't miss it..

Quote:
anything in fastmem, or local variable on stack (amiga emulated I mean)
Anything that is RAM. (chip, slow, fast, whatever)

Quote:
Not got the time to see if 105 returns something, the emulator was crashing... (Windows is collecting data... ... ...)
Then your problem is totally different.

Quote:
If you say that amiga memory is linear mapped in the emulator, I thrust you. But inside the source code I got (1.4.4.0) it's not the case.
It is because JIT direct mode requires it. (JIT takes the Amiga address and adds static offset to make it PC address)

Quote:
something outside WinUAE, but related with ANAIIS.
Toni, have you fix something for PFS3 WB1.3 ? It guruhize when unmounting...
I think I already said: show me a test case. Sending ACTION_DIE is enough? Does official PFS work?
Toni Wilen is offline   Reply With Quote
Old 07 August 2012, 20:20   #19
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
ok ! got WinUAE 242beta

68030 + JIT
Must activate option Host / Miscellaneous / "allow native code"

If I put my hostusb.dll into winuae_dll it logs that:
42-154 [1444 212-262]: native open: 'D:\vieux\Gilles\amiga\WinUAE_242b\plugins\hostusb.dll' = 126
42-154 [1444 212-262]: fallback native open: 'D:\vieux\Gilles\amiga\WinUAE_242b\winuae_dll\hostusb.dll' = 126

If put hostusb.dll into Plugins
And take my program, replace MEMF_CHIP by MEMF_ANY => ok

BUT!
On 68000 512KB chip + 4MB fast
Must activate option Host / Miscellaneous / "allow native code"
It crashes the emulator...

So if I want to test A1000 stuff or non JIT configs, I must insist on MEMF_CHIP for struct allocations needed to pass data to the dll.


// for PFS3, I use this
http://aminet.net/package/disk/misc/pfs3ks13

It is quite easy, mount a removable disk with PFS3 on WB1.3 (on a true amiga 68000), then remove it. It makes a guru 3.
The official PFS3 doesn't work at all on WB1.3, because it use some 2.04 and higher exec routines.
Gilloo is offline   Reply With Quote
Old 08 August 2012, 11:58   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
It crashes the emulator...

So if I want to test A1000 stuff or non JIT configs, I must insist on MEMF_CHIP for struct allocations needed to pass data to the dll.
You still haven't replied what are you exactly doing, what causes the crash? What address? Does the address match "special area" mentioned in winuaebootlog.txt? "Not working" or "It crashes" won't help anyone.

Quote:
It is quite easy, mount a removable disk with PFS3 on WB1.3 (on a true amiga 68000), then remove it. It makes a guru 3.
The official PFS3 doesn't work at all on WB1.3, because it use some 2.04 and higher exec routines.
You never said it only crashes when running under 1.3, only that pfs3 for ks1.3 crashes in some not-that-specific media change situations.

Does diskchange <devicename>: also cause crash? Trackdisk.device only?

It could be buggy TD_ADDCHANGEINT in trackdisk.device but there are no workarounds, TD_REMOVE can't be used because it removes old change interrupt = DF0: disk changes would stop working.

Last edited by Toni Wilen; 08 August 2012 at 13:02.
Toni Wilen is offline   Reply With Quote
Old 08 August 2012, 14:57   #21
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
You never said it only crashes when running under 1.3, only that pfs3 for ks1.3 crashes in some not-that-specific media change situations.
I never test the 1.3 version on 3.1... will do it!
The official PFS3 unmount correctly on 3.1.
Gilloo is offline   Reply With Quote
Old 14 August 2012, 21:53   #22
FastRobPlus
Registered User
 
Join Date: May 2007
Location: Seattle,WA
Posts: 25
Quote:
Originally Posted by Gilloo View Post
The main risk is to lose your data, and give me a trial. But I'm not of the kind to fatten the judges and lawyers. So you are warned



Thanks - this is good info. I may try a thumbdrive just to see how it works.
FastRobPlus is offline   Reply With Quote
Old 03 September 2012, 11:49   #23
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Gilloo View Post
I never test the 1.3 version on 3.1... will do it!
The official PFS3 unmount correctly on 3.1.
Verdict:
PFS13 on 3.1 does the same thing as 1.3 when unmount, but guru #8 (guru #3 on 1.3)
Gilloo is offline   Reply With Quote
Old 03 September 2012, 20:04   #24
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Does attached version work better?

I noticed that removable support wasn't fully enabled (TRACKDISK define) which can explain disk change problems.

WARNING: This is test version only. Do not upload anywhere else!

Last edited by Toni Wilen; 18 September 2012 at 16:48.
Toni Wilen is offline   Reply With Quote
Old 10 September 2012, 09:47   #25
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Does attached version work better?

I noticed that removable support wasn't fully enabled (TRACKDISK define) which can explain disk change problems.

WARNING: This is test version only. Do not upload anywhere else!
Toni, I've test this version 03-Sep-2012, and it makes guru #8 when unmounting in both cases... (wb3.1 and wb1.3) (Sorry to announce bad news)
Gilloo is offline   Reply With Quote
Old 10 September 2012, 10:29   #26
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
Toni, I've test this version 03-Sep-2012, and it makes guru #8 when unmounting in both cases... (wb3.1 and wb1.3) (Sorry to announce bad news)
Works for me. Explain your test case _exactly_. Not just "I remove disk and it crashes".

EDIT: My test case:

Mount PFS3 floppy device (using similar mountlist used for RAD, except device and handler changed)
Format it.
Eject and insert and check that everything works. Including disk getting reported as removed, not non-dos after removal.

Previously media changes didn't work at all and it also randomly crashed after eject.
Toni Wilen is offline   Reply With Quote
Old 11 September 2012, 09:41   #27
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Works for me. Explain your test case _exactly_. Not just "I remove disk and it crashes".

EDIT: My test case:

Mount PFS3 floppy device (using similar mountlist used for RAD, except device and handler changed)
Format it.
Eject and insert and check that everything works. Including disk getting reported as removed, not non-dos after removal.

Previously media changes didn't work at all and it also randomly crashed after eject.
aah, kiitos
mount uh2:
open the uh2: icon... display image or open a text file, close the application.
unmount uh2: then guru #8

http://aminet.net/package/disk/misc/unmount-0.1
Given there is the source code, I've done the equivalent unmount for 1.3 (which works with fat95, when fat95 is decided to work )
Gilloo is offline   Reply With Quote
Old 11 September 2012, 15:34   #28
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
So it is ACTION_DIE problem after all. Nothing to do with removing removable media..
Toni Wilen is offline   Reply With Quote
Old 13 September 2012, 14:47   #29
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
So it is ACTION_DIE problem after all. Nothing to do with removing removable media..
Is it possible to got ACTION_DIE packet with pfs3_ks13 ? kiitos
Gilloo is offline   Reply With Quote
Old 15 September 2012, 17:39   #30
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Aminet unmount_m68k is broken, first instruction in executable is illegal instruction.
Toni Wilen is offline   Reply With Quote
Old 17 September 2012, 10:09   #31
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Quote:
Originally Posted by Toni Wilen View Post
Aminet unmount_m68k is broken, first instruction in executable is illegal instruction.
It seems to be compiled for other thing than pure 68000...
Toni, you can use the ANAIIS unmount (seek it in bin of the following package)
http://aminet.net/package/driver/other/anaiis
Good luck
Gilloo is offline   Reply With Quote
Old 18 September 2012, 19:37   #32
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
pfs3 unmount is now working but there is still one problem remaining: under 1.3, mounting again after unmount crashes with memory list corruption guru.

More debugging to do..

Attach source of your version of unmount, thanks.
Toni Wilen is offline   Reply With Quote
Old 19 September 2012, 16:29   #33
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Hi Toni,
here's my unmount code with the makefile... for SASC 6.0 and up
Perhaps it's buggy. Please tell me if you find monsters

unmountc.c is the shell command source code,
unmount.c is the code to unmount function for 1.3 and for 2.04 and up.
Attached Files
File Type: c unmount.c (10.7 KB, 25 views)
File Type: c unmountc.c (1.1 KB, 24 views)
File Type: txt makefile.txt (442 Bytes, 19 views)
Gilloo is offline   Reply With Quote
Old 19 September 2012, 17:00   #34
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
I think calling c:assign is too ugly solution..

assign dismount: internally calls RemDosEntry() which is as simple as:
Code:
    dl = DeviceNode head
    while(dl->dol_Next)
    {
        struct DosList *dl2 = BADDR(dl->dol_Next);
        if(dl2 == dlist)
	{
	    dl->dol_Next = dlist->dol_Next;
	    break;
	}
	dl = dl2;
    }
(Forbid state required of course)

You should first find the correct device node and then exit the loop because doslist may have changed and "DeviceNode = (struct DeviceNode *)BADDR(DeviceNode->dn_Next) ;" may access random memory.

It is not safe to scan doslist without forbid state. (and forbid in this code would be broken anyway during packet calls)

But I don't think this is the cause for crash.
Toni Wilen is offline   Reply With Quote
Old 19 September 2012, 17:26   #35
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
So I can remove the Execute call to "assign dismount" (I don't think it is working with 1.3) and "assign remove" then.
Gilloo is offline   Reply With Quote
Old 19 September 2012, 17:28   #36
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Quote:
Originally Posted by Gilloo View Post
So I can remove the Execute call to "assign dismount" (I don't think it is working with 1.3) and "assign remove" then.
Yeah, just manually unlink the doslist entry and your done.
Toni Wilen is offline   Reply With Quote
Old 19 September 2012, 19:56   #37
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Ok, this one should really work.

EDIT: also includes all SVN updates since previous pfs3ks13 Aminet release.

Last edited by Toni Wilen; 27 September 2012 at 20:58.
Toni Wilen is offline   Reply With Quote
Old 20 September 2012, 09:30   #38
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
Kiitos Toni, I will try this weekend

I don't know why I wrote a Delay(10) before RemDosEntry... it seems to be superfluous...
Attached Files
File Type: c unmount.c (10.0 KB, 25 views)
Gilloo is offline   Reply With Quote
Old 21 September 2012, 09:56   #39
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 84
hum... tested the new pfs_ks13

wb1.3: it freezes after unmount... (but no guru :-) )
wb3.1: guru #8

wb3.1, original PFS3 from the PFS3, guru #8 after unmount

Perhaps its my unmount in cause... so I broke the version
if (1 /*DOSBase->lib_Version < 37*/)
to activate always the 1.3 compatible code, but it is the same with pfs_ks13 and wb3.1/original PFS3 unmount correctly

Toni, do you also got the freeze in 1.3?

Last edited by Gilloo; 21 September 2012 at 11:33.
Gilloo is offline   Reply With Quote
Old 21 September 2012, 10:38   #40
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,952
Works perfectly here, including 1.3, using your unmount. You sure you use correct pfs3 version?

EDIT: Run mungwall, must be wrong version if you get huge amount of memory allocation errors when unmounting. (You can use -log -serlog winuae command line parameters to see serial debugging without extra utilities)

Last edited by Toni Wilen; 21 September 2012 at 10:45.
Toni Wilen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flashback 2012 Demoscene computer party 9th - 10th & 11th June 2012 - C64 - AMIGA - P reload News 0 24 April 2012 17:01
ANAIIS 1.03 - Poppy fixes. Gilloo News 15 17 April 2012 09:56
ANAIIS 1.02 - Summer fixes Gilloo News 7 05 January 2012 00:04
FAT95 (and ANAIIS) Gilloo support.Hardware 0 19 September 2011 14:53
ANAIIS 1.00 - usb on 68k Amigas Gilloo News 0 21 March 2011 12:45


All times are GMT +2. The time now is 18:57.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.48365 seconds with 12 queries