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 : PicoMite/VGA/Web V5.08.00: back to betas
Page 5 of 7 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9118 |
You mean like this |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Yes, I imagine that might be adequate ;-) Tom Edited 2023-12-14 20:36 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9118 |
V5.08.00b5 https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip DRAW3D command added to the PicoMite as per the PicoMiteVGA (not in the web version) Fixed bug in READ command after SPRITE command in PicoMiteVGA Another major rework of WebMite to try and improve stability - please report findings Example code for the 3D commands as in the video Option explicit Option default none 'MODE 2 ' uncomment for PicoMiteVGA Dim float phi=(1+Sqr(5))/2 ' data for location of vertices for truncated icosahedron of edge length 2 Data 0,1,3*phi Data 0,1,-3*phi Data 0,-1,3*phi Data 0,-1,-3*phi Data 1,3*phi,0 Data 1,-3*phi,0 Data -1,3*phi,0 Data -1,-3*phi,0 Data 3*phi,0,1 Data 3*phi,0,-1 Data -3*phi,0,1 Data -3*phi,0,-1 Data 2,(1+2*phi),phi Data 2,(1+2*phi),-phi Data 2,-(1+2*phi),phi Data 2,-(1+2*phi),-phi Data -2,(1+2*phi),phi Data -2,(1+2*phi),-phi Data -2,-(1+2*phi),phi Data -2,-(1+2*phi),-phi Data (1+2*phi),phi,2 Data (1+2*phi),phi,-2 Data (1+2*phi),-phi,2 Data (1+2*phi),-phi,-2 Data -(1+2*phi),phi,2 Data -(1+2*phi),phi,-2 Data -(1+2*phi),-phi,2 Data -(1+2*phi),-phi,-2 Data phi,2,(1+2*phi) Data phi,2,-(1+2*phi) Data phi,-2,(1+2*phi) Data phi,-2,-(1+2*phi) Data -phi,2,(1+2*phi) Data -phi,2,-(1+2*phi) Data -phi,-2,(1+2*phi) Data -phi,-2,-(1+2*phi) Data 1,(2+phi),2*phi Data 1,(2+phi),-2*phi Data 1,-(2+phi),2*phi Data 1,-(2+phi),-2*phi Data -1,(2+phi),2*phi Data -1,(2+phi),-2*phi Data -1,-(2+phi),2*phi Data -1,-(2+phi),-2*phi Data (2+phi),2*phi,1 Data (2+phi),2*phi,-1 Data (2+phi),-2*phi,1 Data (2+phi),-2*phi,-1 Data -(2+phi),2*phi,1 Data -(2+phi),2*phi,-1 Data -(2+phi),-2*phi,1 Data -(2+phi),-2*phi,-1 Data 2*phi,1,(2+phi) Data 2*phi,1,-(2+phi) Data 2*phi,-1,(2+phi) Data 2*phi,-1,-(2+phi) Data -2*phi,1,(2+phi) Data -2*phi,1,-(2+phi) Data -2*phi,-1,(2+phi) Data -2*phi,-1,-(2+phi) ' 12 faces with 5 sides Data 0,28,36,40,32 Data 33,41,37,29,1 Data 34,42,38,30,2 Data 3,31,39,43,35 Data 4,12,44,45,13 Data 15,47,46,14,5 Data 17,49,48,16,6 Data 7,18,50,51,19 Data 8,20,52,54,22 Data 23,55,53,21,9 Data 26,58,56,24,10 Data 25,57,59,27,11 ' 20 faces with 6 sides Data 32,56,58,34,2,0 Data 0,2,30,54,52,28 Data 29,53,55,31,3,1 Data 1,3,35,59,57,33 Data 13,37,41,17,6,4 Data 4,6,16,40,36,12 Data 5,7,19,43,39,15 'data 14,38,42,18,7,5 Data 22,46,47,23,9,8 Data 8,9,21,45,44,20 Data 10,11,27,51,50,26 Data 24,48,49,25,11,10 Data 36,28,52,20,44,12 Data 13,45,21,53,29,37 Data 14,46,22,54,30,38 Data 39,31,55,23,47,15 Data 16,48,24,56,32,40 Data 41,33,57,25,49,17 Data 42,34,58,26,50,18 Data 19,51,27,59,35,43 ' Dim float q1(4) Dim float yaw=Rad(1),pitch=Rad(2),roll=Rad(0.5) Dim integer i, j, nf=31, nv=60, camera=1 Dim float vertices(2,59) ' read in the coordinates of the vertices and scale For j=0 To 59 For i=0 To 2 Read vertices(i,j) 'Print vertices(i,j)*20 Next i Next j Math scale vertices(),20,vertices() ' Dim integer faces(173) For i=0 To 173 Read faces(i) Next i Dim integer fc(30)= (5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6) Dim integer colours(2)=(RGB(red),RGB(white),RGB(black)) Dim integer edge(30)=(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2) Dim integer fill(30)=(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) Math q_create Rad(2),1,0.5,0.25,q1() Draw3D create 1, nv,nf, camera, vertices(), fc(), faces(), colours(), edge(),fill() Draw3D camera 1,800,0,0 'draw3d diagnose 1,mm.hres\2,mm.vres\2,1000 FRAMEBUFFER create FRAMEBUFFER write f Draw3D show 1,0,0,1000,1 Do Math q_euler yaw,pitch,roll,q1() Inc yaw,Rad(1) Inc pitch,Rad(2) Inc roll,Rad(0.5) Draw3D rotate q1(),1 Draw3D show 1,0,0,1000,1 FRAMEBUFFER copy f,n loop Edited 2023-12-14 21:05 by matherp |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
Hi Peter, Draw3D looks impressive !! Especially for an SPI LCD display. Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Thank you Peter. I've only had the briefest hack (nothing in a shareable state) but it looks like with all your work the Game*Mite can play a passable game of @Vegipete's "Stellar Battle in the Seven Green Hills Zone" even with the SPI display. So many games to write/port, so little time ... Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Having some trouble with "option disk load" on the WebMite. It goes through the steps but no Options appear to get loaded. WEB A:/> update firmware WebMite MMBasic Version 5.08.00b5 Copyright 2011-2023 Geoff Graham Copyright 2016-2023 Peter Mather > files A:/ <DIR> . <DIR> .. 00:00 01-01-2000 4 bootcount 2 directories, 1 file, 643072 bytes free > xmodem r "WebMite 50800b5.opt" > xmodem r "startup_WebMite.bas" > files A:/ <DIR> . <DIR> .. 00:00 01-01-2000 4 bootcount 00:02 01-01-2000 384 startup_WebMite.bas 00:01 01-01-2000 768 WebMite 50800b5.opt 2 directories, 3 files, 634880 bytes free > option disk load "WebMite 50800b5.opt" WebMite MMBasic Version 5.08.00b5 Copyright 2011-2023 Geoff Graham Copyright 2016-2023 Peter Mather > option list WebMite MMBasic Version 5.08.00b5 Looking at the .OPT file on the PC with a Hex viewer it seems to have all the data. Edit That .OPT file was saved from WebMite MMBasic Version 5.08.00b2 After reinstalling the options the .OPT file saved from b5 re-loads correctly. Presumably some slight difference in the format or the way b5 reads it. Edit 2 It isn't a problem with Xmodem as sending the new .OPT to the PC and back also works. . Edited 2023-12-15 13:41 by phil99 |
||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All Not sure if the right place for this request.... When using WEB scan NetScan%() the docs state that if the array is not large enough the results may be unpredictable. (? Like overwriting other memory areas)The problem is that we don't know how many wifi networks it is likely to come across. Why not WEB scan SSID$ How many people really download a list and then pick one to connect to.Don't we usually know which SSID we want to connect to ? It would save some valuable memory. I had to print out the list and worked out that, the 1024 I nominated was only a third of what was needed. Regards Hervey Bay Qld. |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3802 |
Wow! I'm in a busy area but not THAT busy! John |
||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All Didn't realise that each char (byte) was stored as PART OF an Integer. Read the wrong part of this statement. I have about 12 networks around me and when I counted the bytes in each SSID statement made that erroneous conclusion. The concept of the suggested command still stands though. Regards Hervey Bay Qld. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Peter, Line width of a drawn line does not appear to be working on the latest Beta5, I have tested box, circle and line AA they are all fine, just line itself. I have only tested on an LCD currently. Forget it, doesn't work for diagonal lines. Regards, Kevin. Edited 2023-12-18 03:57 by Bleep |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Back to Lines again, should Line AA be able to accept arrays as the input parameters, the same way that Line itself does, currently it does not, but the early release manual implies that it will? Edited 2023-12-18 04:06 by Bleep |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9118 |
Manual error. Will correct. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Peter, Could this be a power problem? I was seeing something similar on a LCD PicoMite, using background screen updates, where if I ran it at 252 all was fine, but if I used 378 it would have random errors or lock ups, I tried adding a small heat sink in case it was heat related, (second CPU now active), nothing, I added extra smoothing/storage capacitors, nothing, eventually I realised the LCD back LED was drawing quite a lot of power, there was no brightness control, so I stuck a small resistor in series to reduce it's current, suddenly all was well again. :-) I've just realised that a VGA Pico at 252 draws about 125mA and at 378 it draws 160mA, probably higher in bursts, Just a thought. Seems I'm a bit perverse, ;-) at one end, my solar fridge controller, I'm running as slow as possible to get power consumption down to about 5to7mA (from 12V) with and without a 2 line display, on the other hand 160mA to run it flat out, such is life! :-) Regards, Kevin. Edited 2023-12-19 21:44 by Bleep |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
WEBmite Beta5 has been running for a few days now and it is looking good. Jim VK7JH MMedit MMBasic Help |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
@Peter, I have been playing with PicoMite for over 2 years now, and have been amazed at what has been achieved on this platform. I feel feature wise (maybe not performance wise) this basic exceeds even the flagship CMM2. Since I have been following every incarnation of the MMBasic on this platform, I know that features have been added (sometimes at my personal request) in a way they where easiest to implement. I remember the DMA's for PIO. And recently the changes for fast copying of sprites from flash to video ram. With the growing, there are a few items that are out of harmony. Again, I understand that this basic is standing on the shoulders of smaller ones (CMM1) and has to live up to the expectations of larger ones (CMM2). But for the sake of the quality of the basic, and consistency of the commands there are few things that I would like to issue. 1/ the BLIT/SPRITE confusion and translations. This would not be a problem if one was used on a CMM1 and the other on a completely diffent platform (i.e. CMM2), but this is both PicoMite. 2/ the colors. Every PicoMiteVGA program I see has (at the bottom) a set of DATA lines to convert RGB(xxx) colors to a number. And depending if this is a program that works on sprites, or works on display layers, the DATA set is different. Somthimes you use color number(index) as in FRAMEBUFFER LAYER 9, sometimes you use color as in CLS RGB(MAGENTA). You will have come accross these when writing the user manual for PicoMite and PicoMiteVGA. For the Petscii Robots program I hope you do not change any of the above, but for consistency and quality of the MMBasic it would be better. Volhout As for the color numbers, these are chosen such that 1 simple line of math could translate from color number to RGB value. I think a lookup table in ram (8 bytes) could do a mapping, or a full lookup table (64bytes) could to the number->32bit RGB translation immensly fast. Using color numbers: Currently we have RGB 5:6:5 in the CMM2. Meaning that in the 24 bit RGB values there is RRRRRxxx GGGGGGxx BBBBBaaa used. In the "aaa" value you could "hide" 8 colors. And if you would use the lowest 4 bits (Baaa) you could hide all 16 VGA colors in the 24bit RGB value. You would loose exactly 1 color (ultra dark blue) in the CMM2 65536 color pallette. IF color < 16 THEN color number, ELSE RGB value. And this could then be used everywhere where color is used. Combined with the above look-up table that would make the use of color in PicoMite/PicoMiteVGA consistent over all commands. Edited 2023-12-21 18:23 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9118 |
No easy solutions to any of this These aren't "sprites" this is a clear example of BLITting The MMB4W, CMM2 and PicoMiteVGA support true sprites hence the SPRITE command. The PicoMite only supports BLIT hence the BLIT command The PicoMite supports true RGB888 for displays like the SSD1963 so there are no "spare" bits. The CMM2 has a ARGB4888 mode and MMB4W is always RGB888 or ARGB8888 so definitely no spare bits. The FRAMEBUFFER commands on the Pico versions are clearly special cases and work in colour nibbles hence using a number between 0 and 15. You can't sensible use these commands without understanding this. Note in the implementation of merge in the CMM2 and MMB4W I use the RGB function for colours because these are true colour and the merge works in PAGES and not framebuffers. The FRAMEBUFFER command on the CMM2 and MMB4W is completely different in intent to that on the Picos There are and will be differences. These are inevitable given the different architectures and capabilities of the platforms |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
Hi Peter, Thank you for explaining . I fear I have to admit I used some of these commands without actually undestanding them Volhout PicomiteVGA PETSCII ROBOTS |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I flashed the vga version to try draw3d and copy/pasted the rotating ball. Very impressive and it's hollow. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I just switched back to trying vga mmbasic cos I got a 7" monitor. Shoe boxed the lcd boards and cleared the table dedicated to pico vga. Tried 16 sprites bouncing around and box to erase each. then tried frame f and cls, no box erase. Not much visual difference for 16 sprites but amazing how fast , vga and spi ili. |
||||
Dinosaur Guru Joined: 12/08/2011 Location: AustraliaPosts: 311 |
Hi All I know that MQTT is not on the priority list , BUT is it possible to get MM.ERRNO and MM.Message$ updated by WEB MQTT PUBLISH. Depending on how I disconnect at the "Broker's" end , it may throw a "mqtt_publish: TCP disconnected" and I have no way of catching it. Regards Hervey Bay Qld. |
||||
Page 5 of 7 |
Print this page |