|
Forum Index : Microcontroller and PC projects : PicoMite V6.01.00 release candidates
| Author | Message | ||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5520 |
@Peter, With guidance of Jim I tried to find a clue on the problems with AUTOSAVE N. Platform RP2040 VGA V6.01.00rc21 I can change the timing (delay per line) from 2 to 4 to 10 to 100, in all cases the same problem. Programs are transferred with errors, pieces missing, and on the terminal (and VGA screen) part of the listing is visible. There should be no listing with autosave N. I tried a new (fresh from the blister) pico, and the exact same thing happened. I tried without programming any options (normally I use option reset VGA design 2) exact same happens. But.. If I take a RP2040 Game Mite, load it with it's matching non-vga rc21, and transfer a program with MMEdit/MMCC it works fine. I also imaged the pico from the VGA board with the non-vga image, set option reset gamemite, and connected an LCD. That works fine. So it is not the pico/RP2040. It is something in the image of the RP2040 VGA. I also tried rc15 (that is what I had available) and it has the same issue. So apparently it has been there for few weeks, but was not spotted before. I can only confirm it is not in b20, but b20 does not have support for AUTOSAVE N (that came in rc7). Observation: once in my tests with VGA, with a high line delay in MMCC, I have seen that AUTOSAVE N showed a full listing scrolling on the VGA screen, as if AUTOSAVE did not have the N. But could not duplicate that. I hope you can shed your light on this. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10689 |
You still haven't told us what OS you are running and how you are running MMEdit on it. RC22 on RP2040 with OPTION RESET VGA DESIGN 2 works perfectly loading badapple on W11 from Teraterm with AUTOSAVE N. Have you tried replacing the cable? '============================================================ ' Bad Apple Demo para PicoMite HDMI/USB ' Autor: Marcos LM (2025) ' ' - Version HQ: decodificador CSUB en C (320x240 @ 22 FPS) ' - Version LQ: decodificador MMBasic (160x120 @ 6 FPS) ' ' Requisitos: ' - Firmware PicoMite HDMI/USB >= 6.00.03 ' - Archivos: ba.vid, balq.vid, ba.aud, ba.jpg en la SD ' ' Controles: ' - Cursores arriba/abajo: seleccionar opcion ' - ENTER : aceptar ' - ESC : parar reproduccion / salir '============================================================ Option EXPLICIT Option console serial '------------------------ ' Configuracion de video '------------------------ Dim INTEGER vidWidth, vidHeight, vDelay,l Dim FLOAT fps, totalFrames,total,high Dim STRING vidFile, audFile,s Drive "b:" '------------------------ ' Configuracion extra '------------------------ Const HQ_DECODE = 0, LQ_DECODE = 1 Const T_ESC=27, T_ENTER=13, T_UP=128, T_DOWN=129 Const F_HANDLER = 1 ' canal para la apertura del archivo Const C_WHITE = RGB(255,255,255) Const C_GRAY = RGB(128,128,128) Const C_BLACK = RGB(0,0,0) Const SHOW_FPS = 0 ' Muestra FPS actuales Const SHOW_FPS_MIN = 0 ' Muestra el FPS mas bajo Const LIMIT_FPS = 1 ' Activa el limite a FPS objetivo '------------------------ ' Variables generales '------------------------ Dim FLOAT frameIndex Dim INTEGER x, y Dim INTEGER runLen Dim INTEGER bytesInChunk Dim FLOAT targetTime Dim FLOAT frameDuration Dim FLOAT fpsCurrent Dim FLOAT frameStartTime Dim FLOAT fpsMin = 1000 Dim INTEGER selection ' Menu Dim integer x1(1299),x2(1299),y1(1299),f(500) Dim integer cadd=Peek(varaddr f())+8 'point to the data in the longstring Dim integer csadd=cadd 'get the address of the dimension size of y1 Dim integer y1add=Peek(varheader y1())+36 '------------------------ ' Comprobacisn inicial '------------------------ ' Comprobar velocidad de CPU (debe ser 315000 KHz para sincronizar A/V) Dim FLOAT cpuhz cpuhz = Val(MM.Info(CPUSPEED$)) If cpuhz <> 315000000 Then Print "Bad Apple demo expects CPUSPEED = 315000 (315 MHz)" B Print "Current: "; MM.Info(CPUSPEED$); " Hz" Print "Adjust with: OPTION RESOLUTION 640x480,315000" End EndIf Do If totalframes Then Print total/totalframes '------------------------ ' Menu de Seleccion ' E inicializacion '------------------------ selection = MenuSel() ' Ajustamos configuracion ' Demo con decoder BASIC vidWidth = 319 vidHeight = 239 fps = 15 vidFile = "ba.vid" audFile = "ba.aud" totalFrames = 4754 targetTime = 1000000/fps ' ms por frame objetivo vDelay = 0 ' Salir ' Configuracion de pantalla y framebuffers MODE 2 : Font 8 Color C_WHITE, C_BLACK CLS ' Creamos un framebuffer donde dibujaremos y despues copiaremos al visible ' para evitar parpadeo (double buffering) FRAMEBUFFER CREATE FRAMEBUFFER WRITE N : CLS FRAMEBUFFER WRITE F : CLS ' Abrir archivo de video Open vidFile For INPUT As F_HANDLER loadchunk 'prime the chunk buffer ' Lanzar audio Play WAV audFile Pause vDelay ' ajuste de tiempo para cuadrar audio con video SYNC targettime '------------------------ ' Bucle de reproduccion '------------------------ Timer = 0 fpsCurrent = 0 frameIndex = 0 ' Dibujamos en F FRAMEBUFFER WRITE F Do While frameIndex < totalFrames CLS l=0 loadchunk ' Carga de 'chunk' y decodificar frame completo For y = 0 To vidHeight ' Inicializar linea para nuevo frame x = 0 Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Continue For ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Continue For EndIf Do ' Inc x,Peek(bp cadd) If x>vidWidth Then Exit ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Exit EndIf ' Inc x,Peek(bp cadd) If x>vidWidth Then Exit ' runlen=Peek(bp cadd) If runLen > 0 Then x1(l)=x x2(l)=x+runLen-1 y1(l)=y Inc l Inc x,runlen If x>vidWidth Then Exit EndIf Loop Next 'set the array size to the number of lines Poke word y1add,l-1 If l Then Line x1(),y1(),x2(),y1() Poke word y1add,1299 Inc total, Timer SYNC Timer =0 FRAMEBUFFER COPY F, N Inc frameIndex If Asc(Inkey$) = T_ESC Then Play STOP : Exit Do Loop Close F_HANDLER Do While MM.Info(SOUND)="WAV" Pause 20 Loop Play STOP FRAMEBUFFER CLOSE Loop '------------------------ ' SUBs y Funciones '------------------------ ' Menu de seleccion Function MenuSel() As INTEGER Const NOPC = 2 Local STRING opciones(NOPC-1) = (" Bad Apple Demo ", " Exit ") Local STRING ayudas(NOPC-1) = ("Lanzar version optimizada in Basic","Salir de la demo ") Local INTEGER estado=0, tecla, i Local INTEGER x=20, y=110 MODE 2 : CLS Load JPG "ba.jpg" Do ' Pintar opciones Font 7 For i = 0 To NOPC-1 If i = estado Then Color C_WHITE, C_BLACK Else Color C_BLACK, C_WHITE EndIf Text x, y + i * 10, opciones(i) Next i ' Texto de ayuda Font 8 Color C_GRAY, C_WHITE Text 20, 230, ayudas(estado) ' Esperar tecla Do tecla = Asc(Inkey$) Loop While tecla = 0 If tecla = T_ENTER Then Exit Do Play TONE 500, 550, 20 Select Case tecla Case T_ESC estado = -1 Exit Do Case T_UP If estado > 0 Then estado = estado-1 Case T_DOWN If estado < NOPC-1 Then estado = estado+1 End Select Loop Play TONE 1000,1000,20 ' Beep de confirmacion Do While MM.Info(SOUND)="TONE" Pause 5 Loop MenuSel=estado End Function ' Lee un nuevo bloque del video comprimido (RLE) Sub LoadChunk LongString right f(),f(),LLen(f())-(cadd-csadd) cadd=csadd Do While LLen(f())<3000 s=Input$(250,1) If Len(s)=0 Then Exit LongString append f(),s Loop bytesinchunk=LLen(f()) If bytesInChunk = 0 Then FRAMEBUFFER CLOSE : Play STOP : Close F_HANDLER Print "EOF inesperado en frame"; frameIndex End ' Abortamos EndIf End Sub Edited 2025-12-03 04:33 by matherp |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6388 |
@Volhout In MMCC,inf line 48, LineDelay = 120 try increasing it to 200 MMCC first tries 'AUTOSAVE N' and waits 3* linedelay for an error message. If an error is found, it tries 'AUTOSAVE' instead. Also, can you try the same hardware and firmware with a Windows computer. I can't make it fail with any combination. Jim VK7JH MMedit |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5520 |
Hi Jim, No, I can't anymore. My employer has taken admin rights from my work W11 laptop. Can't install MMEdit anymore. But... I have a clue. On the linux PC I have tried to install Flatcam. Flatcam uses some QT libraries, and needed to update these. Maybe these involve communication drivers for the USB port. I took a virgin Ubuntu 24.04 PC, Put MMEdit on it, QT5, and there it works correct. Now I have to look for a way to revert these QT changes. Sorry to have caused so much trouble. Volhout P.S. still strange the non-VGA pico works fine. I will try your suggestion anyway. Edited 2025-12-03 06:29 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5520 |
Jim, I got it !!! In MMCC in SETUP, change line endings to CRLF. Then you see what I am observing all the time. That makes the whole difference. When set to LF, it works correct. No problems anymore, Volhout PicomiteVGA PETSCII ROBOTS |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6388 |
It looks like you can have either LF or CR but not both. I will probably change MMCC to use LF only for AUTOSAVE Jim VK7JH MMedit |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10689 |
For reference the file I tested with in W11 Teraterm is line terminated crlf and works fine |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6388 |
The problem was with the test to see if the device could use 'AUTOSAVE N'. The double end-of-line had MMCC confused. I need to test the fix on a few other devices before posting the fix. Jim VK7JH MMedit |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5520 |
Peter, Jim, Confusing was that MMCC stores its preferences in a global hidden file. I have several folders each with a different version of MMEdit/MMCC, but they initialize from a file that is not local to that folder. So whatever earlier version I started, they all reverted to CRLF line ending for TX. (I changed that for a test once, and forgot to switch back). There may be timing involved, since the non-VGA version of rc21 does handle the CRLF fine. But the VGA version chokes. Thanks for looking at a fix. It could have happened to anyone. Why me again ? Volhout PicomiteVGA PETSCII ROBOTS |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6388 |
Not true. In Windows the inf file is stored in 'appdata' for installed versions so will be common to all installed versions. For the portable version, the inf files are always in a data folder that is in the program folder. Likewise, for Linux, the inf files are always in a data folder that is in the program folder. The files are NOT hidden but are only created on first use. Jim VK7JH MMedit |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5520 |
OK, that was an assumption from my side. Excuses. It was what I convinced my self was happening, since I could not explain that earlier versions behaved the exact same (the ones that have autosave n). Again, apologies for misleading information. Volhout PicomiteVGA PETSCII ROBOTS |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6388 |
With TeraTerm set to CRLF, the line Enter ctrl-Z, F1, or F2 to exit is printed immediately after the AUTOSAVE N and before any code is pasted. But with TeraTerm set to LF, the line doesn't appear until the code starts being sent. Either way, the code is successfully sent to the picomite with my limited testing. I will change MMCC to only send LF after AUTOSAVE N. That seems to resolve my problem. Jim VK7JH MMedit |
||||
| JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 265 |
Peter, Here are some tests with my mice. Only Mouse Type: Standard 8-bit X/Y bits: 8/8 works with the editor. PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > option list PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 OPTION SERIAL CONSOLE COM1,GP0,GP1 OPTION SYSTEM I2C GP20,GP21 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION HEARTBEAT OFF OPTION PICO OFF OPTION RESOLUTION 640x480 @ 252000KHz OPTION HDMI PINS 1, 3, 7, 5 OPTION SDCARD GP22, GP6, GP7, GP4 OPTION RTC AUTO ENABLE OPTION PLATFORM OLIMEX USB > memory Program: 0K ( 0%) Program (0 lines) 176K (100%) Free Saved Variables: 16K (100%) Free RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 192K (100%) Free Do mx = DEVICE(MOUSE 2, x) my = DEVICE(MOUSE 2, y) mw = DEVICE(MOUSE 2, w) If mx <> tx Or my <> ty Or mw <> tw Then Print mx, my, mw tx = mx : ty = my : tw = mw Loop MINI KEYBOARD + MOUSEPAD AliExpress PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > US USB Keyboard Connected on channel 1 > Mouse Type: Standard 8-bit X/Y bits: 8/8 Buttons: 2 Report length: 9 bytes Has wheel: Yes (byte 1) ' No wheel only a pad Has pan: No USB Mouse Connected on channel 2 > run 44 36 0 43 36 0 42 35 0 41 34 0 > USB Keyboard Disconnected > USB Mouse Disconnected SilverCrest STMS 2219A1-M MOUSE and SilverCrest STMS 2219A1-K KEYBOARD PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > US USB Keyboard Connected on channel 1 > Mouse Type: Standard 8-bit X/Y bits: 8/8 Buttons: 8 Report length: 15 bytes Has wheel: Yes (byte 1) Has pan: No USB Mouse Connected on channel 2 > run 96 39 23 94 41 23 94 43 22 90 43 22 > USB Keyboard Disconnected > USB Mouse Disconnected hama 24182635 MOUSE and KEYBOARD Action 9,95 euro PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > US USB Keyboard Connected on channel 1 > Mouse Type: Gaming 16-bit X/Y bits: 16/16 Buttons: 5 Report length: 10 bytes Has wheel: Yes (byte 5) Has pan: No USB Mouse Connected on channel 2 > run 28 15 21 28 14 21 28 13 21 28 12 21 > USB Keyboard Disconnected > USB Mouse Disconnected Logitech M150 M/N:M-R007 MOUSE K220 M/N::Y-R0035 KEYBOARD PicoMiteHDMI MMBasic USB RP2350A Edition V6.01.00RC22 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > US USB Keyboard Connected on channel 1 > Mouse Type: High-res 12-bit X/Y bits: 12/12 Buttons: 16 Report length: 6 bytes Has wheel: Yes (byte 5) Has pan: No USB Mouse Connected on channel 2 > run 639 479 -152 639 479 -153 639 479 -154 639 95 -155 639 95 -156 > USB Keyboard Disconnected > USB Mouse Disconnected |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 322 |
Peter, wireless mice are behaving curious with RC22 .... trying to use my old Logitech MK-320 wireless desktop which worked well on all MMbasic RCs before ... > GR USB Keyboard Connected on channel 1 > Mouse Type: High-res 12-bit X/Y bits: 12/12 Buttons: 16 Report length: 6 bytes Has wheel: Yes (byte 5) Has pan: No USB Mouse Connected on channel 2 in the editor, the keypoard works ok but the mouse is so sensitive that the slightest move lets the cursor jump around 20+ lines ... same with a newer K270 desktop On the other side a wireless Hama mouse is working, but to scroll 1 line you have to move the mouse about 10 cm. Is there any way to adjust mouse movement sensitivity? Gerald 73 de OE1HGA, Gerald |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10689 |
The issue is that the report descriptor does not include the dpi of the mouse. So, your 12-bit MK-320 mouse is presumably set to a high DPI whereas my 12-bit mouse isn't. In boot mode as they were configured before (no wheel) they presumably have to return a specific dpi. I'll have a think about how to allow the user to adjust the sensitivity. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |