Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-10-21 16:25:37 +02:00
parent bc9b9c3b58
commit 428cc20154
6 changed files with 120 additions and 23 deletions

Binary file not shown.

View File

@ -64,7 +64,14 @@ A2osX.CPUTYPE .EQ $BEE6
A2osX.CPUSPEED .EQ $BEE7 WORD, (->255.99 Mhz) A2osX.CPUSPEED .EQ $BEE7 WORD, (->255.99 Mhz)
A2osX.Z80SLOT .EQ $BEE9 A2osX.Z80SLOT .EQ $BEE9
A2osX.Z80SPEED .EQ $BEEA WORD A2osX.HWType .EQ $BEEA
A2osX.HWType.UNKNOWN .EQ 0
A2osX.HWType.IIe .EQ 1
A2osX.HWType.IIc .EQ 2
A2osX.HWType.IIgs .EQ 3
A2osX.HWSubT .EQ $BEEB
A2osX.HWSubT.Enh .EQ 1
A2osX.HWSubT.LCCard .EQ 2
A2osX.TIMER16 .EQ $BEEC WORD A2osX.TIMER16 .EQ $BEEC WORD
A2osX.RANDOM16 .EQ $BEEE WORD A2osX.RANDOM16 .EQ $BEEE WORD

View File

@ -10,6 +10,7 @@ Kernel.Init2 sei
stx A2osX.SaveSX stx A2osX.SaveSX
ldx #Kernel.ZP.S-1 ldx #Kernel.ZP.S-1
.1 lda Kernel.ZP,x .1 lda Kernel.ZP,x
sta CHARGET,x sta CHARGET,x
dex dex
@ -18,12 +19,12 @@ Kernel.Init2 sei
sta CLRALTZP sta CLRALTZP
>LDYAI MSG.Init2 >LDYAI MSG.Init2
jsr PrintFYA jsr PrintFYA
>LDYAI A2osX.MAIN >LDYAI A2osX.MAIN
>STYA ZPPtr1 >STYA ZPPtr1
>LDYAI CORE.Run >LDYAI CORE.Run
>STYA ZPPtr2 >STYA ZPPtr2
>LDYAI A2osX.MAIN.S^$FFFF >LDYAI A2osX.MAIN.S^$FFFF
jsr Kernel.Move jsr Kernel.Move
>LDYAI A2osX.AUX >LDYAI A2osX.AUX
@ -34,13 +35,14 @@ Kernel.Init2 sei
>STYA A4L Dst Address (AUX) >STYA A4L Dst Address (AUX)
sec Main To Aux sec Main To Aux
jsr AuxMove jsr AuxMove
>LDYAI A2osX.GP >LDYAI A2osX.GP
>STYA ZPPtr1 >STYA ZPPtr1
>LDYAI A2osX.SYSCALL >LDYAI A2osX.SYSCALL
>STYA ZPPtr2 >STYA ZPPtr2
>LDYAI A2osX.GP.S^$FFFF >LDYAI A2osX.GP.S^$FFFF
jsr Kernel.Move jsr Kernel.Move
>LDYAI A2osX.GPX >LDYAI A2osX.GPX
>STYA A1L Src Start Address (MAIN) >STYA A1L Src Start Address (MAIN)
>LDYAI A2osX.D1 >LDYAI A2osX.D1
@ -59,8 +61,8 @@ Kernel.Init2 sei
>LDYAI $D000 >LDYAI $D000
>STYA ZPPtr2 >STYA ZPPtr2
>LDYAI A2osX.D2.S^$FFFF >LDYAI A2osX.D2.S^$FFFF
jsr Kernel.Move jsr Kernel.Move
bit RRAMWRAMBNK1 bit RRAMWRAMBNK1
bit RRAMWRAMBNK1 bit RRAMWRAMBNK1
@ -69,18 +71,19 @@ Kernel.Init2 sei
>LDYAI $D000 >LDYAI $D000
>STYA ZPPtr2 >STYA ZPPtr2
>LDYAI A2osX.D1.S^$FFFF >LDYAI A2osX.D1.S^$FFFF
jsr Kernel.Move jsr Kernel.Move
>LDYAI A2osX.E0 >LDYAI A2osX.E0
>STYA ZPPtr1 >STYA ZPPtr1
>LDYAI $E000 >LDYAI $E000
>STYA ZPPtr2 >STYA ZPPtr2
>LDYAI A2osX.E0.S^$FFFF >LDYAI A2osX.E0.S^$FFFF
jsr Kernel.Move jsr Kernel.Move
bit RROMBNK1 bit RROMBNK1
sta CLRALTZP sta CLRALTZP
cli cli
jsr KConfigLoad jsr KConfigLoad
lda A2osX.HZ lda A2osX.HZ
pha pha
@ -139,13 +142,18 @@ Kernel.Init3 sta SETALTZP
iny #S.PS.hStdErr iny #S.PS.hStdErr
sta (pPs),y sta (pPs),y
*-------------------------------------- *--------------------------------------
Kernel.Init3C >LDYAI MSG.Init3 Kernel.Init3C >PUSHBI 0
>SYSCALL2 puts >LDYAI MSG.Init3
>SYSCALL2 printf
jsr HW.Detect
jsr CPU.Init.6502 jsr CPU.Init.6502
jsr CPU.Init.Z80 jsr CPU.Init.Z80
>DEBUG
jsr DevMgrInit jsr DevMgrInit
jsr IrqMgrInit jsr IrqMgrInit
@ -358,6 +366,64 @@ SysScrInit.TTYPtrs
sta FD.TTY+S.FD.DEV.BUFPTR+1 sta FD.TTY+S.FD.DEV.BUFPTR+1
rts rts
*-------------------------------------- *--------------------------------------
* http://www.1000bit.it/support/manuali/apple/technotes/misc/tn.misc.02.html
* https://mirrors.apple2.org.za/apple.cabi.net/FAQs.and.INFO/A2.TECH.NOTES.ETC/A2.CLASSIC.TNTS/a2misc007(1).htm
*--------------------------------------
HW.Detect >PUSHBI 0
>LDYAI MSG.HW
>SYSCALL2 printf
bit RROMBNK1
stz A2osX.HWType
stz A2osX.HWSubT
sec
jsr $FE1F IIgs ?
bcs .2
lda #A2osX.HWType.IIgs
sta A2osX.HWType
cpy #2
bcs .1
iny
.1 sty A2osX.HWSubT
bra .8
.2 lda $FBC0
beq .4 //c
ldx #A2osX.HWType.IIe
stx A2osX.HWType
cmp #$EA
beq .8 //e OLD ROMs
inc A2osX.HWSubT //e Enh ROMs
lda $FBDD
cmp #2
bne .8
inc A2osX.HWSubT //e LC card
bra .8
.4 lda #A2osX.HWType.IIc
sta A2osX.HWType
lda $FBBF
sta A2osX.HWSubT
.8 bit RRAMWRAMBNK1
bit RRAMWRAMBNK1
>PUSHB A2osX.HWSubT
>PUSHB A2osX.HWType
>PUSHBI 2
>LDYAI MSG.HW.TypeSubT
>SYSCALL2 printf
rts
*--------------------------------------
CPU.Init.6502 >PUSHBI 0 CPU.Init.6502 >PUSHBI 0
>LDYAI MSG.CPU >LDYAI MSG.CPU
>SYSCALL2 printf >SYSCALL2 printf
@ -370,20 +436,23 @@ CPU.Init.6502 >PUSHBI 0
lda MSG.CPUTYPE+1,x lda MSG.CPUTYPE+1,x
>SYSCALL2 puts >SYSCALL2 puts
lda MACHID >PUSHBI 0
and #MACHID.T
cmp #MACHID.T.IIc
bne .10
jmp CPU.Init.Z80
.10 >PUSHBI 0
>LDYAI MSG.CPU.SPEED >LDYAI MSG.CPU.SPEED
>SYSCALL2 printf >SYSCALL2 printf
stz A2osX.RANDOM16 stz A2osX.RANDOM16
stz A2osX.RANDOM16+1 stz A2osX.RANDOM16+1
php php
sei sei
lda MACHID
and #MACHID.T
cmp #MACHID.T.IIc
bne .1
.1 bit VBL .1 bit VBL
bpl .2 bpl .2
@ -402,12 +471,22 @@ CPU.Init.6502 >PUSHBI 0
bit VBL (4) bit VBL (4)
bpl .3 (2*) bpl .3 (2*)
bmi .6 bmi .6
.5 nop (2) .5 nop (2)
nop (2) nop (2)
nop (2) nop (2)
bit VBL (4) bit VBL (4)
bpl .3 (2*) bpl .3 (2*)
.6 plp
.6 lda MACHID
and #MACHID.T
cmp #MACHID.T.IIc
bne .60
.60 plp
stz A2osX.CPUSPEED stz A2osX.CPUSPEED
.7 sec .7 sec
@ -655,6 +734,7 @@ DevMgrInit.AddBDev.RTS
*-------------------------------------- *--------------------------------------
IrqMgrInit >LDYAI MSG.IRQ IrqMgrInit >LDYAI MSG.IRQ
>SYSCALL2 puts >SYSCALL2 puts
php php
sei sei
>LDYA $FFFE >LDYA $FFFE
@ -671,6 +751,11 @@ IrqMgrInit >LDYAI MSG.IRQ
sta IRQ.INTNUM sta IRQ.INTNUM
plp plp
lda A2osX.HWType
cmp #A2osX.HWType.IIgs
beq .80
jsr IrqMgrInit.TClock jsr IrqMgrInit.TClock
bcs .1 bcs .1
lda #"C" lda #"C"
@ -697,7 +782,7 @@ IrqMgrInit >LDYAI MSG.IRQ
.8 jsr IrqMgrInit.HZ2Tick .8 jsr IrqMgrInit.HZ2Tick
lda #"P" lda #"P"
sta IRQ.Mode .80 sta IRQ.Mode
>LDYAI MSG.IRQ.POLL >LDYAI MSG.IRQ.POLL
>SYSCALL2 puts >SYSCALL2 puts
clc clc
@ -984,7 +1069,8 @@ MSG.KCREAD.KO .AZ "\nError While Reading Kernel Config File, Using Default.\n"
MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n" MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n"
*-------------------------------------- *--------------------------------------
SYSSCREEN.TOP .AZ "A2osX 0.93 Console" SYSSCREEN.TOP .AZ "A2osX 0.93 Console"
MSG.Init3 .AZ "A2osX[Stage3]:Init *** Press Ctrl-R for ROOT Mode ***" MSG.Init3 .AS "A2osX[Stage3]:Init"
.AZ "\r\n*** Press Ctrl-R for ROOT Mode ***\r\n"
MSG.DEV .AZ "Device Manager..." MSG.DEV .AZ "Device Manager..."
MSG.BLKDEV .AZ " Adding Device: /DEV/%s, Type: %s\r\n" MSG.BLKDEV .AZ " Adding Device: /DEV/%s, Type: %s\r\n"
MSG.BLKDEV.TBL .DA MSG.BLKDEV.RAM MSG.BLKDEV.TBL .DA MSG.BLKDEV.RAM
@ -1011,6 +1097,8 @@ MSG.ETCINIT .AZ "Executing %s..."
MSG.StartupErr .AZ "Failed : [$%h]\r\n" MSG.StartupErr .AZ "Failed : [$%h]\r\n"
MSG.Init3.OK .AZ "OK\r\nA2osX[Stage3]:Complete.\r\n" MSG.Init3.OK .AZ "OK\r\nA2osX[Stage3]:Complete.\r\n"
*-------------------------------------- *--------------------------------------
MSG.HW .AZ "Checking Hardware..."
MSG.HW.TypeSubT .AZ "Type=%h,SubT=%h\r\n"
MSG.CPU .AZ "Checking CPU..." MSG.CPU .AZ "Checking CPU..."
MSG.CPUTYPE .DA MSG.6502 MSG.CPUTYPE .DA MSG.6502
.DA MSG.65C02 .DA MSG.65C02

