Advertisement
NovaYoshi

mapper design

Sep 16th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. up to 1024KB PRG ROM
  2. up to 1024KB PRG RAM
  3. PRG RAM and ROM can be mapped freely
  4. 32KB CHR RAM (up to 128KB)
  5. four screen mirroring
  6. scanline interrupts
  7.  
  8. $4800 - Same as register $0e (IRQ)
  9. $5000 - Port address ($00-$0f)
  10. $5800 - Port data ($00-$ff)
  11.  
  12. Like with MMC3 and FME-7, writing to Port Address selects a register to write to, and Port Data writes to the selected register.
  13.  
  14. $00: CHR slot A
  15. $01: CHR slot B
  16. $02: CHR slot C
  17. $03: CHR slot D
  18. $04: CHR slot E
  19. $05: CHR slot F
  20. $06: CHR slot G
  21. $07: CHR slot H
  22. ..nn nnnn .5K bank
  23. ..nn nnn. 1K bank
  24. ..nn nn.. 2K bank
  25. ..nn n... 4K bank
  26.  
  27. $08: Mirroring and CHR mode
  28. ..cc sfmm
  29. || ||++- mirroring mode
  30. || |+--- four-screen in last 4kb of CHR RAM, ignores mm if on
  31. || +---- swap $0xxx with $1xxx
  32. ++------ CHR mode
  33. Mirroring:
  34. 0: One-screen, lower bank of CIRAM
  35. 1: One-screen, upper bank of CIRAM
  36. 2: vertical mirroring (horizontal arrangement) from CIRAM
  37. 3: horizontal mirroring (vertical arrangement) from CIRAM
  38. When combined with sprite 0 or scanline IRQ, this allows four-screen mirroring and a status bar at the same time, as the playfield is in CHR RAM and the status bar is in CIRAM.
  39.  
  40. CHR mode: (A through H are assigned in order)
  41. $0xxx | $1xxx
  42. 0: 1K, 1K, 1K, 1K | 1K, 1K, 1K, 1K
  43. 1: 2K, 1K, 1K | 2K, .5K, .5K, .5K, .5K
  44. 2: 2K, 2K | 1K, 1K, .5K, .5K, .5K, .5K
  45. 3: 4K | 1K, .5K, .5K, .5K, .5K, .5K, .5K
  46.  
  47. PRG banks:
  48. rbbb bbbb
  49. |+++-++++- 8kb PRG bank
  50. +--------- 0=ROM, 1=RAM
  51. $09: PRG bank at $6000-$7fff
  52. $0a: PRG bank at $8000-$9fff
  53. $0b: PRG bank at $a000-$bfff
  54. $0c: PRG bank at $c000-$dfff
  55. $0d: PRG bank at $e000-$ffff
  56. Loss of M2 oscillation (caused by resets) causes register $0d to revert to a value of $7F, mapping the last ROM bank in the cart into $E000-$FFFF.
  57.  
  58. $0e: Set IRQ count
  59. At the start of each scanline, the PPU freezes for a few cycles, and PPU A13 stays high for at least three consecutive cycles of PPU /RD. The mapper detects this and subtracts 1 from the value in $0e unless the value is $F0-$FF. While the value is 0, /IRQ is pulled low.
  60. Programming tip: Reading from the nametables or palette during vertical or forced blanking will cause counts unless you write $FF to port $0e.
  61. Some implementations may count M2 cycles (1.8 MHz) instead of PPU /RD cycles (2.7 MHz) to save a pin. Cost-reduced versions may lack IRQ logic entirely.
  62.  
  63. $0f: Unused
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement