Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Maxi-Menu
Page 1 of 2 | |||||
Author | Message | ||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
I'm about to release my menu program, "Maxi-Menu". Just a few small things to tidy up and it will be available for download. Here are two screenshots. The first is the main menu page and the other the built-in icon editor. |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
thats cool from it will come in handy thaks for the effort taken.... technicians do it with least resistance |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Well, here it is! This is a program launcher, styled in a somewhat Ipod fashion with icons that the user selects to launch the desired application. The program MENU.BAS along with it's icon data file ICON.DAT, is to be copied to the root of the SD card. Another program MBOOT.BAS is generated to facilitate running of another user selected program, from within the Menu Program. (INPUT filename$:RUN filename$ doesn't work so this was the workaround) If MENU.BAS is renamed to AUTORUN.BAS, the program will boot on powerup. The first thing the program does is look for the MENU.DAT file which contains the menu definitions. On a clean install such as this, it will see that it is missing and create a blank one. From here the user enters menu entries, providing a Menu Entry Label, Program Filename, Directory (only 1 level), and an Icon (selectable from 32, I've predefined 17). Keyboard instructions are included in the program listed as REM lines so check these out first. Let me know what you think, suggest improvements and highlight bugs. Nick 2011-06-25_075118_MENU_-_Backups.zip |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Works a treat Nick, well done. Invaders? Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Invaders...in preparation for Bob's Space Invaders game he's writing. :) They're only mockups just to use as examples. The program doesn't acually check what programs you have on your SD. The user can make whatever definition he wants in the menu, it will just go to the BASIC prompt if you try an execute and entry that doesn't exist. :) If we had programmable characters, invaders could be defined and that would make it a lot easier to program. |
||||
BobDevries Senior Member Joined: 08/06/2011 Location: AustraliaPosts: 266 |
Hi Nick, a quick question.... I have opted to divide my SD card into sub-directories, MMBASIC, GRAPHICS, LIBRARY etc. I put your MENU.BAS and ICONS.DAT into the MMBASIC directory. I CHDIR"MMBASIC" and then RUN"MENU". It runs, but does NOT open the ICONS.DAT file. Should it? All I get is a bunch of empty squares. It creates a MENU.DAT file, however. I think that happened when I chose the Icon Editor. Even if I put the ICONS.DAT in the root directory, I get the same. Regards, Bob Devries Dalby, QLD, Australia |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
It was designed to be run in the root, usually renamed to AUTOSTART.BAS so it starts automatically on powerup. What's the point of a menu system that requires one to execute a bunch of commands just to run the menu? :) Unless AUTOSTART works from subdirs too? Either way, I don't make specific calls to the root directory so it should work from any default. I'll have to investigate. The empty squares at startup is normal. Have you defined any apps to run? If not, empty squares is all you get. (I'm still working on the psychic readings) You get to see the defined icons when you are entering a menu item and get to pick an icon from the icon palette. |
||||
BobDevries Senior Member Joined: 08/06/2011 Location: AustraliaPosts: 266 |
No, AUTORUN only works in the root directory. Here I was thinking I'd get the pretty ICONS which you designed. Ah, well. Regards, Bob Devries Dalby, QLD, Australia |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Ok Bob, It runs fine from a subdir but a change needs to be made to let it know where to locate the root in order to run a menu selection. Let's assume you make a subdir on your SD card called MMENU. Copy the MENU.BAS and ICON.DAT files from the download above into this folder. Change to this folder and load the MENU.BAS. Add the line... 542 PRINT #3,"5 CHDIR"+CHR$(34)+".."+CHR$(34) The command CHDIR".." is added to the MBOOT.BAS program that is created to reset the MM to the root in preparation for running your selected file. That's it! If you want it to autostart on boot, create and save the following line in the root folder called AUTOBOOT.BAS 10 CHDIR"MMENU" 20 RUN"MENU" As for not seeing icons, they're all there! You need to edit a menu entry to see an icon... obviously!. (selectable from the predefined 17 out of 32 I have created so far) |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
how do i transfer the dat file using hyper terminal please.....i managed to transfer the bas file but dont know much about hyterm.... fist time i have ever used it... technicians do it with least resistance |
||||
VK6MRG Guru Joined: 08/06/2011 Location: AustraliaPosts: 347 |
Looks good Nick. Great job. My menu system is very basic, but it was written by an 11 year old! Its easier to ask forgiveness than to seek permission! ............VK6MRG.............VK3MGR............ |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Not sure. I thought it would have been the same. I don't use the terminal. I use a memory card reader on my PC to read the SD card directly. A lot less mucking around for me. |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Just to emphasis... When you run the program, it will create a MENU.DAT file if it doesn't find one. This file stores the menu entries you create on your system. The boxes on the screen are *meant* to be empty when you first run the menu. You need to choose a box then select EDIT MENU ENTRY where it will ask you for... 1) A label (12 characters) to label the box. 2) A filename of the program you wish to define here. 3) A sub-directory (1 level down only) where the program resides (leave blank if root) 4) Then an icon number. Here you will see the icon palette displaying all currently defined icons. You can add/change an icon in the ICON EDITOR and it will update the ICON.DAT file. The program MBOOT.BAS is always created because MMBASIC (as do most BASICS) don't allow a string in the RUN command. Example: 10 INPUT F$ 20 RUN F$ ... doesn't work. The work around I found was to generate a small program (MBOOT.BAS) that has the commands to CHDIR to the required directory and RUN the specific file the user chooses. Pretty logical I think...even for me! :) |
||||
BobDevries Senior Member Joined: 08/06/2011 Location: AustraliaPosts: 266 |
Hi Nick, Your comment regarding using a variable to launch a programme doesn't seem correct, and certainly doesn't agree with my experiments. I used what you suggested: 10 input f$ 20 run f$ and it worked just fine. Another interesting thing.... If you use CHDIR "......" you'll go up a number of levels of directories. Not sure yet of the limitations of that, though. I built the following directory structure: ROOT\MMBASIC\TEST and found that entering CHDIR "...." took me from the TEST directory to the ROOT directory. Using three dots, took me up only one level, i.e. to the MMBASIC directory. Hope that helps. Regards, Bob Devries Dalby, QLD, Australia |
||||
Ray B Senior Member Joined: 16/02/2007 Location: AustraliaPosts: 219 |
Nick when running program get following error: Error Line 360: Array must be dimensioned first but when I list 360 it shows : For Y=10 to 21: for X=190 to 291 etc.... Any ideas? RayB from Perth WA |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
So it does!! I remember trying this when I first started and it definately didn't work then. I'm bamboozled. Maybe it didn't work on an earlier firmware? I can see a Version 2.0 Maxi-Menu coming. :) I'm open to more suggestions for feature to include or improve. My biggest wish for this MENU is the inclusion of a better way to dump detailed graphics. Maximite BASIC bogs down when you use PSET to individually address pixels. I used the LINE command to draw 2x2 pixels. I would have prefered 1x1 to use the full res of the MM for the icons but it is half the speed of what it is now. Slower using PSET. If only the MM had redfinable characters. Would give the MM a big speed boost and make detailed icons and symbols usable. (Geoff...hint, hint) |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Redefinable characters could be done but they would use up a lot of memory. Would the DRAW command from GW-BASIC fit the bill? Geoff Geoff Graham - http://geoffg.net |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
Yes... but redefinable graphics would be much faster and usable within BASIC programs by simply using the PRINT commands. You can throw out a string of them and they can be very detailed with very little visible drawing. Most graphics done with DRAW (or SHAPE on the Apple II) look "liney" or "vectory". Redefinable Graphics can have as much solid detail that you can stack in an 8x8 (or whatever the MM matrix is) character and then they can be joined together and displayed fast. I'd assume you would have to relocate the character set matrix into Program RAM rather than firmware RAM? Maybe keep the standard ASCII still in Firmware RAM and have 128-255 in Program RAM? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
OK, that would use a little over 1K of RAM so it would not be a large demand. I will have to think about how it could be implemented. For example, should the character set be loaded from the SD card as a file, or should they be defined within the program using something like the DATA statements. Does anyone else have any input on this? Is there some old standard (Commodore, Apple, etc) that I could follow rather than invent a new series of commands? Geoff Geoff Graham - http://geoffg.net |
||||
stuarts Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 199 |
Geoff, could we have the best of both worlds. Predefined characters that reside in firmware, but if there is a font file on the SD card, the firmware loads it instead. As to what to use as a default, I'd vote for the TRS-80 character set. Stuart Time is nature's way of keeping everything from happening all at once. |
||||
Page 1 of 2 |
Print this page |