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 release candidates
Page 7 of 13 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
I'm not sure it's exactly that but I think the FS on drive B: may have a path limit of 63 or 64 characters and that the PicoMite isn't checking for it ... could well also be the cause of the problem with playing a .mod file that I reported in the Gems'n'Rocks thread. Will check it out later. Thanks for pointing me in the right (?) direction. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
OK, I've shortened the paths and confirmed that this was (probably) the issue. It would be nice if the firmware checked for this where appropriate . Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
The problem is that in this case, the program wants to reload files from other subfolders, starting from the program path, I'm not sure if it adjusts when you call the program with your path. DRIVE "b:":chdir "b:\mmbasic-third-party-private/games/gems-n-rocks" RUN "gems-n-rocks.bas" Edited 2024-05-28 03:10 by Martin H. 'no comment |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Why can’t you make TILES in PicoMiteVGA with a height of less than 12 lines? I would like to use ZX-Spectrum a similar 8x8 font with color attributes for programming color graphics in monochrome mode MODE 1 This mode would allow the use of 256-32 Tiles with color attributes from an 8x8 font in an 80x60 grid for MODE 1 monochrome mode (640x480). Best regards,Javavi |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Hi Javavi, 1 magic word: memory This is the answer to most questions about PicoMite. RAM is scarce. going from 80x40 to 80x60 is 800 bytes RAM. Maybe Peter can find 800 bytes. Tiles where originally 16x16 to form a 40x30 pattern, designed for font #3, then where adapted to the default font #1 (8x12) to allow syntax coloring in the editor. You can enlarge them, but not shrink any further. Volhout P.S. The user manual still says the tiles are used to color font #3. P.P.S. The TILE WIDTH command is not listed in the manual Edited 2024-05-28 17:02 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
You can set the tile height using TILE HEIGHT. Set it to 16 and then two tiles wide is 16x16. Every Pixel in Your font has to be 2x2 Pixel on the Pico Mode 1 t 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Oops, Just realized TILES are fixed width (8 pixels). Only the height can be varied. Volhout PicomiteVGA PETSCII ROBOTS |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
After resetting PicoMiteVGA v.5.09.00RC3, I can't assign the Timer system variable more than it contains until it reaches this value. It gives an error: timer = 60000 Error : 60000 is invalid (valid is 51898) In the future, if you set this system variable to 0 (timer=0) , then you can assign larger values, but only those that do not exceed the system's operating time. Is this how it should work? |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
timer is readonly I use it that way: tt%=Timer 'set tt% to the start time 'do something in your program time_past%=timer-TT% so your result is stored in time_past% Edited 2024-06-02 17:04 by Martin H. 'no comment |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
The manual for PicoMiteVGA says: TIMER = msec Resets the timer to a number of milliseconds. Normally this is just used to reset the timer to zero but you can set it to any positive number And how can I get interrupts every second from the RTС system time clock on PicoMiteVGA? Edited 2024-06-02 17:28 by javavi |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6783 |
From what I understand the RTC pulse output is disabled by default. Even if you connect it you won't get an interrupt. You have to set the registers on the RTC chip using the I2C port. Once this is done you can connect the pulse pin of the RTC to any digital input pin set up as an interrupt or, better, as a counter. The difference is that a normal interrupt input is scanned by MMBasic and a counter input is handled in hardware. Not being able to set TIMER confuses me as I'm sure I've used it for zeroing in the past. Does that still work? I've never felt the need to set it to any other value as it always counts up, never down. You can have a sub that runs every second using SETTICK. It's usually accurate enough for most purposes, but not for timing. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Look in the manual, part Interrupts I think Tick would do your job. Edited 2024-06-02 17:56 by Martin H. 'no comment |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Thank you very much Mixtel90 ! Thank you very much Martin H. ! Now the clock is running, I am updating the readings by SETTICK. 7SClock.zip Edited 2024-06-02 18:22 by javavi |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
7Sclock2.zip |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Peter (Geoff), I have a generic question about matrix multiplication. In my Thermal imager project I am trying to speed processing up by doing matrix multiplications to achieve higher video resolutions. But there is something strange in the MATH M_MULT command. This is the knowledge I have: Dim a(1,1)=(0,2,10,100) Dim b(1,2)=(1,0,0,0,1,0) Dim c(1,2) Math m_print a():Print Math m_print b():Print Math m_print c():Print Math m_mult a(),b(),c() Math m_print a():Print Math m_print b():Print Math m_print c():Print When I try the values for n,m,p (see above) that are according to the text book, I get an error message (array dimensions). But when I look in the PicoMite user manual I see this: This implies that matrices in(1) and in(2) are in reverse order in the multiplication ? Please explain how this works ??? Are rows and columns swapped in the MMbasic implementation ? What cells are multiplied by what cells to achieve the geometry specified ? Dim a(1,1)=(0,2,10,100) Dim b(2,1)=(1,0,0,0,1,0) Dim c(2,1) Math m_print a():Print Math m_print b():Print Math m_print c():Print Math m_mult a(),b(),c() Math m_print a():Print Math m_print b():Print Math m_print c():Print Volhout This is consistent in MMB4W and PicoMite, so must be generic. Edited 2024-06-03 17:08 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
MMBasic will not allow arrays with a dimension of only 1 element so you cannot initialise an array to achieve your first example. This could be programmed round in the multiplication algorithm to special case the single element but that is a big project - If anyone wants to do it I would gladly incorporate it. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Hi Peter, With(default) option base 0, the arrays have minimum 2 elements per dimension in the example code (not in the text book copy). Please try this: Dim a(1,1)=(1,2,10,100) Dim b(2,1)=(1,1,1,1,1,1) Dim c(2,1) Math m_print a():Print Math m_print b():Print Math m_print c():Print Math m_mult a(),b(),c() Math m_print a():Print Math m_print b():Print Math m_print c():Print > RUN 1.0000, 2.0000 10.0000, 100.0000 1.0000, 1.0000, 1.0000 1.0000, 1.0000, 1.0000 0.0000, 0.0000, 0.0000 0.0000, 0.0000, 0.0000 1.0000, 2.0000 10.0000, 100.0000 1.0000, 1.0000, 1.0000 1.0000, 1.0000, 1.0000 3.0000, 3.0000, 0.0000 110.0000, 110.0000, 0.0000 Regardless how I fill array b(), there are never any values in c(2,xx). It feels a bit like the code has a good implementation of the text book, just array dimension checking works reverse. Volhout Edited 2024-06-03 17:22 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Hi Peter, Despite the fact that MMBasic implementation of the multiplication is not exactly text-book, I think I can make it work except for the c(2,xx) problem. I have no idea why these cells are left blank. Volhout edit: with larger array sizes, it seems that all cells that exceed square array are not filled. This code: Dim a(2,2)=(1,2,3,10,100,1000,32,64,128) Dim b(4,2)=(1,0.5,0,0,0, 0,0.5,1,0.5,0, 0,0,0,0.5,1) Dim c(4,2) Math m_print a():Print Math m_print b():Print Math m_print c():Print Math m_mult a(),b(),c() Math m_print a():Print Math m_print b():Print Math m_print c():Print results in 1.0000, 2.0000, 3.0000 10.0000, 100.0000, 1000.0000 32.0000, 64.0000, 128.0000 1.0000, 0.5000, 0.0000, 0.0000, 0.0000 0.0000, 0.5000, 1.0000, 0.5000, 0.0000 0.0000, 0.0000, 0.0000, 0.5000, 1.0000 0.0000, 0.0000, 0.0000, 0.0000, 0.0000 0.0000, 0.0000, 0.0000, 0.0000, 0.0000 0.0000, 0.0000, 0.0000, 0.0000, 0.0000 1.0000, 2.0000, 3.0000 10.0000, 100.0000, 1000.0000 32.0000, 64.0000, 128.0000 1.0000, 0.5000, 0.0000, 0.0000, 0.0000 0.0000, 0.5000, 1.0000, 0.5000, 0.0000 0.0000, 0.0000, 0.0000, 0.5000, 1.0000 1.0000, 1.5000, 2.0000, 0.0000, 0.0000 10.0000, 55.0000, 100.0000, 0.0000, 0.0000 32.0000, 48.0000, 64.0000, 0.0000, 0.0000 But the C() matrix should be filled with: 1.0000, 1.5000, 2.0000, 2.5000, 3.0000 10.0000, 55.0000, 100.0000, 550.0000, 1000.0000 32.0000, 48.0000, 64.0000, 96.0000, 128.0000 Edited 2024-06-03 18:32 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 896 |
I happen to have the F4 source open and initially had the same results. After a fix to the source now gives this. The swapping of the rows and columns was being done in two places. Dim a(1,1)=(1,2,10,100) Dim b(2,1)=(1,2,3,4,5,6) Dim c(2,1) Math m_print a():Print Math m_print b():Print Math m_print c():Print Math m_mult a(),b(),c() Math m_print a():Print Math m_print b():Print Math m_print c():Print 1.0000, 2.0000 10.0000, 100.0000 1.0000, 2.0000, 3.0000 4.0000, 5.0000, 6.0000 0.0000, 0.0000, 0.0000 0.0000, 0.0000, 0.0000 1.0000, 2.0000 10.0000, 100.0000 1.0000, 2.0000, 3.0000 4.0000, 5.0000, 6.0000 9.0000, 12.0000, 15.0000 410.0000, 520.0000, 630.0000 Fix for MATH M_MULTI command in F4 should be same for Picomites. MMFLOAT **matrix1=alloc2df(numcols1,numrows1); //MMFLOAT **matrix2=alloc2df(numrows2,numcols2); //MMFLOAT **matrix3=alloc2df(numrows3,numcols3); MMFLOAT **matrix2=alloc2df(numcols2,numrows2); MMFLOAT **matrix3=alloc2df(numcols3,numrows3); Latest F4 Latest H7 |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Yes, that seems correct. I hope Peter can add that to the bug-fix list (actually for MMB4W and PicoMite minimum, but I guess all platforms). Thanks for digging into this Disco4Now ! Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 7 of 13 |
Print this page |