Advertisement
TempoQuill

tqm

Oct 7th, 2024 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TQM1 = $ef
  2. TQM2 = $f7
  3. TQM3 = $f8
  4.  
  5. TQM_Pulse1Offset = 0
  6.     ; bit field and volume work like 2a03, duty adds 12.5% each entry
  7.     TQM_SQ1ENV = $4020
  8.     ; sweep works like 2a03
  9.     TQM_SQ1SWP = $4021
  10.     ; pitch and stop timer work like 2a03
  11.     TQM_SQ1LO = $4022
  12.     TQM_SQ1HI = $4023
  13. TQM_Pulse2Offset = 4
  14.     TQM_SQ2ENV = $4024
  15.     TQM_SQ2SWP = $4025
  16.     TQM_SQ2LO = $4026
  17.     TQM_SQ2HI = $4027
  18. TQM_WavOffset = 8
  19.     ; linear stop works like 2a03
  20.     TQM_WAVLIN = $4028
  21.     ; read/write, access to entire CPU
  22.     TQM_WAVDMA = $4029
  23.     TQM_WAVLO = $402a
  24.     ; $x8-$xf turns on WAV, high nybble is added to target WAV address
  25.     TQM_WAVHIID = $402b
  26. TQM_NoiseOffset = 12
  27.     ; works like 2a03
  28.     TQM_NOISEENV = $402c
  29.     ; LFSR Reset
  30.     TQM_NOISERES = $402d
  31.     ; works like 2a03, 5-bit pitch instead of 4-bit
  32.     TQM_NOISELO = $402e
  33.     TQM_NOISEHI = $402f ; no actual pitch, just sound length
  34. TQM_DMCOffset = 16
  35.     ; works like 2a03
  36.     ; able to stream DPCM with IRQ, loop
  37.     TQM_DMCPITCH = $4030
  38.     ; Direct ROM Access, briefly swaps to desired bank each write
  39.     TQM_DMCDROMA = $4031
  40.     TQM_DMCSTART = $4032
  41.     TQM_DMCLEN = $4033
  42.  
  43. ; also uses Direct ROM Access for legacy DMC
  44. TQM_LEGDROMA = $4034
  45. ; works like 2a03
  46. TQM_MIXER = $4035
  47. ; hi bytes of DMC DROMA
  48. TQM_LEGHI = $4036
  49. TQM_DMCLO = $4037
  50. ; Palette can be loaded in from $6000-$7fff
  51. TQM_PALDMA = $4038
  52. ; nametable assigned to $4800-$4fff
  53. ; set to 4-screen mirroring if $80/$c0
  54. TQM_NTDMA = $4039
  55.     TQM_NT0 = 0*1 ; $4800-$4bff
  56.     TQM_NT1 = 1*1 ; $4b00-$4fff/$4800-$4bff
  57.     TQM_NT2 = 2*1 ; $4800-$4bff/$4b00-$4fff
  58.     TQM_NT3 = 3*1 ; $4b00-$4fff
  59.     TQM_PAIR1 = 0*64
  60.     TQM_PAIR2 = 1*64
  61.     TQM_2SCREEN = 0*128
  62.     TQM_4SCREEN = 1*128
  63. ; swap RAM $5000-$5fff (256K - TQM1, 512K - TQM2, 1M - TQM3)
  64. TQM_MRAMBANK = $403a
  65. ; swap RAM $7000-$7fff
  66. TQM_WRAMBANK = $403b
  67. ; metadata used for crack protection
  68. ; WRAM:
  69. ; Write:    -------p
  70. ;       p - location of desired RAM
  71. ; Read:     xxxx--b-
  72. ;       b - Battery backup
  73. ;       x - Shift count from 64
  74. TQM_RAMSIZE = $403c
  75. ; two 12-bit denotations demonstrate ROM size
  76. TQM_ROMHI = $403d
  77. TQM_PRGLO = $403e
  78. TQM_CHRLO = $403f
  79. ; each PRG register is spread across 8 bytes. In mode 3, the upper three bits
  80. ; of a bank are determined by an index offset to base. This essentially adds
  81. ; three bits to the register without having to poke two bytes
  82. TQM_PRG1 = $4040 ; $8000-$9fff/$bfff/$ffff
  83. TQM_PRG2 = $4048 ; $a000-$bfff
  84. TQM_PRG3 = $4050 ; $c000-$dfff
  85. TQM_PRGMODE = $4058
  86.     ; DPCM mode enabled
  87.     TQM_P32K = 0*1 ; 32K indexed $8000-$ffff switchable (0-1)
  88.     TQM_P16K = 1*1 ; 16K indexed $8000-$bfff switchable (0-3)
  89.     ; modes 2 & 3 turn off DPCM DROMA
  90.     TQM_P8KA = 2*1 ; 8K absolute $8000-$dfff switchable across 2M
  91.     TQM_P8KI = 3*1 ; 8K indexed  $8000-$dfff switchable across 4M (TQM1)/8M (TQM2)/16M (TQM3)
  92. TQM_CHR1 = $4080 ; $0000-$07ff
  93. TQM_CHR2 = $4088 ; $0800-$0fff
  94. TQM_CHR3 = $4090 ; $1000-$17ff
  95. TQM_CHR4 = $4098 ; $1800-$1fff
  96. TQM_CHR5 = $40a0 ; $?000-$?7ff ; second sprite table for 8x16 mode
  97. TQM_CHR6 = $40a8 ; $?800-$?fff
  98. ; vsplit, runs for 8 entries (16 bytes)
  99. TQM_CLMNOFFS = $40b0 ; tile offset, plane
  100.     TQM_COLMASK = $1f
  101.     TQM_PLN0 = 0*64
  102.     TQM_PLN1 = 1*64
  103.     TQM_PLN2 = 2*64
  104.     TQM_PLN3 = 3*64
  105. TQM_CLMNCRDT = $40b1
  106. TQM_PPUINDEX = $40c0 ; $4200-$43ff
  107. ; mathematical registers
  108. TQM_MTHINDEX = $40c1 ; $4400-$47ff
  109. TQM_MTHOP = $40c2
  110.     TQM_ADD = 0
  111.     TQM_SUB = 1
  112.     TQM_MULTI = 2
  113.     TQM_DIV = 3 ; $40c7 acts as remainder
  114.     TQM_SHIFTL = 4
  115.     TQM_SHIFTR = 5
  116.     TQM_EXP = 6
  117.     TQM_SQRRT = 7
  118. TQM_RTBYTE = $40c3 ; determines hexidecimal point start during square route
  119. ; when using $4400-$47ff combined with the math index and operators, you get a
  120. ; 32-bit number that is only floating point when performing square routes
  121. TQM_MTHANS24 = $40c4 ; READ
  122. TQM_MTHANS16 = $40c5 ; READ
  123. TQM_MTHANS8 = $40c6 ; READ
  124. TQM_MTHANS0 = $40c7 ; READ
  125. TQM_OPCINDEX = $40c8 ; vsplit index
  126. ; fill RAM with specified value
  127. ; initialization begins on write with bit 7 on
  128. TQM_INIT = $40d0
  129.     TQM_ZPINIT = 0
  130.     TQM_INTINIT = 1
  131.     TQM_MRAMINIT = 2
  132.     TQM_WRAMINIT = 3
  133.     TQM_PPUPINIT = 4
  134.     TQM_MATHINIT = 5
  135.     TQM_NT1INIT = 6
  136.     TQM_NT2INIT = 7
  137.     TQM_STOP = 0*128
  138.     TQM_START = 1*128
  139. TQM_INITVAL = $40d4
  140. TQM_WRAMPRSV = $40d8 ; preserve WRAM if non-zero
  141. ; read-only register to be used for crack protection
  142. TQM_MAPPERNO = $40e0
  143. TQM_SCXPRSV = $40f0 ; preserve x scroll value
  144. TQM_SCYPRSV = $40f8 ; preserve y scroll value
  145.  
  146. TQM_PPUPTRS = $4200 ; PPU pointers
  147. TQM_MATHVARS = $4400    ; maths variables
  148. TQM_NTABLE1 = $4800 ; nametable 1
  149. TQM_NTABLE2 = $4c00 ; nametable 2
  150. TQM_MRAM = $5000    ; mapper RAM
  151. TQM_PALETTE = $6000 ; virtual palette
  152. TQM_WRAMHOME = $6000    ; home work RAM
  153. TQM_WRAMVLTL = $7000    ; volatile work RAM
  154.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement