Open tschak909 opened 5 years ago
It was a rainy day, so I had a go at porting the Atari fast text routines to the C64 :). feature/c64-fasttext in my fork of the repo.
It's very much a first pass and probably fairly naive - I'm a newcomer to the 6502 - but according to some very rudimentary benchmarking in the VICE monitor, it's taken us down from ~10000 to ~3000 cycles per character drawn.
No color support yet (though it should be fairly easy to drop in, since we could piggyback on a lot of the same offset-calculation logic) and due to the awkward bitmap layout, X-axis boundary checks aren't as straightforward (I've left them out for now), but it's a start.
It shouldn't be too difficult to adapt the same code to the C128 - and given the overhead involved in accessing VDC RAM, I imagine we'll see an even greater benefit there.
eeeeeeeeexcellent :)
I've added a C128 version (for both 640x480i and 640x200p modes) to the same branch. Lots of room for improvement, I'm sure, and I haven't benchmarked it yet, but combined with the ethernet interface, it feels positively speedy :)
That is awesomesauce, god I have to try on a real 128 :)
You really do! The interlaced mode is a bit demanding on monitors, but on my Sony PVM, it's sharp as a tack.
The VDC is very flexible (if somewhat buggy and chaotic and slow), but there isn't much software out there that makes good use of it, but I recently heard of a demo that squeezes interlaced 800x600 video out of it. If I run out of things to do this winter, I might have a go at adapting that code into a TGI driver, so we can show an unadulterated 512x512 PLATO screen without any scaling or anything.
The problem is, especially when going beyond the officially-documented text and 640x200 graphics modes, results are very dependent on the monitor and the particular revision of the VDC hardware, and emulation is a bit hit-or-miss - my 128DCR and CRT monitor renders a noticeably different (and much better-looking) 640x480 display compared to what I get in VICE. So, the more people trying it out on different real 128s, the better!
Ugh, I lost a drive on my main development machine and my work-in-progress source for this was one of the casualties. Might be a little while before I can get everything back together :/
No worries, anything I can do to help?
-Thom
Thanks; it's mostly a matter of fishing through the last copy of the code I've got (in my c64-fasttext branch) and trying to figure out what works and what doesn't. IIRC I had the fast text routines and color text working for the C64, and the 128 version was well along the way - fast text was working and color was very broken but sort of working.
The C64, Apple2, and C128 targets need faster routines.
You can see an example of accelerated text output in: https://github.com/tschak909/platoterm64/blob/master/src/atari/fast_text.s
can somebody adapt this for the above targets?
The fast text routine has flags for: