My Little Menu Launcher
My Little Menu Launcher
This is the code and information on my little menu launcher (over several posts).
Basically it is a 2 level menu system and visually was designed to look a bit like the PSION apps
It doesn't do anything in itself other than creating a "win1_menu_tmp" basic program that does the actual work (it does shrink memory when required before exiting though)
It needs TK2/SUB/RES (the menu BASIC code uses RESET rather than RES as I use my own micro-toolkit, so needs amending to RES)
Top level menu: Lower level menu: Warning that memory being shrunk and QL will reset Game loaded (after just pressing F1/F2)
Basically it is a 2 level menu system and visually was designed to look a bit like the PSION apps
It doesn't do anything in itself other than creating a "win1_menu_tmp" basic program that does the actual work (it does shrink memory when required before exiting though)
It needs TK2/SUB/RES (the menu BASIC code uses RESET rather than RES as I use my own micro-toolkit, so needs amending to RES)
Top level menu: Lower level menu: Warning that memory being shrunk and QL will reset Game loaded (after just pressing F1/F2)
Last edited by t0nyt on Wed Apr 10, 2024 10:40 am, edited 1 time in total.
Re: My Little Menu Launcher
To launch automatically (especially after memory shrink) the end of my BOOT file is
The standalone win1_menu launcher is
win1_boots_menu_menu_obj is the "Liberated" version of the menu (for speed)
The win1_menu_tmp is the file created by the menu system (when nothing selected in menu the file is just a REMark)
Code: Select all
9100 IF FREE_MEM<500000 THEN
9110 LRUN win1_menu_tmp
9120 ELSE
9130 LRUN win1_menu
9140 END IF
Code: Select all
100 PRINT #0,"Loading Menu..."
110 DELETE win1_menu_tmp
120 EXEC_W win1_boots_menu_menu_obj
130 LRUN win1_menu_tmp
The win1_menu_tmp is the file created by the menu system (when nothing selected in menu the file is just a REMark)
Code: Select all
REMark Menu Temp
SUB_DRV WIN2
SUB_USE 1,games_VROOM
SUB_USE FLP
LRUN FLP1_boot
Last edited by t0nyt on Wed Apr 10, 2024 10:40 am, edited 1 time in total.
Re: My Little Menu Launcher
In the code line 7020 opens the "win1_menu_tmp" file, so this may need changing
Line 5050 uses "RESET", needs changing to "RES" or your preferred memory shrinking utility
From 8000 onwards are the data statements that make up the menu
8000 DATA "","Games->","","Games Menu","","",0,0
A null string at the start means it's a top-level item (can be menu or program), "Games->" is the item name, "Games Menu" is the description. The "->" is irrelevant, it's just my choice for denoting a menu item vs a program at the top-level
8020 DATA "Development->","Assembler","win1_utility_asm","Editor / Assembler / Monitor","","",0,0
This is a 2nd level item so first item is the top-level menu name (case-sensitive) and in this case as it ends "","",0 it means "win1_utility_asm" is just LRUN with no use of SUB
8040 DATA "Development->","QLiberator","TOOLS_QLIB","BASIC Compiler","WIN1","FLP",1,0
This is a 2nd level item again. In this case it maps folder "TOOLS_QLIB" on WIN1 as FLP1_ (the text file will "lrun flp1_boot") if the "1" was "2" it would map WIN1_TOOLS_QLIB to FLP1_ and WIN1_TOOLS_QLIBb to FLP2_ etc.
9270 DATA "Games->","Vroom","games_VROOM","from Boxset 4","WIN2","FLP",1,512
This is an example that will map WIN2_GAMES_VROOM_ to FLP1_ and lrun FLP1_ boot, but before that will RES the memory to 512k
When I need to EXEC something, instead of LRUN, I just create a basic program file somewhere that does the necessary and the menu item LRUN's that
Line 5050 uses "RESET", needs changing to "RES" or your preferred memory shrinking utility
From 8000 onwards are the data statements that make up the menu
8000 DATA "","Games->","","Games Menu","","",0,0
A null string at the start means it's a top-level item (can be menu or program), "Games->" is the item name, "Games Menu" is the description. The "->" is irrelevant, it's just my choice for denoting a menu item vs a program at the top-level
8020 DATA "Development->","Assembler","win1_utility_asm","Editor / Assembler / Monitor","","",0,0
This is a 2nd level item so first item is the top-level menu name (case-sensitive) and in this case as it ends "","",0 it means "win1_utility_asm" is just LRUN with no use of SUB
8040 DATA "Development->","QLiberator","TOOLS_QLIB","BASIC Compiler","WIN1","FLP",1,0
This is a 2nd level item again. In this case it maps folder "TOOLS_QLIB" on WIN1 as FLP1_ (the text file will "lrun flp1_boot") if the "1" was "2" it would map WIN1_TOOLS_QLIB to FLP1_ and WIN1_TOOLS_QLIBb to FLP2_ etc.
9270 DATA "Games->","Vroom","games_VROOM","from Boxset 4","WIN2","FLP",1,512
This is an example that will map WIN2_GAMES_VROOM_ to FLP1_ and lrun FLP1_ boot, but before that will RES the memory to 512k
When I need to EXEC something, instead of LRUN, I just create a basic program file somewhere that does the necessary and the menu item LRUN's that
Last edited by t0nyt on Wed Apr 10, 2024 10:56 am, edited 2 times in total.
Re: My Little Menu Launcher
And this is the current menu code
It's got a bit messy over time (but at least it doesn't have any GOTO/GOSUB)
The attached disk image contains the source (so arrow symbols aren't corrupted)
It's got a bit messy over time (but at least it doesn't have any GOTO/GOSUB)
The attached disk image contains the source (so arrow symbols aren't corrupted)
- Attachments
-
- MENU.img.zip
- (4.55 KiB) Downloaded 36 times
Re: My Little Menu Launcher
I've found the first program that won't run from the menu - Steve Davis Snooker
Because of it's fixed location in memory I can't see anyway around it with QIMSI installed
Am going to play with having code to mount an image on vmap/vdrive, though QIMSI (or at least the SD) would have to be removed before pressing F1/F2 after memory is reset
Because of it's fixed location in memory I can't see anyway around it with QIMSI installed
Am going to play with having code to mount an image on vmap/vdrive, though QIMSI (or at least the SD) would have to be removed before pressing F1/F2 after memory is reset
-
- Font of All Knowledge
- Posts: 4654
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: My Little Menu Launcher
Hi,
Can you not make a image file and use MDI to load from QIMSI.
If the game is too large for a MDV image, then use FDI.
Can you not make a image file and use MDI to load from QIMSI.
If the game is too large for a MDV image, then use FDI.
Regards,
Derek
Derek
Re: My Little Menu Launcher
Hi Derek,Derek_Stewart wrote: Thu Apr 11, 2024 11:49 am Hi,
Can you not make a image file and use MDI to load from QIMSI.
If the game is too large for a MDV image, then use FDI.
The program loads into 5 fixed areas of memory (and doesn't seem to like more than 512kb of memory in the QL so I have to shrink memory) but those memory areas aren't available with QIMSI plugged in, so don't see how I can do anything that involves QIMSI?
I've tried moving it all up the memory area but that just crashes so am wondering if it's non-relocatable code
Many thanks
Code: Select all
100 a=RESPR(76*1024): b=184320
110 a=RESPR(512): IF a>=b THEN GO TO 110
120 a=196608: c=204800: d=245760: e=212992
130 MODE 8: PAPER 0: CLS: CLS #0
140 LBYTES mdv1_p1,131072
150 LBYTES mdv1_p2,b
160 LBYTES mdv1_p3,a
170 LBYTES mdv1_p4,c
180 LBYTES mdv1_p5,e
190 LBYTES mdv1_p6,d
200 CALL d
Re: My Little Menu Launcher
I tried using just a single 3mb WIN file, but that still only leaves 64kb of free RAM
Re: My Little Menu Launcher
Although it has no effect regarding SD Snooker I've added the following to the start of my BOOT file to maximise available available memory in 128k mode (nothing extra get's loaded other than SUB, which could also be skipped if the program didn't need re-mapping of course, so no TK2 etc.)
Code: Select all
100 IF INT( (PEEK_L(163856)-PEEK_L(163852)-1024)/1024)<128 THEN
105 t=RESPR(14000)
110 s=RESPR(2372)
120 LBYTES win1_boots_sub_rext,s
130 CALL s
140 LRUN win1_menu_tmp
150 END IF