Skip to content
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

Graphicscreen editor to show which colors are active in current charblock #82

Open
mokdevel opened this issue Jan 30, 2023 · 6 comments

Comments

@mokdevel
Copy link

  • Import a multicolor bitmap picture (eg. koala)
  • Each char consists of three colors and background
  • When clicking on the char block, the colors should be shown on the right side of the image (Background, Multicolor 1&2 and Custom Color). Currently the stay as black.

Tested in WIP (7.3.5)

Second issue which may be related to the above.... The character bitmap (4x8 in MC) is shown under the colors. I can draw in it with mouse. The color selector under it does not have any logic. Pressing a color selects weird colors:

  • Select $1 (white) -> $b is painted on screen
  • Select $2 (red) -> $6 is painted on screen
  • Select $7 (yellow) -> $f is painted on screen
@mokdevel
Copy link
Author

Regarding the second issue - it seems to be for the imported image. If I create another graphicscreen and do full copy/paste, the color picker works as expected.

@mokdevel
Copy link
Author

mokdevel commented Jan 30, 2023

Hmm.. there is something with the import. Once I've imported the image (png of a MC c64 image), I do a full copy/paste to another graphicscreen. The image looks as it should be, colors are correct and the c64 color limits are considered. But something is broken with the colors when doing !media.

!media "gfx_ptower_big.graphicscreen",bitmapscreencolor
OR
!media "gfx_ptower_big.graphicscreen",color
!media "gfx_ptower_big.graphicscreen",screen
!media "gfx_ptower_big.graphicscreen",bitmap

In both cases, the color and screen data is incorrect. Bitmap is correct. The colors are switched as I described in the first comment (eg. $1 -> $b)

NOTE: If I start a MC bitmap image from scratch and draw and paint, !media, color pickers etc work correctly.

Update: Tested with .bmp and the same issue.

@mokdevel
Copy link
Author

mokdevel commented Jan 31, 2023

Something to test with.

  • test.graphicscreen is drawn in C64studio and works correctly.
  • test.png is a screen shot from VICE, cropped to 320x200
  • test2.graphicscreen is import of test.png . The colors look fine, but running the code shows the colors incorrectly.

test.zip

       *= $5800
!media   "test2.graphicscreen",color 
        *= $5c00
!media   "test2.graphicscreen",screen
        *= $6000
!media   "test2.graphicscreen",bitmap

         *= $0801
         !basic
         
         jmp start

         *= $2800

start
         lda #$00
loop1    lda $5800,x
         sta $d800,x
         lda $5900,x
         sta $d900,x
         lda $5a00,x
         sta $da00,x
         lda $5b00,x
         sta $db00,x
         inx
         bne loop1

         lda #$00
         sta $d020
         sta $d021

         lda #$3b
         sta $d011
         lda #%01111000
         sta $d018
         lda #%11111110
         sta $dd00
         lda #%00011000
         sta $d016

         jmp *

@GeorgRottensteiner
Copy link
Owner

Thanks, I'm reading it, but this will take a bit to look into.

@mokdevel
Copy link
Author

The import works in mysterious ways once it mixes the palette. As mentioned the image may look good, but !media data is weird. Anyway, I was able to convert my image with the 'Directly replace colors'. So my second issue is "sorted". The first one I still would like to have. ;-)

@GeorgRottensteiner
Copy link
Owner

Just in case/as a workaround, C64Studio may not always preserve the same bit pattern for a color between 8x8 blocks. You can force a certain bit pattern in the second tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants