Source code for menu?

Caution: Non registered users only see threads and messages in the currently selected language, which is determined by their browser. Please create an account and log in to see all content by default. This is a limitation of the forum software.


Also users that are not logged in can not create new threads. This is a, unfortunately needed, counter measure against spam. Please create an account and log in to start new threads.

Don't Panic. Please wash hands.
  • I was wondering if the source code for the TC64 menu system is available or could be provided? The menu system is good, but I'd ideally like to modify it a bit for my own purposes, and it would be nice to start with what you already have rather than build everything from scratch. Thanks.

  • I'm sorry, but the TC64 source code is closed-source. It's over a decade worth of commercial development that's hardly been paid for with Chameleon sales, and we can't let that go. It's what sets the Chameleon apart from other FPGA computers!


    Just work with us: Let us know what you believe should be in there, and we'll see if it makes sense for the majority of Chameleon users.

  • That said, please post your suggestions. I have a few more details on my TODO list, but perhaps what you want to do can be added to the official release too.

  • I realize I'm asking a lot here and some of this may not be possible, but I'm just going to write out everything at once:


    1) I wish there were a way for users to write their own front end that replaces the existing menu. It seems like this has a lot of potential, and that there would be other developers like me who would be interested in developing their own custom TC64 interfaces that could also be shared with the community. From looking through the programmer's guide, it seems like some of what would be needed is already implemented. I would ideally like that the "API" allows reading of the SD card directory, mounting cart and disk images, and also the ability to exit the custom menu and return to the original TC64 menu.


    2) If the ability to create custom front-ends was added like I described above, then I would program the following menu myself. But if not, then this is what I wish the TC64 had: A top level "convenience" screen that shows the system status (mode settings, disks/carts mounted, etc.) in the top few lines and uses the rest of the screen as a file browser, with the ability for users to easily change common settings with key commands like PAL/NTSC or Turbo on/off. There are a lot of common settings that I think most people want to view and change somewhat frequently, and it would nice if all the most commonly used functionality was combined into one top level screen rather than having to go in and out of menus frequently. Not that the other menus should be removed or changed, but instead to add a new additional screen that has everything in one place.


    3) Some smaller requests:


    A) I wish the menu settings values wrapped around when you reach the end. Because they don't, you have to remember whether two-option settings like "PAL" and "NTSC" are the left or right key, which I always forget. It would be a bit more convenient if I could always hit the 'right' button to cycle/toggle through all the settings.


    B) I wish there was a single key to mount disks (maybe the asterisk key?) It's a function I use very frequently, and it's cumbersome that I have to hit CMD+M which are on opposite sides of the keyboard. If I'm holding the joystick in one hand, it often requires me to put it down in order to hit both keys unless I'm at the exact angle where I can hit both keys with one hand.


    C) Similarly, I wish you could mount D64s by holding the joystick button.


    Thanks!

  • Quote

    I wish there were a way for users to write their own front end that replaces the existing menu. It seems like this has a lot of potential, and that there would be other developers like me who would be interested in developing their own custom TC64 interfaces that could also be shared with the community. From looking through the programmer's guide, it seems like some of what would be needed is already implemented. I would ideally like that the "API" allows reading of the SD card directory, mounting cart and disk images, and also the ability to exit the custom menu and return to the original TC64 menu.

    A mechanism to load another menu from SD card has always been there - however, the menu includes everything, including the code to access the SD card, or the code to mount disk images - there is no way to only replace the menu itself and reusing all the lowlevel stuff - you'd have to make it all yourself.

    Quote

    2) If the ability to create custom front-ends was added like I described above, then I would program the following menu myself. But if not, then this is what I wish the TC64 had: A top level "convenience" screen that shows the system status (mode settings, disks/carts mounted, etc.) in the top few lines and uses the rest of the screen as a file browser, with the ability for users to easily change common settings with key commands like PAL/NTSC or Turbo on/off. There are a lot of common settings that I think most people want to view and change somewhat frequently, and it would nice if all the most commonly used functionality was combined into one top level screen rather than having to go in and out of menus frequently. Not that the other menus should be removed or changed, but instead to add a new additional screen that has everything in one place.

    That would require quite a bit of code, and most likely wont fit into the existing menu program. It also reminds me a lot of people who are requesting hotkeys for their favourite features in VICE :) Ie what you find super important or common and want to switch it with a single key, is completely useless for others. (For example: I rarely toggle PAL/NTSC or enable the Turbo, going to the menu is no problem for me when i do it)

    Quote

    A) I wish the menu settings values wrapped around when you reach the end. Because they don't, you have to remember whether two-option settings like "PAL" and "NTSC" are the left or right key, which I always forget. It would be a bit more convenient if I could always hit the 'right' button to cycle/toggle through all the settings.

    I'll have a look at that, i am not sure how well this fits into the current menu logic


    Quote

    B) I wish there was a single key to mount disks (maybe the asterisk key?) It's a function I use very frequently, and it's cumbersome that I have to hit CMD+M which are on opposite sides of the keyboard. If I'm holding the joystick in one hand, it often requires me to put it down in order to hit both keys unless I'm at the exact angle where I can hit both keys with one hand.

    Try SPACE, then cursor down and RETURN - works nicely with one hand :)


    Quote

    C) Similarly, I wish you could mount D64s by holding the joystick button.

    MMmmh. What about opening the "space" menu when pressing fire on a file?


    I wonder a bit what exactly your usecase is - because pressing the joystick button already allows to load a program from a d64 and mount that d64.

  • That would require quite a bit of code, and most likely wont fit into the existing menu program

    Not to diminish the amount of work, but I was thinking most of the code is already there since you already have a file browser and there's already a page that displays system status. Seems like it's partly just a matter of just making the file browser module capable of limiting its size to a slightly smaller area of the screen and then adding a status display at the top. Even if you could just add an optional status display to the top of the file browser window, that would be pretty helpful.


    It also reminds me a lot of people who are requesting hotkeys for their favourite features in VICE :) Ie what you find super important or common and want to switch it with a single key, is completely useless for others. (For example: I rarely toggle PAL/NTSC or enable the Turbo, going to the menu is no problem for me when i do it)


    I disagree, I looked through all the TC64 settings before I wrote this, and the settings that people would want to change seem reasonably clear and there aren't very many of them. Plus it can be determined which shortcuts people want by a simple survey on this forum. If other people have already requested shortcut keys too, then it does seem like there is demand for what I'm asking, and it's not that difficult to add more shortcut keys.


    Also, maybe another way to effectively make the UI feel more streamlined would be to add support for some kind of configuration file that goes alongside D64/PRG/CRT files and automatically loads a particular machine configuration upon mounting/loading, similar to TheC64's CJM files.


    I wonder a bit what exactly your usecase is - because pressing the joystick button already allows to load a program from a d64 and mount that d64.


    I'm using games and programs that have multiple disks and/or that require save or data disks, which is of course very common among C64 software. I use the CMD+M to mount disks so very frequently that I still wish there were a direct key to do it and a way to do it with the joystick even though it can be done through CMD+M and also through the space bar menu.

  • just a matter of just making the file browser module capable of limiting its size to a slightly smaller area of the screen and then adding a status display at the top.

    You seem to over-esitmate the available area on a C64 screen. While I'd totally agree with you if we had 80 columns and 50 lines, the C64 only has a quarter of that. It's fairly easy to "prototype" your suggestion by typing it on a basic screen. You'll quickly see that an attempt to split the screen in two areas already "wastes" a full character for a separator. And one line and/or column is a lot on a C64 screen! Just try it out - the available screen area is small on a C64. It is very hard to apply modern usability concepts that rely on a 4k Retina display.


    Also, maybe another way to effectively make the UI feel more streamlined would be to add support for some kind of configuration file that goes alongside D64/PRG/CRT files and automatically loads a particular machine configuration upon mounting/loading, similar to TheC64's CJM files.

    This indeed sounds practical, especially because it may resolve compatibility problems with extra hardware. If the configuration file (or "launch profile" if you will) also contains information about Turbo compatibility, drives to switch on/off and REU size limits, it will add a lot of simplicity to the Chameleon menu.


    However, we need to keep this as universal as possible, as the Syntax within such a file should be future-proof (thinking of the C64RMK3 here). Further, a simple implementation would be to store "key presses" in that file, which would go against your other usability-wish of assigning key combinations to actions:

    Plus it can be determined which shortcuts people want by a simple survey on this forum.

    If you ask 100 people, you'll probably have more than 100 answers in terms of "what would they like best". You know what they say about surveys: If Henry Ford would have asked his potential customers what they wanted in terms of faster transportation, they would have answered "a faster horse". Since the Chameleon does have to live with some (not all) of the 8-bit limits, we'd probably spend most of the time explaining what the limits actually are, although they are hidden right in front of your eyes (such as available screen space, which you need to try before you realize how little space 40 cols/25lines offers).


    I'll have a chat with Tobias about the "launch profile" idea.

  • Quote

    Not to diminish the amount of work, but I was thinking most of the code is already there since you already have a file browser and there's already a page that displays system status.

    As said, the problem is memory. If this was a program running on a modern platform, i'd totally agree, its easy to add and can be made optional no problem.

    However, the chameleon menu essentially runs on a C64 with a banked memory expansion - and the memory available for the menu system is mostly full. Sometimes adding even trivial things somewhere requires manually shuffling around code from one bank into another to free some space. Eg right now in the bank reserved for the filebrowser core we have $a7 bytes left - that is almost nothing, and is pretty much my safety buffer that i need to compensate codesize changes when i update the compiler.

    Quote

    If other people have already requested shortcut keys too, then it does seem like there is demand for what I'm asking,

    Actually you are the first to ask such thing in many years :) I am just familiar with this type of request from my work with VICE - very often users only see their very specific usecase and then request hotkeys specially tailored to them. (The PAL/NTSC toggle for example is something a large number of users will never need - those who are using the chameleon in cartridge mode.)

  • Thanks for taking the time to consider and respond to my comments.


    You seem to over-esitmate the available area on a C64 screen. While I'd totally agree with you if we had 80 columns and 50 lines, the C64 only has a quarter of that. It's fairly easy to "prototype" your suggestion by typing it on a basic screen. You'll quickly see that an attempt to split the screen in two areas already "wastes" a full character for a separator. And one line and/or column is a lot on a C64 screen! Just try it out - the available screen area is small on a C64. It is very hard to apply modern usability concepts that rely on a 4k Retina display.

    I do have some experience laying out similar status displays in C64 text mode, and I think you could convey a lot of useful information even just by adding 2-4 lines of status display to the file manager. I didn't mean to suggest the screen should be split in half, but I don't mind losing a few lines of files because the files are sorted alphabetically and you can jump to any letter of the alphabet, so it's very easy to find things. I mainly just want to know the broad parts of the "emulation" configuration (NTSC/PAL, turbo on/off, REU on/off, basic disk config, maybe mouse on/off, etc.)


    Although one alternate idea I had would be to just combine the status screen with the main menu screen. Then you see the status when you turn it on or whenever you go into the menus without having to jump into another screen.


    This indeed sounds practical, especially because it may resolve compatibility problems with extra hardware. If the configuration file (or "launch profile" if you will) also contains information about Turbo compatibility, drives to switch on/off and REU size limits, it will add a lot of simplicity to the Chameleon menu.


    However, we need to keep this as universal as possible, as the Syntax within such a file should be future-proof (thinking of the C64RMK3 here). Further, a simple implementation would be to store "key presses" in that file, which would go against your other usability-wish of assigning key combinations to actions:


    After thinking about it, this does seem like a really useful feature. It offers a lot of flexibility and ease of use for the user. And that would be great if you could also include custom keyboard shortcuts. Although I personally don't see the need for different keyboard configurations for each disk or cartridge since it would only affect the TC64 menu. It seems like that if there's a keyboard configuration file then it should maybe be a global configuration file that's separate from the CJM-like per-disk configuration files?


    Here's my wish list for a per-disk/cartridge configuration file feature similar to CJM files


    - Turbo/REU/PAL/NTSC/mouse config/disk config/etc

    - Per-disk write protection

    - The ability to automatically mount other disks or cartridges

    - The ability to select ROMs for kernel and disk drives

    - That the configuration files are hidden from the TC64 file browser


    Also, glad to hear that the Reloaded MK3 is still in the works.

  • options->drive settings->update mounted images->always

    Sorry, I don't know how I missed that. I went to the menu and it seemed like there were only two options (ask and never), but my C64 keyboard is not working perfectly and that may have caused me to overlook the third option.

  • Paul,


    as Tobias pointed out, the main problem is memory where the menu resides: There's not much wiggle room, so the majority of your wishes won't make it, as it would just require too much code. We are discussing a method for reducing the number of key presses - still trying to figure out what the minimal subset should be, and how it can merge with other already-existing concepts (just not CJM).


    I mainly just want to know the broad parts of the "emulation" configuration (NTSC/PAL, turbo on/off, REU on/off, basic disk config, maybe mouse on/off, etc.)

    There's still the status line that you can switch on for the VGA screen. Granted, it's not on the video output of the C64 itself, but I suspect that a lot of people are using the VGA output, and the additional info you get there is already most of what you're looking for.

  • One more: I wish that when you use the "left button" on the TC64 or CDTV remote to go into the menu or file browser, that if you press the "left button" again it will exit the menu and go back to the running C64 core.


    BTW - you can use "CDTV input mode", then you can use F5 for mount and F6 for unmount.

    Thanks this is great, this control scheme works a lot better for me.

  • Quote

    I wish that when you use the "left button" on the TC64 or CDTV remote to go into the menu or file browser, that if you press the "left button" again it will exit the menu and go back to the running C64 core.

    You can already use ESCAPE on the remote... i could maybe map the left button to do the same in the menu, but i dont see the point to be honest *shrug*

  • You can already use ESCAPE on the remote... i could maybe map the left button to do the same in the menu, but i dont see the point to be honest *shrug*

    When you press Escape or <- to get back to the running core, you have to push it 1, 2, or 3 times depending where you are in the menu tree, and this a relatively common action. I wish the left button took you directly back to the running core without having to back out to the top of the menu tree first. I also think this toggling action of the button is somewhat intuitive, especially since the 'left button' has a toggle action when it's in turbo or drive mode.

  • The CDTV remote mode works a lot better for me, but I noticed it removes "rename" from the menu and even disables the keyboard shortcut. I wish that the rename feature was not disabled in this mode because I use it frequently. Using CDTV mode doesn't necessarily mean that the user has no keyboard hooked up, and even if somebody accidentally went into "rename" with only the remote, you can cancel with "escape". So it seems unnecessary to completely remove the "rename" feature.

  • The last reply was more than 365 days ago, this thread is most likely obsolete. It is recommended to create a new thread instead.