Project

General

Profile

Feature #3

High resolution antic support

Added by foft over 4 years ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
04/04/2017
Due date:
% Done:

0%

Estimated time:
12.00 h

Description

DMACTL bit 5 is normally playfield dma on.

In the core bit 6 is also supported to allow
10 - 2x colour clock - allowing 640x240 - or gtia 160x240
11 - 4x colour clock - allowing 1280x240 - or gtia 320x240

The core of the support is there but it needs debugging.

colour_clock_offsets.png View (2.12 KB) foft, 11/08/2017 09:10 PM

manymodes.gif View (4.75 KB) foft, 11/28/2017 09:27 PM

all.png View (28.5 KB) foft, 01/14/2018 11:09 AM

History

#1 Updated by foft almost 4 years ago

  • Status changed from New to In Progress
  • Priority changed from Low to High

Taking a look at this one for a change!

Its actually not looking too bad, at least the first bug. I start off the dma clock as usual and the first tick happens to early (due to faster colour clock). Then it ends up not stopping the DMA clock at the end of the scanline.

#2 Updated by foft almost 4 years ago

I fixed the dma clock, then I found character fetching was not working either. I've fixed that for 2x, but still remains broken for 4x. Doing a build to see if I'm right on 2x:-)

#3 Updated by foft almost 4 years ago

Fixed a few more bugs and tried it again. Was starting to despair that it worked on sim but not the real hardware. Then I selected 2x CPU mode - and it worked! Of course I'm blocking most of the cycle to wait for PBI in 1x mode, doh. So there is no possibility of accessing the ram so fast there.

There are some more bugs to squash but looking promising. Notably characters are missing over refresh cycles (again blocking data/character fetch) and I also need to sort out hscrol dma clock delays to by smaller. Also I need to fix an acid test or two...

iirc sdram refresh takes about 1/2 cycle, so far too long to allow during video dma at 2x or 4x. So will have to move that offscreen I guess in these modes.

#4 Updated by foft over 3 years ago

Sped up the refresh cycles to 2x and 4x. No missing characters now mid-screen. However this will probably flicker on SDRAM, since its shorter than a real refresh cycle iirc.

Took a look at hscrol. Understand what needs doing but too tired now. Built an example core for anyone who wants to play with it in the meantime. For v1 and v2.

#5 Updated by foft over 3 years ago

Fixed issue with sprites - I had changed hscrol to count at 4x original colour clock and forgot to adjust the dma address by 2 bits as well.
Made hscrol work as a colour clock delay, which should fix highres scrolling.

#6 Updated by foft over 3 years ago

Thinking about this I bet I just broke the hscrol change delay, since this will no longer allow late changes. One to think about...

#7 Updated by foft over 3 years ago

Back to computing the dma clock start cycle, rather than applying hscrol high bits as a delay. With 2x and 4x support still though.
Next up, need to sort out the output timing to be aligned with the displayed area... Then onto some gtia fixes and checking out what is up with 32x sprites etc.

#8 Updated by foft over 3 years ago

I added rendering of the video output ot the test bench... Very helpful to debug visual video issues.

#9 Updated by foft over 3 years ago

Example output from sim. I display ctrl F and ctrl G at the start and end of a line - to check alignment. I switch colour clock multiplier after two mode 2 lines.

So some issues...
i) background colour starts/ends offset. I start it after hblank ends - next 'colour clock after cycle 21'.
ii) playfield colour starts/ends offset - similar-ish I think, looks slightly different to me...
iii) DMA clock starts/ends DMA at the same cycle, but arrives to GTIA earlier so is offset and out of frame.

#10 Updated by 917k over 3 years ago

Keep up the good work, thank you for all the time you are putting into this!

#11 Updated by foft over 3 years ago

I think I have the antic alignment all working. Next up, gtia...

#12 Updated by foft over 3 years ago

gr.8 seems to be off by half a colour clock in 4x mode. Wonder if that is gtia or antic. Didn't notice that in gr.0

#13 Updated by Stephen over 3 years ago

Hoping to get back to being able to test out this new stuff real soon! I'm finally finishing up a major vehicle repair which has been keeping my tied up since mid April. I'll have it back on the road by end of day tomorrow.

#14 Updated by foft over 3 years ago

Added a many modes at once screen (antic 8 through antic f for now) to debug in 1x,2x and 4x. I don't see the half colour clock shift in gr8, perhaps I was mistaken when looking on the TV. I am seeing some stripes in some low res modes in 2x, which was a bug I had a few years ago in these modes.

#15 Updated by foft over 3 years ago

#16 Updated by foft over 3 years ago

Fixed the mode 8 stripes in 2x bug. Tricky to debug, one line fix!
Added gtia greyscale mode to the testbench. This isn't working properly in 2x and 4x - getting strange stripes. I guess the wrong clock is used in gtia somewhere. Will be easier to debug now I can see it:-)

#17 Updated by foft over 3 years ago

Fixed gtia modes in 2x and 4x. Also fixed oddline flag (needed for svideo pal).

#18 Updated by foft over 3 years ago

Working on PMGs. These will still be the original resolution. I found some issues with them related to the resyncing of the antic and gtia logic - this was the root cause of the oddline flag issue last looks somewhat fiddly to fix. Getting there!

#19 Updated by foft over 3 years ago

  • Tracker changed from Bug to Feature

#20 Updated by foft over 3 years ago

Still not onto GTIA! Doing some debugging on the non display parts of antic output. Improved my visualation tools to help with this. Here we have:
i) DMA clock (4 bits)
ii) Display shift reg
iii) AN0-2 output
iv) GTIA colour (+ some non dma sprites)

#21 Updated by foft over 3 years ago

So antic output looks near perfect. Some blue blobs on the left which I need to investiate. The shift register is clear so not sure where they come from!

#22 Updated by foft about 3 years ago

  • Status changed from In Progress to New

Paused until anyone uses it. If it starts getting used I might fix the offsets...

#23 Updated by foft about 3 years ago

  • Priority changed from High to Normal

#24 Updated by Stephen almost 2 years ago

Sorry - been away far too long. I have not unpacked my Eclaire since I got back from VCFMW in 2017. I am preparing for this show in 2019, so I am all updated to core 31. I'll be looking into the 2X and 4X ANTIC modes more over the next few weeks.

#25 Updated by foft 7 months ago

xxl might be making his E: and S: driver work in high res, I hope. Please :-)

Also available in: Atom PDF