|
Forum Index : Microcontroller and PC projects : Unix on the Pico Computer 3
| Author | Message | ||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 720 |
Matrix inverse and determinant aren't supported in FUZIX V0.21. Are they planned? Footnote added 2026-08-27 00:19 by toml_12953 I found my problem but it still needs an update of MMBasic. MMBasic seems to need statically-defined arrays and can't use variables as dimensions. For example, the following works in the interpreter but not the compiler: OPTION BASE 1 INPUT"Rank of matrix";N DIM A(N,N)=(1,2,3,4,5,6,7,8,9) |
||||
| karlelch Guru Joined: 30/10/2014 Location: GermanyPosts: 354 |
Thanks for the possibility to read/write the FAT partition. Will try soon. Best Thomas |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Hi Peter, Another text type problem. If you run vaders the start screen has the word PLAY with the Y upside down, however it is offset one character right and about half a line down, it's as though the character origin is wrong when inverted? Otherwise the latest update is looking good :-) Thanks. Kevin. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
v0.23 posted https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.23 Minor bug fixes |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 720 |
I just flashed V23 and now my keyboard isn't recognized. There's no green LED on the mainboard. I went back to V22 and it's recognized with no problem. Footnote added 2026-08-26 20:27 by toml_12953 I reflashed V23 and now it works. The first time could I have forgotten to move the switch back to Enable? Nah. |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 720 |
My footnote may have been overlooked so here it is: MMBasic seems to need statically-defined arrays and can't use variables as dimensions. For example, the following works in the interpreter but not the compiler: OPTION BASE 1 INPUT"Rank of matrix";N DIM A(N,N)=(1,2,3,4,5,6,7,8,9) Is there a chance of getting runtime dimensioning of arrays to be allowed? Also, it would be nice to have an equivalent of MAT READ that allows an array to be filled in using DATA statements rather than keeping the data in the DIM statement. Something like this: OPTION BASE 1 MATH READ A(3,4) DATA 4,5,6,7,8,9,-3,6,4,7,17,6 Edited 2026-08-28 02:40 by toml_12953 |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
It allows dynamically allocated arrays but you can't then preset them with a fixed list. Makes no sense. What happens if n is 1?. It supports data and read statements exactly like the interpreter. |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Hi everyone, I noticed Harm has added an auto play to the chess client, that prompted me to look at compiling the original MMBasic chess program, I haven't yet got the screen drawing, the compiler doesn't like SPRIT LOADBMP, I'll look into a get arounnd. BUT, the bench mark run does work. Compiled original 'C' TSCP chess. Nodes calculated 550778 in 15.75 Sec gives 34981 nodes per sec. MMBasic TSCP Chess. Nodes calculated 31688 in 1676.8 Sec gives 19 nodes per sec. Compiled MMBasic TSCP Chess. Nodes calculated 550778 in 128.9 Sec gives 4271 nodes per sec. (approx. 227 X faster) So if I can get the screen drawing, then it will probably be usable, though presumably the original 'C' could now be compiled, which would be even faster? Regards Kevin. PS for anyone interested, here is the basic file, which will compile. TSCPChess.zip Edited 2026-08-28 23:53 by Bleep |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
SPRITE LOAD should work |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Hi Peter, I'm now trying to use 'Sprite Load' for just a single piece for the moment, until I can split up the BMP up into individual pieces, as the 'Sprite LoadBmp' was able to load them from a single file using an offset. It compiles ok but when I run it I get no runtime function "sscanf" Any ideas? |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Hi Peter, there is another problem with the chess program, when you type a command, say help for example the word help does not get echoed to the display like it used to be, if I connect a terminal help is displayed there, but not by the tscp> prompt on screen, the command is accepted and the help menu displayed ok. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
Sorry, but I have no idea what code you are running and how you are capturing the tscp command. Simple examples please not whole programs. |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
The problem is that previously after the Text 1,P_Y,s$ the cursor would stay on that line for the Input "",st$, now I don't know where it is, it's not visible on the screen in the chess program. What I have found so far, with the below example code. If you use Print@(1,P_Y,0)s$ (a partial work around) If you have Mode 1 inside the code, or rely on it being in Mode 1 already, it works, the text typed at the input prompt appears after the TSCP> prompt. If you have Mode 2 inside the code, the typed text is not visible at all. If you rely on it being in Mode 2 already, it works as expected. If you use Text 1,P_Y,s$ (the way the code was originally) If you have Mode 1 inside the code, or rely on it already being Mode 1, the text typed at the Input prompt is in the top left corner. If you have Mode 2 inside the code, the typed text is not visible. If you rely on it already being in Mode 2 the typed text is in the top left corner. Regards Kevin. 'Mode 1 'Mode 2 Dim Integer P_Y=228 Dim string stt$ CLS stt$=oInput$("tscp> ") End Sub oPrint s$ 'text MM.INFO(HPOS),P_Y,s$ 'Text 1, P_Y, s$ Print@(1, P_Y,0)s$, End Sub Function oInput$(prompt$) Local st$ 'draw_chessboard 'Box 0,P_Y,E_W,R_H,0,0,0 oPrint prompt$ 'If autoplay Then ' s$="on" '<--------this is autoplay 'Else Input "",st$ 'EndIf 'Blit B_W,B_T1+R_H,B_W,B_T1,B_W1,P_Y-B_T1 'Blit 0,B_T+R_H,0,B_T,B_W,P_Y-B_T 'Box 0,P_Y,E_W,R_H,0,0,0 oInput$=st$ End Function |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Another problem, if I have MODE 2 in the code the Font 8 works correctly. If I rely on it already being in Mode 2 the Font 8 does not work, appears to be the default font. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
OK - thanks. Working on it. Can you post a version of chess that uses SPRITE LOADBMP and I'll get that working as well. |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
Hi Peter, Ok thanks very much. :-) There was also the no runtime function "sscanf" when using the standard SPRITE LOAD, though that error may apply to both SPRITE LOAD and SPRIT LOADBMP? it seems to be in the function mms_load? Attached is TSCP Chess, which I think should work with LOADBMP, along with the associated files. (i did have to make a change in the following code for the Peeks, which is untested) ' Select Case Peek(var m,2) ii=Peek(varaddr m) Select Case Peek(Byte ii+2) Case KT move_str$=move_str$+"N" Case BISHOP move_str$=move_str$+"B" Case ROOK move_str$=move_str$+"R" Case Else move_str$=move_str$+"Q" End Select Forget that I'm fairly sure that mod is working ok as the chess program works, the mod wasn't only used by the piece plotting. TSCPChess.zip Edited 2026-08-30 01:01 by Bleep |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
v0.25 is now posted https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.25 See the release notes for details Note: I'm assuming as we received approval from Tom Kerrigan it is OK to include the Basic version of the chess program in the release. Just happens to end up compiled rather than interpreted but the same engine. Edited 2026-08-30 04:01 by matherp |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 850 |
v25 is working well from my perspective, I have compiled the chess program which is working well, I haven't yet had a chance to investigate what you have done for the multiple sprite loading, but I will do. I was very impressed when the MMBasic version compiled & ran, with only a few modifications, mainly to do with variable declaration & data initialisation, petty much all the code logic worked first time. Regards Kevin |
||||
| okwatts Regular Member Joined: 27/09/2022 Location: CanadaPosts: 86 |
Hi Is anyone else getting panic's on booting. I have both Pico Computer 2 and 3 and have noted that on booting I occasionally get panic: Invalid Speed after the bootup notice and waiting for the login. This shows on the console while a reset shows again on the console the HDMI is often a blank screen. I have only a single Pico Computer 3 and thought this might be related to the USB issue Peter noted. However I just tried v.25 on a Pico Computer 2 and observed the same behaviour. It does eventually boot after a few tries and doing the fsck. I think it might be related to the USB keyboard since if I wait until I login on the console and then connect the USB keyboard it doesn't complain and seems to operate as normal. Just hoping to find out if is just me and my keyboard or is there a more common reason. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11815 |
I've found a possible problem deep in the TinyUSB code and will include a fix in the next release. In the meantime, please try a different power supply to the board. My suspicion is that when the hub switches power to the keyboard there is a temporary voltage sag which breaks the normal keyboard enumeration. This isn't handled properly by TinyUSB |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |