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/VGA/Web V5.08.00: back to betas
Page 4 of 7 | |||||
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
@Peter, Geoff has a version of Tetris (Blocks) for picomite on his website. When using this program on 50800b4 the first screen does not show the green background (only under the text). There is a definition Const BackColour = &h4000 COLOUR RGB(white),BackCOlour And in the DrawScreen routine there is a CLS. But this CLS does not use the background colour defined in COLOUR. When I replace CLS with CLS BackColour then it works. But apparently in earlier versions (50704) CLS used the colour defined in COLOUR. Volhout P.S. could not find it on his website anymore. If you need it Blocks.zip Edited 2023-12-08 21:16 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
Thanks - found and fixed |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4238 |
@Peter, This one I am nor sure about. Please reject if nonsense. It is an earlier version of my SNAKE game. It reads data statements to build sprite files. s7.zip The "read a$" errors NO DATA FOUND. When I preceed the routine with a RESTORE it still does not work. When I preceed the routine with a "RESTORE label", and put a "label:" before the data statements it works. Not a big change, but I am uncertain why this change is needed. The DATA statements are the only data statements in the program. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
That's a really good one. The PICOMITEVGA version uses all 127 command slots and the last command is SPRITE which has the token 255. The READ command looks for a 0xFF as one of the terminators to say it has reached the end of the program so it sees the SPRITE token and thinks it has reached the end of the program. You can put the data statements anywhere before the first SPRITE command and it works as expected. The findlabel function (as used in RESTORE label) establishes the end of program in a different way and is thus immune from the issue. I'll try and recode READ to work like findlabel |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Thanks, Peter. Testing now ... |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
s7.zip The "read a$" errors NO DATA FOUND. When I preceed the routine with a RESTORE it still does not work. When I preceed the routine with a "RESTORE label", and put a "label:" before the data statements it works. Not a big change, but I am uncertain why this change is needed. The DATA statements are the only data statements in the program. put the Data in Quotes Data "00EEEE00","0EECCEE0","EEECCEEE","ECCECCCE","ECCCECCE","EEECCEEE","0EECCEE0","00EEEE00" Data "00EEEEE0","0E77CCEE","47177CCE","4477CCCC","4477CCCC","47177CCE","0E77CCEE","00EEEEE0" Data "00444400","0E7447E0","E717717E","E777777E","EC7CC7CE","ECCCCCCE","EECCCCEE","0EECCEE0" Data "00009900","00229000","02AAA220","2AAA2AA2","2AAAAAA2","2AAAAAA2","02AAAA20","0028A200" Data "000000E0","000000E0","00000666","00006666","00066E60","00666600","E66E6000","06600000" Data "00009000","00009000","04444440","44444444","44444444","44444444","04444440","00444400" Data "00EEEE00","0ECCCCE0","EC7CCCCC","ECCCCCCC","ECCCCCCC","ECCCCCCC","0ECCCCC0","00CCCC00" Data "A002020A","0A020A02","020A0202","00202002","202A2020","0A02A020","0022A200","000AAA00" Edited 2023-12-09 03:15 by Martin H. 'no comment |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
Not the issue - see my post. Quotes not needed as assigning to a string variable |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
There seems to be a discrepancy between the manual and function of ">>". "<<" is as per the manual. > m=2^64 - 1 > ? bin$(m,64) 1111111111111111111111111111111111111111111111111111111111111111 > ? bin$(m>>16,64) 0000000000000000111111111111111111111111111111111111111111111111 x << y x >> y These operate in a special way. << means that the value returned will be the value of x shifted by y bits to the left while >> means the same only right shifted. They are integer functions and any bits shifted off are discarded. For a right shift any bits introduced are set to the value of the top bit (bit 63). For a left shift any bits introduced are set to zero. Edit CMM2 manual says it uses ">>>" for what the F4 and Pico manuals describe and ">>" for what the F4 and Pico do. Perhaps this should be on the Manual Issues thread. Edited 2023-12-09 15:01 by phil99 |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Thanks for all your efforts, Peter! I tested the new beta (5.08.00b5), but, unfortunately, the stability has not improved. It may have even gotton worse. Random errors, as if the code in the flash was getting corrupted. If I load the program from A: again, it works for a minute or so. Best Thomas |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Maybe just an anomaly to be lived with: > list MODE 2 For i = 1 To 30 : Print i : Next End > ? mm.info(version) 5.0708 > option list PicoMiteVGA MMBasic Version 5.07.08RC21 OPTION SYSTEM I2C GP0,GP1 OPTION KEYBOARD US OPTION CPUSPEED (KHz) 252000 OPTION DISPLAY 20, 40 Run the program on a PicoMiteVGA. Observe the prompt and cursor at the bottom of the screen afterwards. The bottom line is part way off the screen. Type something such as "print 1234" to see this more clearly. ("Option Display 20,40" is presumably a result of still being in mode 2 when I typed "option list".) Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
Sounds like you need to auto adjust your screen |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
No, pixels are actually missing. At least 2 rows. They are still missing when the screen scrolls up. Edit: I see 3 missing rows, although the cursor is shifted up into view. Edited 2023-12-12 05:53 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
No they aren't - missed the cursor but it was there. Are you using a VGA to HDMI or something? Edited 2023-12-12 06:04 by matherp |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Yes, they are. (Direct VGA, fwiw.) I haven't changed the default font size - so font #1 (?) is partially cut off. In your image, the greater than sign (prompt at the bottom) appears to be the same size as the rest of the text. When I draw "box 0,0,320,240", the entire box appears on screen. Visit Vegipete's *Mite Library for cool programs. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6797 |
That looks wrong. Compare the size of the two "4" characters. The one at the bottom is bigger than the one at the top. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Mick is on to something. When the program ends it returns to the command line with a bigger font. Too big for the bottom line so it gets clipped. Zooming the image, in the program the characters appear to be 8 pixels high then switch to 11 after it ends. |
||||
PilotPirx Regular Member Joined: 03/11/2020 Location: GermanyPosts: 68 |
Hi, great work! But do you have a description of the new features and commands? You used the command read_inkey$() in actual software for example, but there is no description. As a beginner, i'm a bit puzzled about the new features. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
read_inkey$() looks like the name of a subroutine or user defined function rather than a command. Edit Found a function that uses that function. It will be somewhere in the PETSCII ROBOTS program. Function read_input$() Static last$ read_input$ = READ_INKEY$() If Len(read_input$) Then Exit Function read_input$ = Call(CTRL_DRIVER$) ' Suppress auto-repeat except for movement. If last$ = read_input$ Then If Not InStr("up,down,left,right", last$) Then read_input$ = "" Exit Function EndIf Else last$ = read_input$ EndIf End Function Edited 2023-12-12 22:01 by phil99 |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Edit Found a function that uses that function. It will be somewhere in the PETSCII ROBOTS program. Yup in PETSCII Robots, read_inkey$() is a user SUB that calls INKEY$ and converts the value of the read key into one of its standard actions, e.g. "up" or "fire-right". Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Peter, Is there any possibility of putting Draw3D on the PicoMite, even if it has to be as a sub-command of something else ? EDIT: ... or perhaps comment on its suitability to be converted into one or more CSUBs ? Best wishes, Tom Edited 2023-12-14 19:33 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Page 4 of 7 |
Print this page |