abelykh0 / esp32-bkEmu

BK-0010 Emulator on ESP32 VGA32 board
MIT License
10 stars 0 forks source link

Вывод картинки-подсказки по F1 #6

Closed vitasam closed 2 years ago

vitasam commented 2 years ago

Здравствуйте! А слишком сложно вывести картинку (размером с экран БК) с подсказкой раскладки кнопок клавиатуры БК на клавишах PC?

Нажатие F1, к примеру

abelykh0 commented 2 years ago

Можно сделать. Но нужно нарисовать картинку 512x256 черно-белую или 256х256 цветную (4х-цветную, можно выбрать любые 4 цвета). У меня есть похожая функция в Spectrum эмуляторе https://github.com/abelykh0/esp32-z80emu.

vitasam commented 2 years ago

Я попробую сделать два варианта подсказки тогда, если получится, выложу пулл-реквестом в /docs. Какой формат - .bmp?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Andrey Belykh @.> Sent: Sunday, January 30, 2022 5:15:03 PM To: abelykh0/esp32-bkEmu @.> Cc: vitasam @.>; Author @.> Subject: Re: [abelykh0/esp32-bkEmu] Вывод картинки-подсказки по F1 (Issue #6)

Можно сделать. Но нужно нарисовать картинку 512x256 черно-белую или 256х256 цветную (можно даже больше чем 4х цветную). У меня есть похожая функция в Spectrum эмуляторе https://github.com/abelykh0/esp32-z80emu.

— Reply to this email directly, view it on GitHubhttps://github.com/abelykh0/esp32-bkEmu/issues/6#issuecomment-1025164508, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKWSQLN4ZGCFXZBOUT67YLUYVIXPANCNFSM5ND7TFWQ. You are receiving this because you authored the thread.Message ID: @.***>

abelykh0 commented 2 years ago

bmp подойдет, я переведу в биты.

vitasam commented 2 years ago

Добавил монохромный 512х256, для пробы. Кстати, может есть смысл большие бинарники (png, bmp) положить в GIT LFS?

abelykh0 commented 2 years ago

OK, added in https://github.com/abelykh0/esp32-bkEmu/commit/b8003d4fc3c289d3f660f5e99cd44a8005a273c6. If you have time, please add more to it (see https://raw.githubusercontent.com/abelykh0/esp32-bkEmu/main/doc/flat_keyboard.png)

vitasam commented 2 years ago

Thanks, it looks just great! 20220201_182427

I will try to update the .BMP. Is there any ready-to-use tool to convert it into .h?

abelykh0 commented 2 years ago

I used this one https://lvgl.io/tools/imageconverter Color format: Indexed 2 colors Options: Output in big-endian format

However, the colors are inverse.

There's probably more like this.

vitasam commented 2 years ago

Thanks! I will take a look

vitasam commented 2 years ago

There is something wrong with a bit order after converting the .BMP in to header file - the help screenshot is corrupted. So attaching the new .BMP here kbd_layout_1.zip

vitasam commented 2 years ago

I just found quite useful script to convert BMP in to headers: https://github.com/robertgallup/python-bmp2hex So, I managed to create a new help screen, new pull request is coming