Jump to content

Photo

Scrolling in GTIA modes


13 replies to this topic

#1 Avram OFFLINE  

Avram

    Moonsweeper

  • 276 posts

Posted Sun Jul 3, 2011 10:18 AM

Is it possible to horizontally scroll horizontally in the GTIA modes? What I've tried so far only moves one chunky pixel at a time.

Thanks!

#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,671 posts
  • Location:Australia

Posted Sun Jul 3, 2011 10:32 AM

That's all you can do and have a "sensible" display.

The problem is that GTIA creates these modes by combining 2 pairs of graphics data from adjoining colour-clocks.

So if you scroll by an odd amount, all you're doing is mixing up the pairing, not actually moving the screen.

Even amounts - fine. For Mode 10 (Paletted), ignore the half pixel shift in your calculations, you still have to use even values.


The holy grail of GTIA tricks is getting that half pixel shift. It's been done, but it's not known entirely how and the GTIA in question was either hot or faulty, so it's probably not a trick that could work for all.
Would be nice if it did though, it'd open up all kinds of possibilities.

#3 Avram OFFLINE  

Avram

    Moonsweeper

  • Topic Starter
  • 276 posts

Posted Sun Jul 3, 2011 10:38 AM

That's a shame. I'll see how it looks when I shift with even values. Thanks Rybags.

#4 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,671 posts
  • Location:Australia

Posted Sun Jul 3, 2011 10:46 AM

An alternative but restrictive and somewhat expensive might be to have 2 lots of data and use switching between Mode 9 and 10.

Then you get the half-pixel shift but your graphics would all have to be of one colour and only even luma values.

So, e.g. HSCROL = 0 you're have Gr. 9, pixel shift is none.
HSCROL = 1, actual value still 0 but use Gr. 10 which gets a natural half pixel shift.
HSCROL = 2, back to Gr. 9 again.
etc.

Smooth shift, albeit a bit memory hungry.

#5 Avram OFFLINE  

Avram

    Moonsweeper

  • Topic Starter
  • 276 posts

Posted Sun Jul 3, 2011 12:17 PM

That's an interesting idea. I had planned on using antic #4 and then changing location 623 to get my extra colors so the memory usage wouldn't be too severe. But i'll finish up my current project and look into this afterwards.

#6 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,671 posts
  • Location:Australia

Posted Sun Jul 3, 2011 12:33 PM

Using Antic 4 has problems of it's own if turning on GTIA mode. Same deal with all of the non-hires modes.

You can't generate all the possible bit-patterns, so you lose out on some colours.

Antic generates bit pairs for the non hires modes:
00=PF0, 01=PF1, 10=PF2, 11=PF3

Since you can't mix PF2 and PF3 within a character cell, that limits what selections you have available.
In modes without PF3 you lose out even more.

#7 Synthpopalooza OFFLINE  

Synthpopalooza

    Dragonstomper

  • 971 posts
  • Location:knoxville, TN

Posted Sun Jul 3, 2011 2:29 PM

Using Antic 4 has problems of it's own if turning on GTIA mode. Same deal with all of the non-hires modes.

You can't generate all the possible bit-patterns, so you lose out on some colours.

Antic generates bit pairs for the non hires modes:
00=PF0, 01=PF1, 10=PF2, 11=PF3

Since you can't mix PF2 and PF3 within a character cell, that limits what selections you have available.
In modes without PF3 you lose out even more.


Correct, you only get 14 possible color combinations, and only 9 of these can be displayed every character cell. As I recall, colors 11 and 14 are undisplayable. In addition, certain of your higher luminance values can only be displayed in inverse.

If you are using Graphics 10 in antic 4 you do get all the available 9 colors in graphics 10 due to the weird layout of the palette but again, not all of them are available in the same character cell. In fact inverse characters actually have one fewer color available.


A possible way to get around this is to store two display lists in memory, one antic 2 and one antic 4, and store both in the same page in memory (for example page 6). Store your page # (page 6) in location 561. When you turn on gtia mode you would also have the low byte of the display list pointer (at 560) point to your antic 2 display list, which would enable you to have the entire range of GTIA colors available. When you turn off gtia mode, location 560 points back to your antic 4 display list.

This is based on a method I used in my Super CIN / Super MIN modes which display 80 colors at antic 4 resolution, by flipping a character set, the GTIA, and the display list pointer every VBLANK.


Edited by Synthpopalooza, Sun Jul 3, 2011 2:45 PM.


#8 Avram OFFLINE  

