RWAP wrote:By the way, is there any difference in the requirements for WRX (Wilf's) Hi-Res graphics and those from Matthias?
In other words can a program written for WRX (such as ZX4PAINT) work with Matthias's drivers, or do you have to load the WRX drivers?
Rich, honestly, I don't know.
May be Siggi can answer with the following informations :
My Hi-Res for ZX4PAINT is a mix of :
- Pseudo HiRes
- HRG enabled ram.
and is very easy to understand.
A) If we look at the routine and information given by Steven McDonald for his pseudo-Hi Res
http://www.pictureviewerpro.com/hosting ... ighres.txt
, he says :
"As nearly all of the ROM characters have a blank line at the top, the high res
routine changes this to 12 which is at ROM address 3072 ($0C00) which I found contains
much more interesting bit-patterns than other values which can be used."
B)
For the 2 bit x 2 bit I wanted the following somewhere in the ROM:
00000000 = $00 -> 11111111 = $FF
00000011 = $03 -> 11111100 = $FC
00001100 = $0C .....
00001111 = $0F .....
11000000 = $C0 .....
11000011 = $C3 .....
11001100 = $CC .....
11001111 = $CF .....
Helas nor 3072, nor any ROM address had this sequence.
C) The solution was the enabled ram address $2000 and following, where I could put the 8 value.
D) Of course, in 'HRSET' I put A=$20 (for $2000) where Steve put LD A,$0C for address $0C00
E) I had to do another minor change : to save the BC register used by Forth.
F) I did in the RAM a high res display buffer (32 Car * 192 line, address = c_Frames)
;
; -------------
; THE 'HRESGEN' WORD
; -------------
; ( -- )
;
;
c_hresgen:.....LD HL,c_frames - $21 + $8000 ;
..................LD DE,$0021
hresgen3:......DI
..................LD C,$FE
..................LD B,$16
hresgen4:.......DJNZ hresgen4
..................LD B,$C0
hresgen2:.......IN A,(c)
..................OUT ($FF),A
..................ADD HL,DE
..................CALL hresgen1
..................DEC B
..................JP NZ,hresgen2
..................CALL $0292
..................CALL $0220
..................LD IX,c_hresgen
..................JP $02A4
hresgen1:.......JP (HL)
..................RET
;
;
; -------------
; THE 'HRSET' WORD
; -------------
; ( -- )
;
;
cf_hrset:
..................dw c_hrset
c_hrset:
..................PUSH BC ; Save BC
..................HALT
..................LD A,($4034) ; Wait
..................LD C,A ; for the
c_sync1: .......LD A,($4034) ; next
..................CP C ; new
..................JR Z, c_sync1 ; tv frame - used to sync the changeover!
..................LD A,$20 ; -> THIS IS ADDRESS $2000
..................LD I,A
..................LD IX,c_hresgen
..................POP BC ; Retrieve BC
..................JP next ; Return to FORTH
;
; -------------
; THE 'HRRET' WORD
; -------------
; ( -- )
;
;
cf_hrret:
..................dw c_hrret
c_hrret:.........PUSH BC ; Save BC
..................HALT ; Wait for an interrupt - used to sync the changeover!
..................LD A,($4034) ; Wait
..................LD C,A ; for the
c_sync2:........LD A,($4034) ; next
..................CP C ; new
..................JR Z, c_sync2 ; tv frame - used to sync the changeover!
..................LD A,$1E
..................LD I,A
..................LD IX,$0281
..................POP BC
..................JP next ; Return to FORTH
;
;
; -------------
; THE 'HRCLS' WORD
; -------------
; ( -- )
;
;
cf_hrcls:
..................dw c_hrcls ; Indirect address used by FORTH
c_hrcls:
..................PUSH BC ; Save BC ( BC is a Forth Vector)
..................LD HL,c_frames ; c_Frames is HiRes display
..................LD C,$C0
hrcls2:..........LD B,$20
hrcls1:..........LD (HL),$00
..................INC HL
..................DJNZ hrcls1
..................LD (HL),$C9
..................INC HL
..................DEC C
..................JR NZ,hrcls2
..................POP BC ; Retrieve BC
..................JP next
;
;
; -------------
; THE 'POKE ROM' WORD
; -------------
; ( -- )
;
;
cf_montagecar:
..................dw c_montagecar
c_montagecar:
..................LD HL,$2000
..................LD DE,$0008
..................LD (HL), $00.........; 00000000
..................ADD HL,DE
..................LD (HL), $0C.........; 00001100
..................ADD HL,DE
..................LD (HL), $03.........; 00000011
..................ADD HL,DE
..................LD (HL), $0F.........; 00001111
..................ADD HL,DE
..................LD (HL), $C0.........; 11000000
..................ADD HL,DE
..................LD (HL), $CC.........; 11001100
..................ADD HL,DE
..................LD (HL), $C3.........; 11000011
..................ADD HL,DE
..................LD (HL), $CF.........; 11001111
..................JP next ; Return to FORTH
A+ Dominique