![]() |
Forum Index : Microcontroller and PC projects : PicoMiteVGA V5.07.07b19 - Major enhancement - 640x480 edit in colour
![]() ![]() |
|||||
Author | Message | ||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
It would seem the colours aren't part of the image so to save them may be quite difficult. Perhaps the saved B & W image could have the colours added in MMB4W with a program reading strings containing the Tile commands from the PicoVGA program. Edit The process could begin in the PicoMiteVGA program. After each Tile command append the co-ordinates, pixel dimensions and FG & BG colours of that Tile set to a text file. The MMB4W program can then use that to "colourize" each pixel of the BMP file by reading them and writing them back with the FG or BG colour. Edited 2023-02-26 17:28 by phil99 |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1192 |
BTW; Is there a way to read the Tile values from a Screenlocation? Since the BMP file format is not that complicated, maybe a short Basic Sub can write a 24 BIT BMP File account the Pixel and TILE values Edited 2023-02-26 21:39 by Martin H. 'no comment |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
Specially for Volhout PicoMiteVGA.zip Try CLS TILE 0,0,0,RGB(white),80 TILE 0,1,0,RGB(yellow),80 TILE 0,2,0,RGB(lilac),80 TILE 0,3,0,RGB(brown),80 TILE 0,4,0,RGB(fuchsia),80 TILE 0,5,0,RGB(rust),80 TILE 0,6,0,RGB(magenta),80 TILE 0,7,0,RGB(red),80 TILE 0,8,0,RGB(cyan),80 TILE 0,9,0,RGB(green),80 TILE 0,10,0,RGB(cerulean),80 TILE 0,11,0,RGB(midgreen),80 TILE 0,12,0,RGB(cobalt),80 TILE 0,13,0,RGB(myrtle),80 TILE 0,14,0,RGB(blue),80 TILE 0,15,0,RGB(black),80 Text 0,0,"White on black",,,,RGB(white),RGB(black) Text 0,12,"Yellow on blue",,,,RGB(yellow),RGB(blue) Text 0,24,"lilac on myrtle",,,,RGB(lilac),RGB(myrtle) Text 0,36,"brown on cobalt",,,,RGB(brown),RGB(cobalt) Text 0,48,"fuchsia on midgreen",,,,RGB(fuchsia),RGB(midgreen) Text 0,60,"rust on cerulean",,,,RGB(rust),RGB(cerulean) Text 0,72,"magenta on green",,,,RGB(magenta),RGB(green) Text 0,84,"red on cyan",,,,RGB(red),RGB(cyan) Text 0,96,"cyan on red",,,,RGB(cyan),RGB(red) Text 0,108,"green on magenta",,,,RGB(green),RGB(magenta) Text 0,120,"cerulean on rust",,,,RGB(cerulean),RGB(rust) Text 0,132,"midgreen on fuchsia",,,,RGB(midgreen),RGB(fuchsia) Text 0,144,"cobalt on brown",,,,RGB(cobalt),RGB(brown) Text 0,156,"myrtle on lilac",,,,RGB(myrtle),RGB(lilac) Text 0,168,"blue on yellow",,,,RGB(blue),RGB(yellow) Text 0,180,"black on white",,,,RGB(black),RGB(white) Save image "B:/test" Pause 5000 MODE 2 Load image "B:/test" Do :Loop |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
Is there a way to free up enough memory after running the Logic Analyser program to save an image of it. At the moment Save Image only produces a very short corrupted file. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
Are you trying to save to the flash drive? In which case the file is too big . Save to an SDcard and it should work. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4822 |
Hi Philip, The mode1 save image producers a bmp file size 900kbyte. Too large Volhout PicomiteVGA PETSCII ROBOTS |
||||
Bowden_P Senior Member ![]() Joined: 20/03/2019 Location: United KingdomPosts: 162 |
Hi Peter, Many thanks for fixing the triangle bug. All looks good now! With best regards, Paul. Nothing so constant as change. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
This one is better. Not only does it now save the images in 4 bits/pixel so much smaller files but you can also blit the colour if the blit aligns with the tiles PicoMiteVGA.zip MODE 1 CLS TILE 0,0,0,RGB(white),80 TILE 0,1,0,RGB(yellow),80 TILE 0,2,0,RGB(lilac),80 TILE 0,3,0,RGB(brown),80 TILE 0,4,0,RGB(fuchsia),80 TILE 0,5,0,RGB(rust),80 TILE 0,6,0,RGB(magenta),80 TILE 0,7,0,RGB(red),80 TILE 0,8,0,RGB(cyan),80 TILE 0,9,0,RGB(green),80 TILE 0,10,0,RGB(cerulean),80 TILE 0,11,0,RGB(midgreen),80 TILE 0,12,0,RGB(cobalt),80 TILE 0,13,0,RGB(myrtle),80 TILE 0,14,0,RGB(blue),80 TILE 0,15,0,RGB(black),80 Text 0,0,"White on black",,,,RGB(white),RGB(black) Text 0,12,"Yellow on blue",,,,RGB(yellow),RGB(blue) Text 0,24,"lilac on myrtle",,,,RGB(lilac),RGB(myrtle) Text 0,36,"brown on cobalt",,,,RGB(brown),RGB(cobalt) Text 0,48,"fuchsia on midgreen",,,,RGB(fuchsia),RGB(midgreen) Text 0,60,"rust on cerulean",,,,RGB(rust),RGB(cerulean) Text 0,72,"magenta on green",,,,RGB(magenta),RGB(green) Text 0,84,"red on cyan",,,,RGB(red),RGB(cyan) Text 0,96,"cyan on red",,,,RGB(cyan),RGB(red) Text 0,108,"green on magenta",,,,RGB(green),RGB(magenta) Text 0,120,"cerulean on rust",,,,RGB(cerulean),RGB(rust) Text 0,132,"midgreen on fuchsia",,,,RGB(midgreen),RGB(fuchsia) Text 0,144,"cobalt on brown",,,,RGB(cobalt),RGB(brown) Text 0,156,"myrtle on lilac",,,,RGB(myrtle),RGB(lilac) Text 0,168,"blue on yellow",,,,RGB(blue),RGB(yellow) Text 0,180,"black on white",,,,RGB(black),RGB(white) Sprite 0,0,160,0,160,240 Save image "a:/test",0,0,320,240 Pause 5000 MODE 2 Load image "a:/test" Do :Loop |
||||
homa![]() Guru ![]() Joined: 05/11/2021 Location: GermanyPosts: 451 |
@peter: i don't think so. See images attached, the first image is the version for PicoMiteVGAV5.07.07b25 (specifically for vollhout) and the second image is the latest PicoMiteVGAV5.07.07b25 (version2). Matthias ![]() ![]() |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
It was a "Seniors Moment" Successfully saved an image to SD card before running LA21, but after exiting LA21 with Ctrl-C it produced the small corupted file. Forgot I had switched to A: to run the program from there. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
Oops - sorry. posted the wrong binary PicoMiteVGA.zip |
||||
homa![]() Guru ![]() Joined: 05/11/2021 Location: GermanyPosts: 451 |
thx ![]() Edited 2023-02-27 08:39 by homa |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
Beta 25 is excellent, thanks Peter. When re-displaying saved images in Mode 1 on the PMVGA they can be colourised like this example for the Logic Analyzer. ' LA_21_b24.bas mode 1 "load image" colouriser MODE 1:Colour RGB(WHITE),0:CLS :Font 1 TILE height 16 For ch% = 0 To 6 TILE 14,5+ch%*3,RGB(yellow),0,66,2 TILE 0,4+ch%*3,RGB(midgreen),0,80,1 Next Then load your image > Load image "LA_01.bmp" |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 570 |
Hi Peter, Like you I almost always only use USB to connect and edit using a terminal screen. If I use options like this PicoMiteVGA MMBasic Version 5.07.07b25 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION DISPLAY 60, 106 OPTION DEFAULT FONT 7, 1 or even OPTION DEFAULT FONT 8, 1 to give me more lines and columns while editing using a terminal, in the terminal it works great in colour. If I look at the VGA screen some of the top lines of code on the screen are blank, they initially appear while 'pg up' or 'pg down', but immediately disappear, there are also blanked lines further down the screen as well, but the top is the most obvious, all lines below about half screen always seem to be complete. I realise that using Font 7 or 8 will not give me colour editing on the VGA screen. I have tried this at all cpu speeds. Is this something I can no longer do, because of the new colour tiling? Any help appreciated. Regards, Kevin. Edited 2023-03-01 23:15 by Bleep |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
Should work - another bug to fix. Is it OK with OPTION COLOURCODE OFF? |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 570 |
Hi Peter, If I try, OPTION COLOURCODE OFF The VGA screen is then normal, all lines visible with font 7 & 8. Regards, Kevin. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10008 |
Try this and assuming OK I'll do a proper release once I've fixed a couple of other things PicoMiteVGA.zip |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 570 |
Thanks Peter, Editor in VGA now working great thanks, no vanishing lines :-) Regards, Kevin. |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |