icoon ,
@icoon@mastodon.sdf.org avatar

Qiuck question: usually the tiltscreen option is set in the plan9.ini in the 9fat partition. On the raspberry pi editing plan9.ini seems to have no effect, actually it appears to be generated at startup. Where can I set the tiltscreen option then?

bubstance ,
@bubstance@hj.9fs.net avatar

@icoon Pretty sure you edit cmdline.txt on a Pi.

icoon OP ,
@icoon@mastodon.sdf.org avatar

@bubstance thanks I’ll give it a try!

icoon OP ,
@icoon@mastodon.sdf.org avatar

@bubstance didn’t seam to work. Also setting bootargs has nocrffect. Tried cmdline.txt and config.txt 🤔

mcz ,
@mcz@mastodon.sdf.org avatar

@icoon @bubstance It's definitely cmdline.txt. Are all the options in one line? They should be

icoon OP ,
@icoon@mastodon.sdf.org avatar

@mcz @bubstance yes all in one line and a carriage return at the end. I also added nobootprompt and user, which work well! Maybe tiltscreen is not supposed on the rpi 🤔 I’m on a 3B

thedaemon ,
@thedaemon@hj.9fs.net avatar

I can try my 3B perhaps. I'd have to hook up a monitor to it.

CC: @mcz @bubstance

cinap_lenrek ,
@cinap_lenrek@hj.9fs.net avatar

no. screen tilting is implemented only by devvga, which the pi kernel lacks.

CC: @mcz @bubstance

cinap_lenrek ,
@cinap_lenrek@hj.9fs.net avatar

actually, implementing it is not too hard.

take a look at pc/screen.c.

essentially, tilting works by having gscreen being a shadow framebuffer (softscreen)
with the rotated/tilted dimension.

and flushmemscreen() copies changed rectangle from gscreen in tilted
coordinates into the real framebuffer.

one also needs to tilt also the mouse coordinates and the mouse cursor bitmap
in cursoron().

the tilting codes are as follows:

0 = none,
1 = left,
2 = inverted,
3 = right,

note that negating a tilt code yields the inverse operation so when you apply -tilt code
to tiltpt()/tiltrect() on transformed coordinates to get the original back.

-0 & 3 = 0 none
-1 & 3 = 3 right
-2 & 3 = 2 inverted
-3 & 3 = 1 left

CC: @icoon @mcz @bubstance

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines