Enabling vsync interrupt on the V9938/V9958

By kanageddaamen

Supporter (11)

kanageddaamen's picture

25-09-2017, 19:19

Hello all,

I am in the (very, very) early stages of a project for which I am going to use a v9958 for a VDP. After poring through the V9938 documentation, I noticed there is a vsync interrupt that can be generated on the IRQ pin, (the status of which is in one of the status registers,) and I would like to be able to take advantage of this for screen updates during vblank.

However, unlike the raster line interrupt enable bit in one of the control registers, I don't see a means by which to turn this interrupt on. I have seen mention that the MSX1's TMS9918A had a bit to enable the vsync interrupt in register 1, but I do not see a similar bit in the V9938/V9958.

Is this interrupt always generated on vblank by the VDPs?

Login or register to post comments

By Grauw

Enlighted (6368)

Grauw's picture

25-09-2017, 20:57

The vertical blanking interrupt (occurring on line 192 or 212) is enabled by the IE0 bit in register 1. It is on by default, and handled by the standard BIOS ISR, which clears the status flag as a result. The MSX does not function without it, so clearing IE0 will make your computer stop responding to input. You can put a hook on address FD9FH to repond to it, or alternatively poll the JIFFY system variable for changes.

By kanageddaamen

Supporter (11)

kanageddaamen's picture

25-09-2017, 21:06

According to the technical data book, that is an interrupt for horizontal scanning lines (though IE1 in register 0 also says that,) is that just a typo then?

By Grauw

Enlighted (6368)

Grauw's picture

26-09-2017, 00:23

Yes. Yamaha and their datasheet errors… Big smile I usually refer to this version, which is very nice work by Eugeny, although also not fault-free so actually I use both…

By kanageddaamen

Supporter (11)

kanageddaamen's picture

26-09-2017, 14:20

Ah, excellent, thank you.

By tvalenca

Paladin (679)

tvalenca's picture

17-10-2017, 16:16

I'm not sure if I understand correctly (and also Grauw is way much better coder than me) but you can enable a second interrupt generator for an arbitrary scanline. I used this a while ago and talked about it on this topic.

By Eugeny_Brychkov

Paladin (880)

Eugeny_Brychkov's picture

28-10-2017, 11:21

Grauw wrote:

although also not fault-free so actually I use both…

Please let me know where these faults are, I will correct them.

By Manel46

Master (203)

Manel46's picture

28-10-2017, 20:07

kanageddaamen wrote:

and I would like to be able to take advantage of this for screen updates during vblank.

Surely, you can get with R # 19, what you want.
I have not tried.
https://www.msx.org/wiki/VDP_Display_Registers

By Grauw

Enlighted (6368)

Grauw's picture

19-11-2017, 01:15

Eugeny_Brychkov wrote:

Please let me know where these faults are, I will correct them.

One I encountered just now; the documentation of R#17 on page 21 omits the meaning of the AII bit (though it is mentioned on page 14).

I also believe I referred to the original manual for some things in the sprites section, but right now I forgot for what specifically, will let you know when I run into it again.

(If you want to open a special topic for your great transscribed/edited version of the manual, I could post it there Smile.)

My MSX profile