Jump to content
IGNORED

7800 Basic Compiler Warning Help?


R_Leo_1

Recommended Posts

When I'm compiling a 7800 Basic program, I almost always get a "libpng warning: Incorrect bKGD chunk index value" for every graphic I use in the program. I got the message to go away once, but I have no idea what I did to make this happen. If anyone can help me in solving this issue I would greatly appreciate it, thank you.

 

Also here's my code in case it's needed:

 

LadyLady.bas

Link to comment
Share on other sites

43 minutes ago, R_Leo_1 said:

When I'm compiling a 7800 Basic program, I almost always get a "libpng warning: Incorrect bKGD chunk index value" for every graphic I use in the program. I got the message to go away once, but I have no idea what I did to make this happen. If anyone can help me in solving this issue I would greatly appreciate it, thank you.

 

Also here's my code in case it's needed:

 

LadyLady.bas 3.09 kB · 1 download

Hi!

 

What program are you using to produce your pngs? and would it be possible to attach one of them for testing some things?

 

If you are on Windows the latest versions of Paint.Net produce 4bit pngs which work on 7800basic (have used it myself recently).

Link to comment
Share on other sites

Hi,

Tested ok here (see attached - just remmed out most of the gfx and used the ones you provided).  Perhaps the gfxblocks are either getting full or overflowing the breakup? As your using 160B and incbanner the chunk (see chunk2 is broken down into smaller sections below so it can be handled by 7800basic) they may be overflowing into the next gfxblock? Some sort of overflow might the the reason why it worked then didn't.  Try starting back at one chunk then add other etc to see where it might be falling over.

Starting build of LadyLady.bas...
7800basic 0.6 Jun 13 2019 22:37:29

*** (): INFO, GFX Block #0 starts @ $E000
        Background100 chunk200 chunk201 chunk202 chunk203 chunk204
          chunk205 chunk206
*** (): INFO, GFX block #0 has 3392 bytes left (212 x 16 bytes)

 

 

gfx_LadyLady.zip

  • Like 1
Link to comment
Share on other sites

Okay so certain graphics are only triggering it, any of the "chunks1-a" or "LogoRowChunks", are causing the issue, while both the "Background1-2" and any of the "Let" graphics are fine. I tried adding the chunks one by one, but just adding one chunk gives me this:

 

7800basic 0.6 Jul 12 2017 22:46:35
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value
libpng warning: Incorrect bKGD chunk index value

*** (): INFO, GFX Block #0 starts @ $E000
        chunk100 chunk101 chunk102 chunk103 chunk104 chunk105 chunk106
*** (): INFO, GFX block #0 has 3648 bytes left (228 x 16 bytes)

 

It's a huge amount for just one chunk and adding another chunk just doubles the amount of warnings, so I'm not really sure what's going on with this.

 

This time I'll include all graphics with the updated .bas file, to get a better idea of what's happening.

Every incgraphic or incbanner is commented out, as well as the code related to drawing the screen, so you can selectively uncomment whichever of the commands you need to.

 

Thanks for the help.

 

 

LadyLady.zip

  • Like 1
Link to comment
Share on other sites

Those warnings can be ignored (at least in every case I've come across so far). It's related to how the conversion process is handling your graphics files so nothing is wrong with your code and it will import fine anyway.

 

I use image magick to convert to 4BPP and it corrects those warnings at the same time. I can post more details later.

  • Like 2
Link to comment
Share on other sites

I just realised that through the power of Dropbox I can post more details now.

 

Below is the command I use in a batch file to adjust files. Convert is one of the image magick programs and this takes a file I drag to the batch as a parameter, changes the bit depth, then saves over the file I gave it. You might want to back up the graphics before running them through this if they're your only copy.

 

convert %1 -depth 4 %1

  • Like 2
Link to comment
Share on other sites

7 minutes ago, SmittyB said:

I just realised that through the power of Dropbox I can post more details now.

 

Below is the command I use in a batch file to adjust files. Convert is one of the image magick programs and this takes a file I drag to the batch as a parameter, changes the bit depth, then saves over the file I gave it. You might want to back up the graphics before running them through this if they're your only copy.

 

convert %1 -depth 4 %1

 

Oh okay that's good to know that it's nothing to worry about thank you! I'll have to check out magick regardless, it sounds like a useful program.

  • Like 1
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...