Hi guys, I have a new problem developing for the VB, this time is about interrupts, some time ago I asked for how to measure time and got some responses… sadly I didn’t understand that much about interrupts and made somethings wrong… the time measurement. I was not calculating time based on the timer interrupt but with some fancy software method which in the end proved to not be that much accurate.
I have been all the weekend trying to figure it out why when
compiling with the latest version of gccvb, crt0.s and vb.ld, somehow,
the following VIP_REGS just don’t update its state:
INTPEN is allways 0x601F
This way I can’t get the timer interrupt to work, and all physics
simulations just can’t be done accurately.
Now, I have noticed a few things from the new crt0.s, it defines the
timer interrupt vector as follows:
now, the add -4, sp instructions as the VB development manual states
that has to be written in order to not loose the call records, but it obligates the programmer to put the following
instruction at the end of his tim_vector function:
add 4, sp
otherwise, the control flow is lost.
I’ve tried to compile using older versions of ctr0.s anb vb.ld, even one
from the gccvb for Windows but the result is the same.
This problem causes that even when the tim interrupt flag is raised in
TRC hardware registry, the interrupt it is not fired, but just the first time.
Hi there DogP, long time since I came, well I don’t remember exactly why I did that, but I suppose it was because in the engine I’m messing arount with a lot of the hardware registers, so after setting up a level adn before showing it, I call the function to settup the column table again.