Jump to content
IGNORED

GTIA mode 10 (and 11)


mutil8

Recommended Posts

In my quest to relearn 6502 assembly (been decades) and learn ATARI specifics (I was mainly on Apple II back in the day) I have come across GTIA graphics mode 10 and 11.

Doing some simple experimenting I was able to get 9 colors (including background) in mode 10. 15 or so in mode 11 but unable to change colors.

 

These modes appear to be very rarely used, especially in games. Is this due to increased use of memory, speed issues updating screen, etc?

 

I would be interested in any games that use either of these modes, hopefully accessable via fujinet, or demos. 

Also any simple code that utilizes these 2 modes.

 

Link to comment
Share on other sites

Don't forget Mode 9.

 

The modes are:

Luma only.  COLBAK determines background colour/luma.  Generally you should leave luma at 0.

 

Paletted.  Background colour is by PM0 colour.  PM1-2 and the COLPFn + COLBAK registers allow 9 colours.  The remaining pixel values just repeat some of the earlier colours.

 

Colour only.  COLBAK determines background colour/luma.  Generally you should leave colour at 0.  The OS mode (Gr. 11 ) will set backrgound luma to 6.

 

For games yes, there's limited usage.   Koronis Rift probably the highest profile game that uses GTIA modes extensively.  The modes in general are greatly underutilized in games.

There's also mixed GTIA modes and software tricks to get other modes such as:

APAC:   interleaves colour and luma lines which on PAL systems can allow 256 perceived colours as PAL TVs do colour averaging on adjacent scanlines.

HIP/RIP/TIP:  interleaves luma and paletted lines in various ways either monochrome or colour/colour blended to give more perceived colour and 160 h pixel perceived resolution.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Gtia modes are nice, I like mode 10 the most as it gives "any pixel any color" layout.

 

People don't use them much because pixels are huge, blocky... If you want to get anything more detailed on screen it takes lot of memory, and as bigger sprites get, cpu time taken drawing them increases quickly.

 

There's nothing too special about code imho. You setup simple hires bitmap screen and turn on gtia mode you wish.
For larger pixels like 4x4 hires pixels large, you can simply repeat 4 scanlines using same LMS address. Each byte is two pixels (4 bits per pixel). That's all.

 

Some of my games are using it (9 colors):

Monk:

https://a8.fandal.cz/detail.php?files_id=7327

 

Warriors:

 

And this year nyd entry by me based on last ninja from c64:

ninja.xex

 

 

 

  • Like 2
Link to comment
Share on other sites

6 minutes ago, popmilo said:

Gtia modes are nice, I like mode 10 the most as it gives "any pixel any color" layout.

 

People don't use them much because pixels are huge, blocky... If you want to get anything more detailed on screen it takes lot of memory, and as bigger sprites get, cpu time taken drawing them increases quickly.

 

There's nothing too special about code imho. You setup simple hires bitmap screen and turn on gtia mode you wish.
For larger pixels like 4x4 hires pixels large, you can simply repeat 4 scanlines using same LMS address. Each byte is two pixels (4 bits per pixel). That's all.

 

Some of my games are using it (9 colors):

Monk:

https://a8.fandal.cz/detail.php?files_id=7327

 

Warriors:

 

And this year nyd entry by me based on last ninja from c64:

ninja.xex 35.6 kB · 0 downloads

 

 

 

ok the monk looks really good. smooth scrolling which I wasnt sure was possible. I took a look at a video of it on youtube. looks like entire screen is mode 10? Is there any vbi to change colors?

mode 10 appealed the most to me in the quick experiments I did due to control over colors. Pixels appear much longer horizontally which is a strange design. 

Link to comment
Share on other sites

30 minutes ago, pps said:

I used g2f by @tebe

Yeah, I have that. A bit of a learning curve with that one but I think I did use it for my Mandalorian title screen that I was working on. It came out alright but I think I need to learn how to use it a bit better. It's a challenge getting the colors distribution just right. I tend to drop it down to a 16 color image berfore importing it. I wish the tool would allow me to select a portion of the colors and change them to a different shade. Maybe that's possible and I'm just unfamiliar with that option. 

Link to comment
Share on other sites

7 hours ago, mutil8 said:

ok the monk looks really good. smooth scrolling which I wasnt sure was possible. I took a look at a video of it on youtube. looks like entire screen is mode 10? Is there any vbi to change colors?

mode 10 appealed the most to me in the quick experiments I did due to control over colors. Pixels appear much longer horizontally which is a strange design. 

Well, top main part of screen is gtia with 4 scanline high "rows".

Bottom status is in character mode with color changes between them using dli.

 

I've never used tools like g2f with this mode as it's simple enough. You can even design gfx using data statements in asm or even basic.

In mode 10, one nibble (4bits, upper or lower in a byte) just mean in which color the pixel will be out of 9.

 

So you put something like this in hires bitmap bytes and you'll get small "circle" with two colors.
dta $00,$11,$00

dta $01,$22,$10

dta $01 $22,$10

dta $00,$11,$00

 

If you make pixel rows only 1 scanline high it will be ugly, squashed, pixels 4x1 large.
You can make pixels two scanlines tall, 4x2 hires pixels in size. That's what that Ninja example of mine is using.

Monk is using 4 scanlines repeated using simple lms setting.

 

display_list.....

 

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

...

etc.

 

This wastes some dma cycles (as Rybags said you can save cpu time using vscroll trick), but you don't care for testing and not even in a real game if it's not some crazy game requiring every possible cycle you can spare.

 

 

  • Like 1
Link to comment
Share on other sites

