mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-13 12:30:29 +00:00
Updated and cleaned up Applecorn disk image.
This commit is contained in:
parent
66bb51c646
commit
1da0773b2f
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -237,6 +237,8 @@ MAINZP MAC
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -471,3 +471,5 @@ OSBM2 ASC ').'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -447,3 +447,5 @@ BYTE76 LDX #$00 ; Update LEDs and return X=SHIFT
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -335,3 +335,5 @@ RELCOORD CLC
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1038,3 +1038,5 @@ ERROR27 DW $FF00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -212,3 +212,5 @@ HELLO ASC 'Applecorn MOS 2021-11-14'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -721,3 +721,5 @@ AUXBLK ASC '**ENDOFCODE**'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -78,3 +78,5 @@ OSGBPBCB EQU OSFILECB+1 ; OSGBPB control block
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -517,3 +517,5 @@ ECHOLP1 JSR GSREAD
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1012,3 +1012,5 @@ VDU01 RTS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -93,6 +93,8 @@ GEOFCMD EQU $D1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -232,6 +232,8 @@ MHGRTAB DW $2000,$2080,$2100,$2180,$2200,$2280,$2300,$2380
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
168
mainmem.init.s
168
mainmem.init.s
@ -9,98 +9,100 @@
|
||||
|
||||
* Trampoline in main memory used by aux memory IRQ handler
|
||||
* to invoke Apple II / ProDOS IRQs in main memory
|
||||
A2IRQ >>> IENTMAIN ; IENTMAIN does not do CLI
|
||||
JSR A2IRQ2
|
||||
>>> XF2AUX,IRQBRKRET
|
||||
A2IRQ2 PHP ; Fake things to look like IRQ
|
||||
JMP (A2IRQV) ; Call Apple II ProDOS ISR
|
||||
A2IRQ >>> IENTMAIN ; IENTMAIN does not do CLI
|
||||
JSR A2IRQ2
|
||||
>>> XF2AUX,IRQBRKRET
|
||||
A2IRQ2 PHP ; Fake things to look like IRQ
|
||||
JMP (A2IRQV) ; Call Apple II ProDOS ISR
|
||||
|
||||
* BRK handler in main memory. Used on Apple IIgs only.
|
||||
GSBRK >>> XF2AUX,GSBRKAUX
|
||||
GSBRK >>> XF2AUX,GSBRKAUX
|
||||
|
||||
* Set prefix if not already set
|
||||
SETPRFX LDA #GPFXCMD
|
||||
STA :OPC7 ; Initialize cmd byte to $C7
|
||||
:L1 JSR MLI
|
||||
:OPC7 DB $00
|
||||
DW GSPFXPL
|
||||
LDX DRVBUF1 ; was $0300
|
||||
BNE RTSINST
|
||||
LDA $BF30
|
||||
STA ONLNPL+1 ; Device number
|
||||
JSR MLI
|
||||
DB ONLNCMD
|
||||
DW ONLNPL
|
||||
LDA DRVBUF2 ; was $0301
|
||||
AND #$0F
|
||||
TAX
|
||||
INX
|
||||
STX DRVBUF1 ; was $0300
|
||||
LDA #'/'
|
||||
STA DRVBUF2 ; was $0301
|
||||
DEC :OPC7
|
||||
BNE :L1
|
||||
RTSINST LDA CMDPATH
|
||||
BEQ :GETPFX ; CMDPATH empty
|
||||
LDA CMDPATH+1
|
||||
CMP #'/'
|
||||
BEQ :GETPFXDONE ; CMDPATH already absolute path
|
||||
:GETPFX JSR MLI
|
||||
DB $C7 ; Get Prefix
|
||||
DW :GETADDR
|
||||
:GETPFXDONE RTS
|
||||
:GETADDR HEX 01 ; One parameter
|
||||
DW CMDPATH ; Get prefix to CMDPATH
|
||||
SETPRFX LDA #GPFXCMD
|
||||
STA :OPC7 ; Initialize cmd byte to $C7
|
||||
:L1 JSR MLI
|
||||
:OPC7 DB $00
|
||||
DW GSPFXPL
|
||||
LDX DRVBUF1 ; was $0300
|
||||
BNE RTSINST
|
||||
LDA $BF30
|
||||
STA ONLNPL+1 ; Device number
|
||||
JSR MLI
|
||||
DB ONLNCMD
|
||||
DW ONLNPL
|
||||
LDA DRVBUF2 ; was $0301
|
||||
AND #$0F
|
||||
TAX
|
||||
INX
|
||||
STX DRVBUF1 ; was $0300
|
||||
LDA #'/'
|
||||
STA DRVBUF2 ; was $0301
|
||||
DEC :OPC7
|
||||
BNE :L1
|
||||
RTSINST LDA CMDPATH
|
||||
BEQ :GETPFX ; CMDPATH empty
|
||||
LDA CMDPATH+1
|
||||
CMP #'/'
|
||||
BEQ :GETPFXDONE ; CMDPATH already absolute path
|
||||
:GETPFX JSR MLI
|
||||
DB $C7 ; Get Prefix
|
||||
DW :GETADDR
|
||||
:GETPFXDONE RTS
|
||||
:GETADDR HEX 01 ; One parameter
|
||||
DW CMDPATH ; Get prefix to CMDPATH
|
||||
|
||||
|
||||
* Disconnect /RAM ramdrive to avoid aux corruption
|
||||
* Stolen from Beagle Bros Extra K
|
||||
DISCONN LDA $BF98
|
||||
AND #$30
|
||||
CMP #$30
|
||||
BNE :S1
|
||||
LDA $BF26
|
||||
CMP $BF10
|
||||
BNE :S2
|
||||
LDA $BF27
|
||||
CMP $BF11
|
||||
BEQ :S1
|
||||
:S2 LDY $BF31
|
||||
:L1 LDA $BF32,Y
|
||||
AND #$F3
|
||||
CMP #$B3
|
||||
BEQ :S3
|
||||
DEY
|
||||
BPL :L1
|
||||
BMI :S1
|
||||
:S3 LDA $BF32,Y
|
||||
STA DRVBUF2+1 ; was $0302
|
||||
:L2 LDA $BF33,Y
|
||||
STA $BF32,Y
|
||||
BEQ :S4
|
||||
INY
|
||||
BNE :L2
|
||||
:S4 LDA $BF26
|
||||
STA DRVBUF1 ; was $0300
|
||||
LDA $BF27
|
||||
STA DRVBUF2 ; was $0301
|
||||
LDA $BF10
|
||||
STA $BF26
|
||||
LDA $BF11
|
||||
STA $BF27
|
||||
DEC $BF31
|
||||
:S1 RTS
|
||||
DISCONN LDA $BF98
|
||||
AND #$30
|
||||
CMP #$30
|
||||
BNE :S1
|
||||
LDA $BF26
|
||||
CMP $BF10
|
||||
BNE :S2
|
||||
LDA $BF27
|
||||
CMP $BF11
|
||||
BEQ :S1
|
||||
:S2 LDY $BF31
|
||||
:L1 LDA $BF32,Y
|
||||
AND #$F3
|
||||
CMP #$B3
|
||||
BEQ :S3
|
||||
DEY
|
||||
BPL :L1
|
||||
BMI :S1
|
||||
:S3 LDA $BF32,Y
|
||||
STA DRVBUF2+1 ; was $0302
|
||||
:L2 LDA $BF33,Y
|
||||
STA $BF32,Y
|
||||
BEQ :S4
|
||||
INY
|
||||
BNE :L2
|
||||
:S4 LDA $BF26
|
||||
STA DRVBUF1 ; was $0300
|
||||
LDA $BF27
|
||||
STA DRVBUF2 ; was $0301
|
||||
LDA $BF10
|
||||
STA $BF26
|
||||
LDA $BF11
|
||||
STA $BF27
|
||||
DEC $BF31
|
||||
:S1 RTS
|
||||
|
||||
* Reset handler - invoked on Ctrl-Reset
|
||||
* XFER to AUXMOS ($C000) in aux, AuxZP on, LC on
|
||||
RESET TSX
|
||||
STX $0100
|
||||
LDA $C058 ; AN0 off
|
||||
LDA $C05A ; AN1 off
|
||||
LDA $C05D ; AN2 on
|
||||
LDA $C05F ; AN3 on
|
||||
LDA #$20 ; Turn off PAGE2 shadow on ROM3 GS
|
||||
TSB $C035
|
||||
>>> XF2AUX,AUXMOS
|
||||
RTS
|
||||
RESET TSX
|
||||
STX $0100
|
||||
LDA $C058 ; AN0 off
|
||||
LDA $C05A ; AN1 off
|
||||
LDA $C05D ; AN2 on
|
||||
LDA $C05F ; AN3 on
|
||||
LDA #$20 ; Turn off PAGE2 shadow on ROM3 GS
|
||||
TSB $C035
|
||||
>>> XF2AUX,AUXMOS
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
|
@ -221,4 +221,6 @@ LOADCODE PHP ; Save carry flag
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -135,6 +135,8 @@ QUITPL HEX 04 ; Number of parameters
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
230
mainmem.menu.s
230
mainmem.menu.s
@ -6,17 +6,17 @@
|
||||
* 13-Nov-2021 List of selected ROMs kept locally.
|
||||
|
||||
|
||||
ROMMAX EQU $0382
|
||||
ROMTHIS EQU $0383
|
||||
ROMADDRS EQU $0384 ; List of ROM filename addresses
|
||||
ROMMAX EQU $0382
|
||||
ROMTHIS EQU $0383
|
||||
ROMADDRS EQU $0384 ; List of ROM filename addresses
|
||||
|
||||
ROMMENU JSR HOME ; Clear screen
|
||||
LDX #0
|
||||
:LP0 LDA TITLE1,X ; Print title
|
||||
BEQ :LP1
|
||||
JSR COUT1
|
||||
INX
|
||||
BNE :LP0
|
||||
ROMMENU JSR HOME ; Clear screen
|
||||
LDX #0
|
||||
:LP0 LDA TITLE1,X ; Print title
|
||||
BEQ :LP1
|
||||
JSR COUT1
|
||||
INX
|
||||
BNE :LP0
|
||||
:LP1
|
||||
|
||||
* LDA #<TITLE1 ; Print title
|
||||
@ -24,10 +24,10 @@ ROMMENU JSR HOME ; Clear screen
|
||||
* LDA #>TITLE1
|
||||
* STA A1H
|
||||
* JSR PRSTRA1
|
||||
JSR CROUT
|
||||
JSR CROUT
|
||||
* TEMP
|
||||
; LDA #$00
|
||||
; JMP :KEYOK
|
||||
* LDA #$00
|
||||
* JMP :KEYOK
|
||||
* TEMP
|
||||
* JSR CROUT
|
||||
* LDA #<TITLE2
|
||||
@ -53,72 +53,72 @@ ROMMENU JSR HOME ; Clear screen
|
||||
* 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 STA USERSEL ; Record selection
|
||||
: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 STA USERSEL ; Record selection
|
||||
|
||||
* Make list of ROMs
|
||||
LDX #63
|
||||
LDA #0
|
||||
:INITLP1 STA ROMADDRS,X
|
||||
DEX
|
||||
BPL :INITLP1
|
||||
STX ROMTHIS ; Current ROM=none
|
||||
LDY USERSEL ; Index to ROM to load
|
||||
LDA #0 ; Load it to bank 0
|
||||
CPY #6
|
||||
BCC :INITROM2 ; <6, single ROM
|
||||
LDA #1 ; Load to bank 1 and 0
|
||||
CPY #7
|
||||
BCC :INITROM2 ; =7, two ROMs
|
||||
LDA #7 ; Load to bank 7 to 0
|
||||
LDY #0 ; Starting at ROM 0
|
||||
:INITROM2 STA ROMMAX
|
||||
ASL A
|
||||
TAX ; X=>ROM address table
|
||||
TYA
|
||||
ASL A
|
||||
TAY ; Y=>ROM addresses
|
||||
:INITROM3 LDA ROMLIST+0,Y
|
||||
STA ROMADDRS+0,X
|
||||
LDA ROMLIST+1,Y
|
||||
STA ROMADDRS+1,X
|
||||
INY
|
||||
INY
|
||||
DEX
|
||||
DEX
|
||||
BPL :INITROM3
|
||||
RTS
|
||||
LDX #63
|
||||
LDA #0
|
||||
:INITLP1 STA ROMADDRS,X
|
||||
DEX
|
||||
BPL :INITLP1
|
||||
STX ROMTHIS ; Current ROM=none
|
||||
LDY USERSEL ; Index to ROM to load
|
||||
LDA #0 ; Load it to bank 0
|
||||
CPY #6
|
||||
BCC :INITROM2 ; <6, single ROM
|
||||
LDA #1 ; Load to bank 1 and 0
|
||||
CPY #7
|
||||
BCC :INITROM2 ; =7, two ROMs
|
||||
LDA #7 ; Load to bank 7 to 0
|
||||
LDY #0 ; Starting at ROM 0
|
||||
:INITROM2 STA ROMMAX
|
||||
ASL A
|
||||
TAX ; X=>ROM address table
|
||||
TYA
|
||||
ASL A
|
||||
TAY ; Y=>ROM addresses
|
||||
:INITROM3 LDA ROMLIST+0,Y
|
||||
STA ROMADDRS+0,X
|
||||
LDA ROMLIST+1,Y
|
||||
STA ROMADDRS+1,X
|
||||
INY
|
||||
INY
|
||||
DEX
|
||||
DEX
|
||||
BPL :INITROM3
|
||||
RTS
|
||||
|
||||
SELECTROM >>> ENTMAIN
|
||||
CMP ROMTHIS
|
||||
BEQ :SELECTDONE ; Already selected
|
||||
CMP ROMMAX
|
||||
BCC :GETROM
|
||||
BNE :SELECTDONE ; Out of range
|
||||
:GETROM PHA
|
||||
ASL A
|
||||
TAX
|
||||
LDA ROMADDRS+0,X ; ROM filename
|
||||
STA OPENPL+1
|
||||
LDA ROMADDRS+1,X
|
||||
STA OPENPL+2
|
||||
LDA #$80 ; Load address $8000
|
||||
LDX #$00
|
||||
SEC ; Aux memory
|
||||
JSR LOADCODE ; Try and fetch it
|
||||
PLA ; Get bank back
|
||||
BCS :SELECTDONE ; Failed
|
||||
STA ROMTHIS ; It is paged in
|
||||
:SELECTDONE >>> XF2AUX,ROMSELDONE
|
||||
SELECTROM >>> ENTMAIN
|
||||
CMP ROMTHIS
|
||||
BEQ :SELECTDONE ; Already selected
|
||||
CMP ROMMAX
|
||||
BCC :GETROM
|
||||
BNE :SELECTDONE ; Out of range
|
||||
:GETROM PHA
|
||||
ASL A
|
||||
TAX
|
||||
LDA ROMADDRS+0,X ; ROM filename
|
||||
STA OPENPL+1
|
||||
LDA ROMADDRS+1,X
|
||||
STA OPENPL+2
|
||||
LDA #$80 ; Load address $8000
|
||||
LDX #$00
|
||||
SEC ; Aux memory
|
||||
JSR LOADCODE ; Try and fetch it
|
||||
PLA ; Get bank back
|
||||
BCS :SELECTDONE ; Failed
|
||||
STA ROMTHIS ; It is paged in
|
||||
:SELECTDONE >>> XF2AUX,ROMSELDONE
|
||||
|
||||
|
||||
** Print a string pointed to by A1L/A1H
|
||||
@ -133,10 +133,10 @@ SELECTROM >>> ENTMAIN
|
||||
*:NULL PLY
|
||||
* RTS
|
||||
|
||||
TITLE1 ASC "** APPLECORN **"
|
||||
DB $8D,$8D
|
||||
TITLE2 ASC "Choose a BBC Micro ROM:"
|
||||
DB $8D,$8D
|
||||
TITLE1 ASC "** APPLECORN **"
|
||||
DB $8D,$8D
|
||||
TITLE2 ASC "Choose a BBC Micro ROM:"
|
||||
DB $8D,$8D
|
||||
|
||||
*MSGTBL DW MSG1
|
||||
* DW MSG2
|
||||
@ -147,44 +147,46 @@ TITLE2 ASC "Choose a BBC Micro ROM:"
|
||||
* DW MSG7
|
||||
* DW MSG8
|
||||
|
||||
MSG1 ASC " 1. BBC BASIC"
|
||||
DB $8D,$8D
|
||||
MSG2 ASC " 2. Acornsoft COMAL"
|
||||
DB $8D,$8D
|
||||
MSG3 ASC " 3. Acornsoft Lisp"
|
||||
DB $8D,$8D
|
||||
MSG4 ASC " 4. Acornsoft Forth"
|
||||
DB $8D,$8D
|
||||
MSG5 ASC " 5. Acornsoft MicroProlog"
|
||||
DB $8D,$8D
|
||||
MSG6 ASC " 6. Acornsoft BCPL"
|
||||
DB $8D,$8D
|
||||
MSG7 ASC " 7. Acornsoft ISO Pascal (2 ROMs)"
|
||||
DB $8D,$8D
|
||||
MSG8 ASC " 8. Everything! (8 ROMs)"
|
||||
DB $8D
|
||||
DB $00
|
||||
MSG1 ASC " 1. BBC BASIC"
|
||||
DB $8D,$8D
|
||||
MSG2 ASC " 2. Acornsoft COMAL"
|
||||
DB $8D,$8D
|
||||
MSG3 ASC " 3. Acornsoft Lisp"
|
||||
DB $8D,$8D
|
||||
MSG4 ASC " 4. Acornsoft Forth"
|
||||
DB $8D,$8D
|
||||
MSG5 ASC " 5. Acornsoft MicroProlog"
|
||||
DB $8D,$8D
|
||||
MSG6 ASC " 6. Acornsoft BCPL"
|
||||
DB $8D,$8D
|
||||
MSG7 ASC " 7. Acornsoft ISO Pascal (2 ROMs)"
|
||||
DB $8D,$8D
|
||||
MSG8 ASC " 8. Everything! (8 ROMs)"
|
||||
DB $8D
|
||||
DB $00
|
||||
|
||||
|
||||
ROMLIST DW ROM1
|
||||
DW ROM2
|
||||
DW ROM3
|
||||
DW ROM4
|
||||
DW ROM5
|
||||
DW ROM6
|
||||
DW ROM7
|
||||
DW ROM8
|
||||
ROMLIST DW ROM1
|
||||
DW ROM2
|
||||
DW ROM3
|
||||
DW ROM4
|
||||
DW ROM5
|
||||
DW ROM6
|
||||
DW ROM7
|
||||
DW ROM8
|
||||
|
||||
ROM1 STR "BASIC2.ROM"
|
||||
ROM2 STR "COMAL.ROM"
|
||||
ROM3 STR "LISP501.ROM"
|
||||
ROM4 STR "FORTH103.ROM"
|
||||
ROM5 STR "MPROLOG310.ROM"
|
||||
ROM6 STR "BCPL700.ROM"
|
||||
ROM7 STR "PASCAL110A.ROM"
|
||||
ROM8 STR "PASCAL110B.ROM"
|
||||
|
||||
USERSEL DB $00
|
||||
|
||||
ROM1 STR "BASIC2.ROM"
|
||||
ROM2 STR "COMAL.ROM"
|
||||
ROM3 STR "LISP501.ROM"
|
||||
ROM4 STR "FORTH103.ROM"
|
||||
ROM5 STR "MPROLOG310.ROM"
|
||||
ROM6 STR "BCPL700.ROM"
|
||||
ROM7 STR "PASCAL110A.ROM"
|
||||
ROM8 STR "PASCAL110B.ROM"
|
||||
|
||||
USERSEL DB $00
|
||||
|
||||
|
||||
|
||||
|
@ -187,3 +187,5 @@ FILEREFS DB $00,$00,$00,$00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -316,6 +316,8 @@ PREFIX DS 65 ; Buffer for ProDOS prefix
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1123,3 +1123,5 @@ MAINRDEXIT >>> XF2AUX,NULLRTS ; Back to an RTS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -426,6 +426,8 @@ MATCHBUF DS 65 ; For storing match results (Pascal str)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user