High resolution antic support
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.
#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.
#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.
#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.
#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.
#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.
#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:-)
#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)