KM.RAMWORKS:Fixed timing issues #2

This commit is contained in:
Rémy GIBERT 2016-06-22 23:12:09 +02:00
parent ecafe9c881
commit c4c7d406d5
4 changed files with 35 additions and 53 deletions

Binary file not shown.

Binary file not shown.

View File

@ -157,11 +157,7 @@ DRV.CS.START .DA OPEN
.DA SHOWCUR
L.DEVINFO .DA DEVINFO
L.DIV7.0 .DA DIV7.0
L.DIV7.256 .DA DIV7.256
L.DIV7.512 .DA DIV7.512
L.MOD7.0 .DA MOD7.0
L.MOD7.256 .DA MOD7.256
L.MOD7.512 .DA MOD7.512
L.Shift0.Lo .DA Shift0.lo
L.Shift0.Hi .DA Shift0.hi
.DA 0 end or relocation
@ -176,16 +172,16 @@ OPEN ldy #S.DEV.ID
lda L.DIV7.0+1
sta DIV7.hi
lda L.DIV7.256+1
inc
sta DIV7.hi+1
lda L.DIV7.512+1
inc
sta DIV7.hi+2
lda L.MOD7.0+1
sta MOD7.hi
lda L.MOD7.256+1
inc
sta MOD7.hi+1
lda L.MOD7.512+1
inc
sta MOD7.hi+2
ldx #7
@ -276,13 +272,11 @@ SETPIXEL.XOR >PULLAX A=X.LO,X=X.HI
lsr A=Col, CS=MMem, CC=XMem
pha Save Col
lda #CLRPAGE2>1
asl
sta .3+1
.3 sta CLRPAGE2
>PULLA Pull Y
tax
lda BASEL,x setup line Base Ptr
@ -302,52 +296,50 @@ SETPIXEL.XOR >PULLAX A=X.LO,X=X.HI
*--------------------------------------
SETPIXEL.1 lsr
bcc SETPIXEL.COLOR
>PULLW CX
>PULLB CY
ldy CX
lsr CX+1 if 256 =< x < 511
bcs .1
lsr CX+1
bcs .2 if 512 < x
lda DIV7.0,y
ldx MOD7.0,y
bra .3
>PULLAX A=X.LO,X=X.HI
tay
.1 lda DIV7.256,y
ldx MOD7.256,y
bra .3
lda DIV7.hi,x
sta .1+2
lda MOD7.hi,x
sta .2+2
.1 lda DIV7.0,y A=Colx2
eor #1
lsr A=Col, CS=MMem, CC=XMem
pha Save Col
.2 lda DIV7.512,y
ldx MOD7.512,y
.3 lsr
bcc .4 odd=main ram
sta CLRPAGE2
clc
bra .41
.4 sta SETPAGE2
.41 ldy CY
adc BASEL,y setup line Base Ptr
lda #CLRPAGE2>1
asl
sta .3+1
.3 sta CLRPAGE2
>PULLA Pull Y
tax
lda BASEL,x setup line Base Ptr
sta ZPBase
lda BASEH,y
lda BASEH,x
sta ZPBase+1
.2 ldx MOD7.0,y Y=X.LO
ply get back Col
>PULLA Pull Color
lsr
lda (ZPBase),y
bcs .6 set white pixel
lda (ZPBase)
and Mono.NMasks,x includes And $7F for mono
sta (ZPBase)
sta (ZPBase),y
sta CLR80STORE
rts
.6 lda (ZPBase)
and #$7F switch back this byte to mono
.6 and #$7F switch back this byte to mono
ora Mono.Masks,x
sta (ZPBase)
sta (ZPBase),y
sta CLR80STORE
rts
*--------------------------------------
@ -675,9 +667,10 @@ DEVINFO .DA #S.DEVINFO.TYPE.GFX type of DEVINFO STRUCT
DEVINFO.MODES .DA #%10000011 XOR,16 & B/W
DEVINFO.W .DA 560 X.SIZE
DEVINFO.H .DA 192 Y.SIZE
*--------------------------------------
.LIST ON
*--------------------------------------
DRV.SIZE .EQ *-DRV.CS.START
*--------------------------------------
.LIST OFF
MAN
SAVE DRV/DHGR.DRV.S

View File

@ -77,8 +77,6 @@ RW.Detect2 php
ldx #0 start detection at page $00
.1 stx RWBankSelect
pha
pla
lda 0
sta RW.SAVEZP0,x save Bank 0 $0000 to prevent ALTZP trash
lda 1
@ -109,9 +107,6 @@ RW.Detect2 php
.3 txa
sta RWBankSelect
pha
pla
cmp 0
bne .4
eor #$FF
@ -125,9 +120,6 @@ RW.Detect2 php
.6 sty RWBankSelect
pha
pla
lda RW.SAVEZP0,y
sta 0
lda RW.SAVEZP1,y
@ -137,9 +129,6 @@ RW.Detect2 php
stz RWBankSelect
pha
pla
lda RW.SAVEZP0 Don't forget to restore Bank 0
sta 0
lda RW.SAVEZP1