Hi,
I still can't get scrolling to work again since the recent changes. I am obviously missing something very obvious, but I gave up in frustration yesterday and thought a clear head would help this morning, but it hasn't.
Scrolling is currently overwriting the HW_REGs, no matter what address format I use to set the destination and source pointers (i.e. normal or >>8, I've tried both). What am I doing wrong?
Here's a breakdown of the current scroll routine (values for 720x480x8 mode):
* Check FIFO isn't full before proceeding
* Clear X[0-3] and Y[0-3] registers
* Turn off blitter features with command 0001
* Set Y[3] to 0
* Set X[3] to 0x50
* Command 7B00 sets source address to Y[3]X[3] (0x000050), or address of start of screen space >>8 (it should be 0x5000 normally)
* Command 7C00 sets destination address to the same as above using Y[3]X[3] without setting/changing their values
* Y[3] set to 0
* X[3] set to 680 - width of Window[0] (this is screen width 720 minus 40 pixels for the borders)
* Command 7207 sets destination raster width to X[3], with low byte set to bpp for the screen mode
* Set Y[3] to tile height (height of font - 16 pixels)
* Set X[3] to 0
* Command 7700 sets source image offset to 0,16 (to skip top row of window)
* Set Y[3] to window height minus tile height (this will be 440-16) - MINUS 1 for 0-based register(?)
* Set X[3] to window width 680 - MINUS 1 for 0-based register(?)
* Command 7500 sets blitter copy width & height to above values to copy the window, minus one text row
* Command 0100 blits source to destination (the offset portion of the screen to the top at 0,0)
* Clear the bottom row (this isn't the issue at the moment so I won't detail this section)
What am I doing wrong? Is this still overcomplicated?
Ok, I simulated a screen text CR/LF in the 'GPU_GEOMETRY_Testbench' and the saved test bitmaps seem to look fine.
I've attached the latest testbench as it now has the new 4GB addressable space source code. However, I set modelsim to cap the screen memory to 16 megabytes, otherwise it will crash badly.
Enter modelsim and change to the testbench directory.
In the transcript, type:
do setup.do
do test_blitter.do
Wait 10 seconds for the sim to complete.
Read the 'GEO_tb_Blitter.txt' to see the commands I sent.
(CR/LF begins at line 145 which sets the blitter to match the destination output screen specs.)
(Lines 146,147,148 are optional if they have already been set accordingly.)
(Lines 150,151 perform the CR/LF.)
Read the 'GEO_tb_command_results.txt' to see what was actually being sent to the GEOFF.
Look at:
GEO_print_before_crlf_blit.bmp
GEO_print_after_crlf_blit.bmp
GEO_print_after_clear_boxfill.bmp
To see what's happening to the display after the commands are being sent.
If you like, you can change all the coordinates and screen sizes in the 'GEO_tb_Blitter.txt' to match your screen and pixel sizes as well as screen address and see what happens after typing 'do test_blitter.do' once again in the transcript. Note that higher resolutions means a longer simulation time for the CR/LF as the sim needs to simulate all the hardware to copy all those pixels in simulated memory.