/[VRac]/M6502/t/05-M6502.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /M6502/t/05-M6502.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 90 by dpavlin, Thu Aug 2 12:01:09 2007 UTC revision 91 by dpavlin, Thu Aug 2 12:37:06 2007 UTC
# Line 64  foreach my $byte ( 0x00, 0x01, 0xff, 0xa Line 64  foreach my $byte ( 0x00, 0x01, 0xff, 0xa
64          cmp_ok( $mem[$a], '==', $byte, '$mem' );          cmp_ok( $mem[$a], '==', $byte, '$mem' );
65          cmp_ok( M6502::_read($a), '==', $byte, 'M6502::_read' );          cmp_ok( M6502::_read($a), '==', $byte, 'M6502::_read' );
66  }  }
67    
68    
69    $mem[$_] = 0 foreach ( 0x6000 .. 0x7ffff );
70    
71    # invert screen in 6502 asm
72    my $a = 0x1000;
73    
74    $mem[$a++] = $_ foreach (
75            0xa9, 0x60, 0xa2, 0x7f, 0xa0, 0x00, 0x85, 0xe1,
76            0x84, 0xe0, 0xb1, 0xe0, 0x4a, 0x26, 0xe2, 0x4a,
77            0x26, 0xe2, 0x4a, 0x26, 0xe2, 0x4a, 0x26, 0xe2,
78            0x4a, 0x26, 0xe2, 0x4a, 0x26, 0xe2, 0x4a, 0x26,
79            0xe2, 0x4a, 0x26, 0xe2, 0xa5, 0xe2, 0x91, 0xe0,
80            0xc8, 0xd0, 0xdf, 0xe6, 0xe1, 0xe4, 0xe1, 0xb0,
81            0xd9, 0x60, 0x00,
82    );
83    
84    diag dump_R();
85    $PC = 0x1000;
86    
87    ok( ! M6502::exec( 1 ), 'M6502::exec(1)' );
88    cmp_ok( $PC, '>', 0x1000, 'PC moved' );
89    
90    diag dump_R();
91    
92    ok( my $left = M6502::exec( 10000 ), 'M6502::exec' );
93    
94    diag dump_R(), "cycles left: $left";
95    
96    foreach my $a ( 0x6000 .. 0x6001 ) {
97            cmp_ok( $mem[$a], '==', 0xff, sprintf('inverted %04x',$a) );
98    }

Legend:
Removed from v.90  
changed lines
  Added in v.91

  ViewVC Help
Powered by ViewVC 1.1.26