Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Happybobjr on February 05, 2011, 08:03:06 pm
-
I am attempting it in axe and basic with UsbDrv8x.
(also holing high score or the month)
http://www.eiswuxe.de/games/rocket-ninja-cyborg/
I figure i will have many questions so I night as well make a topic.
:P
Question. How could i relay a byte of info between a basic program and it's asm (axe) subprograms?
Edit: could i use
Getcalc("varX")+8->Q
-
If you wanna reference a real var in Axe try this:
GetCalc("varX")->P
float{P-2}->Q
I believe that could be optimized to:
GetCalc("varX")
float{-2}->Q
but I could be wrong.
-
thank you.
Why -2?
Edit: It's not working for me
-
I don't exactly remember why, but you have to subtract 2 from the pointer before converting it to or from a float in order to reference it with Axe.
-
That's because Axe returns the pointer+2 to account for the size bytes present in most programs/appvars. However, because floats are always 9 bytes large, they don't have those extra 2 bytes.
-
Hmm that would be a nice game indeed. Darl181 had a jetpack style engine if I remember but there were no platforms and such.
-
vertical and horizontal velocity engines FTW!
-
I was unable to figure out how to transfer data between the basic part and the axe part.
I am also not familiar how to call usbdrv8x through asm.
I think since I have it working, even if it's slow, I will keep it the way it is. Then I will fix it if i get everything else coded.
This is looking even more possible now that i am starting to feel better.