diff --git a/applecorn.po b/applecorn.po index 64d00d1..0ba39d4 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/auxmem.shr.s b/auxmem.shr.s index b3dc741..a163c77 100644 --- a/auxmem.shr.s +++ b/auxmem.shr.s @@ -700,9 +700,15 @@ SHRDEFPAL LDY #00 ; Palette offset for 320 mode * Assign a 'physical' colour from the 16 colour palette to a * 'logical' colour for the current mode * On entry: X=logical colour, Y=physical colour -SHRPALCHANGE LDA VDUPIXELS ; Pixels per byte +SHRPALCHANGE TYA + AND #%00011110 ; Has already been shifted + TAY + LDA VDUPIXELS ; Pixels per byte CMP #$02 ; 2 is 320-mode (MODE 1) BEQ :MODE320 + TXA + AND #%00000110 ; Has already been shifted + TAX LDA PALETTE320,Y ; Byte 1 of physical colour STAL $E19E00,X ; Store in logical slot (4 copies) STAL $E19E00+8,X @@ -714,7 +720,10 @@ SHRPALCHANGE LDA VDUPIXELS ; Pixels per byte STAL $E19E00+17,X STAL $E19E00+25,X RTS -:MODE320 LDA PALETTE320,Y ; Byte 1 of physical colour +:MODE320 TXA + AND #%00011110 ; Has already been shifted + TAX + LDA PALETTE320,Y ; Byte 1 of physical colour STAL $E19E00,X ; Store in logical slot LDA PALETTE320+1,Y ; Byte 2 of physical colour STAL $E19E00+1,X ; Store in logical slot @@ -727,6 +736,9 @@ SHRPALCUSTOM PHA ; Preserve GB components LDA VDUPIXELS ; Pixels per byte CMP #$02 ; 2 is 320-mode (MODE 1) BEQ :MODE320 + TXA + AND #%00000110 ; Has already been shifted + TAX PLA ; Recover GB components STAL $E19E00,X ; Store in logical slot (4 copies) STAL $E19E00+8,X @@ -738,7 +750,10 @@ SHRPALCUSTOM PHA ; Preserve GB components STAL $E19E00+17,X STAL $E19E00+25,X RTS -:MODE320 PLA ; Recover GB components +:MODE320 TXA + AND #%00011110 ; Has already been shifted + TAX + PLA ; Recover GB components STAL $E19E00,X ; Store in logical slot TYA ; R component STAL $E19E00+1,X ; Store in logical slot diff --git a/auxmem.vdu.s b/auxmem.vdu.s index 11244b1..d5a98b5 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -963,6 +963,7 @@ VDU19 LDA VDUQ+5 ; Second parm TAY ; Phys colour in X * TODO: Only call this if GS ... JSR SHRPALCHANGE + RTS :RGB LDA VDUQ+6 ; 3rd parm (red) AND #$0F TAY ; Red in Y