![]() |
Forum Index : Microcontroller and PC projects : Picomite/PicoMiteVGA V5.07.05 release candidates
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 936 |
Thanks Peter! I have been able to restore "my default settings" with OPTION LCDPANEL CONSOLE 7. Unfortunately, I had not noted which options I had originally entered all... I continue to have no more keyboard problems. ![]() Frank |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
PS2 keyboard hardware check did not reveal any flaws. Checked the PS2 lines with Oscope to see glitches syncronous with audio or SD card. There was noise, glitches, but never close to threshold levels. In the num-lock response there was a difference in levels on the pico side (the PS2 side was 5V/0V). The pico side had Vh=3.3V/2.7V depending who was controlling the bus. But 2.7V is far above RP2040 logic high level (2.0V) so there should not be any problem. I however changed the pico side level shifters to 3.3k, (the Vh is 3.3V/3.1V now). Again not a problem, and I could not see any difference in PS2 performance. Trying the RC7 code now, until this moment it is running without problems. I will see the rest of the day. Noted one thing: in EDIT mode, neither CAPS lock nor NUM lock work. May have been there for ages, just stumbled upon it now. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
@Peter, We had a discussion before about stopping a program with CTRL-C, where not all flags where restored to their original state (i.e. OPTION EXPLICIT). Is there a command in MMBasic that does restore all settings to default ? I know EDIT restores many things, but not all. Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
That would be NEW wouldn't it ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Hi Tom, No, not really. NEW doesn't do the full cleanup. Tried that. I PM'ed Peter. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
CPU RESTART? Otherwise if you diagnose what isn't cleaned up and provide a SIMPLE diagnostic I can fix it Edited 2022-10-10 21:19 by matherp |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 971 |
What about CPU RESTART Latest F4 Latest H7 FotS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Hi All, thank you for suggesting... CPU RESTART does not clean everything up, tried that ... NEW does not clean everything up, tried that ... EDIT does not clean everything, tried that ... Up to now only power cycle does clean everything up. @Peter, Gave you a simple method to show. Though both programs involved are large. Do you need me to strip the programs to their bare minimum ? Or can you draw conclusion from this set ? Volhout Edited 2022-10-10 21:37 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
All I would do is slowly strip stuff out of the first program until I find what is causing the problem - something easier for you as you know the code |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Peter, I found where it happens.... In the program A in the ZIP there is a line that says: If SND% Then SetTick 23, music,4) With this, the program runs perfectly, but will not leave a clean start with CPU RESTART When I alter the code to the correct syntax (remove the closing bracket) If SND% Then SetTick 23, music,4 The picomite will restore a clean start with CPU RESTART It will not have a clean start with NEW. I am not sure what happens in the catacombs of MMBasic, but it looks like something is left open during the reboot CPU RESTART action (or stack is corrupted ?). Edited 2022-10-11 01:38 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
I've spent some time on this but getting nowhere. The problem seems to occur after loading the first program without even running it so it looks like it is overflowing some data structure. Please confirm that you see the problem with just "load fname$" without running it. If you can replicate then someone will need to go though it until they find what causes the problem Edited 2022-10-11 04:49 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Wauw, Did not see that comming. I confirm after loading the program A (without running it) the situation is established. I can load the chess program, but it does not run. Is it the size of the program ? (37.3kbyte) ? Are you doing some pre-processing that causes this ? I went through the whole program to check for syntax issues (there where many brackets (vars) missing in function calls and function definitions, but these do not seem to matter much. Nasty issue.... If there is anything I can help with, tell me.. Edited 2022-10-11 05:06 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Peter, To make any effort I do usefull, can you elaborate a bit on what I should look for ? What happens a LOAD ? a/ Do you simply copy the file into SPI flash ? If that is the case then I should look for NON-ASCII codes, and file size. b/ Do you pre-parse some of the code ? (tokenise) In that case I could look at variables that could be interpreted as commands Maybe even that there are too many DATA statements. c/ Do you build link tables at load Are there too many of a/functions b/subs c/labels And are all closed correctly, and if exit'ed, are they correctly exit'ed/ d/ put fast code into RAM ? Maybe Setticks ? I could use some guidance what to look for. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
Can't do anything for the next three days. However I suspect it is their use of font 8. Please change font 8 in their code to font 9 and see if it makes a difference |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Font 9 is an invalid font. When I run picochess with the default font, it runs correctly. When I run picochess with font 8 the problem shows. Also: Load program A, Load picochess with default font When I run picochess with he default font, it runs, then I stop the program. Edit the program to use font 8 Then restart the program.... funny things happen. So loading program A leaves something behind that the normal font can survive, but font 8 cannot. Not even after a successful run with normal font. Regards, Volhout Edited 2022-10-11 20:18 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
You need to change the #define |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
@Peter, !!!! YES !!!! That solves it. When in program A font 9 is used, it can cleanly be stopped and chess can be played. Both programs use font 8, but program A changes font 8. Thanks, Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
Program a is overwriting an in-built font which is bad practice It also has the #define in a subroutine which is meaningless as #define is actioned at load time and ignored when the subroutine is called at runtime |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
From the manuals: Under DEFINTFONT Under Graphics commands and functions. Is it OK if the new font #8 has the same number of characters as the built-in or is any substitute bad? Either way, the manual needs attention. Jim VK7JH MMedit |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10065 |
Anything is OK if you understand what you are doing. In this case a program from author A used a built-in font slot for a user font. But author B expected to use the built-in font. For various reasons no version of MMBasic resets the font pointers other than after a reset. If you run the same program repeatedly this is no issue but if you instead you run a program that expects the defaults then there can be problems. Edited 2022-10-12 05:54 by matherp |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |