Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:28 01 May 2025 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 : Y-Axis Flipped in PicoMite

Author Message
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 382
Posted: 10:36am 28 Apr 2025
Copy link to clipboard 
Print this post

In MMBasic, the Y-Axis is reversed from the usual orientation so that y=0 is the top of the screen.

In some variants of MMBasic, there's a OPTION Y_AXIS UP command that flips the Y-Axis so it follows the usual Cartesian coordinate system.

PicoMite doesn't have this option. Is there any chance of getting it in a future release?
Edited 2025-04-28 20:37 by toml_12953
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9992
Posted: 10:47am 28 Apr 2025
Copy link to clipboard 
Print this post

The only version with that option is the CMM2 and that was done specifically at the request of a teacher for use in school. All other versions of MMBasic behave like the PicoMite as do historical versions of Basic like BBC Basic. It adds significant complexity so the answer is no.
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2389
Posted: 09:47pm 28 Apr 2025
Copy link to clipboard 
Print this post

y0=screen height-1
Edited 2025-04-29 07:48 by stanleyella
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2407
Posted: 10:27pm 28 Apr 2025
Copy link to clipboard 
Print this post

If writing to the screen from an array MATH WINDOW can be used to both scale the data to fit the desired display area and invert it so 0 is at the bottom.
  Manual said  This command can massively simplify scaling data for plotting etc.

Edited 2025-04-29 08:32 by phil99
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2137
Posted: 08:20am 29 Apr 2025
Copy link to clipboard 
Print this post

This solves your problem, adds very little time-wise in the drawing etc and harks back to the screens of the 80s & 90s

I use it all the time as it is just more logical for my old brain

they co-habit very nicely with the existing graphic commands and i generally inter-mingle them as I see fit, so I end up with "sensible"-looking stuff like this (which makes much sense to my addled gourd):


Sub ButtonDown(x As Integer,y As Integer,w As Integer,h As Integer,t$,col As Integer)
 Move x+(w/2)-MM.FONTWIDTH*(Len(t$)/2),y+(h/2)+MM.FONTHEIGHT/2
 Colour col,cGy
 Text Gx,Gy,t$
 Move x,y
 DrawR 0,h:DrawR w,0
 Colour &hffffff
 DrawR 0,-h:DrawR -w,0
End Sub

h
Edited 2025-04-29 18:47 by CaptainBoing
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2025