screen 8 smooth horizontal scrolling

Pagina 9/11
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11

Van ARTRAG

Enlighted (6977)

afbeelding van ARTRAG

16-02-2022, 20:26

In Grauw's test program you could change ModifyR18 (at line 141 in VDPReg18.asm) as follows

ModifyR18: PROC
	ld b,0
	ld c,VDP_PORT_1
	ld d,18 | VDP_REGISTER
	ld e,0FH
Loop:
	ld a,b
	and e
reverse: equ $
	cpl
	di
	out (c),a
	in a,(0x98)
	out (c),d
	ei
	djnz Loop
	ret
	ENDP

Van max_iwamoto

Paladin (673)

afbeelding van max_iwamoto

16-02-2022, 23:08

ARTRAG wrote:

In Grauw's test program you could change ModifyR18 (at line 141 in VDPReg18.asm) as follows

ModifyR18: PROC
	ld b,0
	ld c,VDP_PORT_1
	ld d,18 | VDP_REGISTER
	ld e,0FH
Loop:
	ld a,b
	and e
reverse: equ $
	cpl
	di
	out (c),a
	in a,(0x98)
	out (c),d
	ei
	djnz Loop
	ret
	ENDP

Will do.

Van max_iwamoto

Paladin (673)

afbeelding van max_iwamoto

17-02-2022, 17:06

Here is the video of old version (Grauw original) and a new modified version (with ARTRAG's code):

https://youtu.be/MEwQBYPQYGo

Van ARTRAG

Enlighted (6977)

afbeelding van ARTRAG

17-02-2022, 18:19

It seems that you cannot read the data port between two accesses to the command port without resetting its logic.
R18 doesn't change at all
We could maybe use R17....
I will try a different test using it

Van PingPong

Enlighted (4156)

afbeelding van PingPong

17-02-2022, 18:30

maybe one could try something like
in a,(0x98)
then following out(c), ... out(c), .... to change the register?
or the vdp could have enough time between the first out to fetch vram data and be free for the cmd engine, before the cpu could have finisced to set r18?

Van ARTRAG

Enlighted (6977)

afbeelding van ARTRAG

17-02-2022, 20:49

I would try to be as tight as possible
This is the fastest thing I came with

ModifyR18: PROC
	di
	ld a,18 + 128 		; no auto increment
	out (0x99),a
	ld a,17 + 128
	ei
	out (0x99),a
	ld bc,0x0098
	ld e,0FH
Loop:
	ld a,b
	and e
reverse: equ $
	cpl
	in f,(c)		; db EDh,70h ; read data port 
	out (0x9B),a		; set R#18
	djnz Loop
	ret
	ENDP

Max could you try this ?

Van max_iwamoto

Paladin (673)

afbeelding van max_iwamoto

18-02-2022, 00:43

ARTRAG wrote:

I would try to be as tight as possible
This is the fastest thing I came with

ModifyR18: PROC
	di
	ld a,18 + 128 		; no auto increment
	out (0x99),a
	ld a,17 + 128
	ei
	out (0x99),a
	ld bc,0x0098
	ld e,0FH
Loop:
	ld a,b
	and e
reverse: equ $
	cpl
	in f,(c)		; db EDh,70h ; read data port 
	out (0x9B),a		; set R#18
	djnz Loop
	ret
	ENDP

Max could you try this ?

yes, will compile and try shortly.

I assume in f,(c) is an attempt to read data into nowhere? It wouldn't compile. I tried to write in (HL),(C) and it also didn't work. So I just inserted DB EDh,70h there and it compiled. I wonder is there profer way to write it in assembler without using DB...

Van Grauw

Ascended (10821)

afbeelding van Grauw

18-02-2022, 00:55

Use in (c).

All in r,(c) instructions set the flags, this variant sets only the flags and does not load into a register.

Van max_iwamoto

Paladin (673)

afbeelding van max_iwamoto

18-02-2022, 00:57

Grauw wrote:

Use in (c).

All in r,(c) instructions set the flags, this variant sets only the flags and does not load into a register.

Done. Here is the results:

https://youtu.be/9i2YbxdRxdo

Van max_iwamoto

Paladin (673)

afbeelding van max_iwamoto

18-02-2022, 01:14

Here is a slightly different video of the same program. I didn't disable the internal LAN module before executing, so I think it slightly affected the result.

https://youtu.be/PHfyN88JMqc

Pagina 9/11
2 | 3 | 4 | 5 | 6 | 7 | 8 | | 10 | 11