tree: dbc8ffa061ff092cfe61036135be2b875218405f [path history] [tgz]
  1. alu.v
  2. async_ram.v
  3. bootrom.mif
  4. boy.v
  5. brom.v
  6. chip.v
  7. clk_div.v
  8. common.v
  9. control.v
  10. cpu.v
  11. defines.v
  12. dma.v
  13. mbc5.v
  14. ppu.v
  15. README.md
  16. regfile.v
  17. serial.v
  18. simtop.v
  19. singleport_ram.v
  20. singlereg.v
  21. sound.v
  22. sound_channel_mix.v
  23. sound_length_ctr.v
  24. sound_noise.v
  25. sound_square.v
  26. sound_vol_env.v
  27. sound_wave.v
  28. timer.v
  29. uprj_netlists.v
  30. user_defines.v
  31. user_proj_example.v
  32. user_project_wrapper.v
verilog/rtl/README.md

Memory Access / Multiplexing

Due to limited pins, cartridge/ main memory access and VRAM access are multiplexed over one same bus.

4-cycles are divided as follows:

  • 0: Cartridge address setup (for external latching)
  • 1: VRAM access
  • 2: WRAM or cartridge RW
  • 3: VRAM access

Diagram:

CT       |  0  |  1  |  2  |  3  |
          ___________             ___            
CLK  ____|           |___________|     
     _    __    __    __    __    __    
CK    |__|  |__|  |__|  |__|  |__|  |
     ____       _____________________
EALE     |_____|
                      _____
ECS  ________________|     |_________
     ________________       _________
WR                   |_____|
     ____ _____ _____ _____ _____ ___
ADDR ____X_WR__X_VR1_X_WR__X_VR2_X___
     ____       _____ _____ _____ 
DATA ____>-----<_VR1_X_WR__X_VR2_>---

Note that VRAM/WRAM seperation is based on function unit: Only PPU accesses VRAM on cycle 2 and 4. If CPU accesses VRAM, it would still happen on cycle 3.