
Originally Posted by
-=Fox=-
It almost sounds like your looping though the targets too fast, or the CPU program isn't looping correctly.
Also if your interfacing the Target Finder to the CPU using the Data Port you MAY need to slow down the CPU, it can and will go faster than wire data refreshes, it may be just going too fast.
There is a opcode to slow the CPU down between certain instructions (Like output), its called: IDLE, BP told me that it slows the CPU down for the exact same amount of time it takes for the wire system to reset.
I originally did have the problem about CPU changing targets too fast, but I found a perfect solution for it so that it changes targets as fast as possible:
Code:
////////////////////////////////////////////////
// Selects the next target on the target finder /
/////////////////////////////////////////////////
NextTarget:
push eax
push esi
push ecx
push edi
// Save the bearing and elevation of the last target
in esi,0 // bearing
in ecx,1 // elevation
in edi,2 // distance
// Move to the next target
out 0,1
out 0,0
// Loop while not finished changing targets
NotDone:
in eax,0
cmp eax,esi
je NotDone
in eax,1
cmp eax,ecx
je NotDone
in eax,2
cmp eax,edi
je NotDone
pop edi
pop ecx
pop esi
pop eax
ret;
I will double check that it is looping correctly, but I am already close to %100 sure it is because I have a counter which ticks everytime it changes targets and it doesn't loop through every target before returning to the same target again. It seems to be a problem with the target finder.

Originally Posted by
-=Fox=-
But as far as ID's go, since you can't pull the string data from the Target Finder to the CPU... a wild idea would be to have the CPU generate an ID for each player, since you only draw the players once, you could use a GPS based ID.
Not a bad idea, but it means two nearby players will be drawn as a single blip on the radar. This might have to be my solution =/
Appreciate the time you put in to your answer!
Would there be a way to figure out the memory structure of the target finder by looking at the LUA files?
Bookmarks