Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Instructions: Replace the vga_vblank function, with this one here.
- static UINT8 vga_vblank(running_machine &machine)
- {
- UINT8 res;
- UINT16 vblank_start,vblank_end,vpos;
- /* calculate vblank start / end positions */
- res = 0;
- vblank_start = vga.crtc.vert_blank_start;
- vblank_end = vga.crtc.vert_blank_start + vga.crtc.vert_blank_end - 1;
- vpos = machine.primary_screen->vpos();
- /* check if we are under vblank period */
- if(vblank_end > vga.crtc.vert_total)
- {
- vblank_end -= vga.crtc.vert_total;
- if(vpos >= vblank_start || vpos < vblank_end)
- res = 1;
- }
- else
- {
- if(vblank_end < vblank_start) //Needed for Fractint's 600 scanline tweaked modes. TODO: turn this into general logic
- {
- if(vpos >= vblank_start && vpos < vga.crtc.vert_total)
- res = 1;
- else if(vpos < vblank_end)
- res = 1;
- }
- else
- {
- if(vpos >= vblank_start && vpos < vblank_end)
- res = 1;
- }
- }
- //popmessage("%d %d %d",vblank_start,vblank_end,vga.crtc.vert_total);
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement