Jump to content
IGNORED

Scrolling in GTIA modes


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...