document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. ; Super Game Boy development (step by step)
  2. ; Made by Imanol Barriuso (Imanolea) for Games aside
  3.  
  4. ; Super Game boy command packets definition
  5.  
  6. MLT_REQ: MACRO
  7.     DB ($11 << 3) + 1
  8.     DB \\1 - 1
  9.     DS 14
  10. ENDM
  11.  
  12. CHR_TRN: MACRO
  13.     DB ($13 << 3) + 1
  14.     DB \\1 + (\\2 << 1)
  15.     DS 14
  16. ENDM
  17.  
  18. PCT_TRN: MACRO
  19.     DB ($14 << 3) + 1
  20.     DS 15
  21. ENDM
  22.  
  23. PAL_SET: MACRO
  24.     DB ($A << 3) + 1
  25.     DW \\1, \\2, \\3, \\4
  26.     DS 7
  27. ENDM
  28.  
  29. PAL_TRN: MACRO
  30.     DB ($B<< 3) + 1
  31.     DS 15
  32. ENDM
  33.  
  34. MASK_EN: MACRO
  35.     DB ($17 << 3) + 1
  36.     DB \\1
  37.     DS 14
  38. ENDM
  39.  
  40. RGB: MACRO
  41.     DW (\\3 << 10 | \\2 << 5 | \\1)
  42. ENDM
  43.  
  44. ; We assign the first palette (0) to the four palettes that are available for the game graphics
  45. PalSet:: PAL_SET 0, 0, 0, 0
  46.  
  47. MltReqTwoPlayers:: MLT_REQ 2
  48. MltReqOnePlayer:: MLT_REQ 1
  49. ; First 128 tile block transfer
  50. ChrTrn1:: CHR_TRN 0, 0
  51. ; Second 128 tile block transfer
  52. ChrTrn2:: CHR_TRN 1, 0
  53. PctTrn:: PCT_TRN
  54. PalTrn:: PAL_TRN
  55. MaskEnFreeze: MASK_EN 1
  56. MaskEnCancel: MASK_EN 0
  57.  
  58. ; Initialization packets extracted from the official documentation
  59. DataSnd0::
  60. DB $79,$5D,$08,$00,$0B,$8C,$D0,$F4,$60,$00,$00,$00,$00,$00,$00,$00
  61. DataSnd1::
  62. DB $79,$52,$08,$00,$0B,$A9,$E7,$9F,$01,$C0,$7E,$E8,$E8,$E8,$E8,$E0
  63. DataSnd2::
  64. DB $79,$47,$08,$00,$0B,$C4,$D0,$16,$A5,$CB,$C9,$05,$D0,$10,$A2,$28
  65. DataSnd3::
  66. DB $79,$3C,$08,$00,$0B,$F0,$12,$A5,$C9,$C9,$C8,$D0,$1C,$A5,$CA,$C9
  67. DataSnd4::
  68. DB $79,$31,$08,$00,$0B,$0C,$A5,$CA,$C9,$7E,$D0,$06,$A5,$CB,$C9,$7E
  69. DataSnd5::
  70. DB $79,$26,$08,$00,$0B,$39,$CD,$48,$0C,$D0,$34,$A5,$C9,$C9,$80,$D0
  71. DataSnd6::
  72. DB $79,$1B,$08,$00,$0B,$EA,$EA,$EA,$EA,$EA,$A9,$01,$CD,$4F,$0C,$D0
  73. DataSnd7::
  74. DB $79,$10,$08,$00,$0B,$4C,$20,$08,$EA,$EA,$EA,$EA,$EA,$60,$EA,$EA
  75.  
  76. SGBSuperPalettes::
  77.     ; Default palette
  78.     RGB 27,31,31
  79.     RGB 22,19,31
  80.     RGB 21,7,15
  81.     RGB 1,1,4
');