![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
Gerry There were multiple issues when the screen size doesn't exactly divide by the font size. e.g. 720x400 mode with font 1 (12 pixels high). I spent ages trying to fix this, particularly in the editor. I can't remember exactly why I commented out this section whether because it was part of the problem or just because I couldn't work out what it was for. Perhaps you could do some testing in 720x400 mode when you are at the bottom of the screen to see if it is safe to go back in. An example of the change code I added to fix the font issue is: if(CurrentY + gui_font_height >= (VRes/gui_font_height)*gui_font_height) { |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 966 |
Hi Peter, I don't have an environment to compile at the moment. I do see a problem with the 720*400 resolution when console scrolls at bottom, it does not scroll quite enough and top line is then below the top and bottom line is half off the screen. I simulated on the H7 with font 6 and think I have a fix. Could you compile a test HDMIVGA with fixes below. case '\b' as before , I don't think its a problem case '\n' New version which I think fixes the scrolling so it scrolls all the way to the top and bottom line is good. The char is printed at the current location defined by CurrentX and CurrentY *****************************************************************************************/ void DisplayPutC(char c) { if(!Option.DISPLAY_CONSOLE) return; // if it is printable and it is going to take us off the right hand end of the screen do a CRLF if(c >= FontTable[gui_font >> 4][2] && c < FontTable[gui_font >> 4][2] + FontTable[gui_font >> 4][3]) { if(CurrentX + gui_font_width > HRes) { DisplayPutC('\r'); DisplayPutC('\n'); } } // handle the standard control chars switch(c) { case '\b': CurrentX -= gui_font_width; // if (CurrentX < 0) CurrentX = 0; if(CurrentX < 0){ //Go to end of previous line CurrentY -= gui_font_height ; //Go up one line if (CurrentY < 0) CurrentY = 0; CurrentX = (Option.Width-1) * gui_font_width; //go to last character } return; case '\r': CurrentX = 0; return; case '\n': if(CurrentY + 2* gui_font_height >= VRes) { if(Option.NoScroll && Option.DISPLAY_CONSOLE){ClearScreen(gui_bcolour);CurrentX=0;CurrentY=0;} else { ScrollLCD( gui_font_height); } } else { CurrentY += gui_font_height; } return; /* case '\n': CurrentY += gui_font_height; if(CurrentY + gui_font_height >= (VRes/gui_font_height)*gui_font_height) { if(Option.NoScroll && Option.DISPLAY_CONSOLE){ClearScreen(gui_bcolour);CurrentX=0;CurrentY=0;} else { ScrollLCD(CurrentY + gui_font_height - VRes); CurrentY -= (CurrentY + gui_font_height - VRes); } } return; */ Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
PicoMiteHDMIUSBV6.00.02RC19.zip |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 213 |
@Peter: is in the current firmware (RC19) .zip file the PicoMiteHDMI Version missing or am I just blind? I can only find the HDMIUSB version .... thanks, Gerald 73 de OE1HGA, Gerald |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 384 |
I'm trying to enter a line in the editor longer than 40 characters while running RC19 but it shows Line too long in red at the bottom of the screen. I know lines can be up to 255 characters so I'd like to be able to edit the longer lines. Right now, a workaround for entering long lines is to type the last 40 characters then position cursor at the beginning of the line and start typing from the first 40 characters. I have an ILI9488 LCD display as my console and it's set for 320x320 resolution. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4245 |
Observation, in the latest firmware we can declare a variable called `out` but we cannot use it: > Dim out$(4) > out$(1) = "foo" Error : Missing Program statement That's a PIO error isn't it? EDIT: ... same for `in` too. That's a nuisance as they weren't unusual variable/parameter names in my code. Best wishes, Tom Edited 2025-05-02 03:58 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4245 |
... worse than I thought I use variables called `in` and `out` hundreds of times, I suppose it is too late for a reprieve ? Tom Edited 2025-05-02 04:05 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
The manual explains this and it isn't going to change. It is a limitation of the editor as written and now something that can be changed. The only version of MMbasic where this doesn't apply is the CMM2 which has oodles of memory and CPU to allow sideways scrolling Sorry, but they are PIO reserved command words and if the first things in a line are interpreted as commands. Workround DIM OUT$(4) LET OUT$(1)="foo" ? out$(1) Yes seems to have gone walk-about. I've updated the download Edited 2025-05-02 04:12 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4245 |
Given that there is code on FotS using OUT$ can I ask you to take one more moment to reconsider whether PioIn and PioOut might be more suitable names for these commands (I'm assuming they have been introduced relatively recently) ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
No: sorry. There is no point in having the firmware correctly use most of the PIO commands but then the user has to remember that some of them are different AND if they use the PIO ASSEMBLE syntax it will be back to being correct. And if I change them other programs will then break. Note, also that OUT specifically is used in other versions of BASIC as a command (QBasic) |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4815 |
Workaround did not work in a program in rc16. When you save the program, and load It back in the LET is gone. Maybe rc19 has this fixed. This accounts for (I may have missed 1), since 5.08.00 help -- from syntax help in ---- from PIO out --- from PIO map --- from mapping colors These keywords are often used in programs as variables, arrays or strings. In many cases a simple "find and replace" of out$ with th_out$ is sufficient to make the program run again. Of coarse, the other PIO keywords (wait, mov, set, jmp, irq) have the same, but I haven't seen these been used as variables yet. I have been checking a lot fo programs for compatibility with 6.00.02. Up to rc16. Volhout Edited 2025-05-02 05:18 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6212 |
Congratulations to Peter on his 10000th post As far as IN and OUT, A global search and replace in your favorite text editor will fix it. It might be feasible to have a OPTION PIO directive to allow PIO commands as variables when PIO is not in use but it is not something I would like. Jim VK7JH MMedit |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 966 |
Hi Peter, The scrolling in 720*400 is good with this now. The top is at top after it scrolls and bottom is where it should be. Could you compile a test HDMIVGA with fixes below. case '\b' as before , I don't think its a problem I was meaning as before as in RC18 for the case '\b' i.e. case '\b': CurrentX -= gui_font_width; // if (CurrentX < 0) CurrentX = 0; if(CurrentX < 0){ //Go to end of previous line CurrentY -= gui_font_height ; //Go up one line if (CurrentY < 0) CurrentY = 0; CurrentX = (Option.Width-1) * gui_font_width; //go to last character } return; If you can compile again with the original '\b' I will check it has no detrimental effects in editor or console for 720*400 and the long commands can be edited. Gerry P.S. I have managed to compile and do some tests for 720*400. The original '\b' code seems like it can go back in. Also when LIST or LIST ALL is used it wraps one character earlier than need. The altered line in red below will allow it to print the last character to match what you see in the editor. void MIPS16 ListProgram(unsigned char *p, int all) { char b[STRINGSIZE]; char *pp; int ListCnt = CurrentY/(FontTable[gui_font >> 4][1] * (gui_font & 0b1111)) + 2; while(!(*p == 0 || *p == 0xff)) { // normally a LIST ends at the break so this is a safety precaution if(*p == T_NEWLINE) { p = llist((unsigned char *)b, p); // otherwise expand the line if(!(ListCnt==CurrentY/(FontTable[gui_font >> 4][1] * (gui_font & 0b1111)) + 2 && b[0]=='\'' && b[1]=='#')){ pp = b; while(*pp) { if(MMCharPos > Option.Width) ListNewLine(&ListCnt, all); MMputchar(*pp++,0); } fflush(stdout); ListNewLine(&ListCnt, all); if(p[0] == 0 && p[1] == 0) break; // end of the listing ? } } } } This is another one taken out way back and we could not remember the reason. It was to allow OPTION DISPLAY without any parameters to set the terminal to match the display. This is done the first time EDIT is run in any case but this would allow it at start up without an EDIT command. I think the reason it was taken out was I had the wrong test and it did not do as intended.i.e. if(Option.DISPLAY_CONSOLE && argc>1 ) error("Cannot change LCD console"); which allowed it to try to change the display with Option.DISPLAY_CONSOLE set if one parameter was present. This is corrected now and would allow a program to set the terminal size at startup. Code from cmd_option tp = checkstring(cmdline, (unsigned char *)"DISPLAY"); /* if(tp) { getargs(&tp, 3, (unsigned char *)","); if(argc!=3)error("Syntax"); if(Option.DISPLAY_CONSOLE) error("Cannot change LCD console"); int Height = getint(argv[0], 5, 100); int Width = getint(argv[2], 37, 240); Option.Width=Width; Option.Height=Height; SaveOptions(); setterminal(Option.Height,Option.Width); return; } */ if(tp) { getargs(&tp, 3, (unsigned char *)","); if(Option.DISPLAY_CONSOLE && argc>0 ) error("Cannot change LCD console"); if(argc >= 1) Option.Height = getint(argv[0, 5, 100); if(argc == 3) Option.Width = getint(argv[2, 37, 240); if (Option.DISPLAY_CONSOLE) { setterminal((Option.Height > SCREENHEIGHT)?Option.Height:SCREENHEIGHT,(Option.Width > SCREENWIDTH)?Option.Width:SCREENWIDTH); // or height is > 24 }else{ setterminal(Option.Height,Option.Width); } if(argc >= 1 )SaveOptions(); //Only save if necessary return; } Edited 2025-05-02 16:26 by disco4now Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
Gerry This should have all your changes - thanks PicoMiteHDMIUSBV6.00.02RC19.zip |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 571 |
Can we have the Loaddata command from Cmm2 also for Picomite ? Plasma |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 966 |
This should have all your changes - thanks PicoMiteHDMIUSBV6.00.02RC19.zip All good except for OPTION DISPLAY (gives invalid option) I think this line is likely missing, it was not highlighted in red. tp = checkstring(cmdline, (unsigned char *)"DISPLAY"); Notes for next update: Fixes scrolling in the Console when VRES is not an exact multiple of Font Height. e.g when resolution is 720*400 OPTION DISPLAY with no parameters will resize the VT100 terminal to match current settings. Fix to LIST and LIST ALL to use full width of the console. Restores the ability to edit commands which have wrapped to the next line. Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10004 |
I've updated the RC19 download with various small fixes thanks to Gerry (disco4now) https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Fixes scrolling in the Console when VRES is not an exact multiple of Font Height. e.g when resolution is 720*400 OPTION DISPLAY with no parameters will resize the VT100 terminal to match current settings. Fix to LIST and LIST ALL to use full width of the console. Restores the ability to edit commands which have wrapped to the next line. |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |