|
Post by D-Type on Apr 27, 2020 16:42:53 GMT -5
As subject.
Or any information on it, really?
|
|
|
Post by Peer on Apr 28, 2020 2:47:46 GMT -5
Yes, I did and I have Approximately 4 months ago, I did some extensive investigations on this routine. I do not have the results at hand right now, but here is a short summary from what I recall: I strongly suspect that this routine is not intended for drawing grids. It is rather a drawing routine for vector lists that use a simplified but memory-saving compressed format where each vector coordinate is encoded by a nibble (i.e. only 4 bits). A y/x coordinate pair is thus condensed in a single byte. At some place in the original documentation this format is called "NIBBY STYLE LIST" (or something similar). I think this routine is some sort of experimental code that somehow survived in the BIOS. The implementation code significantly differs between BIOS versions (B796) and (7931 + 7ADB). Also the semantics of the vector list encodings differs (e.g. the way how "moves" and "draws" are encoded). So the whole thing constitutes an incompatibility between those BIOS versions, and code working on the one version will not work on the other versions (or rather produce a different result on the screen). There is also a sample binary I wrote in C that demonstrates this. Just run it on different consoles, or run it in Vide and select different BIOS versions before starting, and one can directly see the difference. If someone is interested in the details (and if I find the time ) , I can put these findings and the sample code online. Cheers, Peer
|
|
|
Post by D-Type on Apr 28, 2020 18:22:54 GMT -5
Thanks for your thoughts, Peer. You confirmed what I had concluded.
I don't see a use case for this code, especially if it changed between revisions.
As I haven't played with C since the 90s,I will ignore this function for now (= probably forever)!
|
|
|
Post by Peer on May 2, 2020 8:47:44 GMT -5
One thing I forgot to mention: Draw_Grid_VL internally writes to 0xc880, using it as a temporal storage. Since 0xc880 is usually considered as the beginning of the user RAM, using Draw_Grid_VL is a bit dangerous. Especially if you have a C setup and a C compiler which place global RAM variables starting from 0xc880 onwards
|
|
|
Post by Peer on May 2, 2020 8:58:45 GMT -5
Another thing I forgot to mention here:
I strongly presume that Draw_Grid_VL requires just one parameter, which is the base address of the nibby style list, passed to the routine in the y register. The x register is not used in a meaningful way and modified only as a side effect of the subroutines used by Draw_Grid_VL.
|
|
|
Post by Peer on May 2, 2020 12:11:03 GMT -5
Added all my findings about Draw_Grid_VL plus some annotated C source code and binaries to the Vectrex Academy Lab page.
Cheers, Peer
|
|