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

568 lines
26 KiB
Rust

// This file was AUTOGENERATED; do not edit!
#[allow(unused_imports)]
use super::super::assert_eq;
use TestPPU;
#[inline(never)]
pub fn test_current_address_during_sprite_rendering( 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
ppu.write_secondary_sprite_ram( 0, 0xFF );
ppu.write_secondary_sprite_ram( 1, 0xFF );
ppu.write_secondary_sprite_ram( 2, 0xFF );
ppu.write_secondary_sprite_ram( 3, 0xFF );
ppu.write_secondary_sprite_ram( 4, 0xFF );
ppu.write_secondary_sprite_ram( 5, 0xFF );
ppu.write_secondary_sprite_ram( 6, 0xFF );
ppu.write_secondary_sprite_ram( 7, 0xFF );
ppu.write_secondary_sprite_ram( 8, 0xFF );
ppu.write_secondary_sprite_ram( 9, 0xFF );
ppu.write_secondary_sprite_ram( 10, 0xFF );
ppu.write_secondary_sprite_ram( 11, 0xFF );
ppu.write_secondary_sprite_ram( 12, 0xFF );
ppu.write_secondary_sprite_ram( 13, 0xFF );
ppu.write_secondary_sprite_ram( 14, 0xFF );
ppu.write_secondary_sprite_ram( 15, 0xFF );
ppu.write_secondary_sprite_ram( 16, 0xFF );
ppu.write_secondary_sprite_ram( 17, 0xFF );
ppu.write_secondary_sprite_ram( 18, 0xFF );
ppu.write_secondary_sprite_ram( 19, 0xFF );
ppu.write_secondary_sprite_ram( 20, 0xFF );
ppu.write_secondary_sprite_ram( 21, 0xFF );
ppu.write_secondary_sprite_ram( 22, 0xFF );
ppu.write_secondary_sprite_ram( 23, 0xFF );
ppu.write_secondary_sprite_ram( 24, 0xFF );
ppu.write_secondary_sprite_ram( 25, 0xFF );
ppu.write_secondary_sprite_ram( 26, 0xFF );
ppu.write_secondary_sprite_ram( 27, 0xFF );
ppu.write_secondary_sprite_ram( 28, 0xFF );
ppu.write_secondary_sprite_ram( 29, 0xFF );
ppu.write_secondary_sprite_ram( 30, 0xFF );
ppu.write_secondary_sprite_ram( 31, 0xFF );
ppu.write_secondary_sprite_ram( 0, 0x00 );
ppu.write_secondary_sprite_ram( 1, 0xAA );
ppu.write_secondary_sprite_ram( 2, 0x00 );
ppu.write_secondary_sprite_ram( 3, 0x00 );
ppu.write_secondary_sprite_ram( 4, 0x00 );
ppu.write_secondary_sprite_ram( 5, 0xBA );
ppu.write_secondary_sprite_ram( 6, 0x40 );
ppu.write_secondary_sprite_ram( 7, 0x08 );
ppu.write_secondary_sprite_ram( 8, 0x00 );
ppu.write_secondary_sprite_ram( 9, 0xCA );
ppu.write_secondary_sprite_ram( 10, 0x80 );
ppu.write_secondary_sprite_ram( 11, 0x10 );
ppu.write_secondary_sprite_ram( 12, 0x00 );
ppu.write_secondary_sprite_ram( 13, 0xDA );
ppu.write_secondary_sprite_ram( 14, 0xC0 );
ppu.write_secondary_sprite_ram( 15, 0x18 );
assert_eq( ppu.get_current_address(), 0x1402 );
ppu.step_pixel(); // 000 257 -> 000 258
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 258 -> 000 259
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 259 -> 000 260
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 260 -> 000 261
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 261 -> 000 262
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 262 -> 000 263
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 263 -> 000 264
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 264 -> 000 265
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 265 -> 000 266
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 266 -> 000 267
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 267 -> 000 268
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 268 -> 000 269
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 269 -> 000 270
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 270 -> 000 271
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 271 -> 000 272
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 272 -> 000 273
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 273 -> 000 274
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 274 -> 000 275
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 275 -> 000 276
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 276 -> 000 277
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 277 -> 000 278
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 278 -> 000 279
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 279 -> 000 280
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 280 -> 000 281
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 281 -> 000 282
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 282 -> 000 283
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 283 -> 000 284
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 284 -> 000 285
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 285 -> 000 286
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 286 -> 000 287
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 287 -> 000 288
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 288 -> 000 289
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 289 -> 000 290
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 290 -> 000 291
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 291 -> 000 292
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 292 -> 000 293
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 293 -> 000 294
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 294 -> 000 295
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 295 -> 000 296
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 296 -> 000 297
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 297 -> 000 298
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 298 -> 000 299
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 299 -> 000 300
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 300 -> 000 301
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 301 -> 000 302
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 302 -> 000 303
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 303 -> 000 304
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 304 -> 000 305
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 305 -> 000 306
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 306 -> 000 307
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 307 -> 000 308
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 308 -> 000 309
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 309 -> 000 310
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 310 -> 000 311
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 311 -> 000 312
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 312 -> 000 313
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 313 -> 000 314
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 314 -> 000 315
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 315 -> 000 316
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 316 -> 000 317
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 317 -> 000 318
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 318 -> 000 319
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 319 -> 000 320
assert_eq( ppu.get_current_address(), 0x1000 );
ppu.step_pixel(); // 000 320 -> 000 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 001 256 -> 001 257
ppu.write_secondary_sprite_ram( 0, 0xFF );
ppu.write_secondary_sprite_ram( 1, 0xFF );
ppu.write_secondary_sprite_ram( 2, 0xFF );
ppu.write_secondary_sprite_ram( 3, 0xFF );
ppu.write_secondary_sprite_ram( 4, 0xFF );
ppu.write_secondary_sprite_ram( 5, 0xFF );
ppu.write_secondary_sprite_ram( 6, 0xFF );
ppu.write_secondary_sprite_ram( 7, 0xFF );
ppu.write_secondary_sprite_ram( 8, 0xFF );
ppu.write_secondary_sprite_ram( 9, 0xFF );
ppu.write_secondary_sprite_ram( 10, 0xFF );
ppu.write_secondary_sprite_ram( 11, 0xFF );
ppu.write_secondary_sprite_ram( 12, 0xFF );
ppu.write_secondary_sprite_ram( 13, 0xFF );
ppu.write_secondary_sprite_ram( 14, 0xFF );
ppu.write_secondary_sprite_ram( 15, 0xFF );
ppu.write_secondary_sprite_ram( 16, 0xFF );
ppu.write_secondary_sprite_ram( 17, 0xFF );
ppu.write_secondary_sprite_ram( 18, 0xFF );
ppu.write_secondary_sprite_ram( 19, 0xFF );
ppu.write_secondary_sprite_ram( 20, 0xFF );
ppu.write_secondary_sprite_ram( 21, 0xFF );
ppu.write_secondary_sprite_ram( 22, 0xFF );
ppu.write_secondary_sprite_ram( 23, 0xFF );
ppu.write_secondary_sprite_ram( 24, 0xFF );
ppu.write_secondary_sprite_ram( 25, 0xFF );
ppu.write_secondary_sprite_ram( 26, 0xFF );
ppu.write_secondary_sprite_ram( 27, 0xFF );
ppu.write_secondary_sprite_ram( 28, 0xFF );
ppu.write_secondary_sprite_ram( 29, 0xFF );
ppu.write_secondary_sprite_ram( 30, 0xFF );
ppu.write_secondary_sprite_ram( 31, 0xFF );
ppu.write_secondary_sprite_ram( 0, 0x00 );
ppu.write_secondary_sprite_ram( 1, 0xAA );
ppu.write_secondary_sprite_ram( 2, 0x00 );
ppu.write_secondary_sprite_ram( 3, 0x00 );
ppu.write_secondary_sprite_ram( 4, 0x00 );
ppu.write_secondary_sprite_ram( 5, 0xBA );
ppu.write_secondary_sprite_ram( 6, 0x40 );
ppu.write_secondary_sprite_ram( 7, 0x08 );
ppu.write_secondary_sprite_ram( 8, 0x00 );
ppu.write_secondary_sprite_ram( 9, 0xCA );
ppu.write_secondary_sprite_ram( 10, 0x80 );
ppu.write_secondary_sprite_ram( 11, 0x10 );
ppu.write_secondary_sprite_ram( 12, 0x00 );
ppu.write_secondary_sprite_ram( 13, 0xDA );
ppu.write_secondary_sprite_ram( 14, 0xC0 );
ppu.write_secondary_sprite_ram( 15, 0x18 );
assert_eq( ppu.get_current_address(), 0x2402 );
ppu.step_pixel(); // 001 257 -> 001 258
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 258 -> 001 259
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 259 -> 001 260
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 260 -> 001 261
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 261 -> 001 262
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 262 -> 001 263
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 263 -> 001 264
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 264 -> 001 265
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 265 -> 001 266
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 266 -> 001 267
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 267 -> 001 268
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 268 -> 001 269
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 269 -> 001 270
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 270 -> 001 271
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 271 -> 001 272
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 272 -> 001 273
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 273 -> 001 274
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 274 -> 001 275
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 275 -> 001 276
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 276 -> 001 277
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 277 -> 001 278
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 278 -> 001 279
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 279 -> 001 280
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 280 -> 001 281
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 281 -> 001 282
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 282 -> 001 283
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 283 -> 001 284
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 284 -> 001 285
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 285 -> 001 286
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 286 -> 001 287
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 287 -> 001 288
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 288 -> 001 289
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 289 -> 001 290
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 290 -> 001 291
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 291 -> 001 292
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 292 -> 001 293
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 293 -> 001 294
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 294 -> 001 295
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 295 -> 001 296
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 296 -> 001 297
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 297 -> 001 298
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 298 -> 001 299
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 299 -> 001 300
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 300 -> 001 301
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 301 -> 001 302
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 302 -> 001 303
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 303 -> 001 304
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 304 -> 001 305
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 305 -> 001 306
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 306 -> 001 307
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 307 -> 001 308
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 308 -> 001 309
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 309 -> 001 310
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 310 -> 001 311
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 311 -> 001 312
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 312 -> 001 313
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 313 -> 001 314
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 314 -> 001 315
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 315 -> 001 316
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 316 -> 001 317
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 317 -> 001 318
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 318 -> 001 319
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 319 -> 001 320
assert_eq( ppu.get_current_address(), 0x2000 );
ppu.step_pixel(); // 001 320 -> 001 321
ppu.step_scanline();
for _ in 0..257u32 {
ppu.step_pixel();
} // 002 256 -> 002 257
ppu.write_secondary_sprite_ram( 0, 0xFF );
ppu.write_secondary_sprite_ram( 1, 0xFF );
ppu.write_secondary_sprite_ram( 2, 0xFF );
ppu.write_secondary_sprite_ram( 3, 0xFF );
ppu.write_secondary_sprite_ram( 4, 0xFF );
ppu.write_secondary_sprite_ram( 5, 0xFF );
ppu.write_secondary_sprite_ram( 6, 0xFF );
ppu.write_secondary_sprite_ram( 7, 0xFF );
ppu.write_secondary_sprite_ram( 8, 0xFF );
ppu.write_secondary_sprite_ram( 9, 0xFF );
ppu.write_secondary_sprite_ram( 10, 0xFF );
ppu.write_secondary_sprite_ram( 11, 0xFF );
ppu.write_secondary_sprite_ram( 12, 0xFF );
ppu.write_secondary_sprite_ram( 13, 0xFF );
ppu.write_secondary_sprite_ram( 14, 0xFF );
ppu.write_secondary_sprite_ram( 15, 0xFF );
ppu.write_secondary_sprite_ram( 16, 0xFF );
ppu.write_secondary_sprite_ram( 17, 0xFF );
ppu.write_secondary_sprite_ram( 18, 0xFF );
ppu.write_secondary_sprite_ram( 19, 0xFF );
ppu.write_secondary_sprite_ram( 20, 0xFF );
ppu.write_secondary_sprite_ram( 21, 0xFF );
ppu.write_secondary_sprite_ram( 22, 0xFF );
ppu.write_secondary_sprite_ram( 23, 0xFF );
ppu.write_secondary_sprite_ram( 24, 0xFF );
ppu.write_secondary_sprite_ram( 25, 0xFF );
ppu.write_secondary_sprite_ram( 26, 0xFF );
ppu.write_secondary_sprite_ram( 27, 0xFF );
ppu.write_secondary_sprite_ram( 28, 0xFF );
ppu.write_secondary_sprite_ram( 29, 0xFF );
ppu.write_secondary_sprite_ram( 30, 0xFF );
ppu.write_secondary_sprite_ram( 31, 0xFF );
ppu.write_secondary_sprite_ram( 0, 0x00 );
ppu.write_secondary_sprite_ram( 1, 0xAA );
ppu.write_secondary_sprite_ram( 2, 0x00 );
ppu.write_secondary_sprite_ram( 3, 0x00 );
ppu.write_secondary_sprite_ram( 4, 0x00 );
ppu.write_secondary_sprite_ram( 5, 0xBA );
ppu.write_secondary_sprite_ram( 6, 0x40 );
ppu.write_secondary_sprite_ram( 7, 0x08 );
ppu.write_secondary_sprite_ram( 8, 0x00 );
ppu.write_secondary_sprite_ram( 9, 0xCA );
ppu.write_secondary_sprite_ram( 10, 0x80 );
ppu.write_secondary_sprite_ram( 11, 0x10 );
ppu.write_secondary_sprite_ram( 12, 0x00 );
ppu.write_secondary_sprite_ram( 13, 0xDA );
ppu.write_secondary_sprite_ram( 14, 0xC0 );
ppu.write_secondary_sprite_ram( 15, 0x18 );
assert_eq( ppu.get_current_address(), 0x3402 );
ppu.step_pixel(); // 002 257 -> 002 258
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 258 -> 002 259
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 259 -> 002 260
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 260 -> 002 261
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 261 -> 002 262
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 262 -> 002 263
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 263 -> 002 264
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 264 -> 002 265
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 265 -> 002 266
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 266 -> 002 267
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 267 -> 002 268
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 268 -> 002 269
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 269 -> 002 270
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 270 -> 002 271
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 271 -> 002 272
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 272 -> 002 273
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 273 -> 002 274
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 274 -> 002 275
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 275 -> 002 276
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 276 -> 002 277
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 277 -> 002 278
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 278 -> 002 279
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 279 -> 002 280
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 280 -> 002 281
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 281 -> 002 282
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 282 -> 002 283
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 283 -> 002 284
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 284 -> 002 285
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 285 -> 002 286
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 286 -> 002 287
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 287 -> 002 288
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 288 -> 002 289
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 289 -> 002 290
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 290 -> 002 291
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 291 -> 002 292
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 292 -> 002 293
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 293 -> 002 294
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 294 -> 002 295
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 295 -> 002 296
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 296 -> 002 297
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 297 -> 002 298
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 298 -> 002 299
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 299 -> 002 300
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 300 -> 002 301
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 301 -> 002 302
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 302 -> 002 303
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 303 -> 002 304
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 304 -> 002 305
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 305 -> 002 306
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 306 -> 002 307
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 307 -> 002 308
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 308 -> 002 309
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 309 -> 002 310
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 310 -> 002 311
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 311 -> 002 312
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 312 -> 002 313
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 313 -> 002 314
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 314 -> 002 315
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 315 -> 002 316
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 316 -> 002 317
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 317 -> 002 318
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 318 -> 002 319
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 319 -> 002 320
assert_eq( ppu.get_current_address(), 0x3000 );
ppu.step_pixel(); // 002 320 -> 002 321
ppu.step_scanline();
assert_eq!( ppu.scanline(), 3 );
assert_eq!( ppu.dot(), 0 );
}