View File

@ -4,7 +4,7 @@ AUTO 4,1
.LIST OFF .LIST OFF
.OP 65C02 .OP 65C02
.OR $2000 .OR $2000
.TF SYS/ATK/KM.APPLETALK .TF SYS/KM/KM.APPLETALK
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/IO.I .INB INC/IO.I
@ -108,7 +108,7 @@ AT.INIT >LDYAI MSG.INIT
GO.WSCARD jmp $ffff SELF MODIFIED GO.WSCARD jmp $ffff SELF MODIFIED
GO.OLDMLI jmp $ffff SELF MODIFIED GO.OLDMLI jmp $ffff SELF MODIFIED
*-------------------------------------- *--------------------------------------
.INB USR/SRC/X.PRINTF.S .INB USR/SRC/SHARED/X.PRINTF.S
*-------------------------------------- *--------------------------------------
MSG.INIT .AZ "AppleTalk Driver For A2osX\n" MSG.INIT .AZ "AppleTalk Driver For A2osX\n"
MSG.FAILED .AZ "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n" MSG.FAILED .AZ "AppleTalk Workstation Card Failed Power Up Diagnostics : EC=%h.\n"

View File

@ -3,7 +3,7 @@ NEW
.LIST OFF .LIST OFF
.OP 65C02 .OP 65C02
.OR $2000 .OR $2000
.TF SYS/KM.RAMWORKS .TF SYS/KM/KM.RAMWORKS
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/IO.I .INB INC/IO.I
@ -561,10 +561,12 @@ RWDRVX.XM.MNLC stz RWBankSelect ProDOS always uses LCBANK1
bit RRAMWRAMBNK1 bit RRAMWRAMBNK1
bit RRAMWRAMBNK1 bit RRAMWRAMBNK1
rts rts
RWDRVX.XM.RWLC lda #$FF RWDRVX.XM.RWLC lda #$FF
bpl RWDRVX.XM.BANK bpl RWDRVX.XM.BANK
bit RRAMWRAMBNK2 bit RRAMWRAMBNK2
bit RRAMWRAMBNK2 bit RRAMWRAMBNK2
RWDRVX.XM.BANK lda #$FF RWDRVX.XM.BANK lda #$FF
sta RWBankSelect sta RWBankSelect
rts rts

View File

@ -4,7 +4,7 @@ AUTO 4,1
.LIST OFF .LIST OFF
.OP 65C02 .OP 65C02
.OR $2000 .OR $2000
.TF SYS/KM.VSDRIVE .TF SYS/KM/KM.VSDRIVE
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/IO.I .INB INC/IO.I
@ -265,7 +265,7 @@ VSDRIVE.Install ldx #PATCH.SIZE
clc clc
rts rts
*-------------------------------------- *--------------------------------------
.INB USR/SRC/X.PRINTF.S .INB USR/SRC/SHARED/X.PRINTF.S
*-------------------------------------- *--------------------------------------
DEVSIG.Offset .HS 05070B0C DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131 DEVSIG.Value .HS 38180131