Date : Wed, 17 Jun 2009 09:36:19 +0100
From : jgh@... (Jonathan Graham Harston)
Subject: Black Teletext
"Ian Wolstenholme" wrote:
> Except it doesn't work for the Teletext adapter, which must load the pages
> direct into screen RAM!
> Is there a way to trap any write to the Mode 7 screen RAM and do a similar
> fiddle?
>From software? Trap a hardware action?
Rather than try to trap hardware actions in software, just change
whatever's written there. Set up a VSync event to scan through the
screen memory and change all occurances of &00/&80 to &04/&84.
.event
CMP #<vsync>:BNE oldevnt
PHA:TYA:PHA
\ do something to ensure screen memory paged in
LDA zp:PHA:LDA zp+1:PHA :\ save some workspace
LDY #0:STY zp:LDA #&7C:STA zp+1
.lp
LDA (zp),Y:AND #7F:BNE nxt
LDA #&84:STA (zp),Y
.nxt
INY:BNE lp
INC zp+1:BPL nxt
\ do something to restore memory map
PLA:STA zp+1:PLA:STA zp
PLA:TAY:PLA
.oldevnt
JMP (oldeventv)
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
BBC BASIC for Windows and Internationalisation
See http://mdfs.net/Software/BBCBasic/Windows/ProgTips