Page 3 of 3

Re: Detecting VBL on 800 in 700-mode

Posted: Wed Sep 18, 2019 12:31 pm
by Jo Even
I'm tempted to ask my friend to probe PC7 with a logic analyzer to see what's actually happening.

Re: Detecting VBL on 800 in 700-mode

Posted: Wed Sep 18, 2019 12:53 pm
by Jo Even
hlide wrote: Wed Sep 18, 2019 12:12 pm Did you try with EmuZ-800?
I have not been able to get these emulators working on my Windows 10 PC. 700-emulator shows blue and black bars on the "screen", 800-emulator just a black screen.

Re: Detecting VBL on 800 in 700-mode

Posted: Sun Sep 22, 2019 8:28 pm
by hlide
You must add IPL.ROM (1Z-13A) and FONT.ROM in the same directory as EmuZ-700.exe. As you should know Japanese people are fearful of copyrighted ROM so they don't include them. I had the same issue as yours without those ROM files.

Re: Detecting VBL on 800 in 700-mode

Posted: Sun Sep 22, 2019 9:39 pm
by Jo Even
Jo Even wrote: Mon Sep 16, 2019 1:29 pm

Code: Select all

while (*(unsigned char *)0xe002 & 0x80);
This is working on the 700 but always returns immediately on the 800 emulator in 700 mode.
Why did I write "700" and not "700 emulator"? Because when I finally managed to test this on a REAL 700 it shows exactly the same behaviour. So the problem *is* with the emulator, just not with the 800 emulator :)

Re: Detecting VBL on 800 in 700-mode

Posted: Mon Sep 23, 2019 9:28 am
by Jo Even
This piece of code stolen from the monitor works.

Code: Select all

	__asm
	push af
wait1:	ld a,(0e002h)
	rlca
	jr nc,wait1
wait2:	ld a,(0e002h)
	rlca
	jr c,wait2
	pop af
	__endasm
Maybe the compiled C code isn't fast enough. VBL is low for less than 3ms, but it should take some pretty inefficient code to miss that.

Edit: Just replicated the functionality from the asm above in C, and can confirm that it does not work in the 800 emulator. The compiled code is almost certainly to slow, and I guess it only works in the 700 emulator due to inaccurate emulation.

Edit2: I can also confirm that this is working on both a real 800 and a real 700. So problem solved :)