Jump to content
IGNORED

A little update on my cross platform 64 column graphics text driver


JamesD

Recommended Posts

If you haven't been reading in the Atari 8 bit programming area...
I ported 6502 version of my 64 column graphics text driver from the Atom to the Atari a week or so ago and it now supports 64 or 80 columns.

The standard 6502 code is not as fast as the MC-10 in spite of the Atari's much faster clock speed and jumping through hoops to optimize it.
So over the past few days I created two new options for the 6502 version using the 65816 instructions.
One using the MVN instruction to scroll the screen, which placed the Atari somewhere between the MC-10 and VZ200 in speed.
The other I modified the unrolled loop used for the 6502 scroll so it would use 16 bit LDA/STA pairs rather than 8 bit.
No other 65816 code was used, but the results speed for themselves when you see them side by side.
The fastest Atari version is about the same speed as a 140% clock speed MC-10 (just over 1.1 MHz) and it is now faster than the VZ200 version.
Keep in mind the VZ200 has to copy across video pages so it's scroll is copying an extra 1024 bytes per scroll.


Here is a comparison of the Atom, Atari 6502, MC-10, and VZ200. I already posted this in another thread. I suggest HD quality.



Here is a comparison of the Atari 6502 (grey screen), the Atari using the 65816 MVN (green screen), the Atari 65816 unrolled loop (amber screen), and the VZ200 in the usual 6847 reanimator green. Remember, this is without changing the Atari's clock speed!
Yes, there was a bug in the clearing of the last line on the Amber version. I had already recorded the video before I noticed.


  • Like 1
Link to comment
Share on other sites

The 65816 scroll saves 27,648 clock cycles minus the overhead to use the 16 bit mode.
This is assuming no penalties from crossing a page boundary are involved in the loads.
The code grew by 11 instructions, but only 1 of those was in the loop.
A pretty easy change once you know the 65816 and a significant speedup.

Link to comment
Share on other sites

The VZ-200 (VTech Laser 200) is a Z80 computer, although with a 6847 instead of a VDP, so some of the work might already have been written.

 

Actually some of the choices for JamesD's targets have that in common:

 

VTech VZ-200: Z80 and 6847

Tandy MC-10: 6803 and 6847

Acorn Atom: 6502 and 6847

Atari: 6502 and CTIA/GTIA

Edited by carlsson
Link to comment
Share on other sites

It would not be that difficult to port to the 9918. It would involve taking code out in some places and putting in new code in other places.
As long as I wouldn't be writing too fast for the VDP, it should actually be faster rendering two characters at a time than on a bitmap.
I figured this would work well for ADAM CP/M.

This is the code to write a byte with a line combining two characters:

		ld		a,(de)		; get byte of 1st char
		add		a,(hl)		; get byte of 2nd char
		ld		(IX+32),a	; write result back to screen
		inc		de		; next font1 data location
		inc		hl		; next font2 data location

Will look more like this:

		ld		a,(de)		; get byte of 1st char
		add		a,(hl)		; get byte of 2nd char
		out		(VDP?),a	; write result back to screen
		inc		de		; next font1 data location
		inc		hl		; next font2 data location

That's the easy part though.
I have to calculate and set the VDP start address, and have to read bytes from the screen when writing 1 character at a time.
Scrolling would be slow.

Link to comment
Share on other sites

BTW, I ported it to the Atari because I could do 64 or 80 characters per line.
That let me test 80 column changes before going to some machine like the Plus/4.

I want to finish 3 other versions for 6847 machines and then maybe I can think about a 9918 port.
We'll see. I have some other stuff I want to write as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...