6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 12:08 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CRTC core
PostPosted: Fri Apr 13, 2012 2:49 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Hi!

In another topic, i was discussing the idea of a 3d module.
But as for now it lacks a important component, and that is a sort of CRTC (video display generator) that would generate 8 bit color(R 2-bit,G 2-bit,B 2-bit,Luma 2-bit, i suppose this scheme would work) graphics, with the max resolution of 192x256(for now).
I don't really know how pal video is generated, so i don't really know how to make this from scratch.
Could someone strip down some other project that implements color video generation, so it might be adjusted to fit the description.
It would be great if this would fit in a XC9536 cpld, because they are kinda inexpensive. Also it should be similar to the MC6847, continuously loading pixels from video ram, with the fs signal output.
This could be used to develop future projects, also it could be used in other projects(any project where there is a mcu that does some sort of graphic, and renders it).

I also made a c++ program in visual studio that emulates the device described above, it works fine on win xp, but on win7, it displays in super slow motion... Is there a good and simple way to display simple graphics in C(i tied many solutions that Google gave me, but none worked).


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Fri Apr 13, 2012 4:32 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Hi Dajgoro

The PACE project has some video controllers in VHDL, including the 6847:
https://svn.pacedev.net/repos/pace/sw/s ... ent/video/

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Fri Apr 13, 2012 9:14 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Also, Peter Wendrich has written a version of the VIC-II, 656x for C-64 in VHDL in the Syntiac Pages. Hunt inside the .zip file.

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Fri Apr 13, 2012 2:40 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1042
Location: near Heidelberg, Germany
ElEctric_EyE wrote:
Also, Peter Wendrich has written a version of the VIC-II, 656x for C-64 in VHDL in the Syntiac Pages. Hunt inside the .zip file.


But watch for the license... - as far as I read it, it is not what OSF would call open source (IANAL)

André

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sat Apr 14, 2012 12:20 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Very true! I did not read his license... Bad habit of mine... At least he has posted his work, so others can learn from the code without explicity copying and using it. That attitude I can appreciate!

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sat Apr 14, 2012 11:58 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Thanks for the links!

mstram (Mike) maild me this fpga soc system that he found, with an integrated vga controller, link:
http://www.fpgacpu.org/xsoc/


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 6:22 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
If somebody makes the hardware, and sends me a board, I'll volunteer to write some Verilog for a video generator.


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 2:55 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I could build a board, but i currently only have xc9536 cpld, can this cpld be used, or would you need something more powerful(the xc9573?). I aim on cheap components, and some fpga can be really hard to find and expensive(i also like the plcc package, since i can solder the socket on perfboard), i also usually shop on ebay...


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 3:19 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Here's a display controller using an XC95108: http://elm-chan.org/works/crtc/report.html

It's probably hopeless to try to fit in a smaller device. And his design even includes an external IC for PAL/NTSC modulation.

Of course, you could use the 65org16 Dev board. It has everything required for video generation, and plenty of room left over in the FPGA to add some 3D functionality.


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 3:40 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
This is great, but i can't find any XC95108 in plcc on ebay, any other cheap store where i could get one, without getting robbed on shipping prices?


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 4:05 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Could this fit in the XC9573 if the resolution is shrunken down to 192*256?


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 4:36 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Dajgoro wrote:
Could this fit in the XC9573 if the resolution is shrunken down to 192*256?


Hard to say, but as that would only save 2 or so macrocells, it's not very likely.


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 6:23 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Any suggestions where to find the 95108 in plcc?


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 6:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
I tried to investigate the implementation. The project is described in ABEL HDL (pdf), which needs an older version of the Xilinx tools: perhaps version 10 is the latest which will support it. I had some success using 8.2 command-line tools (with cribs from here) to convert to user-unfriendly vhdl and then synthesising in version 11. It still failed to fit a XC95108-7-PC84 with default tactics or even with adjusted tactics:
Code:
Mapping a total of 108 equations into 6 function blocks....................................ERROR:Cpld:892 - Cannot place signal VSI. Consider reducing the collapsing input
   limit or the product term limit to prevent the fitter from creating high
   input and/or high product term functions.
Attempting to reduce the input or product term limits seem to lead to an impasse with:
Code:
ERROR:Cpld:837 - Insufficient number of macrocells. The design needs at least
   109 but only 108 left after allocating other resources.

So this design does seem to be right on the limit, if not a little over.

Probably re-writing the ABEL in a modern HDL and studying the implementation would be the thing to do, if it is worth pursuing - or using the supplied JEDEC files if it is good enough as is, which means targeting the exact device.

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: CRTC core
PostPosted: Sun Apr 15, 2012 6:42 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
BigEd wrote:
So this design does seem to be right on the limit, if not a little over.

Nice work. Fitting this in a smaller device is even more impossible than I had guessed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: