Advertisement
NovaYoshi

memory.s

Apr 30th, 2014
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .segment "ZEROPAGE"
  2.  
  3.   MaxNumPlayers = 2
  4.  
  5.   retraces:        .res 1
  6.   keydown:         .res MaxNumPlayers
  7.   keylast:         .res MaxNumPlayers
  8.  
  9.   HasExtraRAM:     .res 1 ; the compo cart will NOT have extra RAM
  10.  
  11.   random1:         .res 2
  12.   random2:         .res 2
  13.  
  14.   psg_sfx_state:    .res 32
  15.  
  16.   ScrollX:          .res 2
  17.   ScrollMode:       .res 1
  18.  
  19.   TileCycleIndex:   .res 1
  20.  
  21.   PlayerEnabled:    .res MaxNumPlayers
  22.   PlayerPX:         .res MaxNumPlayers
  23.   PlayerPYH:        .res MaxNumPlayers
  24.   PlayerPYL:        .res MaxNumPlayers
  25.   PlayerVYH:        .res MaxNumPlayers
  26.   PlayerVYL:        .res MaxNumPlayers
  27.   PlayerInvincible: .res MaxNumPlayers
  28.   PlayerDropLock:   .res MaxNumPlayers
  29.   PlayerDead:       .res MaxNumPlayers
  30.   PlayerTeleportCooldown: .res MaxNumPlayers
  31.   PlayerWasRunning: .res MaxNumPlayers ; was the player running when they jumped?
  32.   PlayerXShifted:   .res 1
  33.   PlayerPowerEnabled: .res 1 ; set during player handler,
  34.                              ; is PowerType, but -1 if PowerTime is zero
  35.  
  36.   PlayerDir:        .res MaxNumPlayers ; 0 or 1
  37.   PlayerHead:       .res MaxNumPlayers ; tile number
  38.   PlayerBody:       .res MaxNumPlayers ; not a tile number
  39.   PlayerHeld:       .res MaxNumPlayers ; tile number?
  40.   PlayerPowerType:  .res MaxNumPlayers ;
  41.   PlayerPowerTime:  .res MaxNumPlayers ; measured in 1/4 frames
  42.   PlayerJumpCancelLock: .res MaxNumPlayers
  43.   .enum
  44.      APOWERUP_NONE
  45.      APOWERUP_DIAGSHOOT
  46.      APOWERUP_BOMBS
  47.      APOWERUP_JUMP
  48.      APOWERUP_BILLBLOCK
  49.   .endenum
  50.  
  51.   PlayerLives:      .res MaxNumPlayers
  52.   PlayerHealth:     .res MaxNumPlayers
  53.   MaxHealthNormal    = 4
  54.   MaxHealthHard      = 3
  55.   MaxNumBlockUpdates = 4
  56.   MaxNumTileUpdates  = 7
  57.   BlockUpdateA1:   .res MaxNumBlockUpdates
  58.   BlockUpdateA2:   .res MaxNumBlockUpdates
  59.   BlockUpdateB1:   .res MaxNumBlockUpdates
  60.   BlockUpdateB2:   .res MaxNumBlockUpdates
  61.   BlockUpdateT1:   .res MaxNumBlockUpdates
  62.   BlockUpdateT2:   .res MaxNumBlockUpdates
  63.   BlockUpdateT3:   .res MaxNumBlockUpdates
  64.   BlockUpdateT4:   .res MaxNumBlockUpdates
  65.  
  66.   TileUpdateA1:    .res MaxNumTileUpdates
  67.   TileUpdateA2:    .res MaxNumTileUpdates
  68.   TileUpdateT:     .res MaxNumTileUpdates
  69.  
  70.   StatusRow1:      .res 28
  71.   StatusRow2:      .res 16
  72.   Update28 = StatusRow1
  73.   Update28Address: .res 2
  74.  
  75.   EnableNMIDraw:   .res 1
  76.  
  77.   GameDifficulty:  .res 1
  78.   DIFFICULTY_STANDARD = 0
  79.   DIFFICULTY_HARDER   = 1
  80.   DIFFICULTY_MOREHARD = 2
  81.  
  82.   LevelNumber:     .res 1
  83.   TempX:           .res 1
  84.  
  85.   OamPtr:          .res 1
  86.   TempVal:         .res 4
  87.   FlashColor:      .res 1
  88.  
  89.   TouchRight:      .res 1
  90.   TouchBottom:     .res 1
  91.   TouchTopA:       .res 1
  92.   TouchTopB:       .res 1
  93.   TouchLeftA:      .res 1
  94.   TouchLeftB:      .res 1
  95.   TouchWidthA:     .res 1
  96.   TouchWidthB:     .res 1
  97.   TouchHeightA:    .res 1
  98.   TouchHeightB:    .res 1
  99.  
  100. ;  mul_factor_a:    .res 1
  101. ;  mul_factor_x:    .res 1
  102. ;  mul_product_lo:  .res 1
  103. ;  mul_product_hi:  .res 1
  104.  
  105.   EnemyWidth:      .res 1
  106.  
  107. DispEnemyBodyType: .res 1
  108. DispEnemyWeapon: .res 1
  109. DispEnemyHead: .res 1
  110.  
  111.   NumScoreDigits = 5
  112.   ScoreDigits:     .res NumScoreDigits*2
  113.   .res 1
  114.  
  115. .segment "BSS"
  116.   .res 14
  117.   soundBSS:        .res 64
  118.   NumRowsMade:     .res 1
  119.  
  120.   EditorBouncyFX:  .res 1 ; a timer
  121.  
  122.   IsWarmboot:    .res 1
  123.   WarmbootData:  .res 4
  124.   PlayerStartPX: .res MaxNumPlayers
  125.   PlayerStartPY: .res MaxNumPlayers
  126.  
  127.   MaxDelayedMetaEdits = 10
  128.   DelayedMetaEditIndx: .res MaxDelayedMetaEdits
  129.   DelayedMetaEditTime: .res MaxDelayedMetaEdits
  130.   DelayedMetaEditType: .res MaxDelayedMetaEdits
  131.  
  132.   MaxExplosions = 5
  133.   ExplosionPosX: .res MaxExplosions
  134.   ExplosionPosY: .res MaxExplosions
  135.   ExplosionSize: .res MaxExplosions
  136.   ExplosionTime: .res MaxExplosions
  137.  
  138.   PowerupLen  =  3
  139.   PowerupPX:   .res PowerupLen
  140.   PowerupPY:   .res PowerupLen
  141.   PowerupVX:   .res PowerupLen
  142.   PowerupVY:   .res PowerupLen
  143.   PowerupF:    .res PowerupLen
  144.   ; E----TTT
  145.   ;  E - Enabled
  146.   ;  T - Type of powerup
  147.  
  148.   NeedPowerupSound: .res 1
  149.   BothDeadTimer: .res 1
  150.  
  151.   VersusMode: .res 1
  152.   VersusNeed2Win: .res 1
  153.   VersusWins: .res MaxNumPlayers
  154.   .enum
  155.     VERSUS_NONE
  156.     VERSUS_SCORE
  157.     VERSUS_FIGHT
  158.   .endenum
  159.  
  160.   BulletLen   = 12
  161.   ObjectLen   = 14
  162.   BulletPX:    .res BulletLen
  163.   BulletPXL:   .res BulletLen
  164.   BulletPY:    .res BulletLen
  165.   BulletPYL:   .res BulletLen
  166.   BulletVX:    .res BulletLen
  167.   BulletVXL:   .res BulletLen
  168.   BulletVY:    .res BulletLen
  169.   BulletVYL:   .res BulletLen
  170.   BulletLife:  .res BulletLen
  171.   BulletF:     .res BulletLen  ;flags
  172.   ; EP--TTTT
  173.   ;  E - enabled
  174.   ;  P - player bullet, if 1 can damage enemies (as well as players!)
  175.   ;  T - type
  176.  
  177.   ObjectPX:    .res ObjectLen
  178.   ObjectPYH:   .res ObjectLen
  179.   ObjectPYL:   .res ObjectLen
  180.   ObjectVYH:   .res ObjectLen
  181.   ObjectVYL:   .res ObjectLen
  182.  
  183.   ObjectF1:    .res ObjectLen ; HHTTTTTD, Health, Type, Direction
  184.   ObjectF2:    .res ObjectLen ; ----SSSS, State
  185.   ObjectF3:    .res ObjectLen ; PPP-----, Parameter, Weapon
  186.   ObjectTimer: .res ObjectLen ; when timer reaches 0, reset state
  187.  
  188.   BombDroppedIndex: .res 1
  189.  
  190. ; level config
  191.   LevelGoalType:      .res 1
  192.   LevelGoalParam:     .res 1
  193.   LevelEnemyPool:     .res 16
  194.   ScreenEnemiesCount: .res 1
  195.   MaxScreenEnemies:   .res 1
  196.   LevelWon:           .res 1
  197.   Timer60:            .res 1
  198.   LevelConfigBytes:   .res 8
  199.   LevelMapPointer = LevelConfigBytes + 6
  200.   LevelEditMode:      .res 1
  201.   LevelEditStartX:    .res 1
  202.   LevelEditStartY:    .res 1
  203.   IsMappedLevel:      .res 1
  204.   LevelEditKeyRepeat: .res 1
  205.   IsScoreMode:        .res 1
  206.   IsFightMode:        .res 1
  207.  
  208.   JustPickedFromMenu: .res 1
  209.  
  210.   NoLevelCycle:       .res 1
  211.   VersusPowerups:     .res 1
  212.  
  213.   ScrollGameMode:   .res 1
  214.   ScrollGenerator:  .res 1 ; types documented in scrollmode.s
  215.   ScrollGenVars:    .res 4
  216.  
  217.   EditorCurX:      .res 1
  218.   EditorCurY:      .res 1
  219.   EditorCurT:      .res 1
  220.  
  221.   LevelBuf = $700
  222.   BulletMap = LevelBuf - 64
  223.   AttribMap = BulletMap - 64
  224.   CollectMap = AttribMap - 32
  225. .code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement