Kernel version 0.9 : Scan only 128 pages, fix the detection problem on real RW III?

This commit is contained in:
Rémy GIBERT 2017-02-18 23:23:00 +01:00
parent 1cfa4f8122
commit 49251c4cdf
3 changed files with 20 additions and 18 deletions

Binary file not shown.

Binary file not shown.

View File

@ -12,10 +12,18 @@ AUTO 6
.INB /A2OSX.DEV/INC/IO.I
.INB /A2OSX.DEV/INC/MONITOR.I
.INB /A2OSX.DEV/INC/PRODOS.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
*--------------------------------------
TmpPtr1 .EQ $0
TmpPtr2 .EQ $2
*--------------------------------------
RW.SAVEZP0 .EQ $800
RW.SAVEZP1 .EQ $900
*--------------------------------------
RW.BLOCK .EQ $A00
*--------------------------------------
* A2OSX.SYSTEM relocated at $1000 !!!
*--------------------------------------
RWBankSelect .EQ $C073
*--------------------------------------
RW.Init >LDAXI RW.MSG
@ -86,15 +94,17 @@ RW.Detect2 php
sta SETALTZP
ldx #0 start detection at page $00
.1 stx RWBankSelect
lda 0
sta RW.SAVEZP0,x save Bank 0 $0000 to prevent ALTZP trash
lda 1
sta RW.SAVEZP1,x
inx
bne .1
bpl .1
lda #0
.2 sta RWBankSelect
*--------------------------------------
@ -111,9 +121,10 @@ RW.Detect2 php
sta 1
eor #$FF
inc
bne .2
bpl .2
ldx #0
.3 txa
sta RWBankSelect
@ -131,11 +142,13 @@ RW.Detect2 php
eor #$FF
cmp 1
bne .4
inx
bne .3
dex we reached 0,last detected page was 255
.4 ldy #255 X = detected page count
inx
bpl .3
dex we reached 128,last detected page was 127
.4 ldy #127 X = detected page count
.6 sty RWBankSelect
@ -144,14 +157,7 @@ RW.Detect2 php
lda RW.SAVEZP1,y
sta 1
dey
bne .6
stz RWBankSelect
lda RW.SAVEZP0 Don't forget to restore Bank 0
sta 0
lda RW.SAVEZP1
sta 1
bpl .6
txa
@ -359,8 +365,6 @@ RW.MLIWRITEBLOCK.BLK
RW.PGCNT .BS 1
RW.FBITMAPCNT .BS 1
RW.BITMAPCNT .BS 1
RW.SAVEZP0 .BS 256
RW.SAVEZP1 .BS 256
*--------------------------------------
RW.BLOCK2 .DA 0 pointer to previous block
.DA 3 pointer to next block
@ -374,8 +378,6 @@ RW.BLOCK2.CT .BS 4 Creation time
.DA 4 bitmap pointer (Block 2&3 are Volume directory)
RW.BLOCK2.TB .BS 2 Total Blocks
RW.BLOCK2.END .EQ *
*--------------------------------------
RW.BLOCK .BS 512
*--------------------------------------
.INB X.PRINTF.S
*--------------------------------------