[V9990] Q&A Official Thread

Page 21/21
14 | 15 | 16 | 17 | 18 | 19 | 20 |

By MaxMSX

Supporter (7)

MaxMSX's picture

18-05-2022, 23:23

GhostwriterP wrote:

my guess:
R#37 = 2 ;dx9 = 1 to select screen "B" as destination (name tables are on screen "B") where screen"A" is VRAM 00000-3FFFF and screen "B" is VRAM 40000-7FFFF.
R#45 = 12 (pset)
R#46 = 0
R#47 = 255 did you set the write mask like this?

Yes, that works! Thanks. Cool

By Metalion

Paragon (1509)

Metalion's picture

22-05-2022, 20:59

Hi everyone,

I'm not sure what is wrong ... Trying to fill some VRAM area with zeros, in P1 or B1 mode, but the result is incomplete (parts are not modified). For example, in B1, half of the screen is not cleared.

clear_screen:
	ld	bc,0:32		; P1: 64x64(patterns)x2 = 256x32 values
	dec	d
	jr	c,.go
	ld	bc,0:64		; P2: 128x64(patterns)x2 = 256x64 values
	dec	d
	jr	c,.go
	ld	bc,0:212	; B1: 256x212 values

.go	call	write		; sets VRAM address
	ld	a,e		; 'e' contains value to fill
.loop	out	(v9990.vram),a
	djnz	$-2
	dec	c
	jr	nz,.loop
	ret

By GhostwriterP

Hero (663)

GhostwriterP's picture

22-05-2022, 21:01

image space set to twice the screen width?

By Metalion

Paragon (1509)

Metalion's picture

23-05-2022, 09:49

GhostwriterP wrote:

image space set to twice the screen width?

Nope, this is the first thing I checked.
R#6 value is 82h, so DSPM=2 (bitmap mode), XIMM=0 (256 pixels width) and CLRM=2 (8 bits/dot)

This is what I get, after writing 256x212 zeros in B1 mode:

By Metalion

Paragon (1509)

Metalion's picture

23-05-2022, 11:13

Problem solved: my subroutine setting up the VRAM address was messing with the 'bc' value ...

By Metalion

Paragon (1509)

Metalion's picture

23-05-2022, 13:01

Another question: in P1 mode, is it possible to use commands in the pattern name table ?
Its address would translate into (0,3968) and R#38/39 (DY) can contain an Y adress up to 4095 ...

By GhostwriterP

Hero (663)

GhostwriterP's picture

23-05-2022, 18:21

yes it is possible read few post back Wink
PS: it is actually a very useful feature and can be used for various applications.

By MaxMSX

Supporter (7)

MaxMSX's picture

23-05-2022, 19:19

Indeed, GhostWriterP helped me to get the commands working for P1 on the pattern name table. Biggest take away for me was that these are both located on screen "B". As mentioned, a couple of posts back there is an example (which needed the last addition as suggested by GhostWriterP for R37 and R45, R46 and R47).

Page 21/21
14 | 15 | 16 | 17 | 18 | 19 | 20 |