Open nickgoodmanuk opened 3 years ago
I've had a quick look at the code and it looks like 4 more GPIO pins were added to the project quite recently : 2,3,9 and 10 so I assume these are save to use?
From menu_gpio.c :
int custom_gpio_pins[NUM_GPIO_PINS] = { 5, 20, 19, 16, 13, 6, 12, 26, 8, 25, 24, 18, 23, 27, 17, 22, 4, 7, 21, 2, 3, 9, 10 };
and from vicapp.cpp :
gpioPins[NO_FIXED_PURPOSE_1_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_2_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_3_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_4_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
The 5 extra pins on the 128 connector are as follows, I think we only need 4 by losing the 40/80 :
21-23 are extra matrix rows so will be needed. 24 is 40/80 - I think we could lose this one as its a bmc menu function. 25 - Caps / Ascii Lock.
I do not know where the code is that maps the GPIO inputs to the keyboard though. Any ideas appreciated.
One thing I've noticed, and probably should of tried first is that using a normal USB keyboard none of the extra (C128) keys are working or mapped, (like they are in winvice). I guess this needs addressing first.
The symbolic keyboard layout in C128 on BMC seems to be a direct copy of the C64 one. In winvice there are extra entries :
Y, this can probably be done by adding 4 more I/O pins to the keyboard scan routine like you've outlined above. They should be 'fixed' like the existing C64 matrix and if you use the recently added GPIO's it should not conflict with anything (hopefully). It should be done only when the emulator is built as C128 (#if defined(RASPI_C128)).
It's been a while but if I recall correctly, the GPIO scanner ultimately maps the matrix to a key code and as long as you have a keycode mapped in the .vkm file, it should press/release the key. Keycodes are defined in keycodes.h
On Wed, Nov 10, 2021 at 6:02 AM Nick Goodman @.***> wrote:
I've had a quick look at the code and it looks like 4 more GPIO pins were added to the project quite recently : 2,3,9 and 10 so I assume these are save to use?
From menu_gpio.c :
int custom_gpio_pins[NUM_GPIO_PINS] = { 5, 20, 19, 16, 13, 6, 12, 26, 8, 25, 24, 18, 23, 27, 17, 22, 4, 7, 21, 2, 3, 9, 10 };
and from vicapp.cpp :
gpioPins[NO_FIXED_PURPOSE_1_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_2_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_3_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_4_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
The 5 extra pins on the 128 connector are as follows, I think we only need 4 by losing the 40/80 :
21-23 are extra matrix rows so will be needed. 24 is 40/80 - I think we could lose this one as its a bmc menu function. 25 - Caps / Ascii Lock.
I do not know where the code is that maps the GPIO inputs to the keyboard though. Any ideas appreciated.
[image: c128 keyboard] https://user-images.githubusercontent.com/79846351/141100072-f6f5877f-9acf-4976-b505-4319829755d5.gif
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-965019957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKCDDJ25CBVFGBBJ3D3ULJGLVANCNFSM5HV25YXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Randy Rossi
Thankyou so much... I'll have a look at the code and come up with the changes I think I will need. I'm not entirely sure how to build the project to get a new test Kernal but one thing at a time ;)
i started changing the code in viceapp.h:
under this :
added this :
and changed in viceapp.cpp:
// Connector Pin 21 - PA8 gpioPins[GPIO_KBD_C128_21_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 22 - PA9 gpioPins[GPIO_KBD_C128_22_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 23 - PA10 gpioPins[GPIO_KBD_C128_23_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 25 - Caps Lock gpioPins[GPIO_KBD_C128_25_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
gpioPins[NO_FIXED_PURPOSE_1_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_2_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_3_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_4_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
but then realised this code is redundant as its doing the same either way!
I will connect the C128 keyboard pins to these :
21 - GPIO 2 22 - GPIO 3 23 - GPIO 9
to match this from winVice vkm.
I think in theory this should just work once mapped in the vkm? or am I mistaken?. Will try anyway.
I also want to map CAPS LOCK (C128 kbd pin 25) to GPIO 10, I think this should work as well but I do not know
and finally maybe 40/80 (C128 kbd pin 24) to GPIO 11, although GPIO 11 isn't mentioned in the code I found accept here :
// 02 I2C (Currently unused by BMC64) // 03 I2C (Currently unused by BMC64) // // 10 SPI (Currently unused by BMC64) // 09 SPI (Currently unused by BMC64) // 11 SPI (Currently unused by BMC64)
Anyone know how I go about finding out what GPIO 11s location ref is ?
https://cdn.sparkfun.com/assets/learn_tutorials/4/2/4/header_pinout.jpg
On Wed, Nov 10, 2021 at 1:32 PM Nick Goodman @.***> wrote:
i started changing the code in viceapp.h:
under this :
define NO_FIXED_PURPOSE_1_INDEX 19 // GPIO 2
define NO_FIXED_PURPOSE_2_INDEX 20 // GPIO 3
define NO_FIXED_PURPOSE_3_INDEX 21 // GPIO 9
define NO_FIXED_PURPOSE_4_INDEX 22 // GPIO 10
added this :
define GPIO_KBD_C128_21_INDEX 19 // GPIO 2
define GPIO_KBD_C128_22_INDEX 20 // GPIO 3
define GPIO_KBD_C128_23_INDEX 21 // GPIO 9
define GPIO_KBD_C128_25_INDEX 22 // GPIO 10
and changed in viceapp.cpp:
if defined(RASPI_C128)
// Connector Pin 21 - PA8 gpioPins[GPIO_KBD_C128_21_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 22 - PA9 gpioPins[GPIO_KBD_C128_22_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 23 - PA10 gpioPins[GPIO_KBD_C128_23_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); // Connector Pin 25 - Caps Lock gpioPins[GPIO_KBD_C128_25_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
else
gpioPins[NO_FIXED_PURPOSE_1_INDEX] = new CGPIOPin(2, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_2_INDEX] = new CGPIOPin(3, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_3_INDEX] = new CGPIOPin(9, GPIOModeInputPullUp, &mGPIOManager); gpioPins[NO_FIXED_PURPOSE_4_INDEX] = new CGPIOPin(10, GPIOModeInputPullUp, &mGPIOManager);
endif
but then realised this code is redundant as its doing the same either way!
I will connect the C128 keyboard pins to these :
21 - GPIO 2 22 - GPIO 3 23 - GPIO 9
to match this from winVice vkm. |Bit 8 |HELP | KP 8| KP 5| TAB | KP 2| KP 4| KP 7| KP 1| +------+-----+-----+-----+-----+-----+-----+-----+-----+ |Bit 9 | ESC | KP +| KP -| LF |KP CR| KP 6| KP 9| KP 3| +------+-----+-----+-----+-----+-----+-----+-----+-----+ |Bit 10| ALT | KP 0| KP .|A.UP |A.DWN|A.LFT|A.RGT|NOSCR|
I think in theory this should just work once mapped in the vkm? or am I mistaken?. Will try anyway.
I also want to map CAPS LOCK (C128 kbd pin 25) to GPIO 10, I think this should work as well but I do not know
and finally maybe 40/80 (C128 kbd pin 24) to GPIO 11, although GPIO 11 isn't mentioned in the code I found accept here :
// 02 I2C (Currently unused by BMC64) // 03 I2C (Currently unused by BMC64) // // 10 SPI (Currently unused by BMC64) // 09 SPI (Currently unused by BMC64) // 11 SPI (Currently unused by BMC64)
Anyone know how I go about finding out what GPIO 11s location ref is ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-965625969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKHIWKFIR6IRIXJKLSTULK3ENANCNFSM5HV25YXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Randy Rossi
Thanks, I was not after the physical pin number though, think I got confused with the GPIO indexing in the code:
For example in viceapp.h :
// GPIO JSFUNC KEYFUNC KEYCON gpioPins Index
//
// 04 RESTORE KDB3 16
Restore is GPIO 04 which is pin 7 but the code above has a gpioPins Index of 16.
I've since realised this is of course from here : menu_gpio.c
int custom_gpio_pins[NUM_GPIO_PINS] = { 5, 20, 19, 16, 13, 6, 12, 26, 8, 25, 24, 18, 23, 27, 17, 22, 4, 7, 21, 2, 3, 9, 10 };
0- 5 1- 20 2- 19 3- 16 4- 13 5- 6 6- 12 7- 26 8- 8 9- 25 10- 24 11- 18 12- 23 13- 27 14- 17 15- 22 16- 4 17- 7 18- 21 19- 2 20- 3 21- 9 22- 10
@randyrossi
Me again !
So I think the only change I need to try is to add a specific 128 keyboard matrix to kernal.cpp which I've coded below, its the standard one with the extra keys matrix.
this goes between #if defined(RASPI_PLUS4) | defined(RASPI_PLUS4EMU) and the #else for all other keyboards.
Unfortunately I have no idea how to build a test kernal... can it be built via visual studio in windows or do I need to learn some linux?
Edit - Ignore the above. Just found the building.md instructions. I will have an attempt on my ubuntu box ;)
static long kbdMatrixKeyCodes[11][8] = { {KEYCODE_Backspace, KEYCODE_3, KEYCODE_5, KEYCODE_7, KEYCODE_9, KEYCODE_Dash, KEYCODE_Insert, KEYCODE_1, KEYCODE_RightAlt, KEYCODE_Escape, KEYCODE_LeftAlt}, {KEYCODE_Return, KEYCODE_w, KEYCODE_r, KEYCODE_y, KEYCODE_i, KEYCODE_p, KEYCODE_RightBracket, KEYCODE_BackQuote, KEYCODE_KP8, KEYCODE_KP_Add, KEYCODE_KP0}, {KEYCODE_Right, KEYCODE_a, KEYCODE_d, KEYCODE_g, KEYCODE_j, KEYCODE_l, KEYCODE_SingleQuote, KEYCODE_Tab, KEYCODE_KP5, KEYCODE_KP_Subtract, KEYCODE_KP_Decimal}, {KEYCODE_F7, KEYCODE_4, KEYCODE_6, KEYCODE_8, KEYCODE_0, KEYCODE_Equals, KEYCODE_Home, KEYCODE_2, KEYCODE_Tab, KEYCODE_LeftSuper, KEYCODE_Up}, {KEYCODE_F1, KEYCODE_z, KEYCODE_c, KEYCODE_b, KEYCODE_m, KEYCODE_Period, KEYCODE_RightShift, KEYCODE_Space, KEYCODE_KP2, KEYCODE_KP_Enter, KEYCODE_Down}, {KEYCODE_F3, KEYCODE_s, KEYCODE_f, KEYCODE_h, KEYCODE_k, KEYCODE_SemiColon, KEYCODE_BackSlash, KEYCODE_LeftControl, KEYCODE_KP4, KEYCODE_KP6, KEYCODE_Left}, {KEYCODE_F5, KEYCODE_e, KEYCODE_t, KEYCODE_u, KEYCODE_o, KEYCODE_LeftBracket, KEYCODE_Delete, KEYCODE_q, KEYCODE_KP7, KEYCODE_KP9, KEYCODE_Right}, {KEYCODE_Down, KEYCODE_LeftShift, KEYCODE_x, KEYCODE_v, KEYCODE_n, KEYCODE_Comma, KEYCODE_Slash, KEYCODE_Escape, KEYCODE_KP1, KEYCODE_KP3, KEYCODE_ScrollLock}, };
You would need a Linux distribution with the dependencies installed. If you put together all your changes and submit it as a pull request in github, I can try to build it.
On Thu, Nov 11, 2021 at 8:07 AM Nick Goodman @.***> wrote:
@randyrossi https://github.com/randyrossi
Me again !
So I think the only change I need to try is to add a specific 128 keyboard matrix to kernal.cpp which I've coded below, its the standard one with the extra keys matrix.
this goes between #if defined(RASPI_PLUS4) | defined(RASPI_PLUS4EMU) and the #else for all other keyboards.
Unfortunately I have no idea how to build a test kernal... can it be built via visual studio or do I need to learn some linux?
else if defined(RASPI_C128)
static long kbdMatrixKeyCodes[11][8] = { {KEYCODE_Backspace, KEYCODE_3, KEYCODE_5, KEYCODE_7, KEYCODE_9, KEYCODE_Dash, KEYCODE_Insert, KEYCODE_1, KEYCODE_RightAlt, KEYCODE_Escape, KEYCODE_LeftAlt}, {KEYCODE_Return, KEYCODE_w, KEYCODE_r, KEYCODE_y, KEYCODE_i, KEYCODE_p, KEYCODE_RightBracket, KEYCODE_BackQuote, KEYCODE_KP8, KEYCODE_KP_Add, KEYCODE_KP0}, {KEYCODE_Right, KEYCODE_a, KEYCODE_d, KEYCODE_g, KEYCODE_j, KEYCODE_l, KEYCODE_SingleQuote, KEYCODE_Tab, KEYCODE_KP5, KEYCODE_KP_Subtract, KEYCODE_KP_Decimal}, {KEYCODE_F7, KEYCODE_4, KEYCODE_6, KEYCODE_8, KEYCODE_0, KEYCODE_Equals, KEYCODE_Home, KEYCODE_2, KEYCODE_Tab, KEYCODE_LeftSuper, KEYCODE_Up}, {KEYCODE_F1, KEYCODE_z, KEYCODE_c, KEYCODE_b, KEYCODE_m, KEYCODE_Period, KEYCODE_RightShift, KEYCODE_Space, KEYCODE_KP2, KEYCODE_KP_Enter, KEYCODE_Down}, {KEYCODE_F3, KEYCODE_s, KEYCODE_f, KEYCODE_h, KEYCODE_k, KEYCODE_SemiColon, KEYCODE_BackSlash, KEYCODE_LeftControl, KEYCODE_KP4, KEYCODE_KP6, KEYCODE_Left}, {KEYCODE_F5, KEYCODE_e, KEYCODE_t, KEYCODE_u, KEYCODE_o, KEYCODE_LeftBracket, KEYCODE_Delete, KEYCODE_q, KEYCODE_KP7, KEYCODE_KP9, KEYCODE_Right}, {KEYCODE_Down, KEYCODE_LeftShift, KEYCODE_x, KEYCODE_v, KEYCODE_n, KEYCODE_Comma, KEYCODE_Slash, KEYCODE_Escape, KEYCODE_KP1, KEYCODE_KP3, KEYCODE_ScrollLock}, };
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-966287549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAJFBPRKZIRMNXTRTDULO5X3ANCNFSM5HV25YXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Randy Rossi
That is very kind of you, I'll have a try first at building/compiling the existing repo and let you know, once sussed code changes should be easy, I'm new to GitHub and Linux but this is a good chance to learn more ref your project with something i would be passionate about contributing to.
You would need a Linux distribution with the dependencies installed. If you put together all your changes and submit it as a pull request in github, I can try to build it.
Hi,
I have finally got around to trying to build your solution for editing but I'm having trouble when I run make_all.sh pi3.
I've installed a clean Ubuntu 22.04.1 LTS and followed your build instructions, downloading the repo, the pre reqs, and I went for version gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 of Toolchain for arm as that is mentioned in your build instructions.
I've carefully checked all the export enviromental variables etc are correct for this version.
I get a lot of warnings like this : "cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C", but it doesn't crash at this point.
I found i had to install some more dependencies to get it to go further: namely bison,byacc and flex.
This then got further but i'm now getting the below error when it tries to make vice-3.3:
any ideas greatly appreciated :
Entering directory '/home/nick/Software/bmc64/third_party/vice-3.3' /home/nick/Software/bmc64/third_party/vice-3.3/missing: line 81: aclocal-1.15: command not found WARNING: 'aclocal-1.15' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. The 'aclocal' program is part of the GNU Automake package: http://www.gnu.org/software/automake It also requires GNU Autoconf, GNU m4 and Perl in order to run: http://www.gnu.org/software/autoconf http://www.gnu.org/software/m4/ http://www.perl.org/ make[1]: [Makefile:500: aclocal.m4] Error 127 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1850: ../aclocal.m4] Error 2
You can ignore that first warning. It's getting stuck on building VICE.
Try 'sudo apt-get install autoconf autotools-dev
Any difference after that?
On Fri, Aug 5, 2022 at 1:04 PM Nick Goodman @.***> wrote:
You would need a Linux distribution with the dependencies installed. If you put together all your changes and submit it as a pull request in github, I can try to build it.
Hi,
I have finally got around to trying to build your solution for editing but I'm having trouble when I run make_all.sh pi3.
I've installed a clean Ubuntu 22.04.1 LTS and followed your build instructions, downloading the repo, the pre reqs, and I went for version gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 of Toolchain for arm as that is mentioned in your build instructions.
I've carefully checked all the export enviromental variables etc are correct for this version.
I get a lot of warnings like this : "cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C", but it doesn't crash at this point.
I found i had to install some more dependencies to get it to go further: namely bison,byacc and flex.
This then got further but i'm now getting the below error when it tries to make vice-3.3:
any ideas greatly appreciated :
Entering directory '/home/nick/Software/bmc64/third_party/vice-3.3' /home/nick/Software/bmc64/third_party/vice-3.3/missing: line 81: aclocal-1.15: command not found WARNING: 'aclocal-1.15' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. The 'aclocal' program is part of the GNU Automake package: http://www.gnu.org/software/automake It also requires GNU Autoconf, GNU m4 and Perl in order to run: http://www.gnu.org/software/autoconf http://www.gnu.org/software/m4/ http://www.perl.org/ make[1]: [Makefile:500: aclocal.m4] Error 127 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1850: ../aclocal.m4] Error 2
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1206665247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKGSBFZPAGXX2J6PXITVXVCRFANCNFSM5HV25YXQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Randy Rossi
I've tried that, but it didn't install or update anything:
Reading package lists... Done Building dependency tree... Done Reading state information... Done autoconf is already the newest version (2.71-2). autotools-dev is already the newest version (20220109.1). 0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
Try going into vice-3.3 dir and running autogen.sh again. I think the problem is your automake version is higher than the one I used. I'm not sure what other issues you will run into though. After you run autogen.sh, try isolating the steps for building VICE from make_all.sh and doing that manually inside vice-3.3 dir.
On Mon, Aug 8, 2022 at 5:02 AM Nick Goodman @.***> wrote:
I've tried that, but it didn't install or update anything:
Reading package lists... Done Building dependency tree... Done Reading state information... Done autoconf is already the newest version (2.71-2). autotools-dev is already the newest version (20220109.1). 0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1207858277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAOYDVSEPJYEUMZLQDVYDELVANCNFSM5HV25YXQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Randy Rossi
Thank-you. Tried that, its now complaining about flex/lex/yywrap again, but I will try and isolate the steps as you have mentioned.
checking for byacc... byacc checking for flex... flex checking for lex output file root... lex.yy checking for lex library... not found configure: WARNING: required lex library not found; giving up on flex checking for library containing yywrap... no configure: error: Could not find either flex or lex! make[1]: [Makefile:495: config.status] Error 1 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1845: ../config.status] Error 2
hi Nickgoodmanuk, I have the same error, do you solve it ?
Thank-you. Tried that, its now complaining about flex/lex/yywrap again, but I will try and isolate the steps as you have mentioned.
checking for byacc... byacc checking for flex... flex checking for lex output file root... lex.yy checking for lex library... not found configure: WARNING: required lex library not found; giving up on flex checking for library containing yywrap... no configure: error: Could not find either flex or lex! make[1]: [Makefile:495: config.status] Error 1 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1845: ../config.status] Error 2
sudo apt-get install flex ?
On Mon, Sep 4, 2023 at 8:16 AM jmmparis @.***> wrote:
hi Nickgoodmanuk, I have the same error, do you solve it ?
Thank-you. Tried that, its now complaining about flex/lex/yywrap again, but I will try and isolate the steps as you have mentioned.
checking for byacc... byacc checking for flex... flex checking for lex output file root... lex.yy checking for lex library... not found configure: WARNING: required lex library not found; giving up on flex checking for library containing yywrap... no configure: error: Could not find either flex or lex! make[1]: [Makefile:495: config.status] Error 1 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1845: ../config.status] Error 2
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1705168341, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKCWDATBQ5ZJZYB6V2TXYXBCXANCNFSM5HV25YXQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Randy Rossi
Flex is installed and detected
checking for byacc... no checking for yacc... yacc checking for flex... flex checking for lex output file root... lex.yy checking for lex library... not found configure: WARNING: required lex library not found; giving up on flex checking for library containing yywrap... no configure: error: Could not find either flex or lex! make[1]: [Makefile:495 : config.status] Erreur 1 make[1] : on quitte le répertoire « /home/jm/bmc/bmc64/third_party/vice-3.3 » make: [Makefile:1845 : ../config.status] Erreur 2
but not the lex library I try with flex-old package and it the same problem
I'm on ubuntu 22.04, flex version is flex 2.6.4.
Just a guess and a long shot: I do not know anything about flex/lex but I searched flex package and it doesn't include any libraries. But flex package recommends this: https://packages.ubuntu.com/jammy/libfl-dev That package includes some libraryfiles in /usr/lib.
yes the libfl-dev is installed
hi Nickgoodmanuk, I have the same error, do you solve it ?
Thank-you. Tried that, its now complaining about flex/lex/yywrap again, but I will try and isolate the steps as you have mentioned. checking for byacc... byacc checking for flex... flex checking for lex output file root... lex.yy checking for lex library... not found configure: WARNING: required lex library not found; giving up on flex checking for library containing yywrap... no configure: error: Could not find either flex or lex! make[1]: [Makefile:495: config.status] Error 1 make[1]: Leaving directory '/home/nick/Software/bmc64/third_party/vice-3.3' make: [Makefile:1845: ../config.status] Error 2
I was unable to resolve it but it was suggested by the Author @randyrossi to go through the steps in the make_all file one by one to narrow down, I struggled with this as not really use to Linux... so tried to make my changes in a pull request, which he kindly tried, but that didn't compile as I was unable to test it (i'm c# this is c++ so bit of inexperience here). It would be good if we can build this ourselves so we can make tested changes without disturbing the author. Problem is most likely related to the newer versions and incompatibilities with the various packages.
the problem was in the vice-3.3 module, it's also appear when I launch make in this directory. I think the LEX/FLEX or LEX library checking in the configure file failed
I can try to put together a docker build for this. The build has never been solid. It’s laziness on my part.
On Tue, Sep 5, 2023 at 2:15 PM jmmparis @.***> wrote:
the problem was in the vice-3.3 module, it's also appear when I launch make in this directory. I think the LEX/FLEX or LEX library checking in the configure file failed
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1707091718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAD55XLY6YWCZ4GEOTXY5T5DANCNFSM5HV25YXQ . You are receiving this because you were mentioned.Message ID: @.***>
I can try to put together a docker build for this. The build has never been solid. It’s laziness on my part. … On Tue, Sep 5, 2023 at 2:15 PM jmmparis @.> wrote: the problem was in the vice-3.3 module, it's also appear when I launch make in this directory. I think the LEX/FLEX or LEX library checking in the configure file failed — Reply to this email directly, view it on GitHub <#201 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAD55XLY6YWCZ4GEOTXY5T5DANCNFSM5HV25YXQ . You are receiving this because you were mentioned.Message ID: @.>
That would be awesome ! :)
To fix the LEX issue simply comment in the configuration.proto file (folder third-party/vice-3.3) the following lines:
if test x"$LEX" = "x:"; then AC_MSG_ERROR([Could not find either flex or lex!]) fi
You should have something similar to this:
dnl if test x"$LEX" = "x:"; then dnl AC_MSG_ERROR([Could not find either flex or lex!]) dnl fi
where "dnl" is the comment tag for this file standard.
run ./autgen.sh in the same folder to rebuild the configuration (this also fix possible aclocal version mismatch from the git version file and the onf of your systemsì.
LEX is used in VICE but libraries are not necessary, sothing using the toolchain mess up with the discovery. Vice in x86 configuration at that check reports "none needed" so simply bypass the check. This does not mean you do not need lex (or better flex) installed in your machines.
I hope this help.
To fix the LEX issue simply comment in the configuration.proto file (folder third-party/vice-3.3) the following lines:
if test x"$LEX" = "x:"; then AC_MSG_ERROR([Could not find either flex or lex!]) fi
You should have something similar to this:
dnl if test x"$LEX" = "x:"; then dnl AC_MSG_ERROR([Could not find either flex or lex!]) dnl fi
where "dnl" is the comment tag for this file standard.
run ./autgen.sh in the same folder to rebuild the configuration (this also fix possible aclocal version mismatch from the git version file and the onf of your systemsì.
LEX is used in VICE but libraries are not necessary, sothing using the toolchain mess up with the discovery. Vice in x86 configuration at that check reports "none needed" so simply bypass the check. This does not mean you do not need lex (or better flex) installed in your machines.
I hope this help.
Thanks for the advice. I will try another build in the next few days with these lines commented out.
It worked for me after a deep analysis of the make and config files. I built everything last week.
Do not forget to run the autogen.sh after the change in the configure.proto files.
It is normal that the script make_all ends with some errors (check the script files and there is a comment that mention this issue).
Another tips it may help the script which links the kernel fails if you do not use the arm toolchaing which is mentioned in the build script (v9.2.1) all the later versions did not work for me in any linux machine I have.
I hope this help!
It worked for me after a deep analysis of the make and config files. I built everything last week.
Do not forget to run the autogen.sh after the change in the configure.proto files.
It is normal that the script make_all ends with some errors (check the script files and there is a comment that mention this issue).
Another tips it may help the script which links the kernel fails if you do not use the arm toolchaing which is mentioned in the build script (v9.2.1) all the later versions did not work for me in any linux machine I have.
I hope this help!
Thankyou. Finally got round to trying this. I have new kernal files so I would say the build has worked ! :
I can now try tinkering with the code. Presumably I just need to run all the build scripts each time after a change, i.e. clean_all make_all make_machines?
1835392 drwxrwxr-x 9 nick nick 4096 Nov 7 12:23 .git 1835421 -rw-rw-r-- 1 nick nick 212 Nov 7 11:13 .gitignore 1835436 -rw-rw-r-- 1 nick nick 123 Nov 7 11:13 .gitmodules 1835471 drwxrwxr-x 2 nick nick 4096 Nov 7 11:13 images 1880504 -rwxrwxr-x 1 nick nick 5819880 Nov 7 12:29 kernel8-32.elf 1880506 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img 1880509 -rwxrwxr-x 1 nick nick 3529780 Nov 7 12:29 kernel8-32.img.c128 1880508 -rwxrwxr-x 1 nick nick 3071084 Nov 7 12:29 kernel8-32.img.c64 1880514 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img.pet 1880511 -rwxrwxr-x 1 nick nick 2393672 Nov 7 12:29 kernel8-32.img.plus4 1880512 -rwxrwxr-x 1 nick nick 1275520 Nov 7 12:29 kernel8-32.img.plus4emu 1880510 -rwxrwxr-x 1 nick nick 2455124 Nov 7 12:29 kernel8-32.img.vic20 1880505 -rw-rw-r-- 1 nick nick 19399086 Nov 7 12:29 kernel8-32.lst 1880503 -rw-rw-r-- 1 nick nick 1450583 Nov 7 12:29 kernel8-32.map 1835481 -rw-rw-r-- 1 nick nick 53400 Nov 7 11:13 kernel.cpp 1835482 -rw-rw-r-- 1 nick nick 5553 Nov 7 11:13 kernel.h 1880494 -rw-rw-r-- 1 nick nick 207812 Nov 7 12:29 kernel.o 1835441 -rw-rw-r-- 1 nick nick 256 Nov 7 11:13 KNOWN_BUGS.md 1835442 -rw-rw-r-- 1 nick nick 35141 Nov 7 11:13 LICENSE 1835483 -rw-rw-r-- 1 nick nick 1052 Nov 7 11:13 main.cpp 1880480 -rw-rw-r-- 1 nick nick 25368 Nov 7 12:29 main.o 1835484 -rwxrwxr-x 1 nick nick 9101 Nov 7 11:13 make_all.sh 1835443 -rw-rw-r-- 1 nick nick 1523 Nov 7 11:13 Makefile 1835444 -rw-rw-r-- 1 nick nick 2653 Nov 7 11:13 Makefile-C128
I think there is a way to do an incremental build rather than starting from clean each time. You can skip over all the circle stuff, for example and start from vice and then the kernel. It would save some time. vice make will do an incremental build.
On Tue, Nov 7, 2023 at 7:35 AM Nick Goodman @.***> wrote:
It worked for me after a deep analysis of the make and config files. I built everything last week.
Do not forget to run the autogen.sh after the change in the configure.proto files.
It is normal that the script make_all ends with some errors (check the script files and there is a comment that mention this issue).
Another tips it may help the script which links the kernel fails if you do not use the arm toolchaing which is mentioned in the build script (v9.2.1) all the later versions did not work for me in any linux machine I have.
I hope this help!
Thankyou. Finally got round to trying this. I have new kernal files so I would say the build has worked ! :
I can now try tinkering with the code. Presumably I just need to run all the build scripts each time after a change, i.e. clean_all make_all make_machines?
1835392 drwxrwxr-x 9 nick nick 4096 Nov 7 12:23 .git 1835421 -rw-rw-r-- 1 nick nick 212 Nov 7 11:13 .gitignore 1835436 -rw-rw-r-- 1 nick nick 123 Nov 7 11:13 .gitmodules 1835471 drwxrwxr-x 2 nick nick 4096 Nov 7 11:13 images 1880504 -rwxrwxr-x 1 nick nick 5819880 Nov 7 12:29 kernel8-32.elf 1880506 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img 1880509 -rwxrwxr-x 1 nick nick 3529780 Nov 7 12:29 kernel8-32.img.c128 1880508 -rwxrwxr-x 1 nick nick 3071084 Nov 7 12:29 kernel8-32.img.c64 1880514 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img.pet 1880511 -rwxrwxr-x 1 nick nick 2393672 Nov 7 12:29 kernel8-32.img.plus4 1880512 -rwxrwxr-x 1 nick nick 1275520 Nov 7 12:29 kernel8-32.img.plus4emu 1880510 -rwxrwxr-x 1 nick nick 2455124 Nov 7 12:29 kernel8-32.img.vic20 1880505 -rw-rw-r-- 1 nick nick 19399086 Nov 7 12:29 kernel8-32.lst 1880503 -rw-rw-r-- 1 nick nick 1450583 Nov 7 12:29 kernel8-32.map 1835481 -rw-rw-r-- 1 nick nick 53400 Nov 7 11:13 kernel.cpp 1835482 -rw-rw-r-- 1 nick nick 5553 Nov 7 11:13 kernel.h 1880494 -rw-rw-r-- 1 nick nick 207812 Nov 7 12:29 kernel.o 1835441 -rw-rw-r-- 1 nick nick 256 Nov 7 11:13 KNOWN_BUGS.md 1835442 -rw-rw-r-- 1 nick nick 35141 Nov 7 11:13 LICENSE 1835483 -rw-rw-r-- 1 nick nick 1052 Nov 7 11:13 main.cpp 1880480 -rw-rw-r-- 1 nick nick 25368 Nov 7 12:29 main.o 1835484 -rwxrwxr-x 1 nick nick 9101 Nov 7 11:13 make_all.sh 1835443 -rw-rw-r-- 1 nick nick 1523 Nov 7 11:13 Makefile 1835444 -rw-rw-r-- 1 nick nick 2653 Nov 7 11:13 Makefile-C128
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1798415162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAYOV2LLMDNHW4TP4TYDITHTAVCNFSM5HV25YX2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZZHA2DCNJRGYZA . You are receiving this because you were mentioned.Message ID: @.***>
It worked for me after a deep analysis of the make and config files. I built everything last week. Do not forget to run the autogen.sh after the change in the configure.proto files. It is normal that the script make_all ends with some errors (check the script files and there is a comment that mention this issue). Another tips it may help the script which links the kernel fails if you do not use the arm toolchaing which is mentioned in the build script (v9.2.1) all the later versions did not work for me in any linux machine I have. I hope this help!
Thankyou. Finally got round to trying this. I have new kernal files so I would say the build has worked ! :
I can now try tinkering with the code. Presumably I just need to run all the build scripts each time after a change, i.e. clean_all make_all make_machines?
1835392 drwxrwxr-x 9 nick nick 4096 Nov 7 12:23 .git 1835421 -rw-rw-r-- 1 nick nick 212 Nov 7 11:13 .gitignore 1835436 -rw-rw-r-- 1 nick nick 123 Nov 7 11:13 .gitmodules 1835471 drwxrwxr-x 2 nick nick 4096 Nov 7 11:13 images 1880504 -rwxrwxr-x 1 nick nick 5819880 Nov 7 12:29 kernel8-32.elf 1880506 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img 1880509 -rwxrwxr-x 1 nick nick 3529780 Nov 7 12:29 kernel8-32.img.c128 1880508 -rwxrwxr-x 1 nick nick 3071084 Nov 7 12:29 kernel8-32.img.c64 1880514 -rwxrwxr-x 1 nick nick 2432108 Nov 7 12:29 kernel8-32.img.pet 1880511 -rwxrwxr-x 1 nick nick 2393672 Nov 7 12:29 kernel8-32.img.plus4 1880512 -rwxrwxr-x 1 nick nick 1275520 Nov 7 12:29 kernel8-32.img.plus4emu 1880510 -rwxrwxr-x 1 nick nick 2455124 Nov 7 12:29 kernel8-32.img.vic20 1880505 -rw-rw-r-- 1 nick nick 19399086 Nov 7 12:29 kernel8-32.lst 1880503 -rw-rw-r-- 1 nick nick 1450583 Nov 7 12:29 kernel8-32.map 1835481 -rw-rw-r-- 1 nick nick 53400 Nov 7 11:13 kernel.cpp 1835482 -rw-rw-r-- 1 nick nick 5553 Nov 7 11:13 kernel.h 1880494 -rw-rw-r-- 1 nick nick 207812 Nov 7 12:29 kernel.o 1835441 -rw-rw-r-- 1 nick nick 256 Nov 7 11:13 KNOWN_BUGS.md 1835442 -rw-rw-r-- 1 nick nick 35141 Nov 7 11:13 LICENSE 1835483 -rw-rw-r-- 1 nick nick 1052 Nov 7 11:13 main.cpp 1880480 -rw-rw-r-- 1 nick nick 25368 Nov 7 12:29 main.o 1835484 -rwxrwxr-x 1 nick nick 9101 Nov 7 11:13 make_all.sh 1835443 -rw-rw-r-- 1 nick nick 1523 Nov 7 11:13 Makefile 1835444 -rw-rw-r-- 1 nick nick 2653 Nov 7 11:13 Makefile-C128
Happy to hear my workaround worked for you as well!
Mauri
I can report I have had success mapping all the extra keys in the 128 kernal via GPIO :). with the exception currently of the two latching keys 40/80 and Ascii/Din (Caps lock) which are not needed as canbe done in the menu. Still a bit of testing to check I haven't broken anything but looking promising. Once done will update documentation and put a pull request together.
Congrats!
On Wed, Nov 8, 2023 at 1:26 PM Nick Goodman @.***> wrote:
I can report I have had success mapping the extra keys in the 128 kernal via GPIO :). with the exception currently of "Line Feed" and "Help", Still a bit of testing to check I haven't broken anything but looking promising. Once done will update documentation and put a pull request together.
— Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/201#issuecomment-1802426753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKEAH7KDJ4ZO6CZH3NDYDPFDRAVCNFSM5HV25YX2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBQGI2DENRXGUZQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Randy Rossi
As the Commodore 128 keyboard connector has 5 extra pins (than a 64) can we connect those to spare GPIO pins on the PI ?. i.e. 9,10,11,14 and 15 ? This would mean we could use the extra keys on a real 128 keyboard when in 128 mode.
Forgive me if this can already be done (GPIO 5 Custom perhaps?).
Thankyou muchly, loving BMC ;)