[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VTAB Is Slow?
- Subject: Re: VTAB Is Slow?
- From: "Dave Althoff, Jr." <dalloff.gcfn.org@sbcglobal.net>
- Date: Sat, 03 Feb 2007 22:19:59 GMT
- Newsgroups: comp.sys.apple2
- Organization: SBC http://yahoo.sbc.com
- References: <45b97772$0$28156$4c368faf@roadrunner.com>
- User-agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (Darwin/7.9.0 (Power Macintosh))
- Xref: g2news2.google.com comp.sys.apple2:17083
Bryan Parkoff <nospam@nospam.com> wrote:
: Was Steve Wozniak written $FBC1 routine himself? Didn't he think to use
: a table rather than a routine? Think of Line 0 through 23 to be translated
: into $400 through $7D0. If you store $400 through $7D0 in a table, table
: may be faster than a routine. A table has 48 bytes length. It should be
: stored in $FBC1 to replace the routine. Move another routine somewhere to
: give $FBC1 extra 24 bytes length to be total 48 byes length. Didn't you
: know this routine has 24 byte length?
: This routine spends approximately 35-38 cycle clocks. Are you going to
: use only three instructions like inx, inx, lda fbc1,x? It spends 9 cycle
: clocks. It is faster.
: Why do many assembly programmers claim that loading / saving data from /
: into memory is always slow than register directly? What if routine with
: about 15 instructions process register directly is slow than memory?
: It may be the point why loading / saving from / into memory is important
: for graphic if you want to load more than 20 images from $1000 through $1FFF
: into $2000-$3FFF for smoother animation.
Someone already mentioned that a lookup table would be larger than the
routine, and in the A][, space is at a premium.
It's also worth noting that the intrinsic routines do not assume that the
text screen is sitting at $400. It is possible to make use of the second
text page from $800-$BD0 (although most people don't because Applesoft
puts programs there) using the same routine. If you add an offset to the
table, then apply that correction in the routine, then suddenly the
lookup routine is even longer. And now that I think of it, can't that
routine also be used to calculate the position of a line on the hi-res
screen?
But if you want to know why there is a routine to calculate the vertical
position on the screen, consider why the screen is mapped the way it is
in the first place. Why is the screen not mapped with each group of 40
bytes on the next successive line? Do that, and you can find the start
of a line with a multiply-by-40 routine. But that doesn't work on the
Apple ][, because the display mapping was designed to reduce the chip
count.
It's funny how priorities change in 30 years, isn't it?!
--Dave Althoff, Jr.
/X\ _ *** Respect rides. They do not respect you. ***
/XXX\ /X\ /X\_ _ /X\__ _ _ _____
/XXXXX\ /XXX\ /XXXX\_ /X\ /XXXXX\ /X\ /X\ /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX