fruit-bat / pico-zxspectrum

ZX Spectrum for Raspberry Pico Pi RP2040
453 stars 48 forks source link

mirrored text on lcd #115

Open aadhyatmik opened 5 months ago

aadhyatmik commented 5 months ago

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

fruit-bat commented 5 months ago

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 commented 5 months ago

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

aadhyatmik commented 5 months ago

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.

fruit-bat commented 5 months ago

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

aadhyatmik commented 5 months ago

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

fruit-bat commented 5 months ago

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

ZxSpectrumPicomputerZxLcd.uf2.zip

NB you need to unzip the uf2

aadhyatmik commented 5 months ago

Unfortunately that makes it behave more erratic.

IMG_20240204_013415

fruit-bat commented 5 months ago

0x30

ZxSpectrumPicomputerZxLcd.uf2.zip

aadhyatmik commented 5 months ago

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

IMG_20240204_014518

aadhyatmik commented 5 months ago

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

fruit-bat commented 5 months ago

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

What does this one look like?

ZxSpectrumPicomputerZxLcd.uf2.zip

aadhyatmik commented 5 months ago

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 commented 5 months ago

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

fruit-bat commented 5 months ago

This swaps the red and blue components...

ZxSpectrumPicomputerZxLcd.uf2.zip

Hopefully, that should do it :-)

aadhyatmik commented 5 months ago

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

aadhyatmik commented 5 months ago

Here is the picture IMG_20240204_064159

aadhyatmik commented 5 months ago

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.

fruit-bat commented 5 months ago

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

aadhyatmik commented 5 months ago

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