-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Palette loading bug #902
Comments
What version are you running? |
I'm running 0.80.0-dev Pro, which I compiled using the MinGW build
instructions. The bug also persists in 0.70.6.
…On 8/15/19, Rob Loach ***@***.***> wrote:
What version are you running?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#902 (comment)
|
Yes, I saved it in the default *.tic format that you can otherwise load in the free version. Also @kawa-yoiko, I don't think plain-text was the format he used to reproduce it with. Plain-text is only available in the PRO version. You can see that his screenshot doesn't have that bank-switching button, so it's definitely the free version, as you can't save (or even load) plain-text carts. |
Ah indeed, I missed that > < |
fixed |
@nesbox Worked so far, awesome! But there's another problem, mentioned in the issue @Masternama-8000 referenced. |
First of all, the *.tic file format allows for chunk sizes smaller than the memory associated with them. This is a very simple compression method for carts, in case you have zero-filled bytes left at the end of the memory region. The remaining bytes that are not stored in the file are therefore zero when the chunk is loaded.
But this isn't fully true for the 48-byte palette memory though. When TIC-80 saves a cart, it applies this compression method to the palette chunk in the file (along with the sprites, map, sound, etc. chunks). The loading process is the slightly different part for palettes.
Instead of filling the remaining palette memory with zeroes (or black colors/intensities in this case), it instead uses the DB16 palette's byte values at offsets n...47 (where n is both the size of the palette chunk in the cartridge file, and the offset of the first palette memory byte to not be present in the chunk). This may ruin a game's palette.
Repro Steps:
new
command.Expected Result: The palette should be two blacks, followed by a green and thirteen more blacks.
Preserved Result: The palette instead becomes two blacks, followed by a mint green, and then DB16 colors 3...15.
A workaround is to make color 15 have the darkest level of blue, i.e. RGB
#xxxx01
.The text was updated successfully, but these errors were encountered: