pinky/rp2c02-testsuite/src/tests/test_vram_access_during_sprite_rendering_without_sprites.rs

3964 lines
169 KiB
Rust

// This file was AUTOGENERATED; do not edit!
#[allow(unused_imports)]
use super::super::assert_eq;
use TestPPU;
#[inline(never)]
pub fn test_vram_access_during_sprite_rendering_without_sprites( ppu: &mut TestPPU ) {
assert_eq!( ppu.scanline(), 261 );
assert_eq!( ppu.dot(), 0 );
for i in 0..4096u32 {
ppu.write_vram( i as u16, (i + 0x80) as u8 );
}
for i in 0..960u32 {
ppu.write_vram( (0x2000 + i) as u16, (i + 0x80) as u8 );
}
for i in 0..64u32 {
ppu.write_vram( (0x2000 + 960 + i) as u16, (0x80 | i) as u8 );
}
ppu.write_ioreg( 1, 0x14 );
ppu.step_pixel(); // 261 000 -> 261 001
ppu.step_pixel(); // 261 001 -> 261 002
ppu.step_pixel(); // 261 002 -> 261 003
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 000 256 -> 000 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 257 -> 000 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 000 258 -> 000 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 259 -> 000 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 260 -> 000 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 261 -> 000 262
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 262 -> 000 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 263 -> 000 264
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 264 -> 000 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 265 -> 000 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 266 -> 000 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 267 -> 000 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 268 -> 000 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 269 -> 000 270
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 270 -> 000 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 271 -> 000 272
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 272 -> 000 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 273 -> 000 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 274 -> 000 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 275 -> 000 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 276 -> 000 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 277 -> 000 278
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 278 -> 000 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 279 -> 000 280
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 280 -> 000 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 281 -> 000 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 282 -> 000 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 283 -> 000 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 284 -> 000 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 285 -> 000 286
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 286 -> 000 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 287 -> 000 288
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 288 -> 000 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 289 -> 000 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 290 -> 000 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 291 -> 000 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 292 -> 000 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 293 -> 000 294
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 294 -> 000 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 295 -> 000 296
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 296 -> 000 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 297 -> 000 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 298 -> 000 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 299 -> 000 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 300 -> 000 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 301 -> 000 302
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 302 -> 000 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 303 -> 000 304
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 304 -> 000 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 305 -> 000 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 306 -> 000 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 307 -> 000 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 308 -> 000 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 309 -> 000 310
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 310 -> 000 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 311 -> 000 312
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 312 -> 000 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 313 -> 000 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 314 -> 000 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 315 -> 000 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 000 316 -> 000 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 317 -> 000 318
ppu.expect_vram_read( 0x0000, 0x80 );
ppu.step_pixel(); // 000 318 -> 000 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 000 319 -> 000 320
ppu.expect_vram_read( 0x0008, 0x88 );
ppu.step_pixel(); // 000 320 -> 000 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 001 256 -> 001 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 257 -> 001 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 001 258 -> 001 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 259 -> 001 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 260 -> 001 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 261 -> 001 262
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 262 -> 001 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 263 -> 001 264
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 264 -> 001 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 265 -> 001 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 266 -> 001 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 267 -> 001 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 268 -> 001 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 269 -> 001 270
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 270 -> 001 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 271 -> 001 272
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 272 -> 001 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 273 -> 001 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 274 -> 001 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 275 -> 001 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 276 -> 001 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 277 -> 001 278
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 278 -> 001 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 279 -> 001 280
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 280 -> 001 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 281 -> 001 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 282 -> 001 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 283 -> 001 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 284 -> 001 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 285 -> 001 286
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 286 -> 001 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 287 -> 001 288
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 288 -> 001 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 289 -> 001 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 290 -> 001 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 291 -> 001 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 292 -> 001 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 293 -> 001 294
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 294 -> 001 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 295 -> 001 296
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 296 -> 001 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 297 -> 001 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 298 -> 001 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 299 -> 001 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 300 -> 001 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 301 -> 001 302
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 302 -> 001 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 303 -> 001 304
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 304 -> 001 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 305 -> 001 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 306 -> 001 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 307 -> 001 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 308 -> 001 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 309 -> 001 310
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 310 -> 001 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 311 -> 001 312
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 312 -> 001 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 313 -> 001 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 314 -> 001 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 315 -> 001 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 001 316 -> 001 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 317 -> 001 318
ppu.expect_vram_read( 0x0001, 0x81 );
ppu.step_pixel(); // 001 318 -> 001 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 001 319 -> 001 320
ppu.expect_vram_read( 0x0009, 0x89 );
ppu.step_pixel(); // 001 320 -> 001 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 002 256 -> 002 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 257 -> 002 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 002 258 -> 002 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 259 -> 002 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 260 -> 002 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 261 -> 002 262
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 262 -> 002 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 263 -> 002 264
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 264 -> 002 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 265 -> 002 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 266 -> 002 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 267 -> 002 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 268 -> 002 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 269 -> 002 270
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 270 -> 002 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 271 -> 002 272
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 272 -> 002 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 273 -> 002 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 274 -> 002 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 275 -> 002 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 276 -> 002 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 277 -> 002 278
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 278 -> 002 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 279 -> 002 280
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 280 -> 002 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 281 -> 002 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 282 -> 002 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 283 -> 002 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 284 -> 002 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 285 -> 002 286
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 286 -> 002 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 287 -> 002 288
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 288 -> 002 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 289 -> 002 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 290 -> 002 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 291 -> 002 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 292 -> 002 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 293 -> 002 294
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 294 -> 002 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 295 -> 002 296
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 296 -> 002 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 297 -> 002 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 298 -> 002 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 299 -> 002 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 300 -> 002 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 301 -> 002 302
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 302 -> 002 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 303 -> 002 304
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 304 -> 002 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 305 -> 002 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 306 -> 002 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 307 -> 002 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 308 -> 002 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 309 -> 002 310
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 310 -> 002 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 311 -> 002 312
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 312 -> 002 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 313 -> 002 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 314 -> 002 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 315 -> 002 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 002 316 -> 002 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 317 -> 002 318
ppu.expect_vram_read( 0x0002, 0x82 );
ppu.step_pixel(); // 002 318 -> 002 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 002 319 -> 002 320
ppu.expect_vram_read( 0x000A, 0x8A );
ppu.step_pixel(); // 002 320 -> 002 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 003 256 -> 003 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 257 -> 003 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 003 258 -> 003 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 259 -> 003 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 260 -> 003 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 261 -> 003 262
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 262 -> 003 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 263 -> 003 264
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 264 -> 003 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 265 -> 003 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 266 -> 003 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 267 -> 003 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 268 -> 003 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 269 -> 003 270
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 270 -> 003 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 271 -> 003 272
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 272 -> 003 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 273 -> 003 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 274 -> 003 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 275 -> 003 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 276 -> 003 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 277 -> 003 278
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 278 -> 003 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 279 -> 003 280
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 280 -> 003 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 281 -> 003 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 282 -> 003 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 283 -> 003 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 284 -> 003 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 285 -> 003 286
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 286 -> 003 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 287 -> 003 288
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 288 -> 003 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 289 -> 003 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 290 -> 003 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 291 -> 003 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 292 -> 003 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 293 -> 003 294
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 294 -> 003 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 295 -> 003 296
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 296 -> 003 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 297 -> 003 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 298 -> 003 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 299 -> 003 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 300 -> 003 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 301 -> 003 302
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 302 -> 003 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 303 -> 003 304
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 304 -> 003 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 305 -> 003 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 306 -> 003 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 307 -> 003 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 308 -> 003 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 309 -> 003 310
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 310 -> 003 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 311 -> 003 312
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 312 -> 003 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 313 -> 003 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 314 -> 003 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 315 -> 003 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 003 316 -> 003 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 317 -> 003 318
ppu.expect_vram_read( 0x0003, 0x83 );
ppu.step_pixel(); // 003 318 -> 003 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 003 319 -> 003 320
ppu.expect_vram_read( 0x000B, 0x8B );
ppu.step_pixel(); // 003 320 -> 003 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 004 256 -> 004 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 257 -> 004 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 004 258 -> 004 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 259 -> 004 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 260 -> 004 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 261 -> 004 262
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 262 -> 004 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 263 -> 004 264
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 264 -> 004 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 265 -> 004 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 266 -> 004 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 267 -> 004 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 268 -> 004 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 269 -> 004 270
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 270 -> 004 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 271 -> 004 272
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 272 -> 004 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 273 -> 004 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 274 -> 004 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 275 -> 004 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 276 -> 004 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 277 -> 004 278
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 278 -> 004 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 279 -> 004 280
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 280 -> 004 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 281 -> 004 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 282 -> 004 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 283 -> 004 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 284 -> 004 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 285 -> 004 286
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 286 -> 004 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 287 -> 004 288
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 288 -> 004 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 289 -> 004 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 290 -> 004 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 291 -> 004 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 292 -> 004 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 293 -> 004 294
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 294 -> 004 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 295 -> 004 296
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 296 -> 004 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 297 -> 004 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 298 -> 004 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 299 -> 004 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 300 -> 004 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 301 -> 004 302
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 302 -> 004 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 303 -> 004 304
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 304 -> 004 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 305 -> 004 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 306 -> 004 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 307 -> 004 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 308 -> 004 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 309 -> 004 310
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 310 -> 004 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 311 -> 004 312
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 312 -> 004 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 313 -> 004 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 314 -> 004 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 315 -> 004 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 004 316 -> 004 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 317 -> 004 318
ppu.expect_vram_read( 0x0004, 0x84 );
ppu.step_pixel(); // 004 318 -> 004 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 004 319 -> 004 320
ppu.expect_vram_read( 0x000C, 0x8C );
ppu.step_pixel(); // 004 320 -> 004 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 005 256 -> 005 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 257 -> 005 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 005 258 -> 005 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 259 -> 005 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 260 -> 005 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 261 -> 005 262
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 262 -> 005 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 263 -> 005 264
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 264 -> 005 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 265 -> 005 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 266 -> 005 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 267 -> 005 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 268 -> 005 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 269 -> 005 270
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 270 -> 005 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 271 -> 005 272
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 272 -> 005 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 273 -> 005 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 274 -> 005 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 275 -> 005 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 276 -> 005 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 277 -> 005 278
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 278 -> 005 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 279 -> 005 280
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 280 -> 005 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 281 -> 005 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 282 -> 005 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 283 -> 005 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 284 -> 005 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 285 -> 005 286
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 286 -> 005 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 287 -> 005 288
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 288 -> 005 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 289 -> 005 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 290 -> 005 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 291 -> 005 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 292 -> 005 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 293 -> 005 294
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 294 -> 005 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 295 -> 005 296
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 296 -> 005 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 297 -> 005 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 298 -> 005 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 299 -> 005 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 300 -> 005 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 301 -> 005 302
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 302 -> 005 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 303 -> 005 304
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 304 -> 005 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 305 -> 005 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 306 -> 005 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 307 -> 005 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 308 -> 005 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 309 -> 005 310
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 310 -> 005 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 311 -> 005 312
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 312 -> 005 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 313 -> 005 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 314 -> 005 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 315 -> 005 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 005 316 -> 005 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 317 -> 005 318
ppu.expect_vram_read( 0x0005, 0x85 );
ppu.step_pixel(); // 005 318 -> 005 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 005 319 -> 005 320
ppu.expect_vram_read( 0x000D, 0x8D );
ppu.step_pixel(); // 005 320 -> 005 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 006 256 -> 006 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 257 -> 006 258
ppu.expect_vram_read( 0x2402, 0x82 );
ppu.step_pixel(); // 006 258 -> 006 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 259 -> 006 260
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 260 -> 006 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 261 -> 006 262
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 262 -> 006 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 263 -> 006 264
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 264 -> 006 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 265 -> 006 266
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 266 -> 006 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 267 -> 006 268
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 268 -> 006 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 269 -> 006 270
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 270 -> 006 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 271 -> 006 272
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 272 -> 006 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 273 -> 006 274
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 274 -> 006 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 275 -> 006 276
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 276 -> 006 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 277 -> 006 278
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 278 -> 006 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 279 -> 006 280
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 280 -> 006 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 281 -> 006 282
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 282 -> 006 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 283 -> 006 284
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 284 -> 006 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 285 -> 006 286
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 286 -> 006 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 287 -> 006 288
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 288 -> 006 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 289 -> 006 290
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 290 -> 006 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 291 -> 006 292
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 292 -> 006 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 293 -> 006 294
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 294 -> 006 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 295 -> 006 296
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 296 -> 006 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 297 -> 006 298
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 298 -> 006 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 299 -> 006 300
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 300 -> 006 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 301 -> 006 302
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 302 -> 006 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 303 -> 006 304
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 304 -> 006 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 305 -> 006 306
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 306 -> 006 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 307 -> 006 308
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 308 -> 006 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 309 -> 006 310
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 310 -> 006 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 311 -> 006 312
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 312 -> 006 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 313 -> 006 314
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 314 -> 006 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 315 -> 006 316
ppu.expect_vram_read( 0x2000, 0x80 );
ppu.step_pixel(); // 006 316 -> 006 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 317 -> 006 318
ppu.expect_vram_read( 0x0006, 0x86 );
ppu.step_pixel(); // 006 318 -> 006 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 006 319 -> 006 320
ppu.expect_vram_read( 0x000E, 0x8E );
ppu.step_pixel(); // 006 320 -> 006 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 007 256 -> 007 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0x00 );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 257 -> 007 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 007 258 -> 007 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 259 -> 007 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 260 -> 007 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 261 -> 007 262
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 262 -> 007 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 263 -> 007 264
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 264 -> 007 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 265 -> 007 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 266 -> 007 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 267 -> 007 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 268 -> 007 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 269 -> 007 270
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 270 -> 007 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 271 -> 007 272
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 272 -> 007 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 273 -> 007 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 274 -> 007 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 275 -> 007 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 276 -> 007 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 277 -> 007 278
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 278 -> 007 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 279 -> 007 280
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 280 -> 007 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 281 -> 007 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 282 -> 007 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 283 -> 007 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 284 -> 007 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 285 -> 007 286
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 286 -> 007 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 287 -> 007 288
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 288 -> 007 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 289 -> 007 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 290 -> 007 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 291 -> 007 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 292 -> 007 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 293 -> 007 294
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 294 -> 007 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 295 -> 007 296
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 296 -> 007 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 297 -> 007 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 298 -> 007 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 299 -> 007 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 300 -> 007 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 301 -> 007 302
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 302 -> 007 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 303 -> 007 304
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 304 -> 007 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 305 -> 007 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 306 -> 007 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 307 -> 007 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 308 -> 007 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 309 -> 007 310
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 310 -> 007 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 311 -> 007 312
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 312 -> 007 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 313 -> 007 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 314 -> 007 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 315 -> 007 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 007 316 -> 007 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 317 -> 007 318
ppu.expect_vram_read( 0x0007, 0x87 );
ppu.step_pixel(); // 007 318 -> 007 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 007 319 -> 007 320
ppu.expect_vram_read( 0x000F, 0x8F );
ppu.step_pixel(); // 007 320 -> 007 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 008 256 -> 008 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 257 -> 008 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 008 258 -> 008 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 259 -> 008 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 260 -> 008 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 261 -> 008 262
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 008 262 -> 008 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 263 -> 008 264
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 008 264 -> 008 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 265 -> 008 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 266 -> 008 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 267 -> 008 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 268 -> 008 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 269 -> 008 270
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 270 -> 008 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 271 -> 008 272
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 272 -> 008 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 273 -> 008 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 274 -> 008 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 275 -> 008 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 276 -> 008 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 277 -> 008 278
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 278 -> 008 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 279 -> 008 280
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 280 -> 008 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 281 -> 008 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 282 -> 008 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 283 -> 008 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 284 -> 008 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 285 -> 008 286
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 286 -> 008 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 287 -> 008 288
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 288 -> 008 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 289 -> 008 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 290 -> 008 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 291 -> 008 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 292 -> 008 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 293 -> 008 294
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 294 -> 008 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 295 -> 008 296
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 296 -> 008 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 297 -> 008 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 298 -> 008 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 299 -> 008 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 300 -> 008 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 301 -> 008 302
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 302 -> 008 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 303 -> 008 304
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 304 -> 008 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 305 -> 008 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 306 -> 008 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 307 -> 008 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 308 -> 008 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 309 -> 008 310
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 310 -> 008 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 311 -> 008 312
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 312 -> 008 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 313 -> 008 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 314 -> 008 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 315 -> 008 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 008 316 -> 008 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 317 -> 008 318
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 008 318 -> 008 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 008 319 -> 008 320
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 008 320 -> 008 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 009 256 -> 009 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 257 -> 009 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 009 258 -> 009 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 259 -> 009 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 260 -> 009 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 261 -> 009 262
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 009 262 -> 009 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 263 -> 009 264
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 009 264 -> 009 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 265 -> 009 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 266 -> 009 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 267 -> 009 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 268 -> 009 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 269 -> 009 270
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 270 -> 009 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 271 -> 009 272
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 272 -> 009 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 273 -> 009 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 274 -> 009 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 275 -> 009 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 276 -> 009 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 277 -> 009 278
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 278 -> 009 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 279 -> 009 280
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 280 -> 009 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 281 -> 009 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 282 -> 009 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 283 -> 009 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 284 -> 009 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 285 -> 009 286
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 286 -> 009 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 287 -> 009 288
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 288 -> 009 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 289 -> 009 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 290 -> 009 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 291 -> 009 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 292 -> 009 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 293 -> 009 294
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 294 -> 009 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 295 -> 009 296
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 296 -> 009 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 297 -> 009 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 298 -> 009 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 299 -> 009 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 300 -> 009 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 301 -> 009 302
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 302 -> 009 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 303 -> 009 304
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 304 -> 009 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 305 -> 009 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 306 -> 009 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 307 -> 009 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 308 -> 009 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 309 -> 009 310
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 310 -> 009 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 311 -> 009 312
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 312 -> 009 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 313 -> 009 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 314 -> 009 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 315 -> 009 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 009 316 -> 009 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 317 -> 009 318
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 009 318 -> 009 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 009 319 -> 009 320
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 009 320 -> 009 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 010 256 -> 010 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 257 -> 010 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 010 258 -> 010 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 259 -> 010 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 260 -> 010 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 261 -> 010 262
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 010 262 -> 010 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 263 -> 010 264
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 010 264 -> 010 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 265 -> 010 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 266 -> 010 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 267 -> 010 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 268 -> 010 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 269 -> 010 270
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 270 -> 010 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 271 -> 010 272
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 272 -> 010 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 273 -> 010 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 274 -> 010 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 275 -> 010 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 276 -> 010 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 277 -> 010 278
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 278 -> 010 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 279 -> 010 280
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 280 -> 010 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 281 -> 010 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 282 -> 010 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 283 -> 010 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 284 -> 010 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 285 -> 010 286
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 286 -> 010 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 287 -> 010 288
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 288 -> 010 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 289 -> 010 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 290 -> 010 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 291 -> 010 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 292 -> 010 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 293 -> 010 294
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 294 -> 010 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 295 -> 010 296
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 296 -> 010 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 297 -> 010 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 298 -> 010 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 299 -> 010 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 300 -> 010 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 301 -> 010 302
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 302 -> 010 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 303 -> 010 304
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 304 -> 010 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 305 -> 010 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 306 -> 010 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 307 -> 010 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 308 -> 010 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 309 -> 010 310
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 310 -> 010 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 311 -> 010 312
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 312 -> 010 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 313 -> 010 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 314 -> 010 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 315 -> 010 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 010 316 -> 010 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 317 -> 010 318
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 010 318 -> 010 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 010 319 -> 010 320
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 010 320 -> 010 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 011 256 -> 011 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 257 -> 011 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 011 258 -> 011 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 259 -> 011 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 260 -> 011 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 261 -> 011 262
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 011 262 -> 011 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 263 -> 011 264
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 011 264 -> 011 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 265 -> 011 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 266 -> 011 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 267 -> 011 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 268 -> 011 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 269 -> 011 270
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 270 -> 011 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 271 -> 011 272
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 272 -> 011 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 273 -> 011 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 274 -> 011 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 275 -> 011 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 276 -> 011 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 277 -> 011 278
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 278 -> 011 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 279 -> 011 280
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 280 -> 011 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 281 -> 011 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 282 -> 011 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 283 -> 011 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 284 -> 011 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 285 -> 011 286
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 286 -> 011 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 287 -> 011 288
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 288 -> 011 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 289 -> 011 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 290 -> 011 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 291 -> 011 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 292 -> 011 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 293 -> 011 294
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 294 -> 011 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 295 -> 011 296
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 296 -> 011 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 297 -> 011 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 298 -> 011 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 299 -> 011 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 300 -> 011 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 301 -> 011 302
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 302 -> 011 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 303 -> 011 304
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 304 -> 011 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 305 -> 011 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 306 -> 011 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 307 -> 011 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 308 -> 011 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 309 -> 011 310
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 310 -> 011 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 311 -> 011 312
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 312 -> 011 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 313 -> 011 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 314 -> 011 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 315 -> 011 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 011 316 -> 011 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 317 -> 011 318
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 011 318 -> 011 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 011 319 -> 011 320
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 011 320 -> 011 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 012 256 -> 012 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 257 -> 012 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 012 258 -> 012 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 259 -> 012 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 260 -> 012 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 261 -> 012 262
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 012 262 -> 012 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 263 -> 012 264
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 012 264 -> 012 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 265 -> 012 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 266 -> 012 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 267 -> 012 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 268 -> 012 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 269 -> 012 270
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 270 -> 012 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 271 -> 012 272
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 272 -> 012 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 273 -> 012 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 274 -> 012 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 275 -> 012 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 276 -> 012 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 277 -> 012 278
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 278 -> 012 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 279 -> 012 280
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 280 -> 012 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 281 -> 012 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 282 -> 012 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 283 -> 012 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 284 -> 012 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 285 -> 012 286
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 286 -> 012 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 287 -> 012 288
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 288 -> 012 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 289 -> 012 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 290 -> 012 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 291 -> 012 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 292 -> 012 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 293 -> 012 294
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 294 -> 012 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 295 -> 012 296
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 296 -> 012 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 297 -> 012 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 298 -> 012 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 299 -> 012 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 300 -> 012 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 301 -> 012 302
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 302 -> 012 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 303 -> 012 304
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 304 -> 012 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 305 -> 012 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 306 -> 012 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 307 -> 012 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 308 -> 012 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 309 -> 012 310
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 310 -> 012 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 311 -> 012 312
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 312 -> 012 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 313 -> 012 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 314 -> 012 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 315 -> 012 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 012 316 -> 012 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 317 -> 012 318
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 012 318 -> 012 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 012 319 -> 012 320
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 012 320 -> 012 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 013 256 -> 013 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 257 -> 013 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 013 258 -> 013 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 259 -> 013 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 260 -> 013 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 261 -> 013 262
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 013 262 -> 013 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 263 -> 013 264
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 013 264 -> 013 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 265 -> 013 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 266 -> 013 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 267 -> 013 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 268 -> 013 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 269 -> 013 270
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 270 -> 013 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 271 -> 013 272
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 272 -> 013 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 273 -> 013 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 274 -> 013 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 275 -> 013 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 276 -> 013 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 277 -> 013 278
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 278 -> 013 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 279 -> 013 280
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 280 -> 013 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 281 -> 013 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 282 -> 013 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 283 -> 013 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 284 -> 013 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 285 -> 013 286
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 286 -> 013 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 287 -> 013 288
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 288 -> 013 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 289 -> 013 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 290 -> 013 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 291 -> 013 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 292 -> 013 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 293 -> 013 294
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 294 -> 013 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 295 -> 013 296
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 296 -> 013 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 297 -> 013 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 298 -> 013 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 299 -> 013 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 300 -> 013 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 301 -> 013 302
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 302 -> 013 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 303 -> 013 304
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 304 -> 013 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 305 -> 013 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 306 -> 013 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 307 -> 013 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 308 -> 013 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 309 -> 013 310
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 310 -> 013 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 311 -> 013 312
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 312 -> 013 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 313 -> 013 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 314 -> 013 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 315 -> 013 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 013 316 -> 013 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 317 -> 013 318
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 013 318 -> 013 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 013 319 -> 013 320
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 013 320 -> 013 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 014 256 -> 014 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 257 -> 014 258
ppu.expect_vram_read( 0x2422, 0xA2 );
ppu.step_pixel(); // 014 258 -> 014 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 259 -> 014 260
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 260 -> 014 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 261 -> 014 262
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 014 262 -> 014 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 263 -> 014 264
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 014 264 -> 014 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 265 -> 014 266
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 266 -> 014 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 267 -> 014 268
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 268 -> 014 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 269 -> 014 270
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 270 -> 014 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 271 -> 014 272
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 272 -> 014 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 273 -> 014 274
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 274 -> 014 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 275 -> 014 276
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 276 -> 014 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 277 -> 014 278
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 278 -> 014 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 279 -> 014 280
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 280 -> 014 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 281 -> 014 282
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 282 -> 014 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 283 -> 014 284
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 284 -> 014 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 285 -> 014 286
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 286 -> 014 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 287 -> 014 288
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 288 -> 014 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 289 -> 014 290
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 290 -> 014 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 291 -> 014 292
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 292 -> 014 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 293 -> 014 294
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 294 -> 014 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 295 -> 014 296
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 296 -> 014 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 297 -> 014 298
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 298 -> 014 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 299 -> 014 300
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 300 -> 014 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 301 -> 014 302
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 302 -> 014 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 303 -> 014 304
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 304 -> 014 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 305 -> 014 306
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 306 -> 014 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 307 -> 014 308
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 308 -> 014 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 309 -> 014 310
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 310 -> 014 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 311 -> 014 312
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 312 -> 014 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 313 -> 014 314
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 314 -> 014 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 315 -> 014 316
ppu.expect_vram_read( 0x2020, 0xA0 );
ppu.step_pixel(); // 014 316 -> 014 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 317 -> 014 318
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 014 318 -> 014 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 014 319 -> 014 320
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 014 320 -> 014 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 015 256 -> 015 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 257 -> 015 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 015 258 -> 015 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 259 -> 015 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 260 -> 015 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 261 -> 015 262
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 015 262 -> 015 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 263 -> 015 264
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 015 264 -> 015 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 265 -> 015 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 266 -> 015 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 267 -> 015 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 268 -> 015 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 269 -> 015 270
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 270 -> 015 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 271 -> 015 272
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 272 -> 015 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 273 -> 015 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 274 -> 015 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 275 -> 015 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 276 -> 015 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 277 -> 015 278
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 278 -> 015 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 279 -> 015 280
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 280 -> 015 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 281 -> 015 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 282 -> 015 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 283 -> 015 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 284 -> 015 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 285 -> 015 286
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 286 -> 015 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 287 -> 015 288
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 288 -> 015 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 289 -> 015 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 290 -> 015 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 291 -> 015 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 292 -> 015 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 293 -> 015 294
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 294 -> 015 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 295 -> 015 296
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 296 -> 015 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 297 -> 015 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 298 -> 015 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 299 -> 015 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 300 -> 015 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 301 -> 015 302
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 302 -> 015 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 303 -> 015 304
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 304 -> 015 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 305 -> 015 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 306 -> 015 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 307 -> 015 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 308 -> 015 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 309 -> 015 310
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 310 -> 015 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 311 -> 015 312
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 312 -> 015 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 313 -> 015 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 314 -> 015 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 315 -> 015 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 015 316 -> 015 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 317 -> 015 318
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 015 318 -> 015 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 015 319 -> 015 320
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 015 320 -> 015 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 016 256 -> 016 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 257 -> 016 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 016 258 -> 016 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 259 -> 016 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 260 -> 016 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 261 -> 016 262
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 016 262 -> 016 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 263 -> 016 264
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 016 264 -> 016 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 265 -> 016 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 266 -> 016 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 267 -> 016 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 268 -> 016 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 269 -> 016 270
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 270 -> 016 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 271 -> 016 272
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 272 -> 016 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 273 -> 016 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 274 -> 016 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 275 -> 016 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 276 -> 016 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 277 -> 016 278
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 278 -> 016 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 279 -> 016 280
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 280 -> 016 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 281 -> 016 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 282 -> 016 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 283 -> 016 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 284 -> 016 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 285 -> 016 286
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 286 -> 016 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 287 -> 016 288
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 288 -> 016 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 289 -> 016 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 290 -> 016 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 291 -> 016 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 292 -> 016 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 293 -> 016 294
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 294 -> 016 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 295 -> 016 296
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 296 -> 016 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 297 -> 016 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 298 -> 016 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 299 -> 016 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 300 -> 016 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 301 -> 016 302
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 302 -> 016 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 303 -> 016 304
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 304 -> 016 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 305 -> 016 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 306 -> 016 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 307 -> 016 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 308 -> 016 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 309 -> 016 310
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 310 -> 016 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 311 -> 016 312
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 312 -> 016 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 313 -> 016 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 314 -> 016 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 315 -> 016 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 016 316 -> 016 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 317 -> 016 318
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 016 318 -> 016 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 016 319 -> 016 320
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 016 320 -> 016 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 017 256 -> 017 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 257 -> 017 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 017 258 -> 017 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 259 -> 017 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 260 -> 017 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 261 -> 017 262
ppu.expect_vram_read( 0x0FF6, 0x76 );
ppu.step_pixel(); // 017 262 -> 017 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 263 -> 017 264
ppu.expect_vram_read( 0x0FFE, 0x7E );
ppu.step_pixel(); // 017 264 -> 017 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 265 -> 017 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 266 -> 017 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 267 -> 017 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 268 -> 017 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 269 -> 017 270
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 270 -> 017 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 271 -> 017 272
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 272 -> 017 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 273 -> 017 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 274 -> 017 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 275 -> 017 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 276 -> 017 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 277 -> 017 278
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 278 -> 017 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 279 -> 017 280
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 280 -> 017 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 281 -> 017 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 282 -> 017 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 283 -> 017 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 284 -> 017 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 285 -> 017 286
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 286 -> 017 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 287 -> 017 288
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 288 -> 017 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 289 -> 017 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 290 -> 017 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 291 -> 017 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 292 -> 017 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 293 -> 017 294
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 294 -> 017 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 295 -> 017 296
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 296 -> 017 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 297 -> 017 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 298 -> 017 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 299 -> 017 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 300 -> 017 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 301 -> 017 302
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 302 -> 017 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 303 -> 017 304
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 304 -> 017 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 305 -> 017 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 306 -> 017 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 307 -> 017 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 308 -> 017 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 309 -> 017 310
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 310 -> 017 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 311 -> 017 312
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 312 -> 017 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 313 -> 017 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 314 -> 017 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 315 -> 017 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 017 316 -> 017 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 317 -> 017 318
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 017 318 -> 017 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 017 319 -> 017 320
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 017 320 -> 017 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 018 256 -> 018 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 257 -> 018 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 018 258 -> 018 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 259 -> 018 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 260 -> 018 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 261 -> 018 262
ppu.expect_vram_read( 0x0FF5, 0x75 );
ppu.step_pixel(); // 018 262 -> 018 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 263 -> 018 264
ppu.expect_vram_read( 0x0FFD, 0x7D );
ppu.step_pixel(); // 018 264 -> 018 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 265 -> 018 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 266 -> 018 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 267 -> 018 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 268 -> 018 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 269 -> 018 270
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 270 -> 018 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 271 -> 018 272
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 272 -> 018 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 273 -> 018 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 274 -> 018 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 275 -> 018 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 276 -> 018 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 277 -> 018 278
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 278 -> 018 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 279 -> 018 280
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 280 -> 018 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 281 -> 018 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 282 -> 018 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 283 -> 018 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 284 -> 018 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 285 -> 018 286
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 286 -> 018 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 287 -> 018 288
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 288 -> 018 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 289 -> 018 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 290 -> 018 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 291 -> 018 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 292 -> 018 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 293 -> 018 294
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 294 -> 018 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 295 -> 018 296
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 296 -> 018 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 297 -> 018 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 298 -> 018 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 299 -> 018 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 300 -> 018 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 301 -> 018 302
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 302 -> 018 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 303 -> 018 304
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 304 -> 018 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 305 -> 018 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 306 -> 018 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 307 -> 018 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 308 -> 018 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 309 -> 018 310
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 310 -> 018 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 311 -> 018 312
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 312 -> 018 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 313 -> 018 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 314 -> 018 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 315 -> 018 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 018 316 -> 018 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 317 -> 018 318
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 018 318 -> 018 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 018 319 -> 018 320
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 018 320 -> 018 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 019 256 -> 019 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 257 -> 019 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 019 258 -> 019 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 259 -> 019 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 260 -> 019 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 261 -> 019 262
ppu.expect_vram_read( 0x0FF4, 0x74 );
ppu.step_pixel(); // 019 262 -> 019 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 263 -> 019 264
ppu.expect_vram_read( 0x0FFC, 0x7C );
ppu.step_pixel(); // 019 264 -> 019 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 265 -> 019 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 266 -> 019 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 267 -> 019 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 268 -> 019 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 269 -> 019 270
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 270 -> 019 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 271 -> 019 272
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 272 -> 019 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 273 -> 019 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 274 -> 019 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 275 -> 019 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 276 -> 019 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 277 -> 019 278
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 278 -> 019 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 279 -> 019 280
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 280 -> 019 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 281 -> 019 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 282 -> 019 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 283 -> 019 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 284 -> 019 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 285 -> 019 286
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 286 -> 019 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 287 -> 019 288
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 288 -> 019 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 289 -> 019 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 290 -> 019 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 291 -> 019 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 292 -> 019 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 293 -> 019 294
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 294 -> 019 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 295 -> 019 296
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 296 -> 019 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 297 -> 019 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 298 -> 019 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 299 -> 019 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 300 -> 019 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 301 -> 019 302
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 302 -> 019 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 303 -> 019 304
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 304 -> 019 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 305 -> 019 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 306 -> 019 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 307 -> 019 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 308 -> 019 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 309 -> 019 310
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 310 -> 019 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 311 -> 019 312
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 312 -> 019 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 313 -> 019 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 314 -> 019 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 315 -> 019 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 019 316 -> 019 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 317 -> 019 318
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 019 318 -> 019 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 019 319 -> 019 320
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 019 320 -> 019 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 020 256 -> 020 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 257 -> 020 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 020 258 -> 020 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 259 -> 020 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 260 -> 020 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 261 -> 020 262
ppu.expect_vram_read( 0x0FF3, 0x73 );
ppu.step_pixel(); // 020 262 -> 020 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 263 -> 020 264
ppu.expect_vram_read( 0x0FFB, 0x7B );
ppu.step_pixel(); // 020 264 -> 020 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 265 -> 020 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 266 -> 020 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 267 -> 020 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 268 -> 020 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 269 -> 020 270
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 270 -> 020 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 271 -> 020 272
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 272 -> 020 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 273 -> 020 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 274 -> 020 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 275 -> 020 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 276 -> 020 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 277 -> 020 278
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 278 -> 020 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 279 -> 020 280
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 280 -> 020 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 281 -> 020 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 282 -> 020 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 283 -> 020 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 284 -> 020 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 285 -> 020 286
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 286 -> 020 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 287 -> 020 288
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 288 -> 020 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 289 -> 020 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 290 -> 020 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 291 -> 020 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 292 -> 020 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 293 -> 020 294
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 294 -> 020 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 295 -> 020 296
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 296 -> 020 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 297 -> 020 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 298 -> 020 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 299 -> 020 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 300 -> 020 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 301 -> 020 302
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 302 -> 020 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 303 -> 020 304
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 304 -> 020 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 305 -> 020 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 306 -> 020 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 307 -> 020 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 308 -> 020 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 309 -> 020 310
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 310 -> 020 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 311 -> 020 312
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 312 -> 020 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 313 -> 020 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 314 -> 020 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 315 -> 020 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 020 316 -> 020 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 317 -> 020 318
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 020 318 -> 020 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 020 319 -> 020 320
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 020 320 -> 020 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 021 256 -> 021 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 257 -> 021 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 021 258 -> 021 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 259 -> 021 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 260 -> 021 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 261 -> 021 262
ppu.expect_vram_read( 0x0FF2, 0x72 );
ppu.step_pixel(); // 021 262 -> 021 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 263 -> 021 264
ppu.expect_vram_read( 0x0FFA, 0x7A );
ppu.step_pixel(); // 021 264 -> 021 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 265 -> 021 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 266 -> 021 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 267 -> 021 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 268 -> 021 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 269 -> 021 270
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 270 -> 021 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 271 -> 021 272
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 272 -> 021 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 273 -> 021 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 274 -> 021 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 275 -> 021 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 276 -> 021 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 277 -> 021 278
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 278 -> 021 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 279 -> 021 280
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 280 -> 021 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 281 -> 021 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 282 -> 021 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 283 -> 021 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 284 -> 021 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 285 -> 021 286
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 286 -> 021 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 287 -> 021 288
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 288 -> 021 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 289 -> 021 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 290 -> 021 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 291 -> 021 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 292 -> 021 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 293 -> 021 294
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 294 -> 021 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 295 -> 021 296
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 296 -> 021 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 297 -> 021 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 298 -> 021 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 299 -> 021 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 300 -> 021 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 301 -> 021 302
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 302 -> 021 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 303 -> 021 304
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 304 -> 021 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 305 -> 021 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 306 -> 021 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 307 -> 021 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 308 -> 021 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 309 -> 021 310
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 310 -> 021 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 311 -> 021 312
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 312 -> 021 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 313 -> 021 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 314 -> 021 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 315 -> 021 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 021 316 -> 021 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 317 -> 021 318
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 021 318 -> 021 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 021 319 -> 021 320
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 021 320 -> 021 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 022 256 -> 022 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 257 -> 022 258
ppu.expect_vram_read( 0x2442, 0xC2 );
ppu.step_pixel(); // 022 258 -> 022 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 259 -> 022 260
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 260 -> 022 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 261 -> 022 262
ppu.expect_vram_read( 0x0FF1, 0x71 );
ppu.step_pixel(); // 022 262 -> 022 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 263 -> 022 264
ppu.expect_vram_read( 0x0FF9, 0x79 );
ppu.step_pixel(); // 022 264 -> 022 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 265 -> 022 266
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 266 -> 022 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 267 -> 022 268
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 268 -> 022 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 269 -> 022 270
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 270 -> 022 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 271 -> 022 272
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 272 -> 022 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 273 -> 022 274
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 274 -> 022 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 275 -> 022 276
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 276 -> 022 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 277 -> 022 278
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 278 -> 022 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 279 -> 022 280
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 280 -> 022 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 281 -> 022 282
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 282 -> 022 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 283 -> 022 284
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 284 -> 022 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 285 -> 022 286
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 286 -> 022 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 287 -> 022 288
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 288 -> 022 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 289 -> 022 290
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 290 -> 022 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 291 -> 022 292
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 292 -> 022 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 293 -> 022 294
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 294 -> 022 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 295 -> 022 296
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 296 -> 022 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 297 -> 022 298
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 298 -> 022 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 299 -> 022 300
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 300 -> 022 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 301 -> 022 302
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 302 -> 022 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 303 -> 022 304
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 304 -> 022 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 305 -> 022 306
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 306 -> 022 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 307 -> 022 308
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 308 -> 022 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 309 -> 022 310
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 310 -> 022 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 311 -> 022 312
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 312 -> 022 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 313 -> 022 314
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 314 -> 022 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 315 -> 022 316
ppu.expect_vram_read( 0x2040, 0xC0 );
ppu.step_pixel(); // 022 316 -> 022 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 317 -> 022 318
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 022 318 -> 022 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 022 319 -> 022 320
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 022 320 -> 022 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 023 256 -> 023 257
assert_eq( ppu.read_secondary_sprite_ram( 0 ), 0x00 );
assert_eq( ppu.read_secondary_sprite_ram( 1 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 2 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 3 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 4 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 5 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 6 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 7 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 8 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 9 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 10 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 11 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 12 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 13 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 14 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 15 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 16 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 17 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 18 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 19 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 20 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 21 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 22 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 23 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 24 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 25 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 26 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 27 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 28 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 29 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 30 ), 0xFF );
assert_eq( ppu.read_secondary_sprite_ram( 31 ), 0xFF );
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 257 -> 023 258
ppu.expect_vram_read( 0x2462, 0xE2 );
ppu.step_pixel(); // 023 258 -> 023 259
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 259 -> 023 260
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 260 -> 023 261
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 261 -> 023 262
ppu.expect_vram_read( 0x0FF0, 0x70 );
ppu.step_pixel(); // 023 262 -> 023 263
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 263 -> 023 264
ppu.expect_vram_read( 0x0FF8, 0x78 );
ppu.step_pixel(); // 023 264 -> 023 265
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 265 -> 023 266
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 266 -> 023 267
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 267 -> 023 268
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 268 -> 023 269
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 269 -> 023 270
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 270 -> 023 271
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 271 -> 023 272
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 272 -> 023 273
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 273 -> 023 274
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 274 -> 023 275
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 275 -> 023 276
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 276 -> 023 277
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 277 -> 023 278
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 278 -> 023 279
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 279 -> 023 280
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 280 -> 023 281
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 281 -> 023 282
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 282 -> 023 283
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 283 -> 023 284
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 284 -> 023 285
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 285 -> 023 286
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 286 -> 023 287
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 287 -> 023 288
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 288 -> 023 289
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 289 -> 023 290
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 290 -> 023 291
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 291 -> 023 292
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 292 -> 023 293
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 293 -> 023 294
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 294 -> 023 295
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 295 -> 023 296
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 296 -> 023 297
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 297 -> 023 298
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 298 -> 023 299
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 299 -> 023 300
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 300 -> 023 301
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 301 -> 023 302
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 302 -> 023 303
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 303 -> 023 304
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 304 -> 023 305
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 305 -> 023 306
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 306 -> 023 307
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 307 -> 023 308
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 308 -> 023 309
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 309 -> 023 310
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 310 -> 023 311
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 311 -> 023 312
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 312 -> 023 313
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 313 -> 023 314
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 314 -> 023 315
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 315 -> 023 316
ppu.expect_vram_read( 0x2060, 0xE0 );
ppu.step_pixel(); // 023 316 -> 023 317
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 317 -> 023 318
ppu.expect_vram_read( 0x0FF7, 0x77 );
ppu.step_pixel(); // 023 318 -> 023 319
ppu.expect_no_vram_read();
ppu.step_pixel(); // 023 319 -> 023 320
ppu.expect_vram_read( 0x0FFF, 0x7F );
ppu.step_pixel(); // 023 320 -> 023 321
ppu.step_scanline();
assert_eq!( ppu.scanline(), 24 );
assert_eq!( ppu.dot(), 0 );
}