|
Forum Index : Microcontroller and PC projects : CMM2 graphics questions
| Author | Message | ||||
| Macer_D Newbie Joined: 25/04/2026 Location: United KingdomPosts: 5 |
Hi all, thank you for your responses to my questions about the paint program. I have two more questions I would like to ask with regards to the CMM2. Firstly, is there an extension for a PC paint program like libresprite or gimp that would allow me to draw using the 12 bit rgba scheme that is on the CMM2? And secondly, how do sprites work on the CMM2? Is there a good resource for that I could consult? Thank you. |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
The CMM2 user manual has detailed explanation about sprites and other commands and functions. https://geoffg.net/Downloads/Maximite/Colour_Maximite_2_User_Manual.pdf The CMM2 graphics manual expands this material. 2021-04-05_114624_Graphics Programming on the CMM2-v3f.pdf Usually I edit my images on Gimp and export them as PNG selecting the appropriate pixel format |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
Earlier I posted questions about my paint program on my cmm2 (gen2). I hope, the questions are no to silly or annoying. this is a link to youtube with 4 of my movies that show the screen memory error. https://www.youtube.com/@heinrichhubbert8474 or to the movies... this is the basic sourcecode 2026-04-27_215913_hg.bas.zip is it my bug or what is the reason for the memory/screen mistakes? perhaps you or disco4now could read this. many thanks. Edited 2026-05-04 20:50 by hhtg1968 |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
I can try to figure out what is happening. I will reply black to you soon |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1886 |
I experienced similar Reported here But I found that a different resolution was better for my needs and the flicker didn't occur. |
||||
| disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1120 |
That would be good. I previously ran the code and can see the artifacts he is seeing. I did not really get anywhere to resolve it. There is a memory leak with CURSOR ON/OFF that is fixed in latest CMM2 betas. I was suspicious that the GUI controls and the drawing code where both trying to update the cursor. Edited 2026-05-05 09:37 by disco4now F4 H7FotSF4xGT |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
i wait with tension... i think that disco4now could be right with his thought... |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
I only can work on it on the weekend. I'm curious to know what is causing the issue. Are you using double buffer? |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
double buffer? |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
Yes You can draw the elements on a memory page and blit them to page 0 or 1 depending on the screen mode you are using. This technique removes the flickering From my game Knightmare: page write 0 blit 0,TILE_SIZEx2, SCREEN_OFFSET,0, SCREEN_WIDTH,SCREEN_HEIGHT, SCREEN_BUFFER page write 1 blit 0,TILE_SIZEx2, SCREEN_OFFSET,0, SCREEN_WIDTH,SCREEN_HEIGHT, SPRITES_BUFFER In my case, it's a little more complex because I have a ton of sprites moving, and they were creating a lot of artifacts. I decided to use the two visible pages (zero and one) to render the screen elements and the sprites. I compose the frame in memory, by using two non visible pages, and I blit these two memory pages to the page 0 and 1, that are visible. |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
I think I will need some time to follow your thoughts... do you (LeoNicolas) know the reason for the artefacts? |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
I made some changes. It looks good. Let me know if it is working for you hg.bas.zip |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
many thanks... i think i can test it in a few days... |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
@LeoNicolas: my first check of the changed code (without running): gui commands are not used (only gui cursor...). perhaps this is the solution... i will "create" the graphical menus "by hand". so i did it on other systems (i have a self constructed and built z80-system (8bit 64k ram!) with my own operatings system). the mmbasic gui system leads to run some code in the backround with refreshing the menu texts or objects and so on. so i thounght earlier that this could lead to errors, because i do not exactly know what the gui commands do... many thanks... |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 574 |
I didn't change anything regarding commands or gui. My updates were only on the render logic, creating a double buffering and removing flickering and artifacts. I drew lines, circles and rectangles and I didn't see any artifacts or flickering. Let me know if you had the same result when running the modified code on you machine. |
||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 187 |
yes and many thanks again. one question do you know the reason for the flickering? is there an issue in the gui commands? |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |