[V9990] Q&A Official Thread

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

Par MaxMSX

Supporter (13)

Portrait de MaxMSX

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

Par Metalion

Paragon (1625)

Portrait de Metalion

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

Par GhostwriterP

Paladin (683)

Portrait de GhostwriterP

22-05-2022, 21:01

image space set to twice the screen width?

Par Metalion

Paragon (1625)

Portrait de Metalion

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:

Par Metalion

Paragon (1625)

Portrait de Metalion

23-05-2022, 11:13

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

Par Metalion

Paragon (1625)

Portrait de Metalion

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 ...

Par GhostwriterP

Paladin (683)

Portrait de GhostwriterP

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.

Par MaxMSX

Supporter (13)

Portrait de MaxMSX

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).

Par aoineko

Paladin (1004)

Portrait de aoineko

20-07-2022, 23:29

Is there a minimum time between 2 successive accesses to the v9990?
I guess not given the power of the chip, but I prefer to ask. ^^

Par GhostwriterP

Paladin (683)

Portrait de GhostwriterP

21-07-2022, 15:07

Sofar I never experienced any problems without waits, not even on r800!

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