View Single Post
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: 287
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  
 
Page generated in 0.04352 seconds with 11 queries