Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:26 27 Nov 2024 Privacy Policy
Jump to

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: Netherlands
Posts: 4238
Posted: 11:06am 08 Dec 2023
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 9120
Posted: 11:21am 08 Dec 2023
Copy link to clipboard 
Print this post

Thanks - found and fixed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 11:43am 08 Dec 2023
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 9120
Posted: 02:12pm 08 Dec 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 172
Posted: 04:46pm 08 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  With V5.08.00b4 my MQTT application was running rather reliably over days; with V5.08.00b4 I get random errors, such as:


Please could you try the attached. I made some changes to try and improve stability in b4 but the fact it made it worse has given me a clue as to what the problem was. I hope this improves it


Thanks, Peter. Testing now ...
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 05:14pm 08 Dec 2023
Copy link to clipboard 
Print this post

  Volhout said  

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"
 then they will be recognized as a string
Edited 2023-12-09 03:15 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9120
Posted: 05:33pm 08 Dec 2023
Copy link to clipboard 
Print this post

  Quote  put the Data in Quotes


Not the issue - see my post. Quotes not needed as assigning to a string variable
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:11pm 08 Dec 2023
Copy link to clipboard 
Print this post

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

  Quote  Shift operators:
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: Germany
Posts: 172
Posted: 09:15am 09 Dec 2023
Copy link to clipboard 
Print this post

  karlelch said  Please could you try the attached. I made some changes to try and improve stability in b4 but the fact it made it worse has given me a clue as to what the problem was. I hope this improves it

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: Canada
Posts: 1109
Posted: 06:41pm 11 Dec 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 9120
Posted: 07:32pm 11 Dec 2023
Copy link to clipboard 
Print this post

Sounds like you need to auto adjust your screen
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1109
Posted: 07:49pm 11 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  Sounds like you need to auto adjust your screen

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 Kingdom
Posts: 9120
Posted: 08:03pm 11 Dec 2023
Copy link to clipboard 
Print this post

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: Canada
Posts: 1109
Posted: 12:07am 12 Dec 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 6797
Posted: 07:46am 12 Dec 2023
Copy link to clipboard 
Print this post

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: Australia
Posts: 2135
Posted: 11:23am 12 Dec 2023
Copy link to clipboard 
Print this post

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: Germany
Posts: 68
Posted: 11:32am 12 Dec 2023
Copy link to clipboard 
Print this post

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: Australia
Posts: 2135
Posted: 11:49am 12 Dec 2023
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 4040
Posted: 12:22pm 12 Dec 2023
Copy link to clipboard 
Print this post

  phil99 said  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.


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 Kingdom
Posts: 4040
Posted: 09:21am 14 Dec 2023
Copy link to clipboard 
Print this post

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
© JAQ Software 2024