16 Commits 326375a953 ... c336c2b4d6

Author SHA1 Message Date
  Zeda Thomas c336c2b4d6 Merge branch 'master' of https://eeems.codes/Zeda/Grammer2 4 years ago
  Zeda Thomas 91088dd90b Merge branch 'master' of https://github.com/Zeda/Grammer2 4 years ago
  Zeda Thomas a08b9543a3 fied modemenu bug 4 years ago
  Zeda Thomas 49aa5d5135 Merge pull request #47 from NonstickAtom785/patch-2 4 years ago
  NonstickAtom785 8b85456bb0 Set optional argument as `a`. 4 years ago
  Zeda Thomas 1132e76f54 Merge pull request #46 from NonstickAtom785/master 4 years ago
  NonstickAtom785 b4e9a8c005 Merge pull request #2 from NonstickAtom785/patch-2 4 years ago
  NonstickAtom785 4773127b79 Updated some documentation 4 years ago
  NonstickAtom785 91183a9842 Added a compile all argument. 4 years ago
  NonstickAtom785 d7850a13c4 Last fix 4 years ago
  NonstickAtom785 c7223ca07a Fixed version 4 years ago
  NonstickAtom785 3a30070aa0 Beautified Again! 4 years ago
  NonstickAtom785 24c6528bdd Update compile.bat 4 years ago
  NonstickAtom785 8249bbe81a Beautify compile.bat 4 years ago
  NonstickAtom785 8117ddd069 Add Program Launcher 4 years ago
  NonstickAtom785 d1fa6ac50c Merge pull request #1 from Zeda/master 4 years ago
4 changed files with 61 additions and 44 deletions
  1. 1 1
      Readme.md
  2. 37 37
      compile.bat
  3. 3 0
      src/io/menu.z80
  4. 20 6
      src/modemenu.z80

+ 1 - 1
Readme.md