Regarding Gr. 11 - Colour only.  COLBAK determines background colour/luma.  Generally you should leave colour at 0.  The OS mode (Gr. 11 ) will set backrgound luma to 6.

Can the background luma of Gr. 11 be changed to e.g. 4 or 2 (dark luma, very dark luma) or anything else (e.g. 8, 10, 12, 14) ?

 

Regarding Gr. 10: Either 9 colours -or- 8 luminances, most A8 programs (games, demos) use the 9 colour mode...

 

HIP/RIP: They use the GTIA shifting for higher resolution (160x200/240 instead of 80x200/240). Afaik, they switch between Gr. 8 and 10 -and- 8 and 9 (where the switch from 8 to 10 gives the GTIA shifting). In RIP mode Gr. 10 gives colours, Gr. 9 lum., in HIP both give lum. 

 

Would be nice if someone would do a "new" kind of HIP or RIP mode (not TIP!) and switch between 8 and 10 -and- 8 and 11, where Gr. 10 gives the lum. (8 lum) and Gr. 11 gives the colours (16 colours) which would result in 8x16 = 128 colours with 160x200/240 pixels resolution (TIP has only 160x100 pixels resolution). Most PC programs can easily generate 8 luminances (Gr. 10 lum.) and 16 colours (Gr. 11), whereas 9 colours (Gr. 10 colours) are much harder to do and often do result in false colours (the PC displays a different colour than the A8).

 

Link to comment
Share on other sites

The background luma of 11 will always be 0, the non-zero colours will assume the background register luma value.

Also, the colour of the background will be ORed against the resultant pixel colour so it's best left at 0.  e.g. SE. 4,15,6 will result in all foreground pixel values displaying the same.

Similarly it also occurs with luma in Gr. 9 so it's best to leave COLBAK with luma component of 0 there.

 

Yes, the Gr. 10 pixels are shifted right 1 colour-clock which can be an annoyance but allows the perceived 160 modes.

Edited by Rybags
Link to comment
Share on other sites

On 2/16/2023 at 12:35 PM, mutil8 said:

I would be interested in any games that use either of these modes, hopefully accessable via fujinet, or demos. 

Some games that haven't been mentioned yet:

 

GR.11:
"Murder on the Zinderneuf" (1983)

"AtariBlast!" (2016) (one of levels)

upper part of the title screen of "Assembloids XE" (2013)

 

Also in recent "Bubble Shooter" (2022) the left part of the screen is a mix of GR.11 + GR.15.

 

GR.10:
"Cyber-Puzzle II" (1983)

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

On 2/20/2023 at 6:36 PM, Synthpopalooza said:

My remix of Itay Chamiel's The Wall uses an interlace Graphics 11/12 for characters to get 60 colors at ANTIC 4 resolution.

How does THAT work?  It would be interesting to see an example of how this is done.

 

 

Edited by Justin Payne
Link to comment
Share on other sites

  • 1 year later...
On 2/16/2023 at 4:13 PM, popmilo said:

Well, top main part of screen is gtia with 4 scanline high "rows".

Bottom status is in character mode with color changes between them using dli.

 

I've never used tools like g2f with this mode as it's simple enough. You can even design gfx using data statements in asm or even basic.

In mode 10, one nibble (4bits, upper or lower in a byte) just mean in which color the pixel will be out of 9.

 

So you put something like this in hires bitmap bytes and you'll get small "circle" with two colors.
dta $00,$11,$00

dta $01,$22,$10

dta $01 $22,$10

dta $00,$11,$00

 

If you make pixel rows only 1 scanline high it will be ugly, squashed, pixels 4x1 large.
You can make pixels two scanlines tall, 4x2 hires pixels in size. That's what that Ninja example of mine is using.

Monk is using 4 scanlines repeated using simple lms setting.

 

display_list.....

 

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

dta MODE2+LMS,a(bitmap+row_size*2)

...

etc.

 

This wastes some dma cycles (as Rybags said you can save cpu time using vscroll trick), but you don't care for testing and not even in a real game if it's not some crazy game requiring every possible cycle you can spare.

 

 

Any pointers to an actual working sample of displaying a GTIA 9 color graphic in ASM?  I would really love to add a "title" screen to the Galagaish project (

) that we have been working on.  I have a graphic created in AGS 3.01 saved in the "g10" format, and my goal would be to have assembly code that would simply display it on an opening "Title screen".

Link to comment
Share on other sites

2 hours ago, Gimmee99 said:

I have a graphic created in AGS 3.01 saved in the "g10" format,

 

    ift (ftype=__ftype.gr9)||(ftype=__ftype.gr9p)

    mva #$40 gtictl        ; graphics 9

    eli (ftype=__ftype.g10)||(ftype=__ftype.g10p)

    mva #$80 gtictl        ; graphics 10

    eli (ftype=__ftype.g11)||(ftype=__ftype.g11p)

    mva #$c0 gtictl        ; graphics 11

 

Edited by tebe
Link to comment
Share on other sites

16 hours ago, Gimmee99 said:

Any pointers to an actual working sample of displaying a GTIA 9 color graphic in ASM?  I would really love to add a "title" screen to the Galagaish project (

) that we have been working on.  I have a graphic created in AGS 3.01 saved in the "g10" format, and my goal would be to have assembly code that would simply display it on an opening "Title screen".

Ags has export to xex file that has "press space to exit" coded in.

Maybe you could just insert that binary code into your project ?

 

Otherwise it's easy to show such screen, display list, setup colors based on image palette, set gtia to that mode and load image data into bitmap specified by display list.

If you can, send here or in pm your data and example asm you already have. Code will depend on your memory layout etc...

Edited by popmilo
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   1 member

×
×
  • Create New...