$4014: OAMDMA
(value byte)
| 368 | |
| 369 | // $4014: OAMDMA |
| 370 | func (ppu *PPU) writeDMA(value byte) { |
| 371 | cpu := ppu.console.CPU |
| 372 | address := uint16(value) << 8 |
| 373 | for i := 0; i < 256; i++ { |
| 374 | ppu.oamData[ppu.oamAddress] = cpu.Read(address) |
| 375 | ppu.oamAddress++ |
| 376 | address++ |
| 377 | } |
| 378 | cpu.stall += 513 |
| 379 | if cpu.Cycles%2 == 1 { |
| 380 | cpu.stall++ |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | // NTSC Timing Helper Functions |
| 385 |