If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
working Assembler memin workareound!!!
Re: working Assembler memin workareound!!!
Yo KG,
I'm not sure how to implement the ASM.
If you can be bothered(ie. want this too)-
could you wire it?
I'll look at the window again,
but I think I can't suss how to implement.
Cheers man,
-so you are saying it can be rendered in a single sample's time?
I'm not sure how to implement the ASM.
If you can be bothered(ie. want this too)-
could you wire it?
I'll look at the window again,
but I think I can't suss how to implement.
Cheers man,
-so you are saying it can be rendered in a single sample's time?
-
nix - Posts: 817
- Joined: Tue Jul 13, 2010 10:51 am
Re: working Assembler memin workareound!!!
tester wrote:Hmm... Right at the moment when connecting to the analyzer - FS crashes. Maybe it has to do with system (XP here) or hardware architecture (C2D)?
Check if the first Analyzer generates the same code as mine:
- Code: Select all
***** Init *****
push ebp;
mov ebp,edi;
pop ebp
ret;
***** Sample Rate *****
push ebp;
mov ebp,edi;
push eax;
push ebx;
mov eax,56920200; //This is the address of the pointer that is being extracted. Starts at position 140 in this string
mov eax,[eax];
cmp eax,0;
jz 213
mov eax,56909904;
movaps xmm0,dword ptr[ebp+0]
minps xmm0,dword ptr[eax]
maxps xmm0,dword ptr [ebp+4256]
movaps dword ptr[ebp+4240],xmm0
fld dword ptr[ebp+4240]
fistp dword ptr[ebp+4224]
fld dword ptr[ebp+4244]
fistp dword ptr[ebp+4228]
fld dword ptr[ebp+4248]
fistp dword ptr[ebp+4232]
fld dword ptr[ebp+4252]
fistp dword ptr[ebp+4236]
mov eax,dword ptr[ebp+4224]
shl eax,2;
mov ebx,eax;
mov eax,56920200;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4192]
fstp dword ptr[ebp+4208]
mov eax,dword ptr[ebp+4228]
shl eax,2;
mov ebx,eax;
mov eax,56920200;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4196]
fstp dword ptr[ebp+4212]
mov eax,dword ptr[ebp+4232]
shl eax,2;
mov ebx,eax;
mov eax,56920200;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4200]
fstp dword ptr[ebp+4216]
mov eax,dword ptr[ebp+4236]
shl eax,2;
mov ebx,eax;
mov eax,56920200;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4204]
fstp dword ptr[ebp+4220]
pop ebx
pop eax
pop ebp
ret;
Note, that the numbers may have different values and change every time you change the schematic.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: working Assembler memin workareound!!!
After start, in "mem to pointer" module (directly from analyzer):
extracted part:
It does not matter which asm to analyzer I try to connect - the one in module or that external one. FS crashes. On 2 machines.
- Code: Select all
***** Init *****
push ebp;
mov ebp,edi;
pop ebp
ret;
***** Sample Rate *****
push ebp;
mov ebp,edi;
push eax;
push ebx;
mov eax,24821440;
mov eax,[eax];
cmp eax,0;
jz 213
mov eax,25623248;
movaps xmm0,dword ptr[ebp+0]
minps xmm0,dword ptr[eax]
maxps xmm0,dword ptr [ebp+4256]
movaps dword ptr[ebp+4240],xmm0
fld dword ptr[ebp+4240]
fistp dword ptr[ebp+4224]
fld dword ptr[ebp+4244]
fistp dword ptr[ebp+4228]
fld dword ptr[ebp+4248]
fistp dword ptr[ebp+4232]
fld dword ptr[ebp+4252]
fistp dword ptr[ebp+4236]
mov eax,dword ptr[ebp+4224]
shl eax,2;
mov ebx,eax;
mov eax,24821440;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4192]
fstp dword ptr[ebp+4208]
mov eax,dword ptr[ebp+4228]
shl eax,2;
mov ebx,eax;
mov eax,24821440;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4196]
fstp dword ptr[ebp+4212]
mov eax,dword ptr[ebp+4232]
shl eax,2;
mov ebx,eax;
mov eax,24821440;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4200]
fstp dword ptr[ebp+4216]
mov eax,dword ptr[ebp+4236]
shl eax,2;
mov ebx,eax;
mov eax,24821440;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fst dword ptr[ebp+4204]
fstp dword ptr[ebp+4220]
pop ebx
pop eax
pop ebp
ret;
extracted part:
- Code: Select all
24821440;
mov e
It does not matter which asm to analyzer I try to connect - the one in module or that external one. FS crashes. On 2 machines.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: working Assembler memin workareound!!!
The extracted string is then converted to integer. In my case that means everything after (including) semicolon is discarded and only the integer is passed forward.
The integer is then spitted into two integers (lower 16 bits and higher 16 bits) which can losslessly be converted to floats. These floats are passed to the ASM code and reconstructed into single integer.
try putting this code in the ASM inside the module:
it has the read from memory bypassed (so the output will be zero). If the FS will not crash with this code, then the problem is that FS doesn't allow you to read data from that position.
The integer is then spitted into two integers (lower 16 bits and higher 16 bits) which can losslessly be converted to floats. These floats are passed to the ASM code and reconstructed into single integer.
try putting this code in the ASM inside the module:
- Code: Select all
cvtps2dq xmm0,highbit;
cvtps2dq xmm1,lowbit;
pslld xmm0,16;
orps xmm0,xmm1;
movd eax,xmm0;
//mov eax,[eax];
//mov address[0],eax;
it has the read from memory bypassed (so the output will be zero). If the FS will not crash with this code, then the problem is that FS doesn't allow you to read data from that position.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: working Assembler memin workareound!!!
If I put the code above into ASM that is placed in "mem to pointer" module, then I can connect the analyzer inside there without issues. (however that last one, external - still crashes FS).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: working Assembler memin workareound!!!
tester wrote:If I put the code above into ASM that is placed in "mem to pointer" module, then I can connect the analyzer inside there without issues. (however that last one, external - still crashes FS).
The one outside will not work obviously because the passed address is zero, without the inner one working.
try this one:
- Code: Select all
streamout address;
mov eax,[[copy the address here]];
mov eax,[eax];
mov address[0],eax;
copy the extracted integer directly there... It should work. If it works, then the problem is that the address is passed incorrectly. If that crashes too, then I do not know how to fix it, because the whole concept is nonworking.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: working Assembler memin workareound!!!
Try this one... has different method of sending the pointer address. In converts the integer to hex and hex to float (in ruby) and sends that to the inner ASM. Has no parallel trigger lines, so trigger order should be no problem.
- Attachments
-
- alternative memin3.fsm
- (1.59 KiB) Downloaded 1057 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: working Assembler memin workareound!!!
This one seems to work fine.
Is there anything I should do except connecting the external analyzer?
Is there anything I should do except connecting the external analyzer?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: working Assembler memin workareound!!!
one very important thing I've noticed today. Mem connector transmits triggers when it changes - force-connect it to the first analyzer (the one that has the wave read connected to it). This will update the pointer every time it changes, so no crashes should happen when loading wave files / creating memory buffers and stuff...
Also a very cool thing to do when using the array is to have smart bypass when the pointer is not loaded yet. It should prevent most of the crashes. It will however not prevent crashes from real pointer changing and not updating the hacked one (the float output of the module).
Also I recently noticed that when I copied the module the analyzer generated some weird code with extra lines (probably a bug) so the pointer was not extracted.
On another note... I was still not able to come up with how to hack wave array in this way. Mainly because I totally don't understand how it works. If someone could hack this we could have very cool new custom modules... for example wavetable array oscillator.
Also a very cool thing to do when using the array is to have smart bypass when the pointer is not loaded yet. It should prevent most of the crashes. It will however not prevent crashes from real pointer changing and not updating the hacked one (the float output of the module).
- Code: Select all
streamin pointer;
//...
mov eax,pointer[0];
cmp eax,0;
jz NotReady;
//code that uses the pointer to read/write data i.e. via Fld [eax]; or mov eax,[eax];
NotReady:
Also I recently noticed that when I copied the module the analyzer generated some weird code with extra lines (probably a bug) so the pointer was not extracted.
On another note... I was still not able to come up with how to hack wave array in this way. Mainly because I totally don't understand how it works. If someone could hack this we could have very cool new custom modules... for example wavetable array oscillator.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: working Assembler memin workareound!!!
Question? With this concept, are we looking at maybe the possibility of 2 separate apps [say a VST], being able to communicate/share memory locations with the concept that is being explored here ?
I ask this as a mere mortal
I know this 'concept' as been discussed in the past ... even having a 'server/client' routine that was posted. I was just wondering if this 'memin workaround' has that type of possibility. That would be a very useful ability.
trying to learn from youse guys !
I ask this as a mere mortal
I know this 'concept' as been discussed in the past ... even having a 'server/client' routine that was posted. I was just wondering if this 'memin workaround' has that type of possibility. That would be a very useful ability.
trying to learn from youse guys !
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Who is online
Users browsing this forum: No registered users and 74 guests