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 V5.09.00 betas: Sorting out SPRITE and BLIT + USB variants
Page 2 of 9 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4037 |
Hi Stan, I believe that fragment is just using the common behaviour of sprites and blit buffers, and running on PicoMite 5.08 the SPRITE keyword is EXACTLY THE SAME as the BLIT keyword. Running on PicoMite 5.09 it isn't the same, but you may not see any difference unless you try to use sub-commands that only the new software sprites have, e.g. SPRITE SHOW, SPRITE HIDE, etc. But, what do I know? Whilst the shed may have me filed in the retro-gamer box I should really be filed in the tooling box (ok, and text adventures). Best wishes, Tom Edited 2024-02-07 04:55 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Please update your source and try again Edited 2024-02-07 04:53 by matherp |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
I am in favour of harmonising the platforms and the basic commands. Thanks for that, and I was wondering what would come after 5.08 ;-) The USB version has already surprised me ... but I would say, Peter, that you don't know boredom. Yes, and I know that life is too short ... :-)) Matthias |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
Thanks but even more confused now. is it one pico with usb version flashed and 5V supply to vbus to drive usb kb and usb to ttl converter (I thought they were one way) to program it from a win pc with mmedit? or have I got the idea all wrong? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
It's a single Pico. When you load the USB version of the firmware the USB port becomes a USB host and no longer works for connecting the console. You also lose the PS2 keyboard. To have a console you have to use a USB-TTL converter and connect it to GP8/GP9. It will then work as before. You can plug a USB keyboard into the Pico's USB port if you wish (you'll need some sort of adapter and/or USB hub). You have to power the Pico using the VBUS pin as that will put 5V out of the USB socket to power keyboards etc. You can still use MMEDIT, but you will have to connect it to the console USB port as before. It won't work on the Pico's USB. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
|
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Just use the cmake file in the PicoMiteVGAUSB repository. Does'nt come up in the first 6 but it is there NB: you won't get PicoMan working unless you can reduce size as the USB buffers reduce program space to 96K from 100K which was the problem with the VGA first posted Edited 2024-02-07 23:18 by matherp |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
When you load the USB version of the firmware the USB port becomes a USB host and no longer works for connecting the console. You also lose the PS2 keyboard. To have a console you have to use a USB-TTL converter and connect it to GP8/GP9. It will then work as before. You can plug a USB keyboard into the Pico's USB port if you wish (you'll need some sort of adapter and/or USB hub). You have to power the Pico using the VBUS pin as that will put 5V out of the USB socket to power keyboards etc. You can still use MMEDIT, but you will have to connect it to the console USB port as before. It won't work on the Pico's USB. Thanks for explaining, the other thread used 2 picos, one just as usb to serial converter, I lost the thread. So I could power vbus from 5V reg or could the pico and keyboard be plugged into a powered usb hub to power keyboard and pico? Does the usb to ttl adaptor show as com port number? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
I suppose a powered hub could be used, but I'd feel safer using 5V to the Pico and a non-powered hub. Yes, USB-TTL converters do appear as virtual COM ports. Edited 2024-02-08 01:58 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
With USB on the PC side and ttl on the PicoMite side, yes, the PC will provide a Com port number. Your typical USB/ttl adapter will also have a pin for 5V which could be connected to 5V on the PicoMite (0V also needed). ch340 usb ttl serial gold ~ Edited 2024-02-08 02:10 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
TinyUSB doesn't seem to do a very good job with powered hubs. If devices are plugged in when you power the Pico then it probably won't see them. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
Thanks. I only used one with pickit2 to program pics but also for new firmware for those cheap scopes, kit or built in clear acrylic or new firmware for my ebike. |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Yes, thanks, I found it... And also, in order for it to start building without errors, I had to update the TinyUSB 0.16.0 library in Pico SDK 1.5.1 NB: you won't get PicoMan working unless you can reduce size as the USB buffers reduce program space to 96K from 100K which was the problem with the VGA first posted To file CMakeLists.txt I added a line to print memory usage statistics target_link_options(PicoMiteVGAUSB PRIVATE -Xlinker --print-memory-usage) The output was: [build] FLASH: 692368 B 2 MB 33.01% [build] RAM: 251584 B 256 KB 95.97% [build] SCRATCH_X: 0 GB 4 KB 0.00% [build] SCRATCH_Y: 0 GB 4 KB 0.00% [build] [100%] Built target PicoMiteVGAUSB You do not have two areas of memory used, maybe this would help with the lack of memory? I know that other projects use this memory somehow. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
If you look at the map you will see these are used for the main stack 0x20040000 __StackLimit = (ORIGIN (RAM) + LENGTH (RAM)) 0x20041000 __StackOneTop = (ORIGIN (SCRATCH_X) + LENGTH (SCRATCH_X)) 0x20042000 __StackTop = (ORIGIN (SCRATCH_Y) + LENGTH (SCRATCH_Y)) 0x20041000 __StackOneBottom = (__StackOneTop - SIZEOF (.stack1_dummy)) 0x20041000 __StackBottom = (__StackTop - SIZEOF (.stack_dummy)) |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Yes, SCRATCH_X: SCRATCH_Y: these are stacks of 0 and 1 processor cores but you can bite off the volume from there and use it for your own purposes. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Both are combined for the core0 stack and MMBasic needs it otherwise complex operations and particularly recusrion will fail Try the attached Print Hex$(MM.Info(stack)) Print factorial(8) Function factorial(n As integer)As integer Print Hex$(MM.Info(stack)) If n=0 Then factorial=1 Else factorial=n*factorial(n-1) End Function Edited 2024-02-08 19:33 by matherp |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 144 |
Keypad no longer appears in the list of commands at V5.09.00b0 for all versions or is this command placed under device? I must admit that I have never used this command in a program, but I do own the keypad boards 4x3 and 4x4. After updating to V5.09.00b0 on a LILYGO T-Display RP2040 and others with the PicoMite version, I get after a Reset: > 127, 126 which I have never seen before. > 127, 126 PicoMite MMBasic Version 5.09.00b0 Copyright 2011-2024 Geoff Graham Copyright 2016-2024 Peter Mather Also when entering various options: > OPTION SYSTEM SPI GP2,GP3,GP0 127, 126 > OPTION COLOR CODE ON > OPTION DISPLAY 40, 84 > OPTION LCD PANEL ST7789_135, RLANDSCAPE,GP1,GP6,GP5,GP4 127, 126 > > OPTION LIST PicoMite MMBasic Version 5.09.00b0 OPTION SYSTEM SPI GP2,GP3,GP0 OPTION FLASH SIZE 4194304 OPTION COLOR CODE ON OPTION DISPLAY 40, 84 OPTION LCD PANEL ST7789_135, RLANDSCAPE,GP1,GP6,GP5,GP4 > Jan |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Keypad is now DEVICE KEYPAD Ignore the numbers - they are just a diagnostic count of commands and functions I forgot to remove |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
I bought another usb to ttl adaptor and it worked like the other one I posted. This one, Teraterm says is CH340(COM11). I still can't get the > by pressing ctrl + "c" although I can with all non usb picomites. Strange but no problems using the mmedit console, never same time as Teraterm. It's not a problem just want to know why. regards stan |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9114 |
Version 5.09.00b1 https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Contains: PicoMite PicoMiteVGA WebMite PicoMiteUSB PicoMiteVGAUSB No changes to the VGA versions so all of the below applies to the three non-VGA firmware variants New optional parameter for 8-bit LCD displays (SSD1963_XX_8) OPTION LCDPANEL DISPLAYTYPE, orientation [,backlightpin] [,DCpin] [,NORESET] If NORESET is specified the firmware only allocates 3 consecutive control pins DC, WR, and RD. In this case the RESET pin should be tied high or connected to the RUN pin. Use IFF this doesn't create any initialisation issues. As before by default DC, WR and, RD will be pins GP13, GP14, and GP15 by default but this can be changed to any other set of consecutive pins using the DCpin parameter Full support for 16-bit parallel displays - all types of SSD1963, ILI9341, and IPS 4" displays using the OTM8009A or NT35510 controller (NT35510 untested - I don't have one). These give exceptional perfomance, even compared to the 8-bit parallel versions (e.g. CLS on a ILI9341 @ 378MHz takes just 4.5mSec) OPTION LCDPANEL DISPLAYTYPE, orientation [,backlightpin] [,DCpin][,NORESET] Pins GP0 to GP15 are allocated to the D0 to D15 data pins, By default pins GP16-GP19 are allocated to DC, WR, RD, and RESET respectively - use the optional DCPIN parameter to change this. As above use the optional parameter NORESET to keep the fourth control pin for other use and tie the RESET pin high. New command for initialising an SD card (not VGA versions) OPTION SDCARD COMBINED CS If this is specified the touch chip select pin is also used for the SDcard. In this case external circuitry is needed to implement the SD chip select. The firmware uses the touch pin as follows: TOUCH_CS low: touch pin driven low SD_CS low: touch pin driven high TOUCH_CS and SD_CS high: touch pin set as input (high impedance) A suitable tested circuit to implement this is as below: Thanks to Turbo46 and Volhout for design and simulation of the circuit Edited 2024-02-16 02:40 by matherp |
||||
Page 2 of 9 |
Print this page |