|
Forum Index : Microcontroller and PC projects : PicoMite V6.01.00 release candidates
| Author | Message | ||||
| ville56 Senior Member Joined: 08/06/2022 Location: AustriaPosts: 295 |
Thank you, works again ![]() 73 de OE1HGA, Gerald |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
Try this RP2040 VGA PicoMite.zip My test program CLS RGB(blue) Print @(0,0)"Even xsource, even width" Print @(0,20)"Blit +1" Box 100,100,100,100,1,RGB(white),RGB(red) Blit 100,100,101,120,100,100 Pause 2000 Print @(0,20)"Blit -1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,100,100,1,RGB(white),RGB(red) Blit 100,100,99,120,100,100 Pause 2000 Print @(0,20)"Blit +2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,100,100,1,RGB(white),RGB(red) Blit 100,100,102,120,100,100 Pause 2000 Print @(0,20)"Blit -2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,100,100,1,RGB(white),RGB(red) Blit 100,100,98,120,100,100 Pause 2000 Print @(0,0)"Even xsource, odd width" Print @(0,20)"Blit +1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,101,100,1,RGB(white),RGB(red) Blit 100,100,101,120,101,100 Pause 2000 Print @(0,20)"Blit -1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,101,100,1,RGB(white),RGB(red) Blit 100,100,99,120,101,100 Pause 2000 Print @(0,20)"Blit +2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,101,100,1,RGB(white),RGB(red) Blit 100,100,102,120,101,100 Pause 2000 Print @(0,20)"Blit -2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 100,100,101,100,1,RGB(white),RGB(red) Blit 100,100,98,120,101,100 Pause 2000 CLS RGB(blue) Print @(0,0)"Odd xsource, even width" Print @(0,20)"Blit +1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,100,100,1,RGB(white),RGB(red) Blit 101,100,102,120,100,100 Pause 2000 Print @(0,20)"Blit -1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,100,100,1,RGB(white),RGB(red) Blit 101,100,100,120,100,100 Pause 2000 Print @(0,20)"Blit +2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,100,100,1,RGB(white),RGB(red) Blit 101,100,103,120,100,100 Pause 2000 Print @(0,20)"Blit -2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,100,100,1,RGB(white),RGB(red) Blit 101,100,99,120,100,100 Pause 2000 Print @(0,0)"Odd xsource, odd width" Print @(0,20)"Blit +1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,101,100,1,RGB(white),RGB(red) Blit 101,100,102,120,101,100 Pause 2000 Print @(0,20)"Blit -1" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,101,100,1,RGB(white),RGB(red) Blit 101,100,100,120,101,100 Pause 2000 Print @(0,20)"Blit +2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,101,100,1,RGB(white),RGB(red) Blit 101,100,103,120,101,100 Pause 2000 Print @(0,20)"Blit -2" Box 80,100,180,180,,RGB(blue),RGB(blue) Box 101,100,101,100,1,RGB(white),RGB(red) Blit 101,100,99,120,101,100 Pause 2000 |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5485 |
@Peter, Yes, fixes the text scroll issue. It also fixes the SPRITE SCROLL problem in the game. Thanks. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
V6.01.00RC17 Fixes bug in blit/sprite scroll of RGB121 framebuffers and VGA display PicoMiteV6.01.00RC17.zip |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
Very nice! I made a small change to get the press any key message out of the way of the wonderful graphics: Sub WaitForKey() Print @(35,1) "(Press any key for next test)" Do While Inkey$ = "": Loop End Sub |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
Is there a problem with the Pimoroni Pico 2 and playing music? I have one setup and I just swapped out a Pico2W for a Pimoroni Pico2. Nothing else changed. The screen, keyboard and audio are all connected to the same pins. When I try to use play mp3 "testfile.mp3" it works fine on the Pico2W but on the Pimoroni, the system locks up requiring a power cycle. Here's the OPTION LIST (yes, I tried turning off PSRAM and slowing down the CPUSPEED): PicoMite MMBasic RP2350B V6.01.00RC17 OPTION SERIAL CONSOLE COM1,GP0,GP1,BOTH OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP6,GP7, SLOW OPTION FLASH SIZE 16777216 OPTION LIBRARY_FLASH_SIZE 53000 OPTION COLOURCODE ON OPTION CONTINUATION LINES ON OPTION CASE UPPER OPTION DEFAULT COLOURS GREEN, BLACK OPTION KEYBOARD I2C OPTION PICO OFF OPTION CPUSPEED (KHz) 252000 OPTION LCDPANEL CONSOLE ,, FF00,, 20 OPTION DISPLAY 26, 40 OPTION LCDPANEL ST7796SP, PORTRAIT,GP14,GP15,GP13,,INVERT OPTION LCD BACKLIGHT 20 OPTION SDCARD GP17, GP18, GP19, GP16 OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5 OPTION PLATFORM PicoMite OPTION PSRAM PIN GP47 |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
I assume this is running on a PicoCalc with modified S/W. Try changing heap memory size to #define HEAP_MEMORY_SIZE (328 * 1024) |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
Thanks for the reply. I increased HEAP_MEMORY_SIZE as you suggested but there's no change. PLAY TONE works fine but PLAY MP3 locks up the system. |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
In looking at the code, I see both HEAP_MEMORY_SIZE and heap_memory_size. To Ubuntu's C compiler, those are different variables. UKTailwind uses a Windows compiler and they're the same variable in that environment. Is this related to the problem? |
||||
| EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 270 |
HEAP_MEMORY_SIZE is a #define to set a value. It is set in configuration.h #ifdef PICOMITE #ifdef rp2350 #define HEAP_MEMORY_SIZE (332 * 1024) heap_memory_size is a global variable that MMBasic can use in its calculations. In memory.c they are set the same: uint32_t heap_memory_size = HEAP_MEMORY_SIZE; I'm using GCC on a Windows machine. And it most certainly understands (and respects) the difference in the declarations. . Edited 2025-11-20 13:47 by EDNEDN |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
My bad. I changed the wrong one. Now that I changed the correct one, it works. Thanks again! |
||||
| circuit Senior Member Joined: 10/01/2016 Location: United KingdomPosts: 293 |
A problem; 2350DIL. V. 6.01.00 RC15 Pins GP6 through to GP42 are all configured as outputs. I am intending to set 32 pins to 0, avoiding GP25. PORT(GP8,17,26,15)=0 Error : Invalid output pin PORT(GP8,17)=0 PORT(26,15)=0 runs correctly. Where am I going wrong? |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
the 26 needs a GP in front otherwise it treats it as a pin number |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
V6.01.00RC18 PicoMiteV6.01.00RC18.zip Swaps the regex engine for the one Gerry (disco4now) has built into the ArmMiteH7 and now the CMM2. This is a much better bit of code than the original one I used. Here is the test harness that Claude created for me. ' ============================================================================ ' MMBasic Regular Expression Test Program ' Tests the INSTR() function with regex patterns (size parameter) ' ============================================================================ Print "==========================================" Print "MMBasic Regular Expression Test Suite" Print "==========================================" ' Test counter Dim testnum As Integer = 0 Dim passed As Integer = 0 Dim failed As Integer = 0 ' ============================================================================ ' Helper subroutine to run a test ' ============================================================================ Sub RunTest(testname$, text$, pattern$, expected_pos, expected_len) Local position, size testnum = testnum + 1 Print "Test "; testnum; ": "; testname$ Print " Text: "; Chr$(34); text$; Chr$(34) Print " Pattern: "; Chr$(34); pattern$; Chr$(34) position = Instr(text$, pattern$, size) Print " Result: pos="; position; ", len="; size Print " Expected: pos="; expected_pos; ", len="; expected_len If position = expected_pos And size = expected_len Then Print " [PASS]" passed = passed + 1 Else Print " [FAIL]" failed = failed + 1 EndIf End Sub ' ============================================================================ ' Test 1: Basic character matching ' ============================================================================ Print "--- Basic Character Matching ---" RunTest("Simple match", "hello world", "world", 7, 5) RunTest("No match", "hello world", "xyz", 0, 0) RunTest("First char", "hello", "h", 1, 1) RunTest("Last char", "hello", "o", 5, 1) ' ============================================================================ ' Test 2: Dot metacharacter (matches any character) ' ============================================================================ Print "--- Dot Metacharacter Tests ---" RunTest("Dot single", "abc", "a.c", 1, 3) RunTest("Dot multiple", "hello", "h...o", 1, 5) RunTest("Dot no match", "abc", "a.d", 0, 0) ' ============================================================================ ' Test 3: Character classes [...] ' ============================================================================ Print "--- Character Class Tests ---" RunTest("Char class match", "hello", "h[aeiou]llo", 1, 5) RunTest("Char class range", "test123", "[0-9]", 5, 1) RunTest("Char class alpha", "abc123def", "[a-z]", 1, 1) RunTest("Multiple ranges", "Test123", "[a-zA-Z0-9]", 1, 1) ' ============================================================================ ' Test 4: Inverted character classes [^...] ' ============================================================================ Print "--- Inverted Character Class Tests ---" RunTest("Not vowel", "hello", "h[^aeiou]", 0, 0) RunTest("Not digit", "abc123", "[^0-9]", 1, 1) RunTest("Not alpha", "abc123", "[^a-z]", 4, 1) ' ============================================================================ ' Test 5: Anchors (^ and $) ' ============================================================================ Print "--- Anchor Tests ---" RunTest("Start anchor", "hello world", "^hello", 1, 5) RunTest("Start anchor fail", "hello world", "^world", 0, 0) RunTest("End anchor", "hello world", "world$", 7, 5) RunTest("End anchor fail", "hello world", "hello$", 0, 0) RunTest("Both anchors", "test", "^test$", 1, 4) ' ============================================================================ ' Test 6: Quantifiers - * (zero or more) ' ============================================================================ Print "--- Star Quantifier Tests ---" RunTest("Star zero match", "ac", "ab*c", 1, 2) RunTest("Star one match", "abc", "ab*c", 1, 3) RunTest("Star multiple", "abbbbc", "ab*c", 1, 6) RunTest("Star greedy", "aaaaaa", "a*", 1, 6) ' ============================================================================ ' Test 7: Quantifiers - + (one or more) ' ============================================================================ Print "--- Plus Quantifier Tests ---" RunTest("Plus no match", "ac", "ab+c", 0, 0) RunTest("Plus one match", "abc", "ab+c", 1, 3) RunTest("Plus multiple", "abbbbc", "ab+c", 1, 6) RunTest("Plus greedy", "aaaaa", "a+", 1, 5) ' ============================================================================ ' Test 8: Quantifiers - ? (zero or one) ' ============================================================================ Print "--- Question Quantifier Tests ---" RunTest("Question zero", "ac", "ab?c", 1, 2) RunTest("Question one", "abc", "ab?c", 1, 3) RunTest("Question multiple", "abbc", "ab?c", 0, 0) ' ============================================================================ ' Test 9: Escape sequences - \d (digits) ' ============================================================================ Print "--- Digit Escape Tests ---" RunTest("Digit match", "test123", "\d", 5, 1) RunTest("Digit+", "test123", "\d+", 5, 3) RunTest("Not digit", "test123", "\D", 1, 1) RunTest("Not digit+", "test123", "\D+", 1, 4) ' ============================================================================ ' Test 10: Escape sequences - \w (alphanumeric) ' ============================================================================ Print "--- Alphanumeric Escape Tests ---" RunTest("Word char", "hello world", "\w", 1, 1) RunTest("Word+", "hello world", "\w+", 1, 5) RunTest("Not word", "hello world", "\W", 6, 1) ' ============================================================================ ' Test 11: Escape sequences - \s (whitespace) ' ============================================================================ Print "--- Whitespace Escape Tests ---" RunTest("Whitespace", "hello world", "\s", 6, 1) RunTest("Whitespace+", "hello world", "\s+", 6, 3) RunTest("Not whitespace", "hello world", "\S", 1, 1) RunTest("Not whitespace+", "hello world", "\S+", 1, 5) ' ============================================================================ ' Test 12: Complex patterns ' ============================================================================ Print "--- Complex Pattern Tests ---" RunTest("Email pattern", "test@example.com", "\w+@\w+\.\w+", 1, 16) RunTest("Date pattern", "Date: 2024-11-20", "\d+-\d+-\d+", 7, 10) RunTest("Phone pattern", "Call: 123-456-7890", "\d+-\d+-\d+", 7, 12) RunTest("Word boundary", "the cat in the hat", " [ct]at", 4, 4) ' ============================================================================ ' Test 13: Hex escape sequences \xXX ' ============================================================================ Print "--- Hex Escape Tests ---" RunTest("Hex char", "Hello", "\x48", 1, 1) ' H = 0x48 RunTest("Hex lower", "hello", "\x68", 1, 1) ' h = 0x68 RunTest("Hex space", "a b", "\x20", 2, 1) ' space = 0x20 ' ============================================================================ ' Test 14: Branch operator | ' ============================================================================ Print "--- Branch Operator Tests ---" RunTest("Branch first", "hello", "hello|world", 1, 5) RunTest("Branch simple", "b", "a|b|c", 1, 1) RunTest("Branch neither", "test", "hello|world", 0, 0) RunTest("Branch chars", "a", "a|b|c", 1, 1) ' ============================================================================ ' Test 15: Quantifiers {n}, {n,}, {,m}, {n,m} ' ============================================================================ Print "--- Counted Quantifier Tests ---" RunTest("Exact count", "aaaa", "a{4}", 1, 4) RunTest("Exact fail", "aaa", "a{4}", 0, 0) RunTest("Min count", "aaaaa", "a{3,}", 1, 5) RunTest("Max count", "aaaaa", "a{,3}", 1, 3) RunTest("Range count", "aaaa", "a{2,4}", 1, 4) ' ============================================================================ ' Test 16: Real-world examples ' ============================================================================ Print "--- Real-World Examples ---" RunTest("IP address", "192.168.1.1", "\d+\.\d+\.\d+\.\d+", 1, 11) RunTest("HTML tag", " content ", "<\w+>", 1, 5)RunTest("Currency", "$123.45", "\$\d+\.\d+", 1, 7) RunTest("Time format", "Time: 14:30:00", "\d+:\d+:\d+", 7, 8) ' ============================================================================ ' Test 17: Edge cases ' ============================================================================ Print "--- Edge Case Tests ---" RunTest("Empty pattern", "test", "", 1, 0) RunTest("Pattern longer", "hi", "hello", 0, 0) RunTest("Repeated dots", "abc", "...", 1, 3) RunTest("First occurrence", "hello hello", "hello", 1, 5) ' Finds first match ' ============================================================================ ' Summary ' ============================================================================ Print "==========================================" Print "Test Summary" Print "==========================================" Print "Total tests: "; testnum Print "Passed: "; passed Print "Failed: "; failed Print "Success rate: "; Format$(passed/testnum*100, "%.1f"); "%" Print "==========================================" If failed = 0 Then Print "All tests PASSED!" Else Print "Some tests FAILED - please review" EndIf End Edited 2025-11-21 00:07 by matherp |
||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 721 |
Hi Peter, does that mean the previous regex engine doesn't work anymore? This breaks some programs of mine. Hm... Greetings Daniel |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
It should be a superset of what was there before, the original failed more than half of these tests. |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 498 |
Mine fails test 58: IP address: Result: pos= 0, len= 0Expected: pos= 1. len=11 then gets invalid syntax [179] RunTest("HTML tag", "" Footnote added 2025-11-21 03:42 by toml_12953 Even if I fix the broken line, I only get a success rate of 67.7% |
||||
| ville56 Senior Member Joined: 08/06/2022 Location: AustriaPosts: 295 |
Peter, there is now an issue in HDMI version with turtle cursor in RC17. In resolution settings > 720 and mode = 1 the turtle cursor leaves an artefact behind. This can eaysily be reproduced with your turtle graphics test program, test #10. In resolution 720 it works as expected. my option settings: PicoMiteHDMI MMBasic USB RP2350B Edition V6.01.00RC17 OPTION SERIAL CONSOLE COM2,GP20,GP21 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION KEYBOARD US OPTION PICO OFF OPTION RESOLUTION 848x480 @ 336000KHz OPTION DISPLAY 40, 106 OPTION HDMI PINS 1, 3, 7, 5 OPTION SDCARD GP22, GP6, GP7, GP4 OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5 OPTION MODBUFF ENABLE 192 OPTION PLATFORM OLIMEX USB Gerald 73 de OE1HGA, Gerald |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10653 |
? |
||||
| ville56 Senior Member Joined: 08/06/2022 Location: AustriaPosts: 295 |
if set to one of the following OPTION RESOLUTION 1280 OPTION RESOLUTION 1024 OPTION RESOLUTION 848 OPTION RESOLUTION 800 artefacts are left on the HDMI display For OPTION RESOLUTION 720 or OPTION RESOLUTION 640 no artefacts. test with dim integer cursor_colors(5) Turtle RESET Turtle ST cursor_colors(0) = RGB(RED) cursor_colors(1) = RGB(GREEN) cursor_colors(2) = RGB(BLUE) cursor_colors(3) = RGB(YELLOW) cursor_colors(4) = RGB(MAGENTA) For i = 0 To 4 Turtle CURSORCOLOR cursor_colors(i) Turtle FD 40 Turtle RT 72 Pause 500 Next i 73 de OE1HGA, Gerald |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |