VGA6448, text-based VGA in ATF1504AS CPLD

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by plasmo »

I posted a reply but it completely disappeared to somewhere... So here is the reply again:

I bought my 4K DPRAM from UTSource. I just checked and I see the price has went up quite a bit. It was around $2 each, but now is $3.80 in quantity of 1. Nevertheless, it is not particularly expensive.

An alternative design is overclock W65C02 to 25.175MHz and use it as the video controller, viewtopic.php?f=4&t=6517. W65C02 is able to fetch a byte and load the video shift register in 8 clock cycles. At 25.175MHz it is able to keep up with streaming of video data during the active video period. During video retrace period it has spare capacity to do other tasks. I'm thinking it may have enough throughput to process ReGIS commands over the serial port (https://en.wikipedia.org/wiki/ReGIS). I'm also in the process of testing out W65C816 to 25MHz thinking the larger memory space may help with color memory and more memory for commands. viewtopic.php?f=4&t=6695
Bill
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by Proxy »

i have never heard of UTSTore before, and i can barely find any mention of them online.
looking at the site most prices are basically the same as on Mouser/Digikey, but sometimes you have super cheap ones in there.
how can they afford to be so cheap?

is it like Ebay specifically for Electronics?
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by plasmo »

I've purchased plenty of ICs from UTSource. I see them as one level above eBay in term of quality. Most their used parts are good, even though parts may be re-branded. They have very generous part return policy for the few that didn't work. I did notice the prices have gone up 50-100% in past 6 months.
Bill
PS, an exception to good used parts is 6502--bought 10 and only 1 works. Returned them all without any problem. Good used 6502 is particularly hard to find. I've purchased used 68000, Z80, Z280, memory, CPLD without any issues
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by BigEd »

(Can I make a quick plea here that we don't turn this thread into a discussion about sourcing parts? It's presently a thread worth watching, about VGA. Please start a new thread or use an existing one.)
Martin A
Posts: 197
Joined: 02 Jan 2016

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by Martin A »

I've been tweaking my ATF1508 board and have managed to push it to 800x600 SVGA. with 100 x 32 text

There's one 4k dual port ram still a stock 55ns part, the CPLD is 10ns. The 25.175mhz clock is replaced with a 40mhz.

To keep the screen mapping simple, each row starts on a 128 byte boundary. Which means the character data has to be squezed in the "spare" 28 bytes at the end of each row.

So:
line 0 is 100 bytes screen data, 4 bytes padding 8 byte data for character 32, 8 bytes data character 64, 8 bytes data character 96.
line 1 is 100 bytes screen data, 4 bytes padding 8 byte data for character 33, 8 bytes data character 65, 8 bytes data character 97.
etc.

Tha allows for 96 characters plus there inverses. Character codes 0 to 31 would generate odd 1/2 screen data half padding characters.

Since 32, 8 pixel characters rows is only 512 lines with each pixel doubled, there is a 9th row of border under each character to stretch the screen to fill the space better.

Seen running CPM
running.jpg
VHDL is included if anyone's interested.
Attachments
GFX.zip
(2.75 KiB) Downloaded 138 times
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by floobydust »

BigEd wrote:
(Can I make a quick plea here that we don't turn this thread into a discussion about sourcing parts? It's presently a thread worth watching, about VGA. Please start a new thread or use an existing one.)
This is a very good thread I've been following as well. However, I'll have to disagree with you on this one... as Bill brought it up and it's his thread. The parts sourcing is mainly around parts specific to this thread and VGA controller he's designed. I'd rather have some insight on where to get some of the required parts in the thread versus hunting around for parts should I decide to build this up.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by Dr Jefyll »

Thanks for caring, Ed. But I confess the same thought struck me. Three posts -- two of them by the OP! -- is hardly a case of major derailment.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by BigEd »

OK, we'll see what happens!
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by plasmo »

Martin A wrote:
To keep the screen mapping simple, each row starts on a 128 byte boundary. Which means the character data has to be squezed in the "spare" 28 bytes at the end of each row.

So:
line 0 is 100 bytes screen data, 4 bytes padding 8 byte data for character 32, 8 bytes data character 64, 8 bytes data character 96.
line 1 is 100 bytes screen data, 4 bytes padding 8 byte data for character 33, 8 bytes data character 65, 8 bytes data character 97.
etc.
I think it is very clever to put font table at the end of each line. With that approach, the standard 640x480 VGA can have 80 columns and 32 lines using a 4K DPRAM which is much better than my earlier concept of 80 columns x 24 lines using 3K of text memory and 1K of font memory. I'll look over my design to see if I can do that with a 64-macrocell CPLD.
Bill

Edit: I'm expecting the VGA6448 PC board to be delivered today.
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by plasmo »

Received a batch of pc board from JLCPCB this afternoon. Among them is the VGA6448 rev1. It is the easiest board to build so I put one together this evening. Everything fits, but the two PLCC44 sockets are quite close and the PS2 connector is a tight fit. I only have the VGA CPLD design ready; the PS2 keyboard state machine is still work-in-progress, so I pulled off the PS2 CPLD and plugged the board into a 5-slot RC2014 backplane with CRC65. The picture shows VGA6448 in the foreground and CRC65 behind it. Well... it works.

Now I need to find time to work on the PS2 keyboard state machine. Too many fun projects going on...
Bill
Attachments
DSC_66140721.jpg
DSC_66130721.jpg
SimonJ5
Posts: 31
Joined: 19 Dec 2002
Location: Cambridge, UK

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by SimonJ5 »

Bill,

Very nice - I must finish off assembling the CRC65 board and wait for the gerbers for the VGA board!

Thanks,

Simon
okwatts
Posts: 110
Joined: 11 Nov 2020
Location: Kelowna Canada

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by okwatts »

Looks Good, I'll wait and see how the PS2 keyboard works and then I might have to order one with a 7032 programmed for me unless the 1504 can substitute for a 1502 in the same socket.
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by Proxy »

that is a very clean looking PCB!
Is there any harm in leaving an unprogrammed PLD/CPLD in it's socket when powered? I thought all the IO would just be in Hi-Z.
okwatts wrote:
Looks Good, I'll wait and see how the PS2 keyboard works and then I might have to order one with a 7032 programmed for me unless the 1504 can substitute for a 1502 in the same socket.
the ATF1502 and ATF1504 have the same exact pinout for their 44 pin version. only difference is the amount of Macrocells, so you should be able to swap out one for the other.

Thanks to plasmo's tip with UTSource i'll be getting myself a bunch of 8k DPRAM Chips and ATF1508 CPLDs.
I'll make some breakbout board for the ATF1508's so i can test all of them once they arrive.
i'm designing a PCB for a Video Card that can take either DPRAM or normal SRAM, you switch between the 2 using a Jumper (and by removing whatever chip is not needed), so i can experiment with both options without having to design 2 seperate PCBs.
if there are any interesting results from the testing i'll probably post them either here or in a new thread... kinda depens on if this becomes the general VGA development thread or not.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by floobydust »

Bill,

Very nice board and a nice addition with the future keyboard interface. As I have a CRC65, this board looks like a nice addition to that, but I'll need to get a 2016 bus PCB.
plasmo
Posts: 1273
Joined: 21 Dec 2018
Location: Albuquerque NM USA

Re: VGA6448, text-based VGA in ATF1504AS CPLD

Post by plasmo »

Thanks for the many comments. I'm currently working on the PS2 keyboard state machine, it is bigger than I though, but should fit in a 64-macrocell CPLD.

Regarding whether un-programmed CPLD's I/O are in high-Z state: I don't know. So I thought the safest approach is just removing the unused CPLD.

I will publish the design information of VGA6448 here. It currently describes the prototype VGA6448, but will be replaced with rev1 of VGA6448.

I will have extra VGA6448 rev1 pc boards and I can mail blank boards to CRC65 users who are interested in trying it out.
Bill
Post Reply