256. Validation decode chr tile from tiny ines rom
VALIDATION TEST: decode one CHR tile from a tiny iNES ROM through the real path.
Lesson 256 of 356 · tests/chapter_03_ppu_memory_and_graphics_data/test_256_VALIDATION_decode_chr_tile_from_tiny_ines_rom.py
This file is not a student implementation step.
There is nothing new to implement for this test. It exists only to validate that the graphics data pieces built so far work together through their real boundaries:
iNES bytes
-> Cartridge.from_ines_bytes(data)
-> CpuBus(cartridge=cartridge, ppu=ppu)
-> mapper connected to ppu.ppu_bus
-> ppu.ppu_bus.read($0000-$000F)
-> decode_chr_tile(tile_bytes)
-> 8x8 grid of color indexesWhy this validation exists
Previous tests verified CHR ROM reads, PpuBus mapper routing, and CHR tile decoding separately. This test proves that CHR bytes from an actual tiny iNES ROM can flow through the cartridge/mapper/PPU-bus path and be decoded as graphics data.
Important
This is still not rendering. The decoder returns palette indexes 0-3, not final RGB colors and not a screen framebuffer.
Known first CHR tile used by this test
low plane row 0: 1100_0011
high plane row 0: 1010_0101Decoded first row
[3, 1, 2, 0, 0, 2, 1, 3]Out of scope
- pattern table image rendering
- nametable background rendering
- palette color lookup
- VBlank/NMI timing
- sprites
Run this lesson
uv run pytest tests/chapter_03_ppu_memory_and_graphics_data/test_256_VALIDATION_decode_chr_tile_from_tiny_ines_rom.py -v