Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Update to Graphics Programming manual
Page 1 of 2 | |||||
Author | Message | ||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
As part of the process of updating the Graphics Programming Manual, a collection of posts from Peter Mather, I felt I could add a little more information in some areas. The following is an excerpt from the intended updates for comment prior to inclusion in the manual. I welcome any corrections or suggestions for improvement. Graphics Programming on the CMM2-v2.0c-excerpt.pdf I also need to update the diagram for 12 bit colour depth - the following is what I intend to use, Doug ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 341 |
I don't think I understand this, and I'd suggest rephrasing it. Taken literally it seems wrong - page 1 can also be visible in this mode. Also typo in diagram - visable should be visible. |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Yes, it did my head in trying understand and also to explain. I think the text in the document itself does make it clear but I will look at re-phrasing the diagram. The bottom line is however, whatever you view on your monitor can only come from PAGE 0. 12 bit colour depth adds the ability to write information to PAGE 1 (layer 3) and depending on transparency settings, this will end up being visible but ONLY to the extent that it modifies PAGE 0 (unless of course if you do a page copy but then, it is STILL only PAGE 0 that is displayed). Typo noted, thanks, Appreciate the feedback, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Error in the excerpt for RGB(332) diagram - fixed. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Andrew_G Guru Joined: 18/10/2016 Location: AustraliaPosts: 839 |
Hi Doug, Thanks for this. A great effort! Some comments/questions if I may: 1) does the first code in the document produce a red line 50 pixels across the top-left of the screen and several lines of the memory dump? I assume it doesn't depend on the OPTION DEFAULT MODE setting one has. 2) the second set of code - when I copied it from the document and pasted it into MMEdit all ' got turned into ` and produced errors. I've never seen that before? Only a handful so easily fixed. 3) There is a stray ) at the end of the line "for column = 0 to 40)" - as pointed out elsewhere this did not produce an error. 4) Even with the ) removed the next line reports "Error in Line 7: Argument Count" 5) Is is easy to produce an example that more closely resembles your excellent diagram of the pages and layers? Thanks again, Andrew (Thanks for changing from Page to P) {Edit: I'm using 5.05.05} Edited 2020-09-13 15:47 by Andrew_G |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5878 |
MMEdit has menu item "Program/Replace 'smart' quotes" just for occasions like this. Word processors try and be helpful and sometimes it would be better if they didn't. I agree, it's a good document and a lot of work. Jim VK7JH MMedit  MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5878 |
Second code example with bugs removed. I added a few missing closing brackets and the missing hex value for the POKE. Also added a missing NEXT k option default integer mode 7,12 ' now write to PAGE 0 (layer 2) box 0,0,40,40,,rgb(0,255,0,15),rgb(0,255,0,15) ' solid green on layer 2 page write 1 ' the top most, layer 3 (PAGE 1) for row = 0 to 15 for column = 0 to 40 poke short mm.info(page address 1)+(row*mm.hres+column)*2, &HF0E0 next column next row ' any object would do, I just wanted to go to specific locations ' to make checking the result easier (-: for k = 0 to 32 step 2 a1$ = "&H"+hex$(mm.info(page address 0)) ' address a2$ = " &H"+hex$(peek(byte mm.info(page address 0) +k + 1),2) ' contents - high byte a3$ = hex$(peek(byte mm.info(page address 0) +k),2) ' contents - low byte a4$ = "&H"+hex$(mm.info(page address 1)) ' address a5$ = " &H"+hex$(peek(byte mm.info(page address 1) +k + 1),2) ' contents - high byte a6$ = hex$(peek(byte mm.info(page address 1) +k),2) ' contents - low byte text 0,60+k*6,a1$+a2$+a3$+" "+a4$+a5$+a6$ next k do loop Jim VK7JH MMedit  MMBasic Help |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Thanks for the responses guys - sorry for the delay in responding. Changes/corrections entered. Andrew, the first program is realy just trying to show the jumps in intensity that occur in the actual display due to the translation from RGB888 to RGB565. The red line is just plugging in values to display. Cheers, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Another update to include the 5.05.06 features. Again, I have tried to run all sample code to test but welcome any corrections. Doug. Graphics Programming on the CMM2-v2.0f.pdf ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
RetroJoe Senior Member Joined: 06/08/2020 Location: CanadaPosts: 290 |
Hey, Doug - thanks very much! The utility of this doc is growing in leaps and bounds, particularly with the ever-expanding number of display modes :) Enjoy Every Sandwich / Joe P. |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Another update to include the latest features from Peter as well as example code from the Great Octahedron Challenge. Again, feedback/corrections welcome. Graphics Programming on the CMM2-v3a.pdf Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 324 |
Which one is page 4? They both have page 4 on them. |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 438 |
Amazing job Doug What do you think about updating the quaternion examples to use the MMBasic MATH Q_* commands? I can provide you with an updated version of both examples. |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
What do you think about updating the quaternion examples to use the MMBasic MATH Q_* commands? I can provide you with an updated version of both examples. That would be great Leo, thanks. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1094 |
Apologies all, there were errors in the diagram on page 28 of the manual - corrected version attached. Graphics Programming on the CMM2-v3b.pdf Which one is page 4? They both have page 4 on them. Don't understand Tom? Can you indicate further what part of the manual you are referring too? Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1676 |
Doug as an idiot who knows almost nothing, your diagram makes sense to me it explains it perfectly in a way even I can understand |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8566 |
Doug You should change the authorship to yourself!!!! Trivial changes: change 10 to 13 in first line Mode 9 is not widescreen Mode 10: 12-bit is allowed, monitor sees 848x480@60Hz Paragraph starting VGA Monitors need correcting to match mode list page 17 again mode 10 does allow 12-bit mode Page 17 Comment at bottom on modes 10,11,12 should be that not everyone may have a widescreen monitor. They don't "permanently alter anything Mode command chapter Firmware now rounds up to 8Kbytes not 128Kbytes Default modes can be 1,9, 10, 11, 12 page 31 memory is allocated in chunks of 8Kbyes |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 438 |
What do you think about updating the quaternion examples to use the MMBasic MATH Q_* commands? I can provide you with an updated version of both examples. That would be great Leo, thanks. Doug. Today after work I will update the code and send you the new version |
||||
RetroJoe Senior Member Joined: 06/08/2020 Location: CanadaPosts: 290 |
Thanks much, Doug - very helpful! Enjoy Every Sandwich / Joe P. |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 324 |
Graphics Programming on the CMM2-v3b.pdf Which one is page 4? They both have page 4 on them. Don't understand Tom? Can you indicate further what part of the manual you are referring too? Doug. I'm referring to Page 4, of course! :) In an earlier post, you had two pages, each showed page 4 in the lower right corner. The current version is fine. |
||||
Page 1 of 2 |
Print this page |