Menu:
- The menu applications are referenced in MainMenu_vx.gcl, you need to edit this file appropriately based on how many menu applications you intend to have and what they are called.
- Search for \Loader in this file and you will see all the menu entries, if you are not changing the number of menu entries, then the task is simpler; just change the names appropriately.
- If the number of menu entries is different, then you have more work to do: you must edit the menu and cursor handling code in this file to accommodate your menu. e.g. for that first ROM I built for you, I had to comment out the ButtonLeft and ButtonRight handlers and also change the boundary checks of the Item/MenuItem variable, (it's named differently among the different versions of MainMenu_vx.gcl).
- Removed the Easter Egg at the top of the file for more space savings.
- Removed the Tetronis/Bricks workarounds and the TicTacToe launcher at the bottom of the file.
Original code:
Code: Select all
{ Operate menu }
[def
push
0 Item=
[do
\frameCount, Color= PrintArrow!
{ Handle each stroke of Up/Down and A controller buttons }
{buttonRight}
\buttonState, 254^ [if=0
WipeOutArrow!
Item 4- [if<=0 10+ Item=]
\buttonState, 1| \buttonState.]
{buttonLeft}
\buttonState, 253^ [if=0
WipeOutArrow!
Item 6- [if>=0 Item=]
\buttonState, 2| \buttonState.]
{buttonDown}
\buttonState, 251^ [if=0
WipeOutArrow!
Item 5- [if<>0 5- if<>0 <Item++]
\buttonState, 4| \buttonState.]
{buttonUp}
\buttonState, 247^ [if=0
WipeOutArrow!
Item [if<>0 6- if<>0 Item 1- Item=]
\buttonState, 8| \buttonState.]
{buttonA, or any ASCII key from keyboard, 'A' included...}
\buttonState, 128& if<>0loop
42 {Gray} Color= PrintArrow!
{ Map menu item to program }
Item [if=0 \Snake else
1- [if=0 \Racer else
1- [if=0 \Mandelbrot else
1- [if=0 \Pictures else
1- [if=0 \Credits else
1- [if=0 \Loader else
1- [if=0 \Tetronis else
1- [if=0 \Bricks else
2- [if<=0 \TinyBASIC else {TicTacToe and stand-alone BASIC}
1- [if=0 \WozMon else loop]]]]]]]]]]
Program=
]
pop ret
] SelectMenu=
{-----------------------------------------------------------------------+
|}>_vLR++ ret{ RAM page 4 |
+-----------------------------------------------------------------------}
*=$0400
{Newline}
[def
>Pos, 8+ >Pos.
2 <Pos.
ret
] Newline=
[def
#9 `Snake #9 ``` #9 `Tetronis #10
#9 `Racer #9 ``` #9 `Bricks #10
#9 `Mandelbrot #9 `TicTacToe #10
#9 `Pictures ``` #9 `BASIC #10
#9 `Credits #9 #9 `WozMon #10
#9 `Loader #10 #0
] MainMenu=
Code: Select all
{ Operate menu }
[def
push
0 Item=
[do
\frameCount, Color= PrintArrow!
{ Handle each stroke of Up/Down and A controller buttons }
{buttonDown}
\buttonState, 251^ [if=0
WipeOutArrow!
Item 1- [if<>0 1- if<>0 <Item++]
\buttonState, 4| \buttonState.]
{buttonUp}
\buttonState, 247^ [if=0
WipeOutArrow!
Item [if<>0 2- if<>0 Item 1- Item=]
\buttonState, 8| \buttonState.]
{buttonA, or any ASCII key from keyboard, 'A' included...}
\buttonState, 128& if<>0loop
42 {Gray} Color= PrintArrow!
{ Map menu item to program }
Item [if=0 \Loader else
1- [if<=0 \TinyBASIC
]]
Program=
]
pop ret
] SelectMenu=
{-----------------------------------------------------------------------+
|}>_vLR++ ret{ RAM page 4 |
+-----------------------------------------------------------------------}
*=$0400
{Newline}
[def
>Pos, 8+ >Pos.
2 <Pos.
ret
] Newline=
[def
#9 `Loader #10
#9 `BASIC #10 #0
] MainMenu=
ROM name:
- The name of the ROM is hard-coded in Core/Reset_vx.gcl, search for ``TTL`microcomputer` and change it appropriately, (it is a very good idea to change this if making a bespoke ROM, (I would say mandatory), so as not to cause later confusion.
MakeFile:
- Modify the MakeFile to include your new menu entries or reflect your deleted menu entries, e.g. I added this to the MakeFile.
Code: Select all
# ROM v4 BMWTCU
ROMv4_bmwtcu.rom: Core/* Apps/*/* MakeFile interface.json
python3 Core/ROMv4_bmwtcu.asm.py\
Apps/Loader/SYS_Loader_v3.py\
Loader=Apps/Loader/Loader_v3.gcl\
TinyBASIC=Apps/TinyBASIC/TinyBASIC_v3.gcl\
Main=Apps/MainMenu/MainMenu_v4_bmwtcu.gcl\
Reset=Core/Reset_v4_bmwtcu.gcl
burnv4_bmwtcu: ROMv4_bmwtcu.rom
minipro -p 'AT27C1024 @DIP40' -w "$<" -y -s
Code: Select all
Core/ROMv4_bmwtcu.asm.py
Apps/Loader/SYS_Loader_v3.py
Loader=Apps/Loader/Loader_v3.gcl
Main=Apps/MainMenu/MainMenu_v4_bmwtcu.gcl
Reset=Core/Reset_v4_bmwtcu.gcl
- I then built it with make -f MakeFile ROMv4_bmwtcu.rom, the -f MakeFile is not strictly needed, but if you change the MakeFile's name then it will come in handy.