Added simple ROM selection menu.

This commit is contained in:
Bobbi Webber-Manners 2021-08-10 15:10:15 -04:00
parent e199eb4ac2
commit d781709ed5
6 changed files with 126 additions and 21 deletions

Binary file not shown.

View File

@ -152,6 +152,7 @@ WRTAUX MAC
* Code is all included from PUT files below ...
* ... order matters!
PUT LOADER
PUT MAIN.ROMMENU
PUT MAINMEM
PUT AUXMEM.MOSEQU
PUT AUXMEM.INIT
@ -163,4 +164,3 @@ WRTAUX MAC
PUT AUXMEM.CHARIO
PUT AUXMEM.MISC

View File

@ -1,5 +1,5 @@
#!/bin/sh
for file in APPLECORN AUXMEM.BYTWRD AUXMEM.CHARIO AUXMEM.HOSTFS AUXMEM.INIT AUXMEM.KERNEL AUXMEM.MISC AUXMEM.MOSEQU AUXMEM.VDU LOADER MAINMEM; do
for file in APPLECORN AUXMEM.BYTWRD AUXMEM.CHARIO AUXMEM.HOSTFS AUXMEM.INIT AUXMEM.KERNEL AUXMEM.MISC AUXMEM.MOSEQU AUXMEM.VDU LOADER MAINMEM MAIN.ROMMENU; do
cadius extractfile applecorn.po /APPLECORN/${file}.S .
rm _FileInformation.txt
cadius clearhighbit ${file}.S\#040000

View File

@ -7,13 +7,9 @@
* to aux memory starting at $08000. Copies Applecorn MOS
* to aux memory starting at AUXMOS1 and jumps to it.
* (Note that the MOS code will relocate itself to $D000.)
START STZ :BLOCKS
START JSR ROMMENU
STZ :BLOCKS
LDX #$00
:L1 LDA HELLO,X ; Signon message
BEQ :S1
JSR COUT1
INX
BRA :L1
:S1 JSR CROUT
JSR SETPRFX
JSR DISCONN
@ -22,10 +18,6 @@ START STZ :BLOCKS
STZ $9F ; WARMSTRT - set cold!
STA $C008 ; Alt ZP off
LDA #<ROMFILE
STA OPENPL+1
LDA #>ROMFILE
STA OPENPL+2
JSR OPENFILE ; Open ROM file
BCC :S2
LDX #$00
@ -110,5 +102,6 @@ START STZ :BLOCKS
:BLOCKS DB 0 ; Counter for blocks read
CANTOPEN ASC "Unable to open ROM file"
DB $00

120
main.rommenu.s Normal file
View File

@ -0,0 +1,120 @@
* MAIN.ROMMENU.S
* (c) Bobbi 2021 GPL3
*
* Applecorn ROM menu
ROMMENU LDA #<TITLE1 ; Print title
STA A1L
LDA #>TITLE1
STA A1H
JSR PRSTRA1
JSR CROUT
JSR CROUT
LDA #<TITLE2
STA A1L
LDA #>TITLE2
STA A1H
JSR PRSTRA1
JSR CROUT
JSR CROUT
JSR CROUT
LDX #$00 ; Print menu
:L1 LDA MSGTBL,X
STA A1L
INX
LDA MSGTBL,X
STA A1H
INX
JSR PRSTRA1
JSR CROUT
JSR CROUT
CPX #8*2
BEQ :KEYIN
BRA :L1
:KEYIN LDA $C000 ; Kdb data / strobe
BPL :KEYIN ; Wait for keystroke
STA $C010 ; Clear strobe
AND #$7F
SEC
SBC #'1' ; '1'->0, '2'->1 etc.
CMP #8
BCC :KEYOK
JSR BELL ; Invalid - beep
BRA :KEYIN ; Go again
:KEYOK ASL ; x2
TAX
LDA ROMTBL,X ; Fetch ROM filename ...
STA OPENPL+1 ; ... and put in MLI OPEN PL
LDA ROMTBL+1,X
STA OPENPL+2
RTS
* Print a string pointed to by A1L/A1H
* Trashes A, preserves X and Y
PRSTRA1 PHY
LDY #$00
:L1 LDA (A1L),Y
BEQ :NULL
JSR COUT1
INY
BRA :L1
:NULL PLY
RTS
TITLE1 ASC "** APPLECORN **"
DB $00
TITLE2 ASC "Choose a BBC Micro ROM:"
DB $00
MSGTBL DW MSG1
DW MSG2
DW MSG3
DW MSG4
DW MSG5
DW MSG6
DW MSG7
DW MSG8
ROMTBL DW ROM1
DW ROM2
DW ROM3
DW ROM4
DW ROM5
DW ROM6
DW ROM7
DW ROM8
MSG1 ASC " 1. BBC BASIC"
DB $00
ROM1 STR "BASIC2.ROM"
MSG2 ASC " 2. Acornsoft COMAL"
DB $00
ROM2 STR "COMAL.ROM"
MSG3 ASC " 3. Acornsoft Lisp"
DB $00
ROM3 STR "LISP501.ROM"
MSG4 ASC " 4. Acornsoft Forth"
DB $00
ROM4 STR "FORTH103.ROM"
MSG5 ASC " 5. Acornsoft MicroProlog"
DB $00
ROM5 STR "MPROLOG310.ROM"
MSG6 ASC " 6. Acornsoft BCPL - Not working yet"
DB $00
ROM6 STR "BCPL7.0.ROM"
MSG7 ASC " 7. USERROM1.ROM"
DB $00
ROM7 STR "USERROM1.ROM"
MSG8 ASC " 8. USERROM2.ROM"
DB $00
ROM8 STR "USERROM2.ROM"

View File

@ -642,12 +642,6 @@ WRTFILE JSR MLI
DW WRITEPL
RTS
HELLO ASC "Applecorn - (c) Bobbi 2021 GPLv3"
HEX 00
CANTOPEN ASC "Unable to open BASIC.ROM"
HEX 00
ROMFILE STR "BASIC.ROM"
* ProDOS Parameter lists for MLI calls
OPENPL HEX 03 ; Number of parameters
DW $0000 ; Pointer to filename
@ -741,5 +735,3 @@ FBSTRT DW $0000 ; Start address for SAVE
FBEND DW $0000 ; End address for SAVE
DW $0000