Browse files

Enable display on startup and only fire start of frame in while displ…

…ay is enabled

So this was a bit crap, since all of the docs claim the display hardware is disabled by default. It's the only way to make some games work, however, once the start of frame interrupts only trigger while the display is active (which is a requirement for other games to work :P).

I'm guessing the display actually _could_ be active on hw reset, as you still wouldn't get any picture without the sync signals from the left/right scanners active, so this is sensible enough I suppose.

I was trying endless things until finally I dug into mednafen, and they had this state enabled on startup. I'm still not 100% sure it's correct, but I don't have the hw to fully test, and it DOES work, so I'm pushing it. rrrg.
  • Loading branch information...
yupferris committed Jan 1, 2017
1 parent 187d5f2 commit 74235249a1abfca8d4b3d80e8c3c6b37230679a2
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/vip/
@@ -134,7 +134,7 @@ impl Vip {
reg_interrupt_enable_start_of_display_frame: false,
reg_interrupt_enable_drawing_finished: false,

reg_display_control_display_enable: false,
reg_display_control_display_enable: true,
reg_display_control_sync_enable: false,

reg_drawing_control_drawing_enable: false,
@@ -494,12 +494,12 @@ impl Vip {
fn frame_clock(&mut self, raise_interrupt: &mut bool) {
println!("Frame clock rising edge");

self.reg_interrupt_pending_start_of_display_frame = true;
if self.reg_interrupt_enable_start_of_display_frame {
*raise_interrupt = true;

if self.reg_display_control_display_enable {
self.reg_interrupt_pending_start_of_display_frame = true;
if self.reg_interrupt_enable_start_of_display_frame {
*raise_interrupt = true;


0 comments on commit 7423524

Please sign in to comment.