Interrupts and gfx9000

Pagina 5/5
1 | 2 | 3 | 4 |

Van PingPong

Prophet (3448)

afbeelding van PingPong

10-10-2019, 20:31

Just to try : in the interrupt routine try to insert a delay loop in the vram access sub routine.
Are you using the ports directly or some gfx lib?
I think that is unlikely that v9990 has issues during the vblank period or the interrupts.
If you are experiencing problems with openmsx and not on real hw it is more unlikely that those issues came out because even if there are issues they need to be first known then emulated

Van MsxKun

Paladin (922)

afbeelding van MsxKun

10-10-2019, 21:26

Hi, some things.
I tried using ports directly and using the Team Bomba libs, that uses the ports directly.
Adding some delay didn't work, but it's working now, or it seems.

EDIT: No, it's not working Crying I disabled IEH during last test and then it works, but when I use IEH+IEV, screen junk

The last test code is basically this:

		; Code that put GFXs, Palette and so on VRAM, shows image, works fine until here

		...

		; Int setup

		call	DISINT			; Call a routine that Disables VDP Interrupt
		di
		G9kWriteReg G9K_INT_V_LINE_LO,190
		G9kWriteReg G9K_INT_V_LINE_HI,00000000b
		G9kWriteReg G9K_INT_H_LINE,0
		G9kWriteReg G9K_INT_ENABLE,G9K_INT_IEV+G9K_INT_IEH	; enables G9K interrupts
		call	INT_Set		; sets HKEYI Hook
		ei

		; RunLoop

.loop:		halt
		jr	.loop

; The Interrupt
		
INT:		di
		push	af

		in	a,(G9K_INT_FLAG)
		and	3
		out	(G9K_INT_FLAG),a

		bit	1,a
		jr	nz,.a
		bit	0,a
		jr	nz,.b

		jr	.exit   ; just in case

.a:		;nothing at all now, to test what happens, but putting VRAM copies here makes screen junk too

		jr	.exit

.b:		; trying to copy to VRAM 1 single byte... SCREEN JUNK

		LD 	E,0
		LD 	HL,0
		LD	A,G9K_WRITE_ADDR
		OUT	(G9K_REG_SELECT),A
		LD	C,G9K_REG_DATA
		OUT	(C),L
		OUT	(C),H
		OUT	(C),E
		LD 	        A,128
		OUT 	($60),A

.exit:		pop	af
		ei
		ret

Van MsxKun

Paladin (922)

afbeelding van MsxKun

10-10-2019, 21:32

Good news!

Fixed. On the past code, there was still some copy to VRAM -After- setting Interrupt hook and -Before- main loop that was causing the mess.
Moved it and now is all ok.

That for your patience with this poor oldie that needs to go to an asylum.

Pagina 5/5
1 | 2 | 3 | 4 |