+karri Posted March 20, 2023 Share Posted March 20, 2023 I have been playing a little with 320c and 320a modes. They seem to work nicely together. But I have difficulties to use more than 8 colours on the screen. For some silly reason every 4 bits are either on or transparent. And only the PXC2 colours seem to be used (P0C2 to P7C2). Am I missing something obvious here? Is there a 320 mode that would give me more colours? I could make every zone interrupt and change the palette values. But that would be overkill for me. Quote Link to comment Share on other sites More sharing options...
Eagle Posted March 20, 2023 Share Posted March 20, 2023 Long story short, avoid 320 modes You can use them for text but if you try to overlap 320A mode then you will be surprised. But I'm not an expert, we had one on the forum but he abandoned us 9 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted March 20, 2023 Share Posted March 20, 2023 (edited) Transparency doesn't interact well with the 320 modes as like with positioning it's still based around the 160 modes. What happens is that MARIA still interprets things in pairs of bits so only '00' is actually transparent, but '01' or '10' are not and instead are drawn in the background colour. Disabling transparency entirely via "kangaroo mode" allows the '01' and '10' combinations to draw as expected, but of course then you can't overlap graphics. I'm not sure if 7800basic has a way of toggling kangaroo mode, but it's set with bit 2 of the CTRL register. Edited March 21, 2023 by SmittyB Quote Link to comment Share on other sites More sharing options...
+Karl G Posted March 21, 2023 Share Posted March 21, 2023 54 minutes ago, SmittyB said: Transparency doesn't interact well with the 320 modes as like with positioning it's still based around the 160 modes. What happens is that MARIA still interprets things in pairs of bits so only '00' is actually transparent, but '01' or '10' are not and instead are drawn in the background colour. Disabling transparency entirely via "kangaroo mode" allows the '01' and '10' combinations to draw as expected, but of course then you can't overlap graphics. I'm not sure if 7800basic has a way of toggling kangaroo mode, but it's set with bit 2 of the CTRL register. I understand this in part, but not entirely. I get that only a "00" bit pair would get interpreted as transparent, but wouldn't "01" and "10" get interpreted as one pixel in the current palette color, and one as background color regardless of whether kangaroo mode is enabled? 2 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted March 21, 2023 Share Posted March 21, 2023 (edited) The difference is that both halves are drawn as background if transparency is enabled so you lose out on a bunch of colour combinations. Edited March 21, 2023 by SmittyB 2 Quote Link to comment Share on other sites More sharing options...
+Defender_2600 Posted March 21, 2023 Share Posted March 21, 2023 (edited) 8 hours ago, karri said: I have been playing a little with 320c and 320a modes. They seem to work nicely together. But I have difficulties to use more than 8 colours That's right, a maximum of 8 colors + background color, per scanline/zone. 6 hours ago, Karl G said: I understand this in part, but not entirely. I get that only a "00" bit pair would get interpreted as transparent, but wouldn't "01" and "10" get interpreted as one pixel in the current palette color, and one as background color regardless of whether kangaroo mode is enabled? Your understanding is correct, Karl. 7 hours ago, SmittyB said: What happens is that MARIA still interprets things in pairs of bits so only '00' is actually transparent, but '01' or '10' are not and instead are drawn in the background colour. 6 hours ago, SmittyB said: The difference is that both halves are drawn as background if transparency is enabled so you lose out on a bunch of colour combinations. This circumstance occurs exclusively with C1 and exclusively in 320B and 320D mode. Edited March 21, 2023 by Defender_2600 1 1 Quote Link to comment Share on other sites More sharing options...
+Defender_2600 Posted March 21, 2023 Share Posted March 21, 2023 (edited) 6 hours ago, Eagle said: Long story short, avoid 320 modes You can use them for text but if you try to overlap 320A mode then you will be surprised I do not agree. Here for you again the list of 7800 games made in 320 modes. Asteroids Deluxe AstroBlaster Astro Fighter Baby Pac-Man (maze) CrazyBrix Death Merchant Defender (WIP) Dungeon Stalker Frenzy/Berzerk Froggie Galaxian Graze Suit Alpha Jacks or Better Kiloparsec Moon Cresta Ms. Pac-Man 320 One on One Basketball Pac-Man 320 Pac-Man Collection - 40th Anniversary Edition Pac-Man Plus 320 Plink Plumb Luck DX Rikki & Vikki Rip-Off Scramble Space Invaders Tower Toppler UniWarS Edited March 21, 2023 by Defender_2600 3 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 21, 2023 Author Share Posted March 21, 2023 Thanks! In that case I have it right. Currently I am working on a small game entirely in 320a and 320c mode. It works fine, but I realized that I have to design the graphics in 160 wide and then scale it to 320 to get the pixel colours managable. Obviously I could also use the background colour to create a striped structure effect by allowing some pixel pairs to be 10 or 01. Just now I only use 00 or 11. If I really want to mix modes then I assume I need to change the CTRL register on the fly between zones. Perhaps I need to do it at some point. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 21, 2023 Author Share Posted March 21, 2023 9 hours ago, SmittyB said: I'm not sure if 7800basic has a way of toggling kangaroo mode, but it's set with bit 2 of the CTRL register. I was thinking about using kangaroo mode. But in my case I have no overlapping graphics so the result is identical if I use kangaroo mode or not. Perhaps the best way is to mix 160B graphics if I want more colours. Of course I then need to manipulate CTRL during the draw of a scanline. If you really count cycles I assume that it is possible to toggle CTRL on the fly. But on the other hand you may have to keep CTRL steady during the display of the entire scanline. The graphics in the zone may have hpos that appear in the wrong order. Perhaps the hardware sorts the entire list before the draw starts? Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted March 21, 2023 Share Posted March 21, 2023 CTRL can be changed on the fly, and there's at least one demo floating around that shows splitting the screen vertically, but I don't think that's practical for more than static displays. The most reliable way to change it is to wait for an interrupt of some sort, then count lines by writing to WSYNC as one would on the 2600, and then write to CTRL (and sCTRL in 7800basic) immediately after the last WSYNC to make it consistent. MARIA will never sort things. I believe it keeps 2 lines of graphics in its internal memory at a time, the one it's currently drawing and the one it's building for the next line. As it steps through the DL entries it stamps the graphics in their spot in the buffer so it's down to the programmer to make sure that all happens in the right order. Quote Link to comment Share on other sites More sharing options...
+karri Posted March 21, 2023 Author Share Posted March 21, 2023 53 minutes ago, SmittyB said: As it steps through the DL entries it stamps the graphics in their spot in the buffer so it's down to the programmer to make sure that all happens in the right order. Thanks for the explanation. So in theory I could change the CTRL in the middle of the zone processing. Obviously the order of the hpos elements make no difference as the pixels are stamped in Marias memory for the whole line before the real data goes on screen. What bothers me a bit is that creating a 320c frame around graphics windows is not easy. This works, but only as long as I use 320c graphics only. Quote Link to comment Share on other sites More sharing options...
Eagle Posted March 21, 2023 Share Posted March 21, 2023 (edited) 11 hours ago, Defender_2600 said: I do not agree. I know. 320 modes are not a problem for a coder but for gfx guys We don't have good topic about 320 modes on forum so we can continue here and put everything in one place. Even some information/spreadsheet on the forum are misleading. I just did small program for testing 320A modes so anyone can test before decide to use 320 modes. Fire changing between sprites, every sprite use different pallet. Joy left, right moving sprite (it's done by hires pixel!!!) Difficult switch Kangaroo mode ON/OFF Next time I will do for other 320 modes. 320 mode test - JS7800 link test320.a78 Edited March 21, 2023 by Eagle 8 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 21, 2023 Author Share Posted March 21, 2023 6 minutes ago, Eagle said: Difficult switch Kangaroo mode ON/OFF This is a real cool option if you want to use the background colour in your sprites. But the drawing order becomes important. This is a great way of visualizing kangaroo mode. 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 21, 2023 Author Share Posted March 21, 2023 18 hours ago, karri said: Thanks for the explanation. So in theory I could change the CTRL in the middle of the zone processing. Obviously the order of the hpos elements make no difference as the pixels are stamped in Marias memory for the whole line before the real data goes on screen. What bothers me a bit is that creating a 320c frame around graphics windows is not easy. This works, but only as long as I use 320c graphics only. The only way I got the 320a text to work with the 320c frames was to first declare the 320c parts and last the 320a. Like this: .macro TextZone row ; Flip to 320c mode .byte $00 ;addrlo .byte $c0 ; 320C direct .byte >(_Gui_tiles) ;addrhi .byte $1f ;pal 0, palwidth 0 .byte 160 ;hpos ; Gui frame .byte (4-1) * 2 .byte 32-2 ; palette 0 , 2 bytes wide .byte >(_Gui_tiles) .byte 0 ; Gui frame .byte (22-1) * 2 .byte 32-2 ; palette 0 , 2 bytes wide .byte >(_Gui_tiles) .byte 34*4 ; Gui frame .byte (17-1) * 2 .byte 32-8 + $80 ; palette 0 , 8 bytes wide .byte >(_Gui_tiles) .byte 35*4 ; Gui frame .byte (23-1) * 2 .byte 32-2 ; palette 0 , 2 bytes wide .byte >(_Gui_tiles) .byte 4*39 ; Text .byte <(_adv_screen + row * mono_charsperline) .byte $60 ; 320A indirect .byte >(_adv_screen + row * mono_charsperline) .byte 32-20 ; palette 0, .byte 4 .byte <(_adv_screen + row * mono_charsperline + 20) .byte $60 .byte >(_adv_screen + row * mono_charsperline + 20) .byte 32-13 .byte 84 ; Cursor .byte 95 .byte 0 .byte >_mono_font .byte 0 ; Null header .byte 0 .byte 0 .endmacro Quote Link to comment Share on other sites More sharing options...
+Defender_2600 Posted March 21, 2023 Share Posted March 21, 2023 (edited) 2 hours ago, Eagle said: I know. 320 modes are not a problem for a coder but for gfx guys Thanks to EricBall's tables, it seems easy for me to understand how to design graphics with 320 modes, his tables include all available combinations for each pair of pixels. In 320B and 320D mode, C1 + background and C1+ C1 will be transparent when Kangaroo mode is disabled, this is the exception to remember. https://sites.google.com/site/atari7800wiki/graphics-modes/320b-d-and-kangaroo-mode Getting the best result possible, within the restrictions of pixel placement and the number of colors available, is certainly a pixel artist's job. Rikki & Vikki is a spectacular example of this. Edited March 21, 2023 by Defender_2600 4 Quote Link to comment Share on other sites More sharing options...
+Defender_2600 Posted March 21, 2023 Share Posted March 21, 2023 (edited) A couple of my examples where you can see the different strengths between 320B and 320C mode. Edited June 12, 2023 by Defender_2600 6 Quote Link to comment Share on other sites More sharing options...
Eagle Posted March 26, 2023 Share Posted March 26, 2023 (edited) I will try to finish next week Spoiler and to do Export as datamatrix 🤞 Edited March 26, 2023 by Eagle 9 Quote Link to comment Share on other sites More sharing options...
Cyprian Posted March 26, 2023 Share Posted March 26, 2023 On 3/21/2023 at 5:06 PM, Eagle said: I know. 320 modes are not a problem for a coder but for gfx guys We don't have good topic about 320 modes on forum so we can continue here and put everything in one place. Even some information/spreadsheet on the forum are misleading. I guess a good graphics tool which understands 320 color modes would be useful. Something like G2F for the Atari 800XL. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted April 5, 2023 Share Posted April 5, 2023 Has anything useful ever come out of 320D? I tried an interlace experiment with it once, where you swap fonts while simultaneously swapping the color registers on the alternate columns, to get a vertically interlaced display. The idea was to get 320B color resolution but at the lower DMA cost that 320D provides (same as 320A). It didn't work out like I wanted exactly, though. Quote Link to comment Share on other sites More sharing options...
Trebor Posted April 5, 2023 Share Posted April 5, 2023 8 hours ago, Synthpopalooza said: Has anything useful ever come out of 320D? @PacManPlusutilized it for Scramble, although I am unsure how extensively. 1 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted April 5, 2023 Share Posted April 5, 2023 (edited) I actually ended up using 320B for Scramble, both with and without Kangaroo mode depending on the area of the screen. (I *still* don't see the usefulness of 320C or 320D mode... Do any homebrew games use them? I don't think any retail games do...) Edited April 5, 2023 by PacManPlus Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted April 5, 2023 Share Posted April 5, 2023 There appears to be a couple of @PacManPlus games that use it, according to @Trebor's list: 1 Quote Link to comment Share on other sites More sharing options...
Trebor Posted April 5, 2023 Share Posted April 5, 2023 1 hour ago, PacManPlus said: I actually ended up using 320B for Scramble, both with and without Kangaroo mode depending on the area of the screen. (I *still* don't see the usefulness of 320C or 320D mode... Do any homebrew games use them? I don't think any retail games do...) Did the title screen perhaps leverage 320D at all? According to the reference notes, on some of the test ran several years ago utilizing the info build, these results came back: 1 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted April 5, 2023 Share Posted April 5, 2023 (edited) No - neither Scramble nor Astro Blaster use 320C or 320D... at least intentionally. Truth be told, I still don't fully understand how to utilize C&D modes... Which is why I left them out of my 'Graphic Converter' program. Edited April 5, 2023 by PacManPlus Apparently I can't spell simple words :-/ 2 Quote Link to comment Share on other sites More sharing options...
+karri Posted April 5, 2023 Author Share Posted April 5, 2023 2 hours ago, PacManPlus said: I *still* don't see the usefulness of 320C If you want to use 320A for text then you kind of need 320C for graphics as the CTRL is the same for these modes. 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.