NEO_GEO.INC 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. ;
  2. ; *** NEO-GEO SYSTEM PROGRAM ADDRESS ***
  3. ;
  4. SYSTEM_RESET EQU 0C00402H
  5. SYSTEM_INT1 EQU 0C00438H
  6. SYSTEM_RETURN EQU 0C00444H
  7. SYSTEM_IO EQU 0C0044AH
  8. CREDIT_CHECK EQU 0C00450H
  9. CREDIT_DOWN EQU 0C00456H
  10. READ_CALENDAR EQU 0C0045CH
  11. SYS_CARD EQU 0C00468H
  12. SYS_CARD_ERROR EQU 0C0046EH
  13. FIX_CLEAR EQU 0C004C2H
  14. LSP_1st EQU 0C004C8H
  15. MESS_OUT EQU 0C004CEH
  16. METRIC_DATA EQU 0C02000H
  17. SIN_DATA EQU 0C04000H
  18. RND_DATA EQU 0C04200H
  19. MVS_CREDIT EQU 0D00034H
  20. SOUND_STOP EQU 0D00046H
  21. ;
  22. ; *** NEO-GEO MEMORY & I/O MAPPING ***
  23. ;
  24. *** LSPC (LINE SPRITE CONTROLER) ***
  25. LSPC_ADRS EQU 3C0000H W word
  26. ; vram address register
  27. LSPC_DATA EQU 3C0002H R/W word
  28. ; vram data register
  29. LSPC_INC EQU 3C0004H W word
  30. ; auto increment data register (after vram write)
  31. LSPC_MODE EQU 3C0006H W word
  32. ; mode register
  33. ; bit 8-15 auto action speed (1/60 sec)
  34. ; bit 3 action stop, bit 4-7 timer interrupt mode set
  35. V_POSITION EQU 3C0006H R word
  36. ; laster virtical position read register
  37. ; bit 0-2 auto action character code bit 0-2
  38. ; bit 3 0=ntsc 1=pal
  39. ; bit 7-15 v position (*80H)
  40. TIMER_HI EQU 3C0008H W word
  41. TIMER_LOW EQU 3C000AH W word
  42. ; timer value set
  43. ; count down cycle 1 picsel =167 usec
  44. INT_CLEAR EQU 3C000CH W word
  45. ; interrupt clear
  46. CL_TIMER EQU 00000010B timer
  47. CL_BLANK EQU 00000100B v blanking
  48. *** PALETTE ( COLOR GENERATER ) ***
  49. COLOR_GEN EQU 400000H -401FFFH bank 0 word or long word
  50. ; 1 color = [R,G,B] 4 bit * dark bit
  51. ; 1 palette = 16 color (code 0 = blank)
  52. ; all 256 palette
  53. ; palette 0-0FH fix, 10H-FEH line sprite, FFH (code F only) back ground
  54. ;
  55. ; bit 0-3 blue b1-b4
  56. ; 4-7 green b1-b4
  57. ; 8-11 red b1-b4
  58. ; 12 blue b0
  59. ; 13 green b0
  60. ; 14 red b0
  61. ; 15 dark bit
  62. ;
  63. ; *** read write only v blanking ***
  64. SHADOW_OFF EQU 3A0001H W byte shadow bit off
  65. SHADOW_ON EQU 3A0011H W byte shadow bit on
  66. PALETTE_BANK0 EQU 3A001FH W byte palette bank 0
  67. PALETTE_BANK1 EQU 3A000FH W byte palette bank 1
  68. *** WATCH DOG ***
  69. WATCH_DOG EQU 300001H W byte
  70. ; write this address by 100 ms
  71. *** SOUND ***
  72. SOUND EQU 320000H R/W byte
  73. ; write send sound code and request NMI to sound CPU
  74. *** LEVER I/O *** negative ie. 0=on 1=off
  75. UP EQU 00000001B
  76. DOWN EQU 00000010B
  77. LEFT EQU 00000100B
  78. RIGHT EQU 00001000B
  79. A_BUTTON EQU 00010000B
  80. B_BUTTON EQU 00100000B
  81. C_BUTTON EQU 01000000B
  82. D_BUTTON EQU 10000000B
  83. B_UP EQU 0
  84. B_DOWN EQU 1
  85. B_LEFT EQU 2
  86. B_RIGHT EQU 3
  87. B_A_BUTTON EQU 4
  88. B_B_BUTTON EQU 5
  89. B_C_BUTTON EQU 6
  90. B_D_BUTTON EQU 7
  91. START_SELECT EQU 380000H R byte
  92. P1_START EQU 00000001B
  93. P1_SELECT EQU 00000010B
  94. P2_START EQU 00000100B
  95. P2_SELECT EQU 00001000B
  96. IC_CARD_ON EQU 00110000B 0=IC card on
  97. B_P1_START EQU 0
  98. B_P1_SELECT EQU 1
  99. B_P2_START EQU 2
  100. B_P2_SELECT EQU 3
  101. *** IC CARD ***
  102. IC_WRITE_EI1 EQU 3A0005H W byte
  103. IC_WRITE_EI2 EQU 3A0017H W byte
  104. IC_WRITE_DI1 EQU 3A0007H W byte
  105. IC_WRITE_DI2 EQU 3A0015H W byte
  106. IC_SELECT EQU 3A0009H W byte
  107. IC_NORMAL EQU 3A0019H W byte
  108. IC_BANK EQU 380011H W byte b0-2
  109. IC_MEMORY EQU 800000H IC card memory area
  110. *** MEMORY BANK ***
  111. SYSTEM_ROM EQU 3A0003H W byte 0-7FH is system rom
  112. USER_ROM EQU 3A0013H W byte 0-7FH is user rom
  113. *** LINE SPRITE ***
  114. ; one line sprite=32 characters (1 character=16*16 dot)
  115. SP_CODE EQU 00H 40H,41,42,-,7F (line sprite 0 ,1)
  116. ; --- 5F3FH (line sprite 380)
  117. ; even address character code 15 bit (bit 15 don't care)
  118. ; odd address character atrribute
  119. ; bit 0 h flip
  120. ; 1 v flip
  121. ; 2 auto action by 4 character
  122. ; 3 " 8
  123. ; 4-7 not used
  124. ; 8-15 palette No
  125. ;
  126. SP_BIG EQU 8000H (line sprite 0)
  127. ; -817CH (line sprite 380)
  128. ; line sprite reduction number
  129. ; bit 0-7 v reduction (X+1)/100H %
  130. ; 8-11 h reduction (X+1)/10H %
  131. ; 12-15 not used
  132. SP_V EQU 8200H (line sprite 0)
  133. ; -837CH (line sprite 380)
  134. ; line sprite v position
  135. ; bit 0-5 active character No (if 0 then not displayed)
  136. ; 6 chane bit
  137. ; 7-15 v position (9 bit)
  138. CHANE EQU 01000000B
  139. B_CHANE EQU 6
  140. SP_H EQU 8400H (line sprite 0)
  141. ; -857CH (line sprite 380)
  142. ; line sprite h position
  143. ; bit 0-6 not used
  144. ; 7-15 h position (9 bit)
  145. *** FIX ***
  146. ; one character 8*8 dot
  147. FIX EQU 7002H (v=0 h=0)
  148. ; -73FDH (v=27 h=31)
  149. ; h position right => address +20H
  150. ; v position down => address +1
  151. ; bit 0-11 character code
  152. ; 12-15 palette No
  153.