Hires vertical position calculations?

4 posts / 0 new
Last post
Offline
Last seen: 6 days 11 hours ago
Joined: Aug 4 2022 - 23:18
Posts: 2
Hires vertical position calculations?

Heya,

I have been playing for a while with 6502 assembly and namely on Apple ][. Presently I got curious about how vertical position would be calculated in hires. Yes, some uses tables and got one of my own for both hires and text/lores. However hires table is created in basic, and I am more curious about calculating it without using table. Namely calculating with assembly and that horrible 8 bit register. Google didn't give out pure math (read none at all).

Unless somewhere in memory is table used by basic's hires graphics function, in which case that table will be handy. Didn't find anything resembling such table however, but would be memory saver if such thing exist.

If you are curious what I am doing right now, it is actually trying put up two functions. Hires versions of hlin and vlin. Byte accurate versions, not pixel. I am working with something? Well, won't give out details until all required snippets are gathered... nope...

 

Online
Last seen: 49 min 46 sec ago
Joined: Jun 18 2010 - 13:54
Posts: 543
You might want to look at the

You might want to look at the GBASCALC routine in the Monitor ROM ($F847).

 

Offline
Last seen: 6 days 11 hours ago
Joined: Aug 4 2022 - 23:18
Posts: 2
Actually are you sure that

Actually are you sure that one is right address, coz all results seem be pointing to text memory address. Plus only PLOT seem be calling it, not HPLOT.  Kinda useless, as basic already has VLINE and HLINE for LORES, but I am working with HIRES and looking to create similar call functions with assembly. HPLOT is both far too slow and don't need pixel accurate function. Just byte accuracy for right results...

Offline
Last seen: 1 week 4 days ago
Joined: Sep 14 2022 - 20:02
Posts: 1
As I recall, you could

As I recall, you could transpose a few bits in the Y coordinate, mulitply by 40, and then you should have it.Except that I think there might be some skip bytes at the end of every so many lines, which complicates things. Can anyone shed some light on this?

Log in or register to post comments