English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 29 May 2012, 17:44   #1
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
AdSense AdSense  
Old 03 August 2012, 11:16   #2
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
Old 03 August 2012, 11:45   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
Just a small warning: in my opinion that dll interface is badly designed horrible security hole. Interface used = unsupported state.
Toni Wilen is offline  
Old 03 August 2012, 12:27   #4
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
Old 03 August 2012, 12:52   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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  
Old 03 August 2012, 13:20   #6
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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; 07 August 2012 at 00:19. Reason: Fixed quote.
Gilloo is offline  
Old 03 August 2012, 15:02   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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  
Old 03 August 2012, 15:24   #8
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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; 07 August 2012 at 00:25. Reason: Fixed quote.
Gilloo is offline  
Old 03 August 2012, 16:56   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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; 07 August 2012 at 00:27. Reason: Fixed quote.
Toni Wilen is offline  
Old 06 August 2012, 15:14   #10
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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 18:31. Reason: Fixed quote.
Gilloo is offline  
Old 06 August 2012, 22:44   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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 18:33. Reason: Fixed quote.
Toni Wilen is offline  
Old 06 August 2012, 23:34   #12
desiv
Registered User
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,173
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; 07 August 2012 at 00:15. Reason: Fixed quote.
desiv is offline  
Old 07 August 2012, 02:33   #13
FastRobPlus
Registered User
 
Join Date: May 2007
Location: Seattle,WA
Posts: 57
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  
Old 07 August 2012, 12:12   #14
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
Old 07 August 2012, 12:29   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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  
Old 07 August 2012, 12:34   #16
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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 16:59.
Gilloo is offline  
Old 07 August 2012, 13:03   #17
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
Old 07 August 2012, 14:03   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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  
Old 07 August 2012, 21:20   #19
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 159
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  
Old 08 August 2012, 12:58   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,924
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 14:02.
Toni Wilen is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ANAIIS 1.09 (30 Sep 2013) Gilloo News 22 30 April 2014 16:38
Flashback 2012 Demoscene computer party 9th - 10th & 11th June 2012 - C64 - AMIGA - P reload News 0 24 April 2012 18:01
ANAIIS 1.03 - Poppy fixes. Gilloo News 15 17 April 2012 10:56
ANAIIS 1.02 - Summer fixes Gilloo News 7 05 January 2012 01:04
FAT95 (and ANAIIS) Gilloo support.Hardware 0 19 September 2011 15:53

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


All times are GMT +2. The time now is 04:33.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.44972 seconds with 12 queries