Detecting VBL on 800 in 700-mode
Re: Detecting VBL on 800 in 700-mode
It doesn't work on a real 800 either. Strange that keyboard is working but VBL not, when both is handled by the 8255. Oh well, I'll worry about this later
Re: Detecting VBL on 800 in 700-mode
Remember I told you /VBLN is connected to two pins: 8255 and PIO. I'm not sure why PIO needs it and in which direction it is (is that an input or output?).
Re: Detecting VBL on 800 in 700-mode
- 8255.PC7, is input, reading 1 when its source its source is not active.
Could you post you snippet of source which doesn't work with MZ800 (I suppose you're in MZ700 mode)?
Re: Detecting VBL on 800 in 700-mode
Code: Select all
while (*(unsigned char *)0xe002 & 0x80);
Re: Detecting VBL on 800 in 700-mode
Are you sure the computer is set up for the right memory banking? Maybe the emulator have RAM all the way when entering 700-mode?
Re: Detecting VBL on 800 in 700-mode
Ok, it seems PIO of MZ-800 can issue an interrupt for /VBLN, I suppose when you execute the PIO interrupt, you must check PA5 to see if /VBLN is the interrupter. While in MZ700, I guess there is no such interrupt so you should rely on polling PC7 of 8255. But for an unknown reason it doesn't work...
Re: Detecting VBL on 800 in 700-mode
Yes, there is no VBL interrupt on the 700. I expected the 800 to work in the same way in 700 mode, but apparently not. Tested on both emulator and a real 800. Keyboard is working in both cases, which it wouldn't unless running in 700 mode with correct memory map.
Re: Detecting VBL on 800 in 700-mode
Did you try with EmuZ-800?
Re: Detecting VBL on 800 in 700-mode
I don't have a real 800 so no, I did not test it myself. But I'm quite sure that it was tested in 700-mode - keyboard polling (done in the program itself by reading the matrix directly via the 8255, not by calling the monitor routines) is working, which can only be possible in 700-mode. In 800-mode the 8255 is not memory mapped, but accessed via ports. Also, the 700 VRAM is not mapped in 800-mode, but screen output (again, accessing 700 hardware directly, no monitor routines involved) is working correctly.