+Muddyfunster Posted February 11, 2020 Share Posted February 11, 2020 I've been experimenting with the sample programs and putting simple banners on the screen. I made a simple 160B banner which is 80x96, indexed png with 13 colour (per the various tutorials and useful threads that I managed to find). When I load the banner using : incbanner gfx/lr1.png 160B and then display it with plotbanner, I only get the leftmost 20% or so of the image. Displaymode is set to 160B and palettes 0,1,2,3 are set to random colours. I've been beating my head against this one for a couple of hours, any suggestions on what I'm doing wrong would be appreciated! Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 11, 2020 Share Posted February 11, 2020 If you're displaying that banner over some kind of background, you're probably running out of DMA time. Maria can only render so much. If that's not the case, maybe paste your source and images, so we can investigate? Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 11, 2020 Author Share Posted February 11, 2020 10 minutes ago, RevEng said: If you're displaying that banner over some kind of background, you're probably running out of DMA time. Maria can only render so much. If that's not the case, maybe paste your source and images, so we can investigate? Thanks RevEng, source is below. I'm also running into issues with colour indexing but that's more to do with how the images are saved and is a problem for another day source is attached Test ping is the png banner, capture is the output im getting bannerexample.bas Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 12, 2020 Share Posted February 12, 2020 Ok, there's an undocumented limitation. plotbanner uses sprites to display, which are max 32 bytes in width. If you crop your banner to 64 pixels (32 bytes) wide it works as expected. I'll update the docs and see if I can get a warning spit out in the compiler to make it obvious when that limit is exceeded. 1 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 12, 2020 Author Share Posted February 12, 2020 ok, so I could split the banner in to multiple parts as long as no part exceeds 64 pixels in width (32 bytes)? Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 12, 2020 Share Posted February 12, 2020 Correct. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 12, 2020 Share Posted February 12, 2020 Bit late to the party but did the same for the Arkanoid title after trial and error. Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 12, 2020 Share Posted February 12, 2020 I'm looking into adding extra-wide banner support into 7800basic, so this will hopefully be a non-issue soon. It may be a few days before it's public, mostly because I need to finish the push to github before I do another release. 1 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 12, 2020 Author Share Posted February 12, 2020 @RevEng splitting the banner worked great, but I noticed that I also got some vertical clipping with the bottom couple of rows being snipped. I ended up experimenting with quartering the banner and that worked fine, other than palette funkyness. Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 12, 2020 Share Posted February 12, 2020 I can't seem to recreate any vertical clipping using your example. I added a few pixels on the bottom-most row, and they showed up for me. The palettes changing between manually trimmed down bits of the banner, are caused by your png generation. The drawing program either sees certain color indexes not being used and drops them, or used in a different order and doesn't it bother to sort them like gimp does. Quote Link to comment Share on other sites More sharing options...
DEBRO Posted February 12, 2020 Share Posted February 12, 2020 Hi there, 7 hours ago, mksmith said: Bit late to the party but did the same for the Arkanoid title after trial and error. I would have thought the title was done with tiles. Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 12, 2020 Share Posted February 12, 2020 1 hour ago, DEBRO said: Hi there, I would have thought the title was done with tiles. Hey Debro - no just a couple of pngs split using the banner feature in 7800basic. Did the same with the ship in the intro but I did chunk that into 5-6 pieces to reduce the wasted memory space. I hadn't actually thought of using tiles instead... ??? Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 12, 2020 Share Posted February 12, 2020 2 hours ago, Muddyfunster said: @RevEng splitting the banner worked great, but I noticed that I also got some vertical clipping with the bottom couple of rows being snipped. I ended up experimenting with quartering the banner and that worked fine, other than palette funkyness. I think you need to run with the 8 or 16 height boundaries you've chosen for displaying images ie. If you have chosen 8 then heights should be 8, 16, 24, 32, 40 etc. Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 12, 2020 Author Share Posted February 12, 2020 2 hours ago, RevEng said: I can't seem to recreate any vertical clipping using your example. I added a few pixels on the bottom-most row, and they showed up for me. The palettes changing between manually trimmed down bits of the banner, are caused by your png generation. The drawing program either sees certain color indexes not being used and drops them, or used in a different order and doesn't it bother to sort them like gimp does. I recreated it but i think it's an export issue. I'm using gimp and exporting the image as a 4 colour indexed png. The bottom 5th of the image just gets binned and I get blank space instead. No amount of messing with the indexes in my program will make the missing area show up. Going to try with paint.net 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 12, 2020 Share Posted February 12, 2020 50 minutes ago, mksmith said: I hadn't actually thought of using tiles instead... ??? I can't put my finger on the thread, but someone was making title screen mock-ups with 7800basic using tiles, and they ran out of characters. It's not hard to do in 160A, let alone less expansive modes, if your image doesn't have a lot of repeat characters. It's one of the reasons that plotbanner uses sprites instead of characters. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 12, 2020 Share Posted February 12, 2020 22 minutes ago, RevEng said: I can't put my finger on the thread, but someone was making title screen mock-ups with 7800basic using tiles, and they ran out of characters. It's not hard to do in 160A, let alone less expansive modes, if your image doesn't have a lot of repeat characters. It's one of the reasons that plotbanner uses sprites instead of characters. Was thinking I could save a little bit of space around the pointy edges but your probably right there - also need to take into account the extra font characters. The balancing act! Still my main issue is trying to fit these floating objects in as I have no bank space ATM - the other stuff like the titles are in other banks so not really a worry for me. 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 12, 2020 Author Share Posted February 12, 2020 @RevEngI have replicated the issue i'm seeing with clipping. This is a 160A 4 colour indexed png banner, code and png attached below. looks like it's clipping the bottom 4 rows (png is 40x36). Is the 36 pixel height the issue? The width of 40 is inside the 64 pixel limit, is there a vertical limit or should the png be cut at 8 or 16 pixel boundaries? I tried an 11 pixel high banner and the compiler rejected that too (just as a test while fiddling about). banner_clipping.bas Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 13, 2020 Share Posted February 13, 2020 Yes, Matt had mentioned that above. I though it was in the manual, but I don't see it. Definitely the banners need to be a multiple of the zone height. I'll update the docs. 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 13, 2020 Author Share Posted February 13, 2020 7 minutes ago, RevEng said: Yes, Matt had mentioned that above. I though it was in the manual, but I don't see it. Definitely the banners need to be a multiple of the zone height. I'll update the docs. ah sorry I missed that, thanks @RevEng . Every day is a school day for me with 7800Basic right now 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 13, 2020 Share Posted February 13, 2020 3 minutes ago, Muddyfunster said: ah sorry I missed that, thanks @RevEng . Every day is a school day for me with 7800Basic right now Keep working at it mate - it's such a lovely language once you get past this bit!! 2 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 13, 2020 Author Share Posted February 13, 2020 17 hours ago, mksmith said: Keep working at it mate - it's such a lovely language once you get past this bit!! Thanks, I think i've got it now I'm sizing banners correctly and respecting the zone height boundary and I'm making progress with the colour indexing. My next thought is on palettes... if I run with 160B for my title screen, can I revert to 160A later for objects and can I redefine the the 160B palette (ie palette 0 to 3) later to have "game colours" instead of "titlepage" colours, so in effect, I have a title palette and a game palette? Sorry if this is covered already, I've searched and found some interesting threads but I didn't see anything definitive. I'm trying to see how much palette flexibility I have and whether to structure my palettes, sprites and graphics in 3+1 or 12+1 sets. I won't have tons of sprites so the overhead of 160B for extra colours (in a sprite) is a good trade off for me if I understand things correctly. Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted February 13, 2020 Share Posted February 13, 2020 You can freely change the colours in your palettes any time you want by writing new values to the p#c# variables. You can't read back what's in those variables so you can't do something like p0c1 = p0c1 + 1 though so if you want to do that you'll need to use your own variables to keep a copy of the values. You can freely mix 160A and 160B graphics on screen at the same time as long as you tell 7800BASIC which mode to use when you import your graphics. The graphics modes on the 7800 kind of work in pairs so you can 160A and 160B, 320A and 320C, or 320B and 320D, but the 160 modes are a bit more practical. 1 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 13, 2020 Share Posted February 13, 2020 3 hours ago, Muddyfunster said: Thanks, I think i've got it now I'm sizing banners correctly and respecting the zone height boundary and I'm making progress with the colour indexing. My next thought is on palettes... if I run with 160B for my title screen, can I revert to 160A later for objects and can I redefine the the 160B palette (ie palette 0 to 3) later to have "game colours" instead of "titlepage" colours, so in effect, I have a title palette and a game palette? Sorry if this is covered already, I've searched and found some interesting threads but I didn't see anything definitive. I'm trying to see how much palette flexibility I have and whether to structure my palettes, sprites and graphics in 3+1 or 12+1 sets. I won't have tons of sprites so the overhead of 160B for extra colours (in a sprite) is a good trade off for me if I understand things correctly. As @SmittyB noted definitely! In Arkanoid I have multiple palettes for various states such as the title, intro/outro, in game etc. I also update the palette for the background on each level and the DOH level is totally different from the main levels. Also the Vaus and DOH head graphics are all 160B and everything else 160A. 1 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 15, 2020 Author Share Posted February 15, 2020 the 160B palette is such a nightmare to manage on sprites. I get one colour in the right slot and the other half of the sprite thinks it's time to be transparent lol. Frustrating isn't the word!. 1 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted February 15, 2020 Share Posted February 15, 2020 If you didn't know, you can reorder the assignment of the palette of your image with your palette when you import your graphics. If your editor of choice lets you see the palette of your saved image then you can compare the two and set your import parameters accordingly. 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.