Avram

    Moonsweeper

  • Topic Starter
  • 276 posts

Posted Sun Jul 3, 2011 9:21 PM

Synthpopalooza - I found your Super Cin editorand look forward to experimenting with it!

#9 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,671 posts
  • Location:Australia

Posted Sun Jul 3, 2011 10:45 PM

An alternate idea, if you can tolerate a little bit of flickering between the Gr. 9 / 10 swap.

If you use pixel values 0, 2, 4, 6, 8, 13, 15 you get those luma values in Gr. 9.

In Gr. 10 you'd need to set COLBAK to luma 8, Gr. 10 uses PM0 for background so no problem there.

In that mode you have some repeated register mappings so colours 13 and 15 map to PF1 and PF3 which so far haven't been used. So, set those registers to luma values 12 and 14.

That should allow 7 colours in the 2 modes, the only downside being that you get alternating luma 12/13 and 14/15.

Of course, in Antic 4 + GTIA you still have the restriction of not being able to generate al the combinations in a char cell.

#10 Avram OFFLINE  

Avram

    Moonsweeper

  • Topic Starter
  • 276 posts

Posted Mon Jul 4, 2011 8:29 AM

Thanks again Rybags. I'm not fond of flickering but know it can work (doesn't Sheddy's Space Harrier use this?).

#11 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,671 posts
  • Location:Australia

Posted Mon Jul 4, 2011 8:42 AM

I believe so.

The thing with Atari's luma steps is that they're really evident among the lower ones but the higher ones you barely notice the difference.

So, e.g. if you happened to have a bunch of pixels that were alternating between Luma value 3 and 4, they'd probably be much more evident than some going between 12 and 13.

It's worth a shot - it's kinda untrod ground. Actually, almost anything involving GTIA and scrolling isn't exactly common outside of demos and I don't know if anyone's ever used switching of Gr. 9 and 10 lines to achieve smoother looking scrolling.

Edited by Rybags, Mon Jul 4, 2011 8:44 AM.


#12 Synthpopalooza OFFLINE  

Synthpopalooza

    Dragonstomper

  • 971 posts
  • Location:knoxville, TN

Posted Tue Jul 5, 2011 9:27 AM

An alternate idea, if you can tolerate a little bit of flickering between the Gr. 9 / 10 swap.

If you use pixel values 0, 2, 4, 6, 8, 13, 15 you get those luma values in Gr. 9.

In Gr. 10 you'd need to set COLBAK to luma 8, Gr. 10 uses PM0 for background so no problem there.

In that mode you have some repeated register mappings so colours 13 and 15 map to PF1 and PF3 which so far haven't been used. So, set those registers to luma values 12 and 14.

That should allow 7 colours in the 2 modes, the only downside being that you get alternating luma 12/13 and 14/15.

Of course, in Antic 4 + GTIA you still have the restriction of not being able to generate al the combinations in a char cell.



The other obvious disadvantage to this, of course, is you would be unable to use Player 0 if you use PMG, as that happens to be the background for graphics 10, unless you toggled PM0 everytime the screen is in Gr. 9. Your player would flicker.

You also need to toggle COLBK if you are using it in Graphics 10 (it's the background color in mode 9, but in mode 10 it is color 8-11). it can be any value when in mode 10, but it needs to be 0 when in mode 9 otherwise it will mess up your Graphics 9 display.


Edited by Synthpopalooza, Tue Jul 5, 2011 9:37 AM.


#13 Synthpopalooza OFFLINE  

Synthpopalooza

    Dragonstomper

  • 971 posts
  • Location:knoxville, TN

Posted Tue Jul 5, 2011 9:02 PM

Thanks again Rybags. I'm not fond of flickering but know it can work (doesn't Sheddy's Space Harrier use this?).



Indeed. Sheddy's game uses a display mode that I call "Super 7" ... a Graphics 7 screen which alternates pf0-pf2 every vblank to get 16 colors onscreen at once, in addition to a DLI color change used on the background. The title screen is also Super 7. The key is of course to keep your luminance changes within 1 or 2 of each other.



#14 Avram OFFLINE  

Avram

    Moonsweeper

  • Topic Starter
  • 276 posts

Posted Tue Jul 5, 2011 9:21 PM

Thank you for all these suggestions. Once I finish my first assembly-language game I'll see what I can do in the GTIA modes. My basic knowledge of coding means I'll probably keep it simple - eight colors in an antic #4 GTIA mode- but it should be instructive to me, and hopefully pretty!




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users