pico-zxspectrum icon indicating copy to clipboard operation
pico-zxspectrum copied to clipboard

mirrored text on lcd

Open aadhyatmik opened this issue 1 year ago • 19 comments

Great project, kudos to you, when I tried to assemble on a zero pcb to test, I get mirrored text on lcd, using zxspectrumpicomputerzxlcd uf2 file gp2-gp6 for ili9341 lcd and gp19-gp13 for sdmicro. Someone please suggest a fix. IMG_20240203_230648

aadhyatmik avatar Feb 03 '24 17:02 aadhyatmik

That will be because the driver is for a st7789.

A tweak to the MADCTL (Memory Access Control 0x36) register will probably sort the rotation. Possibly 0x47 or 0x87.

Fixing the colours may be more involved... but interesting to try!

ILI9341_DS_V1.10_20110415.pdf

See: https://github.com/fruit-bat/pico-zxspectrum/blob/main/src/picomputer/picomputer_st7789/st7789_lcd.cpp

You in a position to build the firmware?

fruit-bat avatar Feb 03 '24 19:02 fruit-bat

Looks like blue and red are swapped. That what you think?

fruit-bat avatar Feb 03 '24 19:02 fruit-bat

Thanks for your reply, I have never built, however i have picosdk installed, will surely try, kindly guide me stepwise.

I think I need to replace tinyusb then tweak madctl value ( kindly suggest filename), then execute cmake command in build folder then execute make command.

aadhyatmik avatar Feb 03 '24 19:02 aadhyatmik

Yup, I can have a go for you if you like... give me a few minutes....

fruit-bat avatar Feb 03 '24 19:02 fruit-bat

Unfortunately I am not good at recognising colours, it seems a washed out to me. Will see once it's working.

aadhyatmik avatar Feb 03 '24 19:02 aadhyatmik

This is 0x10, so we know for the next try.

ZxSpectrumPicomputerZxLcd.uf2.zip

NB you need to unzip the uf2

fruit-bat avatar Feb 03 '24 19:02 fruit-bat

Unfortunately that makes it behave more erratic.

IMG_20240204_013415

aadhyatmik avatar Feb 03 '24 20:02 aadhyatmik

X30 seems good, attached picture for reference, colours also look right to me ;-)

IMG_20240204_014518

aadhyatmik avatar Feb 03 '24 20:02 aadhyatmik

Thank you very much, I need some more time to test usb keyboard etc. I am preparing this for my daughter, she love programming. 🙏

aadhyatmik avatar Feb 03 '24 20:02 aadhyatmik

Colours look inverted (or wrong in some other way_ to me...

What does this one look like?

ZxSpectrumPicomputerZxLcd.uf2.zip

fruit-bat avatar Feb 03 '24 20:02 fruit-bat

X30 looked better to me, stripes on logo in front of this are blue cyan green yellow, previous one (X30) contains yellow red pink blue.

IMG_20240204_020505

aadhyatmik avatar Feb 03 '24 20:02 aadhyatmik

Kindly tell me when you are done, will close it.

aadhyatmik avatar Feb 03 '24 20:02 aadhyatmik

This swaps the red and blue components...

ZxSpectrumPicomputerZxLcd.uf2.zip

Hopefully, that should do it :-)

fruit-bat avatar Feb 03 '24 21:02 fruit-bat

Sorry for delay, this one I think matches with the logo, colours are red, yellow, green and cyan.

aadhyatmik avatar Feb 04 '24 01:02 aadhyatmik

Here is the picture IMG_20240204_064159

aadhyatmik avatar Feb 04 '24 01:02 aadhyatmik

On testing keyboard it is working but I was not able to type " or : and few other keys , tried 2 different keyboards, one dell wired keyboard and one portronics hydra in wired configuration, it seems a layout issue may be. Seems need to read manual.

aadhyatmik avatar Feb 04 '24 05:02 aadhyatmik

The keys on the USB keyboard map 'literally' to the spectrum keys. Alt-gr (on the right) is symbol shift.

fruit-bat avatar Feb 04 '24 08:02 fruit-bat

Thanks will try alt-gr tonight, never owned a spectrum or any 8 bit computer, so missed that. 🙏

aadhyatmik avatar Feb 04 '24 08:02 aadhyatmik