Post by vectrexrc on May 24, 2015 19:19:01 GMT -5
Hi
Is it possible to evaluate the current x,y location of the vector beam using code?
I have some code that is trying write a string of text out as a sequence of characters (vector object lists) with following call format:
JSR Reset0Ref ; reset the beam
LDA #-60 ; y loc
LDB #$00 ; x loc
JSR Moveto_d ; move beam to the draw position
LDU #string3 ; pointer to the string
JSR drawtext ; call my custom string drawing routine
where
string1:
DB "ABCDEFGHIJKLM",$80
eg. the beam is moved to the starting position outside the routine
This works fine when writing a text string of up to 6 characters - but after 6 the other characters become unstable. This must be because the total number of vectors being drawn are too large.
My idea to avoid this was to modify the routine to count how many characters have been written and then every 6,12 or 18 chars:
a) reset the beam using Reset0Ref
b) calculate an appropriate offset to place the beam back at the end of the previous chars already drawn
c) move the beam using Moveto_d
then continue writing the remaining characters of the string again...
eg. split a large string into sets of 6 characters
I am wondering what is best to implement part b)
Question:
Is possible to evaluate the current location of the vector beam to help me achieve part b
Is there standard function to do that?
Or would I need to keep track myself in the code myself? maybe that would be more efficient?
In addition:
any ideas on how to do modular division of the char counter? eg in order to evaluate when to do something every 6 chars?
I guess every 4 or 8 would be easier?
Otherwise my routine is currently displaying text using the original Atari Tempest font successfully (it just does not like long strings).
As anticipated it was not visible in ParaJVE or ParaJVD but only when I tested on the the Vectrex using a VecMulti.
I would appreciate any advice. Thanks.
Is it possible to evaluate the current x,y location of the vector beam using code?
I have some code that is trying write a string of text out as a sequence of characters (vector object lists) with following call format:
JSR Reset0Ref ; reset the beam
LDA #-60 ; y loc
LDB #$00 ; x loc
JSR Moveto_d ; move beam to the draw position
LDU #string3 ; pointer to the string
JSR drawtext ; call my custom string drawing routine
where
string1:
DB "ABCDEFGHIJKLM",$80
eg. the beam is moved to the starting position outside the routine
This works fine when writing a text string of up to 6 characters - but after 6 the other characters become unstable. This must be because the total number of vectors being drawn are too large.
My idea to avoid this was to modify the routine to count how many characters have been written and then every 6,12 or 18 chars:
a) reset the beam using Reset0Ref
b) calculate an appropriate offset to place the beam back at the end of the previous chars already drawn
c) move the beam using Moveto_d
then continue writing the remaining characters of the string again...
eg. split a large string into sets of 6 characters
I am wondering what is best to implement part b)
Question:
Is possible to evaluate the current location of the vector beam to help me achieve part b
Is there standard function to do that?
Or would I need to keep track myself in the code myself? maybe that would be more efficient?
In addition:
any ideas on how to do modular division of the char counter? eg in order to evaluate when to do something every 6 chars?
I guess every 4 or 8 would be easier?
Otherwise my routine is currently displaying text using the original Atari Tempest font successfully (it just does not like long strings).
As anticipated it was not visible in ParaJVE or ParaJVD but only when I tested on the the Vectrex using a VecMulti.
I would appreciate any advice. Thanks.