@@ -21,6 +21,6 @@ Windows, @NonstickAtom785 has built the fixed version and posted it [here](https
 From the command line, run `./compile`
 From the command line, run `./compile`
 
 
 ## Windows:
 ## Windows:
-Download Windows [`spasm-ng`](https://github.com/alberthdev/spasm-ng/releases) release, rename it to `spasm.exe` and place it in the project directory. From command prompt or powershell cd to the project directory and run `compile.bat`.
+Download the Windows [`spasm-ng`](https://github.com/alberthdev/spasm-ng/releases) release, rename it to `spasm.exe` and place it in the project directory. From command prompt do `compile` (or if you prefer powershell... do `./compile`). Read the above note if you are getting errors.
 
 
 This generates the jump table and compiles the app and Grammer package.
 This generates the jump table and compiles the app and Grammer package.

+ 37 - 37
compile.bat

@@ -1,37 +1,37 @@
-@echo off
-
-
-if exist spasm.exe (
-  echo "Starting Compile..."
-) else (
-  echo "Opening readme..."
-  start "" https://github.com/Zeda/Grammer2/blob/master/Readme.md
-  exit
-         )
-
-cd src
-
-rem Generates the jumptable and grammer2.5.inc file together.
-  echo "Generating grammer2.5.inc"
-  python ..\tools\jt.py jmptable.z80 grammer2.5.inc
-  copy /Y grammer2.5.inc ..\docs\grammer2.5.inc
-
-    echo "Assembling App"
-    ..\spasm.exe grammer.z80 ..\bin\grammer.8xk -I ..\z80float\single
-
-rem If the second command line argument is -ca then compile everything else.
-if "%1"=="-ca" (
-    echo "Assembling Default Package"
-    ..\spasm.exe grampkg.z80 ..\bin\grampkg.8xv
-
-rem Install experimental package
-     	echo "Assembling Experimental Package"
-   	..\spasm.exe experimental\experimental.z80 ..\bin\EXPRMNTL.8xv -I single
-
-rem Install program launcher
-    echo "Assembling Program Launcher"
-    ..\spasm.exe launch.z80 ..\bin\g250.8xp
-    
-)
-
-cd..
+@echo off
+
+
+if exist spasm.exe (
+  echo "Starting Compile..."
+) else (
+  echo "Opening readme..."
+  start "" https://github.com/Zeda/Grammer2/blob/master/Readme.md
+  exit
+         )
+
+cd src
+
+rem Generates the jumptable and grammer2.5.inc file together.
+  echo "Generating grammer2.5.inc"
+  python ..\tools\jt.py jmptable.z80 grammer2.5.inc
+  copy /Y grammer2.5.inc ..\docs\grammer2.5.inc
+
+    echo "Assembling App"
+    ..\spasm.exe grammer.z80 ..\bin\grammer.8xk -I ..\z80float\single
+
+rem If the second command line argument is -ca then compile everything else.
+if "%1"=="a" (
+    echo "Assembling Default Package"
+    ..\spasm.exe grampkg.z80 ..\bin\grampkg.8xv
+
+rem Install experimental package
+     	echo "Assembling Experimental Package"
+   	..\spasm.exe experimental\experimental.z80 ..\bin\EXPRMNTL.8xv -I single
+
+rem Install program launcher
+    echo "Assembling Program Launcher"
+    ..\spasm.exe launch.z80 ..\bin\g250.8xp
+
+)
+
+cd..

+ 3 - 0
src/io/menu.z80

@@ -45,6 +45,8 @@ menuroutine:
 ;   HL points to the header
 ;   HL points to the header
 ;   IX points to the get/select code
 ;   IX points to the get/select code
 ;     If you are using the TI-OS VPutS routine, you'll need to have the textWrite flag set in sGrFlags
 ;     If you are using the TI-OS VPutS routine, you'll need to have the textWrite flag set in sGrFlags
+;   (font_height) is the height of the font
+;   (menu_header_get) points to a routine that fetches the menu header.
 ;Notes:
 ;Notes:
 ;   The header is set up as follows:
 ;   The header is set up as follows:
 ;       .db number_of_titles
 ;       .db number_of_titles
@@ -59,6 +61,7 @@ menuroutine:
 ;       carry flag is reset if it needs to return a pointer to the string for the element
 ;       carry flag is reset if it needs to return a pointer to the string for the element
 ;           Return carry flag as set if the element is out-of-bounds.
 ;           Return carry flag as set if the element is out-of-bounds.
 ;       carry flag is set if it needs to return a pointer to the data for the element
 ;       carry flag is set if it needs to return a pointer to the data for the element
+
   ld (menucallptr),ix
   ld (menucallptr),ix
 
 
 ;save box dimensions
 ;save box dimensions

+ 20 - 6
src/modemenu.z80

@@ -1,29 +1,43 @@
 modemenu:
 modemenu:
-
 ;Set the font to the pixel-aligned font
 ;Set the font to the pixel-aligned font
   ld a,2
   ld a,2
   ld (textmode),a
   ld (textmode),a
 
 
-  ld hl,modemenu_header
-  ld de,mode_menu_header_RAM
+
+  ld hl,modemenu_header+5
+  ld de,mode_menu_header_RAM+5
   ld bc,6
   ld bc,6
-  ldir
+  ld a,c
+  ld (font_height),a
+  lddr
 
 
   ld (menutopinit),bc
   ld (menutopinit),bc
   ld (menudefault),bc
   ld (menudefault),bc
 
 
+  ld hl,menu_header_getter
+  ld (menu_header_get),hl
+
+  ex de,hl
+  inc hl
   ld bc,$120D
   ld bc,$120D
   ld de,$3B27
   ld de,$3B27
-  ld hl,mode_menu_header_RAM
   ld ix,modemenu_getselect
   ld ix,modemenu_getselect
 
 
   call menuroutine
   call menuroutine
 
 
-;Set the font to the grid-aligned
   xor a
   xor a
   ld (textmode),a
   ld (textmode),a
   ret
   ret
 
 
+mode_menu_header_getter:
+  or a
+  jr z,$+4
+  xor a
+  ret
+  ld hl,mode_menu_header_RAM
+  or h
+  ret
+
 modemenu_getselect:
 modemenu_getselect:
   jr nc,modemenu_opt
   jr nc,modemenu_opt
 ; If the user pressed [Enter], then we need to re-enter!
 ; If the user pressed [Enter], then we need to re-enter!