Electronics > FPGA

FPGA VGA Controller for 8-bit computer

<< < (575/608) > >>

BrianHG:
Ok, step 1:

Make take my 'BrianHG_DDR3_DECA_Show_1080p' project and use it's video output section trimmed down to 8 bit color and add a dummy palette between the 8 bit video output to drive a 32bit color result.  Change the PLL to 74.25MHz and the video settings to 720p.

(You will need to engineer a 32bit .mif file, 8 bit address input, 32 bit data out as your ARGB color.)

I would engineer and play with this as a new 'BrianHG_DDR3_DECA_Show_1080p' project first before committing to the GPU as the compile time is quick.  Note you can change the IO for the RS232 debugger so you may test writing data to the pixels.

Since the screen is 900kb, and you geometry unit can only address 1024kb and the Z80 can only do 512k, begin the screen base address memory at 64kb so that the Z80 can at least upload the font from Z80 into the beginning of memory.

Next, moving onto the GPU...

In your GPU, erase your:
GPU_HW_Control_Regs
data_mux_geo
sync_generator
vid_osd_generator
vid_out_stencil

Now, your output will be hard-wired 1280x720 8 bit color.  Graphics only.  1 layer.  So, you will need to blitter all your text setting the geo source to 1 bit color for the font, and 8 bit color for the output screen just like before.  All your other control regs are now gone.  (You can use the scale setting in the blitter to get a simulated 640x360 clean, or 640x480 with some scaling chunks on the Y axix, or, find a 16x24 font and without scaling, get the best Z80 text you have seen yet.)

In fact, with all the erased modules, it might be easier to just add the 'Z80_bus_interface' and 'geometry_processor', the only 2 modules from the old GPU, and add them into the 'BrianHG_DDR3_DECA_Show_1080p', rename it project as your new GPU project.

Note that the read and write channel numbers for the Z80 and geometry unit should remain the same and my single 1080p maggie channel should be moved onto the next additional DDR3 read channel.

nockieboy:
Okay, literally just had ten minutes to scan your post.  Confused is an understatement, so I'm going to have to take granny steps to make sure I'm not doing it all wrong.  :-\

I've copied your 'BrianHG_DDR3_DECA_Show_1080p' project, renamed it to something similar to our existing project and amended the project top-level files and Quartus meta-project files accordingly.  I've copied across Z80_Interface and geometry_processor files.  I've zipped the project up and attached it for reference.


--- Quote from: BrianHG on October 14, 2021, 02:12:00 pm ---Make take my 'BrianHG_DDR3_DECA_Show_1080p' project and use it's video output section trimmed down to 8 bit color and add a dummy palette between the 8 bit video output to drive a 32bit color result.  Change the PLL to 74.25MHz and the video settings to 720p.
--- End quote ---

Which file am I editing for these changes?  Just give me a few more pointers so I know I'm hunting in the right place for these settings. ???


--- Quote from: BrianHG on October 14, 2021, 02:12:00 pm ---(You will need to engineer a 32bit .mif file, 8 bit address input, 32 bit data out as your ARGB color.)
--- End quote ---

This is a new palette table?


--- Quote from: BrianHG on October 14, 2021, 02:12:00 pm ---Since the screen is 900kb, and you geometry unit can only address 1024kb and the Z80 can only do 512k...
--- End quote ---

... without an internal MMU managed by the Z80_Interface to switch to different 512KB blocks of DDR3.  Once I've gotten my head around how the new memory will be set up etc, shouldn't take long for me to create an MMU controlled by an additional IO port for the host.


--- Quote from: BrianHG on October 14, 2021, 02:12:00 pm ---Now, your output will be hard-wired 1280x720 8 bit color.  Graphics only.  1 layer.  So, you will need to blitter all your text setting the geo source to 1 bit color for the font, and 8 bit color for the output screen just like before.  All your other control regs are now gone.  (You can use the scale setting in the blitter to get a simulated 640x360 clean, or 640x480 with some scaling chunks on the Y axix, or, find a 16x24 font and without scaling, get the best Z80 text you have seen yet.)
--- End quote ---

Yeah, I think we're going to have to break this down into simpler steps so I don't royally mess this up.  Sorry.

BrianHG:
Don't go too far too quick.
Before adding any Z80 bus or geometry unit, first take a look at the existing deca vpg files, it's pll and my bitmap display system.

You want to change the deca video mode from it's dedicated vpg pll settings and and comment in it's 720p settings in it's vpg section.

Then on my pixel address read generator, you also want to change to a 720p resolution with 8 bit color.

You can test uploading an image via rs232 debugger after you match the GPIO for the RXD/TXD to your current PCB.

But again, start with getting a 720p out.

Then we can look at hooking up the z80 and geo units.

BrianHG:
I dont know anything about Z80 MMUs.  The only experience I ever had with 8 bit systems was the 6502 where we used bank switching.

For now, isn't 512k access enough?

Remember, it is the geometry unit which will access the graphics higher memory, you do not need to give the Z80 full access, only enough for uploading a font.

You will need to explain the earlier mentioned 16k system, what it doe, how it works...

BrianHG:
Begin with taking a look at folder vpg_source.

Inside BHG_vpg.v, create a new video mode 720p in the assign section at the bottom.

This wasn't my original code, so you will have to deal with the math.  I've attached a 1080p and 720p standard so you may work out the true 720p numbers.

Next you will need to fix the PLL located in sub-folder 'pll' and edit file pll.v.
I would just change the 'altpll_component.clk0_divide_by = 100,' to 200 making the PLL 74.25 MHz.
Next, check that you are getting a 720p video output.

Next, go to the inputs on my 'BrianHG_display_rmem' initiation and fix them up for a 720p output.

Also inside 'BHG_vga_generator', you will want to make the 'altsyncram   Line_Buffer_DP_ram' buffer address and output 8 bit instead of 32 bit.  Just copy the r/g/b all to the 1 new 8 bit output making a monochrome image.

Get this much working and feed some data into the DDR3 via RS232 debugger and you should see a B&W image.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version