?login_element?

Subversion Repositories NedoOS

Rev

Rev 289 | Blame | Compare with Previous | Last modification | View Log | Download

  1. ;-------------------------------------------------------------------------------------
  2. ;DEFINES
  3.  
  4. ; GAME SPECIFIC DEFINES
  5.  
  6. MAX_ENEMIES=7
  7.         if COMPACTDATA
  8.  
  9. AREADATA=$
  10.  
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12. ;init area up to $074b
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. UnusedVariable db 0
  15.  
  16. ObjectOffset          db 0;= $08
  17.  
  18. FrameCounter          db 0;= $09
  19.  
  20. SavedJoypadBits       ;= $06fc
  21. SavedJoypad1Bits      db 0;= $06fc
  22. SavedJoypad2Bits      db 0;= $06fd
  23. JoypadBitMask         db 0;= $074a
  24.  
  25. A_B_Buttons           db 0;= $0a
  26. PreviousA_B_Buttons   db 0;= $0d
  27. Up_Down_Buttons       db 0;= $0b
  28. Left_Right_Buttons    db 0;= $0c
  29.  
  30. GameEngineSubroutine  db 0;= $0e
  31.  
  32. ScreenRoutineTask     db 0;= $073c
  33.  
  34. DemoAction            db 0;= $0717
  35. DemoActionTimer       db 0;= $0718
  36.  
  37. TimerControl          db 0;= $0747
  38.  
  39. ;Sprite_Data           ;= $0200
  40. ;Sprite_Y_Position=Sprite_Data     ;db 0;= $0200
  41. ;Sprite_Tilenumber=Sprite_Data+1     ;db 0;= $0201
  42. ;Sprite_Attributes=Sprite_Data+2     ;db 0;= $0202
  43. ;Sprite_X_Position=Sprite_Data+3     ;db 0;= $0203
  44. ;256 bytes
  45.  
  46. ScreenEdge_PageLoc    ;= $071a
  47. ScreenLeft_PageLoc    db 0;= $071a
  48. ScreenRight_PageLoc   db 0;= $071b
  49. ScreenEdge_X_Pos      ;= $071c
  50. ScreenLeft_X_Pos      db 0;= $071c
  51. ScreenRight_X_Pos     db 0;= $071d
  52.  
  53. PlayerFacingDir       db 0;= $33
  54. DestinationPageLoc    db 0;= $34
  55. VictoryWalkControl    db 0;= $35
  56. PrimaryMsgCounter     db 0;= $0719
  57. SecondaryMsgCounter   db 0;= $0749
  58.  
  59. HorizontalScroll      db 0;= $073f
  60. VerticalScroll        db 0;= $0740
  61. ScrollLock            db 0;= $0723
  62. ScrollThirtyTwo       db 0;= $073d
  63. Player_X_Scroll       db 0;= $06ff
  64.  
  65. AreaData              ;= $e7
  66. AreaDataLow           db 0;= $e7
  67. AreaDataHigh          db 0;= $e8
  68. EnemyData             ;= $e9
  69. EnemyDataLow          db 0;= $e9
  70. EnemyDataHigh         db 0;= $ea
  71.  
  72. AreaParserTaskNum     db 0;= $071f
  73. ColumnSets            db 0;= $071e
  74. CurrentPageLoc        db 0;= $0725
  75. CurrentColumnPos      db 0;= $0726
  76. BackloadingFlag       db 0;= $0728
  77. BehindAreaParserFlag  db 0;= $0729
  78. AreaObjectPageLoc     db 0;= $072a
  79. AreaObjectPageSel     db 0;= $072b
  80. AreaDataOffset        db 0;= $072c
  81. AreaObjOffsetBuffer   db 0;= $072d
  82. AreaObjectLength      db 0;= $0730
  83. StaircaseControl      db 0;= $0734
  84. AreaObjectHeight      db 0;= $0735
  85. MushroomLedgeHalfLen  db 0;= $0736
  86. EnemyDataOffset       db 0;= $0739
  87. EnemyObjectPageLoc    db 0;= $073a
  88. EnemyObjectPageSel    db 0;= $073b
  89.  
  90. BlockBufferColumnPos  db 0;= $06a0
  91. MetatileBuffer        ds 0x0d;0xd0;???;= $06a1
  92.  
  93. CurrentNTAddr_Low     db 0;= $0721
  94. CurrentNTAddr_High    db 0;= $0720
  95. AttributeBuffer       db 0;= $03f9
  96.  
  97. LoopCommand           db 0;= $0745
  98.  
  99. DigitModifier         ds 6;???;= $0134
  100.  
  101. VerticalFlipFlag      db 0;= $0109
  102. FloateyNum_Control    ds MAX_ENEMIES;???;= $0110
  103. ShellChainCounter     ds MAX_ENEMIES;???;= $0125
  104. FloateyNum_Timer      ds MAX_ENEMIES;???;= $012c
  105. FloateyNum_X_Pos      ds MAX_ENEMIES;???;= $0117
  106. FloateyNum_Y_Pos      ds MAX_ENEMIES;???;= $011e
  107. FlagpoleFNum_Y_Pos    db 0;= $010d
  108. FlagpoleFNum_YMFDummy db 0;= $010e
  109. FlagpoleScore         db 0;= $010f
  110. FlagpoleCollisionYPos db 0;= $070f
  111. StompChainCounter     db 0;= $0484
  112.  
  113. ;VRAM_Buffer1_Offset   db 0;= $0300
  114. ;VRAM_Buffer1          ds 63;???;= $0301
  115. ;VRAM_Buffer2_Offset   db 0;= $0340
  116. ;VRAM_Buffer2          ds TitleScreenDataSize-64;63;???;= $0341 ;следующий блок данных в $0363, но нужен буфер до 0x043a
  117.  
  118. Sprite0HitDetectFlag  db 0;= $0722
  119. ColorRotateOffset     db 0;= $06d4
  120.  
  121. TerrainControl        db 0;= $0727
  122. AreaStyle             db 0;= $0733
  123. ForegroundScenery     db 0;= $0741
  124. BackgroundScenery     db 0;= $0742
  125. CloudTypeOverride     db 0;= $0743
  126. BackgroundColorCtrl   db 0;= $0744
  127.  
  128. PlayerEntranceCtrl    db 0;= $0710
  129. GameTimerSetting      db 0;= $0715
  130. WarpZoneControl       db 0;= $06d6
  131. ChangeAreaTimer       db 0;= $06de
  132.  
  133. MultiLoopCorrectCntr  db 0;= $06d9
  134. MultiLoopPassCntr     db 0;= $06da
  135.  
  136. SecondaryHardMode     db 0;= $06cc
  137.  
  138. CoinTallyFor1Ups      db 0;= $0748
  139.  
  140. BalPlatformAlignment  db 0;= $03a0
  141. Platform_X_Scroll     db 0;= $03a1
  142. PlatformCollisionFlag db 0;= $03a2
  143. YPlatformTopYPos      db 0;= $0401
  144. YPlatformCenterYPos   db 0;= $58
  145.  
  146. BrickCoinTimerFlag    db 0;= $06bc
  147. StarFlagTaskControl   db 0;= $0746
  148.  
  149. SprShuffleAmtOffset   db 0;= $06e0
  150. SprShuffleAmt         ds 3;= $06e1
  151. SprDataOffset         ;= $06e4
  152. Player_SprDataOffset  db 0;= $06e4
  153. Enemy_SprDataOffset   ds MAX_ENEMIES;???;= $06e5
  154. Block_SprDataOffset   ;= $06ec
  155. Alt_SprDataOffset     ds 2;???;= $06ec
  156. Bubble_SprDataOffset  ds 3;???;= $06ee
  157. FBall_SprDataOffset   ds 2;???;= $06f1
  158. Misc_SprDataOffset    ds 15;???;= $06f3
  159. SprDataOffset_Ctrl    db 0;= $03ee
  160.  
  161. Player_State          db 0;= $1d ;0=ground, 1=jumping/swimming?, 2=falling, 3=climbing
  162. Enemy_State           ds MAX_ENEMIES-1;???;= $1e ;-1???
  163. Fireball_State        ds 2;???;= $24
  164. Block_State           ds 4;???;= $26
  165. Misc_State            ds 15;???;= $2a
  166.  
  167. Player_MovingDir      db 0;= $45
  168. Enemy_MovingDir       db 0;= $46
  169.  
  170. SprObject_X_Speed     ;= $57
  171. Player_X_Speed        db 0;= $57
  172. Enemy_X_Speed         ds MAX_ENEMIES-1;???;= $58 ;-1???
  173. Fireball_X_Speed      ds 2;???;= $5e
  174. Block_X_Speed         ds 4;???;= $60
  175. Misc_X_Speed          ds 9;???;= $64
  176.  
  177. Jumpspring_FixedYPos  db 0;= $58 ;=Enemy_X_Speed???
  178. JumpspringAnimCtrl    db 0;= $070e
  179. JumpspringForce       db 0;= $06db
  180.  
  181. SprObject_PageLoc     ;= $6d
  182. Player_PageLoc        db 0;= $6d
  183. Enemy_PageLoc         ds MAX_ENEMIES-1;???;= $6e ;-1???
  184. Fireball_PageLoc      ds 2;???;= $74
  185. Block_PageLoc         ds 4;???;= $76
  186. Misc_PageLoc          ds 9;???;= $7a
  187. Bubble_PageLoc        ds 3;???;= $83
  188.  
  189. SprObject_X_Position  ;= $86
  190. Player_X_Position     db 0;= $86
  191. Enemy_X_Position      ds MAX_ENEMIES-1;???;= $87 ;-1???
  192. Fireball_X_Position   ds 2;???;= $8d
  193. Block_X_Position      ds 4;???;= $8f
  194. Misc_X_Position       ds 9;???;= $93
  195. Bubble_X_Position     ds 3;???;= $9c
  196.  
  197. SprObject_Y_Speed     ;= $9f
  198. Player_Y_Speed        db 0;= $9f
  199. Enemy_Y_Speed         ds MAX_ENEMIES-1;???;= $a0 ;-1???
  200. Fireball_Y_Speed      ds 2;???;= $a6
  201. Block_Y_Speed         ds 4;???;= $a8
  202. Misc_Y_Speed          ds 9;???;= $ac
  203.  
  204. SprObject_Y_HighPos   ;= $b5
  205. Player_Y_HighPos      db 0;= $b5
  206. Enemy_Y_HighPos       ds MAX_ENEMIES-1;???;= $b6 ;-1???
  207. Fireball_Y_HighPos    ds 2;???;= $bc
  208. Block_Y_HighPos       ds 4;???;= $be
  209. Misc_Y_HighPos        ds 9;???;= $c2
  210. Bubble_Y_HighPos      ds 3;???;= $cb
  211.  
  212. SprObject_Y_Position  ;= $ce
  213. Player_Y_Position     db 0;= $ce
  214. Enemy_Y_Position      ds MAX_ENEMIES-1;???;= $cf ;-1???
  215. Fireball_Y_Position   ds 2;???;= $d5
  216. Block_Y_Position      ds 4;???;= $d7
  217. Misc_Y_Position       ds 9;???;= $db
  218. Bubble_Y_Position     ds 3;???;= $e4
  219.  
  220. SprObject_Rel_XPos    ;= $03ad
  221. Player_Rel_XPos       db 0;= $03ad
  222. Enemy_Rel_XPos        db 0;= $03ae
  223. Fireball_Rel_XPos     db 0;= $03af
  224. Bubble_Rel_XPos       db 0;= $03b0
  225. Block_Rel_XPos        ds 2;= $03b1
  226. Misc_Rel_XPos         db 0;= $03b3
  227.  
  228. SprObject_Rel_YPos    ;= $03b8
  229. Player_Rel_YPos       db 0;= $03b8
  230. Enemy_Rel_YPos        db 0;= $03b9
  231. Fireball_Rel_YPos     db 0;= $03ba
  232. Bubble_Rel_YPos       db 0;= $03bb
  233. Block_Rel_YPos        ds 2;= $03bc
  234. Misc_Rel_YPos         db 0;= $03be
  235.  
  236. SprObject_SprAttrib   ;= $03c4
  237. Player_SprAttrib      db 0;= $03c4
  238. Enemy_SprAttrib       ds MAX_ENEMIES;???;= $03c5
  239.  
  240. SprObject_X_MoveForce db 0;= $0400
  241. Enemy_X_MoveForce     ds MAX_ENEMIES;???;= $0401
  242.  
  243. SprObject_YMF_Dummy   ;= $0416
  244. Player_YMF_Dummy      db 0;= $0416
  245. Enemy_YMF_Dummy       ds MAX_ENEMIES;???;= $0417
  246. Bubble_YMF_Dummy      ds 3;???;= $042c
  247.  
  248. SprObject_Y_MoveForce ;= $0433
  249. Player_Y_MoveForce    db 0;= $0433
  250. Enemy_Y_MoveForce     ds MAX_ENEMIES+1;???;= $0434 ;+1????
  251. Block_Y_MoveForce     db 2*2;???;= $043c
  252.  
  253. DisableCollisionDet   db 0;= $0716
  254. Player_CollisionBits  db 0;= $0490
  255. Enemy_CollisionBits   ds MAX_ENEMIES;???;= $0491
  256.  
  257. SprObj_BoundBoxCtrl   ;= $0499
  258. Player_BoundBoxCtrl   db 0;= $0499
  259. Enemy_BoundBoxCtrl    ds MAX_ENEMIES-1;???;= $049a ;-1???
  260. Fireball_BoundBoxCtrl ds 2;???;= $04a0
  261. Misc_BoundBoxCtrl     ds 9;???;= $04a2 ;начиная с объекта #9 идут misc objects (что это???)
  262.  
  263. EnemyFrenzyBuffer     db 0;= $06cb
  264. EnemyFrenzyQueue      db 0;= $06cd
  265. Enemy_Flag            ds MAX_ENEMIES;???;= $0f
  266. Enemy_ID              ds MAX_ENEMIES;???;= $16
  267.  
  268. PlayerGfxOffset       db 0;= $06d5
  269. Player_XSpeedAbsolute db 0;= $0700
  270. FrictionAdderHigh     db 0;= $0701
  271. FrictionAdderLow      db 0;= $0702
  272. RunningSpeed          db 0;= $0703
  273. SwimmingFlag          db 0;= $0704
  274. Player_X_MoveForce    db 0;= $0705
  275. DiffToHaltJump        db 0;= $0706
  276. JumpOrigin_Y_HighPos  db 0;= $0707
  277. JumpOrigin_Y_Position db 0;= $0708
  278. VerticalForce         db 0;= $0709
  279. VerticalForceDown     db 0;= $070a
  280. PlayerChangeSizeFlag  db 0;= $070b
  281. PlayerAnimTimerSet    db 0;= $070c
  282. PlayerAnimCtrl        db 0;= $070d
  283. DeathMusicLoaded      db 0;= $0712
  284. FlagpoleSoundQueue    db 0;= $0713
  285. CrouchingFlag         db 0;= $0714
  286. MaximumLeftSpeed      db 0;= $0450
  287. MaximumRightSpeed     db 0;= $0456
  288.  
  289. SprObject_OffscrBits  ;= $03d0
  290. Player_OffscreenBits  db 0;= $03d0
  291. Enemy_OffscreenBits   db 0;= $03d1
  292. FBall_OffscreenBits   db 0;= $03d2
  293. Bubble_OffscreenBits  db 0;= $03d3
  294. Block_OffscreenBits   db 0;= $03d4
  295. Misc_OffscreenBits    db 0;= $03d6
  296. EnemyOffscrBitsMasked ds MAX_ENEMIES;???;= $03d8
  297.  
  298. Cannon_Offset         db 0;= $046a
  299. Cannon_PageLoc        ds 6;???;= $046b
  300. Cannon_X_Position     ds 6;???;= $0471
  301. Cannon_Y_Position     ds 6;???;= $0477
  302. Cannon_Timer          ds 6;???;= $047d
  303.  
  304. Whirlpool_Offset      =Cannon_Offset;= $046a
  305. Whirlpool_PageLoc     =Cannon_PageLoc;= $046b
  306. Whirlpool_LeftExtent  =Cannon_X_Position;= $0471
  307. Whirlpool_Length      =Cannon_Y_Position;= $0477
  308. Whirlpool_Flag        =Cannon_Timer;= $047d
  309.  
  310. VineFlagOffset        db 0;= $0398
  311. VineHeight            db 0;= $0399
  312. VineObjOffset         ds 3;???;= $039a
  313. VineStart_Y_Position  db 0;= $039d
  314.  
  315. Block_Orig_YPos       ds 2;???;= $03e4
  316. Block_BBuf_Low        ds 2;???;= $03e6
  317. Block_Metatile        ds 2;???;= $03e8
  318. Block_PageLoc2        ds 2;???;= $03ea
  319. Block_RepFlag         ds 2;???;= $03ec
  320. Block_ResidualCounter db 0;= $03f0
  321. Block_Orig_XPos       ds 2;???;= $03f1
  322.  
  323. BoundingBox_UL_Corner ;= $04ac
  324. BoundingBox_UL_XPos   db 0;= $04ac
  325. BoundingBox_UL_YPos   db 0;= $04ad
  326. BoundingBox_LR_Corner ;= $04ae
  327. BoundingBox_DR_XPos   db 0;= $04ae
  328. BoundingBox_DR_YPos   db 0;= $04af
  329. EnemyBoundingBoxCoord ds 4*MAX_ENEMIES;???;= $04b0
  330.  
  331. PowerUpType           db 0;= $39
  332.  
  333. FireballBouncingFlag  ds MAX_ENEMIES;???;= $3a
  334. FireballCounter       db 0;= $06ce
  335. FireballThrowingTimer db 0;= $0711
  336.  
  337. HammerEnemyOffset     ds MAX_ENEMIES;???;= $06ae
  338. JumpCoinMiscOffset    db 0;= $06b7
  339.  
  340.         align 16;256 ;не помогает
  341. Block_Buffer_1        ds 0xd0;= $0500 ;at least +$b4 ;13 строк по 16 блоков
  342. Block_Buffer_2        ds 0xd0;= $05d0
  343.  
  344. HammerThrowingTimer   ds MAX_ENEMIES;???;= $03a2
  345. HammerBroJumpTimer    ds MAX_ENEMIES;???;= $3c
  346. Misc_Collision_Flag   ds MAX_ENEMIES;???;= $06be
  347.  
  348. RedPTroopaOrigXPos    ds MAX_ENEMIES;???;= $0401
  349. RedPTroopaCenterYPos  ds MAX_ENEMIES;???;= $58
  350.  
  351. XMovePrimaryCounter   ds MAX_ENEMIES;???;= $a0
  352. XMoveSecondaryCounter ds MAX_ENEMIES;???;= $58
  353.  
  354. CheepCheepMoveMFlag   ds MAX_ENEMIES;???;= $58
  355. CheepCheepOrigYPos    ds MAX_ENEMIES;???;= $0434
  356. BitMFilter            db 0;= $06dd
  357.  
  358. LakituReappearTimer   db 0;= $06d1
  359. LakituMoveSpeed       ds MAX_ENEMIES;???;= $58
  360. LakituMoveDirection   ds MAX_ENEMIES;???;= $a0
  361.  
  362. FirebarSpinState_Low  ds MAX_ENEMIES;???;= $58
  363. FirebarSpinState_High ds MAX_ENEMIES;???;= $a0
  364. FirebarSpinSpeed      ds MAX_ENEMIES;???;= $0388
  365. FirebarSpinDirection  ds MAX_ENEMIES;???;= $34
  366.  
  367. DuplicateObj_Offset   db 0;= $06cf
  368. NumberofGroupEnemies  db 0;= $06d3
  369.  
  370. BlooperMoveCounter    ds MAX_ENEMIES;???;= $a0
  371. BlooperMoveSpeed      ds MAX_ENEMIES;???;= $58
  372.  
  373. BowserBodyControls    db 0;= $0363
  374. BowserFeetCounter     db 0;= $0364
  375. BowserMovementSpeed   db 0;= $0365
  376. BowserOrigXPos        db 0;= $0366
  377. BowserFlameTimerCtrl  db 0;= $0367
  378. BowserFront_Offset    db 0;= $0368
  379. BridgeCollapseOffset  db 0;= $0369
  380. BowserGfxFlag         db 0;= $036a
  381. BowserHitPoints       db 0;= $0483
  382. MaxRangeFromOrigin    db 0;= $06dc
  383.  
  384. BowserFlamePRandomOfs ds MAX_ENEMIES;???;= $0417
  385.  
  386. PiranhaPlantUpYPos    ds MAX_ENEMIES;???;= $0417
  387. PiranhaPlantDownYPos  ds MAX_ENEMIES;???;= $0434
  388. PiranhaPlant_Y_Speed  ds MAX_ENEMIES;???;= $58
  389. PiranhaPlant_MoveFlag ds MAX_ENEMIES;???;= $a0
  390.  
  391. FireworksCounter      db 0;= $06d7
  392. ExplosionGfxCounter   ds MAX_ENEMIES;???;= $58
  393. ExplosionTimerCounter ds MAX_ENEMIES;???;= $a0
  394.  
  395. ;sound related defines
  396. NoteLenLookupTblOfs   db 0;= $f0
  397.  
  398. Square1SoundBuffer    db 0;= $f1
  399. Square2SoundBuffer    db 0;= $f2
  400. NoiseSoundBuffer      db 0;= $f3
  401. AreaMusicBuffer       db 0;= $f4
  402. MusicData             db 0;= $f5
  403. MusicDataLow          db 0;= $f5
  404. MusicDataHigh         db 0;= $f6
  405. MusicOffset_Square2   db 0;= $f7
  406. MusicOffset_Square1   db 0;= $f8
  407. MusicOffset_Triangle  db 0;= $f9
  408.  
  409. PauseSoundQueue       db 0;= $fa
  410. AreaMusicQueue        db 0;= $fb
  411. EventMusicQueue       db 0;= $fc
  412. NoiseSoundQueue       db 0;= $fd
  413. Square2SoundQueue     db 0;= $fe
  414. Square1SoundQueue     db 0;= $ff
  415.  
  416. AREADATA_end=$
  417.  
  418. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  419. ;init game up to $076f
  420. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  421. AreaType              db 0;= $074e
  422. AreaAddrsLOffset      db 0;= $074f
  423. AreaPointer           db 0;= $0750
  424.  
  425. FetchNewGameTimerFlag db 0;= $0757
  426. GameTimerExpiredFlag  db 0;= $0759
  427.  
  428. JoypadOverride        db 0;= $0758
  429.  
  430. EntrancePage          db 0;= $0751
  431. AltEntranceControl    db 0;= $0752
  432.  
  433. CurrentPlayer         db 0;= $0753
  434. PlayerSize            db 0;= $0754
  435. PlayerStatus          db 0;= $0756
  436.  
  437. Player_Pos_ForScroll  db 0;= $0755
  438. ScrollAmount          db 0;= $0775
  439.  
  440. OnscreenPlayerInfo    ;= $075a
  441. NumberofLives         db 0;= $075a ;used by current player
  442. HalfwayPage           db 0;= $075b
  443. LevelNumber           db 0;= $075c ;the actual dash number
  444. Hidden1UpFlag         db 0;= $075d
  445. CoinTally             db 0;= $075e
  446. WorldNumber           db 0;= $075f
  447. AreaNumber            db 0;= $0760 ;internal number used to find areas
  448.  
  449. OffscreenPlayerInfo   ;= $0761
  450. OffScr_NumberofLives  db 0;= $0761 ;used by offscreen player
  451. OffScr_HalfwayPage    db 0;= $0762
  452. OffScr_LevelNumber    db 0;= $0763
  453. OffScr_Hidden1UpFlag  db 0;= $0764
  454. OffScr_CoinTally      db 0;= $0765
  455. OffScr_WorldNumber    db 0;= $0766
  456. OffScr_AreaNumber     db 0;= $0767
  457.  
  458. ScrollFractional      db 0;= $0768
  459. DisableIntermediate   db 0;= $0769
  460. PrimaryHardMode       db 0;= $076a ;secondaryhardmode is below and cleared every time!!!
  461. WorldSelectNumber     db 0;= $076b
  462.  
  463. GAMEDATA_end=$
  464.  
  465. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  466. ;reinit mem up to $07d6 ;don't clear topscore, continueworld, worldselectenebleflag
  467. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  468. OperMode              db 0;= $0770
  469. OperMode_Task         db 0;= $0772
  470. VRAM_Buffer_AddrCtrl  db 0;= $0773
  471. DisableScreenFlag     db 0;= $0774
  472. GamePauseStatus       db 0;= $0776
  473. GamePauseTimer        db 0;= $0777
  474.  
  475. Mirror_PPU_CTRL_REG1  db 0;= $0778
  476. Mirror_PPU_CTRL_REG2  db 0;= $0779
  477.  
  478. NumberOfPlayers       db 0;= $077a
  479.  
  480. IntervalTimerControl  db 0;= $077f
  481.  
  482. Timers                ;= $0780
  483. SelectTimer           db 0;= $0780
  484. PlayerAnimTimer       db 0;= $0781
  485. JumpSwimTimer         db 0;= $0782
  486. RunningTimer          db 0;= $0783
  487. BlockBounceTimer      db 0;= $0784
  488. SideCollisionTimer    db 0;= $0785
  489. JumpspringTimer       db 0;= $0786
  490. GameTimerCtrlTimer    db 0;= $0787
  491.                 ds 1
  492. ClimbSideTimer        db 0;= $0789
  493. EnemyFrameTimer       db 0;= $078a
  494.                 ds 4
  495. FrenzyEnemyTimer      db 0;= $078f
  496. BowserFireBreathTimer db 0;= $0790
  497. StompTimer            db 0;= $0791
  498. AirBubbleTimer        db 0;= $0792
  499.                 ds 2
  500. ScrollIntervalTimer   db 0;= $0795
  501. EnemyIntervalTimer    db 0;= $0796
  502.                 ds 6
  503. BrickCoinTimer        db 0;= $079d
  504. InjuryTimer           db 0;= $079e
  505. StarInvincibleTimer   db 0;= $079f
  506. ScreenTimer           db 0;= $07a0
  507. WorldEndTimer         db 0;= $07a1
  508. DemoTimer             db 0;= $07a2
  509.         ;ds Timers+0x24-$
  510.                 ds 4
  511.  
  512. PseudoRandomBitReg    db 0;= $07a7
  513.         ;display "PseudoRandomBitReg-Timers=",PseudoRandomBitReg-Timers
  514.  
  515. ;sound related defines
  516. MusicOffset_Noise     db 0;= $07b0
  517. EventMusicBuffer      db 0;= $07b1
  518. PauseSoundBuffer      db 0;= $07b2
  519.  
  520. Squ2_NoteLenBuffer    db 0;= $07b3
  521. Squ2_NoteLenCounter   db 0;= $07b4
  522. Squ2_EnvelopeDataCtrl db 0;= $07b5
  523. Squ1_NoteLenCounter   db 0;= $07b6
  524. Squ1_EnvelopeDataCtrl db 0;= $07b7
  525. Tri_NoteLenBuffer     db 0;= $07b8
  526. Tri_NoteLenCounter    db 0;= $07b9
  527. Noise_BeatLenCounter  db 0;= $07ba
  528. Squ1_SfxLenCounter    db 0;= $07bb
  529. Squ2_SfxLenCounter    db 0;= $07bd
  530. Sfx_SecondaryCounter  db 0;= $07be
  531. Noise_SfxLenCounter   db 0;= $07bf
  532.  
  533. DAC_Counter           db 0;= $07c0
  534. NoiseDataLoopbackOfs  db 0;= $07c1
  535. NoteLengthTblAdder    db 0;= $07c4
  536. AreaMusicBuffer_Alt   db 0;= $07c5
  537. PauseModeFlag         db 0;= $07c6
  538. GroundMusicHeaderOfs  db 0;= $07c7
  539. AltRegContentFlag     db 0;= $07ca
  540.  
  541. WARMMEMDATA_end=$
  542.  
  543. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  544. ;init mem up to $07fe
  545. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  546. DisplayDigits         ;= $07d7
  547. TopScoreDisplay       ds 6;= $07d7
  548. ScoreAndCoinDisplay   ;= $07dd
  549. PlayerScoreDisplay    ds 6;= $07dd ;почему тут? это всё блок DisplayDigits
  550.         ds DisplayDigits+($07f8-$07d7)-$ ;TODO убрать
  551. GameTimerDisplay      ds 6;???;= $07f8 ;почему тут? это всё блок DisplayDigits
  552.  
  553. WorldSelectEnableFlag db 0;= $07fc
  554. ContinueWorld         db 0;= $07fd
  555. WarmBootValidation    db 0;= $07ff
  556.  
  557. MEMDATA_end=$
  558.  
  559.         else
  560. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;        
  561. AREADATA=0x100
  562. AREADATA_end    = $074b
  563. GAMEDATA_end    = $076f
  564. WARMMEMDATA_end        = $07d6;WarmBootOffset
  565. MEMDATA_end        = $07fe;ColdBootOffset
  566.         ;display "MEMDATA_end=",MEMDATA_end
  567.         ;display "AREADATA=",AREADATA
  568.         ;display "MEMDATA_end-AREADATA=",MEMDATA_end-AREADATA
  569.  
  570. ObjectOffset          = SCRATCHPAD+$08
  571.  
  572. FrameCounter          = SCRATCHPAD+$09
  573.  
  574. SavedJoypadBits       = $06fc
  575. SavedJoypad1Bits      = $06fc
  576. SavedJoypad2Bits      = $06fd
  577. JoypadBitMask         = $074a
  578. JoypadOverride        = $0758
  579.  
  580. A_B_Buttons           = SCRATCHPAD+$0a
  581. PreviousA_B_Buttons   = SCRATCHPAD+$0d
  582. Up_Down_Buttons       = SCRATCHPAD+$0b
  583. Left_Right_Buttons    = SCRATCHPAD+$0c
  584.  
  585. GameEngineSubroutine  = SCRATCHPAD+$0e
  586.  
  587. Mirror_PPU_CTRL_REG1  = $0778
  588. Mirror_PPU_CTRL_REG2  = $0779
  589.  
  590. OperMode              = $0770
  591. OperMode_Task         = $0772
  592. ScreenRoutineTask     = $073c
  593.  
  594. GamePauseStatus       = $0776
  595. GamePauseTimer        = $0777
  596.  
  597. DemoAction            = $0717
  598. DemoActionTimer       = $0718
  599.  
  600. TimerControl          = $0747
  601. IntervalTimerControl  = $077f
  602.  
  603. Timers                = $0780
  604. SelectTimer           = $0780
  605. PlayerAnimTimer       = $0781
  606. JumpSwimTimer         = $0782
  607. RunningTimer          = $0783
  608. BlockBounceTimer      = $0784
  609. SideCollisionTimer    = $0785
  610. JumpspringTimer       = $0786
  611. GameTimerCtrlTimer    = $0787
  612. ClimbSideTimer        = $0789
  613. EnemyFrameTimer       = $078a
  614. FrenzyEnemyTimer      = $078f
  615. BowserFireBreathTimer = $0790
  616. StompTimer            = $0791
  617. AirBubbleTimer        = $0792
  618.  ;нижеследующие таймеры уменьшаются только раз в 21 фрейм
  619. ScrollIntervalTimer   = $0795
  620. EnemyIntervalTimer    = $0796
  621. BrickCoinTimer        = $079d
  622. InjuryTimer           = $079e
  623. StarInvincibleTimer   = $079f
  624. ScreenTimer           = $07a0
  625. WorldEndTimer         = $07a1
  626. DemoTimer             = $07a2
  627.  
  628. Sprite_Data           = $0200
  629.  
  630. Sprite_Y_Position     = $0200
  631. Sprite_Tilenumber     = $0201
  632. Sprite_Attributes     = $0202
  633. Sprite_X_Position     = $0203
  634.  
  635. ScreenEdge_PageLoc    = $071a
  636. ScreenEdge_X_Pos      = $071c
  637. ScreenLeft_PageLoc    = $071a
  638. ScreenRight_PageLoc   = $071b
  639. ScreenLeft_X_Pos      = $071c
  640. ScreenRight_X_Pos     = $071d
  641.  
  642. PlayerFacingDir       = SCRATCHPAD+$33
  643. DestinationPageLoc    = SCRATCHPAD+$34
  644. VictoryWalkControl    = SCRATCHPAD+$35
  645. ScrollFractional      = $0768
  646. PrimaryMsgCounter     = $0719
  647. SecondaryMsgCounter   = $0749
  648.  
  649. HorizontalScroll      = $073f
  650. VerticalScroll        = $0740
  651. ScrollLock            = $0723
  652. ScrollThirtyTwo       = $073d
  653. Player_X_Scroll       = $06ff
  654. Player_Pos_ForScroll  = $0755
  655. ScrollAmount          = $0775
  656.  
  657. AreaData              = SCRATCHPAD+$e7
  658. AreaDataLow           = SCRATCHPAD+$e7
  659. AreaDataHigh          = SCRATCHPAD+$e8
  660. EnemyData             = SCRATCHPAD+$e9
  661. EnemyDataLow          = SCRATCHPAD+$e9
  662. EnemyDataHigh         = SCRATCHPAD+$ea
  663.  
  664. AreaParserTaskNum     = $071f
  665. ColumnSets            = $071e
  666. CurrentPageLoc        = $0725
  667. CurrentColumnPos      = $0726
  668. BackloadingFlag       = $0728
  669. BehindAreaParserFlag  = $0729
  670. AreaObjectPageLoc     = $072a
  671. AreaObjectPageSel     = $072b
  672. AreaDataOffset        = $072c
  673. AreaObjOffsetBuffer   = $072d
  674. AreaObjectLength      = $0730
  675. StaircaseControl      = $0734
  676. AreaObjectHeight      = $0735
  677. MushroomLedgeHalfLen  = $0736
  678. EnemyDataOffset       = $0739
  679. EnemyObjectPageLoc    = $073a
  680. EnemyObjectPageSel    = $073b
  681. MetatileBuffer        = $06a1
  682. BlockBufferColumnPos  = $06a0
  683. CurrentNTAddr_Low     = $0721
  684. CurrentNTAddr_High    = $0720
  685. AttributeBuffer       = $03f9
  686.  
  687. LoopCommand           = $0745
  688.  
  689. DisplayDigits         = $07d7
  690. TopScoreDisplay       = $07d7
  691. ScoreAndCoinDisplay   = $07dd
  692. PlayerScoreDisplay    = $07dd
  693. GameTimerDisplay      = $07f8
  694. DigitModifier         = SCRATCHPAD2+$0134
  695.  
  696. VerticalFlipFlag      = SCRATCHPAD2+$0109
  697. FloateyNum_Control    = SCRATCHPAD2+$0110
  698. ShellChainCounter     = SCRATCHPAD2+$0125
  699. FloateyNum_Timer      = SCRATCHPAD2+$012c
  700. FloateyNum_X_Pos      = SCRATCHPAD2+$0117
  701. FloateyNum_Y_Pos      = SCRATCHPAD2+$011e
  702. FlagpoleFNum_Y_Pos    = SCRATCHPAD2+$010d
  703. FlagpoleFNum_YMFDummy = SCRATCHPAD2+$010e
  704. FlagpoleScore         = SCRATCHPAD2+$010f
  705. FlagpoleCollisionYPos = $070f
  706. StompChainCounter     = $0484
  707.  
  708. VRAM_Buffer1_Offset   = $0300
  709. VRAM_Buffer1          = $0301
  710. VRAM_Buffer2_Offset   = $0340
  711. VRAM_Buffer2          = $0341
  712. VRAM_Buffer_AddrCtrl  = $0773
  713. Sprite0HitDetectFlag  = $0722
  714. DisableScreenFlag     = $0774
  715. DisableIntermediate   = $0769
  716. ColorRotateOffset     = $06d4
  717.  
  718. TerrainControl        = $0727
  719. AreaStyle             = $0733
  720. ForegroundScenery     = $0741
  721. BackgroundScenery     = $0742
  722. CloudTypeOverride     = $0743
  723. BackgroundColorCtrl   = $0744
  724. AreaType              = $074e
  725. AreaAddrsLOffset      = $074f
  726. AreaPointer           = $0750
  727.  
  728. PlayerEntranceCtrl    = $0710
  729. GameTimerSetting      = $0715
  730. AltEntranceControl    = $0752
  731. EntrancePage          = $0751
  732. NumberOfPlayers       = $077a
  733. WarpZoneControl       = $06d6
  734. ChangeAreaTimer       = $06de
  735.  
  736. MultiLoopCorrectCntr  = $06d9
  737. MultiLoopPassCntr     = $06da
  738.  
  739. FetchNewGameTimerFlag = $0757
  740. GameTimerExpiredFlag  = $0759
  741.  
  742. PrimaryHardMode       = $076a
  743. SecondaryHardMode     = $06cc
  744. WorldSelectNumber     = $076b
  745. WorldSelectEnableFlag = $07fc
  746. ContinueWorld         = $07fd
  747.  
  748. CurrentPlayer         = $0753
  749. PlayerSize            = $0754
  750. PlayerStatus          = $0756
  751.  
  752. OnscreenPlayerInfo    = $075a
  753. NumberofLives         = $075a ;used by current player
  754. HalfwayPage           = $075b
  755. LevelNumber           = $075c ;the actual dash number
  756. Hidden1UpFlag         = $075d
  757. CoinTally             = $075e
  758. WorldNumber           = $075f
  759. AreaNumber            = $0760 ;internal number used to find areas
  760.  
  761. CoinTallyFor1Ups      = $0748
  762.  
  763. OffscreenPlayerInfo   = $0761
  764. OffScr_NumberofLives  = $0761 ;used by offscreen player
  765. OffScr_HalfwayPage    = $0762
  766. OffScr_LevelNumber    = $0763
  767. OffScr_Hidden1UpFlag  = $0764
  768. OffScr_CoinTally      = $0765
  769. OffScr_WorldNumber    = $0766
  770. OffScr_AreaNumber     = $0767
  771.  
  772. BalPlatformAlignment  = $03a0
  773. Platform_X_Scroll     = $03a1
  774. PlatformCollisionFlag = $03a2
  775. YPlatformTopYPos      = $0401
  776. YPlatformCenterYPos   = SCRATCHPAD+$58
  777.  
  778. BrickCoinTimerFlag    = $06bc
  779. StarFlagTaskControl   = $0746
  780.  
  781. PseudoRandomBitReg    = $07a7
  782. WarmBootValidation    = $07ff
  783.  
  784. SprShuffleAmtOffset   = $06e0
  785. SprShuffleAmt         = $06e1
  786. SprDataOffset         = $06e4
  787. Player_SprDataOffset  = $06e4
  788. Enemy_SprDataOffset   = $06e5
  789. Block_SprDataOffset   = $06ec
  790. Alt_SprDataOffset     = $06ec
  791. Bubble_SprDataOffset  = $06ee
  792. FBall_SprDataOffset   = $06f1
  793. Misc_SprDataOffset    = $06f3
  794. SprDataOffset_Ctrl    = $03ee
  795.  
  796. Player_State          = SCRATCHPAD+$1d
  797. Enemy_State           = SCRATCHPAD+$1e
  798. Fireball_State        = SCRATCHPAD+$24
  799. Block_State           = SCRATCHPAD+$26
  800. Misc_State            = SCRATCHPAD+$2a
  801.  
  802. Player_MovingDir      = SCRATCHPAD+$45
  803. Enemy_MovingDir       = SCRATCHPAD+$46
  804.  
  805. SprObject_X_Speed     = SCRATCHPAD+$57
  806. Player_X_Speed        = SCRATCHPAD+$57
  807. Enemy_X_Speed         = SCRATCHPAD+$58
  808. Fireball_X_Speed      = SCRATCHPAD+$5e
  809. Block_X_Speed         = SCRATCHPAD+$60
  810. Misc_X_Speed          = SCRATCHPAD+$64
  811.  
  812. Jumpspring_FixedYPos  = SCRATCHPAD+$58
  813. JumpspringAnimCtrl    = $070e
  814. JumpspringForce       = $06db
  815.  
  816. SprObject_PageLoc     = SCRATCHPAD+$6d
  817. Player_PageLoc        = SCRATCHPAD+$6d
  818. Enemy_PageLoc         = SCRATCHPAD+$6e
  819. Fireball_PageLoc      = SCRATCHPAD+$74
  820. Block_PageLoc         = SCRATCHPAD+$76
  821. Misc_PageLoc          = SCRATCHPAD+$7a
  822. Bubble_PageLoc        = SCRATCHPAD+$83
  823.  
  824. SprObject_X_Position  = SCRATCHPAD+$86
  825. Player_X_Position     = SCRATCHPAD+$86
  826. Enemy_X_Position      = SCRATCHPAD+$87
  827. Fireball_X_Position   = SCRATCHPAD+$8d
  828. Block_X_Position      = SCRATCHPAD+$8f
  829. Misc_X_Position       = SCRATCHPAD+$93
  830. Bubble_X_Position     = SCRATCHPAD+$9c
  831.  
  832. SprObject_Y_Speed     = SCRATCHPAD+$9f
  833. Player_Y_Speed        = SCRATCHPAD+$9f
  834. Enemy_Y_Speed         = SCRATCHPAD+$a0
  835. Fireball_Y_Speed      = SCRATCHPAD+$a6
  836. Block_Y_Speed         = SCRATCHPAD+$a8
  837. Misc_Y_Speed          = SCRATCHPAD+$ac
  838.  
  839. SprObject_Y_HighPos   = SCRATCHPAD+$b5
  840. Player_Y_HighPos      = SCRATCHPAD+$b5
  841. Enemy_Y_HighPos       = SCRATCHPAD+$b6
  842. Fireball_Y_HighPos    = SCRATCHPAD+$bc
  843. Block_Y_HighPos       = SCRATCHPAD+$be
  844. Misc_Y_HighPos        = SCRATCHPAD+$c2
  845. Bubble_Y_HighPos      = SCRATCHPAD+$cb
  846.  
  847. SprObject_Y_Position  = SCRATCHPAD+$ce
  848. Player_Y_Position     = SCRATCHPAD+$ce
  849. Enemy_Y_Position      = SCRATCHPAD+$cf
  850. Fireball_Y_Position   = SCRATCHPAD+$d5
  851. Block_Y_Position      = SCRATCHPAD+$d7
  852. Misc_Y_Position       = SCRATCHPAD+$db
  853. Bubble_Y_Position     = SCRATCHPAD+$e4
  854.  
  855. SprObject_Rel_XPos    = $03ad
  856. Player_Rel_XPos       = $03ad
  857. Enemy_Rel_XPos        = $03ae
  858. Fireball_Rel_XPos     = $03af
  859. Bubble_Rel_XPos       = $03b0
  860. Block_Rel_XPos        = $03b1
  861. Misc_Rel_XPos         = $03b3
  862.  
  863. SprObject_Rel_YPos    = $03b8
  864. Player_Rel_YPos       = $03b8
  865. Enemy_Rel_YPos        = $03b9
  866. Fireball_Rel_YPos     = $03ba
  867. Bubble_Rel_YPos       = $03bb
  868. Block_Rel_YPos        = $03bc
  869. Misc_Rel_YPos         = $03be
  870.  
  871. SprObject_SprAttrib   = $03c4
  872. Player_SprAttrib      = $03c4
  873. Enemy_SprAttrib       = $03c5
  874.  
  875. SprObject_X_MoveForce = $0400
  876. Enemy_X_MoveForce     = $0401
  877.  
  878. SprObject_YMF_Dummy   = $0416
  879. Player_YMF_Dummy      = $0416
  880. Enemy_YMF_Dummy       = $0417
  881. Bubble_YMF_Dummy      = $042c
  882.  
  883. SprObject_Y_MoveForce = $0433
  884. Player_Y_MoveForce    = $0433
  885. Enemy_Y_MoveForce     = $0434
  886. Block_Y_MoveForce     = $043c
  887.  
  888. DisableCollisionDet   = $0716
  889. Player_CollisionBits  = $0490
  890. Enemy_CollisionBits   = $0491
  891.  
  892. SprObj_BoundBoxCtrl   = $0499
  893. Player_BoundBoxCtrl   = $0499
  894. Enemy_BoundBoxCtrl    = $049a
  895. Fireball_BoundBoxCtrl = $04a0
  896. Misc_BoundBoxCtrl     = $04a2
  897.  
  898. EnemyFrenzyBuffer     = $06cb
  899. EnemyFrenzyQueue      = $06cd
  900. Enemy_Flag            = SCRATCHPAD+$0f
  901. Enemy_ID              = SCRATCHPAD+$16
  902.  
  903. PlayerGfxOffset       = $06d5
  904. Player_XSpeedAbsolute = $0700
  905. FrictionAdderHigh     = $0701
  906. FrictionAdderLow      = $0702
  907. RunningSpeed          = $0703
  908. SwimmingFlag          = $0704
  909. Player_X_MoveForce    = $0705
  910. DiffToHaltJump        = $0706
  911. JumpOrigin_Y_HighPos  = $0707
  912. JumpOrigin_Y_Position = $0708
  913. VerticalForce         = $0709
  914. VerticalForceDown     = $070a
  915. PlayerChangeSizeFlag  = $070b
  916. PlayerAnimTimerSet    = $070c
  917. PlayerAnimCtrl        = $070d
  918. DeathMusicLoaded      = $0712
  919. FlagpoleSoundQueue    = $0713
  920. CrouchingFlag         = $0714
  921. MaximumLeftSpeed      = $0450
  922. MaximumRightSpeed     = $0456
  923.  
  924. SprObject_OffscrBits  = $03d0
  925. Player_OffscreenBits  = $03d0
  926. Enemy_OffscreenBits   = $03d1
  927. FBall_OffscreenBits   = $03d2
  928. Bubble_OffscreenBits  = $03d3
  929. Block_OffscreenBits   = $03d4
  930. Misc_OffscreenBits    = $03d6
  931. EnemyOffscrBitsMasked = $03d8
  932.  
  933. Cannon_Offset         = $046a
  934. Cannon_PageLoc        = $046b
  935. Cannon_X_Position     = $0471
  936. Cannon_Y_Position     = $0477
  937. Cannon_Timer          = $047d
  938.  
  939. Whirlpool_Offset      = $046a
  940. Whirlpool_PageLoc     = $046b
  941. Whirlpool_LeftExtent  = $0471
  942. Whirlpool_Length      = $0477
  943. Whirlpool_Flag        = $047d
  944.  
  945. VineFlagOffset        = $0398
  946. VineHeight            = $0399
  947. VineObjOffset         = $039a
  948. VineStart_Y_Position  = $039d
  949.  
  950. Block_Orig_YPos       = $03e4
  951. Block_BBuf_Low        = $03e6
  952. Block_Metatile        = $03e8
  953. Block_PageLoc2        = $03ea
  954. Block_RepFlag         = $03ec
  955. Block_ResidualCounter = $03f0
  956. Block_Orig_XPos       = $03f1
  957.  
  958. BoundingBox_UL_XPos   = $04ac
  959. BoundingBox_UL_YPos   = $04ad
  960. BoundingBox_DR_XPos   = $04ae
  961. BoundingBox_DR_YPos   = $04af
  962. BoundingBox_UL_Corner = $04ac
  963. BoundingBox_LR_Corner = $04ae
  964. EnemyBoundingBoxCoord = $04b0
  965.  
  966. PowerUpType           = SCRATCHPAD+$39
  967.  
  968. FireballBouncingFlag  = SCRATCHPAD+$3a
  969. FireballCounter       = $06ce
  970. FireballThrowingTimer = $0711
  971.  
  972. HammerEnemyOffset     = $06ae
  973. JumpCoinMiscOffset    = $06b7
  974.  
  975. Block_Buffer_1        = $0500
  976. Block_Buffer_2        = $05d0
  977.  
  978. HammerThrowingTimer   = $03a2
  979. HammerBroJumpTimer    = SCRATCHPAD+$3c
  980. Misc_Collision_Flag   = $06be
  981.  
  982. RedPTroopaOrigXPos    = $0401
  983. RedPTroopaCenterYPos  = SCRATCHPAD+$58
  984.  
  985. XMovePrimaryCounter   = SCRATCHPAD+$a0
  986. XMoveSecondaryCounter = SCRATCHPAD+$58
  987.  
  988. CheepCheepMoveMFlag   = SCRATCHPAD+$58
  989. CheepCheepOrigYPos    = $0434
  990. BitMFilter            = $06dd
  991.  
  992. LakituReappearTimer   = $06d1
  993. LakituMoveSpeed       = SCRATCHPAD+$58
  994. LakituMoveDirection   = SCRATCHPAD+$a0
  995.  
  996. FirebarSpinState_Low  = SCRATCHPAD+$58
  997. FirebarSpinState_High = SCRATCHPAD+$a0
  998. FirebarSpinSpeed      = $0388
  999. FirebarSpinDirection  = SCRATCHPAD+$34
  1000.  
  1001. DuplicateObj_Offset   = $06cf
  1002. NumberofGroupEnemies  = $06d3
  1003.  
  1004. BlooperMoveCounter    = SCRATCHPAD+$a0
  1005. BlooperMoveSpeed      = SCRATCHPAD+$58
  1006.  
  1007. BowserBodyControls    = $0363
  1008. BowserFeetCounter     = $0364
  1009. BowserMovementSpeed   = $0365
  1010. BowserOrigXPos        = $0366
  1011. BowserFlameTimerCtrl  = $0367
  1012. BowserFront_Offset    = $0368
  1013. BridgeCollapseOffset  = $0369
  1014. BowserGfxFlag         = $036a
  1015. BowserHitPoints       = $0483
  1016. MaxRangeFromOrigin    = $06dc
  1017.  
  1018. BowserFlamePRandomOfs = $0417
  1019.  
  1020. PiranhaPlantUpYPos    = $0417
  1021. PiranhaPlantDownYPos  = $0434
  1022. PiranhaPlant_Y_Speed  = SCRATCHPAD+$58
  1023. PiranhaPlant_MoveFlag = SCRATCHPAD+$a0
  1024.  
  1025. FireworksCounter      = $06d7
  1026. ExplosionGfxCounter   = SCRATCHPAD+$58
  1027. ExplosionTimerCounter = SCRATCHPAD+$a0
  1028.  
  1029. ;sound related defines
  1030. Squ2_NoteLenBuffer    = $07b3
  1031. Squ2_NoteLenCounter   = $07b4
  1032. Squ2_EnvelopeDataCtrl = $07b5
  1033. Squ1_NoteLenCounter   = $07b6
  1034. Squ1_EnvelopeDataCtrl = $07b7
  1035. Tri_NoteLenBuffer     = $07b8
  1036. Tri_NoteLenCounter    = $07b9
  1037. Noise_BeatLenCounter  = $07ba
  1038. Squ1_SfxLenCounter    = $07bb
  1039. Squ2_SfxLenCounter    = $07bd
  1040. Sfx_SecondaryCounter  = $07be
  1041. Noise_SfxLenCounter   = $07bf
  1042.  
  1043. PauseSoundQueue       = SCRATCHPAD+$fa
  1044. Square1SoundQueue     = SCRATCHPAD+$ff
  1045. Square2SoundQueue     = SCRATCHPAD+$fe
  1046. NoiseSoundQueue       = SCRATCHPAD+$fd
  1047. AreaMusicQueue        = SCRATCHPAD+$fb
  1048. EventMusicQueue       = SCRATCHPAD+$fc
  1049.  
  1050. Square1SoundBuffer    = SCRATCHPAD+$f1
  1051. Square2SoundBuffer    = SCRATCHPAD+$f2
  1052. NoiseSoundBuffer      = SCRATCHPAD+$f3
  1053. AreaMusicBuffer       = SCRATCHPAD+$f4
  1054. EventMusicBuffer      = $07b1
  1055. PauseSoundBuffer      = $07b2
  1056.  
  1057. MusicData             = SCRATCHPAD+$f5
  1058. MusicDataLow          = SCRATCHPAD+$f5
  1059. MusicDataHigh         = SCRATCHPAD+$f6
  1060. MusicOffset_Square2   = SCRATCHPAD+$f7
  1061. MusicOffset_Square1   = SCRATCHPAD+$f8
  1062. MusicOffset_Triangle  = SCRATCHPAD+$f9
  1063. MusicOffset_Noise     = $07b0
  1064.  
  1065. NoteLenLookupTblOfs   = SCRATCHPAD+$f0
  1066. DAC_Counter           = $07c0
  1067. NoiseDataLoopbackOfs  = $07c1
  1068. NoteLengthTblAdder    = $07c4
  1069. AreaMusicBuffer_Alt   = $07c5
  1070. PauseModeFlag         = $07c6
  1071. GroundMusicHeaderOfs  = $07c7
  1072. AltRegContentFlag     = $07ca
  1073.  
  1074. UnusedVariable = $06c9
  1075.         endif
  1076.  
  1077. ;-------------------------------------------------------------------------------------
  1078. ;CONSTANTS
  1079.  
  1080. ;sound effects constants
  1081. Sfx_SmallJump         = %10000000
  1082. Sfx_Flagpole          = %01000000
  1083. Sfx_Fireball          = %00100000
  1084. Sfx_PipeDown_Injury   = %00010000
  1085. Sfx_EnemySmack        = %00001000
  1086. Sfx_EnemyStomp        = %00000100
  1087. Sfx_Bump              = %00000010
  1088. Sfx_BigJump           = %00000001
  1089.  
  1090. Sfx_BowserFall        = %10000000
  1091. Sfx_ExtraLife         = %01000000
  1092. Sfx_PowerUpGrab       = %00100000
  1093. Sfx_TimerTick         = %00010000
  1094. Sfx_Blast             = %00001000
  1095. Sfx_GrowVine          = %00000100
  1096. Sfx_GrowPowerUp       = %00000010
  1097. Sfx_CoinGrab          = %00000001
  1098.  
  1099. Sfx_BowserFlame       = %00000010
  1100. Sfx_BrickShatter      = %00000001
  1101.  
  1102. ;music constants
  1103. Silence               = %10000000
  1104.  
  1105. StarPowerMusic        = %01000000
  1106. PipeIntroMusic        = %00100000
  1107. CloudMusic            = %00010000
  1108. CastleMusic           = %00001000
  1109. UndergroundMusic      = %00000100
  1110. WaterMusic            = %00000010
  1111. GroundMusic           = %00000001
  1112.  
  1113. TimeRunningOutMusic   = %01000000
  1114. EndOfLevelMusic       = %00100000
  1115. AltGameOverMusic      = %00010000
  1116. EndOfCastleMusic      = %00001000
  1117. VictoryMusic          = %00000100
  1118. GameOverMusic         = %00000010
  1119. DeathMusic            = %00000001
  1120.  
  1121. ;enemy object constants
  1122. GreenKoopa            = $00
  1123. BuzzyBeetle           = $02
  1124. RedKoopa              = $03
  1125. HammerBro             = $05
  1126. Goomba                = $06
  1127. Bloober               = $07
  1128. BulletBill_FrenzyVar  = $08
  1129. GreyCheepCheep        = $0a
  1130. RedCheepCheep         = $0b
  1131. Podoboo               = $0c
  1132. PiranhaPlant          = $0d
  1133. GreenParatroopaJump   = $0e
  1134. RedParatroopa         = $0f
  1135. GreenParatroopaFly    = $10
  1136. Lakitu                = $11
  1137. Spiny                 = $12
  1138. FlyCheepCheepFrenzy   = $14
  1139. FlyingCheepCheep      = $14
  1140. BowserFlame           = $15
  1141. Fireworks             = $16
  1142. BBill_CCheep_Frenzy   = $17
  1143. Stop_Frenzy           = $18
  1144. Bowser                = $2d
  1145. PowerUpObject         = $2e
  1146. VineObject            = $2f
  1147. FlagpoleFlagObject    = $30
  1148. StarFlagObject        = $31
  1149. JumpspringObject      = $32
  1150. BulletBill_CannonVar  = $33
  1151. RetainerObject        = $35
  1152. TallEnemy             = $09
  1153.  
  1154. ;other constants
  1155. World1 = 0
  1156. World2 = 1
  1157. World3 = 2
  1158. World4 = 3
  1159. World5 = 4
  1160. World6 = 5
  1161. World7 = 6
  1162. World8 = 7
  1163. Level1 = 0
  1164. Level2 = 1
  1165. Level3 = 2
  1166. Level4 = 3
  1167.  
  1168. TitleScreenDataOffset = $1ec0 ;in chr ROM
  1169. TitleScreenDataSize = 0x140
  1170. SoundMemory           = $07b0
  1171.  
  1172. A_Button              = %10000000
  1173. B_Button              = %01000000
  1174. Select_Button         = %00100000
  1175. Start_Button          = %00010000
  1176. Up_Dir                = %00001000
  1177. Down_Dir              = %00000100
  1178. Left_Dir              = %00000010
  1179. Right_Dir             = %00000001
  1180.  
  1181. TitleScreenModeValue  = 0
  1182. GameModeValue         = 1
  1183. VictoryModeValue      = 2
  1184. GameOverModeValue     = 3
  1185.  
  1186.